@solvimon/solvimon-web 0.1.0-alpha.26 → 0.1.0-alpha.27
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 +12 -10
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DwbIiJBY.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-081H9T3X.js} +1 -1
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DcrLNA_x.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DNepCMRp.mjs} +6 -6
- package/dist/{Avatar.vue.es-Bm6MCMAL.js → Avatar.vue.es-BJxSCU76.js} +1 -1
- package/dist/{Avatar.vue.es-BqQHvLGA.mjs → Avatar.vue.es-sfMZiX7A.mjs} +1 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BV5iEOxn.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BFza7Nf9.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DmY3a-Wi.mjs} +14 -15
- package/dist/{Button.vue.es-qGvnOKnK.js → Button.vue.es-BzkuglKw.js} +1 -1
- package/dist/{Button.vue.es-C32_baQN.mjs → Button.vue.es-Cmjfm4jw.mjs} +1 -1
- package/dist/{ChargeOnDemandModal-CIiI74ls.mjs → ChargeOnDemandModal-CB4mrvkU.mjs} +145 -153
- package/dist/{ChargeOnDemandModal-DIQaGnRs.js → ChargeOnDemandModal-b17YswWA.js} +1 -1
- package/dist/Checkout.entry.ce-HlUrJ1kh.js +2 -0
- package/dist/Checkout.entry.ce-X2zGo6hG.mjs +4381 -0
- package/dist/{Chip.vue.es-D60gTbfe.js → Chip.vue.es-B2jjzIOc.js} +1 -1
- package/dist/{Chip.vue.es-CKCOY5T6.mjs → Chip.vue.es-DksjbJO8.mjs} +2 -2
- package/dist/{ContextMenu.vue.es-C7KI8Gz6.js → ContextMenu.vue.es-DUU43tCy.js} +1 -1
- package/dist/{ContextMenu.vue.es-Da-lAmTl.mjs → ContextMenu.vue.es-zRvoEJlV.mjs} +4 -4
- package/dist/{CustomerBillingInformation.vue.es-bFUx81Ig.js → CustomerBillingInformation.vue.es-BfPEB42w.js} +1 -1
- package/dist/{CustomerBillingInformation.vue.es-BxBQt4Q0.mjs → CustomerBillingInformation.vue.es-DhFbpZPK.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BcTZgshS.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B41la-T7.mjs} +14 -15
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C0lJ_ESU.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BISD6n8X.js} +1 -1
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DssxYPSA.mjs} +110 -123
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-XufY6bdV.js +1 -0
- package/dist/{DividerText.vue.es-BF3gnr4e.js → DividerText.vue.es-CoyDk9eH.js} +1 -1
- package/dist/{DividerText.vue.es-DKl3FnDJ.mjs → DividerText.vue.es-nAo1eRMV.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-QW9NdxyZ.mjs} +4 -4
- package/dist/{ErrorNotification.vue.es-rRKgmkzV.mjs → ErrorNotification.vue.es-h-D37rfG.mjs} +1 -1
- package/dist/{ErrorNotification.vue.es-BX9dHEc-.js → ErrorNotification.vue.es-tS9vySUZ.js} +1 -1
- package/dist/{IconButton.vue.es-Bwdfu-jm.js → IconButton.vue.es-DgQN18Am.js} +1 -1
- package/dist/{IconButton.vue.es-UlqwNPAX.mjs → IconButton.vue.es-DvfErUOq.mjs} +2 -2
- package/dist/{IconTitle.vue.es-CK9k69tV.mjs → IconTitle.vue.es-B_8bS0tn.mjs} +3 -3
- package/dist/{IconTitle.vue.es-Cei98MBw.js → IconTitle.vue.es-Dn2xcPHj.js} +1 -1
- package/dist/{Input.vue.es-B47l_feL.js → Input.vue.es-B60eK8Ds.js} +1 -1
- package/dist/{Input.vue.es-D9IjIWc-.mjs → Input.vue.es-CU9u5yKH.mjs} +2 -2
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DKlPrxQS.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dqdezse7.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DUfJl07Y.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-gpMtYNzn.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DlJ6lELc.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-Cl6HU243.js} +1 -1
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-D9Rtgapa.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DNqawlYV.mjs} +2 -2
- package/dist/{InvoiceSummary.vue.es-DBnR9Hs7.js → InvoiceSummary.vue.es-CAmA8g0t.js} +1 -1
- package/dist/{InvoiceSummary.vue.es-DQ4KvTaw.mjs → InvoiceSummary.vue.es-CRiFJ5x-.mjs} +7 -7
- package/dist/{Modal.vue.es-B9xMiyn3.mjs → Modal.vue.es-BeI5C9-9.mjs} +5 -5
- package/dist/{Modal.vue.es-8LN4gBh0.js → Modal.vue.es-DvLB3uCG.js} +1 -1
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-B1yGKkWN.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dg4rn1cm.js} +1 -1
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-BVzL2PGe.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DqHcOnZp.mjs} +5 -6
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js} +1 -1
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-nLTPnH4j.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DlqoWKQq.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-Ds93gNvh.js → PaymentHistoryBlock-Uw8xeKUk.js} +1 -1
- package/dist/{PaymentHistoryBlock-DYa99P1M.mjs → PaymentHistoryBlock-mCqdFjnL.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CBZhXQfC.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-ALI5f0py.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D0KnSy0y.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DxaY3eFN.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-B_Db4DG1.js → PaymentIntegrationForm-Cx0zCf_C.js} +1 -1
- package/dist/{PaymentIntegrationForm-UWoyZgsR.mjs → PaymentIntegrationForm-DVx4DEtD.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B-viSd_i.js +1 -0
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-J15IDbMc.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCKCXXZX.mjs} +4 -4
- package/dist/PaymentIntegrationFormAdyen-B-v-4nlj.js +98 -0
- package/dist/{PaymentIntegrationFormAdyen-D4qfNtZ_.mjs → PaymentIntegrationFormAdyen-Yr8p5Fly.mjs} +16 -20
- package/dist/{PaymentIntegrationFormStripe-DUCJTIAq.js → PaymentIntegrationFormStripe-CoLmAzas.js} +3 -3
- package/dist/{PaymentIntegrationFormStripe-BIiMCWlV.mjs → PaymentIntegrationFormStripe-Ds0BXt89.mjs} +5 -5
- package/dist/{PaymentMethod.vue.es-CKu5nApX.mjs → PaymentMethod.vue.es-4YRmQZHX.mjs} +3 -3
- package/dist/{PaymentMethod.vue.es-CJcSZ9lN.js → PaymentMethod.vue.es-D0D9jW8s.js} +1 -1
- package/dist/{PaymentMethodForm-1d0YIGOu.js → PaymentMethodForm-CMP5FLRO.js} +1 -1
- package/dist/{PaymentMethodForm-B05sHWcW.mjs → PaymentMethodForm-Dnj_7mJU.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-D1yIYsb_.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DsD3UjkC.mjs} +33 -35
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-BDm8l_6N.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-nxnGyJmE.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-BE4S26JX.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIrrQUS6.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DGpXRtp4.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CjECKNi_.mjs} +6 -6
- package/dist/PlanCustomizationEditor-DS1r2vBO.js +1 -0
- package/dist/{PlanCustomizationEditor-CpZeilm5.mjs → PlanCustomizationEditor-DlVSCKGN.mjs} +234 -206
- package/dist/{PricingGroupRangeInput.vue.es-CJpvUP3-.mjs → PricingGroupRangeInput.vue.es-BhNcjD7z.mjs} +4 -4
- package/dist/{PricingGroupRangeInput.vue.es-DZSJ5Mz0.js → PricingGroupRangeInput.vue.es-VoOTnHjk.js} +1 -1
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DJ81eUJX.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CmJITenR.mjs} +6 -6
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-jrkraJMu.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-hS6A-KcP.js} +1 -1
- package/dist/{RadioGroupExtended.vue.es-BalV7gwp.mjs → RadioGroupExtended.vue.es-9YzXzZF0.mjs} +2 -2
- package/dist/{RadioGroupExtended.vue.es-Dt6LH9Yh.js → RadioGroupExtended.vue.es-DlbURHQN.js} +1 -1
- package/dist/{Section.vue.es-zVXBHAL6.js → Section.vue.es-Bbt0RITt.js} +1 -1
- package/dist/{Section.vue.es-D7eiXUbk.mjs → Section.vue.es-DVEpre9O.mjs} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BdjYFrVC.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DudMRVka.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xzjqB-v-.mjs} +6 -6
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CJWE7wVi.mjs +41 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js +1 -0
- package/dist/{StepInput.vue.es-mAnuCuDQ.js → StepInput.vue.es-H-3R4jJq.js} +1 -1
- package/dist/{StepInput.vue.es-C3Zm6Wc9.mjs → StepInput.vue.es-o-3Lg4Ai.mjs} +4 -4
- package/dist/{SubscriptionDetails.entry.ce-WEimiOex.mjs → SubscriptionDetails.entry.ce-CGl6Z5ql.mjs} +22 -22
- package/dist/{SubscriptionDetails.entry.ce-D4CsSoR9.js → SubscriptionDetails.entry.ce-CQUO_uXH.js} +1 -1
- package/dist/{SubscriptionSchedules-DrrEAPlx.mjs → SubscriptionSchedules-DuWZmnD2.mjs} +1 -1
- package/dist/{SubscriptionSchedules-Cm5Dt-1H.js → SubscriptionSchedules-Dy0fUgx5.js} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DHp_KtbF.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C1kTiW-H.mjs} +11 -11
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-t2Awijf5.js → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dd_Rr6qn.js} +1 -1
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-B41qZmcL.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js} +1 -1
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CsekphtV.mjs} +2 -2
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Bu-_clEa.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-B4j8Clbj.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DFU0IULg.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BsdevoeT.mjs} +8 -9
- package/dist/{TooltipParagraph.vue.es-BXbOJmjr.mjs → TooltipParagraph.vue.es-B9A17aG7.mjs} +1 -1
- package/dist/{TooltipParagraph.vue.es-Cph6zT31.js → TooltipParagraph.vue.es-DvC5Wjaz.js} +1 -1
- package/dist/{TrialChip.vue.es-C_wgHGuN.js → TrialChip.vue.es-CLQZ5F0n.js} +1 -1
- package/dist/{TrialChip.vue.es-C_yRujip.mjs → TrialChip.vue.es-Dmv3lPiQ.mjs} +2 -2
- package/dist/{cn.es-D9YMDvG2.js → cn.es-C9Yqq4tg.js} +1 -1
- package/dist/{cn.es-CGa6b2Lt.mjs → cn.es-Cvt6TIwv.mjs} +2 -2
- 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 +6 -6
- 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 +9 -9
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +15 -16
- 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 +14 -15
- 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-D5DAoHRI.mjs → customElements-B58FcXIN.mjs} +5 -5
- package/dist/{customElements-C963-LtW.js → customElements-DUMRMFQ5.js} +2 -2
- package/dist/{customer-DKa1B2vp.mjs → customer-B3LPAhaD.mjs} +1 -1
- package/dist/{customer-TE1FnGT0.js → customer-CisTPaXj.js} +1 -1
- package/dist/{de-DE-CLfzTbbX.mjs → de-DE-DKp5LCu0.mjs} +15 -1
- package/dist/de-DE-DL74pMLb.js +1 -0
- package/dist/en-US-B2XFj-_p.js +1 -0
- package/dist/{en-US-D6SGRAch.mjs → en-US-DQ5vlv9Z.mjs} +15 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{invoices-DJTwftJv.mjs → invoices-3520M5AN.mjs} +1 -1
- package/dist/{invoices-ClqTWYF9.js → invoices-CKQBLar2.js} +1 -1
- package/dist/{it-IT-Cym1UvvK.mjs → it-IT-BgFVsO5S.mjs} +15 -1
- package/dist/it-IT-CqNK62qe.js +1 -0
- package/dist/nl-NL-Dx-TNXQ1.js +1 -0
- package/dist/{nl-NL-D0c4x5C0.mjs → nl-NL-UiRWbO9S.mjs} +15 -1
- package/dist/{paymentMethods-CWzJhcWK.mjs → paymentMethods-CWlvwK5V.mjs} +1 -1
- package/dist/{paymentMethods-AL2U_byg.js → paymentMethods-Cw-i95mM.js} +1 -1
- package/dist/{payments-aXyfylwk.mjs → payments-2qeQdpiW.mjs} +1 -1
- package/dist/{payments-BmiHMlQt.js → payments-CS7_YcOW.js} +1 -1
- package/dist/pricing-BIMpDI_p.mjs +29 -0
- package/dist/pricing-BOqG21f9.js +1 -0
- package/dist/{pricingPlanSchedules-BfsMSvN0.js → pricingPlanSchedules-B_sTAIgU.js} +1 -1
- package/dist/{pricingPlanSchedules-BD4GIP_F.mjs → pricingPlanSchedules-ChQCbMfe.mjs} +1 -1
- 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 +12 -12
- 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 +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +20 -20
- package/dist/{subscriptions-cnR5fnf7.mjs → subscriptions-DcfcBYAq.mjs} +1 -1
- package/dist/{subscriptions-Cm83ckfl.js → subscriptions-DwVsf4Ev.js} +1 -1
- package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +9 -5
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -1
- package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +5 -1
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +1 -1
- package/dist/{useActionDispatchProvider-DDYqIh3r.mjs → useActionDispatchProvider-B3AvkLL2.mjs} +1 -1
- package/dist/{useActionDispatchProvider-CHkVQMaE.js → useActionDispatchProvider-DFhppdve.js} +1 -1
- package/dist/{useCustomer-XZKWsolE.mjs → useCustomer-B-jyJIVy.mjs} +1 -1
- package/dist/{useCustomer-DGYtowRy.js → useCustomer-BwZKd9i5.js} +1 -1
- package/dist/{useCustomerFormLabels-CcnkJLcB.mjs → useCustomerFormLabels-BQk3d9PZ.mjs} +5 -5
- package/dist/{useCustomerFormLabels-DAZziqYt.js → useCustomerFormLabels-DV9QiMYh.js} +1 -1
- package/dist/useExperimentalFeature-BciA3Ok9.mjs +135 -0
- package/dist/useExperimentalFeature-CGIkgFR4.js +1 -0
- package/dist/{useInvoiceData-BEK-7msA.mjs → useInvoiceData-BocKdeg7.mjs} +2 -2
- package/dist/{useInvoiceData-CQRn8l9C.js → useInvoiceData-CNV_FMV8.js} +1 -1
- package/dist/{useInvoicesList-C4I118KM.mjs → useInvoicesList-C8nsXMJ6.mjs} +7 -7
- package/dist/{useInvoicesList-BQkKyyXa.js → useInvoicesList-S0IbQcrD.js} +1 -1
- package/dist/{useLoadInitialData-CR0kbYw8.mjs → useLoadInitialData-D9GkzY8t.mjs} +1 -1
- package/dist/{useLoadInitialData-CrKnBZs_.js → useLoadInitialData-D_R6Jy1s.js} +1 -1
- package/dist/usePaymentMethodAvailability-BO_guwAw.js +1 -0
- package/dist/{usePaymentMethodAvailability-ZH-m3B-A.mjs → usePaymentMethodAvailability-DAcsKGeh.mjs} +13 -14
- package/dist/{usePaymentMethodOptions-Ciifjo6c.mjs → usePaymentMethodOptions-1vRAo6Ib.mjs} +1 -1
- package/dist/{usePaymentMethodOptions-Cqe92ZBn.js → usePaymentMethodOptions-CuzOoi2k.js} +1 -1
- package/dist/{usePaymentMethods-B-OKRyKd.mjs → usePaymentMethods-CbwnGONc.mjs} +1 -1
- package/dist/{usePaymentMethods-BKwrl82-.js → usePaymentMethods-DDaTZQZp.js} +1 -1
- package/dist/{usePayments-CV85OV8V.mjs → usePayments-Cr6NlGaW.mjs} +6 -6
- package/dist/{usePayments-Bauj16B-.js → usePayments-DDSjo0rH.js} +1 -1
- package/dist/{usePortal-DSLImEfr.js → usePortal-C27omjhz.js} +1 -1
- package/dist/{usePortal-H8Tv2TnZ.mjs → usePortal-C5AsegpS.mjs} +1 -1
- package/dist/{useSubscription-DqnxWNKg.mjs → useSubscription-BZJL0VOA.mjs} +1 -1
- package/dist/{useSubscription-BiYNJT2e.js → useSubscription-D787IXY-.js} +1 -1
- package/dist/{useTimePeriod.es-B22-fno3.mjs → useTimePeriod.es-DWLsLFqs.mjs} +1 -1
- package/dist/{useTimePeriod.es-D2aiyfd-.js → useTimePeriod.es-rzxqUCTu.js} +1 -1
- package/package.json +10 -7
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-0JHnqIpC.js +0 -1
- package/dist/Checkout.entry.ce-8EcavNgT.js +0 -2
- package/dist/Checkout.entry.ce-BA5ljKj8.mjs +0 -3924
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C0J37ZVe.js +0 -1
- package/dist/PaymentIntegrationFormAdyen-HeA9XIj-.js +0 -98
- package/dist/PlanCustomizationEditor-CEMP_Dhz.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs +0 -51
- package/dist/adyen-CvsH5fok.mjs +0 -117
- package/dist/adyen-Druit6gz.js +0 -1
- package/dist/de-DE-DaBBl-Ak.js +0 -1
- package/dist/en-US-BNevqm0M.js +0 -1
- package/dist/it-IT-BkPbTueL.js +0 -1
- package/dist/nl-NL-jIfAVGv0.js +0 -1
- package/dist/pricing-BVAld27Y.js +0 -1
- package/dist/pricing-DLOeiAIB.mjs +0 -16
- package/dist/useExperimentalFeature-COOU6IZd.js +0 -1
- package/dist/useExperimentalFeature-ierhOt9Q.mjs +0 -6
- package/dist/usePaymentMethodAvailability-Ci6LeYKt.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as f, openBlock as i, createElementBlock as h, createElementVNode as b, createVNode as c, unref as t, withCtx as m, createTextVNode as u, toDisplayString as _, createBlock as p, createCommentVNode as g, renderSlot as M, ref as C, normalizeProps as A, guardReactiveProps as j } from "vue";
|
|
2
|
-
import { _ as S } from "../../Button.vue.es-
|
|
3
|
-
import { _ as k } from "../../Section.vue.es-
|
|
4
|
-
import { _ as v, a as P, d as L, e as w } from "../../customElements-
|
|
2
|
+
import { _ as S } from "../../Button.vue.es-Cmjfm4jw.mjs";
|
|
3
|
+
import { _ as k } from "../../Section.vue.es-DVEpre9O.mjs";
|
|
4
|
+
import { _ as v, a as P, d as L, e as w } from "../../customElements-B58FcXIN.mjs";
|
|
5
5
|
import { C as D } from "../../ContentWithAsideLayout-BCM8tmZN.mjs";
|
|
6
|
-
import { _ as T } from "../../PaymentMethodsList.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as B } from "../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as I } from "../../useCustomer-
|
|
9
|
-
import { u as N } from "../../usePaymentMethods-
|
|
10
|
-
import { u as x } from "../../usePaymentMethodOptions-
|
|
11
|
-
import { u as E } from "../../useLoadInitialData-
|
|
6
|
+
import { _ as T } from "../../PaymentMethodsList.vue_vue_type_script_setup_true_lang-CjECKNi_.mjs";
|
|
7
|
+
import { _ as B } from "../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-DsD3UjkC.mjs";
|
|
8
|
+
import { u as I } from "../../useCustomer-B-jyJIVy.mjs";
|
|
9
|
+
import { u as N } from "../../usePaymentMethods-CbwnGONc.mjs";
|
|
10
|
+
import { u as x } from "../../usePaymentMethodOptions-1vRAo6Ib.mjs";
|
|
11
|
+
import { u as E } from "../../useLoadInitialData-D9GkzY8t.mjs";
|
|
12
12
|
import { a as F } from "../../sessionReference-3h-6FdrC.mjs";
|
|
13
13
|
const R = { class: "grid gap-4 sm:grid-cols-1 md:grid-cols-2" }, V = { key: 0 }, z = /* @__PURE__ */ f({
|
|
14
14
|
__name: "ScreenTitle",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../SubscriptionDetails.entry.ce-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../SubscriptionDetails.entry.ce-CQUO_uXH.js");require("../../customElements-DUMRMFQ5.js");exports.defineSolvimonSubscriptionDetails=e.defineSolvimonSubscriptionDetails;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as r } from "../../SubscriptionDetails.entry.ce-
|
|
2
|
-
import "../../customElements-
|
|
1
|
+
import { d as r } from "../../SubscriptionDetails.entry.ce-CGl6Z5ql.mjs";
|
|
2
|
+
import "../../customElements-B58FcXIN.mjs";
|
|
3
3
|
export {
|
|
4
4
|
r as defineSolvimonSubscriptionDetails
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),A=require("../../Button.vue.es-qGvnOKnK.js"),L=require("../../ErrorNotification.vue.es-BX9dHEc-.js"),p=require("../../customElements-C963-LtW.js"),Y=require("../../ContentWithAsideLayout-RSdKXqAf.js"),K=require("../../useActionDispatchProvider-CHkVQMaE.js"),H=require("../../usePortal-DSLImEfr.js"),J=require("../../useSubscription-BiYNJT2e.js"),Q=require("../../useCustomer-DGYtowRy.js"),X=require("../../usePaymentMethods-BKwrl82-.js"),Z=require("../../usePaymentMethodOptions-Cqe92ZBn.js"),ee=require("../../useLoadInitialData-CrKnBZs_.js"),te=require("../../invoices-ClqTWYF9.js"),V=require("../../pricingPlanSchedule-BM8vsKkV.js"),ne=require("../../pricingPlanSchedules-BfsMSvN0.js"),ie=require("../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BdjYFrVC.js"),oe=require("../../Divider.vue.es-UwnWvUTl.js"),ae=require("../../PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-jrkraJMu.js"),T=require("../../AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DwbIiJBY.js"),se=require("../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js"),re=require("../../Section.vue.es-zVXBHAL6.js"),j=require("../../Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js"),ce=require("../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js"),ue=require("../../Modal.vue.es-8LN4gBh0.js"),le=require("../../sessionReference-m_6Rp4X1.js");function de(){const{getInvoicePreview:n}=te.createInvoicesService(),u=p.useLogger(),t=e.ref(),c=e.ref(!1),l=e.ref(),g=p.createLatestGuard();return{invoice:t,isPending:c,error:l,load:async({subscription:s,enabledPricingIds:f})=>{const o=V.getScheduleCustomizations({enabledPricings:f.map(d=>({pricing_id:d})),pricingPlanScheduleInfos:s.pricing_plan_schedule_infos});if(!o){t.value=void 0;return}const i=g();c.value=!0,l.value=void 0;try{const d=await n({forExistingSubscription:!0,pricingPlanSubscriptionId:s.id,customizations:o});if(!i())return;t.value=d.invoice}catch(d){if(!i())return;u.error("INVOICE_PREVIEW_FAILED","Failed to load the invoice preview",{preview:"SUBSCRIPTION_UPGRADE"},d),l.value=d,t.value=void 0}finally{i()&&(c.value=!1)}}}}const me={class:"sv-subscription-management-form__body grid grid-cols-1 gap-4"},pe=e.defineComponent({__name:"SubscriptionManagementForm",props:e.mergeModels({pricingGroup:{type:Object},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},billingPeriod:{type:Object},currency:{type:String},disabled:{type:Boolean}},{enabledPricingIds:{required:!0},enabledPricingIdsModifiers:{},paymentMethodId:{},paymentMethodIdModifiers:{}}),emits:e.mergeModels(["add-payment-method"],["update:enabledPricingIds","update:paymentMethodId"]),setup(n,{emit:u}){const t=n,c=u,l=e.useModel(n,"enabledPricingIds"),g=e.useModel(n,"paymentMethodId"),{$t:_}=p.useIntl(),s=o=>{const i=o?Date.parse(o):NaN;return Number.isFinite(i)?i:0},f=e.computed(()=>[...t.paymentMethods??[]].sort((o,i)=>s(i.created_at)-s(o.created_at)));return e.watch(()=>t.paymentMethods,(o,i)=>{var P;const d=o==null?void 0:o.find(({id:b})=>!(i!=null&&i.some(B=>B.id===b)));if(d&&(i!=null&&i.length)){g.value=d.id;return}o!=null&&o.some(({id:b})=>b===g.value)||(g.value=(P=(o==null?void 0:o.find(({is_default:b})=>b))??f.value[0])==null?void 0:P.id)},{immediate:!0}),(o,i)=>(e.openBlock(),e.createElementBlock("form",{class:"sv-subscription-management-form",onSubmit:i[3]||(i[3]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",me,[e.createVNode(ae._sfc_main,{modelValue:l.value,"onUpdate:modelValue":i[0]||(i[0]=d=>l.value=d),class:"sv-subscription-management-form__pricing-group","group-name":n.pricingGroup.name,pricings:n.pricingGroup.pricings,"billing-period":n.billingPeriod,currency:n.currency},null,8,["modelValue","group-name","pricings","billing-period","currency"]),e.createElementVNode("div",null,[e.createVNode(e.unref(oe._sfc_main),{spacing:"xs"})]),e.createVNode(T._sfc_main,{modelValue:g.value,"onUpdate:modelValue":i[1]||(i[1]=d=>g.value=d),class:"sv-subscription-management-form__payment-methods","payment-methods":f.value,"payment-method-options":n.paymentMethodOptions,required:"",disabled:n.disabled,label:e.unref(_)({defaultMessage:"Payment method",id:"subscription_management.payment_method_selector.label",description:"Label above the payment method that pays for the subscription change"}),onAddPaymentMethod:i[2]||(i[2]=d=>c("add-payment-method"))},null,8,["modelValue","payment-methods","payment-method-options","disabled","label"])])],32))}}),ge=e.defineComponent({__name:"TranslationOverride",props:{messages:{type:Object}},setup(n){const u=n,t=e.inject(p.TRANSLATION_SETTINGS_KEY,void 0),c=e.computed(()=>({...t==null?void 0:t.messages.value,...u.messages}));return(l,g)=>{var _,s;return e.openBlock(),e.createBlock(e.unref(p._sfc_main$2),{locale:(_=e.unref(t))==null?void 0:_.locale.value,"date-locale":(s=e.unref(t))==null?void 0:s.dateLocale.value,messages:c.value,"show-timezones":!1},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},8,["locale","date-locale","messages"])}}}),fe=e.defineComponent({__name:"SubscriptionManagementSummary",props:{invoice:{type:Object},isPending:{type:Boolean},hasError:{type:Boolean}},setup(n){const{$t:u}=p.useIntl(),t=e.computed(()=>({"invoice_preview.total_due_today_heading":u({defaultMessage:"Total due",id:"subscription_management.summary.total_due_heading",description:'Heading above the total of the invoice previewing a subscription change, replacing the shared preview’s "Total due today"'})}));return(c,l)=>(e.openBlock(),e.createBlock(e.unref(re._sfc_main),{class:"sv-subscription-management-summary",title:e.unref(u)({defaultMessage:"Order summary",id:"subscription_management.summary.title",description:"Title of the block previewing what a subscription change is invoiced for"})},{default:e.withCtx(()=>[n.hasError?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:0,class:"sv-subscription-management-summary__error sv-error",title:e.unref(u)({defaultMessage:"Unable to calculate the total. Please try again.",id:"subscription_management.summary.error",description:"Error shown when the invoice preview for a subscription change cannot be loaded"})},null,8,["title"])):n.isPending||!n.invoice?(e.openBlock(),e.createBlock(j._sfc_main,{key:1,variant:"section",class:"sv-subscription-management-summary__skeleton min-h-[120px]"},{default:e.withCtx(()=>[n.isPending?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(p._sfc_main),{key:0,variant:"body-sm",color:"subtle",tag:"div",class:"sv-subscription-management-summary__empty-state"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)({defaultMessage:"Select your plan to see what it costs.",id:"subscription_management.summary.empty_state",description:"Shown in the order summary before a plan has been picked to preview"})),1)]),_:1}))]),_:1})):(e.openBlock(),e.createBlock(ge,{key:2,messages:t.value},{default:e.withCtx(()=>[e.createVNode(e.unref(se._sfc_main$1),{class:"sv-subscription-management-summary__invoice",invoice:n.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1},8,["messages"]))]),_:1},8,["title"]))}}),_e={class:"sv-subscription-management-success grid grid-cols-1 gap-4"},ve={class:"sv-subscription-management-success__message"},be=e.defineComponent({__name:"SubscriptionManagementSuccess",props:{pricingGroupName:{type:String}},setup(n){const u=n,{$t:t}=p.useIntl(),c=e.computed(()=>t({defaultMessage:"Subscription updated",description:"Title shown on the manage subscription screen once the change is committed",id:"subscription_management.success.title"})),l=e.computed(()=>u.pricingGroupName?t({defaultMessage:"Your {subject} has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of the pricing group a committed subscription change applied to",id:"subscription_management.success.message"},{subject:u.pricingGroupName}):t({defaultMessage:"Your subscription has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of a committed subscription change when the pricing group is not known",id:"subscription_management.success.message_generic"}));return(g,_)=>(e.openBlock(),e.createElementBlock("div",_e,[e.createVNode(ce._sfc_main,{status:"success",title:c.value},{default:e.withCtx(()=>[e.createElementVNode("span",ve,e.toDisplayString(l.value),1)]),_:1},8,["title"])]))}}),he=e.defineComponent({__name:"AddPaymentMethodModal",props:{showModal:{type:Boolean},customer:{type:Object},paymentMethodOptions:{type:Array},isLoading:{type:Boolean}},emits:["success","failure","close"],setup(n,{emit:u}){const t=u,{$t:c}=p.useIntl(),l=e.ref(),g=e.computed(()=>{var s;return!!((s=l.value)!=null&&s.isSaving)}),_=()=>{var s;(s=l.value)==null||s.submit()};return(s,f)=>(e.openBlock(),e.createBlock(e.unref(ue.Modal),{"no-click-away":"",size:"lg","show-modal":n.showModal,"is-loading":g.value,title:e.unref(c)({defaultMessage:"Add payment method",id:"add_payment_method_modal.title",description:"Title of the modal for adding a payment method"}),"sub-title":e.unref(c)({defaultMessage:"Add a new payment method to pay with.",id:"add_payment_method_modal.subtitle",description:"Subtitle of the modal for adding a payment method"}),"confirm-button-text":e.unref(c)({defaultMessage:"Save payment method",id:"add_payment_method_modal.confirm_button.label",description:"Label of the button that stores the payment method being added"}),"cancel-button-text":e.unref(c)({defaultMessage:"Cancel",id:"add_payment_method_modal.cancel_button.label",description:"Label of the button that abandons adding a payment method"}),onConfirm:_,onClose:f[2]||(f[2]=o=>t("close"))},{body:e.withCtx(()=>[e.createVNode(T._sfc_main$1,{ref_key:"addPaymentMethodRef",ref:l,class:"sv-add-payment-method-modal sv-add-payment-method-modal__form",customer:n.customer,"payment-method-options":n.paymentMethodOptions,"is-loading":n.isLoading,"is-active":n.showModal,onSuccess:f[0]||(f[0]=o=>t("success")),onFailure:f[1]||(f[1]=o=>t("failure",o))},null,8,["customer","payment-method-options","is-loading","is-active"])]),_:1},8,["show-modal","is-loading","title","sub-title","confirm-button-text","cancel-button-text"]))}}),ye={class:"sv-subscription-management__header"},we={class:"flex flex-col gap-2"},Se=e.defineComponent({__name:"SubscriptionManagement",props:{configuration:{type:Object}},setup(n){const u=n,{$t:t}=p.useIntl(),c=H.usePortal(),l=p.useLogger(),{dispatchAction:g}=K.useActionDispatchProvider(),{createPricingPlanSchedule:_}=ne.createPricingPlanSchedulesService(),{subscription:s,get:f}=J.useSubscription({subscriptionId:u.configuration.subscriptionId}),{items:o,fetchAll:i}=X.usePaymentMethods({customerId:c.value.customer_id}),{customer:d,get:P}=Q.useCustomer({customerId:c.value.customer_id}),{paymentMethodOptions:b,get:B}=Z.usePaymentMethodOptions(),{isLoading:C}=ee.useLoadInitialData(f(),i(),P.execute(),B({customerId:c.value.customer_id})),k=e.ref(!1),D=async()=>{await i(),k.value=!1},N=e.computed(()=>{var a;return V.getActiveDefaultScheduleInfo(((a=s.value)==null?void 0:a.pricing_plan_schedule_infos)??[])}),w=e.computed(()=>{var h;const a=N.value;if(!a)return;const{enabledPricingId:r}=u.configuration;return(r?[r]:(((h=a.pricing_plan_schedule)==null?void 0:h.enabled_pricings)??[]).map(({pricing_id:m})=>m)).map(m=>V.getPricingGroupByPricingId({pricingPlanScheduleInfo:a,pricingId:m})).find(m=>!!m)}),U=e.computed(()=>{var a;return t({defaultMessage:"Manage {subject}",id:"subscription_management.title",description:"Title for the manage subscription page, naming the pricing group being changed"},{subject:((a=w.value)==null?void 0:a.name)||t({defaultMessage:"subscription",id:"subscription_management.title.default_subject",description:'Stands in for the pricing group name in the manage subscription title when no group is known, e.g. "Manage subscription"'})})}),y=e.ref([]),x=e.ref();e.watch([N,w],([a,r])=>{var q;const v=(((q=a==null?void 0:a.pricing_plan_schedule)==null?void 0:q.enabled_pricings)??[]).map(({pricing_id:S})=>S),{enabledPricingId:h}=u.configuration,m=((r==null?void 0:r.pricings)??[]).map(({id:S})=>S);y.value=h&&m.includes(h)?[...v.filter(S=>!m.includes(S)),h]:v},{immediate:!0});const{invoice:G,isPending:F,error:R,load:z}=de();e.watch([y,s],([a,r])=>{!r||a.length===0||z({subscription:r,enabledPricingIds:a})},{immediate:!0});const M=e.ref(!1),I=e.ref(),E=e.ref(!1),O=e.computed(()=>!C.value&&!M.value&&y.value.length>0&&!!s.value&&!!x.value),W=async()=>{if(!(!O.value||!s.value)){M.value=!0,I.value=void 0;try{await _({pricingPlanSubscriptionId:s.value.id,enabledPricings:y.value.map(a=>({pricing_id:a}))}),E.value=!0}catch(a){l.error("SUBSCRIPTION_UPDATE_FAILED","Failed to start a new pricing plan schedule",{},a),I.value=t({defaultMessage:"Something went wrong. Please try again.",id:"subscription_management.update_error",description:"Error shown when committing a subscription change fails"})}finally{M.value=!1}}},$=e.computed(()=>{var a,r,v;return((r=(a=N.value)==null?void 0:a.pricing_plan_schedule)==null?void 0:r.billing_period)??((v=s.value)==null?void 0:v.billing_period)});return(a,r)=>(e.openBlock(),e.createBlock(e.unref(Y.ContentWithAsideLayout),{class:"sv-subscription-management sv-root sv-screen"},{header:e.withCtx(()=>[e.createElementVNode("div",ye,[e.createVNode(e.unref(p._sfc_main),{variant:"heading-2",tag:"h1",class:"sv-subscription-management__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(U.value),1)]),_:1})])]),content:e.withCtx(()=>{var v,h;return[E.value?(e.openBlock(),e.createBlock(be,{key:0,class:"sv-subscription-management__success","pricing-group-name":(v=w.value)==null?void 0:v.name},null,8,["pricing-group-name"])):e.unref(C)?(e.openBlock(),e.createBlock(j._sfc_main,{key:1,variant:"section",class:"min-h-[220px]"})):w.value&&$.value?(e.openBlock(),e.createBlock(pe,{key:2,"enabled-pricing-ids":y.value,"onUpdate:enabledPricingIds":r[0]||(r[0]=m=>y.value=m),"payment-method-id":x.value,"onUpdate:paymentMethodId":r[1]||(r[1]=m=>x.value=m),class:"sv-subscription-management__form","pricing-group":w.value,"payment-methods":e.unref(o),"payment-method-options":e.unref(b),"billing-period":$.value,currency:(h=e.unref(s))==null?void 0:h.billing_currency,onAddPaymentMethod:r[2]||(r[2]=m=>k.value=!0)},null,8,["enabled-pricing-ids","payment-method-id","pricing-group","payment-methods","payment-method-options","billing-period","currency"])):e.createCommentVNode("",!0),e.createVNode(he,{"show-modal":k.value,customer:e.unref(d),"payment-method-options":e.unref(b),onSuccess:D,onClose:r[3]||(r[3]=m=>k.value=!1)},null,8,["show-modal","customer","payment-method-options"])]}),aside:e.withCtx(()=>[E.value?(e.openBlock(),e.createBlock(e.unref(A._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__done w-full",type:"button",onClick:r[4]||(r[4]=v=>e.unref(g)({action:"navigate-to-customer-overview"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)({defaultMessage:"Done",id:"subscription_management.done_button.label",description:"Label of the button that leaves the manage subscription screen once the change is committed"})),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(fe,{class:"sv-subscription-management__summary",invoice:e.unref(G),"is-pending":e.unref(C)||e.unref(F),"has-error":!!e.unref(R)},null,8,["invoice","is-pending","has-error"]),I.value?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:0,class:"sv-subscription-management__update-error sv-error",title:I.value},null,8,["title"])):e.createCommentVNode("",!0),e.createElementVNode("div",we,[e.createVNode(e.unref(A._sfc_main),{size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__update w-full",type:"button",disabled:!O.value,loading:M.value,onClick:W},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)({defaultMessage:"Update subscription",id:"subscription_management.update_button.label",description:"Label of the button that commits the subscription change"})),1)]),_:1},8,["disabled","loading"]),e.createVNode(ie._sfc_main$1,{class:"sv-subscription-management__kpi","payment-method-options":e.unref(b)},null,8,["payment-method-options"])])],64))]),_:1}))}}),Pe=e.defineComponent({__name:"SubscriptionManagement.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(n){const u=le.getComponentName("subscription-management");return(t,c)=>(e.openBlock(),e.createBlock(e.unref(p._sfc_main$1),{entry:t.$props,"component-name":e.unref(u),"allowed-portal-types":["CUSTOMER"],onError:c[0]||(c[0]=l=>t.$emit("error",l))},{default:e.withCtx(()=>[e.createVNode(Se,{configuration:n.configuration},null,8,["configuration"])]),_:1},8,["entry","component-name"]))}}),{define:ke}=p.createSolvimonElement(Pe,"subscription-management");exports.defineSolvimonSubscriptionManagement=ke;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),A=require("../../Button.vue.es-BzkuglKw.js"),L=require("../../ErrorNotification.vue.es-tS9vySUZ.js"),p=require("../../customElements-DUMRMFQ5.js"),Y=require("../../ContentWithAsideLayout-RSdKXqAf.js"),K=require("../../useActionDispatchProvider-DFhppdve.js"),H=require("../../usePortal-C27omjhz.js"),J=require("../../useSubscription-D787IXY-.js"),Q=require("../../useCustomer-BwZKd9i5.js"),X=require("../../usePaymentMethods-DDaTZQZp.js"),Z=require("../../usePaymentMethodOptions-CuzOoi2k.js"),ee=require("../../useLoadInitialData-D_R6Jy1s.js"),te=require("../../invoices-CKQBLar2.js"),V=require("../../pricingPlanSchedule-BM8vsKkV.js"),ne=require("../../pricingPlanSchedules-B_sTAIgU.js"),ie=require("../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js"),oe=require("../../Divider.vue.es-UwnWvUTl.js"),ae=require("../../PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-hS6A-KcP.js"),T=require("../../AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-081H9T3X.js"),se=require("../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js"),re=require("../../Section.vue.es-Bbt0RITt.js"),j=require("../../Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js"),ce=require("../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js"),ue=require("../../Modal.vue.es-DvLB3uCG.js"),le=require("../../sessionReference-m_6Rp4X1.js");function de(){const{getInvoicePreview:n}=te.createInvoicesService(),u=p.useLogger(),t=e.ref(),c=e.ref(!1),l=e.ref(),g=p.createLatestGuard();return{invoice:t,isPending:c,error:l,load:async({subscription:s,enabledPricingIds:f})=>{const o=V.getScheduleCustomizations({enabledPricings:f.map(d=>({pricing_id:d})),pricingPlanScheduleInfos:s.pricing_plan_schedule_infos});if(!o){t.value=void 0;return}const i=g();c.value=!0,l.value=void 0;try{const d=await n({forExistingSubscription:!0,pricingPlanSubscriptionId:s.id,customizations:o});if(!i())return;t.value=d.invoice}catch(d){if(!i())return;u.error("INVOICE_PREVIEW_FAILED","Failed to load the invoice preview",{preview:"SUBSCRIPTION_UPGRADE"},d),l.value=d,t.value=void 0}finally{i()&&(c.value=!1)}}}}const me={class:"sv-subscription-management-form__body grid grid-cols-1 gap-4"},pe=e.defineComponent({__name:"SubscriptionManagementForm",props:e.mergeModels({pricingGroup:{type:Object},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},billingPeriod:{type:Object},currency:{type:String},disabled:{type:Boolean}},{enabledPricingIds:{required:!0},enabledPricingIdsModifiers:{},paymentMethodId:{},paymentMethodIdModifiers:{}}),emits:e.mergeModels(["add-payment-method"],["update:enabledPricingIds","update:paymentMethodId"]),setup(n,{emit:u}){const t=n,c=u,l=e.useModel(n,"enabledPricingIds"),g=e.useModel(n,"paymentMethodId"),{$t:_}=p.useIntl(),s=o=>{const i=o?Date.parse(o):NaN;return Number.isFinite(i)?i:0},f=e.computed(()=>[...t.paymentMethods??[]].sort((o,i)=>s(i.created_at)-s(o.created_at)));return e.watch(()=>t.paymentMethods,(o,i)=>{var P;const d=o==null?void 0:o.find(({id:b})=>!(i!=null&&i.some(B=>B.id===b)));if(d&&(i!=null&&i.length)){g.value=d.id;return}o!=null&&o.some(({id:b})=>b===g.value)||(g.value=(P=(o==null?void 0:o.find(({is_default:b})=>b))??f.value[0])==null?void 0:P.id)},{immediate:!0}),(o,i)=>(e.openBlock(),e.createElementBlock("form",{class:"sv-subscription-management-form",onSubmit:i[3]||(i[3]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",me,[e.createVNode(ae._sfc_main,{modelValue:l.value,"onUpdate:modelValue":i[0]||(i[0]=d=>l.value=d),class:"sv-subscription-management-form__pricing-group","group-name":n.pricingGroup.name,pricings:n.pricingGroup.pricings,"billing-period":n.billingPeriod,currency:n.currency},null,8,["modelValue","group-name","pricings","billing-period","currency"]),e.createElementVNode("div",null,[e.createVNode(e.unref(oe._sfc_main),{spacing:"xs"})]),e.createVNode(T._sfc_main,{modelValue:g.value,"onUpdate:modelValue":i[1]||(i[1]=d=>g.value=d),class:"sv-subscription-management-form__payment-methods","payment-methods":f.value,"payment-method-options":n.paymentMethodOptions,required:"",disabled:n.disabled,label:e.unref(_)({defaultMessage:"Payment method",id:"subscription_management.payment_method_selector.label",description:"Label above the payment method that pays for the subscription change"}),onAddPaymentMethod:i[2]||(i[2]=d=>c("add-payment-method"))},null,8,["modelValue","payment-methods","payment-method-options","disabled","label"])])],32))}}),ge=e.defineComponent({__name:"TranslationOverride",props:{messages:{type:Object}},setup(n){const u=n,t=e.inject(p.TRANSLATION_SETTINGS_KEY,void 0),c=e.computed(()=>({...t==null?void 0:t.messages.value,...u.messages}));return(l,g)=>{var _,s;return e.openBlock(),e.createBlock(e.unref(p._sfc_main$2),{locale:(_=e.unref(t))==null?void 0:_.locale.value,"date-locale":(s=e.unref(t))==null?void 0:s.dateLocale.value,messages:c.value,"show-timezones":!1},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},8,["locale","date-locale","messages"])}}}),fe=e.defineComponent({__name:"SubscriptionManagementSummary",props:{invoice:{type:Object},isPending:{type:Boolean},hasError:{type:Boolean}},setup(n){const{$t:u}=p.useIntl(),t=e.computed(()=>({"invoice_preview.total_due_today_heading":u({defaultMessage:"Total due",id:"subscription_management.summary.total_due_heading",description:'Heading above the total of the invoice previewing a subscription change, replacing the shared preview’s "Total due today"'})}));return(c,l)=>(e.openBlock(),e.createBlock(e.unref(re._sfc_main),{class:"sv-subscription-management-summary",title:e.unref(u)({defaultMessage:"Order summary",id:"subscription_management.summary.title",description:"Title of the block previewing what a subscription change is invoiced for"})},{default:e.withCtx(()=>[n.hasError?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:0,class:"sv-subscription-management-summary__error sv-error",title:e.unref(u)({defaultMessage:"Unable to calculate the total. Please try again.",id:"subscription_management.summary.error",description:"Error shown when the invoice preview for a subscription change cannot be loaded"})},null,8,["title"])):n.isPending||!n.invoice?(e.openBlock(),e.createBlock(j._sfc_main,{key:1,variant:"section",class:"sv-subscription-management-summary__skeleton min-h-[120px]"},{default:e.withCtx(()=>[n.isPending?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(p._sfc_main),{key:0,variant:"body-sm",color:"subtle",tag:"div",class:"sv-subscription-management-summary__empty-state"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)({defaultMessage:"Select your plan to see what it costs.",id:"subscription_management.summary.empty_state",description:"Shown in the order summary before a plan has been picked to preview"})),1)]),_:1}))]),_:1})):(e.openBlock(),e.createBlock(ge,{key:2,messages:t.value},{default:e.withCtx(()=>[e.createVNode(e.unref(se._sfc_main$1),{class:"sv-subscription-management-summary__invoice",invoice:n.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1},8,["messages"]))]),_:1},8,["title"]))}}),_e={class:"sv-subscription-management-success grid grid-cols-1 gap-4"},ve={class:"sv-subscription-management-success__message"},be=e.defineComponent({__name:"SubscriptionManagementSuccess",props:{pricingGroupName:{type:String}},setup(n){const u=n,{$t:t}=p.useIntl(),c=e.computed(()=>t({defaultMessage:"Subscription updated",description:"Title shown on the manage subscription screen once the change is committed",id:"subscription_management.success.title"})),l=e.computed(()=>u.pricingGroupName?t({defaultMessage:"Your {subject} has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of the pricing group a committed subscription change applied to",id:"subscription_management.success.message"},{subject:u.pricingGroupName}):t({defaultMessage:"Your subscription has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of a committed subscription change when the pricing group is not known",id:"subscription_management.success.message_generic"}));return(g,_)=>(e.openBlock(),e.createElementBlock("div",_e,[e.createVNode(ce._sfc_main,{status:"success",title:c.value},{default:e.withCtx(()=>[e.createElementVNode("span",ve,e.toDisplayString(l.value),1)]),_:1},8,["title"])]))}}),he=e.defineComponent({__name:"AddPaymentMethodModal",props:{showModal:{type:Boolean},customer:{type:Object},paymentMethodOptions:{type:Array},isLoading:{type:Boolean}},emits:["success","failure","close"],setup(n,{emit:u}){const t=u,{$t:c}=p.useIntl(),l=e.ref(),g=e.computed(()=>{var s;return!!((s=l.value)!=null&&s.isSaving)}),_=()=>{var s;(s=l.value)==null||s.submit()};return(s,f)=>(e.openBlock(),e.createBlock(e.unref(ue.Modal),{"no-click-away":"",size:"lg","show-modal":n.showModal,"is-loading":g.value,title:e.unref(c)({defaultMessage:"Add payment method",id:"add_payment_method_modal.title",description:"Title of the modal for adding a payment method"}),"sub-title":e.unref(c)({defaultMessage:"Add a new payment method to pay with.",id:"add_payment_method_modal.subtitle",description:"Subtitle of the modal for adding a payment method"}),"confirm-button-text":e.unref(c)({defaultMessage:"Save payment method",id:"add_payment_method_modal.confirm_button.label",description:"Label of the button that stores the payment method being added"}),"cancel-button-text":e.unref(c)({defaultMessage:"Cancel",id:"add_payment_method_modal.cancel_button.label",description:"Label of the button that abandons adding a payment method"}),onConfirm:_,onClose:f[2]||(f[2]=o=>t("close"))},{body:e.withCtx(()=>[e.createVNode(T._sfc_main$1,{ref_key:"addPaymentMethodRef",ref:l,class:"sv-add-payment-method-modal sv-add-payment-method-modal__form",customer:n.customer,"payment-method-options":n.paymentMethodOptions,"is-loading":n.isLoading,"is-active":n.showModal,onSuccess:f[0]||(f[0]=o=>t("success")),onFailure:f[1]||(f[1]=o=>t("failure",o))},null,8,["customer","payment-method-options","is-loading","is-active"])]),_:1},8,["show-modal","is-loading","title","sub-title","confirm-button-text","cancel-button-text"]))}}),ye={class:"sv-subscription-management__header"},we={class:"flex flex-col gap-2"},Se=e.defineComponent({__name:"SubscriptionManagement",props:{configuration:{type:Object}},setup(n){const u=n,{$t:t}=p.useIntl(),c=H.usePortal(),l=p.useLogger(),{dispatchAction:g}=K.useActionDispatchProvider(),{createPricingPlanSchedule:_}=ne.createPricingPlanSchedulesService(),{subscription:s,get:f}=J.useSubscription({subscriptionId:u.configuration.subscriptionId}),{items:o,fetchAll:i}=X.usePaymentMethods({customerId:c.value.customer_id}),{customer:d,get:P}=Q.useCustomer({customerId:c.value.customer_id}),{paymentMethodOptions:b,get:B}=Z.usePaymentMethodOptions(),{isLoading:C}=ee.useLoadInitialData(f(),i(),P.execute(),B({customerId:c.value.customer_id})),k=e.ref(!1),D=async()=>{await i(),k.value=!1},N=e.computed(()=>{var a;return V.getActiveDefaultScheduleInfo(((a=s.value)==null?void 0:a.pricing_plan_schedule_infos)??[])}),w=e.computed(()=>{var h;const a=N.value;if(!a)return;const{enabledPricingId:r}=u.configuration;return(r?[r]:(((h=a.pricing_plan_schedule)==null?void 0:h.enabled_pricings)??[]).map(({pricing_id:m})=>m)).map(m=>V.getPricingGroupByPricingId({pricingPlanScheduleInfo:a,pricingId:m})).find(m=>!!m)}),U=e.computed(()=>{var a;return t({defaultMessage:"Manage {subject}",id:"subscription_management.title",description:"Title for the manage subscription page, naming the pricing group being changed"},{subject:((a=w.value)==null?void 0:a.name)||t({defaultMessage:"subscription",id:"subscription_management.title.default_subject",description:'Stands in for the pricing group name in the manage subscription title when no group is known, e.g. "Manage subscription"'})})}),y=e.ref([]),x=e.ref();e.watch([N,w],([a,r])=>{var q;const v=(((q=a==null?void 0:a.pricing_plan_schedule)==null?void 0:q.enabled_pricings)??[]).map(({pricing_id:S})=>S),{enabledPricingId:h}=u.configuration,m=((r==null?void 0:r.pricings)??[]).map(({id:S})=>S);y.value=h&&m.includes(h)?[...v.filter(S=>!m.includes(S)),h]:v},{immediate:!0});const{invoice:G,isPending:F,error:R,load:z}=de();e.watch([y,s],([a,r])=>{!r||a.length===0||z({subscription:r,enabledPricingIds:a})},{immediate:!0});const M=e.ref(!1),I=e.ref(),E=e.ref(!1),O=e.computed(()=>!C.value&&!M.value&&y.value.length>0&&!!s.value&&!!x.value),W=async()=>{if(!(!O.value||!s.value)){M.value=!0,I.value=void 0;try{await _({pricingPlanSubscriptionId:s.value.id,enabledPricings:y.value.map(a=>({pricing_id:a}))}),E.value=!0}catch(a){l.error("SUBSCRIPTION_UPDATE_FAILED","Failed to start a new pricing plan schedule",{},a),I.value=t({defaultMessage:"Something went wrong. Please try again.",id:"subscription_management.update_error",description:"Error shown when committing a subscription change fails"})}finally{M.value=!1}}},$=e.computed(()=>{var a,r,v;return((r=(a=N.value)==null?void 0:a.pricing_plan_schedule)==null?void 0:r.billing_period)??((v=s.value)==null?void 0:v.billing_period)});return(a,r)=>(e.openBlock(),e.createBlock(e.unref(Y.ContentWithAsideLayout),{class:"sv-subscription-management sv-root sv-screen"},{header:e.withCtx(()=>[e.createElementVNode("div",ye,[e.createVNode(e.unref(p._sfc_main),{variant:"heading-2",tag:"h1",class:"sv-subscription-management__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(U.value),1)]),_:1})])]),content:e.withCtx(()=>{var v,h;return[E.value?(e.openBlock(),e.createBlock(be,{key:0,class:"sv-subscription-management__success","pricing-group-name":(v=w.value)==null?void 0:v.name},null,8,["pricing-group-name"])):e.unref(C)?(e.openBlock(),e.createBlock(j._sfc_main,{key:1,variant:"section",class:"min-h-[220px]"})):w.value&&$.value?(e.openBlock(),e.createBlock(pe,{key:2,"enabled-pricing-ids":y.value,"onUpdate:enabledPricingIds":r[0]||(r[0]=m=>y.value=m),"payment-method-id":x.value,"onUpdate:paymentMethodId":r[1]||(r[1]=m=>x.value=m),class:"sv-subscription-management__form","pricing-group":w.value,"payment-methods":e.unref(o),"payment-method-options":e.unref(b),"billing-period":$.value,currency:(h=e.unref(s))==null?void 0:h.billing_currency,onAddPaymentMethod:r[2]||(r[2]=m=>k.value=!0)},null,8,["enabled-pricing-ids","payment-method-id","pricing-group","payment-methods","payment-method-options","billing-period","currency"])):e.createCommentVNode("",!0),e.createVNode(he,{"show-modal":k.value,customer:e.unref(d),"payment-method-options":e.unref(b),onSuccess:D,onClose:r[3]||(r[3]=m=>k.value=!1)},null,8,["show-modal","customer","payment-method-options"])]}),aside:e.withCtx(()=>[E.value?(e.openBlock(),e.createBlock(e.unref(A._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__done w-full",type:"button",onClick:r[4]||(r[4]=v=>e.unref(g)({action:"navigate-to-customer-overview"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)({defaultMessage:"Done",id:"subscription_management.done_button.label",description:"Label of the button that leaves the manage subscription screen once the change is committed"})),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(fe,{class:"sv-subscription-management__summary",invoice:e.unref(G),"is-pending":e.unref(C)||e.unref(F),"has-error":!!e.unref(R)},null,8,["invoice","is-pending","has-error"]),I.value?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:0,class:"sv-subscription-management__update-error sv-error",title:I.value},null,8,["title"])):e.createCommentVNode("",!0),e.createElementVNode("div",we,[e.createVNode(e.unref(A._sfc_main),{size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__update w-full",type:"button",disabled:!O.value,loading:M.value,onClick:W},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)({defaultMessage:"Update subscription",id:"subscription_management.update_button.label",description:"Label of the button that commits the subscription change"})),1)]),_:1},8,["disabled","loading"]),e.createVNode(ie._sfc_main$1,{class:"sv-subscription-management__kpi","payment-method-options":e.unref(b)},null,8,["payment-method-options"])])],64))]),_:1}))}}),Pe=e.defineComponent({__name:"SubscriptionManagement.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(n){const u=le.getComponentName("subscription-management");return(t,c)=>(e.openBlock(),e.createBlock(e.unref(p._sfc_main$1),{entry:t.$props,"component-name":e.unref(u),"allowed-portal-types":["CUSTOMER"],onError:c[0]||(c[0]=l=>t.$emit("error",l))},{default:e.withCtx(()=>[e.createVNode(Se,{configuration:n.configuration},null,8,["configuration"])]),_:1},8,["entry","component-name"]))}}),{define:ke}=p.createSolvimonElement(Pe,"subscription-management");exports.defineSolvimonSubscriptionManagement=ke;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { ref as S, defineComponent as M, useModel as H, computed as _, watch as F, openBlock as m, createElementBlock as z, withModifiers as ce, createElementVNode as C, createVNode as h, unref as e, mergeModels as K, inject as le, createBlock as g, withCtx as f, renderSlot as de, createTextVNode as T, toDisplayString as A, createCommentVNode as R, Fragment as me } from "vue";
|
|
2
|
-
import { _ as J } from "../../Button.vue.es-
|
|
3
|
-
import { _ as Q } from "../../ErrorNotification.vue.es-
|
|
4
|
-
import { b as X, g as ue, a as E, h as pe, i as ge, _ as Z, d as fe, e as ve } from "../../customElements-
|
|
2
|
+
import { _ as J } from "../../Button.vue.es-Cmjfm4jw.mjs";
|
|
3
|
+
import { _ as Q } from "../../ErrorNotification.vue.es-h-D37rfG.mjs";
|
|
4
|
+
import { b as X, g as ue, a as E, h as pe, i as ge, _ as Z, d as fe, e as ve } from "../../customElements-B58FcXIN.mjs";
|
|
5
5
|
import { C as be } from "../../ContentWithAsideLayout-BCM8tmZN.mjs";
|
|
6
|
-
import { u as he } from "../../useActionDispatchProvider-
|
|
7
|
-
import { u as _e } from "../../usePortal-
|
|
8
|
-
import { u as ye } from "../../useSubscription-
|
|
9
|
-
import { u as we } from "../../useCustomer-
|
|
10
|
-
import { u as Se } from "../../usePaymentMethods-
|
|
11
|
-
import { u as Pe } from "../../usePaymentMethodOptions-
|
|
12
|
-
import { u as Ie } from "../../useLoadInitialData-
|
|
13
|
-
import { c as Me } from "../../invoices-
|
|
6
|
+
import { u as he } from "../../useActionDispatchProvider-B3AvkLL2.mjs";
|
|
7
|
+
import { u as _e } from "../../usePortal-C5AsegpS.mjs";
|
|
8
|
+
import { u as ye } from "../../useSubscription-BZJL0VOA.mjs";
|
|
9
|
+
import { u as we } from "../../useCustomer-B-jyJIVy.mjs";
|
|
10
|
+
import { u as Se } from "../../usePaymentMethods-CbwnGONc.mjs";
|
|
11
|
+
import { u as Pe } from "../../usePaymentMethodOptions-1vRAo6Ib.mjs";
|
|
12
|
+
import { u as Ie } from "../../useLoadInitialData-D9GkzY8t.mjs";
|
|
13
|
+
import { c as Me } from "../../invoices-3520M5AN.mjs";
|
|
14
14
|
import { b as $e, c as ke, d as Oe } from "../../pricingPlanSchedule-BPrS2WRd.mjs";
|
|
15
|
-
import { c as Ae } from "../../pricingPlanSchedules-
|
|
16
|
-
import { a as Ce } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-
|
|
15
|
+
import { c as Ae } from "../../pricingPlanSchedules-ChQCbMfe.mjs";
|
|
16
|
+
import { a as Ce } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xzjqB-v-.mjs";
|
|
17
17
|
import { _ as Ee } from "../../Divider.vue.es-DnP_HqLz.mjs";
|
|
18
|
-
import { _ as Le } from "../../PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-
|
|
19
|
-
import { _ as xe, a as je } from "../../AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-
|
|
20
|
-
import { a as Ne } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-
|
|
21
|
-
import { _ as Te } from "../../Section.vue.es-
|
|
22
|
-
import { _ as ee } from "../../Skeleton.vue_vue_type_script_setup_true_lang-
|
|
23
|
-
import { _ as Be } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-
|
|
24
|
-
import { M as Ue } from "../../Modal.vue.es-
|
|
18
|
+
import { _ as Le } from "../../PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CmJITenR.mjs";
|
|
19
|
+
import { _ as xe, a as je } from "../../AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DNepCMRp.mjs";
|
|
20
|
+
import { a as Ne } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-QW9NdxyZ.mjs";
|
|
21
|
+
import { _ as Te } from "../../Section.vue.es-DVEpre9O.mjs";
|
|
22
|
+
import { _ as ee } from "../../Skeleton.vue_vue_type_script_setup_true_lang-CJWE7wVi.mjs";
|
|
23
|
+
import { _ as Be } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DlqoWKQq.mjs";
|
|
24
|
+
import { M as Ue } from "../../Modal.vue.es-BeI5C9-9.mjs";
|
|
25
25
|
import { a as Ge } from "../../sessionReference-3h-6FdrC.mjs";
|
|
26
26
|
function Ve() {
|
|
27
27
|
const { getInvoicePreview: n } = Me(), l = X(), t = S(), c = S(!1), d = S(), v = ue();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as s, a as f } from "./api.es-QaC926Xu.mjs";
|
|
2
|
-
import { u as E, c as m } from "./customElements-
|
|
2
|
+
import { u as E, c as m } from "./customElements-B58FcXIN.mjs";
|
|
3
3
|
import { E as e } from "./sessionReference-3h-6FdrC.mjs";
|
|
4
4
|
const a = "/portal/pricing-plan-subscriptions", N = {
|
|
5
5
|
CANCEL: "NEXT_BILLING_PERIOD",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const r=require("./api.es-duCDtZD9.js"),c=require("./customElements-
|
|
1
|
+
const r=require("./api.es-duCDtZD9.js"),c=require("./customElements-DUMRMFQ5.js"),o=require("./sessionReference-m_6Rp4X1.js"),s="/portal/pricing-plan-subscriptions",N={CANCEL:"NEXT_BILLING_PERIOD",RENEW:"UNDO"};function P(){const t=c.useConfig(),i=c.createRequestService();function a({id:e,expanded:n=!1}){return i({url:`${t.apiUrls.config}${s}/${e}`,query:r.withExpand({expandParams:o.EXPAND_ALL,expand:n})})}function u({customerId:e,pagination:n}){const l=n??{},E=r.withExpand({initialParams:{customer_id:e,statuses:["ACTIVE"],type:"BILLING"},expandParams:o.EXPAND_ALL});return i({url:`${t.apiUrls.config}${s}`,query:r.withPagination(E,l),isCollection:!0})}function p({id:e,variant:n}){return i({url:`${t.apiUrls.config}${s}/${e}/cancel`,data:{type:N[n]},options:{method:"POST"}})}return{getSubscription:a,getActiveSubscriptions:u,setSubscriptionCancellation:p}}exports.createSubscriptionsService=P;
|
|
@@ -2,7 +2,17 @@ import { Amount, BillingPeriod, CountryCode, TimePeriod } from '../../vendor/@so
|
|
|
2
2
|
export interface CheckoutTitleProps {
|
|
3
3
|
trialPeriod?: TimePeriod;
|
|
4
4
|
subscriptionName: string;
|
|
5
|
+
/** What the subscription invoice comes to. */
|
|
5
6
|
amount: Amount;
|
|
7
|
+
/** What is charged now: the trial invoice where there is one, the first invoice otherwise. */
|
|
8
|
+
dueTodayAmount: Amount;
|
|
9
|
+
/** What it renews at, where that is not what is charged today. Absent where it cannot be told. */
|
|
10
|
+
recurringAmount?: Amount;
|
|
11
|
+
/** Whether the invoice charges anything that will not be charged again. */
|
|
12
|
+
hasOneOffCharges?: boolean;
|
|
13
|
+
/** Whether anything is charged again at all — a plan billed on usage renews at zero and does. */
|
|
14
|
+
hasRecurringCharge?: boolean;
|
|
15
|
+
hasUsageCharges?: boolean;
|
|
6
16
|
billingPeriod: BillingPeriod;
|
|
7
17
|
countryCode: CountryCode | undefined;
|
|
8
18
|
trialStartDate?: Date;
|
|
@@ -44,10 +44,8 @@ export interface ExpressPaymentMethodProps {
|
|
|
44
44
|
*/
|
|
45
45
|
endDate?: Date;
|
|
46
46
|
};
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
*/
|
|
50
|
-
regular: {
|
|
47
|
+
/** The regular period. Absent where nothing renews, which must not be mandated as one. */
|
|
48
|
+
regular?: {
|
|
51
49
|
/**
|
|
52
50
|
* The label of the regular period
|
|
53
51
|
* Example: 'UD Pro monthly'
|
|
@@ -68,7 +66,13 @@ export interface ExpressPaymentMethodProps {
|
|
|
68
66
|
};
|
|
69
67
|
};
|
|
70
68
|
}
|
|
69
|
+
export interface ExpressBillingInformation extends Partial<Address> {
|
|
70
|
+
email?: string;
|
|
71
|
+
}
|
|
71
72
|
export interface ExpressPaymentMethodEmits {
|
|
72
73
|
(e: 'ready'): void;
|
|
73
|
-
(e: '
|
|
74
|
+
(e: 'unavailable'): void;
|
|
75
|
+
(e: 'update-billing-information', billingInformation: ExpressBillingInformation): void;
|
|
76
|
+
(e: 'payment-success'): void;
|
|
77
|
+
(e: 'payment-failed', error: Error): void;
|
|
74
78
|
}
|
package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Invoice } from '../../../vendor/@solvimon/solvimon-types/index';
|
|
1
|
+
import { AuthorizePaymentPayload, Invoice } from '../../../vendor/@solvimon/solvimon-types/index';
|
|
2
2
|
import { ExpressPaymentMethodProps } from './ExpressPaymentMethod.types';
|
|
3
3
|
import { CheckoutFormState } from '../../customer/CheckoutForm/CheckoutForm.types';
|
|
4
4
|
export interface ExpressPaymentMethodApplePayProps extends ExpressPaymentMethodProps {
|
|
@@ -6,4 +6,6 @@ export interface ExpressPaymentMethodApplePayProps extends ExpressPaymentMethodP
|
|
|
6
6
|
trialInvoicePreview: Invoice;
|
|
7
7
|
invoicePreview: Invoice;
|
|
8
8
|
}>;
|
|
9
|
+
context?: AuthorizePaymentPayload['context'];
|
|
10
|
+
validateOnSubmit?: () => Promise<boolean>;
|
|
9
11
|
}
|
package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Address, Amount, Invoice, PaymentMethodOptionsResponse } from '../../../vendor/@solvimon/solvimon-types/index';
|
|
1
|
+
import { Address, Amount, AuthorizePaymentPayload, Invoice, PaymentMethodOptionsResponse } from '../../../vendor/@solvimon/solvimon-types/index';
|
|
2
2
|
import { ExpressPaymentMethodProps } from '../ExpressPaymentMethod/ExpressPaymentMethod.types';
|
|
3
3
|
import { CheckoutFormState } from '../../customer/CheckoutForm/CheckoutForm.types';
|
|
4
4
|
export interface ExpressPaymentMethodsProps {
|
|
@@ -15,7 +15,11 @@ export interface ExpressPaymentMethodsProps {
|
|
|
15
15
|
trialInvoicePreview: Invoice;
|
|
16
16
|
invoicePreview: Invoice;
|
|
17
17
|
}>;
|
|
18
|
+
context?: AuthorizePaymentPayload['context'];
|
|
19
|
+
validateOnSubmit?: () => Promise<boolean>;
|
|
18
20
|
}
|
|
19
21
|
export interface ExpressPaymentMethodsEmits {
|
|
20
22
|
(e: 'update-billing-information', billingInformation: Partial<Address>): void;
|
|
23
|
+
(e: 'payment-success'): void;
|
|
24
|
+
(e: 'payment-failed', error: Error): void;
|
|
21
25
|
}
|
|
@@ -77,5 +77,5 @@ export interface LoggerProviderProps {
|
|
|
77
77
|
}
|
|
78
78
|
export type WarnCode =
|
|
79
79
|
/** Also an `ErrorCode`: the level separates a failure the SDK absorbed from one it did not. */
|
|
80
|
-
'REQUEST_FAILED' | 'ACTIVE_SCHEDULE_NOT_FOUND' | 'ADYEN_INVALID_CONFIGURATION' | 'PAYMENT_INTEGRATION_NOT_RENDERABLE' | 'APPLE_PAY_ACTION_REQUIRED' | 'INVOICE_PREVIEW_SKIPPED' | 'ON_DEMAND_CHARGE_REFUSED' | 'TRANSLATION_LOAD_FAILED';
|
|
80
|
+
'REQUEST_FAILED' | 'ACTIVE_SCHEDULE_NOT_FOUND' | 'ADYEN_INVALID_CONFIGURATION' | 'PAYMENT_INTEGRATION_NOT_RENDERABLE' | 'APPLE_PAY_ACTION_REQUIRED' | 'APPLE_PAY_FORM_INCOMPLETE' | 'INVOICE_PREVIEW_SKIPPED' | 'RECURRING_AMOUNT_UNRESOLVED' | 'ON_DEMAND_CHARGE_REFUSED' | 'TRANSLATION_LOAD_FAILED';
|
|
81
81
|
export type ErrorCode = 'REQUEST_FAILED' | 'UNHANDLED_ERROR' | 'RESOURCE_REVOKED' | 'INVALID_EMAIL' | 'INVALID_COUNTRY_CODE' | 'PAYMENT_INTEGRATION_INITIALIZATION_FAILED' | 'PAYMENT_AUTHORIZATION_FAILED' | 'TOKENIZATION_FAILED' | 'INVALID_TOKEN' | 'SESSION_EXPIRED' | 'INVALID_REDIRECT_RESULT' | 'PAYMENT_DETAILS_CALL_FAILED' | 'PAYMENT_METHOD_OPTIONS_LOAD_FAILED' | 'NO_PAYMENT_METHODS_AVAILABLE' | 'INTEGRATION_ERROR' | 'EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR' | 'EXPRESS_CHECKOUT_PAYPAL_ERROR' | 'APPLE_PAY_ERROR' | 'APPLE_PAY_AUTHORIZATION_FAILED' | 'PROMOTION_CODE_APPLY_FAILED' | 'PROMOTION_CODE_REMOVE_FAILED' | 'SUBSCRIPTION_UPDATE_FAILED' | 'SUBSCRIPTION_CANCELLATION_FAILED' | 'INITIAL_DATA_LOAD_FAILED' | 'SUBSCRIPTION_LOAD_FAILED' | 'INVOICE_PREVIEW_FAILED' | 'TOP_UP_FAILED' | 'ON_DEMAND_ITEMS_LOAD_FAILED' | 'ON_DEMAND_CHARGE_FAILED' | 'AUTO_TOP_UP_SAVE_FAILED' | 'AUTO_TOP_UP_CANCELLATION_FAILED' | 'REQUEST_PARSE_FAILED' | 'ADYEN_SUBMIT_FAILED' | 'STRIPE_SUBMIT_FAILED' | 'STRIPE_CONFIRMATION_TOKEN_FAILED' | 'STRIPE_ACTION_FAILED' | 'STRIPE_REDIRECT_RETURN_FAILED' | 'ADYEN_PAYMENT_FAILED' | 'PAYMENT_DETAILS_REJECTED' | 'PAYMENT_ACCEPTOR_MISSING';
|
package/dist/{useActionDispatchProvider-CHkVQMaE.js → useActionDispatchProvider-DFhppdve.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
const i=require("vue"),e=require("./customElements-
|
|
1
|
+
const i=require("vue"),e=require("./customElements-DUMRMFQ5.js");function o(){const t=i.inject(e.ACTION_DISPATCHER_PROVIDER_INJECTION_KEY);if(!t)throw new Error("dispatchAction is not provided");return{dispatchAction:t}}exports.useActionDispatchProvider=o;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as i } from "vue";
|
|
2
|
-
import { c as m } from "./customer-
|
|
2
|
+
import { c as m } from "./customer-B3LPAhaD.mjs";
|
|
3
3
|
import { u as s } from "./useService-Bh47bllz.mjs";
|
|
4
4
|
function C({ customerId: r }) {
|
|
5
5
|
const { getCustomer: u, updateCustomer: o } = m(), e = i(), { data: p, ...c } = s({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const i=require("vue"),v=require("./customer-
|
|
1
|
+
const i=require("vue"),v=require("./customer-CisTPaXj.js"),u=require("./useService-H7BjLg8P.js");function m({customerId:r}){const{getCustomer:c,updateCustomer:a}=v.createCustomerService(),t=i.ref(),{data:C,...o}=u.useService({service:async()=>{const e=await c(r);return t.value=e,e}}),{data:d,...n}=u.useService({service:async e=>{const s=await a(r,e);return t.value=s,s}});return{customer:t,get:o,update:n}}exports.useCustomer=m;
|
|
@@ -4,11 +4,11 @@ import { u as ie, d as vl, c as ml } from "./index.es-CXkP_k3u.mjs";
|
|
|
4
4
|
import { c as hl } from "./countryData.es-BegoD-cZ.mjs";
|
|
5
5
|
import { _ as bl, u as pl, a as yl, o as gl, f as xl, s as kl, b as wl } from "./floating-ui.vue.es-CYt0fSY7.mjs";
|
|
6
6
|
import { e as Ce, _ as J, s as Cl, u as Sl } from "./sorting.es-DCihKqD2.mjs";
|
|
7
|
-
import { S as Ml, _ as ue, a as Fe } from "./customElements-
|
|
8
|
-
import { _ as ze } from "./IconButton.vue.es-
|
|
9
|
-
import { a as Ae, _ as ge } from "./Button.vue.es-
|
|
10
|
-
import { _ as $l } from "./Chip.vue.es-
|
|
11
|
-
import { _ as Il } from "./Input.vue.es-
|
|
7
|
+
import { S as Ml, _ as ue, a as Fe } from "./customElements-B58FcXIN.mjs";
|
|
8
|
+
import { _ as ze } from "./IconButton.vue.es-DvfErUOq.mjs";
|
|
9
|
+
import { a as Ae, _ as ge } from "./Button.vue.es-Cmjfm4jw.mjs";
|
|
10
|
+
import { _ as $l } from "./Chip.vue.es-DksjbJO8.mjs";
|
|
11
|
+
import { _ as Il } from "./Input.vue.es-CU9u5yKH.mjs";
|
|
12
12
|
import { _ as Vl } from "./formControl-dX7l8o3c.mjs";
|
|
13
13
|
const Se = (e) => xe(e) && typeof e != "boolean" ? null : e, se = (e) => typeof e == "object" && e !== null, Ol = ({
|
|
14
14
|
from: e,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const R=require("./useService-H7BjLg8P.js"),e=require("vue"),L=require("./index.es-BclokHQX.js"),$e=require("./countryData.es-C4jHBzfo.js"),O=require("./floating-ui.vue.es-Bly3DGWm.js"),E=require("./sorting.es-DQsjKr8A.js"),D=require("./customElements-C963-LtW.js"),fe=require("./IconButton.vue.es-Bwdfu-jm.js"),U=require("./Button.vue.es-qGvnOKnK.js"),Oe=require("./Chip.vue.es-D60gTbfe.js"),De=require("./Input.vue.es-B47l_feL.js"),ze=require("./formControl-ODrpUvcA.js"),oe=t=>R.isEmpty(t)&&typeof t!="boolean"?null:t,G=t=>typeof t=="object"&&t!==null,Te=({from:t,to:v,nullifyEmptyValues:b=!1})=>{const s=Object.fromEntries(Object.entries(v).filter(([a,p])=>!R.deepEqual(p,t[a])));return b?Object.entries(s).reduce((a,[p,r])=>({...a,[p]:oe(r)}),{}):s},Le=({from:t,to:v,nullifyEmptyValues:b=!1})=>{const s={},a=(r,d,n)=>{const m=d[n];return r===void 0?Array.isArray(m)?s[n]=[]:G(m)&&(s[n]={}):Array.isArray(m)?r[n]=[]:G(m)&&(r[n]={}),[r===void 0?s:r,n]},p=(r,d,n)=>{for(const m of Object.keys(r)){const f=a(n,r,m);m in d||(f[0][f[1]]={from:r[m]})}for(const[m,f]of Object.entries(d)){const h=m in r,y=a(n,r,m);if(h){const g=r[m];R.deepEqual(g,f)?delete y[0][y[1]]:G(f)&&G(g)?p(g,f,y[0][y[1]]):y[0][y[1]]=b&&typeof f!="boolean"?oe(f):f}else y[0][y[1]]=b?oe(f):f}};return p(t,v),s},Re=({from:t,to:v,mode:b="shallow",nullifyEmptyValues:s=!1})=>b==="deep"?Le({from:t,to:v,nullifyEmptyValues:s}):Te({from:t,to:v,nullifyEmptyValues:s});function qe(t,v,b=[]){return[...t].sort((s,a)=>{for(let p=0;p<v.length;p++){const r=v[p],d=typeof r=="function"?r:h=>h[r],n=b[p]==="desc"?-1:1,m=d(s),f=d(a);if(!(m==null&&f==null)){if(m==null)return n;if(f==null||m<f)return-n;if(m>f)return n}}return 0})}const Ae={},Fe={class:"flex items-center pt-1"},Ue={class:"px-1.5 text-xs font-semibold text-subtle"};function je(t,v){return e.openBlock(),e.createElementBlock("div",Fe,[v[0]||(v[0]=e.createElementVNode("div",{class:"w-2 border-t"},null,-1)),e.createElementVNode("span",Ue,[e.renderSlot(t.$slots,"default")]),v[1]||(v[1]=e.createElementVNode("div",{class:"grow border-t"},null,-1))])}const Ke=O._export_sfc(Ae,[["render",je]]),He=t=>`checkbox-item-${t}`,We="select-search-done-button",Ge=["aria-selected","aria-disabled","data-testid","onKeydown"],Qe=["id","value","checked","disabled"],Ye=["for"],Je={class:"flex min-w-0 items-center gap-1"},Xe={class:"flex min-w-0 flex-grow flex-col"},Ze={class:"flex min-w-0 flex-grow gap-2"},_e={class:"flex min-w-0 flex-grow flex-col"},et={class:"flex min-w-0 flex-grow items-center gap-2"},tt=e.defineComponent({__name:"SearchSelectInputOption",props:{multiple:{type:Boolean},search:{},condensed:{type:Boolean},label:{},checked:{type:Boolean},disabled:{type:Boolean},subLabel:{},labelPrefixComponent:{},labelSuffixComponent:{},labelInlineComponent:{},value:{},labelSrOnly:{type:Boolean}},emits:["value-changed"],setup(t,{emit:v}){const b=v,s=t,a=n=>{const m=n.target,f={value:m.value,checked:m.checked};b("value-changed",f)},p=()=>{s.multiple||s.disabled||b("value-changed",{value:s.value})},r=e.computed(()=>He(s.value)),d=e.computed(()=>E.escapeUserInput(s.search??""));return(n,m)=>(e.openBlock(),e.createElementBlock("li",{role:"option","aria-selected":t.checked,"aria-disabled":t.disabled,class:e.normalizeClass([{"hover:bg-gray-100":!t.disabled},"relative flex"]),"data-testid":r.value,tabindex:"0",onClick:p,onKeydown:e.withKeys(e.withModifiers(p,["prevent"]),["enter"])},[t.multiple?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("input",e.mergeProps(n.$attrs,{id:r.value,ref:"inputRef",value:t.value,checked:t.checked,disabled:t.disabled,type:"checkbox",class:["absolute left-3.5 top-1/2 h-4 w-4 -translate-y-2 rounded border-gray-300 bg-gray-100 focus:ring-2 focus:ring-primary-500",t.disabled?"text-disabled":"text-primary-600"],tabindex:"-1",onChange:a}),null,16,Qe),e.createElementVNode("label",{for:r.value,class:e.normalizeClass([t.disabled?"text-disabled":"rounded text-default","w-full px-4 py-3 pl-10 text-sm font-medium"])},[e.createElementVNode("div",Je,[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.createElementVNode("div",Xe,[e.createElementVNode("div",Ze,[e.createVNode(E._sfc_main,{text:t.label,search:d.value,title:t.label,class:e.normalizeClass(["truncate font-semibold",{"sr-only":t.labelSrOnly}])},null,8,["text","search","title","class"]),t.labelInlineComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelInlineComponent.component),e.normalizeProps(e.mergeProps({key:0},t.labelInlineComponent.props)),null,16)):e.createCommentVNode("",!0),t.subLabel&&t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.subLabel&&!t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.labelSuffixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelSuffixComponent.component),e.normalizeProps(e.mergeProps({key:1},t.labelSuffixComponent.props)),null,16)):e.createCommentVNode("",!0)])],10,Ye)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["flex w-full min-w-0 items-center gap-3 px-4 text-sm font-medium",[t.condensed?"p-2":"py-3",t.disabled??"cursor-not-allowed",!t.disabled&&"cursor-pointer"]])},[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.createElementVNode("div",_e,[e.createElementVNode("div",et,[e.createVNode(E._sfc_main,{text:t.label,search:e.unref(E.escapeUserInput)(t.search??""),title:t.label,class:e.normalizeClass(["truncate font-semibold",{"text-disabled":t.disabled}])},null,8,["text","search","title","class"]),t.labelInlineComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelInlineComponent.component),e.normalizeProps(e.mergeProps({key:0},t.labelInlineComponent.props)),null,16)):e.createCommentVNode("",!0),t.subLabel&&t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.subLabel&&!t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.labelSuffixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelSuffixComponent.component),e.normalizeProps(e.mergeProps({key:1},t.labelSuffixComponent.props)),null,16)):e.createCommentVNode("",!0)],2))],42,Ge))}}),lt={class:"flex flex-col rounded-bl rounded-br"},ot={key:0,class:"px-5 py-5 text-sm text-secondary"},nt={key:0},at=["innerHTML"],st={key:0},rt={class:"mt-1 px-3 py-2 text-sm text-secondary"},it=e.defineComponent({__name:"SearchSelectInputOptions",props:{i18n:{},model:{},search:{},multiple:{type:Boolean},condensed:{type:Boolean},hasLargeDropdown:{type:Boolean},addOnly:{type:Boolean},options:{}},emits:["value-changed"],setup(t,{emit:v}){const b=v,s=t,a=h=>b("value-changed",h),p=e.computed(()=>{var h,y;const g=s.search?`<span class="font-bold">"${E.escapeUserInput(s.search)}"</span>`:"";return((y=(h=s.i18n)==null?void 0:h.noResults)==null?void 0:y.call(h,g))??`No matches found for ${g}.`}),r=e.computed(()=>s.search===""),d=e.computed(()=>s.options.filter(h=>!h.hidden)),n=e.computed(()=>d.value.length>0),m=e.computed(()=>n.value?!1:r.value?!0:!!p.value),f=e.computed(()=>E.sortedUniqBy(s.options,"group").reduce((h,y)=>y.value===""?h:{...h,[y.value]:y.group},{}));return(h,y)=>{var g,k;return e.openBlock(),e.createElementBlock("div",lt,[m.value?(e.openBlock(),e.createElementBlock("div",ot,[r.value?(e.openBlock(),e.createElementBlock("span",nt,e.toDisplayString(((g=s.i18n)==null?void 0:g.noOptionsAvailable)??"No available options."),1)):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:p.value},null,8,at))])):n.value?(e.openBlock(),e.createElementBlock("ul",{key:1,class:e.normalizeClass(["list-none overflow-y-auto",[t.hasLargeDropdown?"max-h-[19rem]":"max-h-48"]])},[t.addOnly?(e.openBlock(),e.createElementBlock("div",st,[e.createElementVNode("p",rt,e.toDisplayString(((k=t.i18n)==null?void 0:k.addOnly)??"You can only select currently unselected options."),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,({label:Q,subLabel:j,value:I,checked:K,disabled:Y,labelInlineComponent:B,labelSuffixComponent:J,labelSrOnly:X,labelPrefixComponent:Z,searchValues:u})=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:I},[f.value[I]?(e.openBlock(),e.createBlock(Ke,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value[I]),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(tt,{label:Q,"sub-label":j,value:I,checked:K,disabled:Y,search:u?"":t.search,multiple:t.multiple,condensed:t.condensed,"label-suffix-component":J,"label-prefix-component":Z,"label-inline-component":B,"label-sr-only":X,onValueChanged:a},null,8,["label","sub-label","value","checked","disabled","search","multiple","condensed","label-suffix-component","label-prefix-component","label-inline-component","label-sr-only"])],64))),128))],2)):e.createCommentVNode("",!0),h.$slots["list-footer-content"]?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"border-t border-gray-200":n.value})},[e.renderSlot(h.$slots,"list-footer-content")],2)):e.createCommentVNode("",!0)])}}}),ut={class:"flex flex-col gap-2"},ct=["aria-expanded"],dt={class:"flex items-center gap-2"},mt={key:2},ft={class:"flex items-center gap-2 self-stretch"},vt={class:"flex items-center self-stretch pr-1"},pt={key:0,class:"flex flex-wrap gap-2"},ht=["innerHTML"],bt=e.defineComponent({__name:"SearchSelectInput",props:e.mergeModels({addOnly:{type:Boolean,default:!1},disabled:{type:Boolean},i18n:{},label:{},labelScreenReaderOnly:{type:Boolean},singleModelValue:{},multiModelValue:{},options:{default:()=>[]},optionsOrder:{default:()=>["asc","asc"]},optionsOrderProperties:{default:()=>["group","label"]},required:{type:Boolean,default:!1},rootClass:{},wrapperClass:{},size:{default:"md"},withChips:{type:Boolean,default:!1},error:{},hasReset:{type:Boolean},name:{},hasLargeDropdown:{type:Boolean,default:!1},showSuffixInClosedInput:{type:Boolean},showSuffixLabelInInput:{type:Boolean},showSelectionInClosedInput:{type:Boolean},condensed:{type:Boolean},form:{},prefix:{}},{search:{default:""},searchModifiers:{}}),emits:e.mergeModels(["update:singleModelValue","update:multiModelValue","blur","change","focus","add-option"],["update:search"]),setup(t,{expose:v,emit:b}){var s;const a=t,p=e.inject(D.SEARCH_SELECT_TELEPORT_TARGET),r=(s=e.getCurrentInstance())==null?void 0:s.vnode.props,d=!(r!=null&&r["onUpdate:search"]),n=e.computed(()=>Array.isArray(a.multiModelValue)),m=e.ref(a.singleModelValue),f=b,h=L.useVModel(a,"singleModelValue",f),y=L.useVModel(a,"multiModelValue",f),g=e.ref(y.value??[]);e.watch(()=>a.multiModelValue,l=>{l&&(g.value=l)});const k=e.useModel(t,"search"),Q=e.useSlots(),j=e.computed(()=>!!Q.prefix),I=e.computed(()=>!!a.prefix),K=e.computed(()=>j.value||I.value),Y=e.computed(()=>K.value||!le.value),B=e.computed({get:()=>n.value?g.value??[]:typeof h.value=="string"?[h.value]:[],set(l){n.value?g.value=l:h.value=(l==null?void 0:l[0])??""}}),J=e.computed(()=>P.value.filter(l=>{var o;return(o=B.value)==null?void 0:o.includes(l.value)})),X=e.computed(()=>J.value[0]),Z=E.useIsMounted(),u=e.ref(!1),z=e.ref(),M=e.ref(),ve=e.ref(),ne=()=>z.value?Array.from(z.value.querySelectorAll('li[tabindex="0"], button:not([disabled])')):[],ae=()=>{var l;let o=document.activeElement;for(;(l=o==null?void 0:o.shadowRoot)!=null&&l.activeElement;)o=o.shadowRoot.activeElement;return o},q=()=>{if(!M.value)return null;let l=M.value.querySelector("input");if(l)return l;const o=M.value.querySelectorAll("*");for(const i of o)if(i.shadowRoot&&(l=i.shadowRoot.querySelector("input"),l))return l;return null};let _=!1;const ee=()=>{var l;_=!0,(l=q())==null||l.focus(),_=!1},N=e.ref(""),A=e.ref(!1),pe=()=>{_||(u.value=!0)},he=l=>{l.target===q()&&(u.value=!0)},be=()=>{a.disabled||(A.value=!0,u.value=!0)},ye=l=>{var o;if(!u.value)return;const i=ne(),x=q();if(ae()===x)switch(l.key){case"ArrowDown":i.length>0&&(l.preventDefault(),(o=i[0])==null||o.focus());break;case"Tab":V();break;case"Escape":l.preventDefault(),V();break}},ke=l=>{var o,i,x;const C=ne(),c=ae(),S=C.indexOf(c),F=q();switch(l.key){case"ArrowDown":S<C.length-1&&(l.preventDefault(),(o=C[S+1])==null||o.focus());break;case"ArrowUp":l.preventDefault(),S<=0?F==null||F.focus():(i=C[S-1])==null||i.focus();break;case"Tab":if(l.preventDefault(),l.shiftKey&&S>0){(x=C[S-1])==null||x.focus();break}V(),ee();break;case"Escape":l.preventDefault(),V(),ee();break}},{floatingStyles:ge}=O.useFloating(M,z,{whileElementsMounted:O.autoUpdate,placement:"bottom",middleware:[O.offset(4),O.flip({mainAxis:!0}),O.shift({padding:8}),O.size({padding:8,apply({availableHeight:l,elements:o}){Object.assign(o.floating.style,{maxHeight:`${l}px`})}})]}),{width:xe}=L.useElementSize(M),se=l=>{var o;return a.disabled||!a.disabled&&a.addOnly&&!!((o=m.value)!=null&&o.includes(l))},P=e.computed(()=>{const l=a.options.map(i=>({...i,checked:B.value.includes(i.value),disabled:i.disabled??se(i.value)})),o=[...l,...k.value.length===0&&H.value?H.value.filter(i=>!l.some(x=>x.value===i.value)):[]];return a.optionsOrderProperties&&!R.isEmpty(a.optionsOrderProperties)?qe(o,a.optionsOrderProperties,a.optionsOrder):o}),re=l=>P.value.filter(o=>l.some(i=>o.value===i)),$=e.computed(()=>re(B.value)),w=e.computed(()=>$.value[0]),te=e.computed(()=>{var l;if(!(u.value||!a.showSuffixInClosedInput)&&!(n.value&&$.value.length!==1))return(l=w.value)==null?void 0:l.labelSuffixComponent}),T=e.computed(()=>{var l;if(!a.showSelectionInClosedInput||u.value||!n.value)return;const o=(l=w.value)==null?void 0:l.labelPrefixComponent;if(o)return{component:o,extraCount:$.value.length-1}}),Ce=e.computed(()=>a.size==="xs"?"px-1":a.size==="sm"?"px-2":"px-4"),H=e.ref([]);e.watch(()=>{var l;if(n.value)return null;const o=h.value??"";return{selectedValue:o,label:((l=a.options.find(i=>i.value===o))==null?void 0:l.label)??""}},l=>{if(l){if(!l.selectedValue){N.value="",u.value||(k.value="");return}l.label&&(N.value=l.label,!u.value&&k.value===""&&(k.value=l.label))}},{immediate:!0});const ie=({value:l,checked:o})=>{var i;let x;n.value?x=o?[...B.value,l]:B.value.filter(C=>C!==l):(x=[l],N.value=((i=P.value.find(C=>C.value===l))==null?void 0:i.label)??"",k.value=N.value,A.value=!1,u.value=!1,ee()),H.value=re(x),B.value=x,f("change")},ue=e.computed(()=>B.value.length>0&&!a.disabled&&!(B.value.length===1&&B.value[0]==="")),W=()=>{B.value=[],g.value=[],n.value||(N.value="",k.value="",A.value=!1)},Be=()=>{if(!n.value&&N.value&&k.value===N.value){W();return}k.value=""},we=e.computed(()=>{if(!d||!n.value&&!A.value)return P.value;const l=k.value.toLowerCase();return P.value.filter(o=>o.searchValues?o.searchValues.some(i=>i.toLowerCase().includes(l)):(o.label??"").toLowerCase().includes(l))}),V=()=>{n.value?(y.value=g.value,k.value=""):k.value===""&&a.hasReset?W():(k.value=N.value,A.value=!1),u.value=!1},Ve=()=>{var l;u.value?V():(u.value=!0,(l=q())==null||l.focus())};e.watch(g,()=>{!u.value&&!R.isEqual(y.value,g.value)&&n.value&&(y.value=g.value)});const Se=l=>{const o=l.composedPath();z.value&&o.includes(z.value)||M.value&&o.includes(M.value)||u.value&&V()};L.useEventListener("mousedown",Se);const Ee=e.computed(()=>{var l,o,i,x,C,c,S;return n.value&&u.value?((l=a.i18n)==null?void 0:l.placeholderSearch)??"Search":T.value?"":n.value&&$.value.length===1?(o=w.value)==null?void 0:o.label:n.value&&$.value.length>=2?`${(i=w.value)==null?void 0:i.label} +${$.value.length-1}`:!h.value&&!w.value?u.value?((x=a.i18n)==null?void 0:x.placeholderSearch)??"Search":((C=a.i18n)==null?void 0:C.placeholderDefault)??"Select an option":u.value?((c=a.i18n)==null?void 0:c.placeholderSearch)??"Search":!a.singleModelValue&&!w.value?"":(S=P.value.find(F=>{var me;return F.value===((me=X.value)==null?void 0:me.value)}))==null?void 0:S.label}),ce=e.computed(()=>k.value===""),Ne=e.computed(()=>!(ce.value||!n.value&&N.value!==""&&k.value===N.value&&!a.hasReset)),Me=e.computed(()=>ue.value&&!!a.hasReset&&ce.value&&(n.value||!u.value)),Ie=!!(r!=null&&r.onAddOption),Pe=()=>{f("add-option"),V()},le=e.computed(()=>{var l;return!u.value&&!n.value&&((l=w.value)==null?void 0:l.labelPrefixComponent)}),de=`search-select-options-${Math.random().toString(36).substring(2,9)}`;return v({flushMemoryCachedSelectedOptions:()=>H.value=[],close:V}),(l,o)=>{var i,x,C;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ut,[e.createElementVNode("div",{ref_key:"wrapperRef",ref:M,class:e.normalizeClass(["relative flex items-end",{[`${t.rootClass}`]:t.rootClass,"z-30":u.value}]),role:"combobox","aria-expanded":u.value,"aria-haspopup":!0,"aria-controls":de,onKeydown:ye},[e.createVNode(e.unref(De._sfc_main),{ref_key:"inputRef",ref:ve,modelValue:k.value,"onUpdate:modelValue":o[2]||(o[2]=c=>k.value=c),required:t.required,label:t.label,name:t.name,form:t.form,"label-screen-reader-only":t.labelScreenReaderOnly,placeholder:Ee.value,class:"grow","wrapper-class":[t.wrapperClass,{"border-transparent border border-b-gray-200 focus-within:border-b relative z-10 rounded-b-none":u.value}],"input-class":!u.value&&(!n.value&&e.unref(h)||n.value&&!e.unref(R.isEmpty)(t.multiModelValue))?"text-ellipsis placeholder:text-default":"","suffix-class":"border-l-0",disabled:t.disabled,size:t.size,error:t.error,"prefix-has-border":Y.value,"aria-autocomplete":"list",onFocus:pe,onClick:he,onInput:be,onBlur:o[3]||(o[3]=c=>l.$emit("blur"))},e.createSlots({"label-suffix":e.withCtx(()=>[e.renderSlot(l.$slots,"label-suffix")]),suffix:e.withCtx(()=>{var c;return[e.createElementVNode("div",ft,[!u.value&&!n.value&&((c=w.value)!=null&&c.labelInlineComponent)&&(!t.showSuffixInClosedInput||t.showSuffixLabelInInput)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value.labelInlineComponent.component),e.normalizeProps(e.mergeProps({key:0},w.value.labelInlineComponent.props)),null,16)):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(te.value.component),e.normalizeProps(e.mergeProps({key:1},te.value.props)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("div",vt,[Me.value?(e.openBlock(),e.createBlock(fe._sfc_main,{key:0,icon:"close",size:"sm",intent:"subtle",type:"button",onMousedown:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),onClick:W})):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createBlock(fe._sfc_main,{key:1,icon:"close",size:"sm",intent:"subtle",type:"button",onClick:Be})):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"flex aspect-square items-center justify-center self-stretch text-gray-800",onMousedown:o[1]||(o[1]=e.withModifiers(()=>{},["prevent"])),onClick:Ve},[e.createVNode(U._sfc_main$1,{icon:u.value?"keyboard_arrow_up":"keyboard_arrow_down",size:t.size==="xs"?"xs":"sm"},null,8,["icon","size"])],32)])])]}),_:2},[l.$slots.tooltip?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip")]),key:"0"}:void 0,T.value?{name:"input",fn:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none absolute inset-0 flex items-center gap-1",Ce.value])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(T.value.component.component),e.normalizeProps(e.guardReactiveProps(T.value.component.props)),null,16)),T.value.extraCount>0?(e.openBlock(),e.createBlock(e.unref(D._sfc_main),{key:0,variant:t.size==="xs"||t.size==="sm"?"body-xs":"body-sm",tag:"span",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(T.value.extraCount),1)]),_:1},8,["variant"])):e.createCommentVNode("",!0)],2)]),key:"1"}:void 0,K.value||le.value||!d?{name:"prefix",fn:e.withCtx(()=>{var c;return[e.createElementVNode("div",dt,[j.value?e.renderSlot(l.$slots,"prefix",{},void 0,void 0,0):I.value?(e.openBlock(),e.createBlock(e.unref(D._sfc_main),{key:1,variant:t.size==="xs"?"body-xs":"body-sm",tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.prefix),1)]),_:1},8,["variant"])):le.value&&((c=w.value)!=null&&c.labelPrefixComponent)?(e.openBlock(),e.createElementBlock("div",mt,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value.labelPrefixComponent.component),e.normalizeProps(e.guardReactiveProps(w.value.labelPrefixComponent.props)),null,16))])):d?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(U._sfc_main$1,{key:3,icon:"search",size:"sm"}))])]}),key:"2"}:void 0,l.$slots.helper?{name:"helper",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"helper")]),key:"3"}:void 0]),1032,["modelValue","required","label","name","form","label-screen-reader-only","placeholder","wrapper-class","input-class","disabled","size","error","prefix-has-border"])],42,ct),t.withChips?(e.openBlock(),e.createElementBlock("div",pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,({value:c,label:S})=>(e.openBlock(),e.createBlock(Oe._sfc_main,{key:c,removable:!se(c),onRemoved:F=>ie({value:c,checked:!1})},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:S},null,8,ht)]),_:2},1032,["removable","onRemoved"]))),128))])):e.createCommentVNode("",!0)]),e.unref(Z)&&e.unref(p)?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:e.unref(p)},[u.value&&!t.disabled?(e.openBlock(),e.createElementBlock("div",{key:0,id:de,ref_key:"optionsRef",ref:z,role:"listbox",style:e.normalizeStyle(e.unref(ge)),class:"z-70 overflow-y-auto rounded border border-gray-200 bg-white drop-shadow-md",onMouseenter:o[4]||(o[4]=c=>u.value=!0),onKeydown:ke},[e.createElementVNode("div",{class:"rounded pt-0",style:e.normalizeStyle({width:`${e.unref(xe)}px`})},[e.createVNode(it,{i18n:{addOnly:(i=t.i18n)==null?void 0:i.addOnly,noResults:(x=t.i18n)==null?void 0:x.noResults,noOptionsAvailable:(C=t.i18n)==null?void 0:C.noOptionsAvailable},options:we.value,multiple:n.value,search:k.value,model:B.value,"add-only":t.addOnly,"allows-multiple-values":!!n.value,condensed:t.condensed,"has-large-dropdown":t.hasLargeDropdown,onValueChanged:ie},{"list-footer-content":e.withCtx(()=>[Ie?(e.openBlock(),e.createBlock(U._sfc_main,{key:0,intent:"subtle",class:"w-full rounded-t-none",type:"button","icon-prefix":"add",onClick:Pe},{default:e.withCtx(()=>{var c;return[e.createTextVNode(e.toDisplayString((c=t.i18n)==null?void 0:c.addOption),1)]}),_:1})):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["flex items-center justify-between",{"py-2":!l.$slots["list-footer-content"]}])},[ue.value?(e.openBlock(),e.createBlock(U._sfc_main,{key:0,type:"button",intent:"subtle",size:"xs",class:"ml-2",onClick:W},{default:e.withCtx(()=>{var c;return[e.createTextVNode(e.toDisplayString(((c=t.i18n)==null?void 0:c.multipleValuesClearButtonText)??"Clear"),1)]}),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.renderSlot(l.$slots,"list-footer-content",{close:V})]),e.createVNode(U._sfc_main,{type:"button",intent:"secondary",size:"xs",class:"mr-2","data-testid":e.unref(We),onClick:V},{default:e.withCtx(()=>{var c;return[e.createTextVNode(e.toDisplayString(((c=t.i18n)==null?void 0:c.multipleValuesDoneButtonText)??"Done"),1)]}),_:1},8,["data-testid"])],2)):e.renderSlot(l.$slots,"list-footer-content",{close:V},void 0,void 0,2)]),_:3},8,["i18n","options","multiple","search","model","add-only","allows-multiple-values","condensed","has-large-dropdown"])],4)],36)):e.createCommentVNode("",!0)],8,["to"])):e.createCommentVNode("",!0)],64)}}}),yt=e.defineComponent({__name:"CountrySelect",props:{label:{},singleModelValue:{},multiModelValue:{},error:{},required:{type:Boolean,default:!0},hasReset:{type:Boolean},disabled:{type:Boolean},name:{},form:{}},emits:["update:modelValue","update:singleModelValue"],setup(t,{emit:v}){const b=t,s=L.useVModel(b,"singleModelValue"),a=L.useVModel(b,"multiModelValue"),p=v;return(r,d)=>(e.openBlock(),e.createBlock(bt,{"multi-model-value":e.unref(a),"onUpdate:multiModelValue":d[0]||(d[0]=n=>e.isRef(a)?a.value=n:null),"single-model-value":e.unref(s),"onUpdate:singleModelValue":[d[1]||(d[1]=n=>e.isRef(s)?s.value=n:null),d[2]||(d[2]=n=>{p("update:modelValue",n)})],"root-class":r.$attrs.class,label:t.label,options:e.unref($e.countryData).map(({key:n,value:m})=>({label:m,value:n})),error:t.error,"has-reset":t.hasReset,disabled:t.disabled,required:t.required,"with-chips":!!t.multiModelValue,name:t.name,form:t.form},{"label-suffix":e.withCtx(()=>[e.renderSlot(r.$slots,"label-suffix")]),_:3},8,["multi-model-value","single-model-value","root-class","label","options","error","has-reset","disabled","required","with-chips","name","form"]))}}),kt={class:"flex grow flex-col"},gt=e.defineComponent({__name:"CompanyPurchaseToggle",props:e.mergeModels({noSpacing:{type:Boolean}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const v=e.useModel(t,"modelValue"),{$t:b}=D.useIntl();return(s,a)=>(e.openBlock(),e.createBlock(e.unref(ze._sfc_main),{modelValue:v.value,"onUpdate:modelValue":a[0]||(a[0]=p=>v.value=p),"no-spacing":t.noSpacing,"label-position":"before"},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",kt,[e.createVNode(e.unref(D._sfc_main),{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b)({defaultMessage:"Company purchase",id:"checkout.company_purchase_toggle.title",description:"The title of the company purchase toggle in the checkout"})),1)]),_:1}),e.createVNode(e.unref(D._sfc_main),{tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b)({defaultMessage:"I am purchasing on behalf of a company",id:"checkout.company_purchase_toggle.sub_title",description:"The subtitle of the company purchase toggle in the checkout"})),1)]),_:1})])]),_:1},8,["modelValue","no-spacing"]))}});function xt(){const{$t:t}=D.useIntl();return{contactInformationTitle:t({defaultMessage:"Customer information",id:"checkout.contact_information_block.title",description:"The title of the contact information block in the checkout form"}),emailLabel:t({defaultMessage:"Email address",id:"checkout.email_address.label",description:"The email address of the customer in the checkout form"}),emailPlaceholder:t({defaultMessage:"Email address...",id:"checkout.email_address.placeholder",description:"The email address of the customer in the checkout form"}),countryLabel:t({defaultMessage:"Billing country",id:"checkout.country.label",description:"The country of the customer in the checkout form"}),vatNumberLabel:t({defaultMessage:"VAT number",id:"checkout.vat_number.label",description:"The label for the vat number in the checkout form"}),vatNumberPlaceholder:t({defaultMessage:"VAT number...",id:"checkout.vat_number.placeholder",description:"The label for the vat number in the checkout form"}),legalNameLabel:t({defaultMessage:"Legal entity name",id:"checkout.legal_name.label",description:"The legal name of the organization customer in the checkout form"}),legalNamePlaceholder:t({defaultMessage:"Legal entity name...",id:"checkout.legal_name.placeholder",description:"The legal name of the organization customer in the checkout form"}),addressTitle:t({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),postalCodePlaceholder:t({defaultMessage:"Postal code...",id:"checkout.address.portal_code.placeholder",description:"Postal code of the customer address in the checkout form"}),cityPlaceholder:t({defaultMessage:"City...",id:"checkout.address.city.placeholder",description:"City of the customer address in the checkout form"}),statePlaceholder:t({defaultMessage:"State...",id:"checkout.address.state.placeholder",description:"State of the customer address in the checkout form"})}}exports._sfc_main=yt;exports._sfc_main$1=gt;exports.objectDiff=Re;exports.useCustomerFormLabels=xt;
|
|
1
|
+
const R=require("./useService-H7BjLg8P.js"),e=require("vue"),L=require("./index.es-BclokHQX.js"),$e=require("./countryData.es-C4jHBzfo.js"),O=require("./floating-ui.vue.es-Bly3DGWm.js"),E=require("./sorting.es-DQsjKr8A.js"),D=require("./customElements-DUMRMFQ5.js"),fe=require("./IconButton.vue.es-DgQN18Am.js"),U=require("./Button.vue.es-BzkuglKw.js"),Oe=require("./Chip.vue.es-B2jjzIOc.js"),De=require("./Input.vue.es-B60eK8Ds.js"),ze=require("./formControl-ODrpUvcA.js"),oe=t=>R.isEmpty(t)&&typeof t!="boolean"?null:t,G=t=>typeof t=="object"&&t!==null,Te=({from:t,to:v,nullifyEmptyValues:b=!1})=>{const s=Object.fromEntries(Object.entries(v).filter(([a,p])=>!R.deepEqual(p,t[a])));return b?Object.entries(s).reduce((a,[p,r])=>({...a,[p]:oe(r)}),{}):s},Le=({from:t,to:v,nullifyEmptyValues:b=!1})=>{const s={},a=(r,d,n)=>{const m=d[n];return r===void 0?Array.isArray(m)?s[n]=[]:G(m)&&(s[n]={}):Array.isArray(m)?r[n]=[]:G(m)&&(r[n]={}),[r===void 0?s:r,n]},p=(r,d,n)=>{for(const m of Object.keys(r)){const f=a(n,r,m);m in d||(f[0][f[1]]={from:r[m]})}for(const[m,f]of Object.entries(d)){const h=m in r,y=a(n,r,m);if(h){const g=r[m];R.deepEqual(g,f)?delete y[0][y[1]]:G(f)&&G(g)?p(g,f,y[0][y[1]]):y[0][y[1]]=b&&typeof f!="boolean"?oe(f):f}else y[0][y[1]]=b?oe(f):f}};return p(t,v),s},Re=({from:t,to:v,mode:b="shallow",nullifyEmptyValues:s=!1})=>b==="deep"?Le({from:t,to:v,nullifyEmptyValues:s}):Te({from:t,to:v,nullifyEmptyValues:s});function qe(t,v,b=[]){return[...t].sort((s,a)=>{for(let p=0;p<v.length;p++){const r=v[p],d=typeof r=="function"?r:h=>h[r],n=b[p]==="desc"?-1:1,m=d(s),f=d(a);if(!(m==null&&f==null)){if(m==null)return n;if(f==null||m<f)return-n;if(m>f)return n}}return 0})}const Ae={},Fe={class:"flex items-center pt-1"},Ue={class:"px-1.5 text-xs font-semibold text-subtle"};function je(t,v){return e.openBlock(),e.createElementBlock("div",Fe,[v[0]||(v[0]=e.createElementVNode("div",{class:"w-2 border-t"},null,-1)),e.createElementVNode("span",Ue,[e.renderSlot(t.$slots,"default")]),v[1]||(v[1]=e.createElementVNode("div",{class:"grow border-t"},null,-1))])}const Ke=O._export_sfc(Ae,[["render",je]]),He=t=>`checkbox-item-${t}`,We="select-search-done-button",Ge=["aria-selected","aria-disabled","data-testid","onKeydown"],Qe=["id","value","checked","disabled"],Ye=["for"],Je={class:"flex min-w-0 items-center gap-1"},Xe={class:"flex min-w-0 flex-grow flex-col"},Ze={class:"flex min-w-0 flex-grow gap-2"},_e={class:"flex min-w-0 flex-grow flex-col"},et={class:"flex min-w-0 flex-grow items-center gap-2"},tt=e.defineComponent({__name:"SearchSelectInputOption",props:{multiple:{type:Boolean},search:{},condensed:{type:Boolean},label:{},checked:{type:Boolean},disabled:{type:Boolean},subLabel:{},labelPrefixComponent:{},labelSuffixComponent:{},labelInlineComponent:{},value:{},labelSrOnly:{type:Boolean}},emits:["value-changed"],setup(t,{emit:v}){const b=v,s=t,a=n=>{const m=n.target,f={value:m.value,checked:m.checked};b("value-changed",f)},p=()=>{s.multiple||s.disabled||b("value-changed",{value:s.value})},r=e.computed(()=>He(s.value)),d=e.computed(()=>E.escapeUserInput(s.search??""));return(n,m)=>(e.openBlock(),e.createElementBlock("li",{role:"option","aria-selected":t.checked,"aria-disabled":t.disabled,class:e.normalizeClass([{"hover:bg-gray-100":!t.disabled},"relative flex"]),"data-testid":r.value,tabindex:"0",onClick:p,onKeydown:e.withKeys(e.withModifiers(p,["prevent"]),["enter"])},[t.multiple?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("input",e.mergeProps(n.$attrs,{id:r.value,ref:"inputRef",value:t.value,checked:t.checked,disabled:t.disabled,type:"checkbox",class:["absolute left-3.5 top-1/2 h-4 w-4 -translate-y-2 rounded border-gray-300 bg-gray-100 focus:ring-2 focus:ring-primary-500",t.disabled?"text-disabled":"text-primary-600"],tabindex:"-1",onChange:a}),null,16,Qe),e.createElementVNode("label",{for:r.value,class:e.normalizeClass([t.disabled?"text-disabled":"rounded text-default","w-full px-4 py-3 pl-10 text-sm font-medium"])},[e.createElementVNode("div",Je,[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.createElementVNode("div",Xe,[e.createElementVNode("div",Ze,[e.createVNode(E._sfc_main,{text:t.label,search:d.value,title:t.label,class:e.normalizeClass(["truncate font-semibold",{"sr-only":t.labelSrOnly}])},null,8,["text","search","title","class"]),t.labelInlineComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelInlineComponent.component),e.normalizeProps(e.mergeProps({key:0},t.labelInlineComponent.props)),null,16)):e.createCommentVNode("",!0),t.subLabel&&t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.subLabel&&!t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.labelSuffixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelSuffixComponent.component),e.normalizeProps(e.mergeProps({key:1},t.labelSuffixComponent.props)),null,16)):e.createCommentVNode("",!0)])],10,Ye)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["flex w-full min-w-0 items-center gap-3 px-4 text-sm font-medium",[t.condensed?"p-2":"py-3",t.disabled??"cursor-not-allowed",!t.disabled&&"cursor-pointer"]])},[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.createElementVNode("div",_e,[e.createElementVNode("div",et,[e.createVNode(E._sfc_main,{text:t.label,search:e.unref(E.escapeUserInput)(t.search??""),title:t.label,class:e.normalizeClass(["truncate font-semibold",{"text-disabled":t.disabled}])},null,8,["text","search","title","class"]),t.labelInlineComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelInlineComponent.component),e.normalizeProps(e.mergeProps({key:0},t.labelInlineComponent.props)),null,16)):e.createCommentVNode("",!0),t.subLabel&&t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.subLabel&&!t.condensed?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,class:"truncate text-xs text-secondary",text:t.subLabel,title:t.subLabel,search:d.value},null,8,["text","title","search"])):e.createCommentVNode("",!0)]),t.labelSuffixComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.labelSuffixComponent.component),e.normalizeProps(e.mergeProps({key:1},t.labelSuffixComponent.props)),null,16)):e.createCommentVNode("",!0)],2))],42,Ge))}}),lt={class:"flex flex-col rounded-bl rounded-br"},ot={key:0,class:"px-5 py-5 text-sm text-secondary"},nt={key:0},at=["innerHTML"],st={key:0},rt={class:"mt-1 px-3 py-2 text-sm text-secondary"},it=e.defineComponent({__name:"SearchSelectInputOptions",props:{i18n:{},model:{},search:{},multiple:{type:Boolean},condensed:{type:Boolean},hasLargeDropdown:{type:Boolean},addOnly:{type:Boolean},options:{}},emits:["value-changed"],setup(t,{emit:v}){const b=v,s=t,a=h=>b("value-changed",h),p=e.computed(()=>{var h,y;const g=s.search?`<span class="font-bold">"${E.escapeUserInput(s.search)}"</span>`:"";return((y=(h=s.i18n)==null?void 0:h.noResults)==null?void 0:y.call(h,g))??`No matches found for ${g}.`}),r=e.computed(()=>s.search===""),d=e.computed(()=>s.options.filter(h=>!h.hidden)),n=e.computed(()=>d.value.length>0),m=e.computed(()=>n.value?!1:r.value?!0:!!p.value),f=e.computed(()=>E.sortedUniqBy(s.options,"group").reduce((h,y)=>y.value===""?h:{...h,[y.value]:y.group},{}));return(h,y)=>{var g,k;return e.openBlock(),e.createElementBlock("div",lt,[m.value?(e.openBlock(),e.createElementBlock("div",ot,[r.value?(e.openBlock(),e.createElementBlock("span",nt,e.toDisplayString(((g=s.i18n)==null?void 0:g.noOptionsAvailable)??"No available options."),1)):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:p.value},null,8,at))])):n.value?(e.openBlock(),e.createElementBlock("ul",{key:1,class:e.normalizeClass(["list-none overflow-y-auto",[t.hasLargeDropdown?"max-h-[19rem]":"max-h-48"]])},[t.addOnly?(e.openBlock(),e.createElementBlock("div",st,[e.createElementVNode("p",rt,e.toDisplayString(((k=t.i18n)==null?void 0:k.addOnly)??"You can only select currently unselected options."),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,({label:Q,subLabel:j,value:I,checked:K,disabled:Y,labelInlineComponent:B,labelSuffixComponent:J,labelSrOnly:X,labelPrefixComponent:Z,searchValues:u})=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:I},[f.value[I]?(e.openBlock(),e.createBlock(Ke,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value[I]),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(tt,{label:Q,"sub-label":j,value:I,checked:K,disabled:Y,search:u?"":t.search,multiple:t.multiple,condensed:t.condensed,"label-suffix-component":J,"label-prefix-component":Z,"label-inline-component":B,"label-sr-only":X,onValueChanged:a},null,8,["label","sub-label","value","checked","disabled","search","multiple","condensed","label-suffix-component","label-prefix-component","label-inline-component","label-sr-only"])],64))),128))],2)):e.createCommentVNode("",!0),h.$slots["list-footer-content"]?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"border-t border-gray-200":n.value})},[e.renderSlot(h.$slots,"list-footer-content")],2)):e.createCommentVNode("",!0)])}}}),ut={class:"flex flex-col gap-2"},ct=["aria-expanded"],dt={class:"flex items-center gap-2"},mt={key:2},ft={class:"flex items-center gap-2 self-stretch"},vt={class:"flex items-center self-stretch pr-1"},pt={key:0,class:"flex flex-wrap gap-2"},ht=["innerHTML"],bt=e.defineComponent({__name:"SearchSelectInput",props:e.mergeModels({addOnly:{type:Boolean,default:!1},disabled:{type:Boolean},i18n:{},label:{},labelScreenReaderOnly:{type:Boolean},singleModelValue:{},multiModelValue:{},options:{default:()=>[]},optionsOrder:{default:()=>["asc","asc"]},optionsOrderProperties:{default:()=>["group","label"]},required:{type:Boolean,default:!1},rootClass:{},wrapperClass:{},size:{default:"md"},withChips:{type:Boolean,default:!1},error:{},hasReset:{type:Boolean},name:{},hasLargeDropdown:{type:Boolean,default:!1},showSuffixInClosedInput:{type:Boolean},showSuffixLabelInInput:{type:Boolean},showSelectionInClosedInput:{type:Boolean},condensed:{type:Boolean},form:{},prefix:{}},{search:{default:""},searchModifiers:{}}),emits:e.mergeModels(["update:singleModelValue","update:multiModelValue","blur","change","focus","add-option"],["update:search"]),setup(t,{expose:v,emit:b}){var s;const a=t,p=e.inject(D.SEARCH_SELECT_TELEPORT_TARGET),r=(s=e.getCurrentInstance())==null?void 0:s.vnode.props,d=!(r!=null&&r["onUpdate:search"]),n=e.computed(()=>Array.isArray(a.multiModelValue)),m=e.ref(a.singleModelValue),f=b,h=L.useVModel(a,"singleModelValue",f),y=L.useVModel(a,"multiModelValue",f),g=e.ref(y.value??[]);e.watch(()=>a.multiModelValue,l=>{l&&(g.value=l)});const k=e.useModel(t,"search"),Q=e.useSlots(),j=e.computed(()=>!!Q.prefix),I=e.computed(()=>!!a.prefix),K=e.computed(()=>j.value||I.value),Y=e.computed(()=>K.value||!le.value),B=e.computed({get:()=>n.value?g.value??[]:typeof h.value=="string"?[h.value]:[],set(l){n.value?g.value=l:h.value=(l==null?void 0:l[0])??""}}),J=e.computed(()=>P.value.filter(l=>{var o;return(o=B.value)==null?void 0:o.includes(l.value)})),X=e.computed(()=>J.value[0]),Z=E.useIsMounted(),u=e.ref(!1),z=e.ref(),M=e.ref(),ve=e.ref(),ne=()=>z.value?Array.from(z.value.querySelectorAll('li[tabindex="0"], button:not([disabled])')):[],ae=()=>{var l;let o=document.activeElement;for(;(l=o==null?void 0:o.shadowRoot)!=null&&l.activeElement;)o=o.shadowRoot.activeElement;return o},q=()=>{if(!M.value)return null;let l=M.value.querySelector("input");if(l)return l;const o=M.value.querySelectorAll("*");for(const i of o)if(i.shadowRoot&&(l=i.shadowRoot.querySelector("input"),l))return l;return null};let _=!1;const ee=()=>{var l;_=!0,(l=q())==null||l.focus(),_=!1},N=e.ref(""),A=e.ref(!1),pe=()=>{_||(u.value=!0)},he=l=>{l.target===q()&&(u.value=!0)},be=()=>{a.disabled||(A.value=!0,u.value=!0)},ye=l=>{var o;if(!u.value)return;const i=ne(),x=q();if(ae()===x)switch(l.key){case"ArrowDown":i.length>0&&(l.preventDefault(),(o=i[0])==null||o.focus());break;case"Tab":V();break;case"Escape":l.preventDefault(),V();break}},ke=l=>{var o,i,x;const C=ne(),c=ae(),S=C.indexOf(c),F=q();switch(l.key){case"ArrowDown":S<C.length-1&&(l.preventDefault(),(o=C[S+1])==null||o.focus());break;case"ArrowUp":l.preventDefault(),S<=0?F==null||F.focus():(i=C[S-1])==null||i.focus();break;case"Tab":if(l.preventDefault(),l.shiftKey&&S>0){(x=C[S-1])==null||x.focus();break}V(),ee();break;case"Escape":l.preventDefault(),V(),ee();break}},{floatingStyles:ge}=O.useFloating(M,z,{whileElementsMounted:O.autoUpdate,placement:"bottom",middleware:[O.offset(4),O.flip({mainAxis:!0}),O.shift({padding:8}),O.size({padding:8,apply({availableHeight:l,elements:o}){Object.assign(o.floating.style,{maxHeight:`${l}px`})}})]}),{width:xe}=L.useElementSize(M),se=l=>{var o;return a.disabled||!a.disabled&&a.addOnly&&!!((o=m.value)!=null&&o.includes(l))},P=e.computed(()=>{const l=a.options.map(i=>({...i,checked:B.value.includes(i.value),disabled:i.disabled??se(i.value)})),o=[...l,...k.value.length===0&&H.value?H.value.filter(i=>!l.some(x=>x.value===i.value)):[]];return a.optionsOrderProperties&&!R.isEmpty(a.optionsOrderProperties)?qe(o,a.optionsOrderProperties,a.optionsOrder):o}),re=l=>P.value.filter(o=>l.some(i=>o.value===i)),$=e.computed(()=>re(B.value)),w=e.computed(()=>$.value[0]),te=e.computed(()=>{var l;if(!(u.value||!a.showSuffixInClosedInput)&&!(n.value&&$.value.length!==1))return(l=w.value)==null?void 0:l.labelSuffixComponent}),T=e.computed(()=>{var l;if(!a.showSelectionInClosedInput||u.value||!n.value)return;const o=(l=w.value)==null?void 0:l.labelPrefixComponent;if(o)return{component:o,extraCount:$.value.length-1}}),Ce=e.computed(()=>a.size==="xs"?"px-1":a.size==="sm"?"px-2":"px-4"),H=e.ref([]);e.watch(()=>{var l;if(n.value)return null;const o=h.value??"";return{selectedValue:o,label:((l=a.options.find(i=>i.value===o))==null?void 0:l.label)??""}},l=>{if(l){if(!l.selectedValue){N.value="",u.value||(k.value="");return}l.label&&(N.value=l.label,!u.value&&k.value===""&&(k.value=l.label))}},{immediate:!0});const ie=({value:l,checked:o})=>{var i;let x;n.value?x=o?[...B.value,l]:B.value.filter(C=>C!==l):(x=[l],N.value=((i=P.value.find(C=>C.value===l))==null?void 0:i.label)??"",k.value=N.value,A.value=!1,u.value=!1,ee()),H.value=re(x),B.value=x,f("change")},ue=e.computed(()=>B.value.length>0&&!a.disabled&&!(B.value.length===1&&B.value[0]==="")),W=()=>{B.value=[],g.value=[],n.value||(N.value="",k.value="",A.value=!1)},Be=()=>{if(!n.value&&N.value&&k.value===N.value){W();return}k.value=""},we=e.computed(()=>{if(!d||!n.value&&!A.value)return P.value;const l=k.value.toLowerCase();return P.value.filter(o=>o.searchValues?o.searchValues.some(i=>i.toLowerCase().includes(l)):(o.label??"").toLowerCase().includes(l))}),V=()=>{n.value?(y.value=g.value,k.value=""):k.value===""&&a.hasReset?W():(k.value=N.value,A.value=!1),u.value=!1},Ve=()=>{var l;u.value?V():(u.value=!0,(l=q())==null||l.focus())};e.watch(g,()=>{!u.value&&!R.isEqual(y.value,g.value)&&n.value&&(y.value=g.value)});const Se=l=>{const o=l.composedPath();z.value&&o.includes(z.value)||M.value&&o.includes(M.value)||u.value&&V()};L.useEventListener("mousedown",Se);const Ee=e.computed(()=>{var l,o,i,x,C,c,S;return n.value&&u.value?((l=a.i18n)==null?void 0:l.placeholderSearch)??"Search":T.value?"":n.value&&$.value.length===1?(o=w.value)==null?void 0:o.label:n.value&&$.value.length>=2?`${(i=w.value)==null?void 0:i.label} +${$.value.length-1}`:!h.value&&!w.value?u.value?((x=a.i18n)==null?void 0:x.placeholderSearch)??"Search":((C=a.i18n)==null?void 0:C.placeholderDefault)??"Select an option":u.value?((c=a.i18n)==null?void 0:c.placeholderSearch)??"Search":!a.singleModelValue&&!w.value?"":(S=P.value.find(F=>{var me;return F.value===((me=X.value)==null?void 0:me.value)}))==null?void 0:S.label}),ce=e.computed(()=>k.value===""),Ne=e.computed(()=>!(ce.value||!n.value&&N.value!==""&&k.value===N.value&&!a.hasReset)),Me=e.computed(()=>ue.value&&!!a.hasReset&&ce.value&&(n.value||!u.value)),Ie=!!(r!=null&&r.onAddOption),Pe=()=>{f("add-option"),V()},le=e.computed(()=>{var l;return!u.value&&!n.value&&((l=w.value)==null?void 0:l.labelPrefixComponent)}),de=`search-select-options-${Math.random().toString(36).substring(2,9)}`;return v({flushMemoryCachedSelectedOptions:()=>H.value=[],close:V}),(l,o)=>{var i,x,C;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ut,[e.createElementVNode("div",{ref_key:"wrapperRef",ref:M,class:e.normalizeClass(["relative flex items-end",{[`${t.rootClass}`]:t.rootClass,"z-30":u.value}]),role:"combobox","aria-expanded":u.value,"aria-haspopup":!0,"aria-controls":de,onKeydown:ye},[e.createVNode(e.unref(De._sfc_main),{ref_key:"inputRef",ref:ve,modelValue:k.value,"onUpdate:modelValue":o[2]||(o[2]=c=>k.value=c),required:t.required,label:t.label,name:t.name,form:t.form,"label-screen-reader-only":t.labelScreenReaderOnly,placeholder:Ee.value,class:"grow","wrapper-class":[t.wrapperClass,{"border-transparent border border-b-gray-200 focus-within:border-b relative z-10 rounded-b-none":u.value}],"input-class":!u.value&&(!n.value&&e.unref(h)||n.value&&!e.unref(R.isEmpty)(t.multiModelValue))?"text-ellipsis placeholder:text-default":"","suffix-class":"border-l-0",disabled:t.disabled,size:t.size,error:t.error,"prefix-has-border":Y.value,"aria-autocomplete":"list",onFocus:pe,onClick:he,onInput:be,onBlur:o[3]||(o[3]=c=>l.$emit("blur"))},e.createSlots({"label-suffix":e.withCtx(()=>[e.renderSlot(l.$slots,"label-suffix")]),suffix:e.withCtx(()=>{var c;return[e.createElementVNode("div",ft,[!u.value&&!n.value&&((c=w.value)!=null&&c.labelInlineComponent)&&(!t.showSuffixInClosedInput||t.showSuffixLabelInInput)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value.labelInlineComponent.component),e.normalizeProps(e.mergeProps({key:0},w.value.labelInlineComponent.props)),null,16)):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(te.value.component),e.normalizeProps(e.mergeProps({key:1},te.value.props)),null,16)):e.createCommentVNode("",!0),e.createElementVNode("div",vt,[Me.value?(e.openBlock(),e.createBlock(fe._sfc_main,{key:0,icon:"close",size:"sm",intent:"subtle",type:"button",onMousedown:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),onClick:W})):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createBlock(fe._sfc_main,{key:1,icon:"close",size:"sm",intent:"subtle",type:"button",onClick:Be})):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"flex aspect-square items-center justify-center self-stretch text-gray-800",onMousedown:o[1]||(o[1]=e.withModifiers(()=>{},["prevent"])),onClick:Ve},[e.createVNode(U._sfc_main$1,{icon:u.value?"keyboard_arrow_up":"keyboard_arrow_down",size:t.size==="xs"?"xs":"sm"},null,8,["icon","size"])],32)])])]}),_:2},[l.$slots.tooltip?{name:"tooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip")]),key:"0"}:void 0,T.value?{name:"input",fn:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none absolute inset-0 flex items-center gap-1",Ce.value])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(T.value.component.component),e.normalizeProps(e.guardReactiveProps(T.value.component.props)),null,16)),T.value.extraCount>0?(e.openBlock(),e.createBlock(e.unref(D._sfc_main),{key:0,variant:t.size==="xs"||t.size==="sm"?"body-xs":"body-sm",tag:"span",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(T.value.extraCount),1)]),_:1},8,["variant"])):e.createCommentVNode("",!0)],2)]),key:"1"}:void 0,K.value||le.value||!d?{name:"prefix",fn:e.withCtx(()=>{var c;return[e.createElementVNode("div",dt,[j.value?e.renderSlot(l.$slots,"prefix",{},void 0,void 0,0):I.value?(e.openBlock(),e.createBlock(e.unref(D._sfc_main),{key:1,variant:t.size==="xs"?"body-xs":"body-sm",tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.prefix),1)]),_:1},8,["variant"])):le.value&&((c=w.value)!=null&&c.labelPrefixComponent)?(e.openBlock(),e.createElementBlock("div",mt,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value.labelPrefixComponent.component),e.normalizeProps(e.guardReactiveProps(w.value.labelPrefixComponent.props)),null,16))])):d?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(U._sfc_main$1,{key:3,icon:"search",size:"sm"}))])]}),key:"2"}:void 0,l.$slots.helper?{name:"helper",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"helper")]),key:"3"}:void 0]),1032,["modelValue","required","label","name","form","label-screen-reader-only","placeholder","wrapper-class","input-class","disabled","size","error","prefix-has-border"])],42,ct),t.withChips?(e.openBlock(),e.createElementBlock("div",pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,({value:c,label:S})=>(e.openBlock(),e.createBlock(Oe._sfc_main,{key:c,removable:!se(c),onRemoved:F=>ie({value:c,checked:!1})},{default:e.withCtx(()=>[e.createElementVNode("span",{innerHTML:S},null,8,ht)]),_:2},1032,["removable","onRemoved"]))),128))])):e.createCommentVNode("",!0)]),e.unref(Z)&&e.unref(p)?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:e.unref(p)},[u.value&&!t.disabled?(e.openBlock(),e.createElementBlock("div",{key:0,id:de,ref_key:"optionsRef",ref:z,role:"listbox",style:e.normalizeStyle(e.unref(ge)),class:"z-70 overflow-y-auto rounded border border-gray-200 bg-white drop-shadow-md",onMouseenter:o[4]||(o[4]=c=>u.value=!0),onKeydown:ke},[e.createElementVNode("div",{class:"rounded pt-0",style:e.normalizeStyle({width:`${e.unref(xe)}px`})},[e.createVNode(it,{i18n:{addOnly:(i=t.i18n)==null?void 0:i.addOnly,noResults:(x=t.i18n)==null?void 0:x.noResults,noOptionsAvailable:(C=t.i18n)==null?void 0:C.noOptionsAvailable},options:we.value,multiple:n.value,search:k.value,model:B.value,"add-only":t.addOnly,"allows-multiple-values":!!n.value,condensed:t.condensed,"has-large-dropdown":t.hasLargeDropdown,onValueChanged:ie},{"list-footer-content":e.withCtx(()=>[Ie?(e.openBlock(),e.createBlock(U._sfc_main,{key:0,intent:"subtle",class:"w-full rounded-t-none",type:"button","icon-prefix":"add",onClick:Pe},{default:e.withCtx(()=>{var c;return[e.createTextVNode(e.toDisplayString((c=t.i18n)==null?void 0:c.addOption),1)]}),_:1})):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["flex items-center justify-between",{"py-2":!l.$slots["list-footer-content"]}])},[ue.value?(e.openBlock(),e.createBlock(U._sfc_main,{key:0,type:"button",intent:"subtle",size:"xs",class:"ml-2",onClick:W},{default:e.withCtx(()=>{var c;return[e.createTextVNode(e.toDisplayString(((c=t.i18n)==null?void 0:c.multipleValuesClearButtonText)??"Clear"),1)]}),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.renderSlot(l.$slots,"list-footer-content",{close:V})]),e.createVNode(U._sfc_main,{type:"button",intent:"secondary",size:"xs",class:"mr-2","data-testid":e.unref(We),onClick:V},{default:e.withCtx(()=>{var c;return[e.createTextVNode(e.toDisplayString(((c=t.i18n)==null?void 0:c.multipleValuesDoneButtonText)??"Done"),1)]}),_:1},8,["data-testid"])],2)):e.renderSlot(l.$slots,"list-footer-content",{close:V},void 0,void 0,2)]),_:3},8,["i18n","options","multiple","search","model","add-only","allows-multiple-values","condensed","has-large-dropdown"])],4)],36)):e.createCommentVNode("",!0)],8,["to"])):e.createCommentVNode("",!0)],64)}}}),yt=e.defineComponent({__name:"CountrySelect",props:{label:{},singleModelValue:{},multiModelValue:{},error:{},required:{type:Boolean,default:!0},hasReset:{type:Boolean},disabled:{type:Boolean},name:{},form:{}},emits:["update:modelValue","update:singleModelValue"],setup(t,{emit:v}){const b=t,s=L.useVModel(b,"singleModelValue"),a=L.useVModel(b,"multiModelValue"),p=v;return(r,d)=>(e.openBlock(),e.createBlock(bt,{"multi-model-value":e.unref(a),"onUpdate:multiModelValue":d[0]||(d[0]=n=>e.isRef(a)?a.value=n:null),"single-model-value":e.unref(s),"onUpdate:singleModelValue":[d[1]||(d[1]=n=>e.isRef(s)?s.value=n:null),d[2]||(d[2]=n=>{p("update:modelValue",n)})],"root-class":r.$attrs.class,label:t.label,options:e.unref($e.countryData).map(({key:n,value:m})=>({label:m,value:n})),error:t.error,"has-reset":t.hasReset,disabled:t.disabled,required:t.required,"with-chips":!!t.multiModelValue,name:t.name,form:t.form},{"label-suffix":e.withCtx(()=>[e.renderSlot(r.$slots,"label-suffix")]),_:3},8,["multi-model-value","single-model-value","root-class","label","options","error","has-reset","disabled","required","with-chips","name","form"]))}}),kt={class:"flex grow flex-col"},gt=e.defineComponent({__name:"CompanyPurchaseToggle",props:e.mergeModels({noSpacing:{type:Boolean}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const v=e.useModel(t,"modelValue"),{$t:b}=D.useIntl();return(s,a)=>(e.openBlock(),e.createBlock(e.unref(ze._sfc_main),{modelValue:v.value,"onUpdate:modelValue":a[0]||(a[0]=p=>v.value=p),"no-spacing":t.noSpacing,"label-position":"before"},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",kt,[e.createVNode(e.unref(D._sfc_main),{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b)({defaultMessage:"Company purchase",id:"checkout.company_purchase_toggle.title",description:"The title of the company purchase toggle in the checkout"})),1)]),_:1}),e.createVNode(e.unref(D._sfc_main),{tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b)({defaultMessage:"I am purchasing on behalf of a company",id:"checkout.company_purchase_toggle.sub_title",description:"The subtitle of the company purchase toggle in the checkout"})),1)]),_:1})])]),_:1},8,["modelValue","no-spacing"]))}});function xt(){const{$t:t}=D.useIntl();return{contactInformationTitle:t({defaultMessage:"Customer information",id:"checkout.contact_information_block.title",description:"The title of the contact information block in the checkout form"}),emailLabel:t({defaultMessage:"Email address",id:"checkout.email_address.label",description:"The email address of the customer in the checkout form"}),emailPlaceholder:t({defaultMessage:"Email address...",id:"checkout.email_address.placeholder",description:"The email address of the customer in the checkout form"}),countryLabel:t({defaultMessage:"Billing country",id:"checkout.country.label",description:"The country of the customer in the checkout form"}),vatNumberLabel:t({defaultMessage:"VAT number",id:"checkout.vat_number.label",description:"The label for the vat number in the checkout form"}),vatNumberPlaceholder:t({defaultMessage:"VAT number...",id:"checkout.vat_number.placeholder",description:"The label for the vat number in the checkout form"}),legalNameLabel:t({defaultMessage:"Legal entity name",id:"checkout.legal_name.label",description:"The legal name of the organization customer in the checkout form"}),legalNamePlaceholder:t({defaultMessage:"Legal entity name...",id:"checkout.legal_name.placeholder",description:"The legal name of the organization customer in the checkout form"}),addressTitle:t({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),postalCodePlaceholder:t({defaultMessage:"Postal code...",id:"checkout.address.portal_code.placeholder",description:"Postal code of the customer address in the checkout form"}),cityPlaceholder:t({defaultMessage:"City...",id:"checkout.address.city.placeholder",description:"City of the customer address in the checkout form"}),statePlaceholder:t({defaultMessage:"State...",id:"checkout.address.state.placeholder",description:"State of the customer address in the checkout form"})}}exports._sfc_main=yt;exports._sfc_main$1=gt;exports.objectDiff=Re;exports.useCustomerFormLabels=xt;
|