@solvimon/solvimon-web 0.1.0-alpha.26 → 0.1.0-alpha.28
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 +138 -27
- package/dist/ApiStatus-CSFKl_ra.mjs +9 -0
- package/dist/{Avatar.vue.es-BqQHvLGA.mjs → Avatar.vue.es-Beg7umjO.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BFza7Nf9.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DBGe1PvD.mjs} +17 -19
- package/dist/{Button.vue.es-C32_baQN.mjs → Button.vue.es-rh6mITmN.mjs} +1 -1
- package/dist/{ChargeOnDemandModal-CIiI74ls.mjs → ChargeOnDemandModal-CPjPa_uq.mjs} +233 -253
- package/dist/Checkbox.vue.es-DsyiJ-VY.mjs +50 -0
- package/dist/Checkout.entry.ce-BZ1rYQvt.mjs +5279 -0
- package/dist/{Chip.vue.es-CKCOY5T6.mjs → Chip.vue.es-Cn2R_0mE.mjs} +34 -20
- package/dist/Comparators.vue.es-DQBI3f7m.mjs +103 -0
- package/dist/{ContextMenu.vue.es-Da-lAmTl.mjs → ContextMenu.vue.es-DRxsa7bZ.mjs} +4 -4
- package/dist/{CustomerBillingInformation.vue.es-BxBQt4Q0.mjs → CustomerBillingInformation.vue.es-DQfL5RMR.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BcTZgshS.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Ct-eYaEN.mjs} +31 -36
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BzTSwo4i.mjs +2921 -0
- package/dist/{DividerText.vue.es-DKl3FnDJ.mjs → DividerText.vue.es-M0XqSz55.mjs} +1 -1
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-Bk4zwyWa.mjs +362 -0
- package/dist/{ErrorNotification.vue.es-rRKgmkzV.mjs → ErrorNotification.vue.es-CKlt4hr2.mjs} +1 -1
- package/dist/{IconButton.vue.es-UlqwNPAX.mjs → IconButton.vue.es-oe4MVBK1.mjs} +2 -2
- package/dist/{IconTitle.vue.es-CK9k69tV.mjs → IconTitle.vue.es-BO6KBS4v.mjs} +3 -3
- package/dist/Input.vue.es-DAlPmtE_.mjs +249 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DUfJl07Y.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CCTl5GWa.mjs} +14 -13
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-DMGqj_Uk.mjs +56 -0
- package/dist/{InvoiceSummary.vue.es-DQ4KvTaw.mjs → InvoiceSummary.vue.es-DbNoGfYN.mjs} +9 -9
- package/dist/{Modal.vue.es-B9xMiyn3.mjs → Modal.vue.es-CTNACAst.mjs} +5 -5
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-BVzL2PGe.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DLfAfB_m.mjs} +73 -75
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-nLTPnH4j.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CKm-XYuF.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-DYa99P1M.mjs → PaymentHistoryBlock-BmA8jbMb.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D0KnSy0y.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BDMse2lO.mjs} +24 -24
- package/dist/{PaymentIntegrationForm-UWoyZgsR.mjs → PaymentIntegrationForm-D1Xw-xIt.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCxw0PCv.mjs +182 -0
- package/dist/{PaymentIntegrationFormAdyen-D4qfNtZ_.mjs → PaymentIntegrationFormAdyen-CfT5aD4L.mjs} +395 -297
- package/dist/PaymentIntegrationFormStripe-DKXJ-mjd.mjs +743 -0
- package/dist/{PaymentMethod.vue.es-CKu5nApX.mjs → PaymentMethod.vue.es-Cauxx4Xr.mjs} +3 -3
- package/dist/{PaymentMethodForm-B05sHWcW.mjs → PaymentMethodForm-CypZOYUZ.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-D1yIYsb_.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-De8FgdYD.mjs} +65 -75
- package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Dw28tfpD.mjs +168 -0
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DGpXRtp4.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-OtjVO7lR.mjs} +13 -8
- package/dist/PlanCustomizationEditor-Xtww2r9K.mjs +711 -0
- package/dist/PortalNotAvailable-B_59GUwN.mjs +25 -0
- package/dist/{PricingGroupRangeInput.vue.es-CJpvUP3-.mjs → PricingGroupRangeInput.vue.es-C9LJW3b8.mjs} +5 -5
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DJ81eUJX.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DdWxoB8q.mjs} +30 -30
- package/dist/{RadioGroupExtended.vue.es-BalV7gwp.mjs → RadioGroupExtended.vue.es-UtKsdmiv.mjs} +2 -2
- package/dist/{Section.vue.es-D7eiXUbk.mjs → Section.vue.es-iS8hVGWA.mjs} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DudMRVka.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Djc1SkEU.mjs} +13 -12
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs +32 -0
- package/dist/{StepInput.vue.es-C3Zm6Wc9.mjs → StepInput.vue.es-Dpan1RQd.mjs} +5 -4
- package/dist/{SubscriptionDetails.entry.ce-WEimiOex.mjs → SubscriptionDetails.entry.ce-DufQX3uI.mjs} +451 -468
- package/dist/{SubscriptionSchedules-DrrEAPlx.mjs → SubscriptionSchedules-DAahcNoI.mjs} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DHp_KtbF.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DNr1CqVj.mjs} +750 -763
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Wmjqy7RZ.mjs +203 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DFU0IULg.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BeRLuEyR.mjs} +124 -90
- package/dist/{TooltipParagraph.vue.es-BXbOJmjr.mjs → TooltipParagraph.vue.es-BjCn2BF6.mjs} +1 -1
- package/dist/{TrialChip.vue.es-C_yRujip.mjs → TrialChip.vue.es-B-XBSHWE.mjs} +2 -2
- package/dist/addressFormats.data-dzBx49dw.mjs +278 -0
- package/dist/amount-CondixVt.mjs +36 -0
- package/dist/{cn.es-CGa6b2Lt.mjs → cn.es-2bVdkiFV.mjs} +87 -83
- package/dist/{comparators.es-D8WGL-c4.mjs → comparators.es-C8rHpb70.mjs} +17 -13
- package/dist/components/BillingInformation/BillingInformation.mjs +7 -8
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +394 -350
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +16 -17
- package/dist/components/Invoice/Invoice.mjs +206 -209
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +64 -63
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +40 -41
- package/dist/components/InvoicesList/InvoicesList.mjs +14 -14
- package/dist/components/PaymentHistory/PaymentHistory.mjs +70 -65
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +31 -31
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +47 -45
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +50 -36
- package/dist/components/WalletBalances/WalletBalances.mjs +9 -10
- package/dist/core/index.mjs +61 -95
- package/dist/customElements-Di3zwlEU.mjs +6447 -0
- package/dist/customer-CqddTiOr.mjs +31 -0
- package/dist/{de-DE-jkW2dJrX.mjs → de-DE-BNMj3boy.mjs} +16 -10
- package/dist/{de-DE-CLfzTbbX.mjs → de-DE-BW8dMvhW.mjs} +87 -19
- package/dist/formControl-CsITfsBk.mjs +749 -0
- package/dist/index.mjs +2 -2
- package/dist/invoiceState-BJVHaKs7.mjs +14 -0
- package/dist/{invoices-DJTwftJv.mjs → invoices-Cf1qDAv4.mjs} +40 -35
- package/dist/{it-IT-Cym1UvvK.mjs → it-IT-Byg06KWc.mjs} +87 -19
- package/dist/{it-IT-CaaFToGB.mjs → it-IT-DRvuxM1F.mjs} +9 -3
- package/dist/{nl-NL-D0MQKaql.mjs → nl-NL-DLUwWbMG.mjs} +12 -6
- package/dist/{nl-NL-D0c4x5C0.mjs → nl-NL-x3zQqzZ7.mjs} +93 -25
- package/dist/paymentMethods-BUuOmDq9.mjs +77 -0
- package/dist/paymentOutcome-D17VD4MV.mjs +67 -0
- package/dist/payments-Ci8bF4C6.mjs +45 -0
- package/dist/pricingItemConfigs.es-D3pX_9AJ.mjs +78 -0
- package/dist/pricingPlanScheduleOverrides-COr9F8DO.mjs +233 -0
- package/dist/pricingPlanSchedules-BK_o9p6h.mjs +38 -0
- package/dist/sanitization.es-C6dbuxUJ.mjs +4 -0
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +98 -91
- package/dist/screens/PayInvoice/PayInvoice.mjs +181 -210
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +98 -86
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +363 -334
- package/dist/sessionReference-B8Dbmx5t.mjs +38 -0
- package/dist/sorting.es-qtEN8J8T.mjs +77 -0
- package/dist/subscription-BhxoqwcT.mjs +83 -0
- package/dist/subscriptions-CwogJODR.mjs +54 -0
- package/dist/types/components/InvoiceTable/InvoiceTable.types.d.ts +2 -0
- package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
- package/dist/types/components/checkout/PromotionCodeSection.types.d.ts +2 -0
- package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +20 -0
- package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +15 -0
- package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +0 -2
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +9 -5
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -1
- package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +5 -1
- package/dist/types/components/payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts +0 -1
- package/dist/types/components/payments/PaymentCompletedCard/PaymentCompletedCard.types.d.ts +0 -2
- package/dist/types/components/payments/PaymentErrorCard/PaymentErrorCard.types.d.ts +9 -2
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +36 -4
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +7 -0
- package/dist/types/components/payments/PaymentMethodSelector/PaymentMethodSelector.types.d.ts +0 -4
- package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +9 -4
- package/dist/types/components/providers/AuthProvider/composables/useAuth.d.ts +1 -3
- package/dist/types/components/providers/ConfigProvider/ConfigProvider.lib.d.ts +2 -4
- package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.lib.d.ts +11 -0
- package/dist/types/components/providers/EntryProvider/EntryProvider.lib.d.ts +7 -0
- package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +2 -0
- package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +3 -1
- package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +5 -1
- package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.lib.d.ts +2 -2
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +6 -1
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +5 -1
- package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +10 -7
- package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +1 -1
- package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +3 -1
- package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +2 -2
- package/dist/types/components/providers/Provider/Provider.types.d.ts +1 -1
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +11 -4
- package/dist/types/components/providers/RequiredPropertiesGuard/RequiredPropertiesGuard.vue.d.ts +17 -0
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.lib.d.ts +7 -2
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.types.d.ts +1 -1
- package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +1 -2
- package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsListItem.types.d.ts +2 -0
- package/dist/types/components/subscriptions/OrderSummary.types.d.ts +1 -10
- package/dist/types/components/subscriptions/SubscriptionCancellationModal/SubscriptionCancellationModal.types.d.ts +5 -1
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +8 -16
- package/dist/types/components/subscriptions/SubscriptionSummary.types.d.ts +1 -14
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +4 -1
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +1 -2
- package/dist/types/components/wallets/AutoTopUpConfig/AutoTopUpConfig.types.d.ts +0 -3
- package/dist/types/components/wallets/TopUpModal/TopUpModalForm.types.d.ts +3 -1
- package/dist/types/components/wallets/TopUpModal/TopUpModalSuccess.types.d.ts +1 -7
- package/dist/types/public/components/BillingInformation/BillingInformation.entry.ce.d.ts +1 -1
- package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +0 -3
- package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.ce.d.ts +1 -1
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.ce.d.ts +1 -1
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +0 -1
- package/dist/types/public/components/Invoice/Invoice.entry.ce.d.ts +1 -1
- package/dist/types/public/components/Invoice/Invoice.types.d.ts +0 -1
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.ce.d.ts +1 -1
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.types.d.ts +3 -2
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.types.d.ts +0 -2
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.ce.d.ts +1 -1
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +0 -1
- package/dist/types/public/components/InvoicesList/InvoicesList.entry.ce.d.ts +1 -1
- package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +2 -0
- package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.ce.d.ts +1 -1
- package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.types.d.ts +3 -2
- package/dist/types/public/components/PaymentHistory/PaymentHistory.types.d.ts +0 -2
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.ce.d.ts +1 -1
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.ce.d.ts +1 -1
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.types.d.ts +3 -2
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.types.d.ts +0 -2
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.ce.d.ts +1 -1
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +3 -0
- package/dist/types/public/components/WalletBalances/WalletBalances.entry.ce.d.ts +1 -1
- package/dist/types/public/components/WalletBalances/WalletBalances.entry.types.d.ts +1 -3
- package/dist/types/public/core/action-request.types.d.ts +5 -0
- package/dist/types/public/core/registry.ce.d.ts +3 -3
- package/dist/types/public/core/registry.d.ts +0 -3
- package/dist/types/public/screens/Checkout/Checkout.entry.ce.d.ts +1 -1
- package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +0 -7
- package/dist/types/public/screens/Checkout/Checkout.types.d.ts +2 -2
- package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.ce.d.ts +1 -1
- package/dist/types/public/screens/PayInvoice/PayInvoice.entry.ce.d.ts +1 -1
- package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +2 -0
- package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.ce.d.ts +1 -1
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.ce.d.ts +1 -1
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +1 -2
- package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.ce.d.ts +1 -1
- package/dist/types/services/paymentMethods.types.d.ts +2 -10
- package/dist/types/services/requests.types.d.ts +16 -6
- package/dist/types/types/errors.d.ts +3 -2
- package/dist/types/vendor/@adyen/adyen-web/index.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Payment.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/utils.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-ui/components/providers/BrandProvider/BrandProvider.types.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-ui/components/providers/IntlProvider/IntlProvider.types.d.ts +66 -0
- package/dist/types/vendor/@solvimon/solvimon-ui/index.d.ts +2 -0
- package/dist/useActionDispatchProvider-DC_fUykI.mjs +9 -0
- package/dist/{useCustomer-XZKWsolE.mjs → useCustomer-C3kTh7wn.mjs} +2 -2
- package/dist/useCustomerFormLabels-CK7K50nB.mjs +1369 -0
- package/dist/useIncrementalLoading-C_sHmW7d.mjs +60 -0
- package/dist/useInvoiceData-BIh8-h8b.mjs +21 -0
- package/dist/useInvoicesList-Y6p0Pqpy.mjs +674 -0
- package/dist/{useLoadInitialData-CR0kbYw8.mjs → useLoadInitialData-4k_Cyqef.mjs} +1 -1
- package/dist/usePaymentFormHold-FfNc578l.mjs +189 -0
- package/dist/{usePaymentMethodAvailability-ZH-m3B-A.mjs → usePaymentMethodAvailability-CnYTvG15.mjs} +17 -18
- package/dist/usePaymentMethodOptions-1QBcmgUf.mjs +40 -0
- package/dist/{usePaymentMethods-B-OKRyKd.mjs → usePaymentMethods-gvr-rmwE.mjs} +2 -2
- package/dist/{usePayments-CV85OV8V.mjs → usePayments-CykCZPG2.mjs} +7 -7
- package/dist/usePortal-CxzKGhbK.mjs +7 -0
- package/dist/useService-B0OQJmif.mjs +56 -0
- package/dist/{useTimePeriod.es-B22-fno3.mjs → useTimePeriod.es-JkXdHNWr.mjs} +1 -1
- package/dist/useViewport-psZejz_H.mjs +19 -0
- package/package.json +35 -59
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DcrLNA_x.mjs +0 -223
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DwbIiJBY.js +0 -1
- package/dist/Alert.vue.es-RyK53a2P.js +0 -1
- package/dist/Amount.vue.es-DExaYBqm.js +0 -1
- package/dist/Avatar.vue.es-Bm6MCMAL.js +0 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-0JHnqIpC.js +0 -1
- package/dist/Button.vue.es-qGvnOKnK.js +0 -1
- package/dist/ChargeOnDemandModal-DIQaGnRs.js +0 -1
- package/dist/Checkout.entry.ce-8EcavNgT.js +0 -2
- package/dist/Checkout.entry.ce-BA5ljKj8.mjs +0 -3924
- package/dist/Chip.vue.es-D60gTbfe.js +0 -1
- package/dist/Comparators.vue.es-CwhX3rbx.mjs +0 -93
- package/dist/Comparators.vue.es-DmkxV0gb.js +0 -1
- package/dist/ContentWithAsideLayout-RSdKXqAf.js +0 -1
- package/dist/ContextMenu.vue.es-C7KI8Gz6.js +0 -1
- package/dist/CustomerBillingInformation.vue.es-bFUx81Ig.js +0 -1
- package/dist/CustomerPaymentMethods.lib-BKgQTCtc.js +0 -1
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C0lJ_ESU.js +0 -1
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs +0 -2701
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js +0 -1
- package/dist/Divider.vue.es-UwnWvUTl.js +0 -1
- package/dist/DividerText.vue.es-BF3gnr4e.js +0 -1
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs +0 -335
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js +0 -1
- package/dist/ErrorNotification.vue.es-BX9dHEc-.js +0 -1
- package/dist/Expand.vue.es-BtM0EZEr.js +0 -1
- package/dist/FormMessage.vue.es-dqATjC2N.js +0 -1
- package/dist/IconButton.vue.es-Bwdfu-jm.js +0 -1
- package/dist/IconTitle.vue.es-Cei98MBw.js +0 -1
- package/dist/Input.vue.es-B47l_feL.js +0 -1
- package/dist/Input.vue.es-D9IjIWc-.mjs +0 -235
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DKlPrxQS.js +0 -1
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-D9Rtgapa.mjs +0 -41
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-DlJ6lELc.js +0 -1
- package/dist/InvoiceSummary.vue.es-DBnR9Hs7.js +0 -1
- package/dist/Modal.vue.es-8LN4gBh0.js +0 -1
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-B1yGKkWN.js +0 -1
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js +0 -1
- package/dist/PaymentHistoryBlock-Ds93gNvh.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CBZhXQfC.js +0 -1
- package/dist/PaymentIntegrationForm-B_Db4DG1.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C0J37ZVe.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-J15IDbMc.mjs +0 -154
- package/dist/PaymentIntegrationFormAdyen-HeA9XIj-.js +0 -98
- package/dist/PaymentIntegrationFormStripe-BIiMCWlV.mjs +0 -587
- package/dist/PaymentIntegrationFormStripe-DUCJTIAq.js +0 -102
- package/dist/PaymentMethod.vue.es-CJcSZ9lN.js +0 -1
- package/dist/PaymentMethodForm-1d0YIGOu.js +0 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BDm8l_6N.js +0 -1
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-BE4S26JX.js +0 -1
- package/dist/PlanCustomizationEditor-CEMP_Dhz.js +0 -1
- package/dist/PlanCustomizationEditor-CpZeilm5.mjs +0 -694
- package/dist/PricingGroupRangeInput.vue.es-DZSJ5Mz0.js +0 -185
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-jrkraJMu.js +0 -1
- package/dist/RadioGroupExtended.vue.es-Dt6LH9Yh.js +0 -1
- package/dist/Section.vue.es-zVXBHAL6.js +0 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BdjYFrVC.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs +0 -51
- package/dist/StepInput.vue.es-mAnuCuDQ.js +0 -1
- package/dist/SubscriptionDetails.entry.ce-D4CsSoR9.js +0 -1
- package/dist/SubscriptionSchedules-Cm5Dt-1H.js +0 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-t2Awijf5.js +0 -1
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs +0 -91
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-B41qZmcL.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Bu-_clEa.js +0 -1
- package/dist/TooltipParagraph.vue.es-Cph6zT31.js +0 -1
- package/dist/TrialChip.vue.es-C_wgHGuN.js +0 -1
- package/dist/accel.svg.es-DFJXdioD.js +0 -1
- package/dist/ach.svg.es-BYP873jU.js +0 -1
- package/dist/adyen-BJfC7N6f.js +0 -1
- package/dist/adyen-CvsH5fok.mjs +0 -117
- package/dist/adyen-Druit6gz.js +0 -1
- package/dist/adyenSdk-BP2XXzeJ.js +0 -1
- package/dist/amazon-pay.svg.es-CQWgtowB.js +0 -1
- package/dist/amex.svg.es-DKhW4Txt.js +0 -1
- package/dist/api.es-duCDtZD9.js +0 -1
- package/dist/apple-pay.svg.es-Dyojd0F-.js +0 -1
- package/dist/bacs.svg.es-GJpZs1sD.js +0 -1
- package/dist/bancontact.svg.es-BQh7nAup.js +0 -1
- package/dist/carnet.svg.es-DY04-F2L.js +0 -1
- package/dist/cartes-bancaires.svg.es-BleHMlkN.js +0 -1
- package/dist/cashapp.svg.es-MwXGYom6.js +0 -1
- package/dist/cn.es-D9YMDvG2.js +0 -1
- package/dist/comparators.es-OGt19O9U.js +0 -1
- package/dist/components/BillingInformation/BillingInformation.cjs +0 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs +0 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +0 -1
- package/dist/components/Invoice/Invoice.cjs +0 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +0 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs +0 -1
- package/dist/components/InvoicesList/InvoicesList.cjs +0 -1
- package/dist/components/PaymentHistory/PaymentHistory.cjs +0 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +0 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +0 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs +0 -1
- package/dist/components/WalletBalances/WalletBalances.cjs +0 -1
- package/dist/configuration-akTS7Wiw.js +0 -1
- package/dist/core/index.cjs +0 -1
- package/dist/countryData.es-C4jHBzfo.js +0 -1
- package/dist/customElements-C963-LtW.js +0 -1215
- package/dist/customElements-D5DAoHRI.mjs +0 -6633
- package/dist/customer-DKa1B2vp.mjs +0 -31
- package/dist/customer-TE1FnGT0.js +0 -1
- package/dist/customer.es-BButyYo0.js +0 -1
- package/dist/dana.svg.es-BDtZLpwd.js +0 -1
- package/dist/dankort.svg.es-CksaipXF.js +0 -1
- package/dist/de-DE-B4TUdnUf.js +0 -1
- package/dist/de-DE-DaBBl-Ak.js +0 -1
- package/dist/diners.svg.es-D6Mu1pqP.js +0 -1
- package/dist/discover.svg.es-DgqWCMUM.js +0 -1
- package/dist/eftpos.svg.es-Dk2DOT8W.js +0 -1
- package/dist/elo.svg.es-C-BzjuRP.js +0 -1
- package/dist/en-US-BNevqm0M.js +0 -1
- package/dist/en-US-D6SGRAch.mjs +0 -325
- package/dist/en-US-J85TQRI8.js +0 -1
- package/dist/en-US-SDhjlY_v.mjs +0 -301
- package/dist/eps.svg.es-B_85bP-W.js +0 -1
- package/dist/error-BHVZJGwD.mjs +0 -13
- package/dist/error-CmduqgVq.js +0 -1
- package/dist/floating-ui.vue.es-Bly3DGWm.js +0 -1
- package/dist/formControl-ODrpUvcA.js +0 -1
- package/dist/formControl-dX7l8o3c.mjs +0 -845
- package/dist/formatting.es-C72Nsrmh.js +0 -1
- package/dist/gcash.svg.es-BKAdhWzv.js +0 -1
- package/dist/getComposedString.es-haS4bAj7.js +0 -1
- package/dist/getCountryNameByCode.es-Xxc0nZsH.js +0 -1
- package/dist/girocard.svg.es-HSOEvDif.js +0 -1
- package/dist/go-pay.svg.es-DQjtunZ_.js +0 -1
- package/dist/google-pay.svg.es-hzc_EgiJ.js +0 -1
- package/dist/hipercard.svg.es-CbCsRY2q.js +0 -1
- package/dist/icon-sprite.svg.es-Ds6lDf5p.js +0 -1
- package/dist/ideal.svg.es-Booz1IML.js +0 -1
- package/dist/index-BPZPnOQQ.js +0 -7
- package/dist/index.cjs +0 -1
- package/dist/index.es-BclokHQX.js +0 -1
- package/dist/invoices-ClqTWYF9.js +0 -1
- package/dist/it-IT-BkPbTueL.js +0 -1
- package/dist/it-IT-CSYvGmpT.js +0 -1
- package/dist/jcb.svg.es-B3WPB8c2.js +0 -1
- package/dist/kakao-pay.svg.es-Cs-lCW74.js +0 -1
- package/dist/klarna.svg.es-Cs6XaHD7.js +0 -1
- package/dist/maestro.svg.es-BvK4oPg4.js +0 -1
- package/dist/mastercard.svg.es-lp4AXyyV.js +0 -1
- package/dist/momo.svg.es-C5aLYf_R.js +0 -1
- package/dist/nl-NL-CpE4IgwO.js +0 -1
- package/dist/nl-NL-jIfAVGv0.js +0 -1
- package/dist/nyce.svg.es-ArAivAZW.js +0 -1
- package/dist/object.es-CdriXMPs.js +0 -1
- package/dist/open-banking.svg.es-Q3rRkCvP.js +0 -1
- package/dist/paymentFailure-Bh60UhxA.mjs +0 -47
- package/dist/paymentFailure-Cki8c5BX.js +0 -1
- package/dist/paymentMethods-AL2U_byg.js +0 -1
- package/dist/paymentMethods-CWzJhcWK.mjs +0 -77
- package/dist/payments-BmiHMlQt.js +0 -1
- package/dist/payments-aXyfylwk.mjs +0 -45
- package/dist/paypal.svg.es-Cjp5sNI3.js +0 -1
- package/dist/pricing-BVAld27Y.js +0 -1
- package/dist/pricing-DLOeiAIB.mjs +0 -16
- package/dist/pricing.es-C07bgEZx.js +0 -1
- package/dist/pricingItemConfigs.es-D4aYkYcf.js +0 -1
- package/dist/pricingItemConfigs.es-ORxsk_YS.mjs +0 -77
- package/dist/pricingPlanSchedule-BM8vsKkV.js +0 -1
- package/dist/pricingPlanSchedules-BD4GIP_F.mjs +0 -32
- package/dist/pricingPlanSchedules-BfsMSvN0.js +0 -1
- package/dist/pulse.svg.es-Dit33E8S.js +0 -1
- package/dist/screens/Checkout/Checkout.cjs +0 -1
- package/dist/screens/CustomerOverview/CustomerOverview.cjs +0 -1
- package/dist/screens/PayInvoice/PayInvoice.cjs +0 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +0 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +0 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +0 -1
- package/dist/sepa.svg.es-0t4DKeA1.js +0 -1
- package/dist/sessionReference-3h-6FdrC.mjs +0 -43
- package/dist/sessionReference-m_6Rp4X1.js +0 -1
- package/dist/slots.es-T9ZJRGtG.js +0 -1
- package/dist/sorting.es-DCihKqD2.mjs +0 -77
- package/dist/sorting.es-DQsjKr8A.js +0 -1
- package/dist/star.svg.es-D2JncY7b.js +0 -1
- package/dist/subscription-D1yHKUNc.mjs +0 -69
- package/dist/subscription-ZA62t4E9.js +0 -1
- package/dist/subscriptions-Cm83ckfl.js +0 -1
- package/dist/subscriptions-cnR5fnf7.mjs +0 -55
- package/dist/trustly.svg.es-GJByiFAs.js +0 -1
- package/dist/twint.svg.es-BJ2f48og.js +0 -1
- package/dist/typeGuards.es-DS3vZaJn.js +0 -1
- package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +0 -14
- package/dist/types/components/payments/SubscriptionPaymentCompletedCard/SubscriptionPaymentCompletedCard.types.d.ts +0 -3
- package/dist/types/components/subscriptions/PlanCustomizationForm/AddonSingleEditor.types.d.ts +0 -5
- package/dist/types/services/portals.types.d.ts +0 -70
- package/dist/types/types/subscription.d.ts +0 -4
- package/dist/unionpay.svg.es-DjFZ5EMQ.js +0 -1
- package/dist/url-TNRgVI8A.mjs +0 -21
- package/dist/url-vloPOiXd.js +0 -1
- package/dist/useActionDispatchProvider-CHkVQMaE.js +0 -1
- package/dist/useActionDispatchProvider-DDYqIh3r.mjs +0 -11
- package/dist/useCustomer-DGYtowRy.js +0 -1
- package/dist/useCustomerFormLabels-CcnkJLcB.mjs +0 -968
- package/dist/useCustomerFormLabels-DAZziqYt.js +0 -1
- package/dist/useExperimentalFeature-COOU6IZd.js +0 -1
- package/dist/useExperimentalFeature-ierhOt9Q.mjs +0 -6
- package/dist/useIncrementalLoading-CaWOE8Xl.js +0 -1
- package/dist/useIncrementalLoading-Cgxw2GD7.mjs +0 -48
- package/dist/useInvoiceData-BEK-7msA.mjs +0 -38
- package/dist/useInvoiceData-CQRn8l9C.js +0 -1
- package/dist/useInvoicesList-BQkKyyXa.js +0 -1
- package/dist/useInvoicesList-C4I118KM.mjs +0 -500
- package/dist/useLoadInitialData-CrKnBZs_.js +0 -1
- package/dist/usePaymentMethodAvailability-Ci6LeYKt.js +0 -1
- package/dist/usePaymentMethodOptions-Ciifjo6c.mjs +0 -39
- package/dist/usePaymentMethodOptions-Cqe92ZBn.js +0 -1
- package/dist/usePaymentMethods-BKwrl82-.js +0 -1
- package/dist/usePayments-Bauj16B-.js +0 -1
- package/dist/usePortal-DSLImEfr.js +0 -1
- package/dist/usePortal-H8Tv2TnZ.mjs +0 -11
- package/dist/useService-Bh47bllz.mjs +0 -50
- package/dist/useService-H7BjLg8P.js +0 -1
- package/dist/useSubscription-BiYNJT2e.js +0 -1
- package/dist/useSubscription-DqnxWNKg.mjs +0 -210
- package/dist/useTimePeriod.es-D2aiyfd-.js +0 -1
- package/dist/useViewport-BgdA2PPt.mjs +0 -29
- package/dist/useViewport-hPRVDWCm.js +0 -1
- package/dist/useWatchDebounced-B8iX7ykx.js +0 -1
- package/dist/useWatchDebounced-BHlBPcXB.mjs +0 -20
- package/dist/visa.svg.es-NY3BHhda.js +0 -1
- package/dist/vpay.svg.es-VViQi42w.js +0 -1
- package/dist/wallets.es-CNIMW5ay.js +0 -1
- package/dist/zip.svg.es-C9S_F31W.js +0 -1
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { computed as c, defineComponent as O, toRef as C, openBlock as m, createElementBlock as w, normalizeClass as N, createBlock as f, withCtx as v, createTextVNode as A, toDisplayString as b, unref as s, Fragment as S, createElementVNode as k, createVNode as V, createCommentVNode as g, defineAsyncComponent as $, ref as B, watch as E } from "vue";
|
|
2
|
-
import { _ as P } from "./PaymentMethod.vue.es-CKu5nApX.mjs";
|
|
3
|
-
import { _ as I } from "./Button.vue.es-C32_baQN.mjs";
|
|
4
|
-
import { _ as L } from "./FormMessage.vue.es-jG3fQZms.mjs";
|
|
5
|
-
import { _ as T } from "./RadioGroupExtended.vue.es-BalV7gwp.mjs";
|
|
6
|
-
import { a as x, _ as R } from "./customElements-D5DAoHRI.mjs";
|
|
7
|
-
import { _ as D } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs";
|
|
8
|
-
const y = (e) => e.replaceAll("_", " ").toLowerCase().replace(/^./, (a) => a.toUpperCase());
|
|
9
|
-
function j(e) {
|
|
10
|
-
var o, r, l, d, t, n;
|
|
11
|
-
const a = [];
|
|
12
|
-
switch (e.type) {
|
|
13
|
-
case "CARD":
|
|
14
|
-
a.push(
|
|
15
|
-
e.card.brand && y(e.card.brand),
|
|
16
|
-
e.card.last_four_digits
|
|
17
|
-
);
|
|
18
|
-
break;
|
|
19
|
-
case "ONLINE_BANKING":
|
|
20
|
-
a.push(
|
|
21
|
-
((o = e.online_banking) == null ? void 0 : o.variant) && y(e.online_banking.variant),
|
|
22
|
-
(r = e.online_banking) == null ? void 0 : r.owner_name
|
|
23
|
-
);
|
|
24
|
-
break;
|
|
25
|
-
case "DIRECT_DEBIT":
|
|
26
|
-
a.push(
|
|
27
|
-
((l = e.direct_debit) == null ? void 0 : l.variant) && y(e.direct_debit.variant),
|
|
28
|
-
(d = e.direct_debit) == null ? void 0 : d.owner_name
|
|
29
|
-
);
|
|
30
|
-
break;
|
|
31
|
-
case "BUY_NOW_PAY_LATER":
|
|
32
|
-
a.push(
|
|
33
|
-
((t = e.buy_now_pay_later) == null ? void 0 : t.variant) && y(e.buy_now_pay_later.variant)
|
|
34
|
-
);
|
|
35
|
-
break;
|
|
36
|
-
case "DIGITAL_WALLET":
|
|
37
|
-
a.push(
|
|
38
|
-
((n = e.digital_wallet) == null ? void 0 : n.variant) && y(e.digital_wallet.variant)
|
|
39
|
-
);
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
return a.filter(Boolean).join(" ") || y(e.type);
|
|
43
|
-
}
|
|
44
|
-
function q(e) {
|
|
45
|
-
const a = c(
|
|
46
|
-
() => e.value.map((o) => ({
|
|
47
|
-
value: o.id,
|
|
48
|
-
label: j(o)
|
|
49
|
-
}))
|
|
50
|
-
), i = c(
|
|
51
|
-
() => Object.fromEntries(
|
|
52
|
-
e.value.map((o) => [o.id, o])
|
|
53
|
-
)
|
|
54
|
-
);
|
|
55
|
-
return { options: a, paymentMethodsById: i };
|
|
56
|
-
}
|
|
57
|
-
const F = { class: "sr-only" }, Z = /* @__PURE__ */ O({
|
|
58
|
-
__name: "PaymentMethodSelector",
|
|
59
|
-
props: {
|
|
60
|
-
paymentMethods: { type: Array },
|
|
61
|
-
modelValue: { type: String },
|
|
62
|
-
label: { type: String },
|
|
63
|
-
required: { type: Boolean },
|
|
64
|
-
disabled: { type: Boolean },
|
|
65
|
-
error: { type: [String, Object, Array] },
|
|
66
|
-
rootClass: { type: String },
|
|
67
|
-
showAddOption: { type: Boolean, default: !0 },
|
|
68
|
-
paymentMethodOptions: { type: Array }
|
|
69
|
-
},
|
|
70
|
-
emits: ["update:modelValue", "add-payment-method"],
|
|
71
|
-
setup(e, { emit: a }) {
|
|
72
|
-
const i = e, o = a, { $t: r } = x(), { options: l, paymentMethodsById: d } = q(
|
|
73
|
-
C(i, "paymentMethods")
|
|
74
|
-
), t = c({
|
|
75
|
-
get: () => i.modelValue,
|
|
76
|
-
set: (u) => o("update:modelValue", typeof u == "string" ? u : void 0)
|
|
77
|
-
}), n = c(() => i.paymentMethods.length > 0), h = c(() => {
|
|
78
|
-
var u;
|
|
79
|
-
return ((u = i.paymentMethodOptions) == null ? void 0 : u.length) !== 0;
|
|
80
|
-
});
|
|
81
|
-
return (u, _) => (m(), w("div", {
|
|
82
|
-
class: N(["sv-payment-method-selector grid grid-cols-1 gap-2", e.rootClass])
|
|
83
|
-
}, [
|
|
84
|
-
!n.value && !h.value ? (m(), f(D, {
|
|
85
|
-
key: 0,
|
|
86
|
-
class: "sv-payment-method-selector__empty",
|
|
87
|
-
icon: "credit_card_off"
|
|
88
|
-
}, {
|
|
89
|
-
title: v(() => [
|
|
90
|
-
A(b(s(r)({
|
|
91
|
-
defaultMessage: "No payment methods available",
|
|
92
|
-
description: "Shown in place of the payment method choice when the customer has nothing stored and nothing can be added",
|
|
93
|
-
id: "payment_method_selector.empty_state.title"
|
|
94
|
-
})), 1)
|
|
95
|
-
]),
|
|
96
|
-
_: 1
|
|
97
|
-
})) : (m(), w(S, { key: 1 }, [
|
|
98
|
-
k("div", null, [
|
|
99
|
-
n.value ? (m(), f(s(T), {
|
|
100
|
-
key: 0,
|
|
101
|
-
modelValue: t.value,
|
|
102
|
-
"onUpdate:modelValue": _[0] || (_[0] = (p) => t.value = p),
|
|
103
|
-
class: "sv-payment-method-selector__options",
|
|
104
|
-
name: "payment-method",
|
|
105
|
-
direction: "column",
|
|
106
|
-
options: s(l),
|
|
107
|
-
label: e.label,
|
|
108
|
-
required: e.required,
|
|
109
|
-
disabled: e.disabled,
|
|
110
|
-
error: e.error,
|
|
111
|
-
"show-radio": !1
|
|
112
|
-
}, {
|
|
113
|
-
prefix: v(({ optionValue: p }) => [
|
|
114
|
-
V(s(P), {
|
|
115
|
-
class: "sv-payment-method-selector__option-content grow",
|
|
116
|
-
"payment-method": s(d)[String(p)]
|
|
117
|
-
}, null, 8, ["payment-method"])
|
|
118
|
-
]),
|
|
119
|
-
label: v(({ option: p }) => [
|
|
120
|
-
k("span", F, b(p.label), 1)
|
|
121
|
-
]),
|
|
122
|
-
_: 1
|
|
123
|
-
}, 8, ["modelValue", "options", "label", "required", "disabled", "error"])) : g("", !0)
|
|
124
|
-
]),
|
|
125
|
-
e.showAddOption && h.value ? (m(), f(s(I), {
|
|
126
|
-
key: 0,
|
|
127
|
-
class: "sv-action sv-action--secondary sv-action--full-width sv-payment-method-selector__add w-full",
|
|
128
|
-
intent: "secondary",
|
|
129
|
-
"icon-prefix": "add",
|
|
130
|
-
type: "button",
|
|
131
|
-
size: "sm",
|
|
132
|
-
disabled: e.disabled,
|
|
133
|
-
onClick: _[1] || (_[1] = (p) => o("add-payment-method"))
|
|
134
|
-
}, {
|
|
135
|
-
default: v(() => [
|
|
136
|
-
A(b(s(r)({
|
|
137
|
-
defaultMessage: "Add payment method",
|
|
138
|
-
description: "Label of the button that adds a new payment method",
|
|
139
|
-
id: "payment_method_selector.add_payment_method"
|
|
140
|
-
})), 1)
|
|
141
|
-
]),
|
|
142
|
-
_: 1
|
|
143
|
-
}, 8, ["disabled"])) : e.showAddOption ? (m(), f(s(R), {
|
|
144
|
-
key: 1,
|
|
145
|
-
variant: "body-sm",
|
|
146
|
-
color: "subtle",
|
|
147
|
-
tag: "p",
|
|
148
|
-
class: "sv-payment-method-selector__unavailable"
|
|
149
|
-
}, {
|
|
150
|
-
default: v(() => [
|
|
151
|
-
A(b(s(r)({
|
|
152
|
-
defaultMessage: "There are no available payment methods. Please contact support for more information.",
|
|
153
|
-
description: "Shown in place of the add button when the customer cannot add any payment method",
|
|
154
|
-
id: "payment_method_selector.no_payment_methods_available"
|
|
155
|
-
})), 1)
|
|
156
|
-
]),
|
|
157
|
-
_: 1
|
|
158
|
-
})) : g("", !0),
|
|
159
|
-
e.error && !n.value ? (m(), f(s(L), {
|
|
160
|
-
key: 2,
|
|
161
|
-
class: "sv-payment-method-selector__error",
|
|
162
|
-
message: e.error,
|
|
163
|
-
variant: "error"
|
|
164
|
-
}, null, 8, ["message"])) : g("", !0)
|
|
165
|
-
], 64))
|
|
166
|
-
], 2));
|
|
167
|
-
}
|
|
168
|
-
}), H = /* @__PURE__ */ O({
|
|
169
|
-
__name: "AddPaymentMethodPane",
|
|
170
|
-
props: {
|
|
171
|
-
customer: { type: Object },
|
|
172
|
-
paymentMethodOptions: { type: Array },
|
|
173
|
-
isLoading: { type: Boolean },
|
|
174
|
-
isActive: { type: Boolean }
|
|
175
|
-
},
|
|
176
|
-
emits: ["success", "failure"],
|
|
177
|
-
setup(e, { expose: a }) {
|
|
178
|
-
const i = $(
|
|
179
|
-
() => import("./PaymentMethodForm-B05sHWcW.mjs").then((t) => t.default)
|
|
180
|
-
), o = e, r = c(() => ({
|
|
181
|
-
variant: "TOKENIZE"
|
|
182
|
-
})), l = B(!1);
|
|
183
|
-
E(
|
|
184
|
-
() => o.isActive,
|
|
185
|
-
(t) => {
|
|
186
|
-
l.value = l.value || !!t;
|
|
187
|
-
},
|
|
188
|
-
{ immediate: !0 }
|
|
189
|
-
);
|
|
190
|
-
const d = B();
|
|
191
|
-
return a({
|
|
192
|
-
/** Submits the form, for a host whose own chrome owns the button — a modal footer, say. */
|
|
193
|
-
submit: () => {
|
|
194
|
-
var t;
|
|
195
|
-
return (t = d.value) == null ? void 0 : t.submit();
|
|
196
|
-
},
|
|
197
|
-
/**
|
|
198
|
-
* Whether the gateway is working on it, so the host can show it and hold everything else. Read
|
|
199
|
-
* through the pane being on screen: a form left behind on another pane is not what is pending.
|
|
200
|
-
*/
|
|
201
|
-
isSaving: c(() => {
|
|
202
|
-
var t;
|
|
203
|
-
return !!o.isActive && !!((t = d.value) != null && t.isPaymentPending);
|
|
204
|
-
})
|
|
205
|
-
}), (t, n) => e.customer && l.value ? (m(), f(s(i), {
|
|
206
|
-
key: 0,
|
|
207
|
-
ref_key: "formRef",
|
|
208
|
-
ref: d,
|
|
209
|
-
class: "sv-add-payment-method-pane",
|
|
210
|
-
"hide-submit-button": "",
|
|
211
|
-
customer: e.customer,
|
|
212
|
-
"payment-method-options": e.paymentMethodOptions ?? [],
|
|
213
|
-
"is-loading": e.isLoading,
|
|
214
|
-
configuration: r.value,
|
|
215
|
-
onSuccess: n[0] || (n[0] = (h) => t.$emit("success")),
|
|
216
|
-
onFailure: n[1] || (n[1] = (h) => t.$emit("failure", h))
|
|
217
|
-
}, null, 8, ["customer", "payment-method-options", "is-loading", "configuration"])) : g("", !0);
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
export {
|
|
221
|
-
Z as _,
|
|
222
|
-
H as a
|
|
223
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),_=require("./PaymentMethod.vue.es-CJcSZ9lN.js"),h=require("./Button.vue.es-qGvnOKnK.js"),v=require("./FormMessage.vue.es-dqATjC2N.js"),b=require("./RadioGroupExtended.vue.es-Dt6LH9Yh.js"),f=require("./customElements-C963-LtW.js"),g=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js"),u=t=>t.replaceAll("_"," ").toLowerCase().replace(/^./,o=>o.toUpperCase());function k(t){var n,i,l,d,a,s;const o=[];switch(t.type){case"CARD":o.push(t.card.brand&&u(t.card.brand),t.card.last_four_digits);break;case"ONLINE_BANKING":o.push(((n=t.online_banking)==null?void 0:n.variant)&&u(t.online_banking.variant),(i=t.online_banking)==null?void 0:i.owner_name);break;case"DIRECT_DEBIT":o.push(((l=t.direct_debit)==null?void 0:l.variant)&&u(t.direct_debit.variant),(d=t.direct_debit)==null?void 0:d.owner_name);break;case"BUY_NOW_PAY_LATER":o.push(((a=t.buy_now_pay_later)==null?void 0:a.variant)&&u(t.buy_now_pay_later.variant));break;case"DIGITAL_WALLET":o.push(((s=t.digital_wallet)==null?void 0:s.variant)&&u(t.digital_wallet.variant));break}return o.filter(Boolean).join(" ")||u(t.type)}function B(t){const o=e.computed(()=>t.value.map(n=>({value:n.id,label:k(n)}))),r=e.computed(()=>Object.fromEntries(t.value.map(n=>[n.id,n])));return{options:o,paymentMethodsById:r}}const w={class:"sr-only"},A=e.defineComponent({__name:"PaymentMethodSelector",props:{paymentMethods:{type:Array},modelValue:{type:String},label:{type:String},required:{type:Boolean},disabled:{type:Boolean},error:{type:[String,Object,Array]},rootClass:{type:String},showAddOption:{type:Boolean,default:!0},paymentMethodOptions:{type:Array}},emits:["update:modelValue","add-payment-method"],setup(t,{emit:o}){const r=t,n=o,{$t:i}=f.useIntl(),{options:l,paymentMethodsById:d}=B(e.toRef(r,"paymentMethods")),a=e.computed({get:()=>r.modelValue,set:c=>n("update:modelValue",typeof c=="string"?c:void 0)}),s=e.computed(()=>r.paymentMethods.length>0),p=e.computed(()=>{var c;return((c=r.paymentMethodOptions)==null?void 0:c.length)!==0});return(c,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sv-payment-method-selector grid grid-cols-1 gap-2",t.rootClass])},[!s.value&&!p.value?(e.openBlock(),e.createBlock(g._sfc_main,{key:0,class:"sv-payment-method-selector__empty",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"No payment methods available",description:"Shown in place of the payment method choice when the customer has nothing stored and nothing can be added",id:"payment_method_selector.empty_state.title"})),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",null,[s.value?(e.openBlock(),e.createBlock(e.unref(b._sfc_main),{key:0,modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=m=>a.value=m),class:"sv-payment-method-selector__options",name:"payment-method",direction:"column",options:e.unref(l),label:t.label,required:t.required,disabled:t.disabled,error:t.error,"show-radio":!1},{prefix:e.withCtx(({optionValue:m})=>[e.createVNode(e.unref(_._sfc_main),{class:"sv-payment-method-selector__option-content grow","payment-method":e.unref(d)[String(m)]},null,8,["payment-method"])]),label:e.withCtx(({option:m})=>[e.createElementVNode("span",w,e.toDisplayString(m.label),1)]),_:1},8,["modelValue","options","label","required","disabled","error"])):e.createCommentVNode("",!0)]),t.showAddOption&&p.value?(e.openBlock(),e.createBlock(e.unref(h._sfc_main),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-method-selector__add w-full",intent:"secondary","icon-prefix":"add",type:"button",size:"sm",disabled:t.disabled,onClick:y[1]||(y[1]=m=>n("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Add payment method",description:"Label of the button that adds a new payment method",id:"payment_method_selector.add_payment_method"})),1)]),_:1},8,["disabled"])):t.showAddOption?(e.openBlock(),e.createBlock(e.unref(f._sfc_main),{key:1,variant:"body-sm",color:"subtle",tag:"p",class:"sv-payment-method-selector__unavailable"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"There are no available payment methods. Please contact support for more information.",description:"Shown in place of the add button when the customer cannot add any payment method",id:"payment_method_selector.no_payment_methods_available"})),1)]),_:1})):e.createCommentVNode("",!0),t.error&&!s.value?(e.openBlock(),e.createBlock(e.unref(v._sfc_main),{key:2,class:"sv-payment-method-selector__error",message:t.error,variant:"error"},null,8,["message"])):e.createCommentVNode("",!0)],64))],2))}}),C=e.defineComponent({__name:"AddPaymentMethodPane",props:{customer:{type:Object},paymentMethodOptions:{type:Array},isLoading:{type:Boolean},isActive:{type:Boolean}},emits:["success","failure"],setup(t,{expose:o}){const r=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PaymentMethodForm-1d0YIGOu.js")).then(a=>a.default)),n=t,i=e.computed(()=>({variant:"TOKENIZE"})),l=e.ref(!1);e.watch(()=>n.isActive,a=>{l.value=l.value||!!a},{immediate:!0});const d=e.ref();return o({submit:()=>{var a;return(a=d.value)==null?void 0:a.submit()},isSaving:e.computed(()=>{var a;return!!n.isActive&&!!((a=d.value)!=null&&a.isPaymentPending)})}),(a,s)=>t.customer&&l.value?(e.openBlock(),e.createBlock(e.unref(r),{key:0,ref_key:"formRef",ref:d,class:"sv-add-payment-method-pane","hide-submit-button":"",customer:t.customer,"payment-method-options":t.paymentMethodOptions??[],"is-loading":t.isLoading,configuration:i.value,onSuccess:s[0]||(s[0]=p=>a.$emit("success")),onFailure:s[1]||(s[1]=p=>a.$emit("failure",p))},null,8,["customer","payment-method-options","is-loading","configuration"])):e.createCommentVNode("",!0)}});exports._sfc_main=A;exports._sfc_main$1=C;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),m="py-2 px-4 text-sm",f={danger:"text-feedback-danger",neutral:"text-secondary",info:"text-feedback-info",success:"text-feedback-success",warning:"text-feedback-warning"},g={danger:"bg-feedback-danger",neutral:"bg-feedback-neutral",info:"bg-feedback-info",success:"bg-feedback-success",warning:"bg-feedback-warning"},b={danger:"rounded-sm border border-red-200",neutral:"rounded-sm border border-gray-200",info:"rounded-sm border border-blue-200",success:"rounded-sm border border-green-200",warning:"rounded-sm border border-yellow-200"},v="ml-auto -mx-1.5 -my-1.5 rounded focus:ring-2 p-1.5 inline-flex h-8 w-8",C={danger:"hover:bg-red-200 focus:ring-red-400 bg-red-100 text-red-500",neutral:"hover:bg-gray-200 focus:ring-gray-400 bg-feedback-neutral text-gray-500",info:"hover:bg-blue-200 focus:ring-blue-400 bg-blue-100 text-blue-500",success:"bg-green-100 text-green-500 focus:ring-green-400 hover:bg-green-200",warning:"focus:ring-yellow-400 hover:bg-yellow-200 bg-yellow-100 text-yellow-500"};function y(l){const a=e.computed(()=>[m,g[l.type.value],s.value,b[l.type.value],l.inline.value?"flex items-center":""].filter(t=>!!t).join(" ")),s=e.computed(()=>f[l.type.value]??""),r=e.computed(()=>[v,C[l.type.value]??""].filter(t=>!!t).join(" ")),o=e.computed(()=>l.inline.value?!l.icon.value&&!l.title.value?"":l.title.value?"grow ml-1":"grow ml-2":"my-2"),c=e.computed(()=>!l.icon.value||!l.inline.value?["font-medium",l.inline.value?"":"text-lg ml-2"].filter(t=>!!t).join(" "):["font-medium ml-2",l.inline.value?"":"text-lg"].filter(t=>!!t).join(" "));return{alertClasses:a,textClasses:s,closeClasses:r,contentClasses:o,titleClasses:c}}const k={key:0,class:"ml-auto inline-flex items-center"},w=e.defineComponent({__name:"Alert",props:{type:{default:"info"},title:{default:""},closable:{type:Boolean,default:!1},icon:{type:Boolean,default:!0},inline:{type:Boolean,default:!0}},setup(l){const a=l,{alertClasses:s,textClasses:r,closeClasses:o,contentClasses:c,titleClasses:t}=y(e.toRefs(a)),u=e.ref(!0),d=()=>{u.value=!1};return(i,n)=>u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(s)),role:"alert"},[e.createElementVNode("div",{class:e.normalizeClass(l.inline?"flex":"flex items-center")},[l.icon?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["flex-shrink-0","w-5","h-5",e.unref(r)]),fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[...n[0]||(n[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"},null,-1)])],2)):e.createCommentVNode("",!0),l.title?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(t))},e.toDisplayString(l.title),3)):e.createCommentVNode("",!0),!l.inline&&l.closable?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(e.unref(o)),"aria-label":"Close",onClick:d},[...n[1]||(n[1]=[e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),e.createElementVNode("svg",{class:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(c))},[e.renderSlot(i.$slots,"default")],2),i.$slots.actions?(e.openBlock(),e.createElementBlock("div",k,[e.renderSlot(i.$slots,"actions")])):e.createCommentVNode("",!0),l.inline&&l.closable?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:e.normalizeClass(e.unref(o)),"aria-label":"Close",onClick:d},[...n[2]||(n[2]=[e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),e.createElementVNode("svg",{class:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])],2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)}});exports._sfc_main=w;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),a=require("./formatting.es-C72Nsrmh.js"),o=["data-amount"],i=e.defineComponent({__name:"Amount",props:{value:{},highlighted:{type:Boolean,default:!1}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("span",e.mergeProps(n.$attrs,{"data-amount":t.value.quantity,class:[{"font-semibold text-primary-600":t.highlighted},"inline-block"]}),e.toDisplayString(e.unref(a.formatAmount)(t.value)),17,o))}});exports._sfc_main=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),s=require("./Button.vue.es-qGvnOKnK.js"),u=t=>{const n=e.ref(),i=l=>{let a=0;for(let o=0;o<l.length;o++)a=l.charCodeAt(o)+((a<<5)-a);let r="#";for(let o=0;o<3;o++){const c=a>>o*8&255;r+=("00"+c.toString(16)).substr(-2)}return r};return e.watch(()=>t,()=>{n.value=i(t)},{immediate:!0}),n},d=e.defineComponent({__name:"Avatar",props:{initials:{},imageSrc:{},size:{default:"md"},round:{type:Boolean,default:!1},variant:{default:"light"},colorHash:{},font:{default:"icon"},icon:{}},setup(t){const n=t,i={xs:"w-4 h-4",sm:"w-5 h-5",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-12 h-12"},l={xs:"text-base",sm:"text-lg",md:"text-2xl",lg:"text-4xl",xl:"text-6xl"},a=u(n.colorHash??n.initials??"A"),r=e.computed(()=>n.imageSrc?{backgroundImage:`url(${n.imageSrc})`}:void 0);return(o,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative flex shrink-0 items-center justify-center overflow-hidden rounded bg-primary-300 bg-cover",{[i[n.size]]:!0,"rounded-full":t.round,"border border-black border-opacity-5":t.variant==="dark"}]),style:e.normalizeStyle(r.value)},[t.initials&&!t.imageSrc&&!t.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["font-regular z-10 text-2xl font-semibold",{[l[n.size]]:!0,"font-regular":t.font==="icon","font-inter drop-shadow-sm":t.font==="regular","text-white/70":t.variant==="light","text-black/10":t.variant==="dark"}])},e.toDisplayString(t.initials.toUpperCase()),3)):t.icon?(e.openBlock(),e.createBlock(e.unref(s._sfc_main$1),{key:1,icon:t.icon,class:"z-10 text-white"},null,8,["icon"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"pointer-events-none absolute inset-0 opacity-20",style:e.normalizeStyle({backgroundColor:e.unref(a)})},null,4)],6))}});exports._sfc_main=d;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=require("vue"),a=require("./Button.vue.es-qGvnOKnK.js"),l=require("./CustomerBillingInformation.vue.es-bFUx81Ig.js"),u=require("./customElements-C963-LtW.js"),m=require("./Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js"),f=require("./useActionDispatchProvider-CHkVQMaE.js"),_=require("./configuration-akTS7Wiw.js"),v=t.defineComponent({__name:"BillingInformation",props:{customer:{type:Object},isLoading:{type:Boolean},configuration:{type:Object}},emits:["edit-billing-information"],setup(e){const n={showEditButton:!0},o=e,s=t.computed(()=>_.resolveConfiguration(n,o.configuration)),{$t:r}=u.useIntl(),{dispatchAction:c}=f.useActionDispatchProvider();return(d,i)=>e.isLoading?(t.openBlock(),t.createBlock(m._sfc_main,{key:0,variant:"section",class:"sv-billing-information sv-root sv-component sv-loading min-h-[100px]","data-testid":"billing-information-skeleton"})):(t.openBlock(),t.createBlock(t.unref(l._sfc_main),{key:1,class:"sv-billing-information sv-root sv-component",customer:e.customer,"fallback-to-reference":!1},t.createSlots({_:2},[s.value.showEditButton?{name:"settings",fn:t.withCtx(()=>[t.createVNode(t.unref(a._sfc_main),{size:"sm",intent:"subtle","icon-prefix":"edit",class:"sv-action sv-action--ghost sv-billing-information__edit",onClick:i[0]||(i[0]=g=>t.unref(c)({action:"edit-billing-information"}))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)({defaultMessage:"Edit",id:"customer_overview.billing_information_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer billing information"})),1)]),_:1})]),key:"0"}:void 0]),1032,["customer"]))}});exports._sfc_main=v;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),w=require("./customElements-C963-LtW.js"),k={class:"h-full w-full",xmlns:"http://www.w3.org/2000/svg",viewbox:"0 0 48 48"},z=["xlink:href"],h=e.defineComponent({__name:"Icon",props:{icon:{},size:{default:"sm"},variant:{default:"default"}},setup(t){const n={"3xs":"w-[10px] h-[10px]","2xs":"w-[14px] h-[14px]",xs:"w-[16px] h-[16px]",sm:"w-[20px] h-[20px]",base:"w-[22px] h-[22px]",md:"w-[24px] h-[24px]",lg:"w-[32px] h-[32px]",xl:"w-[48px] h-[48px]"};return(s,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["icon inline-flex items-center justify-center align-middle leading-none",[n[t.size],{"rounded border bg-gray-50 p-1 selection:drop-shadow-sm":t.variant==="contained"}]])},[(e.openBlock(),e.createElementBlock("svg",k,[e.createElementVNode("use",{"xlink:href":`#${t.icon}`},null,8,z)]))],2))}}),B={primary:{rest:"border border-transparent bg-primary-600 text-white",interactive:"hover:bg-primary-700 active:bg-primary-800",focus:"focus-visible:outline-primary-600"},secondary:{rest:"border border-gray-200 bg-white text-gray-900",interactive:"hover:bg-gray-50 active:bg-gray-100",focus:"focus-visible:outline-gray-500"},subtle:{rest:"border border-transparent bg-transparent text-gray-700",interactive:"hover:bg-gray-100 hover:text-gray-900 active:bg-gray-200",focus:"focus-visible:outline-gray-500"},danger:{rest:"border border-transparent bg-red-700 text-white",interactive:"hover:bg-red-800 active:bg-red-900",focus:"focus-visible:outline-red-700"},dangerSecondary:{rest:"border border-red-200 bg-white text-red-700",interactive:"hover:bg-red-50 active:bg-red-100",focus:"focus-visible:outline-red-700"}},C={intent:"primary",size:"md",pill:!1,square:!1,loading:!1,disabled:!1,iconPrefix:void 0,iconSuffix:void 0,tag:"button",preventDoubleClick:!0},c=(...t)=>{const n=new Set;for(const s of t)if(s)for(const l of s.split(/\s+/))l&&n.add(l);return[...n].join(" ")},S=["relative inline-flex shrink-0 items-center justify-center overflow-clip","whitespace-nowrap rounded font-medium transition-colors","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"].join(" "),R={xs:"h-6",sm:"h-8",md:"h-10",lg:"h-12"},V={xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10",lg:"w-12 h-12"},$={xs:"py-1",sm:"py-1.5",md:"py-2",lg:"py-3"},_={xs:"gap-0.5",sm:"gap-1.5",md:"gap-2",lg:"gap-3"},E={xs:{compactLeft:"pl-1",compactRight:"pr-1",spaciousLeft:"pl-1",spaciousRight:"pr-1"},sm:{compactLeft:"pl-1.5",compactRight:"pr-1.5",spaciousLeft:"pl-3",spaciousRight:"pr-3"},md:{compactLeft:"pl-2",compactRight:"pr-2",spaciousLeft:"pl-4",spaciousRight:"pr-4"},lg:{compactLeft:"pl-3",compactRight:"pr-3",spaciousLeft:"pl-6",spaciousRight:"pr-6"}};function L(t){const n=e.useSlots(),s=e.computed(()=>!!(n.prefix||t.iconPrefix.value)),l=e.computed(()=>!!(n.suffix||t.iconSuffix.value)),i=e.computed(()=>!!n.default),r=e.computed(()=>!i.value&&(s.value||l.value)),u=e.computed(()=>{var o;return(o=t.square)!=null&&o.value?V[t.size.value]:R[t.size.value]}),d=e.computed(()=>{var o;if((o=t.square)!=null&&o.value)return"";const a=E[t.size.value],b=r.value||s.value,y=r.value||l.value;return c($[t.size.value],b?a.compactLeft:a.spaciousLeft,y?a.compactRight:a.spaciousRight)}),f=e.computed(()=>{const o=B[t.intent.value??C.intent],a=!t.loading.value&&!t.disabled.value;return c(o.rest,o.focus,a&&o.interactive)}),p=e.computed(()=>t.pill.value?"!rounded-full":""),m=e.computed(()=>t.disabled.value||t.loading.value?"cursor-not-allowed opacity-50":""),v=e.computed(()=>c(S,f.value,u.value,d.value,p.value,m.value)),g=e.computed(()=>c("flex items-center justify-center",_[t.size.value],t.loading.value?"opacity-0":""));return{wrapperClasses:v,spanClasses:g}}const N={xs:"2",sm:"3",md:"4",lg:"5"},j={primary:"white",secondary:"gray",subtle:"gray",danger:"white",dangerSecondary:"red"};function P(t){const n=e.computed(()=>N[t.size.value]),s=e.computed(()=>j[t.intent.value]);return{size:n,color:s}}function D(t=500){const n=e.ref(!1);function s(l){if(!n.value){n.value=!0;try{l()}finally{setTimeout(()=>{n.value=!1},t)}}}return{isClicked:n,handleClick:s}}const q={0:"w-0 h-0","0.5":"w-0.5 h-0.5",1:"w-1 h-1","1.5":"w-1.5 h-1.5",10:"w-10 h-10",11:"w-11 h-11",12:"w-12 h-12",2:"w-2 h-2","2.5":"w-2.5 h-2.5",3:"w-3 h-3",4:"w-4 h-4",5:"w-5 h-5",6:"w-6 h-6",7:"w-7 h-7",8:"w-8 h-8",9:"w-9 h-9",px:"w-px h-px"},I={primary:"fill-primary-600",blue:"fill-blue-600",gray:"fill-gray-600",green:"fill-green-500",pink:"fill-pink-600",purple:"fill-purple-600",red:"fill-red-600",yellow:"fill-yellow-400",white:"fill-white"};function M(t){const n=e.computed(()=>q[t.size.value]),s=e.computed(()=>I[t.color.value]),l="text-gray-200",i="animate-spin";return{spinnerClasses:e.computed(()=>[n.value,l,s.value,i].join(" "))}}const x=e.defineComponent({__name:"Spinner",props:{size:{default:"4"},color:{default:"primary"}},setup(t){const n=t,{spinnerClasses:s}=M(e.toRefs(n));return(l,i)=>(e.openBlock(),e.createElementBlock("svg",{role:"status",class:e.normalizeClass(e.unref(s)),viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[...i[0]||(i[0]=[e.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"},null,-1)])],2))}}),Z={key:0,class:"absolute bottom-0 left-0 right-0 top-0 flex items-center justify-center bg-inherit"},H={key:0,class:"flex items-center justify-center"},F={key:2,class:"flex items-center justify-center"},G=e.defineComponent({__name:"Button",props:e.mergeDefaults({type:{},intent:{},size:{},pill:{type:Boolean},square:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},iconPrefix:{},iconSuffix:{},tag:{},preventDoubleClick:{type:Boolean}},C),emits:["click"],setup(t,{emit:n}){const s=t,l=n,i=e.computed(()=>{switch(s.size){case"xs":return"2xs";case"sm":return"xs";default:return"sm"}}),r=e.computed(()=>i.value==="xs"?"4":"5"),u=e.computed(()=>["xs","sm"].includes(s.size)?"body-xs":"body-sm"),{wrapperClasses:d,spanClasses:f}=L(e.toRefs(s)),{color:p}=P(e.toRefs(s)),{handleClick:m}=D(),v=e.computed(()=>s.tag==="button"&&(s.disabled||s.loading)),g=o=>{if(s.preventDoubleClick===!1){l("click",o);return}m(()=>{l("click",o)})};return(o,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{class:e.normalizeClass(e.unref(d)),type:t.tag==="button"?t.type:void 0,disabled:v.value,onClick:g},{default:e.withCtx(()=>[t.loading?(e.openBlock(),e.createElementBlock("span",Z,[e.createVNode(e.unref(x),{size:r.value,color:e.unref(p)},null,8,["size","color"])])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(f))},[t.iconPrefix||o.$slots.prefix?(e.openBlock(),e.createElementBlock("span",H,[e.renderSlot(o.$slots,"prefix",{},()=>[e.createVNode(e.unref(h),{icon:t.iconPrefix,size:i.value,class:"overflow-clip"},null,8,["icon","size"])])])):e.createCommentVNode("",!0),o.$slots.default?(e.openBlock(),e.createBlock(e.unref(w._sfc_main),{key:1,tag:"span",variant:u.value,color:"inherit",class:"leading-none"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["variant"])):e.createCommentVNode("",!0),t.iconSuffix||o.$slots.suffix?(e.openBlock(),e.createElementBlock("span",F,[e.renderSlot(o.$slots,"suffix",{},()=>[e.createVNode(e.unref(h),{icon:t.iconSuffix,size:i.value},null,8,["icon","size"])])])):e.createCommentVNode("",!0)],2)]),_:3},8,["class","type","disabled"]))}});exports._sfc_main=G;exports._sfc_main$1=h;exports._sfc_main$2=x;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Q=require("./formControl-ODrpUvcA.js"),Ae=require("./formatting.es-C72Nsrmh.js"),y=require("./Button.vue.es-qGvnOKnK.js"),q=require("./SubscriptionDetails.entry.ce-D4CsSoR9.js"),ee=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js"),Te=require("./PaymentMethod.vue.es-CJcSZ9lN.js"),p=require("./customElements-C963-LtW.js"),Pe=require("./ErrorNotification.vue.es-BX9dHEc-.js"),pe=require("./FormMessage.vue.es-dqATjC2N.js"),Be=require("./RadioGroupExtended.vue.es-Dt6LH9Yh.js"),xe=require("./StepInput.vue.es-mAnuCuDQ.js"),Se=require("./IconButton.vue.es-Bwdfu-jm.js"),Ve=require("./floating-ui.vue.es-Bly3DGWm.js"),Oe=require("./Section.vue.es-zVXBHAL6.js"),Le=require("./invoices-ClqTWYF9.js"),F=require("./CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js"),P=t=>t.replaceAll("_"," ").toLowerCase().replace(/^./,m=>m.toUpperCase()),Re=t=>{var m,o,h,a,_,i;const c=[];switch(t.type){case"CARD":c.push(t.card.brand&&P(t.card.brand),t.card.last_four_digits);break;case"ONLINE_BANKING":c.push(((m=t.online_banking)==null?void 0:m.variant)&&P(t.online_banking.variant),(o=t.online_banking)==null?void 0:o.owner_name);break;case"DIRECT_DEBIT":c.push(((h=t.direct_debit)==null?void 0:h.variant)&&P(t.direct_debit.variant),(a=t.direct_debit)==null?void 0:a.owner_name);break;case"BUY_NOW_PAY_LATER":c.push(((_=t.buy_now_pay_later)==null?void 0:_.variant)&&P(t.buy_now_pay_later.variant));break;case"DIGITAL_WALLET":c.push(((i=t.digital_wallet)==null?void 0:i.variant)&&P(t.digital_wallet.variant));break}return c.filter(Boolean).join(" ")||P(t.type)},Fe=e.defineComponent({__name:"Placeholder",props:{loading:{type:Boolean},shade:{default:"default"}},setup(t){return(m,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded",{"bg-gray-300":t.shade==="default","bg-gray-200":t.shade==="light"}])},[t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute inset-0",{"animated-gradient":t.loading}])},null,2)):e.createCommentVNode("",!0)],2))}}),Z=Ve._export_sfc(Fe,[["__scopeId","data-v-11677ac2"]]),qe={class:"flex flex-col gap-6"},$e={class:"flex flex-col gap-3","aria-labelledby":"charge-on-demand-items-heading"},Ye={class:"flex flex-col gap-2"},Ue={class:"flex min-w-0 grow flex-col"},ze={key:0,class:"flex shrink-0 items-center gap-1"},He={class:"w-32"},Ge={class:"flex flex-col gap-3","aria-labelledby":"charge-on-demand-preview-heading"},We={key:1,class:"flex flex-col gap-3","aria-busy":"true","data-testid":"charge-on-demand-preview-loading"},je={class:"flex flex-col gap-3","aria-labelledby":"charge-on-demand-payment-heading"},Ke={key:1,"data-testid":"charge-on-demand-no-payment-methods"},Xe=e.defineComponent({__name:"ChargeOnDemandEditor",props:e.mergeModels({items:{},preview:{default:void 0},isPreviewLoading:{type:Boolean,default:!1},paymentMethods:{},canAddPaymentMethod:{type:Boolean,default:!1},errors:{default:void 0},disabled:{type:Boolean,default:!1}},{selection:{required:!0},selectionModifiers:{},paymentMethodId:{},paymentMethodIdModifiers:{}}),emits:e.mergeModels(["add-payment-method"],["update:selection","update:paymentMethodId"]),setup(t){const m=t,o=e.useModel(t,"selection"),h=e.useModel(t,"paymentMethodId"),{$t:a}=p.useIntl(),_=n=>{o.value=[...o.value,n.priceType==="FLAT"?{pricingItemId:n.pricingItemId,units:n.defaultUnits}:{pricingItemId:n.pricingItemId}]},i=n=>{o.value=o.value.filter(({pricingItemId:u})=>u!==n.pricingItemId)},c=(n,u)=>{!Number.isInteger(u)||u<1||(o.value=o.value.map(g=>g.pricingItemId===n.pricingItemId?{...g,units:u}:g))},{getPriceLabel:v}=q.useChargeOnDemandPriceLabel(),I=e.computed(()=>new Map(o.value.map(n=>[n.pricingItemId,n]))),k=e.computed(()=>m.items.map(n=>{var u,g;return{item:n,selected:I.value.get(n.pricingItemId),error:(g=(u=m.errors)==null?void 0:u.items)==null?void 0:g[n.pricingItemId],priceLabel:v(n)}})),l=e.computed(()=>new Map(m.paymentMethods.map(n=>[n.id,n]))),w=e.computed(()=>m.paymentMethods.map(n=>({label:Re(n),value:n.id})));return(n,u)=>{var g,M,S;return e.openBlock(),e.createElementBlock("div",qe,[(g=t.errors)!=null&&g.form?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,description:t.errors.form},null,8,["description"])):e.createCommentVNode("",!0),e.createElementVNode("section",$e,[e.createVNode(p._sfc_main,{id:"charge-on-demand-items-heading",tag:"h3",variant:"label","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Items",description:"Heading of the list of on-demand items that can be ordered",id:"charge_on_demand.items.heading"})),1)]),_:1}),e.createElementVNode("ul",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,({item:s,selected:b,error:C,priceLabel:V})=>(e.openBlock(),e.createElementBlock("li",{key:s.pricingItemId,class:"flex flex-col gap-1","data-testid":"charge-on-demand-item"},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center gap-4 rounded-lg border px-4 py-3",{"border-red-600":C,"border-primary-600":!C&&b,"border-gray-300":!C&&!b}])},[e.createElementVNode("div",Ue,[e.createVNode(p._sfc_main,{tag:"span",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.name),1)]),_:2},1024),V?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,tag:"span",variant:"body-sm",color:"secondary","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V),1)]),_:2},1024)):e.createCommentVNode("",!0)]),s.priceType==="FLAT"&&b?(e.openBlock(),e.createElementBlock("div",ze,[e.createElementVNode("div",He,[e.createVNode(xe._sfc_main,{"model-value":b.units??s.defaultUnits,"initial-value":s.defaultUnits,min:1,name:`charge-on-demand-units-${s.pricingItemId}`,disabled:t.disabled,size:"sm","onUpdate:modelValue":N=>c(s,N)},null,8,["model-value","initial-value","name","disabled","onUpdate:modelValue"])]),e.createVNode(Se._sfc_main,{type:"button",icon:"close",intent:"subtle",size:"sm",disabled:t.disabled,tooltip:e.unref(a)({defaultMessage:"Remove",description:"Removes an on-demand item from the order",id:"charge_on_demand.item.remove"}),onClick:N=>i(s)},null,8,["disabled","tooltip","onClick"])])):b?(e.openBlock(),e.createBlock(y._sfc_main,{key:1,type:"button",intent:"secondary",size:"sm","icon-prefix":"check","aria-pressed":!0,disabled:t.disabled,onClick:N=>i(s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Added",description:"Label of an on-demand item that is in the order; clicking it removes the item",id:"charge_on_demand.item.added"})),1)]),_:1},8,["disabled","onClick"])):(e.openBlock(),e.createBlock(y._sfc_main,{key:2,type:"button",intent:"secondary",size:"sm","icon-prefix":"add","aria-pressed":s.priceType==="FIXED"?!1:void 0,disabled:t.disabled,onClick:N=>_(s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Add",description:"Adds an on-demand item to the order",id:"charge_on_demand.item.add"})),1)]),_:1},8,["aria-pressed","disabled","onClick"]))],2),C?(e.openBlock(),e.createBlock(pe._sfc_main,{key:0,message:C},null,8,["message"])):e.createCommentVNode("",!0)]))),128))])]),e.createElementVNode("section",Ge,[e.createVNode(p._sfc_main,{id:"charge-on-demand-preview-heading",tag:"h3",variant:"label","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"You will pay",description:"Heading of the invoice preview of the on-demand order",id:"charge_on_demand.preview.heading"})),1)]),_:1}),o.value.length===0?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,variant:"body-sm",tag:"p",color:"subtle","no-spacing":"","data-testid":"charge-on-demand-preview-empty"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Add an item to see what you'll pay.",description:"Shown instead of the invoice preview while no item is added",id:"charge_on_demand.preview.empty"})),1)]),_:1})):t.isPreviewLoading&&!t.preview?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(Z,{loading:"",class:"relative h-4 w-2/3 overflow-hidden"}),e.createVNode(Z,{loading:"",class:"relative h-4 w-1/2 overflow-hidden"}),e.createVNode(Z,{loading:"",class:"relative h-5 w-1/3 overflow-hidden"})])):t.preview?(e.openBlock(),e.createBlock(ee._sfc_main$1,{key:2,invoice:t.preview,"is-customer-facing":""},null,8,["invoice"])):e.createCommentVNode("",!0)]),e.createElementVNode("section",je,[e.createVNode(p._sfc_main,{id:"charge-on-demand-payment-heading",tag:"h3",variant:"label","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Payment method",description:"Heading of the payment method picker of the on-demand order",id:"charge_on_demand.payment_method.heading"})),1)]),_:1}),t.paymentMethods.length>0?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,modelValue:h.value,"onUpdate:modelValue":u[0]||(u[0]=s=>h.value=s),name:"charge-on-demand-payment-method",options:w.value,"show-radio":!1,error:(M=t.errors)==null?void 0:M.paymentMethod,disabled:t.disabled,direction:"column"},{label:e.withCtx(({optionValue:s})=>[l.value.get(s)?(e.openBlock(),e.createBlock(Te._sfc_main,{key:0,"payment-method":l.value.get(s)},null,8,["payment-method"])):e.createCommentVNode("",!0)]),description:e.withCtx(()=>[...u[2]||(u[2]=[])]),_:1},8,["modelValue","options","error","disabled"])):(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(n.$slots,"payment-methods-empty",{},()=>[e.createVNode(p._sfc_main,{tag:"p",color:"subtle",variant:"body-sm","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"There is no saved payment method that can pay for this order.",description:"Shown when no saved payment method can pay the on-demand order",id:"charge_on_demand.payment_method.empty"})),1)]),_:1})]),(S=t.errors)!=null&&S.paymentMethod?(e.openBlock(),e.createBlock(pe._sfc_main,{key:0,message:t.errors.paymentMethod},null,8,["message"])):e.createCommentVNode("",!0)])),t.canAddPaymentMethod?(e.openBlock(),e.createBlock(y._sfc_main,{key:2,type:"button",intent:"secondary","icon-prefix":"add",disabled:t.disabled,"data-testid":"charge-on-demand-add-payment-method",onClick:u[1]||(u[1]=s=>n.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Add payment method",description:"Opens the form to add a payment method for the on-demand order",id:"charge_on_demand.payment_method.add"})),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0)])])}}}),Je=["ORDER","ADD_PAYMENT_METHOD","PLACED","PAYMENT_FAILED","FAILED"];function Qe(t){return t.payment_status==="PAID"||t.payment_status==="OVERPAID"}function Ze(t){var m;return p.isApiError(t)?t.statusCode===422?t.resourceType==="PAYMENT"?"PAYMENT_FAILED":"FAILED":t.statusCode!==400?"FAILED":t.field==="payment_method_id"?"PAYMENT_METHOD":t.field==="pricing_plan_subscription_id"?"SUBSCRIPTION_INACTIVE":t.field==="pricing_items"||(m=t.field)!=null&&m.startsWith("pricing_items.")?"PRICING_ITEMS":"FAILED":"FAILED"}function et(t){return t==="PAYMENT_METHOD"||t==="PRICING_ITEMS"||t==="SUBSCRIPTION_INACTIVE"}function tt({pricingPlanScheduleId:t}){const{chargeOnDemandPricingItems:m}=Le.createInvoicesService(),o=p.useLogger(),h=e.ref(!1),a=e.ref(),_=e.ref(),i=e.ref();return{isCharging:h,chargedInvoice:a,chargeError:_,unpaidInvoiceId:i,charge:async({pricingItems:I,paymentMethodId:k})=>{h.value=!0,_.value=void 0,i.value=void 0;try{const l=await m({pricing_plan_schedule_id:t.value,pricing_items:I,payment_method_id:k,finalize_immediately:!0});return a.value=l,{invoice:l}}catch(l){const w=Ze(l);_.value=w,i.value=w==="PAYMENT_FAILED"&&p.isApiError(l)?l.resourceId:void 0;const n={scheduleId:t.value,outcome:w,...p.isApiError(l)?{statusCode:l.statusCode,field:l.field,requestId:l.requestId}:{}};return w==="FAILED"?o.error("ON_DEMAND_CHARGE_FAILED","Failed to charge the on-demand order",n,l):o.warn("ON_DEMAND_CHARGE_REFUSED","The on-demand order was refused or its payment did not go through",n,l),{error:w,unpaidInvoiceId:i.value}}finally{h.value=!1}},reset:()=>{a.value=void 0,_.value=void 0,i.value=void 0}}}const at={key:0,class:"flex flex-col gap-2"},nt={key:1,class:"flex flex-col gap-2"},ot={key:2,class:"flex flex-col gap-2"},dt=e.defineComponent({__name:"ChargeOnDemandModal",props:{showModal:{type:Boolean},subscription:{type:Object},scheduleId:{type:String},items:{type:Array},customer:{type:Object},paymentMethods:{type:Array},canViewCreatedInvoice:{type:Boolean}},emits:["close","invoice-created","view-invoice","payment-method-stored","payment-failed"],setup(t,{emit:m}){const o=t,h=m,{$t:a}=p.useIntl(),_=p.useLogger(),i=e.ref("ORDER"),c=e.ref([]),v=e.ref(),I=e.computed(()=>(o.subscription.payment_acceptor_ids??[]).length>0),k=e.computed(()=>q.getPayablePaymentMethods(o.paymentMethods??[],o.subscription)),l=e.ref();e.watch(k,d=>{var A;const r=l.value;l.value=void 0;const f=r?d.find(({id:T})=>!r.has(T)):void 0;if(f){v.value=f.id;return}d.some(({id:T})=>T===v.value)||(v.value=(A=d[0])==null?void 0:A.id)},{immediate:!0});const{paneRef:w,isActive:n,isSaving:u,open:g,leave:M,submit:S}=F.useAddPaymentMethodStep({step:i,name:"ADD_PAYMENT_METHOD",returnTo:"ORDER"}),s=e.ref(!1),b=e.ref(),C=d=>{s.value=!0,_.error("PAYMENT_METHOD_OPTIONS_LOAD_FAILED","Failed to load the payment methods that can be offered",{flow:"ON_DEMAND_ORDER",subscriptionId:o.subscription.id},d),n.value&&(M(),b.value=a({defaultMessage:"We couldn't load the ways to add a payment method. Please try again.",description:"Shown on the on-demand order when the payment methods that can be added failed to load",id:"charge_on_demand_modal.payment_method_options_error"}))},{settledOptions:V,isPending:N,load:ve}=F.useCustomerPaymentMethodOptions({isOpen:e.computed(()=>o.showModal&&I.value),customer:e.computed(()=>o.customer),subscriptionId:e.computed(()=>o.subscription.id),onError:C}),fe=e.computed(()=>{var d;return(d=V.value)==null?void 0:d.filter(({payment_acceptor:r})=>(o.subscription.payment_acceptor_ids??[]).includes(r.id))}),_e=()=>{b.value=void 0,s.value&&(s.value=!1,ve()),g()},ge=()=>{l.value=new Set(k.value.map(({id:d})=>d)),M(),h("payment-method-stored")},te=e.reactive({lines:e.computed(()=>c.value.map(({pricingItemId:d,units:r})=>{var f;return{pricingItemId:d,priceType:(f=o.items.find(A=>A.pricingItemId===d))==null?void 0:f.priceType,units:r}}))}),ae=Q.useValidation({lines:{$each:Q.common.forEach({units:{orderable:Q.common.withMessage(()=>a({defaultMessage:"Enter a whole number of 1 or more.",description:"Shown under the quantity of an on-demand order item that is not a whole number of 1 or more",id:"charge_on_demand_modal.units_error"}),(d,r)=>r.priceType!=="FLAT"||q.isOrderableUnits(d))}})}},te),$=e.computed(()=>ae.value.lines.$invalid),ne=e.computed(()=>{const{$errors:d=[]}=ae.value.lines.$each.$response??{},r=te.lines.flatMap(({pricingItemId:f},A)=>{var ue,me,he;const T=(he=(me=(ue=d[A])==null?void 0:ue.units)==null?void 0:me[0])==null?void 0:he.$message;return T?[[f,String(T)]]:[]});return r.length>0?Object.fromEntries(r):void 0}),oe=e.computed(()=>c.value.length>0&&!$.value?q.toChargePricingItems(c.value,o.items):void 0),{invoicePreview:de,isPreviewPending:O,hasPreviewFailed:ie,loadPreview:ye}=F.useChargeOnDemandInvoicePreview({pricingPlanScheduleId:e.computed(()=>o.scheduleId),pricingItems:oe}),Y=e.computed(()=>{var d;return(d=de.value)==null?void 0:d.invoice_amount_including_tax}),{isCharging:E,chargedInvoice:B,chargeError:D,unpaidInvoiceId:U,charge:be,reset:we}=tt({pricingPlanScheduleId:e.computed(()=>o.scheduleId)}),Ie=e.computed(()=>{switch(D.value){case"PAYMENT_METHOD":return a({defaultMessage:"This payment method can't pay for this order. Choose another one.",description:"Shown on the on-demand order when the chosen payment method cannot pay for it",id:"charge_on_demand_modal.charge_error.payment_method"});case"PRICING_ITEMS":return a({defaultMessage:"Some items in your order can't be ordered as entered. Check your order and try again.",description:"Shown on the on-demand order when an item, its quantity or its amount was not accepted",id:"charge_on_demand_modal.charge_error.pricing_items"});case"SUBSCRIPTION_INACTIVE":return a({defaultMessage:"This subscription can't take orders right now.",description:"Shown on the on-demand order when the subscription is not active, so nothing can be ordered on it",id:"charge_on_demand_modal.charge_error.subscription_inactive"});default:return}}),ke=e.computed(()=>D.value==="SUBSCRIPTION_INACTIVE");e.watch(v,()=>{D.value==="PAYMENT_METHOD"&&(D.value=void 0)}),e.watch(c,()=>{D.value==="PRICING_ITEMS"&&(D.value=void 0)},{deep:!0});const Ce=e.computed(()=>ie.value?a({defaultMessage:"We couldn't calculate the total. Please try again.",description:"Shown on the on-demand order when its total failed to load",id:"charge_on_demand_modal.preview_error"}):void 0),z=e.computed(()=>ie.value&&!O.value&&!E.value),re=e.computed(()=>Ie.value??Ce.value??b.value),Ee=e.computed(()=>re.value||ne.value?{form:re.value,items:ne.value}:void 0),L=e.computed(()=>i.value==="PLACED"),R=e.computed(()=>!!B.value&&Qe(B.value)),se=e.computed(()=>i.value==="PAYMENT_FAILED"||i.value==="FAILED"),le=e.computed(()=>!E.value&&I.value&&!ke.value&&c.value.length>0&&!$.value&&!!v.value&&!!Y.value&&!O.value),Me=e.computed(()=>i.value==="PLACED"?a({defaultMessage:"Order placed",description:"Title of the on-demand order modal once the order is placed, paid or not",id:"charge_on_demand_modal.placed.title"}):i.value==="PAYMENT_FAILED"?a({defaultMessage:"Payment not completed",description:"Title of the on-demand order modal when the payment for the order could not be made",id:"charge_on_demand_modal.payment_failed.title"}):i.value==="FAILED"?a({defaultMessage:"Something went wrong",description:"Title of the on-demand order modal when the order failed and it is unknown whether it went through",id:"charge_on_demand_modal.failed.title"}):n.value?a({defaultMessage:"Add payment method",description:"Title of the on-demand order modal while the customer is adding a payment method",id:"charge_on_demand_modal.add_payment_method.title"}):a({defaultMessage:"Order on-demand items",description:"Title of the modal for ordering the on-demand items of a subscription",id:"charge_on_demand_modal.title"})),Ne=e.computed(()=>i.value==="PLACED"?R.value?a({defaultMessage:"Your order is paid. The invoice is in your invoice list.",description:"Subtitle of the on-demand order modal once the order has been paid",id:"charge_on_demand_modal.success.subtitle"}):a({defaultMessage:"Your invoice was created, but it isn't paid yet. You'll find it in your invoice list.",description:"Subtitle of the on-demand order modal when the order was placed but its invoice is not paid",id:"charge_on_demand_modal.placed.unpaid.subtitle"}):i.value==="PAYMENT_FAILED"&&U.value?a({defaultMessage:"We couldn't take the payment for this order. Its invoice is in your invoice list, waiting to be paid.",description:"Subtitle of the on-demand order modal when the order was placed but the payment for its invoice was refused",id:"charge_on_demand_modal.payment_failed.unpaid_invoice.subtitle"}):i.value==="PAYMENT_FAILED"?a({defaultMessage:"We couldn't take the payment for this order. If an invoice was created, you'll find it in your invoice list.",description:"Subtitle of the on-demand order modal when the payment for the order could not be made",id:"charge_on_demand_modal.payment_failed.subtitle"}):i.value==="FAILED"?a({defaultMessage:"We couldn't complete your order. Check your invoice list before trying again.",description:"Subtitle of the on-demand order modal when the order failed and it is unknown whether it went through",id:"charge_on_demand_modal.failed.subtitle"}):n.value?a({defaultMessage:"Add a payment method to pay for this order.",description:"Subtitle of the on-demand order modal while the customer is adding a payment method",id:"charge_on_demand_modal.add_payment_method.subtitle"}):void 0),ce=e.computed(()=>n.value?a({defaultMessage:"Back",description:"Leaves the add payment method step of the on-demand order modal for the order",id:"charge_on_demand_modal.back_button.label"}):a({defaultMessage:"Cancel",description:"Closes the modal for ordering on-demand items",id:"charge_on_demand_modal.cancel_button.label"})),x=e.computed(()=>L.value?a({defaultMessage:"Done",description:"Closes the on-demand order modal once the order is placed",id:"charge_on_demand_modal.done_button.label"}):se.value?a({defaultMessage:"Close",description:"Closes the on-demand order modal when the order did not go through",id:"charge_on_demand_modal.close_button.label"}):n.value?a({defaultMessage:"Save payment method",description:"Confirm button of the on-demand order modal while the customer is adding a payment method",id:"charge_on_demand_modal.save_payment_method.label"}):c.value.length===0?a({defaultMessage:"Add an item to continue",description:"Disabled pay button of the on-demand order while no item is added",id:"charge_on_demand_modal.confirm_button.no_items"}):$.value?a({defaultMessage:"Check the quantities to continue",description:"Disabled pay button of the on-demand order while an item has a quantity that cannot be ordered",id:"charge_on_demand_modal.confirm_button.invalid_units"}):z.value?a({defaultMessage:"Calculate total again",description:"Pay button of the on-demand order when its total failed to load",id:"charge_on_demand_modal.confirm_button.retry_preview"}):!Y.value||O.value?a({defaultMessage:"Updating total…",description:"Disabled pay button of the on-demand order while its total is calculated",id:"charge_on_demand_modal.confirm_button.updating"}):a({defaultMessage:"Pay {total}",description:"Pay button of the on-demand order, with the total it charges",id:"charge_on_demand_modal.confirm_button.pay"},{total:Ae.formatAmount(Y.value)})),De=async()=>{const d=oe.value;if(!le.value||!d||!v.value)return;const r=await be({pricingItems:d,paymentMethodId:v.value});"invoice"in r?(h("invoice-created",r.invoice),i.value="PLACED"):et(r.error)||(i.value=r.error)},H=()=>{if(n.value){S();return}if(z.value){ye();return}De()},G=()=>{h("close")},W=e.computed(()=>L.value&&!R.value&&o.canViewCreatedInvoice),j=e.computed(()=>i.value==="PAYMENT_FAILED"&&!!U.value&&o.canViewCreatedInvoice),K=e.computed(()=>a({defaultMessage:"Go to invoice",description:"Opens the invoice of the on-demand order the customer just placed",id:"charge_on_demand_modal.view_invoice_button.label"})),X=()=>{var r;const d=((r=B.value)==null?void 0:r.id)??U.value;G(),d&&h("view-invoice",d)},J=()=>{if(!(u.value||E.value)){if(L.value){G();return}if(n.value){M();return}h("close")}};return e.watch(()=>o.showModal,d=>{d&&(i.value="ORDER",c.value=[],l.value=void 0,we(),b.value=void 0)}),(d,r)=>(e.openBlock(),e.createBlock(F._sfc_main$1,{ref_key:"addPaymentMethodRef",ref:w,class:"sv-charge-on-demand-modal","show-modal":t.showModal,title:Me.value,"sub-title":Ne.value,"cancel-button-text":ce.value,"confirm-button-text":x.value,"is-pending":e.unref(u)||e.unref(E),panes:e.unref(Je),step:i.value,"add-payment-method-pane":"ADD_PAYMENT_METHOD",customer:t.customer,"payment-method-options":fe.value,"is-payment-method-options-pending":e.unref(N),"is-adding-payment-method":e.unref(n),onConfirm:H,onCancel:J,onPaymentSuccess:ge,onPaymentFailed:r[2]||(r[2]=f=>d.$emit("payment-failed",f))},{ORDER:e.withCtx(()=>[I.value?(e.openBlock(),e.createBlock(e.unref(Xe),{key:0,selection:c.value,"onUpdate:selection":r[0]||(r[0]=f=>c.value=f),"payment-method-id":v.value,"onUpdate:paymentMethodId":r[1]||(r[1]=f=>v.value=f),class:"sv-charge-on-demand-modal__form",items:t.items,preview:e.unref(de),"is-preview-loading":e.unref(O),"payment-methods":k.value,errors:Ee.value,disabled:e.unref(E),"can-add-payment-method":"",onAddPaymentMethod:_e},null,8,["selection","payment-method-id","items","preview","is-preview-loading","payment-methods","errors","disabled"])):(e.openBlock(),e.createBlock(ee._sfc_main,{key:1,class:"sv-charge-on-demand-modal__unavailable",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Ordering isn't available",description:"Title shown instead of the on-demand order form when the subscription cannot take payments",id:"charge_on_demand_modal.unavailable.title"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"This subscription can't take payments here. Contact us to order these items.",description:"Message shown instead of the on-demand order form when the subscription cannot take payments",id:"charge_on_demand_modal.unavailable.message"})),1)]),_:1}))]),PLACED:e.withCtx(()=>[e.unref(B)?(e.openBlock(),e.createBlock(e.unref(Oe._sfc_main),{key:0,class:"sv-charge-on-demand-modal__receipt","content-background":"none"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee._sfc_main$1),{invoice:e.unref(B),"is-customer-facing":"","is-paid":R.value},null,8,["invoice","is-paid"])]),_:1})):e.createCommentVNode("",!0)]),footer:e.withCtx(()=>[L.value?(e.openBlock(),e.createElementBlock("div",at,[W.value?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary","data-testid":"charge-on-demand-view-invoice",onClick:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{size:"lg",intent:W.value?"subtle":"primary",class:e.normalizeClass(["sv-action",W.value?"sv-action--secondary":"sv-action--primary"]),"data-testid":"charge-on-demand-done",onClick:G},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["intent","class"]),R.value&&t.canViewCreatedInvoice?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:1,size:"lg",intent:"subtle",class:"sv-action sv-action--secondary","data-testid":"charge-on-demand-view-invoice",onClick:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value),1)]),_:1})):e.createCommentVNode("",!0)])):se.value?(e.openBlock(),e.createElementBlock("div",nt,[j.value?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary","data-testid":"charge-on-demand-view-invoice",onClick:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{size:"lg",intent:j.value?"subtle":"primary",class:e.normalizeClass(["sv-action",j.value?"sv-action--secondary":"sv-action--primary"]),"data-testid":"charge-on-demand-close",onClick:J},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["intent","class"])])):(e.openBlock(),e.createElementBlock("div",ot,[e.unref(n)?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary","data-testid":"charge-on-demand-save-payment-method",loading:e.unref(u),onClick:H},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["loading"])):I.value?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:1,size:"lg",class:"sv-action sv-action--primary","data-testid":"charge-on-demand-confirm",disabled:!le.value&&!z.value,loading:e.unref(E),onClick:H},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["disabled","loading"])):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{size:"lg",intent:"subtle",class:"sv-action sv-action--secondary","data-testid":"charge-on-demand-cancel",disabled:e.unref(E),onClick:J},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ce.value),1)]),_:1},8,["disabled"])]))]),_:1},8,["show-modal","title","sub-title","cancel-button-text","confirm-button-text","is-pending","panes","step","customer","payment-method-options","is-payment-method-options-pending","is-adding-payment-method"]))}});exports.default=dt;
|