@solvimon/solvimon-web 0.1.0-alpha.30 → 0.1.0-alpha.32
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-Cx203VXo.mjs +97 -0
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-BMHhLZnu.mjs +89 -0
- package/dist/{Alert.vue.es-ZPG49yR_.mjs → Alert.vue.es-DHJpiSdR.mjs} +1 -1
- package/dist/{Amount.vue.es-DPqHB8Xd.mjs → Amount.vue.es-CofcgmXt.mjs} +1 -1
- package/dist/AuthProvider.handle-BpFblzFx.mjs +46 -0
- package/dist/{Avatar.vue.es-geDQsZwu.mjs → Avatar.vue.es-CJdXXOiG.mjs} +1 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BD84aBiU.mjs +64 -0
- package/dist/BillingInformationForm.lib-ad8B2Y1O.mjs +32 -0
- package/dist/BillingInformationForm.vue_vue_type_script_setup_true_lang-F5OVG0kO.mjs +340 -0
- package/dist/BillingInformationModal-Do3Fuu8A.mjs +85 -0
- package/dist/{Button.vue.es-j7iYlqtJ.mjs → Button.vue.es-CW7XfMBF.mjs} +1 -1
- package/dist/{ChargeOnDemandModal-CR01PkP_.mjs → ChargeOnDemandModal-B4ShPKLS.mjs} +46 -45
- package/dist/{Chip.vue.es-Dxx_0dte.mjs → Chip.vue.es-CYwWHyAT.mjs} +2 -2
- package/dist/CompanyPurchaseToggle.vue_vue_type_script_setup_true_lang-CVXHCSPb.mjs +510 -0
- package/dist/{Comparators.vue.es-DQBI3f7m.mjs → Comparators.vue.es-DYrKlE8t.mjs} +1 -1
- package/dist/{ContentWithAsideLayout-Bnbsq8_5.mjs → ContentWithAsideLayout-C2kFcft1.mjs} +1 -1
- package/dist/{ContextMenu.vue.es-BJO4U47Q.mjs → ContextMenu.vue.es-EXTx0NEt.mjs} +10 -10
- package/dist/{CustomerBillingInformation.vue.es-CmNpqcBw.mjs → CustomerBillingInformation.vue.es-CSKG6V3T.mjs} +3 -3
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZZuAHIE.mjs +217 -0
- package/dist/CustomerShippingAddresses-Bdy4XWjE.mjs +282 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BEKwWob_.mjs +3124 -0
- package/dist/{DividerText.vue.es-BusbyeAI.mjs → DividerText.vue.es-Dq0JzI8C.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-wPma8Os-.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-3gf8pvR7.mjs} +3 -3
- package/dist/{ErrorNotification.vue.es-F068p7PY.mjs → ErrorNotification.vue.es-Cw7fqCg1.mjs} +2 -2
- package/dist/{FormMessage.vue.es-CwMQpIAW.mjs → FormMessage.vue.es-MrzQoSae.mjs} +1 -1
- package/dist/{IconButton.vue.es-D8DtBW9i.mjs → IconButton.vue.es-CpQbFw0x.mjs} +2 -2
- package/dist/{IconTitle.vue.es-6VJtjJX2.mjs → IconTitle.vue.es-CcOIFjbE.mjs} +3 -3
- package/dist/{Input.vue.es-BLyHcmu4.mjs → Input.vue.es-Cd55vQri.mjs} +4 -4
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dl1vTzQD.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CqkGCbvg.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DYskT3r7.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-BUu5M_gx.mjs} +7 -7
- package/dist/{InvoicePreview.vue.es-Cpf66_xV.mjs → InvoicePreview.vue.es-DHh5wruk.mjs} +7 -7
- package/dist/{InvoicePricingClauseChip.vue.es-CDrAE901.mjs → InvoicePricingClauseChip.vue.es-ZSOBp1se.mjs} +4 -4
- package/dist/{Label.vue.es-es7ZUBSP.mjs → Label.vue.es-CB6G8Krh.mjs} +3 -3
- package/dist/LoadFailedNotice.vue_vue_type_script_setup_true_lang-BZCtO2Er.mjs +20 -0
- package/dist/{Modal.vue.es-eeR9FmvQ.mjs → Modal.vue.es-CJFTVFSZ.mjs} +138 -127
- package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-D0pwpqIC.mjs +789 -0
- package/dist/{PaymentCompletedCard.vue_vue_type_script_setup_true_lang-CrjVPks0.mjs → PaymentCompletedCard.vue_vue_type_script_setup_true_lang-D08Qpgb0.mjs} +2 -2
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DyjzaTK1.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-dl52PYcq.mjs} +4 -4
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BHQrWy6r.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D0priVnA.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-CN42ewCn.mjs → PaymentHistoryBlock-BSXlneqM.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3Y5fHvA.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CXy0XGpn.mjs} +5 -5
- package/dist/{PaymentIntegrationForm-D3Ye7LZ5.mjs → PaymentIntegrationForm-Diua0GGJ.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CLlm_Q2j.mjs +161 -0
- package/dist/{PaymentIntegrationFormAdyen-Fm-diCCO.mjs → PaymentIntegrationFormAdyen-D4FP0Vj5.mjs} +302 -282
- package/dist/{PaymentIntegrationFormStripe-BANBL6za.mjs → PaymentIntegrationFormStripe-vFzF_sCJ.mjs} +126 -117
- package/dist/{PaymentMethod.vue.es-t3-VyoE8.mjs → PaymentMethod.vue.es-vs6SaZOh.mjs} +200 -150
- package/dist/{PaymentMethodForm-CqP3GoNj.mjs → PaymentMethodForm-Buhe0aRQ.mjs} +1 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-RPPdBw_e.mjs +165 -0
- package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-D5wmRuCf.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DprL5TR8.mjs} +7 -7
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DhkkiJaQ.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BXbevI3r.mjs} +28 -26
- package/dist/PaymentMethodsModal-CnJP9UKp.mjs +192 -0
- package/dist/PlanCustomizationEditor-KHLSEUbb.mjs +864 -0
- package/dist/{PortalLinkUnverified-Cp60_kRJ.mjs → PortalLinkUnverified-DlZAkE93.mjs} +3 -3
- package/dist/{PortalNotAvailable-DzSQnfzw.mjs → PortalNotAvailable-CKIomNrm.mjs} +2 -2
- package/dist/{PricingGroupRangeInput.vue.es-Srq_3cga.mjs → PricingGroupRangeInput.vue.es-oHD-IT12.mjs} +8 -8
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-oRijnVnZ.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-wCW8YZHM.mjs} +16 -15
- package/dist/{RadioGroupExtended.vue.es-BbBMDf6l.mjs → RadioGroupExtended.vue.es-DsShmkKZ.mjs} +5 -5
- package/dist/Section.vue.es-DYmEtgBj.mjs +88 -0
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-OM19NPBh.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CANXYTzu.mjs} +2 -2
- package/dist/ShippingAddressForm.vue_vue_type_script_setup_true_lang-CJp6ddhZ.mjs +144 -0
- package/dist/ShippingAddressesModal-Gxv2KxaW.mjs +283 -0
- package/dist/{StepInput.vue.es-ieh4EuJ7.mjs → StepInput.vue.es-sqA-VSsn.mjs} +4 -4
- package/dist/SubscriptionCancellationModal-DfAZ_uW6.mjs +4 -0
- package/dist/SubscriptionCancellationModal.vue_vue_type_script_setup_true_lang-BlbiDNIu.mjs +240 -0
- package/dist/SubscriptionCancellationSuccess.vue_vue_type_script_setup_true_lang-C1ko2xvR.mjs +64 -0
- package/dist/SubscriptionDetails.entry.ce-CdWV-8WN.mjs +764 -0
- package/dist/{SubscriptionSchedules-DMxX3GpK.mjs → SubscriptionSchedules-BfdVn1XA.mjs} +1 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C8q8Q6h5.mjs +5413 -0
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-qQ9gJOIs.mjs +90 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CHlXP_2x.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DYWjTzPV.mjs} +133 -108
- package/dist/Toggle.vue.es-S2g8WGY_.mjs +99 -0
- package/dist/{TooltipParagraph.vue.es-BES3zsYN.mjs → TooltipParagraph.vue.es-Bt-7LHr3.mjs} +18 -18
- package/dist/{TranslationOverride.vue_vue_type_script_setup_true_lang-BJmlNrXT.mjs → TranslationOverride.vue_vue_type_script_setup_true_lang-Cp_sFa52.mjs} +1 -1
- package/dist/TrialChip.vue.es-VZwQX079.mjs +47 -0
- package/dist/addonQuantity-D3bGVqjL.mjs +128 -0
- package/dist/adyen-CHgq2l6n.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 +1087 -1019
- 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-B8c354Nu.mjs} +802 -768
- package/dist/{customer-lf6S5DBR.mjs → customer-CP-Wz7JO.mjs} +1 -1
- package/dist/{de-DE-Cyj_NtiI.mjs → de-DE-C9HrzHpE.mjs} +71 -5
- package/dist/{de-DE-UJ6X6jXu.mjs → de-DE-DAQmgEy5.mjs} +82 -19
- package/dist/{formControl-BZQLHnOO.mjs → formControl-C18sw44K.mjs} +275 -275
- package/dist/{formatting.es-RclXHhKo.mjs → formatting.es-DlJEzreG.mjs} +16 -13
- package/dist/{fr-FR-CRFoWQ7J.mjs → fr-FR-CHR3VWvd.mjs} +71 -5
- package/dist/{fr-FR-Cvvbkwlj.mjs → fr-FR-fz51-Ubw.mjs} +79 -16
- package/dist/{countryData.es-BegoD-cZ.mjs → getCountryNameByCode.es-OGxn_zT0.mjs} +7 -2
- package/dist/icon-sprite.svg.es-2S3rv8NW.mjs +4 -0
- package/dist/index.es-Bv55VtdE.mjs +633 -0
- package/dist/{index.es-BrVTOW5D.mjs → index.es-C7J3WGGo.mjs} +4 -4
- package/dist/index.mjs +37 -33
- package/dist/invoices-I7PghcPV.mjs +143 -0
- package/dist/{it-IT-DnJP5URH.mjs → it-IT-BpCkTMZL.mjs} +73 -10
- package/dist/{it-IT-DObZEc-U.mjs → it-IT-Dzc7DmmL.mjs} +71 -5
- package/dist/{nl-NL-q9xfTZF0.mjs → nl-NL-22C8OcIM.mjs} +79 -16
- package/dist/{nl-NL-C02xHilF.mjs → nl-NL-Dut_QwsY.mjs} +71 -5
- package/dist/paymentIntegrationFormLoaders-BFMAMpcA.mjs +31 -0
- package/dist/{paymentMethods-8w-ccfY_.mjs → paymentMethods-aGKIi7DS.mjs} +22 -21
- package/dist/{paymentOutcome-B6sW1eCV.mjs → paymentOutcome-Cv7hTFVu.mjs} +1 -1
- package/dist/paymentRedirect-DaS8Kccc.mjs +66 -0
- package/dist/payments-BKoKpoLN.mjs +71 -0
- package/dist/preloadPaymentIntegrationForms-Buwal_JR.mjs +9 -0
- package/dist/pricing-Y-7ELzN-.mjs +42 -0
- package/dist/{pricingItem.es-bCPArbTa.mjs → pricingItem.es-BafitMMY.mjs} +1 -1
- package/dist/pricingPlanScheduleOverrides-CGm_-jJq.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 +1322 -0
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +209 -133
- package/dist/screens/PayInvoice/PayInvoice.mjs +283 -275
- 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/{subscription-BwzkagDI.mjs → subscription-DQ5mRp_e.mjs} +10 -10
- package/dist/subscriptions-B7dNqi1C.mjs +99 -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/components/wallets/AutoTopUpModal/AutoTopUpModal.types.d.ts +3 -1
- 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 +199 -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-BCtk-FGU.mjs} +1 -1
- package/dist/useAddressFormats-CtE4QaVU.mjs +1998 -0
- package/dist/useCheckoutForm-BhXcmnUi.mjs +3355 -0
- package/dist/{useCustomer-CTMhg1nd.mjs → useCustomer-mQysxUwp.mjs} +2 -2
- package/dist/useDefaultPaymentMethod-Dliq6_Yw.mjs +39 -0
- package/dist/useExperimentalFeature-Bw6bBtay.mjs +6 -0
- package/dist/useHostEvent-MtRG6W2B.mjs +12 -0
- package/dist/{useIncrementalLoading-CBVutPH8.mjs → useIncrementalLoading-CJSj1945.mjs} +2 -2
- package/dist/{useInvoiceData-qUGbBAQK.mjs → useInvoiceData-BEZIvw32.mjs} +2 -2
- package/dist/{useInvoicesList-wJvZAJpW.mjs → useInvoicesList-CrXjsmei.mjs} +140 -138
- package/dist/{sorting.es-C0pdMgX0.mjs → useIsMounted.es-BNPhTTHE.mjs} +11 -10
- package/dist/{useLoadInitialData-UvfYXgbi.mjs → useLoadInitialData-Bomj_1mo.mjs} +1 -1
- package/dist/usePaymentFormHold-CYZ4BdOw.mjs +19 -0
- package/dist/{usePaymentMethodAvailability-35l4pWdH.mjs → usePaymentMethodAvailability-DR_neLeZ.mjs} +4 -4
- package/dist/usePaymentMethodOptions-CuHoQx3K.mjs +67 -0
- package/dist/{usePaymentMethods-De7hlLHo.mjs → usePaymentMethods-BDdetXts.mjs} +2 -2
- package/dist/{usePayments-hWS7fnOx.mjs → usePayments-B5Z9Kfbv.mjs} +20 -18
- package/dist/usePortal-DuLR5Mid.mjs +14 -0
- package/dist/{useService-BwzIBIRp.mjs → useService-2aOFBTxU.mjs} +1 -1
- package/dist/useShippingAddresses-BvThNpez.mjs +122 -0
- package/dist/useSubscription-Dzo-kBpQ.mjs +35 -0
- package/dist/useSubscriptionActions-CWaNRoZ7.mjs +44 -0
- package/dist/useWatchDebounced-DkXgKe0E.mjs +20 -0
- package/dist/{wallets.es-eH2C2ygn.mjs → wallets.es-DRlUVd2R.mjs} +1 -1
- package/package.json +41 -11
- 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/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DJnr5D56.mjs +0 -2936
- 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/Section.vue.es-Oqn1wGPZ.mjs +0 -72
- package/dist/ShippingAddressesModal-c7nqf4Ny.mjs +0 -418
- package/dist/SubscriptionDetails.entry.ce-uYv45FGH.mjs +0 -1044
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DXro_64f.mjs +0 -5200
- 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/icon-sprite.svg.es-BWBB8SGw.mjs +0 -4
- 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,1044 +0,0 @@
|
|
|
1
|
-
import { computed as p, ref as N, defineComponent as F, openBlock as c, createBlock as g, unref as a, withCtx as u, createElementVNode as W, createVNode as S, createTextVNode as _, toDisplayString as y, createCommentVNode as v, createElementBlock as R, Fragment as Q, renderList as Z, watch as Y, defineAsyncComponent as H, toRef as ie, renderSlot as se, mergeProps as oe } from "vue";
|
|
2
|
-
import { _ as re } from "./Alert.vue.es-ZPG49yR_.mjs";
|
|
3
|
-
import { _ as z } from "./Button.vue.es-j7iYlqtJ.mjs";
|
|
4
|
-
import { _ as ee } from "./ErrorNotification.vue.es-F068p7PY.mjs";
|
|
5
|
-
import { a as j, d as $, e as q, g as le, h as ce, j as de } from "./customElements-DK4GKNJG.mjs";
|
|
6
|
-
import { C as ue } from "./ContentWithAsideLayout-Bnbsq8_5.mjs";
|
|
7
|
-
import { u as te } from "./useActionDispatchProvider-ChAHdwR8.mjs";
|
|
8
|
-
import { j as pe, k as me, l as ne, d as G, a as ge } from "./subscription-BwzkagDI.mjs";
|
|
9
|
-
import { a as be, u as fe } from "./CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DJnr5D56.mjs";
|
|
10
|
-
import { _ as he } from "./CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Jyb5ZN3s.mjs";
|
|
11
|
-
import { _ as ve } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-wPma8Os-.mjs";
|
|
12
|
-
import { _ as _e } from "./Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs";
|
|
13
|
-
import { _ as V } from "./Section.vue.es-Oqn1wGPZ.mjs";
|
|
14
|
-
import { a as ye, w as we, h as Se, u as Ce, g as Ie } from "./pricingPlanScheduleOverrides-BBp-DmpV.mjs";
|
|
15
|
-
import { g as Me } from "./pricing-CEaZGgKe.mjs";
|
|
16
|
-
import { u as Pe } from "./useTimePeriod.es-BUorDLVK.mjs";
|
|
17
|
-
import { f as X } from "./formatting.es-RclXHhKo.mjs";
|
|
18
|
-
import { _ as De } from "./PaymentMethod.vue.es-t3-VyoE8.mjs";
|
|
19
|
-
import { M as Oe } from "./Modal.vue.es-eeR9FmvQ.mjs";
|
|
20
|
-
import { c as $e } from "./subscriptions-B5bH8hsI.mjs";
|
|
21
|
-
import { a as Ae } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-BZNsqN4G.mjs";
|
|
22
|
-
import { A as ke } from "./ApiStatus-CSFKl_ra.mjs";
|
|
23
|
-
import { u as Ee } from "./useCustomer-CTMhg1nd.mjs";
|
|
24
|
-
import { u as Le } from "./usePaymentMethods-De7hlLHo.mjs";
|
|
25
|
-
import { u as xe } from "./useLoadInitialData-UvfYXgbi.mjs";
|
|
26
|
-
import { c as Te } from "./pricingPlanSchedules-DSMptcAh.mjs";
|
|
27
|
-
import { u as Be } from "./useService-BwzIBIRp.mjs";
|
|
28
|
-
import { g as K } from "./getComposedString.es-C__uhJpd.mjs";
|
|
29
|
-
import { g as ae } from "./pricing.es-QYWrKMUJ.mjs";
|
|
30
|
-
import { h as Ue } from "./pricingItemConfigs.es-D3pX_9AJ.mjs";
|
|
31
|
-
import { a as Ne } from "./paymentMethods-Goa25rTs.mjs";
|
|
32
|
-
const Fe = () => {
|
|
33
|
-
const { $t: e } = j();
|
|
34
|
-
return { getPriceLabel: (t) => {
|
|
35
|
-
if (!t.price)
|
|
36
|
-
return;
|
|
37
|
-
const n = X(t.price);
|
|
38
|
-
return t.priceType === "FIXED" ? n : e(
|
|
39
|
-
{
|
|
40
|
-
defaultMessage: "{price} per unit",
|
|
41
|
-
description: "The listed price of an on-demand item charged per unit",
|
|
42
|
-
id: "charge_on_demand.item.price_per_unit"
|
|
43
|
-
},
|
|
44
|
-
{ price: n }
|
|
45
|
-
);
|
|
46
|
-
} };
|
|
47
|
-
};
|
|
48
|
-
function je({
|
|
49
|
-
subscription: e
|
|
50
|
-
}) {
|
|
51
|
-
const { dispatchAction: i } = te(), t = p(
|
|
52
|
-
() => pe(e.value) && !me(e.value, "CANCEL")
|
|
53
|
-
), n = p(
|
|
54
|
-
() => !!ne(e.value)
|
|
55
|
-
), s = N();
|
|
56
|
-
return { isCancellable: t, isRenewable: n, pendingVariant: s, cancel: () => {
|
|
57
|
-
e.value && (s.value = "CANCEL");
|
|
58
|
-
}, renew: () => {
|
|
59
|
-
e.value && (s.value = "RENEW");
|
|
60
|
-
}, dismiss: () => {
|
|
61
|
-
s.value = void 0;
|
|
62
|
-
}, manage: (b) => {
|
|
63
|
-
e.value && i({
|
|
64
|
-
action: "manage-subscription",
|
|
65
|
-
data: {
|
|
66
|
-
subscriptionId: e.value.id,
|
|
67
|
-
...b && { enabledPricingId: b }
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
} };
|
|
71
|
-
}
|
|
72
|
-
function Re(e) {
|
|
73
|
-
var n, s, o, r, d, l, b;
|
|
74
|
-
const i = (o = (s = (n = e.items) == null ? void 0 : n[0]) == null ? void 0 : s.configs) == null ? void 0 : o[0], t = (d = (r = i == null ? void 0 : i.details) == null ? void 0 : r.bands) == null ? void 0 : d[0];
|
|
75
|
-
return {
|
|
76
|
-
amount: (t == null ? void 0 : t.amount) ?? (t == null ? void 0 : t.fixed_amount),
|
|
77
|
-
billingPeriod: ((l = i == null ? void 0 : i.details) == null ? void 0 : l.pricing_period) ?? ((b = i == null ? void 0 : i.details) == null ? void 0 : b.billing_period)
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
function Ve(e) {
|
|
81
|
-
var n;
|
|
82
|
-
const i = new Set(
|
|
83
|
-
ye(e.pricing_plan_schedule ?? {})
|
|
84
|
-
);
|
|
85
|
-
return i.size === 0 || !e.pricing_plan_version ? [] : (((n = we(e).pricing_categories) == null ? void 0 : n.flatMap(
|
|
86
|
-
(s) => s.pricing_groups ?? []
|
|
87
|
-
)) ?? []).flatMap(
|
|
88
|
-
(s) => (s.pricings ?? []).filter((o) => i.has(o.id)).map((o) => ({
|
|
89
|
-
pricingId: o.id,
|
|
90
|
-
pricingGroupId: s.id,
|
|
91
|
-
groupName: s.name,
|
|
92
|
-
// A pricing without a name of its own is only identifiable by the choice it belongs to.
|
|
93
|
-
name: Me(o) || s.name,
|
|
94
|
-
...Re(o)
|
|
95
|
-
}))
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
const We = { class: "sv-enabled-pricings-list__item-body flex items-center gap-4" }, Ye = { class: "sv-enabled-pricings-list__item-content grow" }, ze = /* @__PURE__ */ F({
|
|
99
|
-
__name: "EnabledPricingsListItem",
|
|
100
|
-
props: {
|
|
101
|
-
entry: { type: Object },
|
|
102
|
-
canUpgrade: { type: Boolean, default: !0 }
|
|
103
|
-
},
|
|
104
|
-
emits: ["upgrade"],
|
|
105
|
-
setup(e) {
|
|
106
|
-
const i = e, { $t: t } = j(), { formatTimePeriod: n } = Pe(), s = p(() => {
|
|
107
|
-
const { amount: o, billingPeriod: r } = i.entry;
|
|
108
|
-
if (o)
|
|
109
|
-
return r ? t(
|
|
110
|
-
{
|
|
111
|
-
defaultMessage: "{amount} per {period}",
|
|
112
|
-
id: "enabled_pricings_list.item.price",
|
|
113
|
-
description: 'The recurring price of an enabled pricing, e.g. "€ 100,00 per month"'
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
amount: X(o),
|
|
117
|
-
period: n(r, {
|
|
118
|
-
short: !0,
|
|
119
|
-
hideValueForExactPeriods: !0
|
|
120
|
-
})
|
|
121
|
-
}
|
|
122
|
-
) : X(o);
|
|
123
|
-
});
|
|
124
|
-
return (o, r) => (c(), g(a(V), { class: "sv-enabled-pricings-list__item" }, {
|
|
125
|
-
default: u(() => [
|
|
126
|
-
W("div", We, [
|
|
127
|
-
W("div", Ye, [
|
|
128
|
-
S(a($), {
|
|
129
|
-
tag: "span",
|
|
130
|
-
variant: "body-xs",
|
|
131
|
-
color: "subtle",
|
|
132
|
-
class: "sv-enabled-pricings-list__item-group"
|
|
133
|
-
}, {
|
|
134
|
-
default: u(() => [
|
|
135
|
-
_(y(e.entry.groupName), 1)
|
|
136
|
-
]),
|
|
137
|
-
_: 1
|
|
138
|
-
}),
|
|
139
|
-
S(a($), {
|
|
140
|
-
tag: "h3",
|
|
141
|
-
variant: "heading-3",
|
|
142
|
-
"no-spacing": "",
|
|
143
|
-
class: "sv-enabled-pricings-list__item-name"
|
|
144
|
-
}, {
|
|
145
|
-
default: u(() => [
|
|
146
|
-
_(y(e.entry.name), 1)
|
|
147
|
-
]),
|
|
148
|
-
_: 1
|
|
149
|
-
}),
|
|
150
|
-
s.value ? (c(), g(a($), {
|
|
151
|
-
key: 0,
|
|
152
|
-
tag: "span",
|
|
153
|
-
variant: "body-sm",
|
|
154
|
-
color: "subtle",
|
|
155
|
-
class: "sv-enabled-pricings-list__item-price"
|
|
156
|
-
}, {
|
|
157
|
-
default: u(() => [
|
|
158
|
-
_(y(s.value), 1)
|
|
159
|
-
]),
|
|
160
|
-
_: 1
|
|
161
|
-
})) : v("", !0)
|
|
162
|
-
]),
|
|
163
|
-
e.canUpgrade ? (c(), g(a(z), {
|
|
164
|
-
key: 0,
|
|
165
|
-
intent: "secondary",
|
|
166
|
-
class: "sv-action sv-action--secondary sv-enabled-pricings-list__item-upgrade shrink-0",
|
|
167
|
-
type: "button",
|
|
168
|
-
size: "xs",
|
|
169
|
-
onClick: r[0] || (r[0] = (d) => o.$emit("upgrade", e.entry))
|
|
170
|
-
}, {
|
|
171
|
-
default: u(() => [
|
|
172
|
-
_(y(a(t)({
|
|
173
|
-
defaultMessage: "Upgrade",
|
|
174
|
-
id: "enabled_pricings_list.item.upgrade_button.label",
|
|
175
|
-
description: "Label for the button that changes which pricing is enabled for a group"
|
|
176
|
-
})), 1)
|
|
177
|
-
]),
|
|
178
|
-
_: 1
|
|
179
|
-
})) : v("", !0)
|
|
180
|
-
])
|
|
181
|
-
]),
|
|
182
|
-
_: 1
|
|
183
|
-
}));
|
|
184
|
-
}
|
|
185
|
-
}), Xe = { class: "sv-enabled-pricings-list__items grid grid-cols-1 gap-2" }, qe = /* @__PURE__ */ F({
|
|
186
|
-
__name: "EnabledPricingsList",
|
|
187
|
-
props: {
|
|
188
|
-
pricingPlanSchedule: { type: Object }
|
|
189
|
-
},
|
|
190
|
-
emits: ["upgrade"],
|
|
191
|
-
setup(e) {
|
|
192
|
-
const i = e, { $t: t } = j(), n = p(() => Ve(i.pricingPlanSchedule)), s = p(
|
|
193
|
-
() => !Se(i.pricingPlanSchedule.pricing_plan_schedule)
|
|
194
|
-
);
|
|
195
|
-
return (o, r) => n.value.length > 0 ? (c(), g(a(V), {
|
|
196
|
-
key: 0,
|
|
197
|
-
class: "sv-enabled-pricings-list",
|
|
198
|
-
"content-background": "none",
|
|
199
|
-
"no-border": "",
|
|
200
|
-
"no-spacing": "",
|
|
201
|
-
title: a(t)({
|
|
202
|
-
defaultMessage: "Upgrades",
|
|
203
|
-
id: "enabled_pricings_list.title",
|
|
204
|
-
description: "Title for the block listing the pricings enabled on a subscription"
|
|
205
|
-
})
|
|
206
|
-
}, {
|
|
207
|
-
default: u(() => [
|
|
208
|
-
W("div", Xe, [
|
|
209
|
-
(c(!0), R(Q, null, Z(n.value, (d) => (c(), g(ze, {
|
|
210
|
-
key: d.pricingId,
|
|
211
|
-
entry: d,
|
|
212
|
-
"can-upgrade": s.value,
|
|
213
|
-
onUpgrade: r[0] || (r[0] = (l) => o.$emit("upgrade", l))
|
|
214
|
-
}, null, 8, ["entry", "can-upgrade"]))), 128))
|
|
215
|
-
])
|
|
216
|
-
]),
|
|
217
|
-
_: 1
|
|
218
|
-
}, 8, ["title"])) : v("", !0);
|
|
219
|
-
}
|
|
220
|
-
}), Ge = { class: "sv-on-demand-items-card__items grid grid-cols-1 gap-1" }, He = {
|
|
221
|
-
key: 0,
|
|
222
|
-
class: "sv-on-demand-items-card__more"
|
|
223
|
-
}, J = 2, Ke = /* @__PURE__ */ F({
|
|
224
|
-
__name: "OnDemandItemsCard",
|
|
225
|
-
props: {
|
|
226
|
-
items: { type: Array }
|
|
227
|
-
},
|
|
228
|
-
emits: ["order"],
|
|
229
|
-
setup(e) {
|
|
230
|
-
const i = e, { $t: t } = j(), { getPriceLabel: n } = Fe(), s = p(
|
|
231
|
-
() => i.items.slice(0, J).map((r) => ({
|
|
232
|
-
item: r,
|
|
233
|
-
priceLabel: n(r)
|
|
234
|
-
}))
|
|
235
|
-
), o = p(() => Math.max(i.items.length - J, 0));
|
|
236
|
-
return (r, d) => (c(), g(a(V), {
|
|
237
|
-
class: "sv-on-demand-items-card",
|
|
238
|
-
"content-background": "none",
|
|
239
|
-
"no-border": "",
|
|
240
|
-
"no-spacing": "",
|
|
241
|
-
title: a(t)({
|
|
242
|
-
defaultMessage: "Available on demand items",
|
|
243
|
-
id: "on_demand_items_card.title",
|
|
244
|
-
description: "Title for the block that offers the on-demand items of a subscription"
|
|
245
|
-
})
|
|
246
|
-
}, {
|
|
247
|
-
right: u(() => [
|
|
248
|
-
S(a(z), {
|
|
249
|
-
class: "sv-action sv-action--secondary sv-on-demand-items-card__order",
|
|
250
|
-
type: "button",
|
|
251
|
-
size: "sm",
|
|
252
|
-
intent: "secondary",
|
|
253
|
-
onClick: d[0] || (d[0] = (l) => r.$emit("order"))
|
|
254
|
-
}, {
|
|
255
|
-
default: u(() => [
|
|
256
|
-
_(y(a(t)({
|
|
257
|
-
defaultMessage: "Purchase",
|
|
258
|
-
id: "on_demand_items_card.order_button.label",
|
|
259
|
-
description: "Label for the button that opens the on-demand order form"
|
|
260
|
-
})), 1)
|
|
261
|
-
]),
|
|
262
|
-
_: 1
|
|
263
|
-
})
|
|
264
|
-
]),
|
|
265
|
-
default: u(() => [
|
|
266
|
-
W("ul", Ge, [
|
|
267
|
-
(c(!0), R(Q, null, Z(s.value, ({ item: l, priceLabel: b }) => (c(), R("li", {
|
|
268
|
-
key: l.pricingItemId,
|
|
269
|
-
class: "sv-on-demand-items-card__item"
|
|
270
|
-
}, [
|
|
271
|
-
S(a(V), {
|
|
272
|
-
"no-spacing": "",
|
|
273
|
-
"content-classes": "flex flex-col px-4 py-3"
|
|
274
|
-
}, {
|
|
275
|
-
default: u(() => [
|
|
276
|
-
S(a($), {
|
|
277
|
-
tag: "span",
|
|
278
|
-
weight: "semibold",
|
|
279
|
-
"no-spacing": "",
|
|
280
|
-
class: "sv-on-demand-items-card__item-name break-words"
|
|
281
|
-
}, {
|
|
282
|
-
default: u(() => [
|
|
283
|
-
_(y(l.name), 1)
|
|
284
|
-
]),
|
|
285
|
-
_: 2
|
|
286
|
-
}, 1024),
|
|
287
|
-
b ? (c(), g(a($), {
|
|
288
|
-
key: 0,
|
|
289
|
-
tag: "span",
|
|
290
|
-
variant: "body-sm",
|
|
291
|
-
color: "subtle",
|
|
292
|
-
"no-spacing": "",
|
|
293
|
-
class: "sv-on-demand-items-card__item-price"
|
|
294
|
-
}, {
|
|
295
|
-
default: u(() => [
|
|
296
|
-
_(y(b), 1)
|
|
297
|
-
]),
|
|
298
|
-
_: 2
|
|
299
|
-
}, 1024)) : v("", !0)
|
|
300
|
-
]),
|
|
301
|
-
_: 2
|
|
302
|
-
}, 1024)
|
|
303
|
-
]))), 128)),
|
|
304
|
-
o.value > 0 ? (c(), R("li", He, [
|
|
305
|
-
S(a(V), {
|
|
306
|
-
"no-spacing": "",
|
|
307
|
-
"content-classes": "px-4 py-3 text-center"
|
|
308
|
-
}, {
|
|
309
|
-
default: u(() => [
|
|
310
|
-
S(a($), {
|
|
311
|
-
tag: "span",
|
|
312
|
-
weight: "semibold",
|
|
313
|
-
color: "secondary",
|
|
314
|
-
"no-spacing": ""
|
|
315
|
-
}, {
|
|
316
|
-
default: u(() => [
|
|
317
|
-
_(y(a(t)(
|
|
318
|
-
{
|
|
319
|
-
defaultMessage: "+ {count} available",
|
|
320
|
-
id: "on_demand_items_card.more_available",
|
|
321
|
-
description: "Shown below the first on-demand items with the number of items not listed"
|
|
322
|
-
},
|
|
323
|
-
{ count: String(o.value) }
|
|
324
|
-
)), 1)
|
|
325
|
-
]),
|
|
326
|
-
_: 1
|
|
327
|
-
})
|
|
328
|
-
]),
|
|
329
|
-
_: 1
|
|
330
|
-
})
|
|
331
|
-
])) : v("", !0)
|
|
332
|
-
])
|
|
333
|
-
]),
|
|
334
|
-
_: 1
|
|
335
|
-
}, 8, ["title"]));
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
function Je({
|
|
339
|
-
variant: e,
|
|
340
|
-
renewableUntil: i,
|
|
341
|
-
billingPeriodEndsAt: t
|
|
342
|
-
}) {
|
|
343
|
-
const { $t: n } = j(), s = p(() => e.value === "RENEW"), o = p(
|
|
344
|
-
() => s.value ? n({
|
|
345
|
-
defaultMessage: "Renew subscription",
|
|
346
|
-
description: "Title of the renew subscription confirmation modal",
|
|
347
|
-
id: "subscription_cancellation_modal.renew.title"
|
|
348
|
-
}) : n({
|
|
349
|
-
defaultMessage: "Cancel subscription",
|
|
350
|
-
description: "Title of the cancel subscription confirmation modal",
|
|
351
|
-
id: "subscription_cancellation_modal.cancel.title"
|
|
352
|
-
})
|
|
353
|
-
), r = p(() => s.value ? i.value ? n(
|
|
354
|
-
{
|
|
355
|
-
defaultMessage: "You can renew your subscription until {date}. After this period you can only create a new subscription.",
|
|
356
|
-
description: "Explanation of the deadline for undoing a cancellation, shown in the renew subscription modal",
|
|
357
|
-
id: "subscription_cancellation_modal.renew.explanation_with_date"
|
|
358
|
-
},
|
|
359
|
-
{ date: i.value }
|
|
360
|
-
) : n({
|
|
361
|
-
defaultMessage: "Your subscription will continue as before, and billing will resume on its usual schedule.",
|
|
362
|
-
description: "Explanation of what happens when a cancellation is undone, shown in the renew subscription modal when no end date is known",
|
|
363
|
-
id: "subscription_cancellation_modal.renew.explanation"
|
|
364
|
-
}) : t.value ? n(
|
|
365
|
-
{
|
|
366
|
-
defaultMessage: "Your subscription will be canceled, but you’ll continue to have access until {date}.",
|
|
367
|
-
description: "Explanation of what happens when a running subscription is cancelled, naming the date access ends, shown in the cancel subscription modal",
|
|
368
|
-
id: "subscription_cancellation_modal.cancel.explanation_with_date"
|
|
369
|
-
},
|
|
370
|
-
{ date: t.value }
|
|
371
|
-
) : n({
|
|
372
|
-
defaultMessage: "Your subscription will be canceled, but you’ll continue to have access until the end of the billing period.",
|
|
373
|
-
description: "Explanation of what happens when a running subscription is cancelled, shown in the cancel subscription modal",
|
|
374
|
-
id: "subscription_cancellation_modal.cancel.explanation"
|
|
375
|
-
})), d = p(
|
|
376
|
-
() => s.value ? n({
|
|
377
|
-
defaultMessage: "Renew subscription",
|
|
378
|
-
description: "Label of the confirm button in the renew subscription modal",
|
|
379
|
-
id: "subscription_cancellation_modal.renew.confirm_button.label"
|
|
380
|
-
}) : n({
|
|
381
|
-
defaultMessage: "Cancel subscription",
|
|
382
|
-
description: "Label of the confirm button in the cancel subscription modal",
|
|
383
|
-
id: "subscription_cancellation_modal.cancel.confirm_button.label"
|
|
384
|
-
})
|
|
385
|
-
), l = p(
|
|
386
|
-
() => s.value ? n({
|
|
387
|
-
defaultMessage: "Cancel",
|
|
388
|
-
description: "Label of the button that dismisses the cancellation modal",
|
|
389
|
-
id: "subscription_cancellation_modal.cancel_button.label"
|
|
390
|
-
}) : n({
|
|
391
|
-
defaultMessage: "Keep subscription",
|
|
392
|
-
description: "Label of the button that dismisses the cancel subscription modal without cancelling",
|
|
393
|
-
id: "subscription_cancellation_modal.cancel.keep_button.label"
|
|
394
|
-
})
|
|
395
|
-
), b = p(
|
|
396
|
-
() => s.value ? n({
|
|
397
|
-
defaultMessage: "We could not renew your subscription. Please try again.",
|
|
398
|
-
description: "Error shown when undoing a cancellation fails",
|
|
399
|
-
id: "subscription_cancellation_modal.renew.error"
|
|
400
|
-
}) : n({
|
|
401
|
-
defaultMessage: "We could not cancel your subscription. Please try again.",
|
|
402
|
-
description: "Error shown when cancelling a subscription fails",
|
|
403
|
-
id: "subscription_cancellation_modal.cancel.error"
|
|
404
|
-
})
|
|
405
|
-
);
|
|
406
|
-
return { title: o, explanation: r, confirmButtonText: d, cancelButtonText: l, errorMessage: b };
|
|
407
|
-
}
|
|
408
|
-
const Qe = { class: "sv-subscription-cancellation-modal sv-subscription-cancellation-modal__body flex flex-col gap-3" }, Ze = {
|
|
409
|
-
key: 0,
|
|
410
|
-
class: "sv-subscription-cancellation-modal__meta flex flex-wrap items-center gap-x-6 gap-y-2 px-3 pb-2"
|
|
411
|
-
}, et = {
|
|
412
|
-
key: 0,
|
|
413
|
-
class: "sv-subscription-cancellation-modal__renews flex gap-1"
|
|
414
|
-
}, tt = /* @__PURE__ */ F({
|
|
415
|
-
__name: "SubscriptionCancellationModal",
|
|
416
|
-
props: {
|
|
417
|
-
showModal: { type: Boolean },
|
|
418
|
-
variant: { type: null },
|
|
419
|
-
subscription: { type: Object },
|
|
420
|
-
customer: { type: Object },
|
|
421
|
-
paymentMethod: { type: Object },
|
|
422
|
-
avatar: { type: String }
|
|
423
|
-
},
|
|
424
|
-
emits: ["confirmed", "close"],
|
|
425
|
-
setup(e, { emit: i }) {
|
|
426
|
-
const t = e, n = i, { $t: s, formatDate: o } = j(), r = q(), { setSubscriptionCancellation: d } = $e(), l = N(t.variant);
|
|
427
|
-
Y(
|
|
428
|
-
() => t.variant,
|
|
429
|
-
(f) => {
|
|
430
|
-
f && (l.value = f);
|
|
431
|
-
}
|
|
432
|
-
);
|
|
433
|
-
const b = (f) => {
|
|
434
|
-
var h;
|
|
435
|
-
const P = (h = t.customer) == null ? void 0 : h.timezone;
|
|
436
|
-
return o(P ? { date: f, format: "date", offsetType: "offsetted", timezone: P } : { date: f, format: "date", offsetType: "local" });
|
|
437
|
-
}, C = p(() => {
|
|
438
|
-
const f = ne(t.subscription);
|
|
439
|
-
return f ? b(f.start_at) : void 0;
|
|
440
|
-
}), k = p(() => {
|
|
441
|
-
var P, h;
|
|
442
|
-
const f = (h = (P = t.subscription) == null ? void 0 : P.next_invoice) == null ? void 0 : h.invoice_date;
|
|
443
|
-
return f ? b(f) : void 0;
|
|
444
|
-
}), O = k, T = p(
|
|
445
|
-
() => {
|
|
446
|
-
var f, P, h;
|
|
447
|
-
return (((h = (P = G(((f = t.subscription) == null ? void 0 : f.pricing_plan_schedule_infos) ?? [])) == null ? void 0 : P.pricing_plan_schedule) == null ? void 0 : h.enabled_pricings) ?? []).map(({ pricing_id: m }) => m).filter((m) => !!m);
|
|
448
|
-
}
|
|
449
|
-
), { title: B, explanation: I, confirmButtonText: A, cancelButtonText: E, errorMessage: L } = Je({ variant: l, renewableUntil: C, billingPeriodEndsAt: k }), w = N(!1), x = N(!1);
|
|
450
|
-
Y(
|
|
451
|
-
() => t.showModal,
|
|
452
|
-
(f) => {
|
|
453
|
-
f && (x.value = !1);
|
|
454
|
-
}
|
|
455
|
-
);
|
|
456
|
-
const U = async () => {
|
|
457
|
-
if (!(!t.subscription || !t.variant || w.value)) {
|
|
458
|
-
w.value = !0, x.value = !1;
|
|
459
|
-
try {
|
|
460
|
-
await d({
|
|
461
|
-
id: t.subscription.id,
|
|
462
|
-
variant: t.variant
|
|
463
|
-
}), n("confirmed"), n("close");
|
|
464
|
-
} catch (f) {
|
|
465
|
-
r.error(
|
|
466
|
-
"SUBSCRIPTION_CANCELLATION_FAILED",
|
|
467
|
-
"Failed to change the cancellation state of a subscription",
|
|
468
|
-
{ variant: t.variant },
|
|
469
|
-
f
|
|
470
|
-
), x.value = !0;
|
|
471
|
-
} finally {
|
|
472
|
-
w.value = !1;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}, M = () => {
|
|
476
|
-
w.value || n("close");
|
|
477
|
-
};
|
|
478
|
-
return (f, P) => (c(), g(a(Oe), {
|
|
479
|
-
size: "md",
|
|
480
|
-
"show-modal": e.showModal,
|
|
481
|
-
title: a(B),
|
|
482
|
-
"confirm-button-text": a(A),
|
|
483
|
-
"cancel-button-text": a(E),
|
|
484
|
-
"is-loading": w.value,
|
|
485
|
-
"no-click-away": w.value,
|
|
486
|
-
"no-backdrop-close": w.value,
|
|
487
|
-
onConfirm: U,
|
|
488
|
-
onClose: M
|
|
489
|
-
}, {
|
|
490
|
-
body: u(() => [
|
|
491
|
-
W("div", Qe, [
|
|
492
|
-
S(a($), {
|
|
493
|
-
variant: "body-sm",
|
|
494
|
-
color: "subtle",
|
|
495
|
-
tag: "p",
|
|
496
|
-
class: "sv-subscription-cancellation-modal__explanation"
|
|
497
|
-
}, {
|
|
498
|
-
default: u(() => [
|
|
499
|
-
_(y(a(I)), 1)
|
|
500
|
-
]),
|
|
501
|
-
_: 1
|
|
502
|
-
}),
|
|
503
|
-
e.subscription ? (c(), g(a(V), {
|
|
504
|
-
key: 0,
|
|
505
|
-
"no-spacing": "",
|
|
506
|
-
class: "sv-subscription-cancellation-modal__subscription"
|
|
507
|
-
}, {
|
|
508
|
-
default: u(() => [
|
|
509
|
-
S(Ae, {
|
|
510
|
-
subscription: e.subscription,
|
|
511
|
-
avatar: e.avatar,
|
|
512
|
-
"enabled-pricing-ids": T.value
|
|
513
|
-
}, null, 8, ["subscription", "avatar", "enabled-pricing-ids"]),
|
|
514
|
-
a(O) || e.paymentMethod ? (c(), R("div", Ze, [
|
|
515
|
-
a(O) ? (c(), R("div", et, [
|
|
516
|
-
S(a($), {
|
|
517
|
-
tag: "span",
|
|
518
|
-
variant: "body-xs",
|
|
519
|
-
color: "secondary",
|
|
520
|
-
weight: "semibold"
|
|
521
|
-
}, {
|
|
522
|
-
default: u(() => [
|
|
523
|
-
_(y(a(s)({
|
|
524
|
-
defaultMessage: "Renews",
|
|
525
|
-
description: "Label before the date the subscription renews, shown in the cancel subscription modal",
|
|
526
|
-
id: "subscription_cancellation_modal.renews_label"
|
|
527
|
-
})), 1)
|
|
528
|
-
]),
|
|
529
|
-
_: 1
|
|
530
|
-
}),
|
|
531
|
-
S(a($), {
|
|
532
|
-
tag: "span",
|
|
533
|
-
variant: "body-xs",
|
|
534
|
-
color: "secondary"
|
|
535
|
-
}, {
|
|
536
|
-
default: u(() => [
|
|
537
|
-
_(y(a(O)), 1)
|
|
538
|
-
]),
|
|
539
|
-
_: 1
|
|
540
|
-
})
|
|
541
|
-
])) : v("", !0),
|
|
542
|
-
e.paymentMethod ? (c(), g(a(De), {
|
|
543
|
-
key: 1,
|
|
544
|
-
variant: "condensed",
|
|
545
|
-
class: "sv-subscription-cancellation-modal__payment-method",
|
|
546
|
-
"payment-method": e.paymentMethod
|
|
547
|
-
}, null, 8, ["payment-method"])) : v("", !0)
|
|
548
|
-
])) : v("", !0)
|
|
549
|
-
]),
|
|
550
|
-
_: 1
|
|
551
|
-
})) : v("", !0),
|
|
552
|
-
x.value ? (c(), g(a(ee), {
|
|
553
|
-
key: 1,
|
|
554
|
-
class: "sv-subscription-cancellation-modal__error sv-error",
|
|
555
|
-
title: a(L)
|
|
556
|
-
}, null, 8, ["title"])) : v("", !0)
|
|
557
|
-
])
|
|
558
|
-
]),
|
|
559
|
-
_: 1
|
|
560
|
-
}, 8, ["show-modal", "title", "confirm-button-text", "cancel-button-text", "is-loading", "no-click-away", "no-backdrop-close"]));
|
|
561
|
-
}
|
|
562
|
-
}), nt = { class: "sv-subscription-details__header flex flex-col gap-2 md:flex-row md:items-center" }, at = /* @__PURE__ */ F({
|
|
563
|
-
__name: "SubscriptionDetails",
|
|
564
|
-
props: {
|
|
565
|
-
subscription: { type: Object },
|
|
566
|
-
schedulesData: { type: Array },
|
|
567
|
-
customer: { type: Object },
|
|
568
|
-
paymentMethods: { type: Array },
|
|
569
|
-
walletBalances: { default: () => [], type: Array },
|
|
570
|
-
onDemandItems: { default: () => [], type: Array },
|
|
571
|
-
onDemandScheduleId: { type: String },
|
|
572
|
-
hasWalletBalancesError: { type: Boolean },
|
|
573
|
-
avatar: { type: String },
|
|
574
|
-
canViewCreatedInvoice: { type: Boolean },
|
|
575
|
-
isLoading: { type: Boolean },
|
|
576
|
-
error: { type: null }
|
|
577
|
-
},
|
|
578
|
-
emits: ["top-up-charged", "auto-top-up-saved", "auto-top-up-cancelled", "payment-method-stored", "subscription-changed", "invoice-created"],
|
|
579
|
-
setup(e, { emit: i }) {
|
|
580
|
-
const t = H(
|
|
581
|
-
() => import("./SubscriptionSchedules-DMxX3GpK.mjs")
|
|
582
|
-
), n = H(
|
|
583
|
-
() => import("./ChargeOnDemandModal-CR01PkP_.mjs")
|
|
584
|
-
), s = e, o = i, { dispatchAction: r } = te(), { $t: d } = j(), {
|
|
585
|
-
isCancellable: l,
|
|
586
|
-
isRenewable: b,
|
|
587
|
-
pendingVariant: C,
|
|
588
|
-
cancel: k,
|
|
589
|
-
renew: O,
|
|
590
|
-
dismiss: T,
|
|
591
|
-
manage: B
|
|
592
|
-
} = je({ subscription: ie(s, "subscription") }), I = N();
|
|
593
|
-
Y(C, (h) => {
|
|
594
|
-
h && (I.value = void 0);
|
|
595
|
-
});
|
|
596
|
-
const A = () => {
|
|
597
|
-
I.value = C.value, o("subscription-changed");
|
|
598
|
-
}, E = p(() => {
|
|
599
|
-
if (I.value)
|
|
600
|
-
return I.value === "RENEW" ? d({
|
|
601
|
-
defaultMessage: "Your subscription has been renewed.",
|
|
602
|
-
id: "subscription_details.renew_success",
|
|
603
|
-
description: "Confirmation shown after a cancellation has been undone"
|
|
604
|
-
}) : d({
|
|
605
|
-
defaultMessage: "Your subscription has been cancelled. You keep access until the end of the billing period.",
|
|
606
|
-
id: "subscription_details.cancel_success",
|
|
607
|
-
description: "Confirmation shown after a subscription has been cancelled"
|
|
608
|
-
});
|
|
609
|
-
}), L = p(
|
|
610
|
-
() => {
|
|
611
|
-
var h;
|
|
612
|
-
return G(((h = s.subscription) == null ? void 0 : h.pricing_plan_schedule_infos) ?? []);
|
|
613
|
-
}
|
|
614
|
-
), w = p(
|
|
615
|
-
() => (s.paymentMethods ?? []).find(({ id: h }) => {
|
|
616
|
-
var m;
|
|
617
|
-
return h === ((m = s.subscription) == null ? void 0 : m.payment_method_id);
|
|
618
|
-
})
|
|
619
|
-
), x = p(() => s.subscription ? [s.subscription] : []), U = N(!1), M = N(!1), f = () => {
|
|
620
|
-
M.value = !0, U.value = !0;
|
|
621
|
-
}, P = p(
|
|
622
|
-
() => ge({
|
|
623
|
-
subscription: s.subscription,
|
|
624
|
-
fallback: d({
|
|
625
|
-
defaultMessage: "Subscription details",
|
|
626
|
-
id: "subscription_details.title",
|
|
627
|
-
description: "Title for the subscription details page"
|
|
628
|
-
})
|
|
629
|
-
})
|
|
630
|
-
);
|
|
631
|
-
return (h, m) => (c(), g(a(ue), { class: "sv-subscription-details sv-root sv-screen" }, {
|
|
632
|
-
header: u(() => [
|
|
633
|
-
W("div", nt, [
|
|
634
|
-
S(a($), {
|
|
635
|
-
variant: "heading-2",
|
|
636
|
-
tag: "h1",
|
|
637
|
-
class: "sv-subscription-details__title grow"
|
|
638
|
-
}, {
|
|
639
|
-
default: u(() => [
|
|
640
|
-
_(y(P.value), 1)
|
|
641
|
-
]),
|
|
642
|
-
_: 1
|
|
643
|
-
}),
|
|
644
|
-
a(b) ? (c(), g(a(z), {
|
|
645
|
-
key: 0,
|
|
646
|
-
intent: "secondary",
|
|
647
|
-
class: "sv-action sv-action--secondary sv-subscription-details__renew w-full md:w-auto",
|
|
648
|
-
type: "button",
|
|
649
|
-
onClick: a(O)
|
|
650
|
-
}, {
|
|
651
|
-
default: u(() => [
|
|
652
|
-
_(y(a(d)({
|
|
653
|
-
defaultMessage: "Renew subscription",
|
|
654
|
-
id: "subscription_details.renew_button.label",
|
|
655
|
-
description: "Label for the renew subscription button on the subscription details page"
|
|
656
|
-
})), 1)
|
|
657
|
-
]),
|
|
658
|
-
_: 1
|
|
659
|
-
}, 8, ["onClick"])) : v("", !0),
|
|
660
|
-
a(l) ? (c(), g(a(z), {
|
|
661
|
-
key: 1,
|
|
662
|
-
intent: "secondary",
|
|
663
|
-
class: "sv-action sv-action--secondary sv-subscription-details__cancel w-full md:w-auto",
|
|
664
|
-
type: "button",
|
|
665
|
-
onClick: a(k)
|
|
666
|
-
}, {
|
|
667
|
-
default: u(() => [
|
|
668
|
-
_(y(a(d)({
|
|
669
|
-
defaultMessage: "Cancel subscription",
|
|
670
|
-
id: "subscription_details.cancel_button.label",
|
|
671
|
-
description: "Label for the cancel subscription button on the subscription details page"
|
|
672
|
-
})), 1)
|
|
673
|
-
]),
|
|
674
|
-
_: 1
|
|
675
|
-
}, 8, ["onClick"])) : v("", !0)
|
|
676
|
-
])
|
|
677
|
-
]),
|
|
678
|
-
content: u(() => [
|
|
679
|
-
E.value ? (c(), g(a(re), {
|
|
680
|
-
key: 0,
|
|
681
|
-
class: "sv-subscription-details__cancellation-success",
|
|
682
|
-
type: "success",
|
|
683
|
-
title: E.value
|
|
684
|
-
}, null, 8, ["title"])) : v("", !0),
|
|
685
|
-
e.error ? (c(), g(a(ee), {
|
|
686
|
-
key: 1,
|
|
687
|
-
class: "sv-subscription-details__error sv-error",
|
|
688
|
-
title: a(d)({
|
|
689
|
-
defaultMessage: "Unable to load this subscription. Please try again later.",
|
|
690
|
-
id: "subscription_details.load_error",
|
|
691
|
-
description: "Error message shown when the subscription cannot be loaded on the subscription details page"
|
|
692
|
-
})
|
|
693
|
-
}, null, 8, ["title"])) : e.isLoading ? (c(), g(_e, {
|
|
694
|
-
key: 2,
|
|
695
|
-
variant: "section",
|
|
696
|
-
class: "min-h-[220px]"
|
|
697
|
-
})) : e.subscription ? (c(), g(a(t), {
|
|
698
|
-
key: 3,
|
|
699
|
-
class: "sv-subscription-details__schedules",
|
|
700
|
-
"schedules-data": e.schedulesData ?? []
|
|
701
|
-
}, null, 8, ["schedules-data"])) : (c(), g(ve, {
|
|
702
|
-
key: 4,
|
|
703
|
-
class: "sv-subscription-details__empty-state",
|
|
704
|
-
icon: "receipt_long"
|
|
705
|
-
}, {
|
|
706
|
-
title: u(() => [
|
|
707
|
-
_(y(a(d)({
|
|
708
|
-
defaultMessage: "Subscription not found",
|
|
709
|
-
id: "subscription_details.empty_state.title",
|
|
710
|
-
description: "Title shown when the requested subscription does not exist"
|
|
711
|
-
})), 1)
|
|
712
|
-
]),
|
|
713
|
-
message: u(() => [
|
|
714
|
-
_(y(a(d)({
|
|
715
|
-
defaultMessage: "This subscription is no longer available.",
|
|
716
|
-
id: "subscription_details.empty_state.message",
|
|
717
|
-
description: "Message shown when the requested subscription does not exist"
|
|
718
|
-
})), 1)
|
|
719
|
-
]),
|
|
720
|
-
_: 1
|
|
721
|
-
}))
|
|
722
|
-
]),
|
|
723
|
-
aside: u(() => [
|
|
724
|
-
S(be, {
|
|
725
|
-
class: "sv-subscription-details__wallet-balances",
|
|
726
|
-
"has-error": !!e.hasWalletBalancesError,
|
|
727
|
-
"is-loading": e.isLoading,
|
|
728
|
-
"wallet-balances": e.walletBalances,
|
|
729
|
-
"show-top-up-button": "",
|
|
730
|
-
customer: e.customer,
|
|
731
|
-
"payment-methods": e.paymentMethods,
|
|
732
|
-
subscriptions: x.value,
|
|
733
|
-
onTopUpCharged: m[0] || (m[0] = (D) => h.$emit("top-up-charged")),
|
|
734
|
-
onAutoTopUpSaved: m[1] || (m[1] = (D) => h.$emit("auto-top-up-saved")),
|
|
735
|
-
onAutoTopUpCancelled: m[2] || (m[2] = (D) => h.$emit("auto-top-up-cancelled")),
|
|
736
|
-
onPaymentMethodStored: m[3] || (m[3] = (D) => h.$emit("payment-method-stored"))
|
|
737
|
-
}, null, 8, ["has-error", "is-loading", "wallet-balances", "customer", "payment-methods", "subscriptions"]),
|
|
738
|
-
!e.isLoading && e.onDemandItems.length > 0 ? (c(), g(Ke, {
|
|
739
|
-
key: 0,
|
|
740
|
-
items: e.onDemandItems,
|
|
741
|
-
class: "sv-subscription-details__on-demand-items",
|
|
742
|
-
onOrder: f
|
|
743
|
-
}, null, 8, ["items"])) : v("", !0),
|
|
744
|
-
L.value ? (c(), g(qe, {
|
|
745
|
-
key: 1,
|
|
746
|
-
class: "sv-subscription-details__upgrades",
|
|
747
|
-
"pricing-plan-schedule": L.value,
|
|
748
|
-
onUpgrade: m[4] || (m[4] = (D) => a(B)(D.pricingId))
|
|
749
|
-
}, null, 8, ["pricing-plan-schedule"])) : v("", !0),
|
|
750
|
-
w.value ? (c(), g(he, {
|
|
751
|
-
key: 2,
|
|
752
|
-
class: "sv-subscription-details__payment-method",
|
|
753
|
-
"is-loading": e.isLoading,
|
|
754
|
-
"payment-methods": [w.value],
|
|
755
|
-
configuration: { showViewAllButton: !1, showAddButton: !1 }
|
|
756
|
-
}, null, 8, ["is-loading", "payment-methods"])) : v("", !0),
|
|
757
|
-
M.value && e.subscription && e.onDemandScheduleId ? (c(), g(a(n), {
|
|
758
|
-
key: 3,
|
|
759
|
-
"show-modal": U.value,
|
|
760
|
-
subscription: e.subscription,
|
|
761
|
-
"schedule-id": e.onDemandScheduleId,
|
|
762
|
-
items: e.onDemandItems,
|
|
763
|
-
customer: e.customer,
|
|
764
|
-
"payment-methods": e.paymentMethods,
|
|
765
|
-
"can-view-created-invoice": e.canViewCreatedInvoice,
|
|
766
|
-
onClose: m[5] || (m[5] = (D) => U.value = !1),
|
|
767
|
-
onPaymentMethodStored: m[6] || (m[6] = (D) => h.$emit("payment-method-stored")),
|
|
768
|
-
onInvoiceCreated: m[7] || (m[7] = (D) => h.$emit("invoice-created", D)),
|
|
769
|
-
onViewInvoice: m[8] || (m[8] = (D) => a(r)({ action: "view-invoice", data: { invoiceId: D } }))
|
|
770
|
-
}, null, 8, ["show-modal", "subscription", "schedule-id", "items", "customer", "payment-methods", "can-view-created-invoice"])) : v("", !0),
|
|
771
|
-
S(tt, {
|
|
772
|
-
"show-modal": !!a(C),
|
|
773
|
-
variant: a(C),
|
|
774
|
-
subscription: e.subscription,
|
|
775
|
-
customer: e.customer,
|
|
776
|
-
"payment-method": w.value,
|
|
777
|
-
avatar: e.avatar,
|
|
778
|
-
onConfirmed: A,
|
|
779
|
-
onClose: a(T)
|
|
780
|
-
}, null, 8, ["show-modal", "variant", "subscription", "customer", "payment-method", "avatar", "onClose"])
|
|
781
|
-
]),
|
|
782
|
-
_: 1
|
|
783
|
-
}));
|
|
784
|
-
}
|
|
785
|
-
}), it = ["FIXED", "FLAT"], st = (e, i) => {
|
|
786
|
-
var n;
|
|
787
|
-
const t = (n = e.details.bands) == null ? void 0 : n[0];
|
|
788
|
-
return i === "FIXED" ? t == null ? void 0 : t.fixed_amount : t == null ? void 0 : t.amount;
|
|
789
|
-
}, ot = (e) => typeof e == "number" && Number.isInteger(e) && e >= 1, rt = (e) => {
|
|
790
|
-
var t;
|
|
791
|
-
const i = Number((t = e.default_units) == null ? void 0 : t.number);
|
|
792
|
-
return ot(i) ? i : 1;
|
|
793
|
-
}, lt = (e) => {
|
|
794
|
-
const i = e.flatMap(ae);
|
|
795
|
-
return {
|
|
796
|
-
productItems: new Map(
|
|
797
|
-
i.flatMap((t) => t.items ?? []).flatMap((t) => t.product_items ?? []).map(({ id: t, name: n }) => [t, n])
|
|
798
|
-
),
|
|
799
|
-
products: new Map(
|
|
800
|
-
i.flatMap((t) => t.products ?? []).map(({ id: t, name: n }) => [t, n])
|
|
801
|
-
)
|
|
802
|
-
};
|
|
803
|
-
}, ct = (e, i, t) => K(i.product_item_ids.map((n) => t.productItems.get(n))) || e.name || K(e.product_ids.map((n) => t.products.get(n))) || "", dt = (e, i, t) => {
|
|
804
|
-
var o, r;
|
|
805
|
-
const n = (o = i.configs) == null ? void 0 : o.find((d) => d.on_demand);
|
|
806
|
-
if (!n || (r = n.wallet_grants) != null && r.length || !Ue(n, it))
|
|
807
|
-
return;
|
|
808
|
-
const s = n.details.pricing_type === "FIXED" ? "FIXED" : "FLAT";
|
|
809
|
-
return {
|
|
810
|
-
pricingItemId: i.id,
|
|
811
|
-
pricingItemConfigId: n.id,
|
|
812
|
-
name: ct(e, i, t),
|
|
813
|
-
priceType: s,
|
|
814
|
-
price: st(n, s),
|
|
815
|
-
defaultUnits: rt(n)
|
|
816
|
-
};
|
|
817
|
-
}, ut = (e, {
|
|
818
|
-
pricingPlanVersions: i = []
|
|
819
|
-
} = {}) => {
|
|
820
|
-
const t = lt(i);
|
|
821
|
-
return ae(e).flatMap(
|
|
822
|
-
(n) => (n.items ?? []).flatMap(
|
|
823
|
-
(s) => dt(n, s, t) ?? []
|
|
824
|
-
)
|
|
825
|
-
);
|
|
826
|
-
}, qt = (e, i) => {
|
|
827
|
-
const t = new Set(
|
|
828
|
-
(i.payment_acceptors ?? []).flatMap(
|
|
829
|
-
(n) => {
|
|
830
|
-
var s;
|
|
831
|
-
return ((s = n.payment_gateway) == null ? void 0 : s.integration_id) ?? [];
|
|
832
|
-
}
|
|
833
|
-
)
|
|
834
|
-
);
|
|
835
|
-
return e.filter(
|
|
836
|
-
(n) => Ne(n) && !!n.integration_id && t.has(n.integration_id)
|
|
837
|
-
).sort(
|
|
838
|
-
(n, s) => +(s.id === i.payment_method_id) - +(n.id === i.payment_method_id)
|
|
839
|
-
);
|
|
840
|
-
}, Gt = (e, i) => e.flatMap(({ pricingItemId: t, units: n }) => {
|
|
841
|
-
const s = i.find((o) => o.pricingItemId === t);
|
|
842
|
-
return s ? s.priceType === "FLAT" && n !== void 0 ? [{ pricing_item_id: t, units: { number: String(n) } }] : [{ pricing_item_id: t }] : [];
|
|
843
|
-
});
|
|
844
|
-
function pt({
|
|
845
|
-
subscription: e
|
|
846
|
-
}) {
|
|
847
|
-
const { getOnDemandPricingItems: i } = Te(), t = q(), { data: n, execute: s } = Be({ service: i }), o = p(
|
|
848
|
-
() => {
|
|
849
|
-
var l;
|
|
850
|
-
return ((l = e.value) == null ? void 0 : l.variant) === "DEFAULT" ? G(e.value.pricing_plan_schedule_infos) : void 0;
|
|
851
|
-
}
|
|
852
|
-
), r = p(() => {
|
|
853
|
-
var l;
|
|
854
|
-
return (l = o.value) == null ? void 0 : l.id;
|
|
855
|
-
});
|
|
856
|
-
return Y(
|
|
857
|
-
r,
|
|
858
|
-
(l) => {
|
|
859
|
-
l && s({ scheduleId: l }).catch(
|
|
860
|
-
(b) => t.error(
|
|
861
|
-
"ON_DEMAND_ITEMS_LOAD_FAILED",
|
|
862
|
-
"Failed to load the on-demand items of the subscription",
|
|
863
|
-
{ scheduleId: l },
|
|
864
|
-
b
|
|
865
|
-
)
|
|
866
|
-
);
|
|
867
|
-
},
|
|
868
|
-
{ immediate: !0 }
|
|
869
|
-
), { items: p(
|
|
870
|
-
() => {
|
|
871
|
-
var l, b;
|
|
872
|
-
return r.value && ((l = n.value) == null ? void 0 : l.pricing_plan_schedule_id) === r.value ? ut(n.value, {
|
|
873
|
-
pricingPlanVersions: (b = e.value) == null ? void 0 : b.pricing_plan_schedule_infos.map(
|
|
874
|
-
(C) => C.pricing_plan_version
|
|
875
|
-
)
|
|
876
|
-
}) : [];
|
|
877
|
-
}
|
|
878
|
-
), scheduleId: r };
|
|
879
|
-
}
|
|
880
|
-
const mt = /* @__PURE__ */ F({
|
|
881
|
-
__name: "SubscriptionDetails.entry.view",
|
|
882
|
-
props: {
|
|
883
|
-
configuration: { type: Object },
|
|
884
|
-
portalToken: { type: Object },
|
|
885
|
-
environment: { type: String },
|
|
886
|
-
locale: { type: String },
|
|
887
|
-
dateLocale: { type: String },
|
|
888
|
-
messages: { type: Object },
|
|
889
|
-
primaryColor: { type: String },
|
|
890
|
-
secondaryColor: { type: String },
|
|
891
|
-
isShadowRoot: { type: Boolean },
|
|
892
|
-
experimentalFeatures: { type: Array },
|
|
893
|
-
logLevel: { type: String },
|
|
894
|
-
onLog: { type: Function },
|
|
895
|
-
allowedPortalTypes: { type: Array },
|
|
896
|
-
portalObject: { type: Object },
|
|
897
|
-
cssOverrides: { type: [String, Array] },
|
|
898
|
-
branding: { type: Object }
|
|
899
|
-
},
|
|
900
|
-
setup(e) {
|
|
901
|
-
const i = e, t = i.portalObject.customer_id, {
|
|
902
|
-
subscription: n,
|
|
903
|
-
get: s,
|
|
904
|
-
error: o
|
|
905
|
-
} = Ce({ subscriptionId: i.configuration.subscriptionId }), r = q(), d = p(() => n.value ? null : o.value), l = () => s().catch((M) => {
|
|
906
|
-
r.error(
|
|
907
|
-
"SUBSCRIPTION_LOAD_FAILED",
|
|
908
|
-
"Failed to reload the subscription after it changed",
|
|
909
|
-
{},
|
|
910
|
-
M
|
|
911
|
-
);
|
|
912
|
-
}), { customer: b, get: C } = Ee({ customerId: t }), { items: k, fetchAll: O } = Le({ customerId: t }), {
|
|
913
|
-
walletBalances: T,
|
|
914
|
-
apiStatus: B,
|
|
915
|
-
fetch: I
|
|
916
|
-
} = fe({ customerId: t }), { isLoading: A } = xe(
|
|
917
|
-
s(),
|
|
918
|
-
C.execute(),
|
|
919
|
-
O(),
|
|
920
|
-
I()
|
|
921
|
-
), { items: E, scheduleId: L } = pt({
|
|
922
|
-
subscription: n
|
|
923
|
-
}), w = p(
|
|
924
|
-
() => n.value ? Ie(n.value) : []
|
|
925
|
-
), x = p(() => {
|
|
926
|
-
var M;
|
|
927
|
-
return ((M = T.value) == null ? void 0 : M.wallet_balances) ?? [];
|
|
928
|
-
}), U = p(() => B.value === ke.Failed);
|
|
929
|
-
return (M, f) => se(M.$slots, "default", {
|
|
930
|
-
subscription: a(n),
|
|
931
|
-
schedulesData: w.value,
|
|
932
|
-
customer: a(b),
|
|
933
|
-
paymentMethods: a(k),
|
|
934
|
-
walletBalances: x.value,
|
|
935
|
-
onDemandItems: a(E),
|
|
936
|
-
onDemandScheduleId: a(L),
|
|
937
|
-
hasWalletBalancesError: U.value,
|
|
938
|
-
isLoading: a(A),
|
|
939
|
-
error: d.value,
|
|
940
|
-
refreshWalletBalances: a(I),
|
|
941
|
-
refreshPaymentMethods: a(O),
|
|
942
|
-
refreshSubscription: l
|
|
943
|
-
});
|
|
944
|
-
}
|
|
945
|
-
});
|
|
946
|
-
function gt({
|
|
947
|
-
invoice: e,
|
|
948
|
-
configuration: i
|
|
949
|
-
}) {
|
|
950
|
-
var t;
|
|
951
|
-
(t = i.onInvoiceCreated) == null || t.call(i, {
|
|
952
|
-
invoiceId: e.id,
|
|
953
|
-
paymentStatus: e.payment_status
|
|
954
|
-
});
|
|
955
|
-
}
|
|
956
|
-
const bt = /* @__PURE__ */ F({
|
|
957
|
-
__name: "SubscriptionDetails.entry",
|
|
958
|
-
props: {
|
|
959
|
-
configuration: { type: Object },
|
|
960
|
-
portalToken: { type: Object },
|
|
961
|
-
environment: { type: String },
|
|
962
|
-
locale: { type: String },
|
|
963
|
-
dateLocale: { type: String },
|
|
964
|
-
messages: { type: Object },
|
|
965
|
-
primaryColor: { type: String },
|
|
966
|
-
secondaryColor: { type: String },
|
|
967
|
-
isShadowRoot: { type: Boolean },
|
|
968
|
-
experimentalFeatures: { type: Array },
|
|
969
|
-
logLevel: { type: String },
|
|
970
|
-
onLog: { type: Function },
|
|
971
|
-
allowedPortalTypes: { type: Array },
|
|
972
|
-
portalObject: { type: Object },
|
|
973
|
-
cssOverrides: { type: [String, Array] },
|
|
974
|
-
branding: { type: Object }
|
|
975
|
-
},
|
|
976
|
-
setup(e) {
|
|
977
|
-
const i = ce("subscription-details"), t = e;
|
|
978
|
-
return (n, s) => {
|
|
979
|
-
var o;
|
|
980
|
-
return c(), g(a(le), {
|
|
981
|
-
entry: n.$props,
|
|
982
|
-
"component-name": a(i),
|
|
983
|
-
"allowed-portal-types": ["CUSTOMER"],
|
|
984
|
-
"required-configuration": { subscriptionId: (o = e.configuration) == null ? void 0 : o.subscriptionId },
|
|
985
|
-
onError: s[1] || (s[1] = (r) => n.$emit("error", r))
|
|
986
|
-
}, {
|
|
987
|
-
default: u(() => [
|
|
988
|
-
(c(), g(mt, oe({
|
|
989
|
-
key: e.configuration.subscriptionId
|
|
990
|
-
}, n.$props), {
|
|
991
|
-
default: u(({
|
|
992
|
-
subscription: r,
|
|
993
|
-
schedulesData: d,
|
|
994
|
-
customer: l,
|
|
995
|
-
paymentMethods: b,
|
|
996
|
-
walletBalances: C,
|
|
997
|
-
onDemandItems: k,
|
|
998
|
-
onDemandScheduleId: O,
|
|
999
|
-
hasWalletBalancesError: T,
|
|
1000
|
-
isLoading: B,
|
|
1001
|
-
error: I,
|
|
1002
|
-
refreshWalletBalances: A,
|
|
1003
|
-
refreshPaymentMethods: E,
|
|
1004
|
-
refreshSubscription: L
|
|
1005
|
-
}) => [
|
|
1006
|
-
S(at, {
|
|
1007
|
-
subscription: r,
|
|
1008
|
-
"schedules-data": d,
|
|
1009
|
-
customer: l,
|
|
1010
|
-
avatar: e.configuration.avatar,
|
|
1011
|
-
"can-view-created-invoice": e.configuration.canViewCreatedInvoice,
|
|
1012
|
-
"payment-methods": b,
|
|
1013
|
-
"wallet-balances": C,
|
|
1014
|
-
"on-demand-items": k,
|
|
1015
|
-
"on-demand-schedule-id": O,
|
|
1016
|
-
"has-wallet-balances-error": T,
|
|
1017
|
-
"is-loading": B,
|
|
1018
|
-
error: I,
|
|
1019
|
-
onTopUpCharged: A,
|
|
1020
|
-
onAutoTopUpSaved: A,
|
|
1021
|
-
onAutoTopUpCancelled: A,
|
|
1022
|
-
onPaymentMethodStored: E,
|
|
1023
|
-
onSubscriptionChanged: L,
|
|
1024
|
-
onInvoiceCreated: s[0] || (s[0] = (w) => a(gt)({ invoice: w, configuration: t.configuration }))
|
|
1025
|
-
}, null, 8, ["subscription", "schedules-data", "customer", "avatar", "can-view-created-invoice", "payment-methods", "wallet-balances", "on-demand-items", "on-demand-schedule-id", "has-wallet-balances-error", "is-loading", "error", "onTopUpCharged", "onAutoTopUpSaved", "onAutoTopUpCancelled", "onPaymentMethodStored", "onSubscriptionChanged"])
|
|
1026
|
-
]),
|
|
1027
|
-
_: 1
|
|
1028
|
-
}, 16))
|
|
1029
|
-
]),
|
|
1030
|
-
_: 1
|
|
1031
|
-
}, 8, ["entry", "component-name", "required-configuration"]);
|
|
1032
|
-
};
|
|
1033
|
-
}
|
|
1034
|
-
}), { define: Ht } = de(
|
|
1035
|
-
bt,
|
|
1036
|
-
"subscription-details"
|
|
1037
|
-
);
|
|
1038
|
-
export {
|
|
1039
|
-
Ht as d,
|
|
1040
|
-
qt as g,
|
|
1041
|
-
ot as i,
|
|
1042
|
-
Gt as t,
|
|
1043
|
-
Fe as u
|
|
1044
|
-
};
|