@solvimon/solvimon-web 0.1.0-alpha.30 → 0.1.0-alpha.31
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 +152 -91
- package/dist/AddPaymentMethodModal-Bs_aOOCX.mjs +97 -0
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DF4PIR-A.mjs +89 -0
- package/dist/{Alert.vue.es-ZPG49yR_.mjs → Alert.vue.es-xhsk_7Gn.mjs} +1 -1
- package/dist/AuthProvider.handle-CUO6Qj-5.mjs +46 -0
- package/dist/{Avatar.vue.es-geDQsZwu.mjs → Avatar.vue.es-DrbtUiLO.mjs} +1 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C3JYNZuR.mjs +64 -0
- package/dist/BillingInformationForm.lib-ad8B2Y1O.mjs +32 -0
- package/dist/BillingInformationForm.vue_vue_type_script_setup_true_lang-BUdcXy0H.mjs +340 -0
- package/dist/BillingInformationModal-crgTNGf4.mjs +85 -0
- package/dist/{Button.vue.es-j7iYlqtJ.mjs → Button.vue.es-BHbanjR0.mjs} +1 -1
- package/dist/{ChargeOnDemandModal-CR01PkP_.mjs → ChargeOnDemandModal-DYiFtw1n.mjs} +44 -43
- package/dist/{Chip.vue.es-Dxx_0dte.mjs → Chip.vue.es-Dc6-PjEn.mjs} +2 -2
- package/dist/{ContentWithAsideLayout-Bnbsq8_5.mjs → ContentWithAsideLayout-C2kFcft1.mjs} +1 -1
- package/dist/{ContextMenu.vue.es-BJO4U47Q.mjs → ContextMenu.vue.es-CvX6O2IM.mjs} +10 -10
- package/dist/{CustomerBillingInformation.vue.es-CmNpqcBw.mjs → CustomerBillingInformation.vue.es-DQWt9osz.mjs} +3 -3
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-hNVtamwL.mjs +217 -0
- package/dist/CustomerShippingAddresses-C0c-4D2W.mjs +282 -0
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DJnr5D56.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C50vGUvw.mjs} +992 -1100
- package/dist/{DividerText.vue.es-BusbyeAI.mjs → DividerText.vue.es-ChN6fnrH.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-wPma8Os-.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DCUml1W4.mjs} +3 -3
- package/dist/{ErrorNotification.vue.es-F068p7PY.mjs → ErrorNotification.vue.es-CWIVt5q9.mjs} +2 -2
- package/dist/{FormMessage.vue.es-CwMQpIAW.mjs → FormMessage.vue.es-CQ64C8dt.mjs} +1 -1
- package/dist/{IconButton.vue.es-D8DtBW9i.mjs → IconButton.vue.es-BXzwMvVk.mjs} +2 -2
- package/dist/{IconTitle.vue.es-6VJtjJX2.mjs → IconTitle.vue.es-GyanM-JQ.mjs} +3 -3
- package/dist/{Input.vue.es-BLyHcmu4.mjs → Input.vue.es-CxiwRZYs.mjs} +4 -4
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dl1vTzQD.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Ca0qflBR.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DYskT3r7.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-Dw73a5Yt.mjs} +7 -7
- package/dist/{InvoicePreview.vue.es-Cpf66_xV.mjs → InvoicePreview.vue.es-BvnikfEH.mjs} +6 -6
- package/dist/{InvoicePricingClauseChip.vue.es-CDrAE901.mjs → InvoicePricingClauseChip.vue.es-DxcyTRGr.mjs} +3 -3
- package/dist/{Label.vue.es-es7ZUBSP.mjs → Label.vue.es-3ACRco55.mjs} +3 -3
- package/dist/LoadFailedNotice.vue_vue_type_script_setup_true_lang-1qpRh-0S.mjs +20 -0
- package/dist/{Modal.vue.es-eeR9FmvQ.mjs → Modal.vue.es-CDjfZDDx.mjs} +138 -127
- package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-CnZwxJ5b.mjs +789 -0
- package/dist/{PaymentCompletedCard.vue_vue_type_script_setup_true_lang-CrjVPks0.mjs → PaymentCompletedCard.vue_vue_type_script_setup_true_lang-PICpXmC3.mjs} +2 -2
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DyjzaTK1.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DpZtYBfM.mjs} +4 -4
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BHQrWy6r.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Co5qBQa8.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-CN42ewCn.mjs → PaymentHistoryBlock-HUazLER6.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3Y5fHvA.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DdmUoiet.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-D3Ye7LZ5.mjs → PaymentIntegrationForm-ZnIjTyda.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DU5wu66t.mjs +161 -0
- package/dist/{PaymentIntegrationFormAdyen-Fm-diCCO.mjs → PaymentIntegrationFormAdyen-sbw3AoKS.mjs} +302 -282
- package/dist/{PaymentIntegrationFormStripe-BANBL6za.mjs → PaymentIntegrationFormStripe-4JmKEwbS.mjs} +126 -117
- package/dist/{PaymentMethod.vue.es-t3-VyoE8.mjs → PaymentMethod.vue.es-DAabE41t.mjs} +23 -21
- package/dist/{PaymentMethodForm-CqP3GoNj.mjs → PaymentMethodForm-MmCUSJLE.mjs} +1 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-DyiXLYRj.mjs +165 -0
- package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-D5wmRuCf.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Bv34aiZ6.mjs} +6 -6
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DhkkiJaQ.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DZ2Z-RMv.mjs} +28 -26
- package/dist/PaymentMethodsModal-CjpNw4kX.mjs +192 -0
- package/dist/PlanCustomizationEditor-BDWm_z2w.mjs +864 -0
- package/dist/{PortalLinkUnverified-Cp60_kRJ.mjs → PortalLinkUnverified-B7YYhv97.mjs} +3 -3
- package/dist/{PortalNotAvailable-DzSQnfzw.mjs → PortalNotAvailable-DIyeKrAp.mjs} +2 -2
- package/dist/{PricingGroupRangeInput.vue.es-Srq_3cga.mjs → PricingGroupRangeInput.vue.es-C6J8C7JS.mjs} +7 -7
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-oRijnVnZ.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CiQ-C9Hh.mjs} +16 -15
- package/dist/{RadioGroupExtended.vue.es-BbBMDf6l.mjs → RadioGroupExtended.vue.es-hDmUAKIA.mjs} +5 -5
- package/dist/{Section.vue.es-Oqn1wGPZ.mjs → Section.vue.es-CwKTCeZ1.mjs} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-OM19NPBh.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Gn1aE60E.mjs} +2 -2
- package/dist/ShippingAddressForm.vue_vue_type_script_setup_true_lang-y7yOKwR3.mjs +144 -0
- package/dist/ShippingAddressesModal-CNXxkxnJ.mjs +283 -0
- package/dist/{StepInput.vue.es-ieh4EuJ7.mjs → StepInput.vue.es-GkrOtOVa.mjs} +4 -4
- package/dist/SubscriptionCancellationModal-C_xFPx1I.mjs +4 -0
- package/dist/SubscriptionCancellationModal.vue_vue_type_script_setup_true_lang-DdTC33Qh.mjs +240 -0
- package/dist/SubscriptionCancellationSuccess.vue_vue_type_script_setup_true_lang-CQ-ZOzVI.mjs +64 -0
- package/dist/SubscriptionDetails.entry.ce-DuP8TtKu.mjs +764 -0
- package/dist/{SubscriptionSchedules-DMxX3GpK.mjs → SubscriptionSchedules-DosBeXD7.mjs} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DXro_64f.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-5tyDFxEh.mjs} +1948 -1965
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-C26HShPu.mjs +90 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CHlXP_2x.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BUDuQk2e.mjs} +133 -108
- package/dist/Toggle.vue.es-S2g8WGY_.mjs +99 -0
- package/dist/{TooltipParagraph.vue.es-BES3zsYN.mjs → TooltipParagraph.vue.es-4HaXi8RP.mjs} +18 -18
- package/dist/{TranslationOverride.vue_vue_type_script_setup_true_lang-BJmlNrXT.mjs → TranslationOverride.vue_vue_type_script_setup_true_lang-C5Y6Kg-_.mjs} +1 -1
- package/dist/TrialChip.vue.es-CUfJ4SK3.mjs +47 -0
- package/dist/addonQuantity-BvoYTajN.mjs +128 -0
- package/dist/adyen-D4em6EgU.mjs +99 -0
- package/dist/adyenSdk-DUTO7xkT.mjs +63 -0
- package/dist/{api.es-qgvzNMU-.mjs → api.es-QaC926Xu.mjs} +2 -2
- package/dist/components/BillingInformation/BillingInformation.mjs +37 -41
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +45 -462
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +33 -42
- package/dist/components/Invoice/Invoice.mjs +426 -426
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +38 -47
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +29 -34
- package/dist/components/InvoicesList/InvoicesList.mjs +33 -42
- package/dist/components/PaymentHistory/PaymentHistory.mjs +39 -48
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +56 -64
- package/dist/components/ShippingAddressForm/ShippingAddressForm.ce.d.ts +1 -0
- package/dist/components/ShippingAddressForm/ShippingAddressForm.mjs +212 -0
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +34 -42
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +41 -50
- package/dist/components/WalletBalances/WalletBalances.mjs +46 -55
- package/dist/core/events.types.d.ts +1 -0
- package/dist/core/index.mjs +51 -34
- package/dist/{customElements-DK4GKNJG.mjs → customElements-d7Bhfqi_.mjs} +773 -746
- package/dist/{customer-lf6S5DBR.mjs → customer-CNCSN_G5.mjs} +1 -1
- package/dist/{de-DE-UJ6X6jXu.mjs → de-DE-D-sV3avS.mjs} +8 -5
- package/dist/{de-DE-Cyj_NtiI.mjs → de-DE-wZp39RC-.mjs} +68 -5
- package/dist/{fr-FR-Cvvbkwlj.mjs → fr-FR-BYHycSxz.mjs} +3 -0
- package/dist/{fr-FR-CRFoWQ7J.mjs → fr-FR-BrNXJ7gR.mjs} +68 -5
- package/dist/{countryData.es-BegoD-cZ.mjs → getCountryNameByCode.es-OGxn_zT0.mjs} +7 -2
- package/dist/index.es-BEZ2mumY.mjs +633 -0
- package/dist/{index.es-BrVTOW5D.mjs → index.es-C7J3WGGo.mjs} +4 -4
- package/dist/index.mjs +37 -33
- package/dist/invoices-CXvL8KQx.mjs +143 -0
- package/dist/{it-IT-DObZEc-U.mjs → it-IT-Bd1qsMVU.mjs} +68 -5
- package/dist/{it-IT-DnJP5URH.mjs → it-IT-zpPyT9PH.mjs} +8 -5
- package/dist/{nl-NL-q9xfTZF0.mjs → nl-NL-BOr4MR7L.mjs} +8 -5
- package/dist/{nl-NL-C02xHilF.mjs → nl-NL-C6Y6fqaW.mjs} +68 -5
- package/dist/paymentIntegrationFormLoaders-wi1vMgf_.mjs +31 -0
- package/dist/{paymentMethods-8w-ccfY_.mjs → paymentMethods-CG1fcG2v.mjs} +22 -21
- package/dist/{paymentOutcome-B6sW1eCV.mjs → paymentOutcome-D59QkGfm.mjs} +1 -1
- package/dist/paymentRedirect-DaS8Kccc.mjs +66 -0
- package/dist/payments-Dy81gmkC.mjs +71 -0
- package/dist/preloadPaymentIntegrationForms-C_9p7Jbi.mjs +9 -0
- package/dist/pricing-CBJT8C6L.mjs +42 -0
- package/dist/{pricingItem.es-bCPArbTa.mjs → pricingItem.es-AYq_hYeD.mjs} +1 -1
- package/dist/pricingPlanScheduleOverrides-GON_34ep.mjs +291 -0
- package/dist/randomUuid-BE_IQ-aq.mjs +10 -0
- package/dist/screens/Checkout/Checkout.mjs +1098 -3
- package/dist/screens/CheckoutSession/CheckoutSession.ce.d.ts +1 -0
- package/dist/screens/CheckoutSession/CheckoutSession.mjs +1316 -0
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +209 -133
- package/dist/screens/PayInvoice/PayInvoice.mjs +282 -274
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +92 -97
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +915 -404
- package/dist/{sorting.es-C0pdMgX0.mjs → sorting.es-kM0f1VX0.mjs} +1 -1
- package/dist/{subscription-BwzkagDI.mjs → subscription-DQ5mRp_e.mjs} +10 -10
- package/dist/subscriptions-Bm1eu9wc.mjs +99 -0
- package/dist/taxId.es-Zu2Ff1gL.mjs +510 -0
- package/dist/timePeriod.es-R9U0wLlB.mjs +13 -0
- package/dist/types/components/customer/BillingInformationForm/BillingInformationForm.types.d.ts +11 -14
- package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +2 -9
- package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +10 -0
- package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +6 -0
- package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +17 -0
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -2
- package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +3 -2
- package/dist/types/components/payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts +2 -0
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +12 -1
- package/dist/types/components/payments/PaymentMethodsList/PaymentMethodsList.types.d.ts +2 -0
- package/dist/types/components/payments/PaymentMethodsModal/PaymentMethodsModal.types.d.ts +22 -0
- package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.types.d.ts +1 -1
- package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +7 -1
- package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +2 -2
- package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +3 -11
- package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +1 -5
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +11 -0
- package/dist/types/components/providers/HostElementProvider/composables/useHostEvent.d.ts +12 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +5 -4
- package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +3 -3
- package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +3 -3
- package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +6 -1
- package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +1 -0
- package/dist/types/components/providers/Provider/Provider.types.d.ts +10 -3
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +3 -14
- package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +1 -1
- package/dist/types/components/subscriptions/OrderSummary.types.d.ts +14 -0
- package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +14 -1
- package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +9 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditor.types.d.ts +4 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditorItem.types.d.ts +2 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditor.types.d.ts +4 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditorItem.types.d.ts +2 -0
- package/dist/types/components/subscriptions/SubscriptionCancellationSuccess/SubscriptionCancellationSuccess.types.d.ts +4 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +10 -9
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSuccess.types.d.ts +5 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSummary.types.d.ts +3 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionPlanChangeSummary.types.d.ts +4 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionPlanSelector.types.d.ts +7 -0
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +1 -0
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +1 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +5 -0
- package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.types.d.ts +1 -2
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +6 -2
- package/dist/types/public/components/Invoice/Invoice.types.d.ts +7 -7
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +2 -2
- package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +6 -7
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.types.d.ts +1 -1
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.types.d.ts +19 -14
- package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.entry.ce.d.ts +1 -0
- package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.entry.types.d.ts +6 -0
- package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.types.d.ts +5 -0
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +10 -1
- package/dist/types/public/core/action-request.types.d.ts +18 -24
- package/dist/types/public/core/events.types.d.ts +99 -0
- package/dist/types/public/core/index.d.ts +3 -1
- package/dist/types/public/core/types.d.ts +11 -2
- package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +1 -7
- package/dist/types/public/screens/Checkout/Checkout.source.types.d.ts +151 -0
- package/dist/types/public/screens/Checkout/Checkout.types.d.ts +7 -30
- package/dist/types/public/screens/CheckoutSession/CheckoutSession.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/CheckoutSession/CheckoutSession.entry.types.d.ts +3 -0
- package/dist/types/public/screens/CustomerOverview/CustomerOverview.types.d.ts +8 -2
- package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +0 -6
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +2 -19
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +2 -3
- package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.types.d.ts +2 -1
- package/dist/types/services/paymentMethods.types.d.ts +12 -1
- package/dist/types/types/EntryBaseProps.d.ts +10 -6
- package/dist/types/types/branding.d.ts +15 -0
- package/dist/types/types/checkoutSession.d.ts +189 -0
- package/dist/types/types/errors.d.ts +2 -0
- package/dist/types/types/pricingPlanGroup.d.ts +25 -0
- package/dist/{useActionDispatchProvider-ChAHdwR8.mjs → useActionDispatchProvider-BWna0S6N.mjs} +1 -1
- package/dist/useAddressFormats-Dw7IEdxg.mjs +1997 -0
- package/dist/useCheckoutForm-BaV2j_ob.mjs +3310 -0
- package/dist/{useCustomer-CTMhg1nd.mjs → useCustomer-RUtEzDOY.mjs} +2 -2
- package/dist/useDefaultPaymentMethod-Dliq6_Yw.mjs +39 -0
- package/dist/useExperimentalFeature-DAKAF_a2.mjs +6 -0
- package/dist/useHostEvent-pjoWJ7ZH.mjs +12 -0
- package/dist/{useIncrementalLoading-CBVutPH8.mjs → useIncrementalLoading-B3gp58X-.mjs} +2 -2
- package/dist/{useInvoiceData-qUGbBAQK.mjs → useInvoiceData-Dya4mmvf.mjs} +2 -2
- package/dist/{useInvoicesList-wJvZAJpW.mjs → useInvoicesList-Dp3c_cb3.mjs} +9 -9
- package/dist/{useLoadInitialData-UvfYXgbi.mjs → useLoadInitialData-CwySdYZM.mjs} +1 -1
- package/dist/usePaymentFormHold-CYZ4BdOw.mjs +19 -0
- package/dist/{usePaymentMethodAvailability-35l4pWdH.mjs → usePaymentMethodAvailability-B7NV0ZtX.mjs} +4 -4
- package/dist/usePaymentMethodOptions-DDRjVvDJ.mjs +67 -0
- package/dist/{usePaymentMethods-De7hlLHo.mjs → usePaymentMethods-DBGyQA_I.mjs} +2 -2
- package/dist/{usePayments-hWS7fnOx.mjs → usePayments-ChGtK_As.mjs} +9 -9
- package/dist/usePortal--Uzbpbgr.mjs +14 -0
- package/dist/{useService-BwzIBIRp.mjs → useService-DayNZhPh.mjs} +1 -1
- package/dist/useShippingAddresses-TXVeGFPm.mjs +122 -0
- package/dist/useSubscription-lIGMFLG1.mjs +35 -0
- package/dist/useSubscriptionActions-BSlJVB4p.mjs +44 -0
- package/dist/useWatchDebounced-DkXgKe0E.mjs +20 -0
- package/package.json +12 -5
- package/dist/AuthProvider.handle-SRR_04XS.mjs +0 -50
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-nqKbgY7G.mjs +0 -58
- package/dist/Checkout.entry.ce-CopWuLJC.mjs +0 -4169
- package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-CEnM1uxK.mjs +0 -828
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Jyb5ZN3s.mjs +0 -136
- package/dist/CustomerShippingAddresses-BRPukhRI.mjs +0 -397
- package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-B_FpibLA.mjs +0 -441
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D07SEP8a.mjs +0 -181
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-CMRMbL3d.mjs +0 -161
- package/dist/PlanCustomizationEditor-B76UNEMm.mjs +0 -791
- package/dist/ShippingAddressesModal-c7nqf4Ny.mjs +0 -418
- package/dist/SubscriptionDetails.entry.ce-uYv45FGH.mjs +0 -1044
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-BZNsqN4G.mjs +0 -203
- package/dist/TrialChip.vue.es-C51z1ZiA.mjs +0 -35
- package/dist/addonQuantity-CCVaA3e-.mjs +0 -758
- package/dist/adyenSdk-B01MB9Ia.mjs +0 -58
- package/dist/getCountryNameByCode.es-BDHua7VM.mjs +0 -8
- package/dist/invoices-DdREPDXV.mjs +0 -123
- package/dist/paymentMethods-Goa25rTs.mjs +0 -61
- package/dist/payments-CKpU1K3t.mjs +0 -68
- package/dist/pricing-CEaZGgKe.mjs +0 -29
- package/dist/pricingPlanScheduleOverrides-BBp-DmpV.mjs +0 -233
- package/dist/pricingPlanSchedules-DSMptcAh.mjs +0 -38
- package/dist/subscriptions-B5bH8hsI.mjs +0 -66
- package/dist/taxId.es-e6NEvprh.mjs +0 -243
- package/dist/types/components/payments/ExpressPaymentMethodButton/ExpressPaymentMethodButton.types.d.ts +0 -3
- package/dist/useCustomerFormLabels-D4oDnfxA.mjs +0 -1173
- package/dist/usePaymentFormHold-Cwdr-vyc.mjs +0 -181
- package/dist/usePortal-DUfD6hrA.mjs +0 -7
- package/dist/useTimePeriod.es-BUorDLVK.mjs +0 -93
|
@@ -1,513 +1,995 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { u as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { e as
|
|
6
|
-
import { C as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { c as Ge } from "../../
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { _ as
|
|
18
|
-
import { _ as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { _ as
|
|
21
|
-
import { _ as
|
|
22
|
-
import { _ as
|
|
23
|
-
import { _ as
|
|
24
|
-
import { _ as
|
|
25
|
-
import {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import { ref as _, defineComponent as j, useModel as ne, computed as p, openBlock as s, createElementBlock as V, createVNode as S, unref as t, createSlots as yn, withCtx as v, createBlock as g, createTextVNode as E, toDisplayString as M, createCommentVNode as P, createElementVNode as A, mergeModels as me, toRef as Pn, withModifiers as wn, Fragment as ge, renderSlot as In, defineAsyncComponent as Oe, watch as z, mergeProps as Mn } from "vue";
|
|
2
|
+
import { u as Sn, g as En } from "../../useSubscription-lIGMFLG1.mjs";
|
|
3
|
+
import { a as Cn, _ as ee } from "../../Button.vue.es-BHbanjR0.mjs";
|
|
4
|
+
import { _ as ve } from "../../ErrorNotification.vue.es-CWIVt5q9.mjs";
|
|
5
|
+
import { e as ae, p as he, f as kn, a as q, d as F, j as An, k as $n, l as xn } from "../../customElements-d7Bhfqi_.mjs";
|
|
6
|
+
import { C as On } from "../../ContentWithAsideLayout-C2kFcft1.mjs";
|
|
7
|
+
import { u as Nn } from "../../useActionDispatchProvider-BWna0S6N.mjs";
|
|
8
|
+
import { u as Ln } from "../../usePortal--Uzbpbgr.mjs";
|
|
9
|
+
import { u as Tn } from "../../useSubscriptionActions-BSlJVB4p.mjs";
|
|
10
|
+
import { u as Dn } from "../../useCustomer-RUtEzDOY.mjs";
|
|
11
|
+
import { u as Gn } from "../../usePaymentMethods-DBGyQA_I.mjs";
|
|
12
|
+
import { u as Un, a as Bn, i as Rn } from "../../usePaymentMethodOptions-DDRjVvDJ.mjs";
|
|
13
|
+
import { u as zn } from "../../useLoadInitialData-CwySdYZM.mjs";
|
|
14
|
+
import { c as Ge } from "../../invoices-CXvL8KQx.mjs";
|
|
15
|
+
import { k as Vn, d as Fn, l as jn } from "../../subscription-DQ5mRp_e.mjs";
|
|
16
|
+
import { c as Ue } from "../../subscriptions-Bm1eu9wc.mjs";
|
|
17
|
+
import { c as Wn, _ as Yn } from "../../SubscriptionCancellationSuccess.vue_vue_type_script_setup_true_lang-CQ-ZOzVI.mjs";
|
|
18
|
+
import { _ as qn } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Gn1aE60E.mjs";
|
|
19
|
+
import { _ as Ne } from "../../Divider.vue.es-DnP_HqLz.mjs";
|
|
20
|
+
import { _ as Be } from "../../Avatar.vue.es-DrbtUiLO.mjs";
|
|
21
|
+
import { _ as Hn } from "../../Chip.vue.es-Dc6-PjEn.mjs";
|
|
22
|
+
import { _ as Kn } from "../../RadioGroupExtended.vue.es-hDmUAKIA.mjs";
|
|
23
|
+
import { _ as Xn } from "../../PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CiQ-C9Hh.mjs";
|
|
24
|
+
import { _ as Zn } from "../../PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Bv34aiZ6.mjs";
|
|
25
|
+
import { u as Jn } from "../../useDefaultPaymentMethod-Dliq6_Yw.mjs";
|
|
26
|
+
import { _ as Qn } from "../../InvoicePreview.vue.es-BvnikfEH.mjs";
|
|
27
|
+
import { _ as te } from "../../Section.vue.es-CwKTCeZ1.mjs";
|
|
28
|
+
import { _ as Re } from "../../Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs";
|
|
29
|
+
import { _ as et } from "../../TranslationOverride.vue_vue_type_script_setup_true_lang-C5Y6Kg-_.mjs";
|
|
30
|
+
import { _ as nt } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Co5qBQa8.mjs";
|
|
31
|
+
import { _ as Le } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DCUml1W4.mjs";
|
|
32
|
+
import { w as tt, h as at } from "../../pricingPlanScheduleOverrides-GON_34ep.mjs";
|
|
33
|
+
import { i as it } from "../../paymentOutcome-D59QkGfm.mjs";
|
|
34
|
+
function st() {
|
|
35
|
+
const { getInvoicePreview: n } = Ge(), o = ae(), i = _(), m = _(!1), u = _(), f = he();
|
|
36
|
+
return { invoice: i, isPending: m, error: u, load: async ({
|
|
37
|
+
subscription: C,
|
|
38
|
+
scheduleInfo: w,
|
|
39
|
+
enabledPricingIds: b
|
|
32
40
|
}) => {
|
|
33
|
-
const
|
|
34
|
-
enabledPricings:
|
|
35
|
-
pricingPlanScheduleInfos:
|
|
41
|
+
const r = Vn({
|
|
42
|
+
enabledPricings: b.map((y) => ({ pricing_id: y })),
|
|
43
|
+
pricingPlanScheduleInfos: w ? [w] : []
|
|
36
44
|
});
|
|
37
|
-
if (!
|
|
38
|
-
|
|
45
|
+
if (!r) {
|
|
46
|
+
f(), i.value = void 0, u.value = void 0, m.value = !1;
|
|
39
47
|
return;
|
|
40
48
|
}
|
|
41
|
-
const
|
|
42
|
-
|
|
49
|
+
const c = f();
|
|
50
|
+
m.value = !0, u.value = void 0;
|
|
43
51
|
try {
|
|
44
|
-
const
|
|
52
|
+
const y = await n({
|
|
45
53
|
// The subscription is running already, so it is priced as itself rather than as the
|
|
46
54
|
// template for a new one — and the customer it is invoiced to is known.
|
|
47
55
|
forExistingSubscription: !0,
|
|
48
|
-
pricingPlanSubscriptionId:
|
|
49
|
-
customizations:
|
|
56
|
+
pricingPlanSubscriptionId: C.id,
|
|
57
|
+
customizations: r
|
|
50
58
|
});
|
|
51
|
-
if (!
|
|
52
|
-
|
|
53
|
-
} catch (
|
|
54
|
-
if (!
|
|
55
|
-
|
|
59
|
+
if (!c()) return;
|
|
60
|
+
i.value = y.invoice;
|
|
61
|
+
} catch (y) {
|
|
62
|
+
if (!c()) return;
|
|
63
|
+
o.error(
|
|
56
64
|
"INVOICE_PREVIEW_FAILED",
|
|
57
65
|
"Failed to load the invoice preview",
|
|
58
66
|
{ preview: "SUBSCRIPTION_UPGRADE" },
|
|
59
|
-
|
|
60
|
-
),
|
|
67
|
+
y
|
|
68
|
+
), u.value = y, i.value = void 0;
|
|
61
69
|
} finally {
|
|
62
|
-
|
|
70
|
+
c() && (m.value = !1);
|
|
63
71
|
}
|
|
64
72
|
} };
|
|
65
73
|
}
|
|
66
|
-
|
|
74
|
+
function ot() {
|
|
75
|
+
const { getChangePlanInvoicePreview: n } = Ge(), o = ae(), i = _(), m = _(!1), u = _(), f = he();
|
|
76
|
+
return { invoice: i, isPending: m, error: u, load: async ({
|
|
77
|
+
subscriptionId: w,
|
|
78
|
+
pricingPlanId: b
|
|
79
|
+
}) => {
|
|
80
|
+
const r = f();
|
|
81
|
+
i.value = void 0, m.value = !0, u.value = void 0;
|
|
82
|
+
try {
|
|
83
|
+
const c = await n({
|
|
84
|
+
id: w,
|
|
85
|
+
pricingPlanId: b
|
|
86
|
+
});
|
|
87
|
+
if (!r()) return;
|
|
88
|
+
i.value = c;
|
|
89
|
+
} catch (c) {
|
|
90
|
+
if (!r()) return;
|
|
91
|
+
o.error(
|
|
92
|
+
"INVOICE_PREVIEW_FAILED",
|
|
93
|
+
"Failed to load the invoice preview",
|
|
94
|
+
{ preview: "PLAN_CHANGE" },
|
|
95
|
+
c
|
|
96
|
+
), u.value = c;
|
|
97
|
+
} finally {
|
|
98
|
+
r() && (m.value = !1);
|
|
99
|
+
}
|
|
100
|
+
}, reset: () => {
|
|
101
|
+
f(), i.value = void 0, u.value = void 0, m.value = !1;
|
|
102
|
+
} };
|
|
103
|
+
}
|
|
104
|
+
const rt = (n, o) => n.order - o.order, ct = (n) => kn(n) && n.statusCode === 404, lt = (n) => !!n && n !== "NOT_ALLOWED", ut = (n, o, i, m) => {
|
|
105
|
+
const u = {
|
|
106
|
+
pricingPlanId: o.id,
|
|
107
|
+
name: o.name,
|
|
108
|
+
...o.description && { description: o.description }
|
|
109
|
+
};
|
|
110
|
+
if (n.pricing_plan_id === i.pricing_plan_id)
|
|
111
|
+
return { ...u, isCurrent: !0 };
|
|
112
|
+
if (n.order === i.order) return;
|
|
113
|
+
const f = n.order > i.order ? "UPGRADE" : "DOWNGRADE", d = f === "UPGRADE" ? m.upgrade_type : m.downgrade_type;
|
|
114
|
+
if (lt(d))
|
|
115
|
+
return { ...u, isCurrent: !1, direction: f, changeType: d };
|
|
116
|
+
};
|
|
117
|
+
function dt() {
|
|
118
|
+
const { getSubscriptionPricingPlanGroup: n } = Ue(), o = ae(), i = _([]), m = _(), u = _(!1), f = _(), d = he();
|
|
119
|
+
return { options: i, currentPricingPlanId: m, isPending: u, error: f, load: async ({
|
|
120
|
+
subscriptionId: w,
|
|
121
|
+
scheduleInfo: b
|
|
122
|
+
}) => {
|
|
123
|
+
var h;
|
|
124
|
+
const r = b == null ? void 0 : b.pricing_plan_version, c = (r == null ? void 0 : r.pricing_plan_id) ?? ((h = r == null ? void 0 : r.pricing_plan) == null ? void 0 : h.id), y = d();
|
|
125
|
+
if (m.value = c, f.value = void 0, !c) {
|
|
126
|
+
i.value = [], u.value = !1;
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
u.value = !0;
|
|
130
|
+
try {
|
|
131
|
+
const $ = await n({ id: w });
|
|
132
|
+
if (!y()) return;
|
|
133
|
+
const Z = [...$.pricing_plans ?? []].sort(rt), T = Z.find(
|
|
134
|
+
({ pricing_plan_id: O }) => O === c
|
|
135
|
+
);
|
|
136
|
+
if ($.status !== "ACTIVE" || !T) {
|
|
137
|
+
i.value = [];
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
i.value = Z.flatMap((O) => {
|
|
141
|
+
const J = O.pricing_plan ?? (O === T ? r == null ? void 0 : r.pricing_plan : void 0), Q = J && ut(O, J, T, $);
|
|
142
|
+
return Q ? [Q] : [];
|
|
143
|
+
});
|
|
144
|
+
} catch ($) {
|
|
145
|
+
if (!y() || (i.value = [], ct($))) return;
|
|
146
|
+
o.error(
|
|
147
|
+
"PRICING_PLAN_GROUP_LOAD_FAILED",
|
|
148
|
+
"Failed to load the pricing plan group of the subscription",
|
|
149
|
+
{},
|
|
150
|
+
$
|
|
151
|
+
), f.value = $;
|
|
152
|
+
} finally {
|
|
153
|
+
y() && (u.value = !1);
|
|
154
|
+
}
|
|
155
|
+
} };
|
|
156
|
+
}
|
|
157
|
+
const pt = { class: "sv-subscription-plan-selector" }, mt = { class: "flex flex-wrap items-center gap-2" }, gt = /* @__PURE__ */ j({
|
|
158
|
+
__name: "SubscriptionPlanSelector",
|
|
159
|
+
props: /* @__PURE__ */ me({
|
|
160
|
+
options: { type: Array },
|
|
161
|
+
disabled: { type: Boolean },
|
|
162
|
+
avatar: { type: String }
|
|
163
|
+
}, {
|
|
164
|
+
pricingPlanId: {},
|
|
165
|
+
pricingPlanIdModifiers: {}
|
|
166
|
+
}),
|
|
167
|
+
emits: ["update:pricingPlanId"],
|
|
168
|
+
setup(n) {
|
|
169
|
+
const o = n, i = ne(n, "pricingPlanId"), { $t: m } = q(), u = p(
|
|
170
|
+
() => m({
|
|
171
|
+
defaultMessage: "Current plan",
|
|
172
|
+
id: "subscription_management.plan_selector.current_plan",
|
|
173
|
+
description: "Marks the plan a subscription already runs on"
|
|
174
|
+
})
|
|
175
|
+
), f = p(
|
|
176
|
+
() => o.options.map(({ pricingPlanId: b, name: r, description: c, isCurrent: y }) => ({
|
|
177
|
+
label: y ? `${r} (${u.value})` : r,
|
|
178
|
+
value: b,
|
|
179
|
+
...c && { description: c }
|
|
180
|
+
}))
|
|
181
|
+
), d = p(
|
|
182
|
+
() => new Map(o.options.map((b) => [b.pricingPlanId, b]))
|
|
183
|
+
), C = (b) => typeof b == "string" ? d.value.get(b) : void 0, w = p({
|
|
184
|
+
get: () => i.value,
|
|
185
|
+
set: (b) => {
|
|
186
|
+
i.value = typeof b == "string" ? b : void 0;
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
return (b, r) => (s(), V("div", pt, [
|
|
190
|
+
S(t(Kn), {
|
|
191
|
+
modelValue: w.value,
|
|
192
|
+
"onUpdate:modelValue": r[0] || (r[0] = (c) => w.value = c),
|
|
193
|
+
label: t(m)({
|
|
194
|
+
defaultMessage: "Pick your plan",
|
|
195
|
+
id: "subscription_management.plan_selector.title",
|
|
196
|
+
description: "Heading above the plans a subscription can be moved between"
|
|
197
|
+
}),
|
|
198
|
+
options: f.value,
|
|
199
|
+
direction: "column",
|
|
200
|
+
disabled: n.disabled,
|
|
201
|
+
"show-radio": !1
|
|
202
|
+
}, yn({
|
|
203
|
+
label: v(({ optionValue: c }) => {
|
|
204
|
+
var y;
|
|
205
|
+
return [
|
|
206
|
+
A("span", mt, [
|
|
207
|
+
S(t(F), {
|
|
208
|
+
tag: "span",
|
|
209
|
+
variant: "body",
|
|
210
|
+
weight: "semibold",
|
|
211
|
+
"no-spacing": ""
|
|
212
|
+
}, {
|
|
213
|
+
default: v(() => {
|
|
214
|
+
var h;
|
|
215
|
+
return [
|
|
216
|
+
E(M((h = C(c)) == null ? void 0 : h.name), 1)
|
|
217
|
+
];
|
|
218
|
+
}),
|
|
219
|
+
_: 2
|
|
220
|
+
}, 1024),
|
|
221
|
+
(y = C(c)) != null && y.isCurrent ? (s(), g(t(Hn), {
|
|
222
|
+
key: 0,
|
|
223
|
+
class: "sv-subscription-plan-selector__current",
|
|
224
|
+
intent: "brand",
|
|
225
|
+
size: "xs",
|
|
226
|
+
content: u.value
|
|
227
|
+
}, null, 8, ["content"])) : P("", !0)
|
|
228
|
+
])
|
|
229
|
+
];
|
|
230
|
+
}),
|
|
231
|
+
description: v(({ option: c }) => [
|
|
232
|
+
c.description ? (s(), g(t(F), {
|
|
233
|
+
key: 0,
|
|
234
|
+
tag: "span",
|
|
235
|
+
variant: "body-sm",
|
|
236
|
+
color: "secondary",
|
|
237
|
+
"no-spacing": ""
|
|
238
|
+
}, {
|
|
239
|
+
default: v(() => [
|
|
240
|
+
E(M(c.description), 1)
|
|
241
|
+
]),
|
|
242
|
+
_: 2
|
|
243
|
+
}, 1024)) : P("", !0)
|
|
244
|
+
]),
|
|
245
|
+
_: 2
|
|
246
|
+
}, [
|
|
247
|
+
n.avatar ? {
|
|
248
|
+
name: "prefix",
|
|
249
|
+
fn: v(() => [
|
|
250
|
+
S(t(Be), {
|
|
251
|
+
"image-src": n.avatar,
|
|
252
|
+
size: "md",
|
|
253
|
+
class: "shrink-0 self-center"
|
|
254
|
+
}, null, 8, ["image-src"])
|
|
255
|
+
]),
|
|
256
|
+
key: "0"
|
|
257
|
+
} : void 0
|
|
258
|
+
]), 1032, ["modelValue", "label", "options", "disabled"])
|
|
259
|
+
]));
|
|
260
|
+
}
|
|
261
|
+
}), vt = ["id"], ht = { class: "sv-subscription-management-form__body grid grid-cols-1 gap-4" }, ft = { key: 2 }, bt = /* @__PURE__ */ j({
|
|
67
262
|
__name: "SubscriptionManagementForm",
|
|
68
|
-
props: /* @__PURE__ */
|
|
263
|
+
props: /* @__PURE__ */ me({
|
|
69
264
|
id: { type: String },
|
|
70
265
|
pricingGroup: { type: Object },
|
|
266
|
+
planOptions: { type: Array },
|
|
71
267
|
paymentMethods: { type: Array },
|
|
72
268
|
hasExpiredPaymentMethod: { type: Boolean },
|
|
73
269
|
billingPeriod: { type: Object },
|
|
74
270
|
currency: { type: String },
|
|
75
|
-
disabled: { type: Boolean }
|
|
271
|
+
disabled: { type: Boolean },
|
|
272
|
+
avatar: { type: String },
|
|
273
|
+
canAddPaymentMethod: { type: Boolean, default: !0 }
|
|
76
274
|
}, {
|
|
77
275
|
enabledPricingIds: { required: !0 },
|
|
78
276
|
enabledPricingIdsModifiers: {},
|
|
79
277
|
paymentMethodId: {},
|
|
80
|
-
paymentMethodIdModifiers: {}
|
|
278
|
+
paymentMethodIdModifiers: {},
|
|
279
|
+
pricingPlanId: {},
|
|
280
|
+
pricingPlanIdModifiers: {}
|
|
81
281
|
}),
|
|
82
|
-
emits: /* @__PURE__ */
|
|
83
|
-
setup(
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return q(
|
|
91
|
-
() => u.paymentMethods,
|
|
92
|
-
(r, i) => {
|
|
93
|
-
var b;
|
|
94
|
-
const v = r == null ? void 0 : r.find(
|
|
95
|
-
({ id: S }) => !(i != null && i.some((z) => z.id === S))
|
|
96
|
-
);
|
|
97
|
-
if (v && (i != null && i.length)) {
|
|
98
|
-
o.value = v.id;
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
r != null && r.some(({ id: S }) => S === o.value) || (o.value = (b = (r == null ? void 0 : r.find(({ is_default: S }) => S)) ?? I.value[0]) == null ? void 0 : b.id);
|
|
102
|
-
},
|
|
103
|
-
{ immediate: !0 }
|
|
104
|
-
), (r, i) => (s(), x("form", {
|
|
105
|
-
id: a.id,
|
|
282
|
+
emits: /* @__PURE__ */ me(["submit", "add-payment-method"], ["update:enabledPricingIds", "update:paymentMethodId", "update:pricingPlanId"]),
|
|
283
|
+
setup(n, { emit: o }) {
|
|
284
|
+
const i = n, m = o, u = ne(n, "enabledPricingIds"), f = ne(n, "paymentMethodId"), d = ne(n, "pricingPlanId"), { $t: C } = q(), { sortedPaymentMethods: w } = Jn({
|
|
285
|
+
paymentMethods: Pn(i, "paymentMethods"),
|
|
286
|
+
selectedPaymentMethodId: f
|
|
287
|
+
});
|
|
288
|
+
return (b, r) => (s(), V("form", {
|
|
289
|
+
id: n.id,
|
|
106
290
|
class: "sv-subscription-management-form",
|
|
107
|
-
onSubmit:
|
|
291
|
+
onSubmit: r[4] || (r[4] = wn((c) => m("submit"), ["prevent"]))
|
|
108
292
|
}, [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
293
|
+
A("div", ht, [
|
|
294
|
+
n.planOptions && n.planOptions.length > 1 ? (s(), V(ge, { key: 0 }, [
|
|
295
|
+
S(gt, {
|
|
296
|
+
"pricing-plan-id": d.value,
|
|
297
|
+
"onUpdate:pricingPlanId": r[0] || (r[0] = (c) => d.value = c),
|
|
298
|
+
class: "sv-subscription-management-form__plan",
|
|
299
|
+
options: n.planOptions,
|
|
300
|
+
disabled: n.disabled,
|
|
301
|
+
avatar: n.avatar
|
|
302
|
+
}, null, 8, ["pricing-plan-id", "options", "disabled", "avatar"]),
|
|
303
|
+
A("div", null, [
|
|
304
|
+
S(t(Ne), { spacing: "xs" })
|
|
305
|
+
])
|
|
306
|
+
], 64)) : P("", !0),
|
|
307
|
+
n.pricingGroup ? (s(), g(Xn, {
|
|
308
|
+
key: 1,
|
|
309
|
+
modelValue: u.value,
|
|
310
|
+
"onUpdate:modelValue": r[1] || (r[1] = (c) => u.value = c),
|
|
113
311
|
class: "sv-subscription-management-form__pricing-group",
|
|
114
|
-
"group-name":
|
|
115
|
-
pricings:
|
|
116
|
-
"billing-period":
|
|
117
|
-
currency:
|
|
118
|
-
}, null, 8, ["modelValue", "group-name", "pricings", "billing-period", "currency"]),
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
]),
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
modelValue:
|
|
125
|
-
"onUpdate:modelValue": i[1] || (i[1] = (v) => o.value = v),
|
|
312
|
+
"group-name": n.pricingGroup.name,
|
|
313
|
+
pricings: n.pricingGroup.pricings,
|
|
314
|
+
"billing-period": n.billingPeriod,
|
|
315
|
+
currency: n.currency
|
|
316
|
+
}, null, 8, ["modelValue", "group-name", "pricings", "billing-period", "currency"])) : P("", !0),
|
|
317
|
+
n.pricingGroup ? (s(), V("div", ft, [
|
|
318
|
+
S(t(Ne), { spacing: "xs" })
|
|
319
|
+
])) : P("", !0),
|
|
320
|
+
S(Zn, {
|
|
321
|
+
modelValue: f.value,
|
|
322
|
+
"onUpdate:modelValue": r[2] || (r[2] = (c) => f.value = c),
|
|
126
323
|
class: "sv-subscription-management-form__payment-methods",
|
|
127
|
-
"payment-methods":
|
|
128
|
-
"show-add-option": !1,
|
|
324
|
+
"payment-methods": t(w),
|
|
129
325
|
required: "",
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
326
|
+
"show-add-option": n.canAddPaymentMethod,
|
|
327
|
+
disabled: n.disabled,
|
|
328
|
+
label: t(C)({
|
|
329
|
+
defaultMessage: "Saved payment methods",
|
|
330
|
+
id: "subscription_management.payment_method_selector.saved_label",
|
|
134
331
|
description: "Label above the payment method that pays for the subscription change"
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
332
|
+
}),
|
|
333
|
+
onAddPaymentMethod: r[3] || (r[3] = (c) => m("add-payment-method"))
|
|
334
|
+
}, null, 8, ["modelValue", "payment-methods", "show-add-option", "disabled", "label"]),
|
|
335
|
+
n.hasExpiredPaymentMethod ? (s(), g(t(F), {
|
|
336
|
+
key: 3,
|
|
337
|
+
id: n.id && `${n.id}__expired-payment-method`,
|
|
139
338
|
variant: "body-sm",
|
|
140
339
|
color: "subtle",
|
|
141
340
|
tag: "p",
|
|
142
|
-
class: "sv-subscription-management-
|
|
341
|
+
class: "sv-subscription-management-form__expired-payment-method"
|
|
143
342
|
}, {
|
|
144
|
-
default:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
})), 1)
|
|
151
|
-
], 64)) : (s(), x(H, { key: 1 }, [
|
|
152
|
-
w(_(t(P)({
|
|
153
|
-
defaultMessage: "This subscription has no payment method to charge the change to. Please contact support to change it.",
|
|
154
|
-
id: "subscription_management.no_payment_method",
|
|
155
|
-
description: "Shown in place of the payment method on the manage subscription screen when the subscription has no usable payment method"
|
|
156
|
-
})), 1)
|
|
157
|
-
], 64))
|
|
343
|
+
default: v(() => [
|
|
344
|
+
E(M(t(C)({
|
|
345
|
+
defaultMessage: "The card this subscription is paid with has expired. Pick another payment method or add a new one.",
|
|
346
|
+
id: "subscription_management.expired_payment_method_replace",
|
|
347
|
+
description: "Shown under the payment method choice on the manage subscription screen when the card the subscription is paid with has expired"
|
|
348
|
+
})), 1)
|
|
158
349
|
]),
|
|
159
350
|
_: 1
|
|
160
|
-
}, 8, ["id"]))
|
|
351
|
+
}, 8, ["id"])) : P("", !0)
|
|
161
352
|
])
|
|
162
|
-
], 40,
|
|
353
|
+
], 40, vt));
|
|
163
354
|
}
|
|
164
|
-
}),
|
|
355
|
+
}), _t = { class: "sv-subscription-management-summary__body grid grid-cols-1 gap-1" }, yt = { class: "flex flex-row items-center gap-3 px-3 py-2" }, Pt = ["title"], wt = /* @__PURE__ */ j({
|
|
165
356
|
__name: "SubscriptionManagementSummary",
|
|
166
357
|
props: {
|
|
167
358
|
invoice: { type: Object },
|
|
168
359
|
isPending: { type: Boolean },
|
|
169
|
-
hasError: { type: Boolean }
|
|
360
|
+
hasError: { type: Boolean },
|
|
361
|
+
planName: { type: String },
|
|
362
|
+
avatar: { type: String }
|
|
170
363
|
},
|
|
171
|
-
setup(
|
|
172
|
-
const { $t:
|
|
173
|
-
"invoice_preview.total_due_today_heading":
|
|
364
|
+
setup(n) {
|
|
365
|
+
const { $t: o } = q(), i = p(() => ({
|
|
366
|
+
"invoice_preview.total_due_today_heading": o({
|
|
174
367
|
defaultMessage: "Total due",
|
|
175
368
|
id: "subscription_management.summary.total_due_heading",
|
|
176
369
|
description: 'Heading above the total of the invoice previewing a subscription change, replacing the shared preview’s "Total due today"'
|
|
177
370
|
})
|
|
178
371
|
}));
|
|
179
|
-
return (
|
|
372
|
+
return (m, u) => (s(), g(t(te), {
|
|
180
373
|
class: "sv-subscription-management-summary",
|
|
181
|
-
|
|
374
|
+
"no-border": "",
|
|
375
|
+
"no-spacing": "",
|
|
376
|
+
"content-background": "none",
|
|
377
|
+
title: t(o)({
|
|
182
378
|
defaultMessage: "Order summary",
|
|
183
379
|
id: "subscription_management.summary.title",
|
|
184
380
|
description: "Title of the block previewing what a subscription change is invoiced for"
|
|
185
381
|
})
|
|
186
382
|
}, {
|
|
187
|
-
default:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
383
|
+
default: v(() => [
|
|
384
|
+
A("div", _t, [
|
|
385
|
+
n.planName ? (s(), g(t(te), {
|
|
386
|
+
key: 0,
|
|
387
|
+
"no-spacing": "",
|
|
388
|
+
class: "sv-subscription-management-summary__plan"
|
|
389
|
+
}, {
|
|
390
|
+
default: v(() => [
|
|
391
|
+
A("div", yt, [
|
|
392
|
+
n.avatar ? (s(), g(t(Be), {
|
|
393
|
+
key: 0,
|
|
394
|
+
"image-src": n.avatar,
|
|
395
|
+
size: "lg",
|
|
396
|
+
class: "my-1"
|
|
397
|
+
}, null, 8, ["image-src"])) : P("", !0),
|
|
398
|
+
A("div", {
|
|
399
|
+
class: "min-w-0 grow",
|
|
400
|
+
title: n.planName
|
|
401
|
+
}, [
|
|
402
|
+
S(t(F), {
|
|
403
|
+
variant: "body",
|
|
404
|
+
weight: "semibold",
|
|
405
|
+
"no-spacing": "",
|
|
406
|
+
class: "truncate"
|
|
407
|
+
}, {
|
|
408
|
+
default: v(() => [
|
|
409
|
+
E(M(n.planName), 1)
|
|
410
|
+
]),
|
|
411
|
+
_: 1
|
|
412
|
+
})
|
|
413
|
+
], 8, Pt)
|
|
414
|
+
])
|
|
415
|
+
]),
|
|
416
|
+
_: 1
|
|
417
|
+
})) : P("", !0),
|
|
418
|
+
In(m.$slots, "default"),
|
|
419
|
+
n.hasError ? (s(), g(t(ve), {
|
|
420
|
+
key: 1,
|
|
421
|
+
class: "sv-subscription-management-summary__error sv-error",
|
|
422
|
+
title: t(o)({
|
|
423
|
+
defaultMessage: "Unable to calculate the total. Please try again.",
|
|
424
|
+
id: "subscription_management.summary.error",
|
|
425
|
+
description: "Error shown when the invoice preview for a subscription change cannot be loaded"
|
|
426
|
+
})
|
|
427
|
+
}, null, 8, ["title"])) : n.isPending || !n.invoice ? (s(), g(Re, {
|
|
428
|
+
key: 2,
|
|
429
|
+
variant: "section",
|
|
430
|
+
class: "sv-subscription-management-summary__skeleton min-h-[120px]"
|
|
431
|
+
}, {
|
|
432
|
+
default: v(() => [
|
|
433
|
+
n.isPending ? P("", !0) : (s(), g(t(F), {
|
|
434
|
+
key: 0,
|
|
435
|
+
variant: "body-sm",
|
|
436
|
+
color: "subtle",
|
|
437
|
+
tag: "div",
|
|
438
|
+
class: "sv-subscription-management-summary__empty-state"
|
|
439
|
+
}, {
|
|
440
|
+
default: v(() => [
|
|
441
|
+
E(M(t(o)({
|
|
442
|
+
defaultMessage: "Select your plan to see what it costs.",
|
|
443
|
+
id: "subscription_management.summary.empty_state",
|
|
444
|
+
description: "Shown in the order summary before a plan has been picked to preview"
|
|
445
|
+
})), 1)
|
|
446
|
+
]),
|
|
447
|
+
_: 1
|
|
448
|
+
}))
|
|
449
|
+
]),
|
|
450
|
+
_: 1
|
|
451
|
+
})) : (s(), g(t(te), {
|
|
452
|
+
key: 3,
|
|
453
|
+
class: "sv-subscription-management-summary__totals"
|
|
454
|
+
}, {
|
|
455
|
+
default: v(() => [
|
|
456
|
+
S(et, { messages: i.value }, {
|
|
457
|
+
default: v(() => [
|
|
458
|
+
S(t(Qn), {
|
|
459
|
+
class: "sv-subscription-management-summary__invoice",
|
|
460
|
+
variant: "without-products",
|
|
461
|
+
invoice: n.invoice,
|
|
462
|
+
"is-customer-facing": ""
|
|
463
|
+
}, null, 8, ["invoice"])
|
|
464
|
+
]),
|
|
465
|
+
_: 1
|
|
466
|
+
}, 8, ["messages"])
|
|
467
|
+
]),
|
|
468
|
+
_: 1
|
|
469
|
+
}))
|
|
470
|
+
])
|
|
233
471
|
]),
|
|
234
|
-
_:
|
|
472
|
+
_: 3
|
|
235
473
|
}, 8, ["title"]));
|
|
236
474
|
}
|
|
237
|
-
}),
|
|
475
|
+
}), It = { class: "sv-subscription-management-success grid grid-cols-1 gap-4" }, Mt = { class: "sv-subscription-management-success__message" }, St = /* @__PURE__ */ j({
|
|
238
476
|
__name: "SubscriptionManagementSuccess",
|
|
239
477
|
props: {
|
|
478
|
+
pricingPlanName: { type: String },
|
|
240
479
|
pricingGroupName: { type: String }
|
|
241
480
|
},
|
|
242
|
-
setup(
|
|
243
|
-
const
|
|
244
|
-
() =>
|
|
481
|
+
setup(n) {
|
|
482
|
+
const o = n, { $t: i } = q(), m = p(
|
|
483
|
+
() => i({
|
|
245
484
|
defaultMessage: "Subscription updated",
|
|
246
485
|
description: "Title shown on the manage subscription screen once the change is committed",
|
|
247
486
|
id: "subscription_management.success.title"
|
|
248
487
|
})
|
|
249
|
-
),
|
|
250
|
-
|
|
251
|
-
{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
defaultMessage: "Your
|
|
259
|
-
description: "Confirmation of a committed subscription change
|
|
260
|
-
id: "subscription_management.success.
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
488
|
+
), u = p(() => o.pricingPlanName ? i(
|
|
489
|
+
{
|
|
490
|
+
defaultMessage: "Your subscription has been moved to {plan}. Please be aware that it can take some time to reflect this change in your subscription.",
|
|
491
|
+
description: "Confirmation of a committed move to another plan within the same pricing plan group",
|
|
492
|
+
id: "subscription_management.success.plan_message"
|
|
493
|
+
},
|
|
494
|
+
{ plan: o.pricingPlanName }
|
|
495
|
+
) : o.pricingGroupName ? i(
|
|
496
|
+
{
|
|
497
|
+
defaultMessage: "Your {subject} has been changed. Please be aware that it can take some time to reflect this change in your subscription.",
|
|
498
|
+
description: "Confirmation of the pricing group a committed subscription change applied to",
|
|
499
|
+
id: "subscription_management.success.message"
|
|
500
|
+
},
|
|
501
|
+
{ subject: o.pricingGroupName }
|
|
502
|
+
) : i({
|
|
503
|
+
defaultMessage: "Your subscription has been changed. Please be aware that it can take some time to reflect this change in your subscription.",
|
|
504
|
+
description: "Confirmation of a committed subscription change when the pricing group is not known",
|
|
505
|
+
id: "subscription_management.success.message_generic"
|
|
506
|
+
}));
|
|
507
|
+
return (f, d) => (s(), V("div", It, [
|
|
508
|
+
S(nt, {
|
|
265
509
|
status: "success",
|
|
266
|
-
title:
|
|
510
|
+
title: m.value
|
|
267
511
|
}, {
|
|
268
|
-
default:
|
|
269
|
-
|
|
512
|
+
default: v(() => [
|
|
513
|
+
A("span", Mt, M(u.value), 1)
|
|
270
514
|
]),
|
|
271
515
|
_: 1
|
|
272
516
|
}, 8, ["title"])
|
|
273
517
|
]));
|
|
274
518
|
}
|
|
275
|
-
}),
|
|
519
|
+
}), Et = { class: "flex flex-row gap-2 px-3 py-2" }, Ct = /* @__PURE__ */ j({
|
|
520
|
+
__name: "SubscriptionPlanChangeSummary",
|
|
521
|
+
props: {
|
|
522
|
+
changeType: { type: String }
|
|
523
|
+
},
|
|
524
|
+
setup(n) {
|
|
525
|
+
const o = n, { $t: i } = q(), m = p(
|
|
526
|
+
() => o.changeType === "NEXT_BILLING_PERIOD" ? i({
|
|
527
|
+
defaultMessage: "The change takes effect at the start of your next billing period. You keep your current plan until then, and the new price appears on the invoice from that period onwards.",
|
|
528
|
+
id: "subscription_management.plan_change_summary.next_billing_period",
|
|
529
|
+
description: "Explains a plan change that only takes effect at the next billing period"
|
|
530
|
+
}) : i({
|
|
531
|
+
defaultMessage: "The change takes effect right away. The new price appears on your next invoice.",
|
|
532
|
+
id: "subscription_management.plan_change_summary.immediate",
|
|
533
|
+
description: "Explains a plan change that takes effect immediately"
|
|
534
|
+
})
|
|
535
|
+
);
|
|
536
|
+
return (u, f) => (s(), g(t(te), {
|
|
537
|
+
"no-spacing": "",
|
|
538
|
+
class: "sv-subscription-plan-change-summary"
|
|
539
|
+
}, {
|
|
540
|
+
default: v(() => [
|
|
541
|
+
A("div", Et, [
|
|
542
|
+
S(t(Cn), {
|
|
543
|
+
icon: "info",
|
|
544
|
+
size: "xs",
|
|
545
|
+
class: "mt-0.5 shrink-0 text-secondary"
|
|
546
|
+
}),
|
|
547
|
+
S(t(F), {
|
|
548
|
+
variant: "body-xs",
|
|
549
|
+
color: "secondary",
|
|
550
|
+
tag: "div",
|
|
551
|
+
"no-spacing": "",
|
|
552
|
+
class: "sv-subscription-plan-change-summary__timing"
|
|
553
|
+
}, {
|
|
554
|
+
default: v(() => [
|
|
555
|
+
E(M(m.value), 1)
|
|
556
|
+
]),
|
|
557
|
+
_: 1
|
|
558
|
+
})
|
|
559
|
+
])
|
|
560
|
+
]),
|
|
561
|
+
_: 1
|
|
562
|
+
}));
|
|
563
|
+
}
|
|
564
|
+
}), kt = { class: "sv-subscription-management__header flex flex-col gap-2 md:flex-row md:items-center" }, At = { class: "flex flex-col gap-2" }, Te = "sv-subscription-management-form", De = "sv-subscription-management__customized-pricing-message", $t = /* @__PURE__ */ j({
|
|
276
565
|
__name: "SubscriptionManagement",
|
|
277
566
|
props: {
|
|
278
|
-
configuration: { type: Object }
|
|
567
|
+
configuration: { type: Object },
|
|
568
|
+
avatar: { type: String }
|
|
279
569
|
},
|
|
280
|
-
setup(
|
|
281
|
-
const
|
|
570
|
+
setup(n) {
|
|
571
|
+
const o = n, i = Oe(
|
|
572
|
+
() => import("../../AddPaymentMethodModal-Bs_aOOCX.mjs")
|
|
573
|
+
), m = Oe(
|
|
574
|
+
() => import("../../SubscriptionCancellationModal-C_xFPx1I.mjs")
|
|
575
|
+
), u = [
|
|
282
576
|
"BUY_NOW_PAY_LATER",
|
|
283
577
|
"CARD",
|
|
284
578
|
"DIGITAL_WALLET",
|
|
285
579
|
"DIRECT_DEBIT",
|
|
286
580
|
"ONLINE_BANKING"
|
|
287
|
-
],
|
|
288
|
-
subscription:
|
|
289
|
-
get:
|
|
290
|
-
error:
|
|
291
|
-
} =
|
|
292
|
-
subscriptionId:
|
|
293
|
-
}), { items:
|
|
294
|
-
customerId:
|
|
295
|
-
}), { paymentMethodOptions:
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
),
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
581
|
+
], f = (e, a) => !!a && Rn(e) && e.customer_id === (a == null ? void 0 : a.customer_id) && u.includes(e.type), { $t: d } = q(), C = Ln(), w = ae(), { dispatchAction: b } = Nn(), { createPricingPlanSchedule: r } = Wn(), { changeSubscriptionPlan: c, setSubscriptionPaymentMethod: y } = Ue(), {
|
|
582
|
+
subscription: h,
|
|
583
|
+
get: $,
|
|
584
|
+
error: Z
|
|
585
|
+
} = Sn({
|
|
586
|
+
subscriptionId: o.configuration.subscriptionId
|
|
587
|
+
}), { items: T, fetchAll: O } = Gn({
|
|
588
|
+
customerId: C.value.customer_id
|
|
589
|
+
}), { paymentMethodOptions: J, get: Q } = Un(), { isLoading: ie } = zn(
|
|
590
|
+
$(),
|
|
591
|
+
O(),
|
|
592
|
+
Q({ customerId: C.value.customer_id })
|
|
593
|
+
), fe = () => $().catch((e) => {
|
|
594
|
+
w.error(
|
|
595
|
+
"SUBSCRIPTION_LOAD_FAILED",
|
|
596
|
+
"Failed to reload the subscription after it changed",
|
|
597
|
+
{},
|
|
598
|
+
e
|
|
599
|
+
);
|
|
600
|
+
}), se = p(
|
|
601
|
+
() => T.value.filter((e) => f(e, h.value))
|
|
602
|
+
), ze = p(
|
|
603
|
+
() => T.value.some(
|
|
303
604
|
(e) => {
|
|
304
|
-
var
|
|
305
|
-
return e.id === ((
|
|
605
|
+
var a;
|
|
606
|
+
return e.id === ((a = h.value) == null ? void 0 : a.payment_method_id) && Bn(e);
|
|
306
607
|
}
|
|
307
608
|
)
|
|
308
|
-
),
|
|
609
|
+
), D = p(
|
|
309
610
|
() => {
|
|
310
611
|
var e;
|
|
311
|
-
return
|
|
612
|
+
return Fn(((e = h.value) == null ? void 0 : e.pricing_plan_schedule_infos) ?? []);
|
|
312
613
|
}
|
|
313
|
-
),
|
|
314
|
-
const e =
|
|
614
|
+
), Ve = p(() => {
|
|
615
|
+
const e = D.value;
|
|
315
616
|
return e != null && e.pricing_plan_version ? {
|
|
316
617
|
...e,
|
|
317
|
-
pricing_plan_version:
|
|
618
|
+
pricing_plan_version: tt(e)
|
|
318
619
|
} : e;
|
|
319
|
-
}),
|
|
620
|
+
}), oe = p(
|
|
320
621
|
() => {
|
|
321
622
|
var e;
|
|
322
|
-
return
|
|
623
|
+
return En(((e = D.value) == null ? void 0 : e.pricing_plan_schedule) ?? {});
|
|
323
624
|
}
|
|
324
|
-
),
|
|
625
|
+
), H = p(
|
|
325
626
|
() => {
|
|
326
627
|
var e;
|
|
327
|
-
return
|
|
628
|
+
return at((e = D.value) == null ? void 0 : e.pricing_plan_schedule);
|
|
328
629
|
}
|
|
329
|
-
),
|
|
330
|
-
const e =
|
|
630
|
+
), G = p(() => {
|
|
631
|
+
const e = Ve.value;
|
|
331
632
|
if (!e)
|
|
332
633
|
return;
|
|
333
|
-
const {
|
|
334
|
-
return (
|
|
335
|
-
(
|
|
336
|
-
).find((
|
|
337
|
-
}),
|
|
338
|
-
() => {
|
|
634
|
+
const { currentPricingId: a } = o.configuration;
|
|
635
|
+
return (a ? [a] : oe.value).map(
|
|
636
|
+
(I) => jn({ pricingPlanScheduleInfo: e, pricingId: I })
|
|
637
|
+
).find((I) => !!I);
|
|
638
|
+
}), Fe = p(
|
|
639
|
+
() => d({
|
|
640
|
+
defaultMessage: "Manage subscription",
|
|
641
|
+
id: "subscription_management.title",
|
|
642
|
+
description: "Title for the manage subscription page"
|
|
643
|
+
})
|
|
644
|
+
), U = _([]), x = _();
|
|
645
|
+
z(
|
|
646
|
+
[() => {
|
|
339
647
|
var e;
|
|
340
|
-
return
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
[
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
M.value = g && f.includes(g) ? [...e.filter(($) => !f.includes($)), g] : e;
|
|
648
|
+
return (e = h.value) == null ? void 0 : e.payment_method_id;
|
|
649
|
+
}, se],
|
|
650
|
+
([e, a]) => {
|
|
651
|
+
!x.value && a.some(({ id: l }) => l === e) && (x.value = e);
|
|
652
|
+
},
|
|
653
|
+
{ immediate: !0 }
|
|
654
|
+
);
|
|
655
|
+
const je = p(
|
|
656
|
+
() => se.value.some(({ id: e }) => e === x.value)
|
|
657
|
+
), K = _(!1), We = p(() => {
|
|
658
|
+
var e, a;
|
|
659
|
+
return ((a = (e = h.value) == null ? void 0 : e.payment_acceptor_ids) == null ? void 0 : a.length) !== 0;
|
|
660
|
+
}), Ye = () => {
|
|
661
|
+
K.value = !1, O();
|
|
662
|
+
};
|
|
663
|
+
z(
|
|
664
|
+
[oe, G],
|
|
665
|
+
([e, a]) => {
|
|
666
|
+
const { currentPricingId: l } = o.configuration, I = ((a == null ? void 0 : a.pricings) ?? []).map(({ id: L }) => L);
|
|
667
|
+
U.value = l && I.includes(l) ? [...e.filter((L) => !I.includes(L)), l] : e;
|
|
361
668
|
},
|
|
362
669
|
{ immediate: !0 }
|
|
363
670
|
);
|
|
364
|
-
const
|
|
365
|
-
const e = new Set(
|
|
366
|
-
return e.size !==
|
|
671
|
+
const be = p(() => {
|
|
672
|
+
const e = new Set(U.value), a = new Set(oe.value);
|
|
673
|
+
return e.size !== a.size || [...e].some((l) => !a.has(l));
|
|
367
674
|
}), {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
675
|
+
options: re,
|
|
676
|
+
currentPricingPlanId: qe,
|
|
677
|
+
isPending: _e,
|
|
678
|
+
error: He,
|
|
679
|
+
load: Ke
|
|
680
|
+
} = dt(), ye = _(!1);
|
|
681
|
+
z(_e, (e, a) => {
|
|
682
|
+
a && !e && (ye.value = !0);
|
|
683
|
+
}), z(
|
|
684
|
+
D,
|
|
685
|
+
(e) => {
|
|
686
|
+
Ke({
|
|
687
|
+
subscriptionId: o.configuration.subscriptionId,
|
|
688
|
+
scheduleInfo: e
|
|
689
|
+
});
|
|
690
|
+
},
|
|
691
|
+
{ immediate: !0 }
|
|
692
|
+
);
|
|
693
|
+
const B = _();
|
|
694
|
+
z(
|
|
695
|
+
qe,
|
|
696
|
+
(e) => {
|
|
697
|
+
B.value = e;
|
|
698
|
+
},
|
|
699
|
+
{ immediate: !0 }
|
|
700
|
+
);
|
|
701
|
+
const N = p(
|
|
702
|
+
() => re.value.find((e) => e.pricingPlanId === B.value)
|
|
703
|
+
), k = p(
|
|
704
|
+
() => !!(N.value && !N.value.isCurrent)
|
|
705
|
+
), {
|
|
706
|
+
invoice: Xe,
|
|
707
|
+
isPending: Ze,
|
|
708
|
+
error: Je,
|
|
709
|
+
load: Qe
|
|
710
|
+
} = st();
|
|
711
|
+
z(
|
|
712
|
+
[U, h, D, H, k],
|
|
713
|
+
([e, a, l, I, L]) => {
|
|
714
|
+
!a || e.length === 0 || I || L || Qe({
|
|
715
|
+
subscription: a,
|
|
716
|
+
scheduleInfo: l,
|
|
379
717
|
enabledPricingIds: e
|
|
380
718
|
});
|
|
381
719
|
},
|
|
382
720
|
{ immediate: !0 }
|
|
383
721
|
);
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
722
|
+
const {
|
|
723
|
+
invoice: en,
|
|
724
|
+
isPending: nn,
|
|
725
|
+
error: tn,
|
|
726
|
+
load: an,
|
|
727
|
+
reset: sn
|
|
728
|
+
} = ot();
|
|
729
|
+
z(
|
|
730
|
+
[h, B, k, H],
|
|
731
|
+
([e, a, l, I]) => {
|
|
732
|
+
if (!e || !a || !l || I) {
|
|
733
|
+
sn();
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
an({
|
|
737
|
+
subscriptionId: e.id,
|
|
738
|
+
pricingPlanId: a
|
|
739
|
+
});
|
|
740
|
+
},
|
|
741
|
+
{ immediate: !0 }
|
|
742
|
+
);
|
|
743
|
+
const Pe = p(
|
|
744
|
+
() => k.value ? en.value : Xe.value
|
|
745
|
+
), we = p(
|
|
746
|
+
() => k.value ? nn.value : Ze.value
|
|
747
|
+
), Ie = p(
|
|
748
|
+
() => k.value ? tn.value : Je.value
|
|
749
|
+
), on = p(
|
|
750
|
+
() => {
|
|
751
|
+
var e, a, l, I;
|
|
752
|
+
return ((e = N.value) == null ? void 0 : e.name) ?? ((I = (l = (a = D.value) == null ? void 0 : a.pricing_plan_version) == null ? void 0 : l.pricing_plan) == null ? void 0 : I.name);
|
|
753
|
+
}
|
|
754
|
+
), ce = p(() => re.value.length > 1), rn = p(() => {
|
|
755
|
+
var e, a;
|
|
756
|
+
return k.value && ((e = N.value) == null ? void 0 : e.direction) === "UPGRADE" ? d({
|
|
757
|
+
defaultMessage: "Upgrade plan",
|
|
758
|
+
id: "subscription_management.update_button.upgrade_label",
|
|
759
|
+
description: "Label of the button that moves the subscription to a higher plan in its group"
|
|
760
|
+
}) : k.value && ((a = N.value) == null ? void 0 : a.direction) === "DOWNGRADE" ? d({
|
|
761
|
+
defaultMessage: "Downgrade plan",
|
|
762
|
+
id: "subscription_management.update_button.downgrade_label",
|
|
763
|
+
description: "Label of the button that moves the subscription to a lower plan in its group"
|
|
764
|
+
}) : ce.value && !k.value && !be.value ? d({
|
|
765
|
+
defaultMessage: "Your current plan",
|
|
766
|
+
id: "subscription_management.update_button.current_plan_label",
|
|
767
|
+
description: "Label of the disabled button while the customer has their current plan selected and nothing changed"
|
|
768
|
+
}) : d({
|
|
769
|
+
defaultMessage: "Update subscription",
|
|
770
|
+
id: "subscription_management.update_button.label",
|
|
771
|
+
description: "Label of the button that commits the subscription change"
|
|
772
|
+
});
|
|
773
|
+
}), W = _(!1), Y = _(), le = _(!1), ue = _(), de = _(!1), Me = p(
|
|
774
|
+
() => !ie.value && !W.value && !le.value && !!h.value && !H.value && je.value && (k.value || !!G.value && U.value.length > 0 && be.value) && !we.value && !Ie.value && !!Pe.value
|
|
775
|
+
), cn = async () => {
|
|
776
|
+
if (!Me.value || !h.value)
|
|
777
|
+
return;
|
|
778
|
+
W.value = !0, Y.value = void 0;
|
|
779
|
+
const e = () => d({
|
|
780
|
+
defaultMessage: "Something went wrong. Please try again.",
|
|
781
|
+
id: "subscription_management.update_error",
|
|
782
|
+
description: "Error shown when committing a subscription change fails"
|
|
783
|
+
}), a = !!(x.value && x.value !== h.value.payment_method_id);
|
|
784
|
+
if (x.value && a)
|
|
389
785
|
try {
|
|
390
|
-
await
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
"SUBSCRIPTION_UPDATE_FAILED",
|
|
399
|
-
"Failed to start a new pricing plan schedule",
|
|
786
|
+
await y({
|
|
787
|
+
id: h.value.id,
|
|
788
|
+
paymentMethodId: x.value
|
|
789
|
+
});
|
|
790
|
+
} catch (l) {
|
|
791
|
+
w.error(
|
|
792
|
+
"SUBSCRIPTION_PAYMENT_METHOD_UPDATE_FAILED",
|
|
793
|
+
"Failed to link the payment method to the subscription",
|
|
400
794
|
{},
|
|
401
|
-
|
|
402
|
-
),
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
795
|
+
l
|
|
796
|
+
), Y.value = e(), W.value = !1;
|
|
797
|
+
return;
|
|
798
|
+
}
|
|
799
|
+
try {
|
|
800
|
+
k.value && B.value ? (await c({
|
|
801
|
+
id: h.value.id,
|
|
802
|
+
pricingPlanId: B.value
|
|
803
|
+
}), ue.value = N.value) : await r({
|
|
804
|
+
pricingPlanSubscriptionId: h.value.id,
|
|
805
|
+
enabledPricings: U.value.map((l) => ({
|
|
806
|
+
pricing_id: l
|
|
807
|
+
}))
|
|
808
|
+
}), de.value = !0;
|
|
809
|
+
} catch (l) {
|
|
810
|
+
if (k.value ? w.error(
|
|
811
|
+
"SUBSCRIPTION_PLAN_CHANGE_FAILED",
|
|
812
|
+
"Failed to move the subscription to another plan in its group",
|
|
813
|
+
{},
|
|
814
|
+
l
|
|
815
|
+
) : w.error(
|
|
816
|
+
"SUBSCRIPTION_UPDATE_FAILED",
|
|
817
|
+
"Failed to start a new pricing plan schedule",
|
|
818
|
+
{},
|
|
819
|
+
l
|
|
820
|
+
), a && fe(), it(l)) {
|
|
821
|
+
le.value = !0, Y.value = d({
|
|
822
|
+
defaultMessage: "We couldn't confirm your change. It may still go through, so check your subscription before trying again.",
|
|
823
|
+
id: "subscription_management.update_unconfirmed",
|
|
824
|
+
description: "Error shown when committing a subscription change got no clear answer, so the change may still have been made"
|
|
414
825
|
});
|
|
415
|
-
|
|
416
|
-
N.value = !1;
|
|
826
|
+
return;
|
|
417
827
|
}
|
|
828
|
+
Y.value = e();
|
|
829
|
+
} finally {
|
|
830
|
+
W.value = !1;
|
|
418
831
|
}
|
|
419
|
-
},
|
|
832
|
+
}, pe = p(
|
|
420
833
|
() => {
|
|
421
|
-
var e,
|
|
422
|
-
return ((
|
|
834
|
+
var e, a, l;
|
|
835
|
+
return ((a = (e = D.value) == null ? void 0 : e.pricing_plan_schedule) == null ? void 0 : a.billing_period) ?? ((l = h.value) == null ? void 0 : l.billing_period);
|
|
423
836
|
}
|
|
424
|
-
),
|
|
425
|
-
|
|
426
|
-
|
|
837
|
+
), {
|
|
838
|
+
isCancellable: ln,
|
|
839
|
+
isRenewable: un,
|
|
840
|
+
pendingVariant: Se,
|
|
841
|
+
confirmedVariant: Ee,
|
|
842
|
+
confirm: dn,
|
|
843
|
+
cancel: pn,
|
|
844
|
+
renew: mn,
|
|
845
|
+
dismiss: gn
|
|
846
|
+
} = Tn({ subscription: h }), { customer: Ce, get: vn } = Dn({ customerId: C.value.customer_id });
|
|
847
|
+
let ke = !1;
|
|
848
|
+
const Ae = () => {
|
|
849
|
+
ke || (ke = !0, vn.execute());
|
|
850
|
+
}, hn = () => {
|
|
851
|
+
Ae(), K.value = !0;
|
|
852
|
+
}, $e = _(!1), xe = (e) => {
|
|
853
|
+
$e.value = !0, Ae(), e === "RENEW" ? mn() : pn();
|
|
854
|
+
}, fn = p(
|
|
855
|
+
() => T.value.find(({ id: e }) => {
|
|
856
|
+
var a;
|
|
857
|
+
return e === ((a = h.value) == null ? void 0 : a.payment_method_id);
|
|
858
|
+
})
|
|
859
|
+
), bn = () => {
|
|
860
|
+
dn(), fe();
|
|
861
|
+
}, R = p(() => de.value ? "updated" : ie.value ? "loading" : !h.value && Z.value ? "load-error" : _e.value && !ye.value ? "loading" : !G.value && He.value ? "load-error" : (G.value || ce.value) && H.value ? "customized" : (G.value || ce.value) && pe.value ? "form" : "empty"), _n = p(() => {
|
|
862
|
+
const e = R.value === "customized" ? De : void 0;
|
|
863
|
+
return { form: Te, ...e && { "aria-describedby": e } };
|
|
427
864
|
});
|
|
428
|
-
return (e,
|
|
429
|
-
header:
|
|
430
|
-
|
|
431
|
-
|
|
865
|
+
return (e, a) => (s(), g(t(On), { class: "sv-subscription-management sv-root sv-screen" }, {
|
|
866
|
+
header: v(() => [
|
|
867
|
+
A("div", kt, [
|
|
868
|
+
S(t(F), {
|
|
432
869
|
variant: "heading-2",
|
|
433
870
|
tag: "h1",
|
|
434
|
-
class: "sv-subscription-management__title"
|
|
871
|
+
class: "sv-subscription-management__title grow"
|
|
435
872
|
}, {
|
|
436
|
-
default:
|
|
437
|
-
|
|
873
|
+
default: v(() => [
|
|
874
|
+
E(M(Fe.value), 1)
|
|
438
875
|
]),
|
|
439
876
|
_: 1
|
|
440
|
-
})
|
|
877
|
+
}),
|
|
878
|
+
R.value !== "updated" ? (s(), V(ge, { key: 0 }, [
|
|
879
|
+
t(un) ? (s(), g(t(ee), {
|
|
880
|
+
key: 0,
|
|
881
|
+
intent: "secondary",
|
|
882
|
+
class: "sv-action sv-action--secondary sv-subscription-management__renew w-full md:w-auto",
|
|
883
|
+
type: "button",
|
|
884
|
+
onClick: a[0] || (a[0] = (l) => xe("RENEW"))
|
|
885
|
+
}, {
|
|
886
|
+
default: v(() => [
|
|
887
|
+
E(M(t(d)({
|
|
888
|
+
defaultMessage: "Renew subscription",
|
|
889
|
+
id: "subscription_details.renew_button.label",
|
|
890
|
+
description: "Label for the renew subscription button on the subscription details page"
|
|
891
|
+
})), 1)
|
|
892
|
+
]),
|
|
893
|
+
_: 1
|
|
894
|
+
})) : t(ln) ? (s(), g(t(ee), {
|
|
895
|
+
key: 1,
|
|
896
|
+
intent: "secondary",
|
|
897
|
+
class: "sv-action sv-action--secondary sv-subscription-management__cancel w-full md:w-auto",
|
|
898
|
+
type: "button",
|
|
899
|
+
onClick: a[1] || (a[1] = (l) => xe("CANCEL"))
|
|
900
|
+
}, {
|
|
901
|
+
default: v(() => [
|
|
902
|
+
E(M(t(d)({
|
|
903
|
+
defaultMessage: "Cancel subscription",
|
|
904
|
+
id: "subscription_details.cancel_button.label",
|
|
905
|
+
description: "Label for the cancel subscription button on the subscription details page"
|
|
906
|
+
})), 1)
|
|
907
|
+
]),
|
|
908
|
+
_: 1
|
|
909
|
+
})) : P("", !0)
|
|
910
|
+
], 64)) : P("", !0)
|
|
441
911
|
])
|
|
442
912
|
]),
|
|
443
|
-
content:
|
|
444
|
-
var
|
|
913
|
+
content: v(() => {
|
|
914
|
+
var l, I, L;
|
|
445
915
|
return [
|
|
446
|
-
|
|
916
|
+
t(Ee) ? (s(), g(Yn, {
|
|
447
917
|
key: 0,
|
|
448
|
-
class: "sv-subscription-
|
|
449
|
-
|
|
450
|
-
}, null, 8, ["
|
|
918
|
+
class: "sv-subscription-management__cancellation-success",
|
|
919
|
+
variant: t(Ee)
|
|
920
|
+
}, null, 8, ["variant"])) : P("", !0),
|
|
921
|
+
R.value === "updated" ? (s(), g(St, {
|
|
451
922
|
key: 1,
|
|
923
|
+
class: "sv-subscription-management__success",
|
|
924
|
+
"pricing-group-name": ue.value || (l = G.value) == null ? void 0 : l.name,
|
|
925
|
+
"pricing-plan-name": (I = ue.value) == null ? void 0 : I.name
|
|
926
|
+
}, null, 8, ["pricing-group-name", "pricing-plan-name"])) : R.value === "loading" ? (s(), g(Re, {
|
|
927
|
+
key: 2,
|
|
452
928
|
variant: "section",
|
|
453
929
|
class: "min-h-[220px]"
|
|
454
|
-
})) :
|
|
455
|
-
key:
|
|
930
|
+
})) : R.value === "load-error" ? (s(), g(t(ve), {
|
|
931
|
+
key: 3,
|
|
456
932
|
class: "sv-subscription-management__load-error sv-error",
|
|
457
|
-
title: t(
|
|
933
|
+
title: t(d)({
|
|
458
934
|
defaultMessage: "Unable to load this subscription. Please try again later.",
|
|
459
935
|
id: "subscription_management.load_error",
|
|
460
936
|
description: "Error shown in place of the manage subscription form when the subscription cannot be loaded"
|
|
461
937
|
})
|
|
462
|
-
}, null, 8, ["title"])) :
|
|
463
|
-
key:
|
|
938
|
+
}, null, 8, ["title"])) : R.value === "customized" ? (s(), g(Le, {
|
|
939
|
+
key: 4,
|
|
464
940
|
class: "sv-subscription-management__customized-pricing",
|
|
465
941
|
icon: "info"
|
|
466
942
|
}, {
|
|
467
|
-
title:
|
|
468
|
-
|
|
943
|
+
title: v(() => [
|
|
944
|
+
E(M(t(d)({
|
|
469
945
|
defaultMessage: "This subscription has custom pricing",
|
|
470
946
|
id: "subscription_management.customized_pricing.title",
|
|
471
947
|
description: "Title shown on the manage subscription screen in place of the form when the subscription has pricing customized for it, which cannot be changed here"
|
|
472
948
|
})), 1)
|
|
473
949
|
]),
|
|
474
|
-
message:
|
|
475
|
-
|
|
950
|
+
message: v(() => [
|
|
951
|
+
A("span", { id: De }, M(t(d)({
|
|
476
952
|
defaultMessage: "Please contact support to change it.",
|
|
477
953
|
id: "subscription_management.customized_pricing.message",
|
|
478
954
|
description: "Message shown on the manage subscription screen when the subscription has pricing customized for it, which cannot be changed here"
|
|
479
955
|
})), 1)
|
|
480
956
|
]),
|
|
481
957
|
_: 1
|
|
482
|
-
})) :
|
|
483
|
-
key: 4,
|
|
484
|
-
id: W,
|
|
485
|
-
"enabled-pricing-ids": M.value,
|
|
486
|
-
"onUpdate:enabledPricingIds": n[0] || (n[0] = ($) => M.value = $),
|
|
487
|
-
"payment-method-id": R.value,
|
|
488
|
-
"onUpdate:paymentMethodId": n[1] || (n[1] = ($) => R.value = $),
|
|
489
|
-
class: "sv-subscription-management__form",
|
|
490
|
-
"pricing-group": E.value,
|
|
491
|
-
"payment-methods": Q.value,
|
|
492
|
-
"has-expired-payment-method": de.value,
|
|
493
|
-
"billing-period": Y.value,
|
|
494
|
-
currency: (f = t(i)) == null ? void 0 : f.billing_currency,
|
|
495
|
-
disabled: N.value || V.value,
|
|
496
|
-
onSubmit: be
|
|
497
|
-
}, null, 8, ["enabled-pricing-ids", "payment-method-id", "pricing-group", "payment-methods", "has-expired-payment-method", "billing-period", "currency", "disabled"])) : (s(), c(oe, {
|
|
958
|
+
})) : R.value === "form" && pe.value ? (s(), g(bt, {
|
|
498
959
|
key: 5,
|
|
960
|
+
id: Te,
|
|
961
|
+
"enabled-pricing-ids": U.value,
|
|
962
|
+
"onUpdate:enabledPricingIds": a[2] || (a[2] = (X) => U.value = X),
|
|
963
|
+
"payment-method-id": x.value,
|
|
964
|
+
"onUpdate:paymentMethodId": a[3] || (a[3] = (X) => x.value = X),
|
|
965
|
+
"pricing-plan-id": B.value,
|
|
966
|
+
"onUpdate:pricingPlanId": a[4] || (a[4] = (X) => B.value = X),
|
|
967
|
+
class: "sv-subscription-management__form",
|
|
968
|
+
"pricing-group": k.value ? void 0 : G.value,
|
|
969
|
+
"plan-options": t(re),
|
|
970
|
+
"payment-methods": se.value,
|
|
971
|
+
"has-expired-payment-method": ze.value,
|
|
972
|
+
"billing-period": pe.value,
|
|
973
|
+
currency: (L = t(h)) == null ? void 0 : L.billing_currency,
|
|
974
|
+
disabled: W.value || le.value,
|
|
975
|
+
avatar: n.avatar,
|
|
976
|
+
"can-add-payment-method": We.value,
|
|
977
|
+
onSubmit: cn,
|
|
978
|
+
onAddPaymentMethod: hn
|
|
979
|
+
}, null, 8, ["enabled-pricing-ids", "payment-method-id", "pricing-plan-id", "pricing-group", "plan-options", "payment-methods", "has-expired-payment-method", "billing-period", "currency", "disabled", "avatar", "can-add-payment-method"])) : (s(), g(Le, {
|
|
980
|
+
key: 6,
|
|
499
981
|
class: "sv-subscription-management__empty-state",
|
|
500
982
|
icon: "receipt_long"
|
|
501
983
|
}, {
|
|
502
|
-
title:
|
|
503
|
-
|
|
984
|
+
title: v(() => [
|
|
985
|
+
E(M(t(d)({
|
|
504
986
|
defaultMessage: "Nothing to change",
|
|
505
987
|
id: "subscription_management.empty_state.title",
|
|
506
988
|
description: "Title shown on the manage subscription screen when the subscription has nothing the customer can change"
|
|
507
989
|
})), 1)
|
|
508
990
|
]),
|
|
509
|
-
message:
|
|
510
|
-
|
|
991
|
+
message: v(() => [
|
|
992
|
+
E(M(t(d)({
|
|
511
993
|
defaultMessage: "This subscription has no options that can be changed right now.",
|
|
512
994
|
id: "subscription_management.empty_state.message",
|
|
513
995
|
description: "Message shown on the manage subscription screen when the subscription is not running or has no group of options to choose from"
|
|
@@ -517,108 +999,137 @@ const Qe = ["id"], Xe = { class: "sv-subscription-management-form__body grid gri
|
|
|
517
999
|
}))
|
|
518
1000
|
];
|
|
519
1001
|
}),
|
|
520
|
-
aside:
|
|
521
|
-
|
|
1002
|
+
aside: v(() => [
|
|
1003
|
+
de.value ? (s(), g(t(ee), {
|
|
522
1004
|
key: 0,
|
|
523
1005
|
size: "lg",
|
|
524
1006
|
class: "sv-action sv-action--primary sv-action--full-width sv-subscription-management__done w-full",
|
|
525
1007
|
type: "button",
|
|
526
|
-
onClick:
|
|
1008
|
+
onClick: a[5] || (a[5] = (l) => t(b)({ action: "view-customer-overview" }))
|
|
527
1009
|
}, {
|
|
528
|
-
default:
|
|
529
|
-
|
|
1010
|
+
default: v(() => [
|
|
1011
|
+
E(M(t(d)({
|
|
530
1012
|
defaultMessage: "Done",
|
|
531
1013
|
id: "subscription_management.done_button.label",
|
|
532
1014
|
description: "Label of the button that leaves the manage subscription screen once the change is committed"
|
|
533
1015
|
})), 1)
|
|
534
1016
|
]),
|
|
535
1017
|
_: 1
|
|
536
|
-
})) : (s(),
|
|
537
|
-
|
|
1018
|
+
})) : (s(), V(ge, { key: 1 }, [
|
|
1019
|
+
H.value ? P("", !0) : (s(), g(wt, {
|
|
538
1020
|
key: 0,
|
|
539
1021
|
class: "sv-subscription-management__summary",
|
|
540
|
-
invoice:
|
|
541
|
-
"is-pending": t(
|
|
542
|
-
"has-error": !!
|
|
543
|
-
|
|
544
|
-
|
|
1022
|
+
invoice: Pe.value,
|
|
1023
|
+
"is-pending": t(ie) || we.value,
|
|
1024
|
+
"has-error": !!Ie.value,
|
|
1025
|
+
"plan-name": on.value,
|
|
1026
|
+
avatar: n.avatar
|
|
1027
|
+
}, {
|
|
1028
|
+
default: v(() => [
|
|
1029
|
+
k.value && N.value ? (s(), g(Ct, {
|
|
1030
|
+
key: 0,
|
|
1031
|
+
class: "sv-subscription-management__plan-change-summary",
|
|
1032
|
+
"change-type": N.value.changeType
|
|
1033
|
+
}, null, 8, ["change-type"])) : P("", !0)
|
|
1034
|
+
]),
|
|
1035
|
+
_: 1
|
|
1036
|
+
}, 8, ["invoice", "is-pending", "has-error", "plan-name", "avatar"])),
|
|
1037
|
+
Y.value ? (s(), g(t(ve), {
|
|
545
1038
|
key: 1,
|
|
546
1039
|
class: "sv-subscription-management__update-error sv-error",
|
|
547
|
-
title:
|
|
548
|
-
}, null, 8, ["title"])) :
|
|
549
|
-
|
|
550
|
-
|
|
1040
|
+
title: Y.value
|
|
1041
|
+
}, null, 8, ["title"])) : P("", !0),
|
|
1042
|
+
A("div", At, [
|
|
1043
|
+
S(t(ee), Mn({
|
|
551
1044
|
size: "lg",
|
|
552
1045
|
class: "sv-action sv-action--primary sv-action--full-width sv-subscription-management__update w-full",
|
|
553
1046
|
type: "submit"
|
|
554
|
-
},
|
|
555
|
-
disabled: !
|
|
556
|
-
loading:
|
|
1047
|
+
}, _n.value, {
|
|
1048
|
+
disabled: !Me.value,
|
|
1049
|
+
loading: W.value
|
|
557
1050
|
}), {
|
|
558
|
-
default:
|
|
559
|
-
|
|
560
|
-
defaultMessage: "Update subscription",
|
|
561
|
-
id: "subscription_management.update_button.label",
|
|
562
|
-
description: "Label of the button that commits the subscription change"
|
|
563
|
-
})), 1)
|
|
1051
|
+
default: v(() => [
|
|
1052
|
+
E(M(rn.value), 1)
|
|
564
1053
|
]),
|
|
565
1054
|
_: 1
|
|
566
1055
|
}, 16, ["disabled", "loading"]),
|
|
567
|
-
|
|
1056
|
+
S(qn, {
|
|
568
1057
|
class: "sv-subscription-management__kpi",
|
|
569
|
-
"payment-method-options": t(
|
|
1058
|
+
"payment-method-options": t(J)
|
|
570
1059
|
}, null, 8, ["payment-method-options"])
|
|
571
1060
|
])
|
|
572
|
-
], 64))
|
|
1061
|
+
], 64)),
|
|
1062
|
+
K.value ? (s(), g(t(i), {
|
|
1063
|
+
key: 2,
|
|
1064
|
+
"show-modal": K.value,
|
|
1065
|
+
customer: t(Ce),
|
|
1066
|
+
subscription: t(h),
|
|
1067
|
+
"sub-title": t(d)({
|
|
1068
|
+
defaultMessage: "Add a payment method to pay for your subscription.",
|
|
1069
|
+
id: "subscription_management.add_payment_method.subtitle",
|
|
1070
|
+
description: "Shown under the title of the modal that stores a new payment method on the manage subscription screen"
|
|
1071
|
+
}),
|
|
1072
|
+
onStored: Ye,
|
|
1073
|
+
onClose: a[6] || (a[6] = (l) => K.value = !1)
|
|
1074
|
+
}, null, 8, ["show-modal", "customer", "subscription", "sub-title"])) : P("", !0),
|
|
1075
|
+
$e.value ? (s(), g(t(m), {
|
|
1076
|
+
key: 3,
|
|
1077
|
+
"show-modal": !!t(Se),
|
|
1078
|
+
variant: t(Se),
|
|
1079
|
+
subscription: t(h),
|
|
1080
|
+
customer: t(Ce),
|
|
1081
|
+
"payment-method": fn.value,
|
|
1082
|
+
onConfirmed: bn,
|
|
1083
|
+
onClose: t(gn)
|
|
1084
|
+
}, null, 8, ["show-modal", "variant", "subscription", "customer", "payment-method", "onClose"])) : P("", !0)
|
|
573
1085
|
]),
|
|
574
1086
|
_: 1
|
|
575
1087
|
}));
|
|
576
1088
|
}
|
|
577
|
-
}),
|
|
1089
|
+
}), xt = /* @__PURE__ */ j({
|
|
578
1090
|
__name: "SubscriptionManagement.entry",
|
|
579
1091
|
props: {
|
|
580
|
-
portalToken: { type: Object },
|
|
581
1092
|
environment: { type: String },
|
|
582
1093
|
locale: { type: String },
|
|
583
1094
|
dateLocale: { type: String },
|
|
584
1095
|
messages: { type: Object },
|
|
585
|
-
|
|
586
|
-
secondaryColor: { type: String },
|
|
587
|
-
isShadowRoot: { type: Boolean },
|
|
1096
|
+
portalToken: { type: Object },
|
|
588
1097
|
experimentalFeatures: { type: Array },
|
|
589
1098
|
logLevel: { type: String },
|
|
590
1099
|
onLog: { type: Function },
|
|
591
|
-
allowedPortalTypes: { type: Array },
|
|
592
|
-
portalObject: { type: Object },
|
|
593
1100
|
cssOverrides: { type: [String, Array] },
|
|
594
1101
|
branding: { type: Object },
|
|
1102
|
+
portalObject: { type: null },
|
|
595
1103
|
configuration: { type: Object }
|
|
596
1104
|
},
|
|
597
|
-
setup(
|
|
598
|
-
const
|
|
599
|
-
return (
|
|
600
|
-
var
|
|
601
|
-
return s(),
|
|
602
|
-
entry:
|
|
603
|
-
"component-name": t(
|
|
1105
|
+
setup(n) {
|
|
1106
|
+
const o = $n("subscription-management");
|
|
1107
|
+
return (i, m) => {
|
|
1108
|
+
var u;
|
|
1109
|
+
return s(), g(t(An), {
|
|
1110
|
+
entry: i.$props,
|
|
1111
|
+
"component-name": t(o),
|
|
604
1112
|
"allowed-portal-types": ["CUSTOMER"],
|
|
605
|
-
"required-configuration": { subscriptionId: (
|
|
606
|
-
onError: h[0] || (h[0] = (o) => u.$emit("error", o))
|
|
1113
|
+
"required-configuration": { subscriptionId: (u = n.configuration) == null ? void 0 : u.subscriptionId }
|
|
607
1114
|
}, {
|
|
608
|
-
default:
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
1115
|
+
default: v(() => {
|
|
1116
|
+
var f, d;
|
|
1117
|
+
return [
|
|
1118
|
+
(s(), g($t, {
|
|
1119
|
+
key: n.configuration.subscriptionId,
|
|
1120
|
+
configuration: n.configuration,
|
|
1121
|
+
avatar: ((d = (f = n.branding) == null ? void 0 : f.emblem) == null ? void 0 : d.public_url) ?? void 0
|
|
1122
|
+
}, null, 8, ["configuration", "avatar"]))
|
|
1123
|
+
];
|
|
1124
|
+
}),
|
|
614
1125
|
_: 1
|
|
615
1126
|
}, 8, ["entry", "component-name", "required-configuration"]);
|
|
616
1127
|
};
|
|
617
1128
|
}
|
|
618
|
-
}), { define:
|
|
619
|
-
|
|
1129
|
+
}), { define: da } = xn(
|
|
1130
|
+
xt,
|
|
620
1131
|
"subscription-management"
|
|
621
1132
|
);
|
|
622
1133
|
export {
|
|
623
|
-
|
|
1134
|
+
da as defineSolvimonSubscriptionManagement
|
|
624
1135
|
};
|