@solvimon/solvimon-web 0.1.0-alpha.17 → 0.1.0-alpha.19
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 +91 -50
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang--AVI4Q4E.js +1 -0
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Y3CzulQq.mjs +241 -0
- package/dist/Amount.vue.es-CRG-6dps.mjs +23 -0
- package/dist/Amount.vue.es-CeW8S7kT.js +1 -0
- package/dist/Avatar.vue.es-ClUBm_l5.js +1 -0
- package/dist/Avatar.vue.es-DJp6NEU_.mjs +91 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BrPsTuoW.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BUMK11Dw.mjs} +15 -7
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DzrInCPA.js +1 -0
- package/dist/Button.vue.es-BrWHdiEA.mjs +453 -0
- package/dist/Button.vue.es-aLcIdATK.js +1 -0
- package/dist/Chip.vue.es-DPGTweAr.mjs +164 -0
- package/dist/Chip.vue.es-q4c-DXXl.js +1 -0
- package/dist/Comparators.vue.es-CU32AC4n.mjs +120 -0
- package/dist/Comparators.vue.es-CfVGYJ_x.js +1 -0
- package/dist/ContextMenu.vue.es-BBPFQfqY.mjs +681 -0
- package/dist/ContextMenu.vue.es-C_TL7-kg.js +1 -0
- package/dist/CustomerBillingInformation.vue.es-CLmXk5B9.mjs +175 -0
- package/dist/CustomerBillingInformation.vue.es-s-LYXA4T.js +1 -0
- package/dist/CustomerPaymentMethods.lib-BKgQTCtc.js +1 -0
- package/dist/CustomerPaymentMethods.lib-CcSt0sl1.mjs +4 -0
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CuWrBcoK.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B2CtcBm0.mjs} +17 -10
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CMIVAoQq.js +1 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BP-VRwEM.js +1 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Bej5_H7r.mjs +3261 -0
- package/dist/Divider.vue.es-ClFG8QtG.js +1 -0
- package/dist/Divider.vue.es-wKkIVBgb.mjs +24 -0
- package/dist/DividerText.vue.es-D5ieOE1e.js +1 -0
- package/dist/DividerText.vue.es-DMg-DNgi.mjs +72 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-5I81Qr6q.js +1 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CTG5XdQt.mjs +562 -0
- package/dist/ErrorNotification.vue.es-BX3khKFc.js +1 -0
- package/dist/ErrorNotification.vue.es-C22Kt8Qn.mjs +30 -0
- package/dist/Expand.vue.es-C-lnbA1v.js +1 -0
- package/dist/Expand.vue.es-C4_XmqbR.mjs +50 -0
- package/dist/FormMessage.vue.es-DFQXxiSC.mjs +46 -0
- package/dist/FormMessage.vue.es-LeWoj774.js +1 -0
- package/dist/IconButton.vue.es-CVFn0Ntj.js +1 -0
- package/dist/IconButton.vue.es-DcC4f5EQ.mjs +231 -0
- package/dist/IconTitle.vue.es-DoN4GVde.js +1 -0
- package/dist/IconTitle.vue.es-mQCMxc64.mjs +105 -0
- package/dist/Input.vue.es-C8VhMKuI.js +1 -0
- package/dist/Input.vue.es-Dp_RH03h.mjs +239 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-wxP5IaGt.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-56fy6uY6.mjs} +2 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CLUcV3qa.js +1 -0
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-flgEyaoj.js +1 -0
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-ztaMeHQc.mjs +49 -0
- package/dist/InvoiceSummary.vue.es-emE-mCFh.js +1 -0
- package/dist/InvoiceSummary.vue.es-nCYeQ4tj.mjs +2558 -0
- package/dist/Modal.vue.es-5EpA4Q0t.mjs +367 -0
- package/dist/Modal.vue.es-CX5geho3.js +1 -0
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-B_IIOBjg.js +1 -0
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-D7IX9qqy.mjs +155 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-C8nvN-6f.mjs +54 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D1oKZZ_m.js +1 -0
- package/dist/{PaymentHistoryBlock-BitwS9Re.mjs → PaymentHistoryBlock-Dejtgyos.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-ZtmPXXwI.js → PaymentHistoryBlock-RBxlC5xt.js} +1 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BdfWchcQ.js +1 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3ZUDUdw.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dk52bjJd.mjs} +5 -1
- package/dist/{PaymentIntegrationForm-BZTzCUiu.js → PaymentIntegrationForm-BWr7iyU6.js} +1 -1
- package/dist/{PaymentIntegrationForm-BK2aLPCo.mjs → PaymentIntegrationForm-CbqfAdkc.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D8fkE1yG.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJHwpswk.mjs +149 -0
- package/dist/PaymentIntegrationFormAdyen-BjPpoLF7.js +1 -0
- package/dist/PaymentIntegrationFormAdyen-CuRwe9_9.mjs +691 -0
- package/dist/PaymentIntegrationFormStripe-51KZc27R.js +1 -0
- package/dist/PaymentIntegrationFormStripe-JZw2m1kJ.mjs +545 -0
- package/dist/PaymentMethod.vue.es-CH__kPw4.mjs +636 -0
- package/dist/PaymentMethod.vue.es-uVZO0Zju.js +1 -0
- package/dist/PaymentMethodForm-C5WqTDow.mjs +4 -0
- package/dist/PaymentMethodForm-CBjHdZT7.js +1 -0
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BktA5F4r.js +1 -0
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-CIQ0vsko.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DhPTbip8.mjs} +5 -2
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DVeB_mqK.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DbTvbHk7.mjs} +80 -30
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-XPz73RVU.js +1 -0
- package/dist/PricingGroupRangeInput.vue.es-A6eW-u2k.mjs +636 -0
- package/dist/PricingGroupRangeInput.vue.es-BuQeJCEX.js +1 -0
- package/dist/Section.vue.es-MEFUWCxU.mjs +79 -0
- package/dist/Section.vue.es-tLYXp-tF.js +1 -0
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Jk34S5B7.js +1 -0
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xvgyB2Yr.mjs +1050 -0
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-B_Zkbqx2.mjs +6105 -0
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CttBs_G8.js +1 -0
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3cqlbGY.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cj36jvZF.mjs} +17 -63
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Dl5Lg39D.js +1 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CTnTWaB8.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BDqX6OaE.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-CfXgGKXA.mjs} +8 -5
- package/dist/TooltipParagraph.vue.es-B5aHQv9O.mjs +136 -0
- package/dist/TooltipParagraph.vue.es-fSwKGXKg.js +1 -0
- package/dist/TrialChip.vue.es-0nrqSZeY.js +1 -0
- package/dist/TrialChip.vue.es-Fp7Lqo-b.mjs +56 -0
- package/dist/adyen-BMDZQBUG.js +1 -0
- package/dist/{url-BjZ1Pg0l.mjs → adyen-Ba-mF3Jy.mjs} +31 -73
- package/dist/api.es-C5pe8LUl.mjs +62 -0
- package/dist/api.es-Czekkp_X.js +1 -0
- package/dist/cn.es-BLHlMR4Y.js +1 -0
- package/dist/cn.es-DB5pDpxS.mjs +3298 -0
- package/dist/comparators.es-9VsCB-JI.mjs +175 -0
- package/dist/comparators.es-wrKHduVq.js +1 -0
- package/dist/component-BG6DmXcy.mjs +9 -0
- package/dist/component-hDuDTBt5.js +1 -0
- package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -3
- package/dist/components/BillingInformation/BillingInformation.cjs +1 -0
- package/dist/components/BillingInformation/{BillingInformation.es.js → BillingInformation.mjs} +15 -26
- package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -3
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -0
- package/dist/components/BillingInformationForm/{BillingInformationForm.es.js → BillingInformationForm.mjs} +42 -128
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -3
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -0
- package/dist/components/CustomerPaymentMethods/{CustomerPaymentMethods.es.js → CustomerPaymentMethods.mjs} +18 -51
- package/dist/components/Invoice/Invoice.ce.d.ts +1 -3
- package/dist/components/Invoice/Invoice.cjs +1 -0
- package/dist/components/Invoice/{Invoice.es.js → Invoice.mjs} +73 -79
- package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -3
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -0
- package/dist/components/InvoiceDetails/{InvoiceDetails.es.js → InvoiceDetails.mjs} +12 -24
- package/dist/components/InvoiceHeader/InvoiceHeader.ce.d.ts +1 -3
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -0
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +73 -0
- package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -3
- package/dist/components/InvoicesList/InvoicesList.cjs +1 -0
- package/dist/components/InvoicesList/{InvoicesList.es.js → InvoicesList.mjs} +12 -24
- package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -3
- package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -0
- package/dist/components/PaymentHistory/{PaymentHistory.es.js → PaymentHistory.mjs} +12 -24
- package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -3
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -0
- package/dist/components/PaymentMethodForm/{PaymentMethodForm.es.js → PaymentMethodForm.mjs} +15 -27
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -3
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -0
- package/dist/components/SubscriptionSchedules/{SubscriptionSchedules.es.js → SubscriptionSchedules.mjs} +13 -25
- package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -3
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -0
- package/dist/components/SubscriptionsList/{SubscriptionsList.es.js → SubscriptionsList.mjs} +22 -53
- package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -3
- package/dist/components/WalletBalances/WalletBalances.cjs +1 -0
- package/dist/components/WalletBalances/{WalletBalances.es.js → WalletBalances.mjs} +31 -29
- package/dist/configuration-BjYwV4_B.js +1 -0
- package/dist/configuration-CD8cOXAJ.mjs +15 -0
- package/dist/core/action-request.types.d.ts +1 -67
- package/dist/core/configuration.d.ts +1 -3
- package/dist/core/index.cjs +1 -0
- package/dist/core/index.d.ts +1 -11
- package/dist/core/index.mjs +197 -0
- package/dist/core/registry.ce.d.ts +1 -2
- package/dist/core/registry.d.ts +1 -6
- package/dist/core/types.d.ts +1 -121
- package/dist/countryData.es--zJAd6LA.mjs +252 -0
- package/dist/countryData.es-D3MFzU92.js +1 -0
- package/dist/customElements-BTJzBHMy.js +1 -0
- package/dist/customElements-DdFA__me.mjs +6729 -0
- package/dist/{customer-DAgdegIW.mjs → customer-B0AMetq6.mjs} +1 -1
- package/dist/customer-D7HUfF3j.js +1 -0
- package/dist/customer.es-C_vSWcVA.mjs +30 -0
- package/dist/customer.es-D42Md24r.js +1 -0
- package/dist/en-US-BSrbFk5W.js +1 -0
- package/dist/en-US-D0P7NNNZ.mjs +228 -0
- package/dist/{en-US-DSzSbgL5.mjs → en-US-Daw3v6GD.mjs} +60 -30
- package/dist/en-US-scSQQXK8.js +1 -0
- package/dist/error-Cg-i7gGl.js +1 -0
- package/dist/error-DY_I2hPx.mjs +13 -0
- package/dist/floating-ui.vue.es-Bv94BfDm.js +1 -0
- package/dist/floating-ui.vue.es-DWY7pdz8.mjs +1573 -0
- package/dist/formatting.es-9hM8aHSg.js +1 -0
- package/dist/formatting.es-D-oVnc8H.mjs +68 -0
- package/dist/getComposedString.es-CELkn0I7.mjs +14 -0
- package/dist/getComposedString.es-DvSNX-_z.js +1 -0
- package/dist/getCountryNameByCode.es-fP52nO_7.js +1 -0
- package/dist/getCountryNameByCode.es-ymC9R46j.mjs +8 -0
- package/dist/index-BJ3dHkSK.js +1 -0
- package/dist/index-C5bKRt7l.mjs +1069 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1 -17
- package/dist/index.es-0cystq8F.mjs +542 -0
- package/dist/index.es-2JWHHSgP.js +1 -0
- package/dist/index.mjs +42 -0
- package/dist/{invoices-BXDgW8ch.mjs → invoices-BSd-nKeE.mjs} +17 -16
- package/dist/invoices-BiqM6xN6.js +1 -0
- package/dist/{nl-NL-Li7RW89R.mjs → nl-NL-B4zEBFTw.mjs} +60 -52
- package/dist/nl-NL-B5tuyIOM.mjs +88 -0
- package/dist/nl-NL-Bs3d8q6T.js +1 -0
- package/dist/nl-NL-DIAZWDF9.js +1 -0
- package/dist/object.es-DFXiU9p3.js +1 -0
- package/dist/object.es-jvvnR8Kr.mjs +12 -0
- package/dist/{paymentMethods-xzFD2L30.mjs → paymentMethods-BsrkEbKT.mjs} +23 -19
- package/dist/paymentMethods-Cu2RzLgm.js +1 -0
- package/dist/{payments-DV6csRej.mjs → payments-B6Nfd6Al.mjs} +1 -1
- package/dist/payments-Bbm1HMQj.js +1 -0
- package/dist/pricing-3W7XLwL6.js +1 -0
- package/dist/pricing-CJxS2hr2.mjs +17 -0
- package/dist/pricingItemConfigs.es-BPIm6S8M.mjs +107 -0
- package/dist/pricingItemConfigs.es-C73cQlxQ.js +1 -0
- package/dist/{pricingPlanSchedule-C_cqUyTk.mjs → pricingPlanSchedule-CXG3CQ61.mjs} +3 -1
- package/dist/screens/Checkout/Checkout.ce.d.ts +1 -3
- package/dist/screens/Checkout/Checkout.cjs +1 -0
- package/dist/screens/Checkout/{Checkout.es.js → Checkout.mjs} +1271 -630
- package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -3
- package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -0
- package/dist/screens/CustomerOverview/{CustomerOverview.es.js → CustomerOverview.mjs} +54 -81
- package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +1 -3
- package/dist/screens/PayInvoice/PayInvoice.cjs +1 -0
- package/dist/screens/PayInvoice/{PayInvoice.es.js → PayInvoice.mjs} +41 -32
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.ce.d.ts +1 -3
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -0
- package/dist/screens/PaymentMethodsManagement/{PaymentMethodsManagement.es.js → PaymentMethodsManagement.mjs} +35 -37
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts +1 -3
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -0
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +885 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts +1 -3
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -0
- package/dist/screens/SubscriptionManagement/{SubscriptionManagement.es.js → SubscriptionManagement.mjs} +45 -63
- package/dist/slots.es-BpwYO3A3.mjs +18 -0
- package/dist/slots.es-Dq1PTUOv.js +1 -0
- package/dist/sorting.es-CjTrRfSW.mjs +105 -0
- package/dist/sorting.es-RyvcgbSL.js +1 -0
- package/dist/{subscription-B4dBAY9C.mjs → subscription-C41lG-rH.mjs} +1 -1
- package/dist/subscriptions-B4BOzLxR.js +1 -0
- package/dist/subscriptions-C2C4WTuI.mjs +58 -0
- package/dist/typeGuards.es-C4nR5FkL.js +1 -0
- package/dist/typeGuards.es-fwUoeMCe.mjs +12 -0
- package/dist/types/components/InvoiceTable/InvoiceTable.types.d.ts +19 -0
- package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
- package/dist/types/components/checkout/EmptyStatePlaceholder.types.d.ts +4 -0
- package/dist/types/components/checkout/PromotionCodeSection.types.d.ts +8 -0
- package/dist/types/components/customer/BillingInformationForm/BillingInformationForm.types.d.ts +24 -0
- package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +32 -0
- package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +12 -0
- package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +14 -0
- package/dist/types/components/payments/AddPaymentMethodPane/AddPaymentMethodPane.types.d.ts +19 -0
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +74 -0
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +9 -0
- package/dist/types/components/payments/ExpressPaymentMethodButton/ExpressPaymentMethodButton.types.d.ts +3 -0
- package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +21 -0
- package/dist/types/components/payments/PayButton/PayButton.types.d.ts +10 -0
- package/dist/types/components/payments/PaymentCompletedCard/PaymentCompletedCard.types.d.ts +5 -0
- package/dist/types/components/payments/PaymentErrorCard/PaymentErrorCard.types.d.ts +4 -0
- package/dist/types/components/payments/PaymentFeedbackCard/PaymentFeedbackCard.types.d.ts +4 -0
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +72 -0
- package/dist/types/components/payments/PaymentIntegrationFormAdyen/PaymentIntegrationFormAdyen.types.d.ts +6 -0
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripe.types.d.ts +7 -0
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +61 -0
- package/dist/types/components/payments/PaymentMethodSelector/PaymentMethodSelector.types.d.ts +53 -0
- package/dist/types/components/payments/PaymentMethodsList/PaymentMethodsList.types.d.ts +8 -0
- package/dist/types/components/payments/SubscriptionPaymentCompletedCard/SubscriptionPaymentCompletedCard.types.d.ts +3 -0
- package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.d.ts +4 -0
- package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.types.d.ts +3 -0
- package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +17 -0
- package/dist/types/components/providers/ActionDispatchProvider/composables/useActionDispatchProvider.d.ts +3 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +5 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +8 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/AuthProvider/composables/useAuth.d.ts +3 -0
- package/dist/types/components/providers/AuthProvider/index.d.ts +3 -0
- package/dist/types/components/providers/ConfigProvider/ConfigProvider.lib.d.ts +5 -0
- package/dist/types/components/providers/ConfigProvider/ConfigProvider.types.d.ts +9 -0
- package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/ConfigProvider/composables/useConfig.d.ts +3 -0
- package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.types.d.ts +3 -0
- package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +10 -0
- package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +22 -0
- package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +17 -0
- package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.lib.d.ts +5 -0
- package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.types.d.ts +4 -0
- package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/ExperimentalFeatureProvider/composables/useExperimentalFeature.d.ts +1 -0
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +12 -0
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.types.d.ts +3 -0
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/HostElementProvider/composables/useHostElementProvider.d.ts +1 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +24 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +40 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +20 -0
- package/dist/types/components/providers/LoggerProvider/composables/useLogger.d.ts +6 -0
- package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +7 -0
- package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +11 -0
- package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +3 -0
- package/dist/types/components/providers/Provider/Provider.types.d.ts +15 -0
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +21 -0
- package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +17 -0
- package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +18 -0
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.lib.d.ts +9 -0
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.types.d.ts +22 -0
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/index.d.ts +9 -0
- package/dist/types/components/shared/ScreenTitle/ScreenTitle.types.d.ts +4 -0
- package/dist/types/components/shared/Section/Section.types.d.ts +21 -0
- package/dist/types/components/shared/Skeleton.types.d.ts +5 -0
- package/dist/types/components/shared/SlidingPanes/SlidingPanes.types.d.ts +12 -0
- package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsList.types.d.ts +15 -0
- package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsListItem.types.d.ts +7 -0
- package/dist/types/components/subscriptions/OrderSummary.types.d.ts +65 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/AddonSingleEditor.types.d.ts +5 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +8 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupContent.types.d.ts +4 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupEditorBase.types.d.ts +8 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditor.types.d.ts +6 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditorItem.types.d.ts +6 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTable.types.d.ts +5 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTableRow.types.d.ts +7 -0
- package/dist/types/components/subscriptions/SubscriptionCancellationModal/SubscriptionCancellationModal.types.d.ts +12 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +47 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +28 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSuccess.types.d.ts +7 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSummary.types.d.ts +7 -0
- package/dist/types/components/subscriptions/SubscriptionSummary.types.d.ts +33 -0
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +16 -0
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +13 -0
- package/dist/types/components/wallets/AutoTopUpCancellationModal/AutoTopUpCancellationModal.types.d.ts +9 -0
- package/dist/types/components/wallets/AutoTopUpConfig/AutoTopUpConfig.types.d.ts +56 -0
- package/dist/types/components/wallets/AutoTopUpModal/AutoTopUpModal.types.d.ts +16 -0
- package/dist/types/components/wallets/ConvertedAmountInput/ConvertedAmountInput.types.d.ts +32 -0
- package/dist/types/components/wallets/TopUpModal/TopUpInvoicePreview.types.d.ts +11 -0
- package/dist/types/components/wallets/TopUpModal/TopUpModal.types.d.ts +31 -0
- package/dist/types/components/wallets/TopUpModal/TopUpModalForm.types.d.ts +23 -0
- package/dist/types/components/wallets/TopUpModal/TopUpModalSuccess.types.d.ts +11 -0
- package/dist/types/components/wallets/WalletModalShell.types.d.ts +24 -0
- package/dist/types/composables/useInvoicePreview.types.d.ts +9 -0
- package/dist/types/config/config.beta.d.ts +2 -0
- package/dist/types/config/config.dev.d.ts +2 -0
- package/dist/types/config/config.live.d.ts +2 -0
- package/dist/types/config/internalEnvironments.d.ts +11 -0
- package/dist/types/config/internalEnvironments.published.d.ts +7 -0
- package/dist/types/config/lib.d.ts +6 -0
- package/dist/types/config/types.d.ts +13 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/public/components/BillingInformation/BillingInformation.entry.ce.d.ts +1 -0
- package/dist/types/public/components/BillingInformation/BillingInformation.entry.types.d.ts +4 -0
- package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +12 -0
- package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.ce.d.ts +1 -0
- package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.types.d.ts +4 -0
- package/dist/types/public/components/BillingInformationForm/BillingInformationForm.types.d.ts +10 -0
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.ce.d.ts +1 -0
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.types.d.ts +6 -0
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +22 -0
- package/dist/types/public/components/CustomerWalletBalances/CustomerWalletBalances.types.d.ts +22 -0
- package/dist/types/public/components/Invoice/Invoice.entry.ce.d.ts +1 -0
- package/dist/types/public/components/Invoice/Invoice.entry.types.d.ts +5 -0
- package/dist/types/public/components/Invoice/Invoice.types.d.ts +26 -0
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.ce.d.ts +1 -0
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.types.d.ts +5 -0
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.types.d.ts +9 -0
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.ce.d.ts +1 -0
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.types.d.ts +5 -0
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +16 -0
- package/dist/types/public/components/InvoicesList/InvoicesList.entry.ce.d.ts +1 -0
- package/dist/types/public/components/InvoicesList/InvoicesList.entry.types.d.ts +5 -0
- package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +37 -0
- package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.ce.d.ts +1 -0
- package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.types.d.ts +5 -0
- package/dist/types/public/components/PaymentHistory/PaymentHistory.types.d.ts +10 -0
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.ce.d.ts +1 -0
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.types.d.ts +5 -0
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.types.d.ts +38 -0
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.ce.d.ts +1 -0
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.types.d.ts +5 -0
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.types.d.ts +9 -0
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.ce.d.ts +1 -0
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.types.d.ts +5 -0
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +16 -0
- package/dist/types/public/components/WalletBalances/WalletBalances.entry.ce.d.ts +1 -0
- package/dist/types/public/components/WalletBalances/WalletBalances.entry.types.d.ts +5 -0
- package/dist/types/public/components/WalletBalances/WalletBalances.types.d.ts +3 -0
- package/dist/types/public/core/action-request.types.d.ts +55 -0
- package/dist/types/public/core/configuration.d.ts +3 -0
- package/dist/types/public/core/index.d.ts +14 -0
- package/dist/types/public/core/registry.ce.d.ts +8 -0
- package/dist/types/public/core/registry.d.ts +6 -0
- package/dist/types/public/core/types.d.ts +120 -0
- package/dist/types/public/screens/Checkout/Checkout.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +18 -0
- package/dist/types/public/screens/Checkout/Checkout.types.d.ts +46 -0
- package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.types.d.ts +5 -0
- package/dist/types/public/screens/CustomerOverview/CustomerOverview.types.d.ts +2 -0
- package/dist/types/public/screens/PayInvoice/PayInvoice.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/PayInvoice/PayInvoice.entry.types.d.ts +4 -0
- package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +23 -0
- package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.types.d.ts +3 -0
- package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.types.d.ts +7 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +6 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +23 -0
- package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.types.d.ts +5 -0
- package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.types.d.ts +13 -0
- package/dist/types/public/screens/types.d.ts +4 -0
- package/dist/types/public/types/index.d.ts +23 -0
- package/dist/types/services/invoices.types.d.ts +26 -0
- package/dist/types/services/paymentMethods.types.d.ts +31 -0
- package/dist/types/services/portals.types.d.ts +68 -0
- package/dist/types/services/requests.types.d.ts +24 -0
- package/dist/types/translations/supported.d.ts +1 -0
- package/dist/types/types/EntryBaseProps.d.ts +10 -0
- package/dist/types/types/errors.d.ts +7 -0
- package/dist/types/types/subscription.d.ts +4 -0
- package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +111 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Address.d.ts +17 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Alerts.d.ts +72 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Amount.d.ts +4 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Api.d.ts +50 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApiError.d.ts +7 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApiKey.d.ts +21 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApiStatus.d.ts +7 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +77 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Attachment.d.ts +14 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Band.d.ts +30 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/BaseResourceStatus.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/BillingEntity.d.ts +45 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/BillingPeriod.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/BillingTime.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +24 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Commitment.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CommitmentItem.d.ts +17 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Comparator.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +12 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ConfiguredMeterValue.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Country.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CreateMeterData.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CreatePricingPlanVersion.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CreditType.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Currency.d.ts +8 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +39 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CustomerContact.d.ts +12 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Customers.d.ts +75 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Discount.d.ts +12 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/DiscountItem.d.ts +24 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Document.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/DueDateConfiguration.d.ts +8 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Environment.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/EventTrace.d.ts +23 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceExtended.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLink.d.ts +14 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLinkExtended.d.ts +15 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Features.d.ts +25 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/IdentityProvider.d.ts +40 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/IndexingSettings.d.ts +24 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +367 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +349 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Markup.d.ts +8 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MarkupItem.d.ts +11 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Meter.d.ts +32 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterConditions.d.ts +26 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterData.d.ts +25 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterDataExpanded.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterProperty.d.ts +34 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyValue.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValue.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueCalculation.d.ts +20 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueValue.d.ts +7 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ModelType.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Name.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/NotificationPreferences.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Payment.d.ts +124 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +120 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAction.d.ts +74 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethod.d.ts +173 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethodOptions.d.ts +45 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentSchedules.d.ts +142 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +118 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +58 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Pricing.d.ts +41 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategory.d.ts +18 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategoryExtended.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingExtended.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingGroup.d.ts +29 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItem.d.ts +40 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +130 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +103 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +7 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleWithPlanData.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +80 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscriptionGroup.d.ts +10 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersion.d.ts +71 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersionExtended.d.ts +7 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +44 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ProductCategory.d.ts +10 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +60 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PromotionCodes.d.ts +14 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +43 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +93 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +65 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ReprocessLog.d.ts +31 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Resource.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Role.d.ts +19 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/SignatureRequest.d.ts +27 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/TaxCategory.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/TaxIdentifier.d.ts +17 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/TaxSummary.d.ts +21 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/TimePeriod.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Timestamp.d.ts +4 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Token.d.ts +6 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/User.d.ts +106 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ValueType.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +44 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/WalletAutoTopUpConfigs.d.ts +28 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/WalletType.d.ts +54 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Webhook.d.ts +48 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/WebhookEvent.d.ts +18 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +95 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/forms.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/utils.d.ts +17 -0
- package/dist/useActionDispatchProvider-Cz8xLLYA.js +1 -0
- package/dist/{useActionDispatchProvider-zB_GKeUR.mjs → useActionDispatchProvider-D55t_7LY.mjs} +1 -1
- package/dist/{useCustomer-VfeQ6rG2.mjs → useCustomer-BNhHz9RJ.mjs} +2 -2
- package/dist/{useCustomer-bO4D6e4Z.js → useCustomer-DYCpgA-3.js} +1 -1
- package/dist/useCustomerFormLabels-Cw6QpEJY.js +1 -0
- package/dist/useCustomerFormLabels-mX5QpApD.mjs +1142 -0
- package/dist/{useIncrementalLoading-C59FXHzp.mjs → useIncrementalLoading-BK9pRYAU.mjs} +6 -5
- package/dist/useIncrementalLoading-CdtGJm_Y.js +1 -0
- package/dist/{useInvoiceData-CxxkBTGY.js → useInvoiceData-BczeMpuk.js} +1 -1
- package/dist/{useInvoiceData-Dhg-hx8C.mjs → useInvoiceData-D-EvEioP.mjs} +2 -2
- package/dist/{useInvoicesList-DBz7T7sM.mjs → useInvoicesList-BJJYwkIA.mjs} +277 -31
- package/dist/useInvoicesList-rMg-8LbH.js +1 -0
- package/dist/{useLoadInitialData-BhpIg7OF.mjs → useLoadInitialData-BoGjdUu-.mjs} +1 -1
- package/dist/useLoadInitialData-CiJldX50.js +1 -0
- package/dist/{usePaymentMethodOptions-PcMjtMSF.mjs → usePaymentMethodOptions-d49aOdLB.mjs} +13 -3
- package/dist/usePaymentMethodOptions-fBvWYynV.js +1 -0
- package/dist/{usePaymentMethods-B5AbGWsn.mjs → usePaymentMethods-Bkouz8aQ.mjs} +2 -2
- package/dist/{usePaymentMethods-Bb1Xbads.js → usePaymentMethods-CFL3hFW_.js} +1 -1
- package/dist/usePayments-BKTNn_RN.js +1 -0
- package/dist/usePayments-BlliAt1E.mjs +262 -0
- package/dist/{usePortal-DWLtNqBB.mjs → usePortal-eyA4OqjU.mjs} +1 -1
- package/dist/usePortal-fhri8neB.js +1 -0
- package/dist/useService-D73FNBjT.js +1 -0
- package/dist/{useService-BZqFkz7p.mjs → useService-W3Kxems4.mjs} +24 -5
- package/dist/useSubscription--IGLmLS6.mjs +250 -0
- package/dist/useSubscription-V3KSuhOY.js +1 -0
- package/package.json +66 -49
- package/dist/ApiStatus-CyNDp_op.mjs +0 -9
- package/dist/ApiStatus-oqvUEWJx.js +0 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BuQ8bzar.js +0 -1
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-1Op9GjGZ.js +0 -1
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C66beqgf.js +0 -1
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D2BhuXsh.mjs +0 -77
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BbuEBiY3.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-dwIv_xxf.js +0 -1
- package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-05NKI2A0.js +0 -1
- package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-17v07F58.mjs +0 -27
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CMGK71zZ.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B_yDNGK8.mjs +0 -1537
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-GN3WAr10.js +0 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-zRr8iihy.js +0 -1
- package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-BQIN3zuf.mjs +0 -156
- package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DyL2-vV0.js +0 -1
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-OvGGejpX.js +0 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BxqIfmkK.js +0 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-D1TcP9PR.mjs +0 -217
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BKz2QQn9.js +0 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BMXr26gF.mjs +0 -37
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CyAFjCh7.js +0 -1
- package/dist/component-CUJ_G2Nw.mjs +0 -962
- package/dist/component-CiKxWtdx.js +0 -1
- package/dist/components/BillingInformation/BillingInformation.cjs.js +0 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +0 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +0 -1
- package/dist/components/Invoice/Invoice.cjs.js +0 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +0 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +0 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.es.js +0 -123
- package/dist/components/InvoicesList/InvoicesList.cjs.js +0 -1
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +0 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +0 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +0 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +0 -1
- package/dist/components/WalletBalances/WalletBalances.cjs.js +0 -1
- package/dist/core/index.cjs.js +0 -1
- package/dist/core/index.es.js +0 -6
- package/dist/customer-AfRcAZ5P.js +0 -1
- package/dist/en-US-QzQnGXP1.js +0 -1
- package/dist/index-CzL1ZcGi.mjs +0 -85
- package/dist/index-DRdBmZ2-.js +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.es.js +0 -51
- package/dist/invoices-BHgajZHq.js +0 -1
- package/dist/nl-NL-C4rr-1tr.js +0 -1
- package/dist/paymentMethods-BMcc-eTl.js +0 -1
- package/dist/payments-DMvmB5vg.js +0 -1
- package/dist/pricing-B1uImUm4.mjs +0 -19
- package/dist/pricing-BEjY_5wb.js +0 -1
- package/dist/registry-CeMxLjwU.js +0 -1
- package/dist/registry-CyENvS6l.mjs +0 -153
- package/dist/screens/Checkout/Checkout.cjs.js +0 -1
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +0 -1
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +0 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +0 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs.js +0 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.es.js +0 -542
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs.js +0 -1
- package/dist/solvimon-web.css +0 -1
- package/dist/subscriptions-CrNDM9qa.mjs +0 -79
- package/dist/subscriptions-DC-mxa17.js +0 -1
- package/dist/url-D8GJi5rF.js +0 -1
- package/dist/useActionDispatchProvider-bqR_FeM4.js +0 -1
- package/dist/useIncrementalLoading-BgWuwoMo.js +0 -1
- package/dist/useInvoicesList-BXZ9uV9i.js +0 -1
- package/dist/useLoadInitialData-BqiAFNFi.js +0 -1
- package/dist/usePaymentMethodOptions-DszFvgKX.js +0 -1
- package/dist/usePayments-DgoZoBZh.mjs +0 -36
- package/dist/usePayments-is5c66Z6.js +0 -1
- package/dist/usePortal-C4qWsJeq.js +0 -1
- package/dist/useService-DKm3QtT4.js +0 -1
- package/dist/useSubscription-CEZJw6wZ.mjs +0 -23
- package/dist/useSubscription-DuUNc1_l.js +0 -1
- package/dist/useTopUpModal-DNyWrHDv.mjs +0 -1012
- package/dist/useTopUpModal-DeF-cfCK.js +0 -1
- package/dist/vendor-ui-BoGKOJ36.mjs +0 -29826
- package/dist/vendor-ui-BuRqLx74.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./floating-ui.vue.es-Bv94BfDm.js"),o=require("./customElements-BTJzBHMy.js"),l=require("./Button.vue.es-aLcIdATK.js"),n=require("./DividerText.vue.es-D5ieOE1e.js"),a=require("./Divider.vue.es-ClFG8QtG.js"),r=require("./index.es-2JWHHSgP.js"),i=require("./object.es-DFXiU9p3.js"),s=require("./Chip.vue.es-q4c-DXXl.js"),c=e.defineComponent({__name:"FullClickableBlock",props:{tag:{default:"div"}},setup:t=>(o,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{class:"relative"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3}))}),d={},u={class:"appearance-none after:absolute after:inset-0"};const p=t._export_sfc(d,[["render",function(t,o){return e.openBlock(),e.createElementBlock("button",u,[e.renderSlot(t.$slots,"default")])}]]),f={key:0},m={key:1},k=e.defineComponent({__name:"ListGroupItem",props:{disabled:{type:Boolean,default:!1},onClick:{},dataTestid:{},variant:{}},setup:t=>(l,n)=>(e.openBlock(),e.createBlock(e.unref(c),{tag:"li",class:e.normalizeClass(["w-full border-b border-gray-200 px-4 py-2 transition-colors",{block:!t.disabled&&t.onClick,"focus-within:bg-gray-50 focus-within:text-gray-900 hover:bg-gray-50 hover:text-gray-900":!t.disabled&&t.onClick&&"danger"!==t.variant,"text-red-700 focus-within:bg-red-50 focus-within:text-red-700 hover:bg-red-50":!t.disabled&&t.onClick&&"danger"===t.variant,"cursor-not-allowed bg-gray-50 text-gray-400":t.disabled}]),onClick:n[1]||(n[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.onClick?e.unref(p):"span"),{class:"flex w-full items-start gap-2 text-left focus:outline-none active:outline-none",disabled:t.onClick?t.disabled:void 0,type:t.onClick?"button":void 0,"data-testid":t.dataTestid,onClick:n[0]||(n[0]=e=>{var o;return null==(o=t.onClick)?void 0:o.call(t)})},{default:e.withCtx(()=>[l.$slots.prefix?(e.openBlock(),e.createElementBlock("div",f,[e.renderSlot(l.$slots,"prefix")])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default"),l.$slots.suffix?(e.openBlock(),e.createElementBlock("div",m,[e.renderSlot(l.$slots,"suffix")])):e.createCommentVNode("",!0)]),_:3},8,["disabled","type","data-testid"])),l.$slots.description?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:0,tag:"span",variant:"body-xs",class:"mt-0.5 font-normal",shade:t.disabled?"lightest":"lighter"},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"description")]),_:3},8,["shade"])):e.createCommentVNode("",!0)]),_:3},8,["class"]))}),v=e.defineComponent({__name:"ContextMenuItem",props:{icon:{},label:{},description:{},labelSuffixComponent:{},labelPrefixComponent:{},onClick:{type:Function},classes:{},variant:{},testId:{},disabled:{type:Boolean},active:{type:Boolean}},setup:t=>(n,a)=>(e.openBlock(),e.createBlock(e.unref(k),{class:e.normalizeClass(["border-none",{[`${t.classes}`]:!!t.classes,"bg-primary-50 text-primary-700":t.active}]),"data-testid":t.testId,disabled:t.disabled,variant:t.variant,onClick:t.onClick},e.createSlots({default:e.withCtx(()=>[t.labelPrefixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelPrefixComponent.component),e.normalizeProps(e.mergeProps({key:0},t.labelPrefixComponent.props)),null,16)):e.createCommentVNode("",!0),e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1}),t.labelSuffixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelSuffixComponent.component),e.mergeProps({key:1},t.labelSuffixComponent.props,{class:"ml-2"}),null,16)):e.createCommentVNode("",!0)]),_:2},[t.icon?{name:"prefix",fn:e.withCtx(()=>[e.createVNode(e.unref(l._sfc_main),{icon:t.icon},null,8,["icon"])]),key:"0"}:void 0,t.description?{name:"description",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),key:"1"}:void 0]),1032,["class","data-testid","disabled","variant","onClick"]))}),b=e.defineComponent({__name:"ContextMenuGroup",props:{label:{},items:{}},setup:t=>(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(n._sfc_main),{"has-outer-divider":""},{default:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main),{class:"py-2",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1})]),_:1}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o},["divider"===t?(e.openBlock(),e.createBlock(e.unref(a._sfc_main),{key:0})):t.label?(e.openBlock(),e.createBlock(v,{key:1,label:t.label,"on-click":t.onClick,icon:t.icon,variant:t.variant,classes:t.classes,"label-suffix-component":t.labelSuffixComponent,"label-prefix-component":t.labelPrefixComponent,disabled:t.disabled,active:t.active},null,8,["label","on-click","icon","variant","classes","label-suffix-component","label-prefix-component","disabled","active"])):e.createCommentVNode("",!0)],64))),128))],64))}),C={};const h=t._export_sfc(C,[["render",function(t,o){return e.openBlock(),e.createBlock(e.TransitionGroup,{"enter-active-class":"duration-100 ease-out transform-gpu","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"duration-100 ease-in transform-gpu","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3})}]]),x=(t,o=!0,l=[])=>(t.forEach(t=>{if(null!==t)if("object"==typeof t)if(Array.isArray(t))x(t,o,l);else if(t.type===e.Fragment){if(null===t.children)return;Array.isArray(t.children)&&x(t.children,o,l)}else t.type!==e.Comment&&l.push(t);else"string"!=typeof t&&"number"!=typeof t||l.push(e.createTextVNode(String(t)))}),l),y={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"]};const B=e.defineComponent({name:"SlotListener",props:{trigger:{type:String,default:"click"}},emits:["click","focus","blur","mouseenter","mouseleave"],setup:(e,{emit:t})=>({handleClick:e=>{t("click",e)},handleBlur:e=>{t("blur",e)},handleFocus:e=>{t("focus",e)},handleMouseLeave:e=>{t("mouseleave",e)},handleMouseEnter:e=>{t("mouseenter",e)}}),render(){const{$slots:e}=this,t={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},o=((e,t="default",o)=>{const l=e[t];if(!l)return null;const n=x(l(o));return 1===n.length?n[0]:null})(e,"default"),l=[t];(null==o?void 0:o.props)&&l.push(i.pick(o.props,"onClick","onMouseenter","onMouseleave","onFocus","onBlur"));var n,a;return o&&(n=o,a={onBlur:e=>{l.forEach(t=>{var o;null==(o=null==t?void 0:t.onBlur)||o.call(t,e)})},onFocus:e=>{l.forEach(t=>{var o;null==(o=null==t?void 0:t.onFocus)||o.call(t,e)})},onClick:e=>{l.forEach(t=>{var o;null==(o=null==t?void 0:t.onClick)||o.call(t,e)})},onMouseenter:e=>{l.forEach(t=>{var o;null==(o=null==t?void 0:t.onMouseenter)||o.call(t,e)})},onMouseleave:e=>{l.forEach(t=>{var o;null==(o=null==t?void 0:t.onMouseleave)||o.call(t,e)})}},Object.entries(y).forEach(([,e])=>{e.forEach(e=>{n.props?n.props=Object.assign({},n.props):n.props={};const t=n.props[e],o=a[e];n.props[e]=t?(...e)=>{t(...e),o(...e)}:o})})),o}}),g=["id"],_=e.defineComponent({__name:"Portal",props:{to:{},name:{},disabled:{type:Boolean}},setup(t){const l=t,n=l.to?e.inject(o.getPortalInjectKey(l.to),e.ref(null)):e.ref(null);return e.onMounted(()=>{if(!l.name&&!l.to)throw new Error("Define either the `to` or the `name` prop.")}),(o,l)=>t.name?(e.openBlock(),e.createElementBlock("div",{key:0,id:`portal-${t.name}`},null,8,g)):t.to&&e.unref(n)?(e.openBlock(),e.createBlock(e.Teleport,{key:1,to:e.unref(n),disabled:t.disabled},[e.renderSlot(o.$slots,"default")],8,["to","disabled"])):t.to?(e.openBlock(),e.createBlock(e.Teleport,{key:2,to:`#portal-${t.to}`,disabled:t.disabled},[e.renderSlot(o.$slots,"default")],8,["to","disabled"])):e.createCommentVNode("",!0)}}),w={class:"inline-flex items-center"},S=e.defineComponent({__name:"Dropdown",props:{placement:{default:"bottom-end"},text:{default:""},transition:{default:""},offset:{default:8},disabled:{type:Boolean},isPortalDisabled:{type:Boolean},dropdownClass:{}},setup(n){const a=n,i=e.ref(!1),s=()=>i.value=!1,c=()=>{a.disabled||(i.value=!i.value)},d={bottom:"to-bottom","bottom-start":"to-bottom","bottom-end":"to-bottom",left:"to-left","left-start":"to-left","left-end":"to-left",right:"to-right","right-start":"to-right","right-end":"to-right",top:"to-top","top-start":"to-top","top-end":"to-top"},u=e.ref(),p=e.ref(),f=e.ref(),m=e.computed(()=>null===a.transition?d[a.placement]:a.transition),{floatingStyles:k}=t.useFloating(f,p,{whileElementsMounted:t.autoUpdate,placement:a.placement,middleware:[t.offset(a.offset),t.flip()]});return r.onClickOutside(f,()=>{i.value&&(i.value=!1)}),r.onKeyStroke("Escape",()=>{i.value=!1}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"relative inline-flex"},[e.createElementVNode("div",w,[e.createVNode(e.unref(B),{onClick:c},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"trigger",{visible:i.value},()=>[e.createVNode(e.unref(l._sfc_main$1),{ref_key:"trigger",ref:u},{suffix:e.withCtx(()=>[...a[0]||(a[0]=[e.createElementVNode("svg",{class:"ml-2 h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1)])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.text)+" ",1)]),_:1},512)],!0)]),_:3})]),e.createVNode(e.unref(_),{to:e.unref(o.DROPDOWN_PORTAL_NAME),disabled:n.isPortalDisabled},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:m.value},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:p,style:e.normalizeStyle(e.unref(k)),class:e.normalizeClass(["z-60 divide-y divide-gray-100 rounded bg-white shadow",n.dropdownClass])},[e.createVNode(e.unref(B),{onClick:s},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3})],6)):e.createCommentVNode("",!0)]),_:3},8,["name"])]),_:3},8,["to","disabled"])],512))}}),N=t._export_sfc(S,[["__scopeId","data-v-c0f85806"]]),V=e.defineComponent({__name:"ListGroup",props:{width:{default:"default"}},setup:t=>(o,l)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(["overflow-hidden rounded border border-gray-200 bg-white text-sm font-medium text-gray-900",{"w-48":"default"===t.width,"w-64":"wide"===t.width}])},[e.renderSlot(o.$slots,"default")],2))}),E={class:"relative inline-flex"},$=e.defineComponent({inheritAttrs:!1,__name:"ContextMenu",props:{items:{},icon:{default:"more_vert"},square:{type:Boolean,default:!1},outlined:{type:Boolean},width:{},disabled:{type:Boolean},isPortalDisabled:{type:Boolean},triggerSize:{default:"sm"},dropdownClass:{},showActiveCount:{type:Boolean,default:!0}},setup(t){const o=t,n=e.useSlots(),r=e.computed(()=>{var e,t;return o.disabled||(null==(t=(null==(e=o.items)?void 0:e.flatMap(e=>"divider"!==e&&"items"in e?e.items:e))??[])?void 0:t.filter(e=>"divider"!==e).every(e=>e.disabled))&&!n.default}),i=e=>(e??[]).reduce((e,t)=>"divider"===t?e:"items"in t?e+i(t.items):e+(t.active?1:0),0),c=e.computed(()=>i(o.items));return(o,n)=>(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(e.unref(h),null,{default:e.withCtx(()=>{var i;return[(null==(i=t.items)?void 0:i.length)||o.$slots.default||t.disabled?(e.openBlock(),e.createBlock(e.unref(N),e.mergeProps({key:0,"is-portal-disabled":r.value},o.$attrs,{"dropdown-class":t.dropdownClass}),{trigger:e.withCtx(({visible:a})=>[e.renderSlot(o.$slots,"trigger",{visible:a},()=>[e.createVNode(e.unref(l._sfc_main$1),{type:"button",pill:!t.square,square:"",color:"gray",variant:"outline",size:t.triggerSize,class:e.normalizeClass({"border-none":!t.outlined}),"data-testid":"context-menu",disabled:r.value,"icon-prefix":t.icon,onClick:n[0]||(n[0]=e.withModifiers(()=>{},["stop"]))},null,8,["pill","size","class","disabled","icon-prefix"])])]),default:e.withCtx(()=>[t.items||o.$slots.default?(e.openBlock(),e.createBlock(e.unref(V),{key:0,width:t.width,class:"z-60 p-0.5"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"header"),t.items?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.items,(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l},["divider"===o&&l<t.items.length-1?(e.openBlock(),e.createBlock(e.unref(a._sfc_main),{key:0,spacing:"none"})):"divider"===o||"items"in o?"divider"!==o?(e.openBlock(),e.createBlock(b,{key:2,class:"rounded-sm",label:o.label,items:o.items},null,8,["label","items"])):e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(v,{key:1,label:o.label,variant:o.variant,icon:o.icon,"label-suffix-component":o.labelSuffixComponent,"label-prefix-component":o.labelPrefixComponent,description:o.description,classes:o.classes,"test-id":o.testId,disabled:o.disabled,active:o.active,onClick:o.onClick},null,8,["label","variant","icon","label-suffix-component","label-prefix-component","description","classes","test-id","disabled","active","onClick"]))],64))),128)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")]),_:3},8,["width"])):e.createCommentVNode("",!0)]),_:3},16,["is-portal-disabled","dropdown-class"])):e.createCommentVNode("",!0)]}),_:3}),t.showActiveCount&&c.value>0?(e.openBlock(),e.createBlock(e.unref(s._sfc_main),{key:0,size:"xs",color:"primary",class:"pointer-events-none absolute -right-1.5 -top-1.5","data-testid":"context-menu-active-count"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):e.createCommentVNode("",!0)]))}});exports.Fade=h,exports._sfc_main=_,exports._sfc_main$1=$;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, withCtx, createElementBlock, createVNode, createTextVNode, toDisplayString, unref, createCommentVNode, renderSlot } from "vue";
|
|
2
|
+
import { u as useIntl, _ as _sfc_main$2 } from "./customElements-DdFA__me.mjs";
|
|
3
|
+
import { _ as _sfc_main$1 } from "./Section.vue.es-MEFUWCxU.mjs";
|
|
4
|
+
import { g as getCountryNameByCode } from "./getCountryNameByCode.es-ymC9R46j.mjs";
|
|
5
|
+
import { a as getCustomerName } from "./customer.es-C_vSWcVA.mjs";
|
|
6
|
+
import { a as isOrganization } from "./typeGuards.es-fwUoeMCe.mjs";
|
|
7
|
+
const COUNTRIES_WITH_STATE = ["US", "CA"];
|
|
8
|
+
function formatAddress(address) {
|
|
9
|
+
const hasState = COUNTRIES_WITH_STATE.includes(address.country);
|
|
10
|
+
if (hasState) {
|
|
11
|
+
const street2 = joinParts([address.line1, address.line2], ", ");
|
|
12
|
+
const stateAndCode = joinParts([address.state, address.postal_code], " ");
|
|
13
|
+
const country2 = getCountryNameByCode(address.country);
|
|
14
|
+
return joinParts([street2, address.city, stateAndCode, country2], ", ");
|
|
15
|
+
}
|
|
16
|
+
const street = joinParts([address.line1, address.line2], " ");
|
|
17
|
+
const codeAndCity = joinParts([address.postal_code, address.city], " ");
|
|
18
|
+
const country = getCountryNameByCode(address.country);
|
|
19
|
+
return joinParts([street, codeAndCity, address.state, country], ", ");
|
|
20
|
+
}
|
|
21
|
+
function joinParts(parts, separator) {
|
|
22
|
+
return parts.filter(Boolean).join(separator);
|
|
23
|
+
}
|
|
24
|
+
const _hoisted_1 = {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "flex flex-col gap-2"
|
|
27
|
+
};
|
|
28
|
+
const _hoisted_2 = { key: 0 };
|
|
29
|
+
const _hoisted_3 = { key: 1 };
|
|
30
|
+
const _hoisted_4 = { key: 2 };
|
|
31
|
+
const _hoisted_5 = { key: 3 };
|
|
32
|
+
const _hoisted_6 = { key: 1 };
|
|
33
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
34
|
+
__name: "CustomerBillingInformation",
|
|
35
|
+
props: {
|
|
36
|
+
customer: {},
|
|
37
|
+
title: {},
|
|
38
|
+
fallbackToReference: { type: Boolean, default: true }
|
|
39
|
+
},
|
|
40
|
+
setup(__props) {
|
|
41
|
+
const { $t } = useIntl();
|
|
42
|
+
const props = __props;
|
|
43
|
+
const customerName = computed(() => {
|
|
44
|
+
if (!props.customer) return void 0;
|
|
45
|
+
const name = getCustomerName(props.customer);
|
|
46
|
+
if (props.fallbackToReference && name === "") {
|
|
47
|
+
return props.customer.reference;
|
|
48
|
+
}
|
|
49
|
+
if (!props.fallbackToReference && name === "") {
|
|
50
|
+
return void 0;
|
|
51
|
+
}
|
|
52
|
+
return name;
|
|
53
|
+
});
|
|
54
|
+
const titleWithFallback = computed(() => {
|
|
55
|
+
return props.title || $t({
|
|
56
|
+
defaultMessage: "Billing information",
|
|
57
|
+
description: "Title for the billing information",
|
|
58
|
+
id: "customer_billing_information.title"
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
const address = computed(() => {
|
|
62
|
+
if (!props.customer) return void 0;
|
|
63
|
+
if ("individual" in props.customer) return props.customer.individual.residential_address;
|
|
64
|
+
if ("organization" in props.customer) return props.customer.organization.registered_address;
|
|
65
|
+
return void 0;
|
|
66
|
+
});
|
|
67
|
+
return (_ctx, _cache) => {
|
|
68
|
+
return openBlock(), createBlock(_sfc_main$1, { title: titleWithFallback.value }, {
|
|
69
|
+
right: withCtx(() => [
|
|
70
|
+
renderSlot(_ctx.$slots, "settings")
|
|
71
|
+
]),
|
|
72
|
+
default: withCtx(() => {
|
|
73
|
+
var _a;
|
|
74
|
+
return [
|
|
75
|
+
__props.customer ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
76
|
+
customerName.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
77
|
+
createVNode(_sfc_main$2, { variant: "caps-heading" }, {
|
|
78
|
+
default: withCtx(() => [
|
|
79
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
80
|
+
defaultMessage: "Name",
|
|
81
|
+
description: "The label for the customer name in the billing information",
|
|
82
|
+
id: "customer_billing_information.name_label"
|
|
83
|
+
})), 1)
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
}),
|
|
87
|
+
createVNode(_sfc_main$2, { variant: "body-xs" }, {
|
|
88
|
+
default: withCtx(() => [
|
|
89
|
+
createTextVNode(toDisplayString(customerName.value), 1)
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
})
|
|
93
|
+
])) : createCommentVNode("", true),
|
|
94
|
+
((_a = address.value) == null ? void 0 : _a.line1) ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
95
|
+
createVNode(_sfc_main$2, { variant: "caps-heading" }, {
|
|
96
|
+
default: withCtx(() => [
|
|
97
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
98
|
+
defaultMessage: "Billing address",
|
|
99
|
+
description: "The label for the customer billing address in the billing information",
|
|
100
|
+
id: "customer_billing_information.billing_address_label"
|
|
101
|
+
})), 1)
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
}),
|
|
105
|
+
createVNode(_sfc_main$2, { variant: "body-xs" }, {
|
|
106
|
+
default: withCtx(() => [
|
|
107
|
+
createTextVNode(toDisplayString(unref(formatAddress)(address.value)), 1)
|
|
108
|
+
]),
|
|
109
|
+
_: 1
|
|
110
|
+
})
|
|
111
|
+
])) : createCommentVNode("", true),
|
|
112
|
+
__props.customer.email ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
113
|
+
createVNode(_sfc_main$2, { variant: "caps-heading" }, {
|
|
114
|
+
default: withCtx(() => [
|
|
115
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
116
|
+
defaultMessage: "Email address",
|
|
117
|
+
description: "The label for the customer email address in the billing information",
|
|
118
|
+
id: "customer_billing_information.email_address_label"
|
|
119
|
+
})), 1)
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
}),
|
|
123
|
+
createVNode(_sfc_main$2, { variant: "body-xs" }, {
|
|
124
|
+
default: withCtx(() => [
|
|
125
|
+
createTextVNode(toDisplayString(__props.customer.email), 1)
|
|
126
|
+
]),
|
|
127
|
+
_: 1
|
|
128
|
+
})
|
|
129
|
+
])) : createCommentVNode("", true),
|
|
130
|
+
unref(isOrganization)(__props.customer) ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
131
|
+
createVNode(_sfc_main$2, { variant: "caps-heading" }, {
|
|
132
|
+
default: withCtx(() => [
|
|
133
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
134
|
+
defaultMessage: "VAT number",
|
|
135
|
+
description: "The label for the customer Vat number in the billing information",
|
|
136
|
+
id: "customer_billing_information.vat_number_label"
|
|
137
|
+
})), 1)
|
|
138
|
+
]),
|
|
139
|
+
_: 1
|
|
140
|
+
}),
|
|
141
|
+
createVNode(_sfc_main$2, { variant: "body-xs" }, {
|
|
142
|
+
default: withCtx(() => {
|
|
143
|
+
var _a2, _b;
|
|
144
|
+
return [
|
|
145
|
+
createTextVNode(toDisplayString((_b = (_a2 = __props.customer.organization.tax_ids) == null ? void 0 : _a2[0]) == null ? void 0 : _b.id), 1)
|
|
146
|
+
];
|
|
147
|
+
}),
|
|
148
|
+
_: 1
|
|
149
|
+
})
|
|
150
|
+
])) : createCommentVNode("", true)
|
|
151
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
152
|
+
createVNode(_sfc_main$2, {
|
|
153
|
+
variant: "body-xs",
|
|
154
|
+
shade: "lighter"
|
|
155
|
+
}, {
|
|
156
|
+
default: withCtx(() => [
|
|
157
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
158
|
+
defaultMessage: "No billing information to display.",
|
|
159
|
+
description: "Text that is being displayed when there is no active subscription in the subscriptions block",
|
|
160
|
+
id: "customer_overview.billing_information.no_billing_information_available"
|
|
161
|
+
})), 1)
|
|
162
|
+
]),
|
|
163
|
+
_: 1
|
|
164
|
+
})
|
|
165
|
+
]))
|
|
166
|
+
];
|
|
167
|
+
}),
|
|
168
|
+
_: 3
|
|
169
|
+
}, 8, ["title"]);
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
export {
|
|
174
|
+
_sfc_main as _
|
|
175
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./customElements-BTJzBHMy.js"),i=require("./Section.vue.es-tLYXp-tF.js"),o=require("./getCountryNameByCode.es-fP52nO_7.js"),n=require("./customer.es-D42Md24r.js"),a=require("./typeGuards.es-C4nR5FkL.js"),r=["US","CA"];function l(e){if(r.includes(e.country)){const t=s([e.line1,e.line2],", "),i=s([e.state,e.postal_code]," "),n=o.getCountryNameByCode(e.country);return s([t,e.city,i,n],", ")}const t=s([e.line1,e.line2]," "),i=s([e.postal_code,e.city]," "),n=o.getCountryNameByCode(e.country);return s([t,i,e.state,n],", ")}function s(e,t){return e.filter(Boolean).join(t)}const c={key:0,class:"flex flex-col gap-2"},d={key:0},u={key:1},m={key:2},f={key:3},_={key:1},g=e.defineComponent({__name:"CustomerBillingInformation",props:{customer:{},title:{},fallbackToReference:{type:Boolean,default:!0}},setup(o){const{$t:r}=t.useIntl(),s=o,g=e.computed(()=>{if(!s.customer)return;const e=n.getCustomerName(s.customer);return s.fallbackToReference&&""===e?s.customer.reference:s.fallbackToReference||""!==e?e:void 0}),p=e.computed(()=>s.title||r({defaultMessage:"Billing information",description:"Title for the billing information",id:"customer_billing_information.title"})),b=e.computed(()=>{if(s.customer)return"individual"in s.customer?s.customer.individual.residential_address:"organization"in s.customer?s.customer.organization.registered_address:void 0});return(n,s)=>(e.openBlock(),e.createBlock(i._sfc_main,{title:p.value},{right:e.withCtx(()=>[e.renderSlot(n.$slots,"settings")]),default:e.withCtx(()=>{var i;return[o.customer?(e.openBlock(),e.createElementBlock("div",c,[g.value?(e.openBlock(),e.createElementBlock("div",d,[e.createVNode(t._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Name",description:"The label for the customer name in the billing information",id:"customer_billing_information.name_label"})),1)]),_:1}),e.createVNode(t._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value),1)]),_:1})])):e.createCommentVNode("",!0),(null==(i=b.value)?void 0:i.line1)?(e.openBlock(),e.createElementBlock("div",u,[e.createVNode(t._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Billing address",description:"The label for the customer billing address in the billing information",id:"customer_billing_information.billing_address_label"})),1)]),_:1}),e.createVNode(t._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)(b.value)),1)]),_:1})])):e.createCommentVNode("",!0),o.customer.email?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(t._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Email address",description:"The label for the customer email address in the billing information",id:"customer_billing_information.email_address_label"})),1)]),_:1}),e.createVNode(t._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.customer.email),1)]),_:1})])):e.createCommentVNode("",!0),e.unref(a.isOrganization)(o.customer)?(e.openBlock(),e.createElementBlock("div",f,[e.createVNode(t._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"VAT number",description:"The label for the customer Vat number in the billing information",id:"customer_billing_information.vat_number_label"})),1)]),_:1}),e.createVNode(t._sfc_main,{variant:"body-xs"},{default:e.withCtx(()=>{var t,i;return[e.createTextVNode(e.toDisplayString(null==(i=null==(t=o.customer.organization.tax_ids)?void 0:t[0])?void 0:i.id),1)]}),_:1})])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",_,[e.createVNode(t._sfc_main,{variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"No billing information to display.",description:"Text that is being displayed when there is no active subscription in the subscriptions block",id:"customer_overview.billing_information.no_billing_information_available"})),1)]),_:1})]))]}),_:3},8,["title"]))}});exports._sfc_main=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports.DEFAULT_MAX_ITEMS=3;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { _ as _sfc_main$
|
|
2
|
+
import { a as _sfc_main$5 } from "./Button.vue.es-BrWHdiEA.mjs";
|
|
3
|
+
import { _ as _sfc_main$2 } from "./Section.vue.es-MEFUWCxU.mjs";
|
|
4
|
+
import { u as useIntl, _ as _sfc_main$4 } from "./customElements-DdFA__me.mjs";
|
|
5
|
+
import { _ as _sfc_main$3 } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-DbTvbHk7.mjs";
|
|
4
6
|
import { _ as _sfc_main$6 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
5
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
7
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-D55t_7LY.mjs";
|
|
8
|
+
import { r as resolveConfiguration } from "./configuration-CD8cOXAJ.mjs";
|
|
6
9
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7
10
|
__name: "CustomerPaymentMethodsBlock",
|
|
8
11
|
props: {
|
|
@@ -113,15 +116,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
113
116
|
isLoading: { type: Boolean },
|
|
114
117
|
paymentMethods: { type: Array },
|
|
115
118
|
maxPaymentMethods: { type: Number },
|
|
116
|
-
configuration: {
|
|
117
|
-
showViewAllButton: true,
|
|
118
|
-
showAddButton: true
|
|
119
|
-
}), type: Object }
|
|
119
|
+
configuration: { type: Object }
|
|
120
120
|
},
|
|
121
121
|
setup(__props) {
|
|
122
|
+
const DEFAULT_CONFIGURATION = {
|
|
123
|
+
showViewAllButton: true,
|
|
124
|
+
showAddButton: true
|
|
125
|
+
};
|
|
126
|
+
const props = __props;
|
|
127
|
+
const configuration = computed(
|
|
128
|
+
() => resolveConfiguration(DEFAULT_CONFIGURATION, props.configuration)
|
|
129
|
+
);
|
|
122
130
|
const { dispatchAction } = useActionDispatchProvider();
|
|
123
131
|
return (_ctx, _cache) => {
|
|
124
|
-
var _a, _b;
|
|
125
132
|
return __props.isLoading ? (openBlock(), createBlock(_sfc_main$6, {
|
|
126
133
|
key: 0,
|
|
127
134
|
variant: "section",
|
|
@@ -132,8 +139,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
132
139
|
class: "sv-payment-methods sv-root sv-component",
|
|
133
140
|
"is-loading": __props.isLoading,
|
|
134
141
|
"payment-methods": __props.paymentMethods,
|
|
135
|
-
"show-view-all-button":
|
|
136
|
-
"show-add-button":
|
|
142
|
+
"show-view-all-button": configuration.value.showViewAllButton,
|
|
143
|
+
"show-add-button": configuration.value.showAddButton,
|
|
137
144
|
onViewAllPaymentMethods: _cache[0] || (_cache[0] = ($event) => unref(dispatchAction)({ action: "view-all-payment-methods" })),
|
|
138
145
|
onAddPaymentMethod: _cache[1] || (_cache[1] = ($event) => unref(dispatchAction)({ action: "add-payment-method" }))
|
|
139
146
|
}, null, 8, ["is-loading", "payment-methods", "show-view-all-button", "show-add-button"]));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./Button.vue.es-aLcIdATK.js"),o=require("./Section.vue.es-tLYXp-tF.js"),n=require("./customElements-BTJzBHMy.js"),a=require("./PaymentMethodsList.vue_vue_type_script_setup_true_lang-XPz73RVU.js"),s=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),i=require("./useActionDispatchProvider-Cz8xLLYA.js"),d=require("./configuration-BjYwV4_B.js"),m=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(s){const i=s,{$t:d}=n.useIntl(),m=e.computed(()=>i.paymentMethods.length>0);return(i,r)=>(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{class:"sv-payment-methods","no-spacing":"","no-border":"",title:e.unref(d)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(s.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[m.value?(e.openBlock(),e.createBlock(a._sfc_main,{key:0,"payment-methods":s.paymentMethods},null,8,["payment-methods"])):(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:1,class:"sv-empty-state sv-payment-methods__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(n._sfc_main),{variant:"body-sm",shade:"lighter","no-spacing":"",class:"sv-payment-methods__empty-message"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),s.showAddButton?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",variant:"outline",color:"gray","icon-prefix":"add",type:"button",onClick:r[1]||(r[1]=e=>i.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[s.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{size:"sm",variant:"ghost",color:"gray","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-payment-methods__view-all",type:"button",onClick:r[0]||(r[0]=e=>i.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),r=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{type:Object}},setup(t){const o={showViewAllButton:!0,showAddButton:!0},n=t,a=e.computed(()=>d.resolveConfiguration(o,n.configuration)),{dispatchAction:r}=i.useActionDispatchProvider();return(o,n)=>t.isLoading?(e.openBlock(),e.createBlock(s._sfc_main,{key:0,variant:"section",class:"sv-payment-methods sv-root sv-component sv-loading h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(m,{key:1,class:"sv-payment-methods sv-root sv-component","is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":a.value.showViewAllButton,"show-add-button":a.value.showAddButton,onViewAllPaymentMethods:n[0]||(n[0]=t=>e.unref(r)({action:"view-all-payment-methods"})),onAddPaymentMethod:n[1]||(n[1]=t=>e.unref(r)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}});exports._sfc_main=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),t=require("./api.es-Czekkp_X.js"),o=require("./customElements-BTJzBHMy.js"),n=require("./component-hDuDTBt5.js"),a=require("./useService-D73FNBjT.js"),i=require("./ErrorNotification.vue.es-BX3khKFc.js"),l=require("./pricingItemConfigs.es-C73cQlxQ.js"),u=require("./formatting.es-9hM8aHSg.js"),r=require("./Button.vue.es-aLcIdATK.js"),d=require("./TooltipParagraph.vue.es-fSwKGXKg.js"),s=require("./Section.vue.es-tLYXp-tF.js"),c=require("./Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),p=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-5I81Qr6q.js"),m=require("./index-BJ3dHkSK.js"),v=require("./Divider.vue.es-ClFG8QtG.js"),f=require("./Expand.vue.es-C-lnbA1v.js"),h=require("./cn.es-BLHlMR4Y.js"),_=require("./invoices-BiqM6xN6.js"),g=require("./useWatchDebounced-C_YxgoQ6.js"),y=require("./Input.vue.es-C8VhMKuI.js"),b=require("./AddPaymentMethodPane.vue_vue_type_script_setup_true_lang--AVI4Q4E.js"),w=require("./SubscriptionSummary.vue_vue_type_script_setup_true_lang-Dl5Lg39D.js"),x=require("./customer.es-D42Md24r.js"),M=require("./usePaymentMethodOptions-fBvWYynV.js"),B=require("./Modal.vue.es-CX5geho3.js"),C=(e,t,o)=>{var n,a,i,l,r,d;if(null==o?void 0:o.amount)return u.formatAmount(o.amount);if(null==o?void 0:o.credits){const u=Number(o.credits.quantity),s=(1===u?null==(a=null==(n=o.credits.credit_type)?void 0:n.unit_name)?void 0:a.singular:(null==(l=null==(i=o.credits.credit_type)?void 0:i.unit_name)?void 0:l.plural)??(null==(d=null==(r=o.credits.credit_type)?void 0:r.unit_name)?void 0:d.singular))??e({defaultMessage:"credits",description:"Wallet balances credits default message",id:"wB/wXs"});return`${t(u)} ${s}`}return e({defaultMessage:"N/A",description:"Fallback wallet balance label when no balance is available",id:"PW+sL4"})},T=e.defineComponent({__name:"DateTimeAgo",props:{date:{},actionVerb:{}},setup(t){const n=3600,a=t,{$t:i,formatDate:l}=o.useIntl(),u=e.ref(Date.now());let r;e.onMounted(()=>{r=setInterval(()=>{u.value=Date.now()},3e4)}),e.onBeforeUnmount(()=>{clearInterval(r)});const s=e.computed(()=>{const e=Math.max(0,(u.value-a.date.getTime())/1e3);if(e<60)return i({defaultMessage:"{count, plural, one {# second} other {# seconds}} ago",id:"dateTimeAgo.seconds",description:"Relative time in whole seconds"},{count:Math.trunc(e)});if(e<n)return i({defaultMessage:"{count, plural, one {# minute} other {# minutes}} ago",id:"dateTimeAgo.minutes",description:"Relative time in whole minutes"},{count:Math.trunc(e/60)});if(e<86400)return i({defaultMessage:"{count, plural, one {# hour} other {# hours}} ago",id:"dateTimeAgo.hours",description:"Relative time in whole hours"},{count:Math.trunc(e/n)});const t=((e,t)=>{const o=12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth());return t.getDate()<e.getDate()?o-1:o})(a.date,new Date(u.value));if(t<1){const t=Math.trunc(e/86400);return 1===t?i({defaultMessage:"yesterday",id:"dateTimeAgo.yesterday",description:'Relative time for a single day ago, reading as "updated yesterday" once the action verb is in front'}):i({defaultMessage:"{count, plural, one {# day} other {# days}} ago",id:"dateTimeAgo.days",description:"Relative time in whole days"},{count:t})}return t<12?i({defaultMessage:"{count, plural, one {# month} other {# months}} ago",id:"dateTimeAgo.months",description:"Relative time in whole months"},{count:t}):i({defaultMessage:"{count, plural, one {# year} other {# years}} ago",id:"dateTimeAgo.years",description:"Relative time in whole years"},{count:Math.trunc(t/12)})}),c=e.computed(()=>a.actionVerb?`${a.actionVerb} ${s.value}`:s.value),p=e.computed(()=>l({date:a.date,format:"dateTime",offsetType:"local"}));return(t,o)=>(e.openBlock(),e.createBlock(d._sfc_main,null,{tooltip:e.withCtx(()=>[e.createVNode(d.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(d._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(c.value),1)]),_:1}))}}),P=t=>{const{$t:n,formatNumber:a}=o.useIntl(),i=e=>C(n,a,e),u=e.computed(()=>{var e,o;return(null==(o=null==(e=t.walletBalance.wallet)?void 0:e.wallet_type)?void 0:o.name)||n({defaultMessage:"Balance",id:"wallet_balance.balance_label",description:"Label shown above a wallet's balance amount"})}),r=e=>{var t;return((null==(t=e.pricing_item)?void 0:t.configs)??[]).filter(e=>!!e.on_demand)},d=e.computed(()=>(t.walletBalance.charge_on_demand_pricing_items??[]).filter(e=>r(e).some(e=>l.isFixedPricing(e)||l.isFlexiblePricing(e)))),s=e.computed(()=>d.value.find(e=>r(e).some(e=>l.isFlexiblePricing(e)))),c=e.computed(()=>!!t.showManualTopUp&&d.value.length>0),p=e.computed(()=>!!t.showAutoTopUp&&!!s.value),m=e.computed(()=>{var e,o;return null==(o=null==(e=t.walletBalance.wallet)?void 0:e.auto_top_up_configs)?void 0:o.find(e=>"ACTIVE"===e.status)}),v=e.computed(()=>{var e,o;return null==(o=null==(e=t.walletBalance.wallet_balance.open_balance)?void 0:e.credits)?void 0:o.credit_type}),f=(e,t)=>i({credits:{quantity:e,credit_type_id:t,credit_type:v.value}}),h=e.computed(()=>{var e,o;const n=null==(e=m.value)?void 0:e.pricing_item_id;if(!n)return;const a=(t.walletBalance.charge_on_demand_pricing_items??[]).filter(e=>e.pricing_item_id===n).flatMap(e=>r(e)).flatMap(e=>e.wallet_grants??[]),i=null==(o=t.walletBalance.wallet)?void 0:o.wallet_type_id;return a.find(e=>e.wallet_type_id===i)??a[0]}),_=e.computed(()=>{var e,t;const o=null==(e=m.value)?void 0:e.topup_amount,n=null==(t=h.value)?void 0:t.credits_grant;if(!o||!n)return"";if(n.credits)return f(n.credits.quantity,n.credits.credit_type_id);if(n.conversion){const e=Number(o.quantity)*Number(n.conversion.rate);return f(String(e),n.conversion.credit_type_id)}return""}),g=e.computed(()=>m.value?n({defaultMessage:"Auto top-up enabled",id:"wallet_balance.auto_top_up_enabled_label",description:"Label shown when a wallet tops itself up automatically"}):n({defaultMessage:"No auto top-up enabled",id:"wallet_balance.auto_top_up_disabled_label",description:"Label shown when a wallet has no automatic top-up configured"})),y=e.computed(()=>{const e=m.value;if(!e)return n({defaultMessage:"Set up an automatic top-up and your balance is increased for you whenever it drops below an amount you choose, so you never run out.",id:"wallet_balance.auto_top_up_setup_explanation",description:"Tooltip explaining what automatic top-ups do, shown when none is configured yet"});const t=e.topup_amount?i({amount:e.topup_amount}):"",o=(e=>e.amount?i({amount:e.amount}):e.credits?f(e.credits.quantity,e.credits.credit_type_id):"")(e.threshold);return t&&o?_.value?n({defaultMessage:"Your balance is automatically increased with {topUpCredits} ({topUpAmount}) when it drops below {threshold}.",id:"wallet_balance.auto_top_up_credits_explanation",description:"Tooltip explaining an automatic top-up that grants credits for a paid amount"},{topUpCredits:_.value,topUpAmount:t,threshold:o}):n({defaultMessage:"Your balance is automatically increased with {topUpAmount} when it drops below {threshold}.",id:"wallet_balance.auto_top_up_explanation",description:"Tooltip explaining how the automatic top-up of a wallet balance works"},{topUpAmount:t,threshold:o}):n({defaultMessage:"Your balance is topped up automatically once it runs low.",id:"wallet_balance.auto_top_up_generic_explanation",description:"Tooltip shown for an active automatic top-up whose amount or threshold is unknown"})});return{walletName:u,formatBalance:i,manualTopUpItems:d,flexibleManualTopUpItem:s,showManualTopUp:c,showAutoTopUp:p,activeTopUpConfig:m,autoTopUpLabel:g,autoTopUpExplanation:y}},S={class:"flex flex-col gap-3 py-3"},k={class:"flex flex-col gap-1 px-4"},N={class:"flex w-full justify-between gap-3"},V={class:"flex w-full items-center gap-4"},I={key:0},U={key:1,class:"flex w-full justify-between gap-3 px-4"},E={class:"flex min-w-0 items-center gap-1"},A={class:"flex min-w-0 items-center gap-1"},D={class:"shrink-0"},O=e.defineComponent({__name:"WalletBalancesItem",props:{walletBalance:{},showAutoTopUp:{type:Boolean},showManualTopUp:{type:Boolean}},emits:["top-up","auto-top-up","cancel-auto-top-up"],setup(t){const n=t,{$t:a}=o.useIntl(),{walletName:i,formatBalance:l,manualTopUpItems:u,flexibleManualTopUpItem:s,showManualTopUp:c,showAutoTopUp:p,activeTopUpConfig:m,autoTopUpLabel:v,autoTopUpExplanation:f}=P(n);return(h,_)=>(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",k,[e.createElementVNode("div",N,[e.createVNode(o._sfc_main,{variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1}),e.createVNode(o._sfc_main,{variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>{var o,n;return[(null==(o=t.walletBalance.wallet_balance)?void 0:o.balance_at)?(e.openBlock(),e.createBlock(T,{key:0,date:new Date(null==(n=t.walletBalance.wallet_balance)?void 0:n.balance_at),"action-verb":e.unref(a)({defaultMessage:"updated",id:"wallet_balance.updated_action_verb",description:"Verb in front of when a wallet balance was last updated, e.g. 'updated 5 minutes ago'"})},null,8,["date","action-verb"])):e.createCommentVNode("",!0)]}),_:1})]),e.createElementVNode("div",V,[e.createVNode(o._sfc_main,{variant:"body-lg",weight:"semibold","no-spacing":"",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)(n.walletBalance.wallet_balance.open_balance)),1)]),_:1}),e.unref(c)?(e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{key:0,size:"xs",color:"primary",onClick:_[0]||(_[0]=t=>h.$emit("top-up",e.unref(u)[0]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Top up",id:"v1V8kA",description:"Button to top up a wallet balance"})),1)]),_:1})):e.createCommentVNode("",!0)])]),h.$slots.graph?(e.openBlock(),e.createElementBlock("div",I,[e.renderSlot(h.$slots,"graph")])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",E,[e.createVNode(d._sfc_main,{class:"min-w-0"},{tooltip:e.withCtx(()=>[e.createVNode(d.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(d._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",A,[e.createVNode(o._sfc_main,{variant:"body-sm",shade:"lighter","no-spacing":"",class:"truncate"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)),1)]),_:1}),e.createVNode(r._sfc_main,{icon:"info",size:"2xs",class:"shrink-0 cursor-help text-gray-400"})])]),_:1})]),e.createElementVNode("div",D,[e.unref(m)?(e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{key:0,size:"xs",color:"gray",variant:"outline",onClick:_[1]||(_[1]=t=>h.$emit("cancel-auto-top-up",e.unref(m)))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Disable",id:"wallet_balance.auto_top_up_disable_button",description:"Button to turn off a wallet's automatic top-up"})),1)]),_:1})):(e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{key:1,size:"xs",color:"gray",variant:"outline",onClick:_[2]||(_[2]=t=>h.$emit("auto-top-up",e.unref(s)))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Enable",id:"wallet_balance.auto_top_up_enable_button",description:"Button to set up a wallet's automatic top-up"})),1)]),_:1}))])])):e.createCommentVNode("",!0)]))}}),$={class:"flex flex-col gap-2"},q=e.defineComponent({__name:"WalletBalances",props:{customerWalletBalances:{},title:{default:void 0},showAutoTopUp:{type:Boolean,default:!1},showManualTopUp:{type:Boolean,default:!1}},emits:["top-up","auto-top-up","cancel-auto-top-up"],setup:t=>(o,n)=>(e.openBlock(),e.createBlock(s._sfc_main,{"no-spacing":"","no-border":"",title:t.title},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customerWalletBalances,a=>(e.openBlock(),e.createBlock(s._sfc_main,{key:a.wallet_id,"no-spacing":""},{default:e.withCtx(()=>[e.createVNode(O,{"wallet-balance":a,"show-auto-top-up":t.showAutoTopUp,"show-manual-top-up":t.showManualTopUp,onTopUp:n[0]||(n[0]=e=>o.$emit("top-up",e)),onAutoTopUp:n[1]||(n[1]=e=>o.$emit("auto-top-up",e)),onCancelAutoTopUp:n[2]||(n[2]=e=>o.$emit("cancel-auto-top-up",e))},null,8,["wallet-balance","show-auto-top-up","show-manual-top-up"])]),_:2},1024))),128))])]),_:2},[o.$slots["heading-right"]?{name:"right",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"heading-right")]),key:"0"}:void 0]),1032,["title"]))});const R=(e=[],t)=>{if(null==t?void 0:t.pricing_item_id)return e.find(e=>(e.charge_on_demand_pricing_items??[]).some(({pricing_item_id:e})=>e===t.pricing_item_id))},j=["TOP_UP","ADD_PAYMENT_METHOD","SUCCESS"],L=e=>"object"==typeof e&&null!==e&&"pricing_item"in e,F=(e,t)=>{const o=new Set((e=>[...new Set(((null==e?void 0:e.charge_on_demand_pricing_items)??[]).flatMap(e=>L(e)&&e.pricing_plan_schedule_id?[e.pricing_plan_schedule_id]:[]))])(e));return t.flatMap(e=>{const t=(e.pricing_plan_schedule_infos??[]).filter(({id:e})=>o.has(e));return 0===t.length?[]:[{id:e.id,name:e.name||e.reference||e.id,scheduleIds:t.map(({id:e})=>e),enabledPricingIds:t.flatMap(e=>{var t;return((null==(t=e.pricing_plan_schedule)?void 0:t.enabled_pricings)??[]).flatMap(({pricing_id:e})=>e?[e]:[])})}]})},Y=e=>((null==e?void 0:e.charge_on_demand_pricing_items)??[]).flatMap(t=>{var o,n;if(!L(t))return[];const a=t.pricing_item_id??(null==(o=t.pricing_item)?void 0:o.id);return a?((null==(n=t.pricing_item)?void 0:n.configs)??[]).map(o=>{const n=function(e,t){var o,n,a,i,u,r,d;if(!e.on_demand||!l.isFlexiblePricing(e))return;const s=null==(n=null==(o=e.details)?void 0:o.bands)?void 0:n[0],c=(null==(a=null==s?void 0:s.minimum_amount)?void 0:a.currency)??(null==(i=null==s?void 0:s.maximum_amount)?void 0:i.currency)??(null==(r=null==(u=null==t?void 0:t.wallet_balance.balance)?void 0:u.amount)?void 0:r.currency);if(!c)return;const p=z(t),m=p?W(e,t):void 0,v=null==(d=null==p?void 0:p.credit_type)?void 0:d.unit_name,f=e=>{if(!e)return;const t=p&&m?J(e.quantity,m.rate):void 0;return void 0!==t&&p?G(t,p):{amount:e}};return{config:{...(null==s?void 0:s.minimum_amount)&&{minimum_amount:s.minimum_amount},...(null==s?void 0:s.maximum_amount)&&{maximum_amount:s.maximum_amount}},currency:c,...m&&{creditsConfiguration:{conversionRate:m.rate,...(null==v?void 0:v.singular)&&{unitNameSingle:v.singular},...(null==v?void 0:v.plural)&&{unitNamePlural:v.plural}}},bounds:{...f(null==s?void 0:s.minimum_amount)&&{minimum:f(null==s?void 0:s.minimum_amount)},...f(null==s?void 0:s.maximum_amount)&&{maximum:f(null==s?void 0:s.maximum_amount)}}}}(o,e),i=function(e,t){var o,n,a;if(!e.on_demand||!l.hasOneOfPricingTypes(e,["FIXED"]))return;const i=null==(a=null==(n=null==(o=e.details)?void 0:o.bands)?void 0:n[0])?void 0:a.fixed_amount;if(!i)return;const u=z(t),r=u?X(e,t):void 0;return{amount:i,value:r&&u?G(r.quantity,u):{amount:i}}}(o,e);return{pricingItemId:a,...t.pricing_plan_schedule_id&&{pricingPlanScheduleId:t.pricing_plan_schedule_id},config:o,...n&&{flexiblePricing:n},...i&&{fixedPricing:i}}}):[]});const z=e=>{var t;return null==(t=null==e?void 0:e.wallet_balance.balance)?void 0:t.credits},H=(e,t)=>{var o;const n=null==(o=null==t?void 0:t.wallet)?void 0:o.wallet_type_id;return(e.wallet_grants??[]).filter(({wallet_type_id:e})=>!n||e===n)},W=(e,t)=>{var o,n;return null==(n=null==(o=H(e,t).find(({credits_grant:e})=>null==e?void 0:e.conversion))?void 0:o.credits_grant)?void 0:n.conversion},X=(e,t)=>{var o,n;return null==(n=null==(o=H(e,t).find(({credits_grant:e})=>null==e?void 0:e.credits))?void 0:o.credits_grant)?void 0:n.credits},G=(e,t)=>({credits:{...t,quantity:e}}),J=(e,t)=>{const o=Number(e),n=Number(t);return Number.isFinite(o)&&Number.isFinite(n)?String(o*n):void 0};const K=e=>{var t,o,n,a,i;return!!(null==(t=e.fixedPricing)?void 0:t.value.credits)||!!(null==(o=e.flexiblePricing)?void 0:o.creditsConfiguration)||!!(null==(i=(null==(n=e.flexiblePricing)?void 0:n.bounds.minimum)??(null==(a=e.flexiblePricing)?void 0:a.bounds.maximum))?void 0:i.credits)},Q=(e=[])=>{for(const{flexiblePricing:t,fixedPricing:o}of e){const e=(null==t?void 0:t.currency)??(null==o?void 0:o.amount.currency);if(e)return e}},Z=(e=[])=>{var t,o,n;for(const{fixedPricing:a,flexiblePricing:i}of e){const e=(null==a?void 0:a.value.credits)??(null==(t=(null==i?void 0:i.bounds.minimum)??(null==i?void 0:i.bounds.maximum))?void 0:t.credits);if(null==(n=null==(o=null==e?void 0:e.credit_type)?void 0:o.unit_name)?void 0:n.plural)return e.credit_type.unit_name.plural}},ee=(e=[])=>{var t;for(const{flexiblePricing:o}of e){const e=null==(t=null==o?void 0:o.creditsConfiguration)?void 0:t.conversionRate;if(e)return e}},te=(e=[])=>{for(const{flexiblePricing:t}of e){const{minimum_amount:e,maximum_amount:o}=(null==t?void 0:t.config)??{};if(e||o)return{...e&&{minimum:e},...o&&{maximum:o}}}return{}},oe=(e=[])=>{const t=((e=[])=>{if(e.some(K)){const t=(e=>{var t;for(const{fixedPricing:o,flexiblePricing:n}of e){const e=(null==o?void 0:o.value.credits)??(null==(t=(null==n?void 0:n.bounds.minimum)??(null==n?void 0:n.bounds.maximum))?void 0:t.credits);if(null==e?void 0:e.credit_type_id)return e.credit_type_id}})(e);return t?{creditTypeId:t}:void 0}for(const{flexiblePricing:t,fixedPricing:o}of e){const e=(null==t?void 0:t.currency)??(null==o?void 0:o.amount.currency);if(e)return{currency:e}}})(e);if(t)return{denomination:t,chargeCurrency:Q(e)??"",creditUnitName:Z(e),conversionRate:ee(e),topUpBounds:te(e)}};const ne={key:0},ae=e.defineComponent({__name:"TopUpInvoicePreview",props:{pricingPlanScheduleId:{type:String},pricingItems:{type:Array}},setup(t){const n=t,{$t:a}=o.useIntl(),i=e.computed(()=>n.pricingPlanScheduleId),l=e.computed(()=>n.pricingItems),{invoicePreview:u}=function({pricingPlanScheduleId:t,pricingItems:n}){const{previewChargeOnDemandPricingItems:a}=_.createInvoicesService(),i=o.useLogger(),l=e.ref(),u=e.ref(!1),r=o.createLatestGuard(),d=async()=>{const e=t.value,o=r();if(!e||!n.value)return n.value&&!e&&i.warn("INVOICE_PREVIEW_SKIPPED","Skipped the top-up invoice preview: no schedule to charge it on",{missing:["pricingPlanScheduleId"]}),l.value=void 0,void(u.value=!1);u.value=!0;try{const t=await a({pricingPlanScheduleId:e,pricingItems:n.value});o()&&(l.value=t)}catch(d){o()&&(l.value=void 0),i.error("INVOICE_PREVIEW_FAILED","Failed to load top-up invoice preview",{},d)}finally{o()&&(u.value=!1)}};return g.useWatchDebounced(n,()=>{d()},{debounce:400,deep:!0}),d(),{invoicePreview:l,isPreviewPending:u,loadPreview:d}}({pricingPlanScheduleId:i,pricingItems:l});return(t,o)=>(e.openBlock(),e.createBlock(c._sfc_main,{class:"sv-top-up-invoice-preview h-[152px]","data-testid":"top-up-invoice-preview-skeleton"},{default:e.withCtx(()=>[e.unref(u)?(e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(e.unref(h._sfc_main),{required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"You will pay",description:"Label above the preview of what topping up will be invoiced for",id:"topup_modal.invoice_preview.label"})),1)]),_:1}),e.createVNode(e.unref(s._sfc_main),{"content-background":"none"},{default:e.withCtx(()=>[e.createVNode(e.unref(p._sfc_main$2),{invoice:e.unref(u),"is-customer-facing":""},null,8,["invoice"])]),_:1})])):e.createCommentVNode("",!0)]),_:1}))}}),ie=(e,t)=>e.currency??t??e.creditTypeId??"",le=(e,t)=>({quantity:e??null,currency:t}),ue=(e,{denomination:t,chargeCurrency:o,creditUnitName:n,minimumTopUp:a})=>{var i,l,u,r,d;return{enabled:"ACTIVE"===(null==e?void 0:e.status),threshold:le((null==(l=null==(i=null==e?void 0:e.threshold)?void 0:i.amount)?void 0:l.quantity)??(null==(r=null==(u=null==e?void 0:e.threshold)?void 0:u.credits)?void 0:r.quantity),ie(t,n)),topUpAmount:le((null==(d=null==e?void 0:e.topup_amount)?void 0:d.quantity)??a,o)}},re=(e,t)=>{var o;const n=null==(o=e.threshold)?void 0:o.quantity;return n?t.creditTypeId?{credits:{quantity:n,credit_type_id:t.creditTypeId}}:{amount:{quantity:n,currency:t.currency??""}}:{}},de=(e,t)=>{var o;return(null==(o=e.topUpAmount)?void 0:o.quantity)?{quantity:e.topUpAmount.quantity,currency:e.topUpAmount.currency??t}:void 0},se=(e,{denomination:t,chargeCurrency:o})=>({status:e.enabled?"ACTIVE":"INACTIVE",threshold:re(e,t),...de(e,o)&&{topup_amount:de(e,o)}}),ce=(e,t)=>se(ue(e,t),t),pe=(e,t)=>JSON.stringify(e)===JSON.stringify(t),me=e=>{const t=Number(null==e?void 0:e.quantity);return(null==e?void 0:e.quantity)&&Number.isFinite(t)?t:void 0},ve=e=>{const t=Number(e);return null!=e&&""!==e&&Number.isFinite(t)?t:void 0},fe=(e,t,o)=>{const n=ve(e),a=ve(o);if(!(void 0===n||void 0===a||a<=0))return"CREDITS"===t?n/a:n*a},he=(e,t,o,n)=>t===o?ve(e):fe(e,t,n),_e=e=>e.toFixed(2),ge=(e,t)=>"AMOUNT"===t?_e(e):String(Number(e.toFixed(6))),ye=(e,t,o,n)=>{const a=((e,t,o)=>"CREDITS"===t?fe(e,"AMOUNT",o):ve(e))(null==e?void 0:e.quantity,t,o);if(void 0!==a)return"CREDITS"===t?n(a):_e(a)},be=["data-testid"],we=e.defineComponent({__name:"ConvertedAmountInput",props:e.mergeModels({unit:{type:String},modelBase:{type:String},entryBase:{type:String},conversionRate:{type:String},showConversionHint:{type:Boolean},currency:{type:String},creditUnitName:{type:String},bounds:{type:Object},label:{type:String},name:{type:String},required:{type:Boolean},disabled:{type:Boolean},error:{type:[String,Object,Array]}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=t,a=e.useModel(t,"modelValue"),{$t:i,formatNumber:l}=o.useIntl(),r=e.computed(()=>n.entryBase??n.modelBase),d=e.computed(()=>r.value!==n.modelBase&&void 0!==ve(n.conversionRate)),s=e.ref("");function c(e){const t=he(e,r.value,n.modelBase,n.conversionRate);return void 0===t?"":ge(t,n.modelBase)}e.watch(()=>[a.value,r.value,n.modelBase,n.conversionRate],([e])=>{if(!d.value)return void(s.value=e??"");if(e===c(s.value))return;const t=he(e,n.modelBase,r.value,n.conversionRate);s.value=void 0===t?"":ge(t,r.value)},{immediate:!0});const p=e.computed({get:()=>s.value,set:e=>{s.value=function(e){return"string"==typeof e?e:"number"==typeof e?String(e):""}(e),a.value=d.value?c(s.value):s.value}}),m=e.computed(()=>fe(s.value,r.value,n.conversionRate)),v=e.computed(()=>n.creditUnitName?n.creditUnitName:"CREDITS"===r.value?n.unit:i({defaultMessage:"credits",description:"Generic name for a wallet credit, where its credit type does not name one",id:"converted_amount_input.credits"})),f=e=>`${l(e)} ${v.value}`,h=e.computed(()=>{const e=m.value;var t,o;if(n.showConversionHint&&void 0!==e)return"CREDITS"===r.value?n.currency?i({defaultMessage:"Will cost {amount} excluding taxes",description:"Helper text under a credits field, naming what those credits cost in money",id:"converted_amount_input.cost"},{amount:(t=e,o=n.currency,u.formatAmount({quantity:_e(t),currency:o}))}):void 0:i({defaultMessage:"Buys about {credits}",description:"Helper text under a money field, naming the credits that amount converts into",id:"converted_amount_input.buys"},{credits:f(e)})}),_=e=>ye(e,r.value,n.conversionRate,l),g=e.computed(()=>{var e,t,o,a;return"CREDITS"===r.value?v.value:(null==(t=null==(e=n.bounds)?void 0:e.minimum)?void 0:t.currency)??(null==(a=null==(o=n.bounds)?void 0:o.maximum)?void 0:a.currency)??n.unit}),b=e.computed(()=>{var e,t;const o=_(null==(e=n.bounds)?void 0:e.minimum),a=_(null==(t=n.bounds)?void 0:t.maximum),l=g.value;return o&&a?i({defaultMessage:"Between {minimum} and {maximum} {unit}",description:"Range of what a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.range"},{minimum:o,maximum:a,unit:l}):o?i({defaultMessage:"At least {minimum} {unit}",description:"Smallest amount a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.minimum"},{minimum:o,unit:l}):a?i({defaultMessage:"Up to {maximum} {unit}",description:"Largest amount a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.maximum"},{maximum:a,unit:l}):void 0});return(n,a)=>(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{modelValue:p.value,"onUpdate:modelValue":a[0]||(a[0]=e=>p.value=e),class:"sv-converted-amount-input",type:"number","as-text-type":"",name:t.name,label:t.label,required:t.required,disabled:t.disabled,error:t.error},e.createSlots({suffix:e.withCtx(()=>[e.createElementVNode("span",{"data-testid":`${t.name}-unit`},e.toDisplayString(t.unit),9,be)]),_:2},[b.value?{name:"label-suffix",fn:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-xs",shade:"lighter","no-spacing":"","data-testid":`${t.name}-bounds`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.value),1)]),_:1},8,["data-testid"])]),key:"0"}:void 0,h.value?{name:"helper",fn:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-xs",shade:"lighter","no-spacing":"","data-testid":`${t.name}-conversion`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1},8,["data-testid"])]),key:"1"}:void 0]),1032,["modelValue","name","label","required","disabled","error"]))}}),xe=e.defineComponent({__name:"Section",props:{emphasized:{type:Boolean,default:!1},contentClasses:{type:String},contentBackground:{type:String},title:{type:String},noSpacing:{type:Boolean},hasError:{type:Boolean},noBorder:{type:Boolean}},setup(t){const o=t,n=["sv-section__accent relative","before:absolute before:inset-y-0.5 before:left-0.5 before:w-0.5","before:rounded-full before:bg-primary-600"].join(" "),a=e.computed(()=>[o.emphasized?n:void 0,o.contentClasses].filter(Boolean).join(" ")),i=e.computed(()=>{const{emphasized:e,...t}=o;return t});return(t,o)=>(e.openBlock(),e.createBlock(e.unref(s._sfc_main),e.mergeProps(i.value,{class:"sv-section","content-classes":a.value}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:2},[t.$slots.right?{name:"right",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"right")]),key:"0"}:void 0]),1040,["content-classes"]))}}),Me={class:"flex grow flex-col"},Be=e.defineComponent({__name:"AutoTopUpConfig",props:{config:{type:Object},denomination:{type:Object},creditUnitName:{type:String},chargeCurrency:{type:String},conversionRate:{type:String},topUpBounds:{type:Object},showThresholdConversion:{type:Boolean,default:!0},contained:{type:Boolean},alwaysEnabled:{type:Boolean},disabled:{type:Boolean}},emits:["save"],setup(t,{expose:n,emit:a}){const i=t,l=a,{$t:r,formatNumber:d}=o.useIntl(),s=e.computed(()=>{var e,t;return{denomination:i.denomination,chargeCurrency:i.chargeCurrency,creditUnitName:i.creditUnitName,minimumTopUp:null==(t=null==(e=i.topUpBounds)?void 0:e.minimum)?void 0:t.quantity}}),c=e.ref(ue(i.config,s.value)),p=e.computed(()=>ie(i.denomination,i.creditUnitName)),v=e.computed(()=>i.denomination.creditTypeId?"CREDITS":"AMOUNT"),h=e.computed(()=>"CREDITS"===v.value?p.value:i.chargeCurrency),_=e.computed({get:()=>{var e;return(null==(e=c.value.threshold)?void 0:e.quantity)??""},set:e=>{c.value.threshold={quantity:e||null,currency:p.value}}}),g=e.computed({get:()=>{var e;return(null==(e=c.value.topUpAmount)?void 0:e.quantity)??""},set:e=>{c.value.topUpAmount={quantity:e||null,currency:i.chargeCurrency}}});e.watch(()=>[i.config,s.value],([e,t])=>{pe(ce(e,t),w())||(c.value=ue(e,t))});const y=e.computed({get:()=>i.alwaysEnabled||c.value.enabled,set:e=>{c.value.enabled=e}}),b=e.computed(()=>se({...c.value,enabled:y.value},s.value)),w=()=>b.value,x=e.reactive({threshold:e.computed(()=>me(c.value.threshold)??null),topUpAmount:e.computed(()=>me(c.value.topUpAmount)??null)}),M=e=>{if(!e)return"";const t=ye(e,v.value,i.conversionRate,d);return void 0===t?u.formatAmount(e):`${t} ${h.value}`},B=m.requiredIf(()=>y.value),C=m.useValidation({threshold:{required:m.common.withMessage(()=>r({defaultMessage:"Enter the balance to top up at.",description:"Error shown under the auto top-up threshold when it is left empty",id:"auto_topup_config.threshold.required"}),B),notNegative:m.common.withMessage(()=>r({defaultMessage:"The balance to top up at cannot be negative.",description:"Error shown under the auto top-up threshold when it is below zero",id:"auto_topup_config.threshold.not_negative"}),e=>null===e||e>=0)},topUpAmount:{required:m.common.withMessage(()=>r({defaultMessage:"Enter the amount to top up with.",description:"Error shown under the auto top-up amount when it is left empty",id:"auto_topup_config.amount.required"}),B),positive:m.common.withMessage(()=>r({defaultMessage:"Top up with more than zero.",description:"Error shown under the auto top-up amount when it is zero or negative",id:"auto_topup_config.amount.positive"}),e=>null===e||e>0),atLeastMinimum:m.common.withMessage(()=>{var e;return r({defaultMessage:"Top up with at least {minimum}.",description:"Error shown under the auto top-up amount when it is below what the pricing allows",id:"auto_topup_config.amount.at_least_minimum"},{minimum:M(null==(e=i.topUpBounds)?void 0:e.minimum)})},e=>{var t;return((e,t)=>{const o=Number(null==t?void 0:t.quantity);return null===e||!(null==t?void 0:t.quantity)||!Number.isFinite(o)||e>=o})(e,null==(t=i.topUpBounds)?void 0:t.minimum)}),withinMaximum:m.common.withMessage(()=>{var e;return r({defaultMessage:"Top up with at most {maximum}.",description:"Error shown under the auto top-up amount when it is above what the pricing allows",id:"auto_topup_config.amount.within_maximum"},{maximum:M(null==(e=i.topUpBounds)?void 0:e.maximum)})},e=>{var t;return((e,t)=>{const o=Number(null==t?void 0:t.quantity);return null===e||!(null==t?void 0:t.quantity)||!Number.isFinite(o)||e<=o})(e,null==(t=i.topUpBounds)?void 0:t.maximum)})}},x),T=e.computed(()=>!pe(w(),ce(i.config,s.value)));function P(){return C.value.$touch(),C.value.$invalid?void 0:w()}return n({submit:function(){const e=P();e&&l("save",e)},validate:P,rule:b,hasChanges:T,isInvalid:e.computed(()=>C.value.$invalid)}),(n,a)=>(e.openBlock(),e.createBlock(xe,{class:"sv-auto-topup-config","content-background":t.contained?"gray":"none","no-spacing":!t.contained,"no-border":!t.contained},{default:e.withCtx(()=>[t.alwaysEnabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,modelValue:y.value,"onUpdate:modelValue":a[0]||(a[0]=e=>y.value=e),"no-spacing":"","label-position":"before",class:"!flex",disabled:t.disabled},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",Me,[e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Auto top-up",description:"Title of the automatic wallet top-up settings",id:"auto_topup_config.title"})),1)]),_:1}),e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Automatically top up your balance when it runs low.",description:"Subtitle of the automatic wallet top-up settings",id:"auto_topup_config.subtitle"})),1)]),_:1})])]),_:1},8,["modelValue","disabled"])),e.createVNode(e.unref(f._sfc_main),{"is-open":y.value},{default:e.withCtx(()=>[y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["grid grid-cols-1 gap-3",{"mt-4":!t.alwaysEnabled}])},[e.createVNode(we,{modelValue:_.value,"onUpdate:modelValue":a[1]||(a[1]=e=>_.value=e),name:"auto-top-up-threshold",unit:p.value,"model-base":v.value,"entry-base":v.value,currency:t.chargeCurrency,"conversion-rate":t.conversionRate,"show-conversion-hint":t.showThresholdConversion,required:"",disabled:t.disabled,error:e.unref(C).threshold.$errors,label:e.unref(r)({defaultMessage:"When your balance falls below",description:"Label of the balance at which an automatic top-up is charged",id:"auto_topup_config.threshold.label"})},null,8,["modelValue","unit","model-base","entry-base","currency","conversion-rate","show-conversion-hint","disabled","error","label"]),e.createVNode(we,{modelValue:g.value,"onUpdate:modelValue":a[2]||(a[2]=e=>g.value=e),name:"auto-top-up-amount",unit:h.value,"model-base":"AMOUNT","entry-base":v.value,currency:t.chargeCurrency,"credit-unit-name":t.creditUnitName,"conversion-rate":t.conversionRate,bounds:t.topUpBounds,"show-conversion-hint":"",required:"",disabled:t.disabled,error:e.unref(C).topUpAmount.$errors,label:e.unref(r)({defaultMessage:"Top-up with",description:"Label of the amount every automatic top-up adds",id:"auto_topup_config.amount.label"})},null,8,["modelValue","unit","entry-base","currency","credit-unit-name","conversion-rate","bounds","disabled","error","label"])],2)):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:1},8,["content-background","no-spacing","no-border"]))}}),Ce=e=>{const t=Date.parse(e??"");return Number.isFinite(t)?t:0};function Te({paymentMethods:t,selectedPaymentMethodId:o,preferredPaymentMethodId:n}){const a=e.computed(()=>[...t.value??[]].sort((e,t)=>Ce(t.created_at)-Ce(e.created_at)));return e.watch(()=>[t.value,null==n?void 0:n.value,o.value],([e,t,n],i)=>{var l;const u=null==i?void 0:i[0],r=null==e?void 0:e.find(({id:e})=>!(null==u?void 0:u.some(t=>t.id===e)));if(r&&(null==u?void 0:u.length))return void(o.value=r.id);const d=t=>!!t&&!!(null==e?void 0:e.some(e=>e.id===t));d(n)||(o.value=d(t)?t:null==(l=(null==e?void 0:e.find(({is_default:e})=>e))??a.value[0])?void 0:l.id)},{immediate:!0}),{sortedPaymentMethods:a}}function Pe(){const{$t:e,formatNumber:t}=o.useIntl(),n=o=>C(e,t,o);return{formatValue:n,formatOpenBalance:e=>n(null==e?void 0:e.wallet_balance.open_balance)}}const Se={class:"sv-top-up-form"},ke={class:"grid grid-cols-1 gap-4"},Ne={class:"grid grid-cols-1 gap-1"},Ve={class:"sv-top-up-form__option-details"},Ie={key:0},Ue=e.defineComponent({__name:"TopUpModalForm",props:{topUpPricingItems:{type:null},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},autoTopUpConfig:{type:Object}},emits:["add-payment-method","success","save-auto-top-up","failure"],setup(t,{expose:n,emit:a}){const i=t,l=a,{$t:r}=o.useIntl(),{formatValue:d}=Pe(),s=e.ref({pricing_plan_schedule_id:"",pricing_items:[],start_at:"",finalize_immediately:!1,payment_method_id:void 0,preview:!0}),c=e.computed(()=>{const e=(i.topUpPricingItems??[]).filter(e=>e.flexiblePricing||e.fixedPricing);return[...e.filter(({flexiblePricing:e})=>e),...e.filter(({flexiblePricing:e})=>!e)]}),h=e=>c.value.find(t=>t.pricingItemId===e),g=e.computed(()=>{var e,t;return null==(t=null==(e=i.topUpPricingItems)?void 0:e.find(e=>e.pricingPlanScheduleId))?void 0:t.pricingPlanScheduleId});e.watch(g,e=>{s.value.pricing_plan_schedule_id=e??""},{immediate:!0});const y=e.computed({get:()=>{var e;return null==(e=s.value.pricing_items[0])?void 0:e.pricing_item_id},set:e=>{const t=h("string"==typeof e?e:void 0);if(!t)return void(s.value.pricing_items=[]);const o=(e=>{const{config:t,currency:o}=e.flexiblePricing??{},n=null==t?void 0:t.minimum_amount;return n&&o?{quantity:n.quantity,currency:o}:void 0})(t);s.value.pricing_items=[{pricing_item_id:t.pricingItemId,...o&&{flexible_amount:o}}]}});e.watch(c,e=>{if(e.some(({pricingItemId:e})=>{var t;return e===(null==(t=s.value.pricing_items[0])?void 0:t.pricing_item_id)}))return;const t=e.find(({flexiblePricing:e})=>e)??e[0];y.value=null==t?void 0:t.pricingItemId},{immediate:!0});const w=e.computed({get:()=>{var e;return null==(e=s.value.pricing_items[0])?void 0:e.flexible_amount},set:e=>{var t;const o=null==(t=s.value.pricing_items[0])?void 0:t.pricing_item_id;o&&(s.value.pricing_items=[{pricing_item_id:o,...e&&{flexible_amount:e}}])}}),x=e=>{var t;const o=null==(t=h(String(e)))?void 0:t.fixedPricing;return(null==o?void 0:o.value.credits)?u.formatAmount(o.amount):void 0},M=e.computed(()=>{var e;return null==(e=h(String(y.value)))?void 0:e.flexiblePricing}),B=e.computed({get:()=>{var e;return(null==(e=w.value)?void 0:e.quantity)??""},set:e=>{var t;const o=null==(t=M.value)?void 0:t.currency;w.value=e&&o?{quantity:e,currency:o}:void 0}}),C=e=>e.creditsConfiguration?"CREDITS":"AMOUNT",T=e.computed(()=>Z(i.topUpPricingItems)),P=e=>{var t;const o=null==(t=h(String(e)))?void 0:t.flexiblePricing;return o?[o]:[]},S=e=>{var t;return!!(null==(t=h(String(e)))?void 0:t.flexiblePricing)},k=e.computed(()=>c.value.map(e=>{var t;return{value:e.pricingItemId,label:e.fixedPricing?d(e.fixedPricing.value):r({defaultMessage:"Choose your own amount",description:"Label of the choose-your-amount option in the top-up modal",id:"topup_modal.flexible_option.label"}),...(null==(t=e.flexiblePricing)?void 0:t.bounds.minimum)&&e.flexiblePricing.bounds.maximum&&{description:r({defaultMessage:"Between {minimum} and {maximum}",description:"Bounds of the choose-your-amount option in the top-up modal",id:"topup_modal.flexible_option.bounds"},{minimum:d(e.flexiblePricing.bounds.minimum),maximum:d(e.flexiblePricing.bounds.maximum)})}}})),N=e.computed(()=>{const e=s.value.pricing_items.filter(e=>{var t;return!(null==(t=h(e.pricing_item_id))?void 0:t.flexiblePricing)||!!e.flexible_amount});return e.length>0?e:void 0}),V=e.computed(()=>!i.autoTopUpConfig&&c.value.some(({flexiblePricing:e})=>e)?oe(i.topUpPricingItems):void 0),I=e.ref(),{chargeOnDemandPricingItems:U}=_.createInvoicesService(),E=o.useLogger(),A=e.ref(!1),D=e.computed(()=>!!s.value.pricing_plan_schedule_id&&!!N.value&&!!s.value.payment_method_id),O=e.reactive({paymentMethodId:e.computed(()=>s.value.payment_method_id??null)}),$=m.useValidation({paymentMethodId:{required:m.common.withMessage(()=>r({defaultMessage:"Select a payment method to pay for this top-up.",description:"Error shown under the payment methods in the top-up modal when none is selected on submit",id:"topup_modal.payment_method_required"}),m.required)}},O),q=e.computed(()=>{const[e]=s.value.pricing_items,t=h(null==e?void 0:e.pricing_item_id);return t?((e,t)=>{var o;if(e.fixedPricing)return e.fixedPricing.value;if(!e.flexiblePricing||!t)return;const{bounds:n,creditsConfiguration:a}=e.flexiblePricing,i=null==(o=n.minimum??n.maximum)?void 0:o.credits,l=a?J(t.quantity,a.conversionRate):void 0;return i&&void 0!==l?G(l,i):{amount:t}})(t,null==e?void 0:e.flexible_amount):void 0});n({submit:async function(){var e,t,o;$.value.$touch();const n=null==(e=I.value)?void 0:e.validate();if(!$.value.$invalid&&!(null==(t=I.value)?void 0:t.isInvalid)&&D.value&&!A.value){A.value=!0;try{const e=await U({pricing_plan_schedule_id:s.value.pricing_plan_schedule_id,pricing_items:N.value??[],payment_method_id:s.value.payment_method_id,preview:!1});n&&(null==(o=I.value)?void 0:o.hasChanges)&&s.value.payment_method_id&&l("save-auto-top-up",{rule:n,paymentMethodId:s.value.payment_method_id}),l("success",e)}catch(a){E.error("TOP_UP_FAILED","Failed to charge the wallet top-up",{},a),l("failure",a)}finally{A.value=!1}}},isCharging:A,canSubmit:D,chargedValue:q});const R=e.computed({get:()=>s.value.payment_method_id??void 0,set:e=>{s.value.payment_method_id=e}}),{sortedPaymentMethods:j}=Te({paymentMethods:e.computed(()=>i.paymentMethods),selectedPaymentMethodId:R});return(n,a)=>(e.openBlock(),e.createElementBlock("form",Se,[e.createElementVNode("div",ke,[e.createElementVNode("div",Ne,[k.value.length>0?(e.openBlock(),e.createBlock(e.unref(p._sfc_main$1),{key:0,modelValue:y.value,"onUpdate:modelValue":a[3]||(a[3]=e=>y.value=e),class:"sv-top-up-form__options",name:"top-up-pricing-item",direction:"column",required:"",disabled:A.value,options:k.value,"show-radio":!1,label:e.unref(r)({defaultMessage:"Top up amount",description:"Label above the list of ways to top up the wallet in the top-up modal",id:"topup_modal.pricing_items.label"})},{label:e.withCtx(({option:t,optionValue:n})=>[e.createElementVNode("span",null,e.toDisplayString(t.label),1),x(n)?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:0,tag:"span",variant:"body-sm",shade:"lighter",weight:"normal","no-spacing":"",class:"sv-top-up-form__option-cost"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x(n)),1)]),_:2},1024)):e.createCommentVNode("",!0)]),description:e.withCtx(({option:t,optionValue:n})=>[e.createElementVNode("div",Ve,[t.description&&!S(n)?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:0,tag:"span",variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:2},1024)):e.createCommentVNode("",!0),P(n).length>0?(e.openBlock(),e.createBlock(e.unref(f._sfc_main),{key:1,"is-open":String(n)===y.value,lazy:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P(n),n=>{var i,l;return e.openBlock(),e.createElementBlock("div",{key:n.currency,class:"sv-top-up-form__amount grid grid-cols-1 gap-3",onClick:a[1]||(a[1]=e.withModifiers(()=>{},["stop"])),onKeydown:a[2]||(a[2]=e.withModifiers(()=>{},["stop"]))},[t.description?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:0,tag:"span",variant:"body-xs",shade:"lighter","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(we,{modelValue:B.value,"onUpdate:modelValue":a[0]||(a[0]=e=>B.value=e),name:"top-up-amount","model-base":"AMOUNT",unit:(l=n,l.creditsConfiguration?T.value??l.creditsConfiguration.unitNamePlural??l.creditsConfiguration.unitNameSingle??"":l.currency),"entry-base":C(n),currency:n.currency,"conversion-rate":null==(i=n.creditsConfiguration)?void 0:i.conversionRate,required:"",disabled:A.value},null,8,["modelValue","unit","entry-base","currency","conversion-rate","disabled"])],32)}),128))]),_:2},1032,["is-open"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","disabled","options","label"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.createVNode(ae,{"pricing-plan-schedule-id":g.value,"pricing-items":N.value},null,8,["pricing-plan-schedule-id","pricing-items"])]),V.value?(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(Be,e.mergeProps({ref_key:"autoTopUpFormRef",ref:I,class:"sv-top-up-form__auto-top-up"},V.value,{contained:"","show-threshold-conversion":!1,disabled:A.value}),null,16,["disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createVNode(e.unref(v._sfc_main),{spacing:"xs"})]),e.createElementVNode("div",null,[e.renderSlot(n.$slots,"payment-method",{},()=>[e.createVNode(b._sfc_main,{modelValue:R.value,"onUpdate:modelValue":a[4]||(a[4]=e=>R.value=e),class:"sv-top-up-form__payment-methods","payment-methods":e.unref(j),required:"",error:e.unref($).paymentMethodId.$errors,"payment-method-options":t.paymentMethodOptions,disabled:A.value,label:e.unref(r)({defaultMessage:"Payment method",description:"Label above the payment method that pays for the top-up, in the top-up modal",id:"topup_modal.payment_method_selector.label"}),onAddPaymentMethod:a[5]||(a[5]=e=>l("add-payment-method"))},null,8,["modelValue","payment-methods","error","payment-method-options","disabled","label"])])])])]))}}),Ee={class:"sv-top-up-success grid grid-cols-1 gap-4"},Ae=e.defineComponent({__name:"TopUpModalSuccess",props:{addedValue:{type:Object},invoice:{type:Object}},setup(t){const{$t:n}=o.useIntl();return(a,i)=>(e.openBlock(),e.createElementBlock("div",Ee,[t.invoice?(e.openBlock(),e.createBlock(e.unref(s._sfc_main),{key:0,"content-background":"none"},{default:e.withCtx(()=>[e.createVNode(e.unref(o._sfc_main),{tag:"span",variant:"body-sm",weight:"semibold",class:"mb-2 block"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Receipt",description:"Heading above the invoice a completed top-up produced",id:"topup_modal.success.receipt.heading"})),1)]),_:1}),e.createVNode(e.unref(p._sfc_main$2),{invoice:t.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1})):e.createCommentVNode("",!0)]))}});function De({isOpen:t,customer:o}){const{paymentMethodOptions:n,get:a,isPending:i}=M.usePaymentMethodOptions();e.watch(()=>[t.value,o.value],([e,t])=>{e&&t&&a({customerId:t.id,country:x.getCustomerCountry(t)})},{immediate:!0});const l=e.computed(()=>i.value?void 0:n.value);return{paymentMethodOptions:n,settledOptions:l,isPending:i}}const Oe=["inert"],$e=e.defineComponent({__name:"SlidingPanes",props:{panes:{type:Array},current:{type:String}},setup(t){const o=t,n=e.ref(!1);let a;e.watch(()=>o.current,()=>{n.value=!0,clearTimeout(a),a=setTimeout(()=>{n.value=!1},300)}),e.onBeforeUnmount(()=>{clearTimeout(a)});const i=e.ref({}),l={},u=e=>l[e]??(l[e]=t=>{i.value[e]=t instanceof HTMLElement?t:void 0}),r=function(t){const o=e.ref(0),n=e=>{o.value=(null==e?void 0:e.offsetHeight)??0},a="undefined"==typeof ResizeObserver?void 0:new ResizeObserver(e=>{var t;const o=null==(t=e[0])?void 0:t.target;n(o instanceof HTMLElement?o:void 0)});return e.watch(t,(e,t)=>{t&&(null==a||a.unobserve(t)),n(e),e&&(null==a||a.observe(e))},{immediate:!0,flush:"post"}),e.onBeforeUnmount(()=>{null==a||a.disconnect()}),o}(e.computed(()=>i.value[o.current])),d=e.computed(()=>{const e=o.panes.indexOf(o.current);return e>0?`translateX(calc(${-e} * (100% + 1rem)))`:"translateX(0px)"});return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sv-sliding-panes__viewport relative -mx-2 overflow-hidden px-2",n.value?"transition-[height] duration-300 ease-in-out motion-reduce:transition-none":""]),style:e.normalizeStyle(e.unref(r)?{height:`${e.unref(r)}px`}:void 0)},[e.createElementVNode("div",{class:"sv-sliding-panes__track flex items-start gap-4 transition-transform duration-300 ease-in-out motion-reduce:transition-none",style:e.normalizeStyle({transform:d.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.panes,n=>(e.openBlock(),e.createElementBlock("div",{key:n,class:"sv-sliding-panes__pane w-full shrink-0",inert:n!==t.current||void 0},[e.createElementVNode("div",{ref_for:!0,ref:u(n)},[e.renderSlot(o.$slots,n)],512)],8,Oe))),128))],4)],6))}}),qe={class:"grid grid-cols-1 gap-4 pb-4"},Re=e.defineComponent({__name:"WalletModalShell",props:{showModal:{type:Boolean},title:{type:String},subTitle:{type:String},cancelButtonText:{type:String},confirmButtonText:{type:String},isPending:{type:Boolean},panes:{type:Array},step:{type:String},addPaymentMethodPane:{type:String},customer:{type:Object},paymentMethodOptions:{type:Array},isPaymentMethodOptionsPending:{type:Boolean},isAddingPaymentMethod:{type:Boolean}},emits:["confirm","cancel","payment-success","payment-failed"],setup(t,{expose:o}){const n=t,a=e.ref(),i=e.computed(()=>n.panes.filter(e=>e!==n.addPaymentMethodPane));return o({submit:()=>{var e;return null==(e=a.value)?void 0:e.submit()},isSaving:e.computed(()=>{var e;return!!(null==(e=a.value)?void 0:e.isSaving)})}),(o,n)=>(e.openBlock(),e.createBlock(e.unref(B.Modal),{"no-click-away":"","show-modal":t.showModal,size:"lg",title:t.title,"sub-title":t.subTitle,"cancel-button-text":t.cancelButtonText,"confirm-button-text":t.confirmButtonText,"is-loading":t.isPending,onConfirm:n[2]||(n[2]=e=>o.$emit("confirm")),onClose:n[3]||(n[3]=e=>o.$emit("cancel"))},e.createSlots({body:e.withCtx(()=>[e.createElementVNode("div",qe,[e.createVNode($e,{panes:t.panes,current:t.step},e.createSlots({[t.addPaymentMethodPane]:e.withCtx(()=>[e.createVNode(b._sfc_main$1,{ref_key:"paneRef",ref:a,customer:t.customer,"payment-method-options":t.paymentMethodOptions,"is-loading":t.isPaymentMethodOptionsPending,"is-active":t.isAddingPaymentMethod,onSuccess:n[0]||(n[0]=e=>o.$emit("payment-success")),onFailure:n[1]||(n[1]=e=>o.$emit("payment-failed",e))},null,8,["customer","payment-method-options","is-loading","is-active"])]),_:2},[e.renderList(i.value,t=>({name:t,fn:e.withCtx(()=>[e.renderSlot(o.$slots,t)])}))]),1032,["panes","current"])])]),_:2},[o.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"footer")]),key:"0"}:void 0]),1032,["show-modal","title","sub-title","cancel-button-text","confirm-button-text","is-loading"]))}}),je=e=>{var t;return((null==(t=null==e?void 0:e.wallet)?void 0:t.auto_top_up_configs)??[]).find(({status:e})=>"ACTIVE"===e)},Le=e=>e?{status:e.status,threshold:e.threshold,...e.topup_amount&&{topup_amount:e.topup_amount}}:void 0,Fe=(e,t=[])=>{if((null==e?void 0:e.pricing_item_id)&&e.pricing_plan_schedule_id)return{pricingItemId:e.pricing_item_id,pricingPlanScheduleId:e.pricing_plan_schedule_id};const o=t.find(({flexiblePricing:e,pricingPlanScheduleId:t})=>e&&t);return(null==o?void 0:o.pricingPlanScheduleId)?{pricingItemId:o.pricingItemId,pricingPlanScheduleId:o.pricingPlanScheduleId}:void 0},Ye=({rule:e,walletBalanceItem:t,chargeTarget:o,paymentMethodId:n})=>{var a,i;const l=!!((null==(a=null==e?void 0:e.threshold)?void 0:a.amount)??(null==(i=null==e?void 0:e.threshold)?void 0:i.credits));if(e&&l&&(null==t?void 0:t.wallet_id)&&o&&n)return{wallet_id:t.wallet_id,status:e.status,threshold:e.threshold,pricing_plan_schedule_id:o.pricingPlanScheduleId,pricing_item_id:o.pricingItemId,payment_method_id:n,...e.topup_amount&&{topup_amount:e.topup_amount}}};function ze({step:t,name:o,returnTo:n}){const a=e.ref();return{paneRef:a,isActive:e.computed(()=>t.value===o),isSaving:e.computed(()=>{var e;return!!(null==(e=a.value)?void 0:e.isSaving)}),open:()=>{t.value=o},leave:()=>{t.value=n},submit:()=>{var e;return null==(e=a.value)?void 0:e.submit()}}}function He(){const e=o.createRequestService(),t=o.useConfig(),n="/portal/auto-top-up-configs";return{getAutoTopUpConfigs:function(o){return e({url:`${t.apiUrls.config}${n}`,query:{...o},isCollection:!0})},getAutoTopUpConfig:function(o){return e({url:`${t.apiUrls.config}${n}/${o}`})},createAutoTopUpConfig:function(o){return e({url:`${t.apiUrls.config}${n}`,options:{method:"POST"},data:o})},deactivateAutoTopUpConfig:function(o){return e({url:`${t.apiUrls.config}${n}/${o}/deactivate`,options:{method:"POST"}})}}}function We(){const{createAutoTopUpConfig:t}=He(),n=o.useLogger(),a=e.ref(!1);return{save:async e=>{if(!e||a.value)return{saved:!1};a.value=!0;try{return await t(e),{saved:!0}}catch(o){return n.error("AUTO_TOP_UP_SAVE_FAILED","Failed to save the automatic top-up rule",{},o),{saved:!1,error:o}}finally{a.value=!1}},isSaving:a}}const Xe={key:0,class:"mb-4"},Ge={class:"sr-only"},Je={class:"flex flex-col gap-2"},Ke=e.defineComponent({__name:"TopUpModal",props:{showModal:{type:Boolean},selectedBalanceItem:{type:Object},paymentMethods:{type:Array},customer:{type:Object},subscriptions:{type:Array}},emits:["confirm","close","auto-top-up-saved","payment-success","payment-failed"],setup(t,{emit:n}){const a=t,i=n,{$t:l}=o.useIntl(),{formatOpenBalance:u}=Pe(),d=e.computed(()=>Le(je(a.selectedBalanceItem))),s=e.computed(()=>u(a.selectedBalanceItem)),c=e.computed(()=>F(a.selectedBalanceItem,a.subscriptions??[])),m=e.ref();e.watch(c,e=>{var t;e.some(({id:e})=>e===m.value)||(m.value=null==(t=e[0])?void 0:t.id)},{immediate:!0});const v=e.computed(()=>c.value.length>1),f=e.computed(()=>c.value.map(({id:e,name:t})=>({value:e,label:t}))),h=e.computed(()=>Object.fromEntries(c.value.flatMap(({id:e,enabledPricingIds:t})=>{const o=(a.subscriptions??[]).find(({id:t})=>t===e);return o?[[e,{subscription:o,enabledPricingIds:t}]]:[]}))),_=e.computed(()=>{var e;if(!a.selectedBalanceItem||!(null==(e=a.subscriptions)?void 0:e.length))return a.selectedBalanceItem;const t=c.value.find(({id:e})=>e===m.value);return t?((e,t)=>{if(!e||0===t.length)return e;const o=new Set(t);return{...e,charge_on_demand_pricing_items:(e.charge_on_demand_pricing_items??[]).filter(e=>L(e)&&!!e.pricing_plan_schedule_id&&o.has(e.pricing_plan_schedule_id))}})(a.selectedBalanceItem,t.scheduleIds):{...a.selectedBalanceItem,charge_on_demand_pricing_items:[]}}),g=e.computed(()=>Y(_.value)),{paymentMethodOptions:y,settledOptions:b,isPending:x}=De({isOpen:e.computed(()=>a.showModal),customer:e.computed(()=>a.customer)}),M=e.ref("TOP_UP"),B=e.computed(()=>(a.paymentMethods??[]).length>0),T=e.computed(()=>!x.value&&0===(y.value??[]).length),P=e.computed(()=>"TOP_UP"===M.value&&!B.value&&T.value),S=e.ref(),k=e.ref(),N=()=>{A(),i("payment-success")},{paneRef:V,isActive:I,isSaving:U,open:E,leave:A,submit:D}=ze({step:M,name:"ADD_PAYMENT_METHOD",returnTo:"TOP_UP"}),{save:O}=We(),$=e.ref(),q=e.computed(()=>{var e;return null==(e=$.value)?void 0:e.chargedValue}),R=e.computed(()=>{var e;return U.value||!!(null==(e=$.value)?void 0:e.isCharging)}),{title:z,subTitle:H,cancelButtonText:W,confirmButtonText:X}=function({step:t,currentBalance:n,topUpValue:a}){const{$t:i,formatNumber:l}=o.useIntl();return{title:e.computed(()=>"ADD_PAYMENT_METHOD"===t.value?i({defaultMessage:"Add payment method",description:"Title of the top-up modal while the customer is adding a payment method",id:"topup_modal.add_payment_method.title"}):"SUCCESS"===t.value?i({defaultMessage:"Top-up complete",description:"Title of the top-up modal once the top-up has been charged",id:"topup_modal.success.modal_title"}):i({defaultMessage:"Top up balance",description:"Title of the wallet top-up modal",id:"topup_modal.title"})),subTitle:e.computed(()=>"ADD_PAYMENT_METHOD"===t.value?i({defaultMessage:"Add a new payment method for topping up your balance.",description:"Subtitle of the top-up modal while the customer is adding a payment method",id:"topup_modal.add_payment_method.subtitle"}):"SUCCESS"===t.value?i({defaultMessage:"Your payment went through.",description:"Subtitle of the top-up modal once the top-up has been charged",id:"topup_modal.success.modal_subtitle"}):i({defaultMessage:"Your current balance is {balance}.",description:"Subtitle of the top-up modal showing the current wallet balance",id:"topup_modal.subtitle"},{balance:n.value})),cancelButtonText:e.computed(()=>"ADD_PAYMENT_METHOD"===t.value?i({defaultMessage:"Back",description:"Label of the button that leaves the add payment method step in the top-up modal",id:"topup_modal.back_button.label"}):i({defaultMessage:"Cancel",description:"Label of the button that closes the top-up modal",id:"topup_modal.cancel_button.label"})),confirmButtonText:e.computed(()=>"ADD_PAYMENT_METHOD"===t.value?i({defaultMessage:"Save payment method",description:"Label of the confirm button in the top-up modal while adding a payment method",id:"topup_modal.save_payment_method.label"}):"SUCCESS"===t.value?i({defaultMessage:"Done",description:"Label of the button that dismisses the top-up modal once the top-up has been charged",id:"topup_modal.done_button.label"}):a.value?i({defaultMessage:"Top up balance with {value}",description:"Label of the confirm button in the top-up modal once an amount is entered",id:"topup_modal.confirm_button.label"},{value:C(i,l,a.value)}):i({defaultMessage:"Top up balance",description:"Label of the confirm button in the top-up modal while no amount is entered",id:"topup_modal.confirm_button.empty.label"}))}}({step:M,currentBalance:s,topUpValue:q}),G=()=>{var e;I.value?D():null==(e=$.value)||e.submit()},J=async({rule:e,paymentMethodId:t})=>{const{saved:o}=await O(Ye({rule:e,walletBalanceItem:a.selectedBalanceItem,chargeTarget:Fe(void 0,g.value),paymentMethodId:t}));o&&i("auto-top-up-saved")},K=e=>{var t;S.value=e,k.value=null==(t=$.value)?void 0:t.chargedValue,M.value="SUCCESS"},Q=()=>{i("confirm"),i("close")},Z=()=>{R.value||(I.value?A():"SUCCESS"!==M.value?i("close"):Q())},ee=e.ref(0);return e.watch(()=>a.showModal,e=>{e&&(M.value="TOP_UP",S.value=void 0,k.value=void 0,ee.value+=1)}),(o,n)=>(e.openBlock(),e.createBlock(Re,{ref_key:"addPaymentMethodRef",ref:V,"show-modal":t.showModal,title:e.unref(z),"sub-title":e.unref(H),"cancel-button-text":e.unref(W),"confirm-button-text":e.unref(X),"is-pending":R.value,panes:e.unref(j),step:M.value,"add-payment-method-pane":"ADD_PAYMENT_METHOD",customer:t.customer,"payment-method-options":e.unref(y),"is-payment-method-options-pending":e.unref(x),"is-adding-payment-method":e.unref(I),onConfirm:G,onCancel:Z,onPaymentSuccess:N,onPaymentFailed:n[1]||(n[1]=e=>o.$emit("payment-failed",e))},e.createSlots({TOP_UP:e.withCtx(()=>[v.value?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(e.unref(p._sfc_main$1),{modelValue:m.value,"onUpdate:modelValue":n[0]||(n[0]=e=>m.value=e),class:"sv-topup-modal__subscription",name:"top-up-subscription",direction:"column",required:"",options:f.value,"show-radio":!1,label:e.unref(l)({defaultMessage:"Subscription to top up",description:"Label above the list of subscriptions a top-up can be charged against, in the top-up modal",id:"topup_modal.subscriptions.label"})},{prefix:e.withCtx(({optionValue:t})=>[h.value[String(t)]?(e.openBlock(),e.createBlock(w._sfc_main,{key:0,class:"sv-topup-modal__subscription-option grow","no-spacing":"",subscription:h.value[String(t)].subscription,"enabled-pricing-ids":h.value[String(t)].enabledPricingIds},null,8,["subscription","enabled-pricing-ids"])):e.createCommentVNode("",!0)]),label:e.withCtx(({option:t})=>[e.createElementVNode("span",Ge,e.toDisplayString(t.label),1)]),_:1},8,["modelValue","options","label"])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(Ue,{key:ee.value,ref_key:"topUpFormRef",ref:$,"top-up-pricing-items":g.value,"payment-methods":t.paymentMethods,"auto-top-up-config":d.value,"payment-method-options":e.unref(b),onAddPaymentMethod:e.unref(E),onSuccess:K,onSaveAutoTopUp:J},null,8,["top-up-pricing-items","payment-methods","auto-top-up-config","payment-method-options","onAddPaymentMethod"]))]),SUCCESS:e.withCtx(()=>[S.value?(e.openBlock(),e.createBlock(Ae,{key:0,"added-value":k.value,invoice:S.value},null,8,["added-value","invoice"])):e.createCommentVNode("",!0)]),_:2},["SUCCESS"===M.value||P.value?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",Je,["SUCCESS"===M.value?(e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{key:0,size:"lg","data-testid":"done",onClick:Q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(X)),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(r._sfc_main$1),{size:"lg",disabled:"","data-testid":"confirm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(X)),1)]),_:1}),e.createVNode(e.unref(r._sfc_main$1),{size:"lg",color:"gray",variant:"ghost","data-testid":"cancel",onClick:Z},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(W)),1)]),_:1})],64))])]),key:"0"}:void 0]),1032,["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"]))}}),Qe=["AUTO_TOP_UP","ADD_PAYMENT_METHOD"],Ze={class:"grid grid-cols-1 gap-4"},et=e.defineComponent({__name:"AutoTopUpModal",props:{showModal:{type:Boolean},walletBalanceItem:{type:Object},topUpItem:{type:Object},paymentMethods:{type:Array},customer:{type:Object}},emits:["saved","close","payment-success","payment-failed"],setup(t,{emit:n}){const a=t,i=n,{$t:l}=o.useIntl(),{formatOpenBalance:u}=Pe(),r=e.ref("AUTO_TOP_UP"),d=e.computed(()=>u(a.walletBalanceItem)),s=e.computed(()=>Y(a.walletBalanceItem)),c=e.computed(()=>oe(s.value)),p=e.computed(()=>je(a.walletBalanceItem)),v=e.computed(()=>Le(p.value)),f=e.computed(()=>Fe(a.topUpItem,s.value)),h=e.ref(),_=e.computed(()=>{var e,t;const o=null==(t=null==(e=h.value)?void 0:e.rule)?void 0:t.topup_amount;return(null==o?void 0:o.quantity)&&f.value?[{pricing_item_id:f.value.pricingItemId,flexible_amount:o}]:void 0}),g=e.computed(()=>{var e;return null==(e=f.value)?void 0:e.pricingPlanScheduleId}),y=e.ref(),{sortedPaymentMethods:w}=Te({paymentMethods:e.computed(()=>a.paymentMethods),selectedPaymentMethodId:y,preferredPaymentMethodId:e.computed(()=>{var e;return null==(e=p.value)?void 0:e.payment_method_id})}),{paymentMethodOptions:x,settledOptions:M,isPending:B}=De({isOpen:e.computed(()=>a.showModal),customer:e.computed(()=>a.customer)}),{paneRef:C,isActive:T,isSaving:P,open:S,leave:k,submit:N}=ze({step:r,name:"ADD_PAYMENT_METHOD",returnTo:"AUTO_TOP_UP"}),{save:V,isSaving:I}=We(),U=e.computed(()=>P.value||I.value),E=e.reactive({paymentMethodId:e.computed(()=>y.value??null)}),A=m.useValidation({paymentMethodId:{required:m.common.withMessage(()=>l({defaultMessage:"Select a payment method to pay for automatic top-ups.",description:"Error shown in the auto top-up modal when no payment method is selected",id:"auto_topup_modal.payment_method.required"}),m.required)}},E),D=e.computed(()=>"ADD_PAYMENT_METHOD"===r.value?l({defaultMessage:"Add payment method",description:"Title of the auto top-up modal while the customer is adding a payment method",id:"auto_topup_modal.add_payment_method.title"}):l({defaultMessage:"Automatic top-up",description:"Title of the automatic wallet top-up modal",id:"auto_topup_modal.title"})),O=e.computed(()=>"ADD_PAYMENT_METHOD"===r.value?l({defaultMessage:"This method pays for every automatic top-up.",description:"Subtitle of the auto top-up modal while the customer is adding a payment method",id:"auto_topup_modal.add_payment_method.subtitle"}):l({defaultMessage:"Your current balance is {balance}. Enable auto top so you can stay productive",description:"Subtitle of the automatic wallet top-up modal, naming the balance",id:"auto_topup_modal.subtitle"},{balance:d.value})),$=e.computed(()=>"ADD_PAYMENT_METHOD"===r.value?l({defaultMessage:"Back",description:"Button returning from adding a payment method to the auto top-up rule",id:"auto_topup_modal.add_payment_method.cancel"}):l({defaultMessage:"Cancel",description:"Button dismissing the auto top-up modal",id:"auto_topup_modal.cancel"})),q=e.computed(()=>"ADD_PAYMENT_METHOD"===r.value?l({defaultMessage:"Add payment method",description:"Button storing the payment method being added in the auto top-up modal",id:"auto_topup_modal.add_payment_method.confirm"}):l({defaultMessage:"Save",description:"Button saving the automatic top-up rule",id:"auto_topup_modal.confirm"}));const R=()=>{T.value?N():async function(){var e;if(A.value.$touch(),U.value)return;const{saved:t,error:o}=await V(Ye({rule:null==(e=h.value)?void 0:e.validate(),walletBalanceItem:a.walletBalanceItem,chargeTarget:f.value,paymentMethodId:y.value}));if(t)return i("saved"),void i("close");o&&i("payment-failed",o)}()},j=()=>{k(),i("payment-success")},L=()=>{U.value||(T.value?k():i("close"))},F=e.ref(0);return e.watch(()=>a.showModal,e=>{e&&(r.value="AUTO_TOP_UP",y.value=void 0,F.value+=1)}),(o,n)=>(e.openBlock(),e.createBlock(Re,{ref_key:"addPaymentMethodRef",ref:C,"show-modal":t.showModal,title:D.value,"sub-title":O.value,"cancel-button-text":$.value,"confirm-button-text":q.value,"is-pending":U.value,panes:e.unref(Qe),step:r.value,"add-payment-method-pane":"ADD_PAYMENT_METHOD",customer:t.customer,"payment-method-options":e.unref(x),"is-payment-method-options-pending":e.unref(B),"is-adding-payment-method":e.unref(T),onConfirm:R,onCancel:L,onPaymentSuccess:j,onPaymentFailed:n[1]||(n[1]=e=>o.$emit("payment-failed",e))},{AUTO_TOP_UP:e.withCtx(()=>[e.createElementVNode("div",Ze,[c.value?(e.openBlock(),e.createBlock(Be,e.mergeProps({key:F.value,ref_key:"autoTopUpFormRef",ref:h,class:"sv-auto-topup-modal__rule"},c.value,{config:v.value,"always-enabled":"",disabled:U.value}),null,16,["config","disabled"])):e.createCommentVNode("",!0),e.createVNode(ae,{"pricing-plan-schedule-id":g.value,"pricing-items":_.value},null,8,["pricing-plan-schedule-id","pricing-items"]),e.createVNode(b._sfc_main,{modelValue:y.value,"onUpdate:modelValue":n[0]||(n[0]=e=>y.value=e),class:"sv-auto-topup-modal__payment-method","payment-methods":e.unref(w),"payment-method-options":e.unref(M),disabled:U.value,error:e.unref(A).paymentMethodId.$errors,label:e.unref(l)({defaultMessage:"Pay automatic top-ups with",description:"Label above the payment method an automatic top-up is charged to",id:"auto_topup_modal.payment_method.label"}),onAddPaymentMethod:e.unref(S)},null,8,["modelValue","payment-methods","payment-method-options","disabled","error","label","onAddPaymentMethod"])])]),_: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"]))}}),tt={class:"sv-auto-topup-cancellation-modal sv-auto-topup-cancellation-modal__body flex flex-col gap-3"},ot=e.defineComponent({__name:"AutoTopUpCancellationModal",props:{showModal:{type:Boolean},config:{type:Object}},emits:["confirmed","close"],setup(t,{emit:n}){const a=t,l=n,{$t:u}=o.useIntl(),r=o.useLogger(),{formatValue:d}=Pe(),{deactivateAutoTopUpConfig:s}=He(),c=e.ref(!1),p=e.ref(!1);e.watch(()=>a.showModal,e=>{e&&(p.value=!1)});const m=e.computed(()=>{var e,t;const o=null==(e=a.config)?void 0:e.threshold,n=null==(t=a.config)?void 0:t.topup_amount;return(null==o?void 0:o.amount)||(null==o?void 0:o.credits)?n?u({defaultMessage:"Your balance will no longer be topped up with {amount} when it falls below {threshold}. You can still top up whenever you want to.",description:"Explanation in the modal that turns a wallet automatic top-up off, naming what it charged and when",id:"auto_topup_cancellation_modal.explanation_with_amount"},{amount:d({amount:n}),threshold:d(o)}):u({defaultMessage:"Your balance will no longer be topped up automatically when it falls below {threshold}. You can still top up whenever you want to.",description:"Explanation in the modal that turns a wallet automatic top-up off, naming the threshold",id:"auto_topup_cancellation_modal.explanation_with_threshold"},{threshold:d(o)}):u({defaultMessage:"Your balance will no longer be topped up automatically. You can still top up whenever you want to.",description:"Explanation in the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.explanation"})}),v=async()=>{var e;const t=null==(e=a.config)?void 0:e.id;if(t&&!c.value){c.value=!0,p.value=!1;try{await s(t),l("confirmed"),l("close")}catch(o){r.error("AUTO_TOP_UP_CANCELLATION_FAILED","Failed to turn off a wallet's automatic top-up",{},o),p.value=!0}finally{c.value=!1}}},f=()=>{c.value||l("close")};return(n,a)=>(e.openBlock(),e.createBlock(e.unref(B.Modal),{size:"sm","show-modal":t.showModal,"is-loading":c.value,"no-click-away":c.value,"no-backdrop-close":c.value,title:e.unref(u)({defaultMessage:"Turn off automatic top-up",description:"Title of the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.title"}),"confirm-button-text":e.unref(u)({defaultMessage:"Yes, turn it off",description:"Button confirming that a wallet automatic top-up is turned off",id:"auto_topup_cancellation_modal.confirm"}),"cancel-button-text":e.unref(u)({defaultMessage:"Cancel",description:"Button dismissing the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.cancel"}),onConfirm:v,onClose:f},{body:e.withCtx(()=>[e.createElementVNode("div",tt,[e.createVNode(e.unref(o._sfc_main),{variant:"body-sm",shade:"lighter",tag:"p",class:"sv-auto-topup-cancellation-modal__explanation"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:1}),p.value?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,class:"sv-auto-topup-cancellation-modal__error sv-error",title:e.unref(u)({defaultMessage:"Could not turn off the automatic top-up. Please try again later.",description:"Error shown when turning a wallet automatic top-up off failed",id:"auto_topup_cancellation_modal.failed"})},null,8,["title"])):e.createCommentVNode("",!0)])]),_:1},8,["show-modal","is-loading","no-click-away","no-backdrop-close","title","confirm-button-text","cancel-button-text"]))}}),nt=e.defineComponent({inheritAttrs:!1,__name:"CustomerWalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array},showTopUpButton:{type:Boolean},customer:{type:Object},paymentMethods:{type:Array},subscriptions:{type:Array}},emits:["top-up-charged","auto-top-up-saved","auto-top-up-cancelled","payment-method-stored","payment-failed"],setup(t,{emit:n}){const a=t,l=n,{$t:u}=o.useIntl(),r=e.ref(),d=e.computed(()=>R(a.walletBalances,r.value)),s=e.computed(()=>!!d.value),p=e.ref(),m=e.computed(()=>!!p.value),v=e.computed(()=>R(a.walletBalances,p.value)),f=e.ref(),h=e.computed(()=>!!f.value);return(o,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.isLoading?(e.openBlock(),e.createBlock(c._sfc_main,e.mergeProps({key:0,variant:"section"},o.$attrs,{class:"sv-wallet-balances sv-root sv-component sv-loading min-h-48","data-testid":"customer-wallet-balances-skeleton"}),null,16)):t.hasError?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),e.mergeProps({key:1},o.$attrs,{class:"sv-wallet-balances sv-root sv-component sv-error",title:e.unref(u)({defaultMessage:"Could not load wallet balances",description:"Error shown when wallet balances fail to load",id:"wallet_balance.load_failed"})}),null,16,["title"])):t.walletBalances.length>0?(e.openBlock(),e.createBlock(e.unref(q),e.mergeProps({key:2},o.$attrs,{class:"sv-wallet-balances sv-root sv-component","customer-wallet-balances":t.walletBalances,"show-auto-top-up":"","show-manual-top-up":"",title:e.unref(u)({defaultMessage:"{count, plural, one {Wallet} other {Wallets}}",description:"Title for the wallets block on the customer overview page",id:"customer_overview.wallet_balances_block.title"},{count:String(t.walletBalances.length)}),onTopUp:n[0]||(n[0]=e=>r.value=e),onAutoTopUp:n[1]||(n[1]=e=>p.value=e),onCancelAutoTopUp:n[2]||(n[2]=e=>f.value=e)}),null,16,["customer-wallet-balances","title"])):e.createCommentVNode("",!0),t.showTopUpButton?(e.openBlock(),e.createBlock(Ke,{key:3,"show-modal":s.value,"selected-balance-item":d.value,"payment-methods":t.paymentMethods,customer:t.customer,subscriptions:t.subscriptions,onClose:n[3]||(n[3]=e=>r.value=void 0),onConfirm:n[4]||(n[4]=e=>l("top-up-charged")),onPaymentSuccess:n[5]||(n[5]=e=>l("payment-method-stored")),onPaymentFailed:n[6]||(n[6]=e=>l("payment-failed",e))},null,8,["show-modal","selected-balance-item","payment-methods","customer","subscriptions"])):e.createCommentVNode("",!0),t.showTopUpButton?(e.openBlock(),e.createBlock(et,{key:4,"show-modal":m.value,"wallet-balance-item":v.value,"top-up-item":p.value,"payment-methods":t.paymentMethods,customer:t.customer,onClose:n[7]||(n[7]=e=>p.value=void 0),onSaved:n[8]||(n[8]=e=>l("auto-top-up-saved")),onPaymentSuccess:n[9]||(n[9]=e=>l("payment-method-stored")),onPaymentFailed:n[10]||(n[10]=e=>l("payment-failed",e))},null,8,["show-modal","wallet-balance-item","top-up-item","payment-methods","customer"])):e.createCommentVNode("",!0),t.showTopUpButton?(e.openBlock(),e.createBlock(ot,{key:5,"show-modal":h.value,config:f.value,onClose:n[11]||(n[11]=e=>f.value=void 0),onConfirmed:n[12]||(n[12]=e=>l("auto-top-up-cancelled"))},null,8,["show-modal","config"])):e.createCommentVNode("",!0)],64))}});exports._sfc_main=nt,exports.useCustomerWalletBalances=function({customerId:i}){const{getCustomerWalletBalances:l}=function(){const e=o.createRequestService(),a=o.useConfig();return{getCustomerWalletBalances:function(o){return e({url:`${a.apiUrls.config}/portal/customers/${o}/wallets/balance`,query:t.withExpand({expandParams:n.EXPAND_ALL}),options:{method:"POST"},data:{}})}}}(),{data:u,execute:r,apiStatus:d,error:s,isPending:c}=a.useService({service:()=>l(i)});return{walletBalances:e.computed(()=>u.value??null),apiStatus:d,error:s,fetch:r,isPending:c}};
|