@solvimon/solvimon-web 0.1.0-alpha.25 → 0.1.0-alpha.26
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 +14 -11
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Dh_a0NRB.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DcrLNA_x.mjs} +6 -6
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-BM1_31Tl.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DwbIiJBY.js} +1 -1
- package/dist/{Avatar.vue.es-CvxRdCes.js → Avatar.vue.es-Bm6MCMAL.js} +1 -1
- package/dist/{Avatar.vue.es-C9Jkfuvp.mjs → Avatar.vue.es-BqQHvLGA.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-7wQAw6Lv.js → BillingInformation.vue_vue_type_script_setup_true_lang-0JHnqIpC.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BRSUpMPU.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BFza7Nf9.mjs} +8 -8
- package/dist/{Button.vue.es-BbSN0uOk.mjs → Button.vue.es-C32_baQN.mjs} +1 -1
- package/dist/{Button.vue.es-CeUTAc2n.js → Button.vue.es-qGvnOKnK.js} +1 -1
- package/dist/ChargeOnDemandModal-CIiI74ls.mjs +983 -0
- package/dist/ChargeOnDemandModal-DIQaGnRs.js +1 -0
- package/dist/Checkout.entry.ce-8EcavNgT.js +2 -0
- package/dist/{Checkout.entry.ce-BMzK8nQg.mjs → Checkout.entry.ce-BA5ljKj8.mjs} +1562 -1538
- package/dist/{Chip.vue.es-T22Q7AF9.mjs → Chip.vue.es-CKCOY5T6.mjs} +2 -2
- package/dist/{Chip.vue.es-BN83K3Tk.js → Chip.vue.es-D60gTbfe.js} +1 -1
- package/dist/{ContextMenu.vue.es-DXKR7WFg.js → ContextMenu.vue.es-C7KI8Gz6.js} +1 -1
- package/dist/{ContextMenu.vue.es-0PRmCAzL.mjs → ContextMenu.vue.es-Da-lAmTl.mjs} +10 -10
- package/dist/{CustomerBillingInformation.vue.es-C2j40TYP.mjs → CustomerBillingInformation.vue.es-BxBQt4Q0.mjs} +2 -2
- package/dist/{CustomerBillingInformation.vue.es-yrLGc7oL.js → CustomerBillingInformation.vue.es-bFUx81Ig.js} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BZwGWhaL.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BcTZgshS.mjs} +6 -6
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C8diNL5x.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C0lJ_ESU.js} +1 -1
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-xqMsbuU6.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs} +908 -891
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js +1 -0
- package/dist/{DividerText.vue.es-DsYRZzuE.js → DividerText.vue.es-BF3gnr4e.js} +1 -1
- package/dist/{DividerText.vue.es-CV1XK_Vz.mjs → DividerText.vue.es-DKl3FnDJ.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-kpjrC-4q.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs} +4 -4
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-srXOpUb0.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js} +1 -1
- package/dist/{ErrorNotification.vue.es-QfRoDhkn.js → ErrorNotification.vue.es-BX9dHEc-.js} +1 -1
- package/dist/{ErrorNotification.vue.es-CiUJva6S.mjs → ErrorNotification.vue.es-rRKgmkzV.mjs} +1 -1
- package/dist/{IconButton.vue.es-CytBZUkZ.js → IconButton.vue.es-Bwdfu-jm.js} +1 -1
- package/dist/{IconButton.vue.es-ChvsCZQG.mjs → IconButton.vue.es-UlqwNPAX.mjs} +2 -2
- package/dist/{IconTitle.vue.es-DPruIJ6l.mjs → IconTitle.vue.es-CK9k69tV.mjs} +3 -3
- package/dist/{IconTitle.vue.es-DtnpBObk.js → IconTitle.vue.es-Cei98MBw.js} +1 -1
- package/dist/{Input.vue.es-BkzQDkrz.js → Input.vue.es-B47l_feL.js} +1 -1
- package/dist/{Input.vue.es-DJQqJrsb.mjs → Input.vue.es-D9IjIWc-.mjs} +2 -2
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Do0dDtkA.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DKlPrxQS.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BC-zyUqe.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DUfJl07Y.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-CFhhhwId.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-D9Rtgapa.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DQFS7SfE.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DlJ6lELc.js} +1 -1
- package/dist/InvoiceSummary.vue.es-DBnR9Hs7.js +1 -0
- package/dist/{InvoiceSummary.vue.es-6qpbyymg.mjs → InvoiceSummary.vue.es-DQ4KvTaw.mjs} +576 -565
- package/dist/{Modal.vue.es-JpE0eh_Q.js → Modal.vue.es-8LN4gBh0.js} +1 -1
- package/dist/{Modal.vue.es-BuRlbyZw.mjs → Modal.vue.es-B9xMiyn3.mjs} +5 -5
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-nAuhIopc.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-B1yGKkWN.js} +1 -1
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-UmKgVvdj.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BVzL2PGe.mjs} +4 -4
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-YpcWHm24.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js} +1 -1
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DggCusgC.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-nLTPnH4j.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-DnmParhQ.mjs → PaymentHistoryBlock-DYa99P1M.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-uWuWjr8I.js → PaymentHistoryBlock-Ds93gNvh.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BS8N4yt9.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CBZhXQfC.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BziIf86i.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D0KnSy0y.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-DTXm56QQ.js → PaymentIntegrationForm-B_Db4DG1.js} +1 -1
- package/dist/{PaymentIntegrationForm-DL55i0HD.mjs → PaymentIntegrationForm-UWoyZgsR.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C0J37ZVe.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-J15IDbMc.mjs +154 -0
- package/dist/{PaymentIntegrationFormAdyen-Cqsy82To.mjs → PaymentIntegrationFormAdyen-D4qfNtZ_.mjs} +197 -183
- package/dist/PaymentIntegrationFormAdyen-HeA9XIj-.js +98 -0
- package/dist/{PaymentIntegrationFormStripe-DIU1rnwH.mjs → PaymentIntegrationFormStripe-BIiMCWlV.mjs} +247 -220
- package/dist/PaymentIntegrationFormStripe-DUCJTIAq.js +102 -0
- package/dist/PaymentMethod.vue.es-CJcSZ9lN.js +1 -0
- package/dist/{PaymentMethod.vue.es-m1NasGqw.mjs → PaymentMethod.vue.es-CKu5nApX.mjs} +168 -148
- package/dist/{PaymentMethodForm-BEVdWCrH.js → PaymentMethodForm-1d0YIGOu.js} +1 -1
- package/dist/{PaymentMethodForm-BYzt1PVP.mjs → PaymentMethodForm-B05sHWcW.mjs} +1 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BDm8l_6N.js +1 -0
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-fdRTp7sc.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-D1yIYsb_.mjs} +45 -41
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FhMBZqtI.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BE4S26JX.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FChyZp2v.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DGpXRtp4.mjs} +6 -6
- package/dist/PlanCustomizationEditor-CEMP_Dhz.js +1 -0
- package/dist/PlanCustomizationEditor-CpZeilm5.mjs +694 -0
- package/dist/{PricingGroupRangeInput.vue.es-B4ZbKxUw.mjs → PricingGroupRangeInput.vue.es-CJpvUP3-.mjs} +4 -4
- package/dist/{PricingGroupRangeInput.vue.es-Ba3v0J_R.js → PricingGroupRangeInput.vue.es-DZSJ5Mz0.js} +1 -1
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DJ81eUJX.mjs +141 -0
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-jrkraJMu.js +1 -0
- package/dist/{RadioGroupExtended.vue.es-CkhBp9kI.mjs → RadioGroupExtended.vue.es-BalV7gwp.mjs} +2 -2
- package/dist/{RadioGroupExtended.vue.es-CHrcqSRq.js → RadioGroupExtended.vue.es-Dt6LH9Yh.js} +1 -1
- package/dist/{Section.vue.es-D5svcVS_.mjs → Section.vue.es-D7eiXUbk.mjs} +1 -1
- package/dist/{Section.vue.es-CSrVPlUK.js → Section.vue.es-zVXBHAL6.js} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BqOSBdFQ.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BdjYFrVC.js} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BM9Y4Cy3.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DudMRVka.mjs} +6 -6
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js +1 -0
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs → Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs} +5 -5
- package/dist/StepInput.vue.es-C3Zm6Wc9.mjs +199 -0
- package/dist/StepInput.vue.es-mAnuCuDQ.js +1 -0
- package/dist/SubscriptionDetails.entry.ce-D4CsSoR9.js +1 -0
- package/dist/SubscriptionDetails.entry.ce-WEimiOex.mjs +1057 -0
- package/dist/{SubscriptionSchedules-CMVoB2bw.js → SubscriptionSchedules-Cm5Dt-1H.js} +1 -1
- package/dist/{SubscriptionSchedules-yDcsD1hd.mjs → SubscriptionSchedules-DrrEAPlx.mjs} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DZHsQImd.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DHp_KtbF.mjs} +2284 -2341
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-t2Awijf5.js +1 -0
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BmNl5u8R.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs} +3 -3
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BgXZMihr.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-B41qZmcL.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DOJ0t_fo.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-Bu-_clEa.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BUzdZHah.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DFU0IULg.mjs} +8 -8
- package/dist/{TooltipParagraph.vue.es-CxdL8-B7.mjs → TooltipParagraph.vue.es-BXbOJmjr.mjs} +3 -3
- package/dist/TooltipParagraph.vue.es-Cph6zT31.js +1 -0
- package/dist/{TrialChip.vue.es-BCc8q5j0.js → TrialChip.vue.es-C_wgHGuN.js} +1 -1
- package/dist/{TrialChip.vue.es-BK7m7e7q.mjs → TrialChip.vue.es-C_yRujip.mjs} +2 -2
- package/dist/{cn.es-ZXNzpauQ.mjs → cn.es-CGa6b2Lt.mjs} +2 -2
- package/dist/{cn.es-71nFUose.js → cn.es-D9YMDvG2.js} +1 -1
- package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
- package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +246 -230
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
- package/dist/components/Invoice/Invoice.cjs +1 -1
- package/dist/components/Invoice/Invoice.mjs +201 -212
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
- package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
- package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.mjs +4 -4
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
- package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
- package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
- package/dist/{customElements-hH6pju3X.js → customElements-C963-LtW.js} +36 -32
- package/dist/{customElements-q_i9y0Ph.mjs → customElements-D5DAoHRI.mjs} +231 -196
- package/dist/{customer-BDoOIAFr.mjs → customer-DKa1B2vp.mjs} +4 -4
- package/dist/{customer-C9q6ti8s.js → customer-TE1FnGT0.js} +1 -1
- package/dist/{de-DE-BSlbAnPE.js → de-DE-B4TUdnUf.js} +1 -1
- package/dist/{de-DE-B_ik9VNt.mjs → de-DE-CLfzTbbX.mjs} +38 -6
- package/dist/de-DE-DaBBl-Ak.js +1 -0
- package/dist/{de-DE-DXsG-vXA.mjs → de-DE-jkW2dJrX.mjs} +28 -14
- package/dist/en-US-BNevqm0M.js +1 -0
- package/dist/{en-US-DkCltadt.mjs → en-US-D6SGRAch.mjs} +38 -6
- package/dist/en-US-J85TQRI8.js +1 -0
- package/dist/{en-US-C939IZ5i.mjs → en-US-SDhjlY_v.mjs} +20 -5
- package/dist/formControl-ODrpUvcA.js +1 -0
- package/dist/{index-BPU8tIml.mjs → formControl-dX7l8o3c.mjs} +160 -143
- package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +4 -0
- package/dist/icon-sprite.svg.es-Ds6lDf5p.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{invoices-CHp75zZI.js → invoices-ClqTWYF9.js} +1 -1
- package/dist/{invoices-DIzkXntV.mjs → invoices-DJTwftJv.mjs} +1 -1
- package/dist/it-IT-BkPbTueL.js +1 -0
- package/dist/{it-IT-DT3rfjOY.js → it-IT-CSYvGmpT.js} +1 -1
- package/dist/{it-IT-BxpwB3oJ.mjs → it-IT-CaaFToGB.mjs} +20 -6
- package/dist/{it-IT-CHj2McbF.mjs → it-IT-Cym1UvvK.mjs} +38 -6
- package/dist/{nl-NL-DfkhOJKc.js → nl-NL-CpE4IgwO.js} +1 -1
- package/dist/{nl-NL-na2I4aiP.mjs → nl-NL-D0MQKaql.mjs} +34 -20
- package/dist/{nl-NL-Cdvd_XMN.mjs → nl-NL-D0c4x5C0.mjs} +38 -6
- package/dist/nl-NL-jIfAVGv0.js +1 -0
- package/dist/paymentMethods-AL2U_byg.js +1 -0
- package/dist/{paymentMethods-DEKp_4QM.mjs → paymentMethods-CWzJhcWK.mjs} +16 -14
- package/dist/{payments-DBvregE8.js → payments-BmiHMlQt.js} +1 -1
- package/dist/{payments-C0-Hq2a4.mjs → payments-aXyfylwk.mjs} +6 -6
- package/dist/pricing.es-C07bgEZx.js +1 -0
- package/dist/pricing.es-QYWrKMUJ.mjs +30 -0
- package/dist/pricingPlanSchedules-BD4GIP_F.mjs +32 -0
- package/dist/pricingPlanSchedules-BfsMSvN0.js +1 -0
- package/dist/screens/Checkout/Checkout.cjs +1 -1
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
- package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
- package/dist/screens/PayInvoice/PayInvoice.mjs +57 -55
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +3 -769
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +243 -270
- package/dist/{subscription-CrVOr5MF.mjs → subscription-D1yHKUNc.mjs} +2 -2
- package/dist/{subscriptions-BArXBCFr.js → subscriptions-Cm83ckfl.js} +1 -1
- package/dist/{subscriptions--9MaTXMb.mjs → subscriptions-cnR5fnf7.mjs} +1 -1
- package/dist/types/components/{wallets/WalletModalShell.types.d.ts → payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts} +3 -3
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +5 -0
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +5 -9
- package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +7 -11
- package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +7 -11
- package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +7 -11
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +7 -11
- package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +21 -0
- package/dist/types/components/subscriptions/OnDemandItemsCard/OnDemandItemsCard.types.d.ts +7 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +27 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +1 -1
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +6 -5
- package/dist/types/services/paymentMethods.types.d.ts +4 -2
- package/dist/types/services/requests.types.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/AgentContext.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +6 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +23 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +16 -4
- package/dist/types/vendor/@solvimon/solvimon-types/types/Embeddable.d.ts +8 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +21 -6
- package/dist/types/vendor/@solvimon/solvimon-types/types/OAuth.d.ts +28 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +2 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +6 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanGroups.d.ts +31 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +9 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +3 -3
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/SeatAssignment.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +6 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +128 -1
- package/dist/{useActionDispatchProvider-CKzeqXzY.js → useActionDispatchProvider-CHkVQMaE.js} +1 -1
- package/dist/{useActionDispatchProvider-BdciAX8T.mjs → useActionDispatchProvider-DDYqIh3r.mjs} +1 -1
- package/dist/{useCustomer-DSYr0F58.js → useCustomer-DGYtowRy.js} +1 -1
- package/dist/{useCustomer-D8ixhuuj.mjs → useCustomer-XZKWsolE.mjs} +1 -1
- package/dist/{useCustomerFormLabels-htMZ0xqB.mjs → useCustomerFormLabels-CcnkJLcB.mjs} +6 -6
- package/dist/useCustomerFormLabels-DAZziqYt.js +1 -0
- package/dist/{useExperimentalFeature-D29-TO3R.js → useExperimentalFeature-COOU6IZd.js} +1 -1
- package/dist/{useExperimentalFeature-JK_kAUQQ.mjs → useExperimentalFeature-ierhOt9Q.mjs} +1 -1
- package/dist/{useInvoiceData-Bpbog3zW.mjs → useInvoiceData-BEK-7msA.mjs} +3 -3
- package/dist/{useInvoiceData-DhrItfv7.js → useInvoiceData-CQRn8l9C.js} +1 -1
- package/dist/{useInvoicesList-duu_b5GW.js → useInvoicesList-BQkKyyXa.js} +1 -1
- package/dist/{useInvoicesList-BGwcJn4I.mjs → useInvoicesList-C4I118KM.mjs} +7 -7
- package/dist/{useLoadInitialData-BDmmpcfb.mjs → useLoadInitialData-CR0kbYw8.mjs} +1 -1
- package/dist/{useLoadInitialData-U2WvBmXT.js → useLoadInitialData-CrKnBZs_.js} +1 -1
- package/dist/{usePaymentMethodAvailability-DwtT5Czz.js → usePaymentMethodAvailability-Ci6LeYKt.js} +1 -1
- package/dist/{usePaymentMethodAvailability-adqRujTA.mjs → usePaymentMethodAvailability-ZH-m3B-A.mjs} +12 -12
- package/dist/{usePaymentMethodOptions-DlZtTQNQ.mjs → usePaymentMethodOptions-Ciifjo6c.mjs} +15 -13
- package/dist/usePaymentMethodOptions-Cqe92ZBn.js +1 -0
- package/dist/{usePaymentMethods-BnmSo_rr.mjs → usePaymentMethods-B-OKRyKd.mjs} +1 -1
- package/dist/{usePaymentMethods-DZ1a0mnr.js → usePaymentMethods-BKwrl82-.js} +1 -1
- package/dist/usePayments-Bauj16B-.js +1 -0
- package/dist/{usePayments-s-Z1di8d.mjs → usePayments-CV85OV8V.mjs} +46 -41
- package/dist/{usePortal-Hm7wvtgQ.js → usePortal-DSLImEfr.js} +1 -1
- package/dist/{usePortal-C4rR5Rhu.mjs → usePortal-H8Tv2TnZ.mjs} +1 -1
- package/dist/{useSubscription-DMAEJves.js → useSubscription-BiYNJT2e.js} +1 -1
- package/dist/{useSubscription-DSsXVO0h.mjs → useSubscription-DqnxWNKg.mjs} +1 -1
- package/dist/{useTimePeriod.es-CW8ycmpT.mjs → useTimePeriod.es-B22-fno3.mjs} +1 -1
- package/dist/{useTimePeriod.es-anHB63am.js → useTimePeriod.es-D2aiyfd-.js} +1 -1
- package/dist/useWatchDebounced-B8iX7ykx.js +1 -0
- package/dist/useWatchDebounced-BHlBPcXB.mjs +20 -0
- package/package.json +11 -8
- package/dist/Checkout.entry.ce-DgA0ckyl.js +0 -2
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DzbPUvHN.js +0 -1
- package/dist/InvoiceSummary.vue.es-v1TkOUhA.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-4RmdLbzY.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvpFnl9V.mjs +0 -141
- package/dist/PaymentIntegrationFormAdyen-C9KoiqMh.js +0 -98
- package/dist/PaymentIntegrationFormStripe-DTLgGutU.js +0 -102
- package/dist/PaymentMethod.vue.es-ZWda5GqF.js +0 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-CzUwtVEI.js +0 -1
- package/dist/PlanCustomizationEditor-CunwwXTw.js +0 -1
- package/dist/PlanCustomizationEditor-NLVkEYFF.mjs +0 -877
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-Dvuj-fos.mjs +0 -131
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-iE4dLawA.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js +0 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DH7IZrNT.js +0 -1
- package/dist/TooltipParagraph.vue.es-DS_69pl1.js +0 -1
- package/dist/de-DE-npBTLtKL.js +0 -1
- package/dist/en-US-9xdcz3T5.js +0 -1
- package/dist/en-US-kGduGoka.js +0 -1
- package/dist/icon-sprite.svg.es-Bt21fMEt.mjs +0 -4
- package/dist/icon-sprite.svg.es-Dauis9LS.js +0 -1
- package/dist/index-DwueOtPi.js +0 -1
- package/dist/it-IT-BayNIAy7.js +0 -1
- package/dist/nl-NL-0rV4nFLw.js +0 -1
- package/dist/paymentMethods-CZGP6_4W.js +0 -1
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +0 -47
- package/dist/useCustomerFormLabels-CRumh405.js +0 -1
- package/dist/usePaymentMethodOptions-CXdFKFqZ.js +0 -1
- package/dist/usePayments-DL4agK2i.js +0 -1
- package/dist/useWatchDebounced-CAU1WI1P.js +0 -1
- package/dist/useWatchDebounced-DT5IicPp.mjs +0 -14
|
@@ -0,0 +1,983 @@
|
|
|
1
|
+
import { defineComponent as me, openBlock as i, createElementBlock as C, normalizeClass as G, createCommentVNode as M, useModel as Ae, computed as d, createBlock as h, createElementVNode as x, createVNode as b, withCtx as c, createTextVNode as v, toDisplayString as p, unref as n, Fragment as We, renderList as qe, renderSlot as je, mergeModels as Pe, ref as k, watch as J, reactive as Ke } from "vue";
|
|
2
|
+
import { u as Xe, c as Ce } from "./formControl-dX7l8o3c.mjs";
|
|
3
|
+
import { f as Je } from "./formatting.es-RclXHhKo.mjs";
|
|
4
|
+
import { _ as P } from "./Button.vue.es-C32_baQN.mjs";
|
|
5
|
+
import { u as Qe, g as Ze, i as ea, t as aa } from "./SubscriptionDetails.entry.ce-WEimiOex.mjs";
|
|
6
|
+
import { a as ke, _ as ta } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs";
|
|
7
|
+
import { _ as na } from "./PaymentMethod.vue.es-CKu5nApX.mjs";
|
|
8
|
+
import { a as Te, _ as R, j as ce, b as Oe } from "./customElements-D5DAoHRI.mjs";
|
|
9
|
+
import { _ as da } from "./ErrorNotification.vue.es-rRKgmkzV.mjs";
|
|
10
|
+
import { _ as De } from "./FormMessage.vue.es-jG3fQZms.mjs";
|
|
11
|
+
import { _ as oa } from "./RadioGroupExtended.vue.es-BalV7gwp.mjs";
|
|
12
|
+
import { _ as ia } from "./StepInput.vue.es-C3Zm6Wc9.mjs";
|
|
13
|
+
import { _ as sa } from "./IconButton.vue.es-UlqwNPAX.mjs";
|
|
14
|
+
import { _ as ra } from "./floating-ui.vue.es-CYt0fSY7.mjs";
|
|
15
|
+
import { _ as la } from "./Section.vue.es-D7eiXUbk.mjs";
|
|
16
|
+
import { c as ca } from "./invoices-DJTwftJv.mjs";
|
|
17
|
+
import { a as ma, b as ua, c as ha, d as va } from "./CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs";
|
|
18
|
+
const V = (e) => e.replaceAll("_", " ").toLowerCase().replace(/^./, (_) => _.toUpperCase()), pa = (e) => {
|
|
19
|
+
var _, o, y, a, E, r;
|
|
20
|
+
const g = [];
|
|
21
|
+
switch (e.type) {
|
|
22
|
+
case "CARD":
|
|
23
|
+
g.push(
|
|
24
|
+
e.card.brand && V(e.card.brand),
|
|
25
|
+
e.card.last_four_digits
|
|
26
|
+
);
|
|
27
|
+
break;
|
|
28
|
+
case "ONLINE_BANKING":
|
|
29
|
+
g.push(
|
|
30
|
+
((_ = e.online_banking) == null ? void 0 : _.variant) && V(e.online_banking.variant),
|
|
31
|
+
(o = e.online_banking) == null ? void 0 : o.owner_name
|
|
32
|
+
);
|
|
33
|
+
break;
|
|
34
|
+
case "DIRECT_DEBIT":
|
|
35
|
+
g.push(
|
|
36
|
+
((y = e.direct_debit) == null ? void 0 : y.variant) && V(e.direct_debit.variant),
|
|
37
|
+
(a = e.direct_debit) == null ? void 0 : a.owner_name
|
|
38
|
+
);
|
|
39
|
+
break;
|
|
40
|
+
case "BUY_NOW_PAY_LATER":
|
|
41
|
+
g.push(
|
|
42
|
+
((E = e.buy_now_pay_later) == null ? void 0 : E.variant) && V(e.buy_now_pay_later.variant)
|
|
43
|
+
);
|
|
44
|
+
break;
|
|
45
|
+
case "DIGITAL_WALLET":
|
|
46
|
+
g.push(
|
|
47
|
+
((r = e.digital_wallet) == null ? void 0 : r.variant) && V(e.digital_wallet.variant)
|
|
48
|
+
);
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
return g.filter(Boolean).join(" ") || V(e.type);
|
|
52
|
+
}, ga = /* @__PURE__ */ me({
|
|
53
|
+
__name: "Placeholder",
|
|
54
|
+
props: {
|
|
55
|
+
loading: { type: Boolean },
|
|
56
|
+
shade: { default: "default" }
|
|
57
|
+
},
|
|
58
|
+
setup(e) {
|
|
59
|
+
return (_, o) => (i(), C("div", {
|
|
60
|
+
class: G(["rounded", {
|
|
61
|
+
"bg-gray-300": e.shade === "default",
|
|
62
|
+
"bg-gray-200": e.shade === "light"
|
|
63
|
+
}])
|
|
64
|
+
}, [
|
|
65
|
+
e.loading ? (i(), C("div", {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: G(["absolute inset-0", { "animated-gradient": e.loading }])
|
|
68
|
+
}, null, 2)) : M("", !0)
|
|
69
|
+
], 2));
|
|
70
|
+
}
|
|
71
|
+
}), le = /* @__PURE__ */ ra(ga, [["__scopeId", "data-v-11677ac2"]]), fa = { class: "flex flex-col gap-6" }, _a = {
|
|
72
|
+
class: "flex flex-col gap-3",
|
|
73
|
+
"aria-labelledby": "charge-on-demand-items-heading"
|
|
74
|
+
}, ya = { class: "flex flex-col gap-2" }, ba = { class: "flex min-w-0 grow flex-col" }, Ia = {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: "flex shrink-0 items-center gap-1"
|
|
77
|
+
}, wa = { class: "w-32" }, Ma = {
|
|
78
|
+
class: "flex flex-col gap-3",
|
|
79
|
+
"aria-labelledby": "charge-on-demand-preview-heading"
|
|
80
|
+
}, Ea = {
|
|
81
|
+
key: 1,
|
|
82
|
+
class: "flex flex-col gap-3",
|
|
83
|
+
"aria-busy": "true",
|
|
84
|
+
"data-testid": "charge-on-demand-preview-loading"
|
|
85
|
+
}, Aa = {
|
|
86
|
+
class: "flex flex-col gap-3",
|
|
87
|
+
"aria-labelledby": "charge-on-demand-payment-heading"
|
|
88
|
+
}, Pa = {
|
|
89
|
+
key: 1,
|
|
90
|
+
"data-testid": "charge-on-demand-no-payment-methods"
|
|
91
|
+
}, Ca = /* @__PURE__ */ me({
|
|
92
|
+
__name: "ChargeOnDemandEditor",
|
|
93
|
+
props: /* @__PURE__ */ Pe({
|
|
94
|
+
items: {},
|
|
95
|
+
preview: { default: void 0 },
|
|
96
|
+
isPreviewLoading: { type: Boolean, default: !1 },
|
|
97
|
+
paymentMethods: {},
|
|
98
|
+
canAddPaymentMethod: { type: Boolean, default: !1 },
|
|
99
|
+
errors: { default: void 0 },
|
|
100
|
+
disabled: { type: Boolean, default: !1 }
|
|
101
|
+
}, {
|
|
102
|
+
selection: { required: !0 },
|
|
103
|
+
selectionModifiers: {},
|
|
104
|
+
paymentMethodId: {},
|
|
105
|
+
paymentMethodIdModifiers: {}
|
|
106
|
+
}),
|
|
107
|
+
emits: /* @__PURE__ */ Pe(["add-payment-method"], ["update:selection", "update:paymentMethodId"]),
|
|
108
|
+
setup(e) {
|
|
109
|
+
const _ = e, o = Ae(e, "selection"), y = Ae(e, "paymentMethodId"), { $t: a } = Te(), E = (t) => {
|
|
110
|
+
o.value = [
|
|
111
|
+
...o.value,
|
|
112
|
+
t.priceType === "FLAT" ? { pricingItemId: t.pricingItemId, units: t.defaultUnits } : { pricingItemId: t.pricingItemId }
|
|
113
|
+
];
|
|
114
|
+
}, r = (t) => {
|
|
115
|
+
o.value = o.value.filter(
|
|
116
|
+
({ pricingItemId: f }) => f !== t.pricingItemId
|
|
117
|
+
);
|
|
118
|
+
}, g = (t, f) => {
|
|
119
|
+
!Number.isInteger(f) || f < 1 || (o.value = o.value.map(
|
|
120
|
+
(A) => A.pricingItemId === t.pricingItemId ? { ...A, units: f } : A
|
|
121
|
+
));
|
|
122
|
+
}, { getPriceLabel: I } = Qe(), O = d(
|
|
123
|
+
() => new Map(o.value.map((t) => [t.pricingItemId, t]))
|
|
124
|
+
), N = d(
|
|
125
|
+
() => _.items.map((t) => {
|
|
126
|
+
var f, A;
|
|
127
|
+
return {
|
|
128
|
+
item: t,
|
|
129
|
+
selected: O.value.get(t.pricingItemId),
|
|
130
|
+
error: (A = (f = _.errors) == null ? void 0 : f.items) == null ? void 0 : A[t.pricingItemId],
|
|
131
|
+
priceLabel: I(t)
|
|
132
|
+
};
|
|
133
|
+
})
|
|
134
|
+
), u = d(
|
|
135
|
+
() => new Map(
|
|
136
|
+
_.paymentMethods.map((t) => [t.id, t])
|
|
137
|
+
)
|
|
138
|
+
), T = d(
|
|
139
|
+
() => _.paymentMethods.map((t) => ({
|
|
140
|
+
label: pa(t),
|
|
141
|
+
value: t.id
|
|
142
|
+
}))
|
|
143
|
+
);
|
|
144
|
+
return (t, f) => {
|
|
145
|
+
var A, $, W;
|
|
146
|
+
return i(), C("div", fa, [
|
|
147
|
+
(A = e.errors) != null && A.form ? (i(), h(da, {
|
|
148
|
+
key: 0,
|
|
149
|
+
description: e.errors.form
|
|
150
|
+
}, null, 8, ["description"])) : M("", !0),
|
|
151
|
+
x("section", _a, [
|
|
152
|
+
b(R, {
|
|
153
|
+
id: "charge-on-demand-items-heading",
|
|
154
|
+
tag: "h3",
|
|
155
|
+
variant: "label",
|
|
156
|
+
"no-spacing": ""
|
|
157
|
+
}, {
|
|
158
|
+
default: c(() => [
|
|
159
|
+
v(p(n(a)({
|
|
160
|
+
defaultMessage: "Items",
|
|
161
|
+
description: "Heading of the list of on-demand items that can be ordered",
|
|
162
|
+
id: "charge_on_demand.items.heading"
|
|
163
|
+
})), 1)
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
}),
|
|
167
|
+
x("ul", ya, [
|
|
168
|
+
(i(!0), C(We, null, qe(N.value, ({ item: m, selected: D, error: S, priceLabel: q }) => (i(), C("li", {
|
|
169
|
+
key: m.pricingItemId,
|
|
170
|
+
class: "flex flex-col gap-1",
|
|
171
|
+
"data-testid": "charge-on-demand-item"
|
|
172
|
+
}, [
|
|
173
|
+
x("div", {
|
|
174
|
+
class: G(["flex items-center gap-4 rounded-lg border px-4 py-3", {
|
|
175
|
+
"border-red-600": S,
|
|
176
|
+
"border-primary-600": !S && D,
|
|
177
|
+
"border-gray-300": !S && !D
|
|
178
|
+
}])
|
|
179
|
+
}, [
|
|
180
|
+
x("div", ba, [
|
|
181
|
+
b(R, {
|
|
182
|
+
tag: "span",
|
|
183
|
+
weight: "semibold",
|
|
184
|
+
"no-spacing": ""
|
|
185
|
+
}, {
|
|
186
|
+
default: c(() => [
|
|
187
|
+
v(p(m.name), 1)
|
|
188
|
+
]),
|
|
189
|
+
_: 2
|
|
190
|
+
}, 1024),
|
|
191
|
+
q ? (i(), h(R, {
|
|
192
|
+
key: 0,
|
|
193
|
+
tag: "span",
|
|
194
|
+
variant: "body-sm",
|
|
195
|
+
color: "secondary",
|
|
196
|
+
"no-spacing": ""
|
|
197
|
+
}, {
|
|
198
|
+
default: c(() => [
|
|
199
|
+
v(p(q), 1)
|
|
200
|
+
]),
|
|
201
|
+
_: 2
|
|
202
|
+
}, 1024)) : M("", !0)
|
|
203
|
+
]),
|
|
204
|
+
m.priceType === "FLAT" && D ? (i(), C("div", Ia, [
|
|
205
|
+
x("div", wa, [
|
|
206
|
+
b(ia, {
|
|
207
|
+
"model-value": D.units ?? m.defaultUnits,
|
|
208
|
+
"initial-value": m.defaultUnits,
|
|
209
|
+
min: 1,
|
|
210
|
+
name: `charge-on-demand-units-${m.pricingItemId}`,
|
|
211
|
+
disabled: e.disabled,
|
|
212
|
+
size: "sm",
|
|
213
|
+
"onUpdate:modelValue": (F) => g(m, F)
|
|
214
|
+
}, null, 8, ["model-value", "initial-value", "name", "disabled", "onUpdate:modelValue"])
|
|
215
|
+
]),
|
|
216
|
+
b(sa, {
|
|
217
|
+
type: "button",
|
|
218
|
+
icon: "close",
|
|
219
|
+
intent: "subtle",
|
|
220
|
+
size: "sm",
|
|
221
|
+
disabled: e.disabled,
|
|
222
|
+
tooltip: n(a)({
|
|
223
|
+
defaultMessage: "Remove",
|
|
224
|
+
description: "Removes an on-demand item from the order",
|
|
225
|
+
id: "charge_on_demand.item.remove"
|
|
226
|
+
}),
|
|
227
|
+
onClick: (F) => r(m)
|
|
228
|
+
}, null, 8, ["disabled", "tooltip", "onClick"])
|
|
229
|
+
])) : D ? (i(), h(P, {
|
|
230
|
+
key: 1,
|
|
231
|
+
type: "button",
|
|
232
|
+
intent: "secondary",
|
|
233
|
+
size: "sm",
|
|
234
|
+
"icon-prefix": "check",
|
|
235
|
+
"aria-pressed": !0,
|
|
236
|
+
disabled: e.disabled,
|
|
237
|
+
onClick: (F) => r(m)
|
|
238
|
+
}, {
|
|
239
|
+
default: c(() => [
|
|
240
|
+
v(p(n(a)({
|
|
241
|
+
defaultMessage: "Added",
|
|
242
|
+
description: "Label of an on-demand item that is in the order; clicking it removes the item",
|
|
243
|
+
id: "charge_on_demand.item.added"
|
|
244
|
+
})), 1)
|
|
245
|
+
]),
|
|
246
|
+
_: 1
|
|
247
|
+
}, 8, ["disabled", "onClick"])) : (i(), h(P, {
|
|
248
|
+
key: 2,
|
|
249
|
+
type: "button",
|
|
250
|
+
intent: "secondary",
|
|
251
|
+
size: "sm",
|
|
252
|
+
"icon-prefix": "add",
|
|
253
|
+
"aria-pressed": m.priceType === "FIXED" ? !1 : void 0,
|
|
254
|
+
disabled: e.disabled,
|
|
255
|
+
onClick: (F) => E(m)
|
|
256
|
+
}, {
|
|
257
|
+
default: c(() => [
|
|
258
|
+
v(p(n(a)({
|
|
259
|
+
defaultMessage: "Add",
|
|
260
|
+
description: "Adds an on-demand item to the order",
|
|
261
|
+
id: "charge_on_demand.item.add"
|
|
262
|
+
})), 1)
|
|
263
|
+
]),
|
|
264
|
+
_: 1
|
|
265
|
+
}, 8, ["aria-pressed", "disabled", "onClick"]))
|
|
266
|
+
], 2),
|
|
267
|
+
S ? (i(), h(De, {
|
|
268
|
+
key: 0,
|
|
269
|
+
message: S
|
|
270
|
+
}, null, 8, ["message"])) : M("", !0)
|
|
271
|
+
]))), 128))
|
|
272
|
+
])
|
|
273
|
+
]),
|
|
274
|
+
x("section", Ma, [
|
|
275
|
+
b(R, {
|
|
276
|
+
id: "charge-on-demand-preview-heading",
|
|
277
|
+
tag: "h3",
|
|
278
|
+
variant: "label",
|
|
279
|
+
"no-spacing": ""
|
|
280
|
+
}, {
|
|
281
|
+
default: c(() => [
|
|
282
|
+
v(p(n(a)({
|
|
283
|
+
defaultMessage: "You will pay",
|
|
284
|
+
description: "Heading of the invoice preview of the on-demand order",
|
|
285
|
+
id: "charge_on_demand.preview.heading"
|
|
286
|
+
})), 1)
|
|
287
|
+
]),
|
|
288
|
+
_: 1
|
|
289
|
+
}),
|
|
290
|
+
o.value.length === 0 ? (i(), h(R, {
|
|
291
|
+
key: 0,
|
|
292
|
+
variant: "body-sm",
|
|
293
|
+
tag: "p",
|
|
294
|
+
color: "subtle",
|
|
295
|
+
"no-spacing": "",
|
|
296
|
+
"data-testid": "charge-on-demand-preview-empty"
|
|
297
|
+
}, {
|
|
298
|
+
default: c(() => [
|
|
299
|
+
v(p(n(a)({
|
|
300
|
+
defaultMessage: "Add an item to see what you'll pay.",
|
|
301
|
+
description: "Shown instead of the invoice preview while no item is added",
|
|
302
|
+
id: "charge_on_demand.preview.empty"
|
|
303
|
+
})), 1)
|
|
304
|
+
]),
|
|
305
|
+
_: 1
|
|
306
|
+
})) : e.isPreviewLoading && !e.preview ? (i(), C("div", Ea, [
|
|
307
|
+
b(le, {
|
|
308
|
+
loading: "",
|
|
309
|
+
class: "relative h-4 w-2/3 overflow-hidden"
|
|
310
|
+
}),
|
|
311
|
+
b(le, {
|
|
312
|
+
loading: "",
|
|
313
|
+
class: "relative h-4 w-1/2 overflow-hidden"
|
|
314
|
+
}),
|
|
315
|
+
b(le, {
|
|
316
|
+
loading: "",
|
|
317
|
+
class: "relative h-5 w-1/3 overflow-hidden"
|
|
318
|
+
})
|
|
319
|
+
])) : e.preview ? (i(), h(ke, {
|
|
320
|
+
key: 2,
|
|
321
|
+
invoice: e.preview,
|
|
322
|
+
"is-customer-facing": ""
|
|
323
|
+
}, null, 8, ["invoice"])) : M("", !0)
|
|
324
|
+
]),
|
|
325
|
+
x("section", Aa, [
|
|
326
|
+
b(R, {
|
|
327
|
+
id: "charge-on-demand-payment-heading",
|
|
328
|
+
tag: "h3",
|
|
329
|
+
variant: "label",
|
|
330
|
+
"no-spacing": ""
|
|
331
|
+
}, {
|
|
332
|
+
default: c(() => [
|
|
333
|
+
v(p(n(a)({
|
|
334
|
+
defaultMessage: "Payment method",
|
|
335
|
+
description: "Heading of the payment method picker of the on-demand order",
|
|
336
|
+
id: "charge_on_demand.payment_method.heading"
|
|
337
|
+
})), 1)
|
|
338
|
+
]),
|
|
339
|
+
_: 1
|
|
340
|
+
}),
|
|
341
|
+
e.paymentMethods.length > 0 ? (i(), h(oa, {
|
|
342
|
+
key: 0,
|
|
343
|
+
modelValue: y.value,
|
|
344
|
+
"onUpdate:modelValue": f[0] || (f[0] = (m) => y.value = m),
|
|
345
|
+
name: "charge-on-demand-payment-method",
|
|
346
|
+
options: T.value,
|
|
347
|
+
"show-radio": !1,
|
|
348
|
+
error: ($ = e.errors) == null ? void 0 : $.paymentMethod,
|
|
349
|
+
disabled: e.disabled,
|
|
350
|
+
direction: "column"
|
|
351
|
+
}, {
|
|
352
|
+
label: c(({ optionValue: m }) => [
|
|
353
|
+
u.value.get(m) ? (i(), h(na, {
|
|
354
|
+
key: 0,
|
|
355
|
+
"payment-method": u.value.get(m)
|
|
356
|
+
}, null, 8, ["payment-method"])) : M("", !0)
|
|
357
|
+
]),
|
|
358
|
+
description: c(() => [...f[2] || (f[2] = [])]),
|
|
359
|
+
_: 1
|
|
360
|
+
}, 8, ["modelValue", "options", "error", "disabled"])) : (i(), C("div", Pa, [
|
|
361
|
+
je(t.$slots, "payment-methods-empty", {}, () => [
|
|
362
|
+
b(R, {
|
|
363
|
+
tag: "p",
|
|
364
|
+
color: "subtle",
|
|
365
|
+
variant: "body-sm",
|
|
366
|
+
"no-spacing": ""
|
|
367
|
+
}, {
|
|
368
|
+
default: c(() => [
|
|
369
|
+
v(p(n(a)({
|
|
370
|
+
defaultMessage: "There is no saved payment method that can pay for this order.",
|
|
371
|
+
description: "Shown when no saved payment method can pay the on-demand order",
|
|
372
|
+
id: "charge_on_demand.payment_method.empty"
|
|
373
|
+
})), 1)
|
|
374
|
+
]),
|
|
375
|
+
_: 1
|
|
376
|
+
})
|
|
377
|
+
]),
|
|
378
|
+
(W = e.errors) != null && W.paymentMethod ? (i(), h(De, {
|
|
379
|
+
key: 0,
|
|
380
|
+
message: e.errors.paymentMethod
|
|
381
|
+
}, null, 8, ["message"])) : M("", !0)
|
|
382
|
+
])),
|
|
383
|
+
e.canAddPaymentMethod ? (i(), h(P, {
|
|
384
|
+
key: 2,
|
|
385
|
+
type: "button",
|
|
386
|
+
intent: "secondary",
|
|
387
|
+
"icon-prefix": "add",
|
|
388
|
+
disabled: e.disabled,
|
|
389
|
+
"data-testid": "charge-on-demand-add-payment-method",
|
|
390
|
+
onClick: f[1] || (f[1] = (m) => t.$emit("add-payment-method"))
|
|
391
|
+
}, {
|
|
392
|
+
default: c(() => [
|
|
393
|
+
v(p(n(a)({
|
|
394
|
+
defaultMessage: "Add payment method",
|
|
395
|
+
description: "Opens the form to add a payment method for the on-demand order",
|
|
396
|
+
id: "charge_on_demand.payment_method.add"
|
|
397
|
+
})), 1)
|
|
398
|
+
]),
|
|
399
|
+
_: 1
|
|
400
|
+
}, 8, ["disabled"])) : M("", !0)
|
|
401
|
+
])
|
|
402
|
+
]);
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
}), Da = [
|
|
406
|
+
"ORDER",
|
|
407
|
+
"ADD_PAYMENT_METHOD",
|
|
408
|
+
"PLACED",
|
|
409
|
+
"PAYMENT_FAILED",
|
|
410
|
+
"FAILED"
|
|
411
|
+
];
|
|
412
|
+
function ka(e) {
|
|
413
|
+
return e.payment_status === "PAID" || e.payment_status === "OVERPAID";
|
|
414
|
+
}
|
|
415
|
+
function Ta(e) {
|
|
416
|
+
var _;
|
|
417
|
+
return ce(e) ? e.statusCode === 422 ? e.resourceType === "PAYMENT" ? "PAYMENT_FAILED" : "FAILED" : e.statusCode !== 400 ? "FAILED" : e.field === "payment_method_id" ? "PAYMENT_METHOD" : e.field === "pricing_plan_subscription_id" ? "SUBSCRIPTION_INACTIVE" : e.field === "pricing_items" || (_ = e.field) != null && _.startsWith("pricing_items.") ? "PRICING_ITEMS" : "FAILED" : "FAILED";
|
|
418
|
+
}
|
|
419
|
+
function Oa(e) {
|
|
420
|
+
return e === "PAYMENT_METHOD" || e === "PRICING_ITEMS" || e === "SUBSCRIPTION_INACTIVE";
|
|
421
|
+
}
|
|
422
|
+
function Na({
|
|
423
|
+
pricingPlanScheduleId: e
|
|
424
|
+
}) {
|
|
425
|
+
const { chargeOnDemandPricingItems: _ } = ca(), o = Oe(), y = k(!1), a = k(), E = k(), r = k();
|
|
426
|
+
return { isCharging: y, chargedInvoice: a, chargeError: E, unpaidInvoiceId: r, charge: async ({
|
|
427
|
+
pricingItems: O,
|
|
428
|
+
paymentMethodId: N
|
|
429
|
+
}) => {
|
|
430
|
+
y.value = !0, E.value = void 0, r.value = void 0;
|
|
431
|
+
try {
|
|
432
|
+
const u = await _({
|
|
433
|
+
pricing_plan_schedule_id: e.value,
|
|
434
|
+
pricing_items: O,
|
|
435
|
+
payment_method_id: N,
|
|
436
|
+
finalize_immediately: !0
|
|
437
|
+
});
|
|
438
|
+
return a.value = u, { invoice: u };
|
|
439
|
+
} catch (u) {
|
|
440
|
+
const T = Ta(u);
|
|
441
|
+
E.value = T, r.value = T === "PAYMENT_FAILED" && ce(u) ? u.resourceId : void 0;
|
|
442
|
+
const t = {
|
|
443
|
+
scheduleId: e.value,
|
|
444
|
+
outcome: T,
|
|
445
|
+
...ce(u) ? {
|
|
446
|
+
statusCode: u.statusCode,
|
|
447
|
+
field: u.field,
|
|
448
|
+
requestId: u.requestId
|
|
449
|
+
} : {}
|
|
450
|
+
};
|
|
451
|
+
return T === "FAILED" ? o.error(
|
|
452
|
+
"ON_DEMAND_CHARGE_FAILED",
|
|
453
|
+
"Failed to charge the on-demand order",
|
|
454
|
+
t,
|
|
455
|
+
u
|
|
456
|
+
) : o.warn(
|
|
457
|
+
"ON_DEMAND_CHARGE_REFUSED",
|
|
458
|
+
"The on-demand order was refused or its payment did not go through",
|
|
459
|
+
t,
|
|
460
|
+
u
|
|
461
|
+
), { error: T, unpaidInvoiceId: r.value };
|
|
462
|
+
} finally {
|
|
463
|
+
y.value = !1;
|
|
464
|
+
}
|
|
465
|
+
}, reset: () => {
|
|
466
|
+
a.value = void 0, E.value = void 0, r.value = void 0;
|
|
467
|
+
} };
|
|
468
|
+
}
|
|
469
|
+
const Sa = {
|
|
470
|
+
key: 0,
|
|
471
|
+
class: "flex flex-col gap-2"
|
|
472
|
+
}, La = {
|
|
473
|
+
key: 1,
|
|
474
|
+
class: "flex flex-col gap-2"
|
|
475
|
+
}, xa = {
|
|
476
|
+
key: 2,
|
|
477
|
+
class: "flex flex-col gap-2"
|
|
478
|
+
}, Za = /* @__PURE__ */ me({
|
|
479
|
+
__name: "ChargeOnDemandModal",
|
|
480
|
+
props: {
|
|
481
|
+
showModal: { type: Boolean },
|
|
482
|
+
subscription: { type: Object },
|
|
483
|
+
scheduleId: { type: String },
|
|
484
|
+
items: { type: Array },
|
|
485
|
+
customer: { type: Object },
|
|
486
|
+
paymentMethods: { type: Array },
|
|
487
|
+
canViewCreatedInvoice: { type: Boolean }
|
|
488
|
+
},
|
|
489
|
+
emits: ["close", "invoice-created", "view-invoice", "payment-method-stored", "payment-failed"],
|
|
490
|
+
setup(e, { emit: _ }) {
|
|
491
|
+
const o = e, y = _, { $t: a } = Te(), E = Oe(), r = k("ORDER"), g = k([]), I = k(), O = d(() => (o.subscription.payment_acceptor_ids ?? []).length > 0), N = d(
|
|
492
|
+
() => Ze(o.paymentMethods ?? [], o.subscription)
|
|
493
|
+
), u = k();
|
|
494
|
+
J(
|
|
495
|
+
N,
|
|
496
|
+
(s) => {
|
|
497
|
+
var Y;
|
|
498
|
+
const l = u.value;
|
|
499
|
+
u.value = void 0;
|
|
500
|
+
const w = l ? s.find(({ id: U }) => !l.has(U)) : void 0;
|
|
501
|
+
if (w) {
|
|
502
|
+
I.value = w.id;
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
s.some(({ id: U }) => U === I.value) || (I.value = (Y = s[0]) == null ? void 0 : Y.id);
|
|
506
|
+
},
|
|
507
|
+
{ immediate: !0 }
|
|
508
|
+
);
|
|
509
|
+
const {
|
|
510
|
+
paneRef: T,
|
|
511
|
+
isActive: t,
|
|
512
|
+
isSaving: f,
|
|
513
|
+
open: A,
|
|
514
|
+
leave: $,
|
|
515
|
+
submit: W
|
|
516
|
+
} = ma({ step: r, name: "ADD_PAYMENT_METHOD", returnTo: "ORDER" }), m = k(!1), D = k(), S = (s) => {
|
|
517
|
+
m.value = !0, E.error(
|
|
518
|
+
"PAYMENT_METHOD_OPTIONS_LOAD_FAILED",
|
|
519
|
+
"Failed to load the payment methods that can be offered",
|
|
520
|
+
{ flow: "ON_DEMAND_ORDER", subscriptionId: o.subscription.id },
|
|
521
|
+
s
|
|
522
|
+
), t.value && ($(), D.value = a({
|
|
523
|
+
defaultMessage: "We couldn't load the ways to add a payment method. Please try again.",
|
|
524
|
+
description: "Shown on the on-demand order when the payment methods that can be added failed to load",
|
|
525
|
+
id: "charge_on_demand_modal.payment_method_options_error"
|
|
526
|
+
}));
|
|
527
|
+
}, {
|
|
528
|
+
settledOptions: q,
|
|
529
|
+
isPending: F,
|
|
530
|
+
load: Ne
|
|
531
|
+
} = ua({
|
|
532
|
+
isOpen: d(() => o.showModal && O.value),
|
|
533
|
+
customer: d(() => o.customer),
|
|
534
|
+
subscriptionId: d(() => o.subscription.id),
|
|
535
|
+
onError: S
|
|
536
|
+
}), Se = d(
|
|
537
|
+
() => {
|
|
538
|
+
var s;
|
|
539
|
+
return (s = q.value) == null ? void 0 : s.filter(
|
|
540
|
+
({ payment_acceptor: l }) => (o.subscription.payment_acceptor_ids ?? []).includes(l.id)
|
|
541
|
+
);
|
|
542
|
+
}
|
|
543
|
+
), Le = () => {
|
|
544
|
+
D.value = void 0, m.value && (m.value = !1, Ne()), A();
|
|
545
|
+
}, xe = () => {
|
|
546
|
+
u.value = new Set(N.value.map(({ id: s }) => s)), $(), y("payment-method-stored");
|
|
547
|
+
}, ue = Ke({
|
|
548
|
+
lines: d(
|
|
549
|
+
() => g.value.map(({ pricingItemId: s, units: l }) => {
|
|
550
|
+
var w;
|
|
551
|
+
return {
|
|
552
|
+
pricingItemId: s,
|
|
553
|
+
priceType: (w = o.items.find((Y) => Y.pricingItemId === s)) == null ? void 0 : w.priceType,
|
|
554
|
+
units: l
|
|
555
|
+
};
|
|
556
|
+
})
|
|
557
|
+
)
|
|
558
|
+
}), he = Xe(
|
|
559
|
+
{
|
|
560
|
+
lines: {
|
|
561
|
+
$each: Ce.forEach({
|
|
562
|
+
units: {
|
|
563
|
+
orderable: Ce.withMessage(
|
|
564
|
+
() => a({
|
|
565
|
+
defaultMessage: "Enter a whole number of 1 or more.",
|
|
566
|
+
description: "Shown under the quantity of an on-demand order item that is not a whole number of 1 or more",
|
|
567
|
+
id: "charge_on_demand_modal.units_error"
|
|
568
|
+
}),
|
|
569
|
+
(s, l) => l.priceType !== "FLAT" || ea(s)
|
|
570
|
+
)
|
|
571
|
+
}
|
|
572
|
+
})
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
ue
|
|
576
|
+
), Q = d(() => he.value.lines.$invalid), ve = d(() => {
|
|
577
|
+
const { $errors: s = [] } = he.value.lines.$each.$response ?? {}, l = ue.lines.flatMap(({ pricingItemId: w }, Y) => {
|
|
578
|
+
var we, Me, Ee;
|
|
579
|
+
const U = (Ee = (Me = (we = s[Y]) == null ? void 0 : we.units) == null ? void 0 : Me[0]) == null ? void 0 : Ee.$message;
|
|
580
|
+
return U ? [[w, String(U)]] : [];
|
|
581
|
+
});
|
|
582
|
+
return l.length > 0 ? Object.fromEntries(l) : void 0;
|
|
583
|
+
}), pe = d(
|
|
584
|
+
() => g.value.length > 0 && !Q.value ? aa(g.value, o.items) : void 0
|
|
585
|
+
), { invoicePreview: ge, isPreviewPending: j, hasPreviewFailed: fe, loadPreview: Re } = ha({
|
|
586
|
+
pricingPlanScheduleId: d(() => o.scheduleId),
|
|
587
|
+
pricingItems: pe
|
|
588
|
+
}), Z = d(() => {
|
|
589
|
+
var s;
|
|
590
|
+
return (s = ge.value) == null ? void 0 : s.invoice_amount_including_tax;
|
|
591
|
+
}), {
|
|
592
|
+
isCharging: L,
|
|
593
|
+
chargedInvoice: z,
|
|
594
|
+
chargeError: B,
|
|
595
|
+
unpaidInvoiceId: ee,
|
|
596
|
+
charge: $e,
|
|
597
|
+
reset: Fe
|
|
598
|
+
} = Na({ pricingPlanScheduleId: d(() => o.scheduleId) }), Be = d(() => {
|
|
599
|
+
switch (B.value) {
|
|
600
|
+
case "PAYMENT_METHOD":
|
|
601
|
+
return a({
|
|
602
|
+
defaultMessage: "This payment method can't pay for this order. Choose another one.",
|
|
603
|
+
description: "Shown on the on-demand order when the chosen payment method cannot pay for it",
|
|
604
|
+
id: "charge_on_demand_modal.charge_error.payment_method"
|
|
605
|
+
});
|
|
606
|
+
case "PRICING_ITEMS":
|
|
607
|
+
return a({
|
|
608
|
+
defaultMessage: "Some items in your order can't be ordered as entered. Check your order and try again.",
|
|
609
|
+
description: "Shown on the on-demand order when an item, its quantity or its amount was not accepted",
|
|
610
|
+
id: "charge_on_demand_modal.charge_error.pricing_items"
|
|
611
|
+
});
|
|
612
|
+
case "SUBSCRIPTION_INACTIVE":
|
|
613
|
+
return a({
|
|
614
|
+
defaultMessage: "This subscription can't take orders right now.",
|
|
615
|
+
description: "Shown on the on-demand order when the subscription is not active, so nothing can be ordered on it",
|
|
616
|
+
id: "charge_on_demand_modal.charge_error.subscription_inactive"
|
|
617
|
+
});
|
|
618
|
+
default:
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
}), Ye = d(() => B.value === "SUBSCRIPTION_INACTIVE");
|
|
622
|
+
J(I, () => {
|
|
623
|
+
B.value === "PAYMENT_METHOD" && (B.value = void 0);
|
|
624
|
+
}), J(
|
|
625
|
+
g,
|
|
626
|
+
() => {
|
|
627
|
+
B.value === "PRICING_ITEMS" && (B.value = void 0);
|
|
628
|
+
},
|
|
629
|
+
{ deep: !0 }
|
|
630
|
+
);
|
|
631
|
+
const Ue = d(
|
|
632
|
+
() => fe.value ? a({
|
|
633
|
+
defaultMessage: "We couldn't calculate the total. Please try again.",
|
|
634
|
+
description: "Shown on the on-demand order when its total failed to load",
|
|
635
|
+
id: "charge_on_demand_modal.preview_error"
|
|
636
|
+
}) : void 0
|
|
637
|
+
), ae = d(
|
|
638
|
+
() => fe.value && !j.value && !L.value
|
|
639
|
+
), _e = d(
|
|
640
|
+
() => Be.value ?? Ue.value ?? D.value
|
|
641
|
+
), Ve = d(
|
|
642
|
+
() => _e.value || ve.value ? { form: _e.value, items: ve.value } : void 0
|
|
643
|
+
), K = d(() => r.value === "PLACED"), X = d(
|
|
644
|
+
() => !!z.value && ka(z.value)
|
|
645
|
+
), ye = d(() => r.value === "PAYMENT_FAILED" || r.value === "FAILED"), be = d(
|
|
646
|
+
() => !L.value && O.value && !Ye.value && g.value.length > 0 && !Q.value && !!I.value && !!Z.value && !j.value
|
|
647
|
+
), ze = d(() => r.value === "PLACED" ? a({
|
|
648
|
+
defaultMessage: "Order placed",
|
|
649
|
+
description: "Title of the on-demand order modal once the order is placed, paid or not",
|
|
650
|
+
id: "charge_on_demand_modal.placed.title"
|
|
651
|
+
}) : r.value === "PAYMENT_FAILED" ? a({
|
|
652
|
+
defaultMessage: "Payment not completed",
|
|
653
|
+
description: "Title of the on-demand order modal when the payment for the order could not be made",
|
|
654
|
+
id: "charge_on_demand_modal.payment_failed.title"
|
|
655
|
+
}) : r.value === "FAILED" ? a({
|
|
656
|
+
defaultMessage: "Something went wrong",
|
|
657
|
+
description: "Title of the on-demand order modal when the order failed and it is unknown whether it went through",
|
|
658
|
+
id: "charge_on_demand_modal.failed.title"
|
|
659
|
+
}) : t.value ? a({
|
|
660
|
+
defaultMessage: "Add payment method",
|
|
661
|
+
description: "Title of the on-demand order modal while the customer is adding a payment method",
|
|
662
|
+
id: "charge_on_demand_modal.add_payment_method.title"
|
|
663
|
+
}) : a({
|
|
664
|
+
defaultMessage: "Order on-demand items",
|
|
665
|
+
description: "Title of the modal for ordering the on-demand items of a subscription",
|
|
666
|
+
id: "charge_on_demand_modal.title"
|
|
667
|
+
})), He = d(() => r.value === "PLACED" ? X.value ? a({
|
|
668
|
+
defaultMessage: "Your order is paid. The invoice is in your invoice list.",
|
|
669
|
+
description: "Subtitle of the on-demand order modal once the order has been paid",
|
|
670
|
+
id: "charge_on_demand_modal.success.subtitle"
|
|
671
|
+
}) : a({
|
|
672
|
+
defaultMessage: "Your invoice was created, but it isn't paid yet. You'll find it in your invoice list.",
|
|
673
|
+
description: "Subtitle of the on-demand order modal when the order was placed but its invoice is not paid",
|
|
674
|
+
id: "charge_on_demand_modal.placed.unpaid.subtitle"
|
|
675
|
+
}) : r.value === "PAYMENT_FAILED" && ee.value ? a({
|
|
676
|
+
defaultMessage: "We couldn't take the payment for this order. Its invoice is in your invoice list, waiting to be paid.",
|
|
677
|
+
description: "Subtitle of the on-demand order modal when the order was placed but the payment for its invoice was refused",
|
|
678
|
+
id: "charge_on_demand_modal.payment_failed.unpaid_invoice.subtitle"
|
|
679
|
+
}) : r.value === "PAYMENT_FAILED" ? a({
|
|
680
|
+
defaultMessage: "We couldn't take the payment for this order. If an invoice was created, you'll find it in your invoice list.",
|
|
681
|
+
description: "Subtitle of the on-demand order modal when the payment for the order could not be made",
|
|
682
|
+
id: "charge_on_demand_modal.payment_failed.subtitle"
|
|
683
|
+
}) : r.value === "FAILED" ? a({
|
|
684
|
+
defaultMessage: "We couldn't complete your order. Check your invoice list before trying again.",
|
|
685
|
+
description: "Subtitle of the on-demand order modal when the order failed and it is unknown whether it went through",
|
|
686
|
+
id: "charge_on_demand_modal.failed.subtitle"
|
|
687
|
+
}) : t.value ? a({
|
|
688
|
+
defaultMessage: "Add a payment method to pay for this order.",
|
|
689
|
+
description: "Subtitle of the on-demand order modal while the customer is adding a payment method",
|
|
690
|
+
id: "charge_on_demand_modal.add_payment_method.subtitle"
|
|
691
|
+
}) : void 0), Ie = d(
|
|
692
|
+
() => t.value ? a({
|
|
693
|
+
defaultMessage: "Back",
|
|
694
|
+
description: "Leaves the add payment method step of the on-demand order modal for the order",
|
|
695
|
+
id: "charge_on_demand_modal.back_button.label"
|
|
696
|
+
}) : a({
|
|
697
|
+
defaultMessage: "Cancel",
|
|
698
|
+
description: "Closes the modal for ordering on-demand items",
|
|
699
|
+
id: "charge_on_demand_modal.cancel_button.label"
|
|
700
|
+
})
|
|
701
|
+
), H = d(() => K.value ? a({
|
|
702
|
+
defaultMessage: "Done",
|
|
703
|
+
description: "Closes the on-demand order modal once the order is placed",
|
|
704
|
+
id: "charge_on_demand_modal.done_button.label"
|
|
705
|
+
}) : ye.value ? a({
|
|
706
|
+
defaultMessage: "Close",
|
|
707
|
+
description: "Closes the on-demand order modal when the order did not go through",
|
|
708
|
+
id: "charge_on_demand_modal.close_button.label"
|
|
709
|
+
}) : t.value ? a({
|
|
710
|
+
defaultMessage: "Save payment method",
|
|
711
|
+
description: "Confirm button of the on-demand order modal while the customer is adding a payment method",
|
|
712
|
+
id: "charge_on_demand_modal.save_payment_method.label"
|
|
713
|
+
}) : g.value.length === 0 ? a({
|
|
714
|
+
defaultMessage: "Add an item to continue",
|
|
715
|
+
description: "Disabled pay button of the on-demand order while no item is added",
|
|
716
|
+
id: "charge_on_demand_modal.confirm_button.no_items"
|
|
717
|
+
}) : Q.value ? a({
|
|
718
|
+
defaultMessage: "Check the quantities to continue",
|
|
719
|
+
description: "Disabled pay button of the on-demand order while an item has a quantity that cannot be ordered",
|
|
720
|
+
id: "charge_on_demand_modal.confirm_button.invalid_units"
|
|
721
|
+
}) : ae.value ? a({
|
|
722
|
+
defaultMessage: "Calculate total again",
|
|
723
|
+
description: "Pay button of the on-demand order when its total failed to load",
|
|
724
|
+
id: "charge_on_demand_modal.confirm_button.retry_preview"
|
|
725
|
+
}) : !Z.value || j.value ? a({
|
|
726
|
+
defaultMessage: "Updating total…",
|
|
727
|
+
description: "Disabled pay button of the on-demand order while its total is calculated",
|
|
728
|
+
id: "charge_on_demand_modal.confirm_button.updating"
|
|
729
|
+
}) : a(
|
|
730
|
+
{
|
|
731
|
+
defaultMessage: "Pay {total}",
|
|
732
|
+
description: "Pay button of the on-demand order, with the total it charges",
|
|
733
|
+
id: "charge_on_demand_modal.confirm_button.pay"
|
|
734
|
+
},
|
|
735
|
+
{ total: Je(Z.value) }
|
|
736
|
+
)), Ge = async () => {
|
|
737
|
+
const s = pe.value;
|
|
738
|
+
if (!be.value || !s || !I.value)
|
|
739
|
+
return;
|
|
740
|
+
const l = await $e({
|
|
741
|
+
pricingItems: s,
|
|
742
|
+
paymentMethodId: I.value
|
|
743
|
+
});
|
|
744
|
+
"invoice" in l ? (y("invoice-created", l.invoice), r.value = "PLACED") : Oa(l.error) || (r.value = l.error);
|
|
745
|
+
}, te = () => {
|
|
746
|
+
if (t.value) {
|
|
747
|
+
W();
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
if (ae.value) {
|
|
751
|
+
Re();
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
Ge();
|
|
755
|
+
}, ne = () => {
|
|
756
|
+
y("close");
|
|
757
|
+
}, de = d(
|
|
758
|
+
() => K.value && !X.value && o.canViewCreatedInvoice
|
|
759
|
+
), oe = d(
|
|
760
|
+
() => r.value === "PAYMENT_FAILED" && !!ee.value && o.canViewCreatedInvoice
|
|
761
|
+
), ie = d(
|
|
762
|
+
() => a({
|
|
763
|
+
defaultMessage: "Go to invoice",
|
|
764
|
+
description: "Opens the invoice of the on-demand order the customer just placed",
|
|
765
|
+
id: "charge_on_demand_modal.view_invoice_button.label"
|
|
766
|
+
})
|
|
767
|
+
), se = () => {
|
|
768
|
+
var l;
|
|
769
|
+
const s = ((l = z.value) == null ? void 0 : l.id) ?? ee.value;
|
|
770
|
+
ne(), s && y("view-invoice", s);
|
|
771
|
+
}, re = () => {
|
|
772
|
+
if (!(f.value || L.value)) {
|
|
773
|
+
if (K.value) {
|
|
774
|
+
ne();
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
if (t.value) {
|
|
778
|
+
$();
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
y("close");
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
return J(
|
|
785
|
+
() => o.showModal,
|
|
786
|
+
(s) => {
|
|
787
|
+
s && (r.value = "ORDER", g.value = [], u.value = void 0, Fe(), D.value = void 0);
|
|
788
|
+
}
|
|
789
|
+
), (s, l) => (i(), h(va, {
|
|
790
|
+
ref_key: "addPaymentMethodRef",
|
|
791
|
+
ref: T,
|
|
792
|
+
class: "sv-charge-on-demand-modal",
|
|
793
|
+
"show-modal": e.showModal,
|
|
794
|
+
title: ze.value,
|
|
795
|
+
"sub-title": He.value,
|
|
796
|
+
"cancel-button-text": Ie.value,
|
|
797
|
+
"confirm-button-text": H.value,
|
|
798
|
+
"is-pending": n(f) || n(L),
|
|
799
|
+
panes: n(Da),
|
|
800
|
+
step: r.value,
|
|
801
|
+
"add-payment-method-pane": "ADD_PAYMENT_METHOD",
|
|
802
|
+
customer: e.customer,
|
|
803
|
+
"payment-method-options": Se.value,
|
|
804
|
+
"is-payment-method-options-pending": n(F),
|
|
805
|
+
"is-adding-payment-method": n(t),
|
|
806
|
+
onConfirm: te,
|
|
807
|
+
onCancel: re,
|
|
808
|
+
onPaymentSuccess: xe,
|
|
809
|
+
onPaymentFailed: l[2] || (l[2] = (w) => s.$emit("payment-failed", w))
|
|
810
|
+
}, {
|
|
811
|
+
ORDER: c(() => [
|
|
812
|
+
O.value ? (i(), h(n(Ca), {
|
|
813
|
+
key: 0,
|
|
814
|
+
selection: g.value,
|
|
815
|
+
"onUpdate:selection": l[0] || (l[0] = (w) => g.value = w),
|
|
816
|
+
"payment-method-id": I.value,
|
|
817
|
+
"onUpdate:paymentMethodId": l[1] || (l[1] = (w) => I.value = w),
|
|
818
|
+
class: "sv-charge-on-demand-modal__form",
|
|
819
|
+
items: e.items,
|
|
820
|
+
preview: n(ge),
|
|
821
|
+
"is-preview-loading": n(j),
|
|
822
|
+
"payment-methods": N.value,
|
|
823
|
+
errors: Ve.value,
|
|
824
|
+
disabled: n(L),
|
|
825
|
+
"can-add-payment-method": "",
|
|
826
|
+
onAddPaymentMethod: Le
|
|
827
|
+
}, null, 8, ["selection", "payment-method-id", "items", "preview", "is-preview-loading", "payment-methods", "errors", "disabled"])) : (i(), h(ta, {
|
|
828
|
+
key: 1,
|
|
829
|
+
class: "sv-charge-on-demand-modal__unavailable",
|
|
830
|
+
icon: "credit_card_off"
|
|
831
|
+
}, {
|
|
832
|
+
title: c(() => [
|
|
833
|
+
v(p(n(a)({
|
|
834
|
+
defaultMessage: "Ordering isn't available",
|
|
835
|
+
description: "Title shown instead of the on-demand order form when the subscription cannot take payments",
|
|
836
|
+
id: "charge_on_demand_modal.unavailable.title"
|
|
837
|
+
})), 1)
|
|
838
|
+
]),
|
|
839
|
+
message: c(() => [
|
|
840
|
+
v(p(n(a)({
|
|
841
|
+
defaultMessage: "This subscription can't take payments here. Contact us to order these items.",
|
|
842
|
+
description: "Message shown instead of the on-demand order form when the subscription cannot take payments",
|
|
843
|
+
id: "charge_on_demand_modal.unavailable.message"
|
|
844
|
+
})), 1)
|
|
845
|
+
]),
|
|
846
|
+
_: 1
|
|
847
|
+
}))
|
|
848
|
+
]),
|
|
849
|
+
PLACED: c(() => [
|
|
850
|
+
n(z) ? (i(), h(n(la), {
|
|
851
|
+
key: 0,
|
|
852
|
+
class: "sv-charge-on-demand-modal__receipt",
|
|
853
|
+
"content-background": "none"
|
|
854
|
+
}, {
|
|
855
|
+
default: c(() => [
|
|
856
|
+
b(n(ke), {
|
|
857
|
+
invoice: n(z),
|
|
858
|
+
"is-customer-facing": "",
|
|
859
|
+
"is-paid": X.value
|
|
860
|
+
}, null, 8, ["invoice", "is-paid"])
|
|
861
|
+
]),
|
|
862
|
+
_: 1
|
|
863
|
+
})) : M("", !0)
|
|
864
|
+
]),
|
|
865
|
+
footer: c(() => [
|
|
866
|
+
K.value ? (i(), C("div", Sa, [
|
|
867
|
+
de.value ? (i(), h(n(P), {
|
|
868
|
+
key: 0,
|
|
869
|
+
size: "lg",
|
|
870
|
+
class: "sv-action sv-action--primary",
|
|
871
|
+
"data-testid": "charge-on-demand-view-invoice",
|
|
872
|
+
onClick: se
|
|
873
|
+
}, {
|
|
874
|
+
default: c(() => [
|
|
875
|
+
v(p(ie.value), 1)
|
|
876
|
+
]),
|
|
877
|
+
_: 1
|
|
878
|
+
})) : M("", !0),
|
|
879
|
+
b(n(P), {
|
|
880
|
+
size: "lg",
|
|
881
|
+
intent: de.value ? "subtle" : "primary",
|
|
882
|
+
class: G([
|
|
883
|
+
"sv-action",
|
|
884
|
+
de.value ? "sv-action--secondary" : "sv-action--primary"
|
|
885
|
+
]),
|
|
886
|
+
"data-testid": "charge-on-demand-done",
|
|
887
|
+
onClick: ne
|
|
888
|
+
}, {
|
|
889
|
+
default: c(() => [
|
|
890
|
+
v(p(H.value), 1)
|
|
891
|
+
]),
|
|
892
|
+
_: 1
|
|
893
|
+
}, 8, ["intent", "class"]),
|
|
894
|
+
X.value && e.canViewCreatedInvoice ? (i(), h(n(P), {
|
|
895
|
+
key: 1,
|
|
896
|
+
size: "lg",
|
|
897
|
+
intent: "subtle",
|
|
898
|
+
class: "sv-action sv-action--secondary",
|
|
899
|
+
"data-testid": "charge-on-demand-view-invoice",
|
|
900
|
+
onClick: se
|
|
901
|
+
}, {
|
|
902
|
+
default: c(() => [
|
|
903
|
+
v(p(ie.value), 1)
|
|
904
|
+
]),
|
|
905
|
+
_: 1
|
|
906
|
+
})) : M("", !0)
|
|
907
|
+
])) : ye.value ? (i(), C("div", La, [
|
|
908
|
+
oe.value ? (i(), h(n(P), {
|
|
909
|
+
key: 0,
|
|
910
|
+
size: "lg",
|
|
911
|
+
class: "sv-action sv-action--primary",
|
|
912
|
+
"data-testid": "charge-on-demand-view-invoice",
|
|
913
|
+
onClick: se
|
|
914
|
+
}, {
|
|
915
|
+
default: c(() => [
|
|
916
|
+
v(p(ie.value), 1)
|
|
917
|
+
]),
|
|
918
|
+
_: 1
|
|
919
|
+
})) : M("", !0),
|
|
920
|
+
b(n(P), {
|
|
921
|
+
size: "lg",
|
|
922
|
+
intent: oe.value ? "subtle" : "primary",
|
|
923
|
+
class: G([
|
|
924
|
+
"sv-action",
|
|
925
|
+
oe.value ? "sv-action--secondary" : "sv-action--primary"
|
|
926
|
+
]),
|
|
927
|
+
"data-testid": "charge-on-demand-close",
|
|
928
|
+
onClick: re
|
|
929
|
+
}, {
|
|
930
|
+
default: c(() => [
|
|
931
|
+
v(p(H.value), 1)
|
|
932
|
+
]),
|
|
933
|
+
_: 1
|
|
934
|
+
}, 8, ["intent", "class"])
|
|
935
|
+
])) : (i(), C("div", xa, [
|
|
936
|
+
n(t) ? (i(), h(n(P), {
|
|
937
|
+
key: 0,
|
|
938
|
+
size: "lg",
|
|
939
|
+
class: "sv-action sv-action--primary",
|
|
940
|
+
"data-testid": "charge-on-demand-save-payment-method",
|
|
941
|
+
loading: n(f),
|
|
942
|
+
onClick: te
|
|
943
|
+
}, {
|
|
944
|
+
default: c(() => [
|
|
945
|
+
v(p(H.value), 1)
|
|
946
|
+
]),
|
|
947
|
+
_: 1
|
|
948
|
+
}, 8, ["loading"])) : O.value ? (i(), h(n(P), {
|
|
949
|
+
key: 1,
|
|
950
|
+
size: "lg",
|
|
951
|
+
class: "sv-action sv-action--primary",
|
|
952
|
+
"data-testid": "charge-on-demand-confirm",
|
|
953
|
+
disabled: !be.value && !ae.value,
|
|
954
|
+
loading: n(L),
|
|
955
|
+
onClick: te
|
|
956
|
+
}, {
|
|
957
|
+
default: c(() => [
|
|
958
|
+
v(p(H.value), 1)
|
|
959
|
+
]),
|
|
960
|
+
_: 1
|
|
961
|
+
}, 8, ["disabled", "loading"])) : M("", !0),
|
|
962
|
+
b(n(P), {
|
|
963
|
+
size: "lg",
|
|
964
|
+
intent: "subtle",
|
|
965
|
+
class: "sv-action sv-action--secondary",
|
|
966
|
+
"data-testid": "charge-on-demand-cancel",
|
|
967
|
+
disabled: n(L),
|
|
968
|
+
onClick: re
|
|
969
|
+
}, {
|
|
970
|
+
default: c(() => [
|
|
971
|
+
v(p(Ie.value), 1)
|
|
972
|
+
]),
|
|
973
|
+
_: 1
|
|
974
|
+
}, 8, ["disabled"])
|
|
975
|
+
]))
|
|
976
|
+
]),
|
|
977
|
+
_: 1
|
|
978
|
+
}, 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"]));
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
export {
|
|
982
|
+
Za as default
|
|
983
|
+
};
|