@solvimon/solvimon-web 0.1.0-alpha.22 → 0.1.0-alpha.23
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 +3 -0
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DFv-awxb.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-B70SyWOB.mjs} +6 -6
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Co3XAxaY.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-jXClPW91.js} +1 -1
- package/dist/Alert.vue.es-RyK53a2P.js +1 -0
- package/dist/Alert.vue.es-lIiAWf2S.mjs +146 -0
- package/dist/{Avatar.vue.es-DNJ-jexx.mjs → Avatar.vue.es-2E3laNRb.mjs} +1 -1
- package/dist/{Avatar.vue.es-D42J_izE.js → Avatar.vue.es-DdJreyr_.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BEVkWJXT.js → BillingInformation.vue_vue_type_script_setup_true_lang-ConpyC8n.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-D1uVidXk.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-D5EoBLhj.mjs} +4 -4
- package/dist/{Button.vue.es-Dz-2L8dJ.mjs → Button.vue.es-BJEy-e9C.mjs} +1 -1
- package/dist/{Button.vue.es-M_jXZda4.js → Button.vue.es-CJNxYacb.js} +1 -1
- package/dist/Checkout.entry.ce-BfLlnQyb.js +1 -0
- package/dist/{Checkout.entry.ce-B5-0AM67.mjs → Checkout.entry.ce-CQkrWscC.mjs} +1095 -1073
- package/dist/{Chip.vue.es-DMK9C78d.mjs → Chip.vue.es-DGbc4L_D.mjs} +2 -2
- package/dist/{Chip.vue.es-G8doKsZb.js → Chip.vue.es-DLQ4QEPo.js} +1 -1
- package/dist/{ContextMenu.vue.es-B3Rz6Ojk.js → ContextMenu.vue.es-Bd2kmeVq.js} +1 -1
- package/dist/{ContextMenu.vue.es-CzkkNoJG.mjs → ContextMenu.vue.es-DL1M7pcr.mjs} +4 -4
- package/dist/{CustomerBillingInformation.vue.es-Db6bN2RZ.mjs → CustomerBillingInformation.vue.es-CE94ASC3.mjs} +2 -2
- package/dist/{CustomerBillingInformation.vue.es-BmtU9Pk0.js → CustomerBillingInformation.vue.es-hiFzB43w.js} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BGHaTx1A.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BE21tqgW.js} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-fESZVyPe.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bhih7rPR.mjs} +5 -5
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DdMHG1_Y.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C5zc9n64.mjs} +15 -15
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D018AmFA.js +1 -0
- package/dist/{DividerText.vue.es-IK2fns6f.mjs → DividerText.vue.es-CFZUQ62L.mjs} +1 -1
- package/dist/{DividerText.vue.es-D-QxT2OD.js → DividerText.vue.es-CvCgHHXN.js} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-lhJnqrrh.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-YcaBJDzx.mjs} +4 -4
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CM_8Asmw.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-jTJGN4jb.js} +1 -1
- package/dist/{ErrorNotification.vue.es-BGckEwHf.mjs → ErrorNotification.vue.es-B3mvv79S.mjs} +2 -2
- package/dist/ErrorNotification.vue.es-DI2B7WiR.js +1 -0
- package/dist/IconButton.vue.es-Dp8h4YOx.js +1 -0
- package/dist/IconButton.vue.es-GLcGhoHC.mjs +56 -0
- package/dist/{IconTitle.vue.es-BmX68uJx.mjs → IconTitle.vue.es-CzuPQtOX.mjs} +3 -3
- package/dist/{IconTitle.vue.es-CmR2xoeu.js → IconTitle.vue.es-DN9r6nfK.js} +1 -1
- package/dist/{Input.vue.es-BGPELaZU.mjs → Input.vue.es-5Cq8a7oH.mjs} +2 -2
- package/dist/{Input.vue.es-CTOrmrcB.js → Input.vue.es-DM81HeVv.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CMEOOuSU.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D75LSIL8.mjs} +2 -2
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-bheNAKzK.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-w8w52LcV.js} +1 -1
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-Xo9BR6AD.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DB5h39LA.js} +1 -1
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-avhwysNq.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-dRLsZPNh.mjs} +2 -2
- package/dist/{InvoiceSummary.vue.es-BWLiwlNs.mjs → InvoiceSummary.vue.es-DbtqsTuP.mjs} +7 -7
- package/dist/{InvoiceSummary.vue.es-hpG8Tq1D.js → InvoiceSummary.vue.es-Qy99kLZs.js} +1 -1
- package/dist/{Modal.vue.es-BD4vUaOQ.js → Modal.vue.es-DgLl6XBV.js} +1 -1
- package/dist/{Modal.vue.es-B_G8NQS2.mjs → Modal.vue.es-Z2DWAN2u.mjs} +5 -5
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBm51C7c.js +1 -0
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DYuFPIqs.mjs +294 -0
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DIJbzWMV.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BNZ9-GW1.js} +1 -1
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DuorCFo9.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CcdhYTB1.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-ComJzB3H.mjs → PaymentHistoryBlock-CjP_514k.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-DSHW_eW1.js → PaymentHistoryBlock-DS1j-8m-.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DUN0Hf2v.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CSTfMB8U.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-hjtksV2D.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dr2jtJhK.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-CwfCLnKt.js → PaymentIntegrationForm-80b19Lkq.js} +1 -1
- package/dist/{PaymentIntegrationForm-CH5B6BY5.mjs → PaymentIntegrationForm-CpOZUf-W.mjs} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BqYk4_T9.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BgztoQH5.mjs} +3 -3
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DzSQC951.js → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DKXhthkA.js} +1 -1
- package/dist/{PaymentIntegrationFormAdyen-DfN7cPYZ.mjs → PaymentIntegrationFormAdyen-BQcgDcik.mjs} +281 -204
- package/dist/PaymentIntegrationFormAdyen-DElXsJ96.js +98 -0
- package/dist/PaymentIntegrationFormStripe-CMwLqOe6.js +102 -0
- package/dist/{PaymentIntegrationFormStripe-CBsXDuhy.mjs → PaymentIntegrationFormStripe-Dx1H3fZ2.mjs} +249 -178
- package/dist/{PaymentMethod.vue.es-DkQdPXfk.mjs → PaymentMethod.vue.es-EhRCfeax.mjs} +3 -3
- package/dist/{PaymentMethod.vue.es-D18g-QB4.js → PaymentMethod.vue.es-pLCCzVxN.js} +1 -1
- package/dist/{PaymentMethodForm-DK8ntFA0.js → PaymentMethodForm-Bw2e1tXo.js} +1 -1
- package/dist/{PaymentMethodForm-CpIZKfPH.mjs → PaymentMethodForm-D3OY8zK5.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-D7fDguwa.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DHXw6qD0.js} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-C1tGJsay.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-vGprVPpn.mjs} +5 -5
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-H3vrPllf.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CdT1YyeU.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-C6BcIkEV.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-D7b0HhDc.mjs} +6 -6
- package/dist/{PlanCustomizationEditor-0zCXN-cv.mjs → PlanCustomizationEditor-BQqkgmzL.mjs} +9 -9
- package/dist/PlanCustomizationEditor-RC8kj2rC.js +1 -0
- package/dist/{PricingGroupRangeInput.vue.es-QnpfHxaY.js → PricingGroupRangeInput.vue.es-ClkE98ML.js} +2 -2
- package/dist/{PricingGroupRangeInput.vue.es-8_5nfZDI.mjs → PricingGroupRangeInput.vue.es-DNsiUZyT.mjs} +4 -4
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CGJhKKNL.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-BJfQLRcS.js} +1 -1
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-t6h1j6WD.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CURXAgMT.mjs} +5 -5
- package/dist/RadioGroupExtended.vue.es-Dk9xdj76.js +1 -0
- package/dist/{RadioGroupExtended.vue.es-C92xlCFQ.mjs → RadioGroupExtended.vue.es-vUqn2ZUP.mjs} +3 -3
- package/dist/{Section.vue.es-DQ5H7mqW.mjs → Section.vue.es-C2_topx4.mjs} +1 -1
- package/dist/{Section.vue.es-Btff-cLY.js → Section.vue.es-Cybk1Nb8.js} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DKsunuGT.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-C9q_qwjt.mjs} +6 -6
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BfvX14E3.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DIgVzXLg.js} +1 -1
- package/dist/{SubscriptionSchedules-Dc0rUnnf.mjs → SubscriptionSchedules-BlCU_xc5.mjs} +1 -1
- package/dist/{SubscriptionSchedules-pzNsego6.js → SubscriptionSchedules-CNTg_oRy.js} +1 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-6LbR_Vni.js +1 -0
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Brs9qDs5.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Cf3Dy8Yn.mjs} +12 -12
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-s5_uhyuB.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-BijBAdqp.js} +1 -1
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-C1mkIPMr.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CjzjchsS.mjs} +2 -2
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DSoNs7Xx.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-CxdrAanb.mjs} +6 -6
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CFmCJK8M.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-Dz4s3CH_.js} +1 -1
- package/dist/{TooltipParagraph.vue.es-CIedcXGT.mjs → TooltipParagraph.vue.es-Fu9Od3Vr.mjs} +1 -1
- package/dist/{TooltipParagraph.vue.es-BaqCDjl8.js → TooltipParagraph.vue.es-OX6bAWP9.js} +1 -1
- package/dist/{TrialChip.vue.es-BzNI94k0.js → TrialChip.vue.es-CbjdkR4i.js} +1 -1
- package/dist/{TrialChip.vue.es-DkBuMNr_.mjs → TrialChip.vue.es-c7tZOIW3.mjs} +2 -2
- package/dist/{cn.es-BGqYNPM3.mjs → cn.es-C8Ogac5T.mjs} +2 -2
- package/dist/{cn.es-CvmLj7KH.js → cn.es-lC4_Xd0R.js} +1 -1
- package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
- package/dist/components/BillingInformation/BillingInformation.mjs +5 -5
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +7 -7
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +5 -5
- package/dist/components/Invoice/Invoice.cjs +1 -1
- package/dist/components/Invoice/Invoice.mjs +10 -10
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +8 -8
- package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
- package/dist/components/InvoicesList/InvoicesList.mjs +4 -4
- package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.mjs +9 -9
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +6 -6
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +5 -5
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +6 -6
- package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
- package/dist/components/WalletBalances/WalletBalances.mjs +4 -4
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.mjs +26 -23
- package/dist/{customElements-Vox1PB6G.js → customElements-BYIdPSzQ.js} +10 -10
- package/dist/{customElements-CSE7dwUr.mjs → customElements-Df6dGrN-.mjs} +354 -353
- package/dist/{customer-5krPxZ8i.mjs → customer-DmsKYpVi.mjs} +1 -1
- package/dist/{customer-Dsq-Moea.js → customer-DoLHZuMG.js} +1 -1
- package/dist/{de-DE-DsFtpLsx.mjs → de-DE-Bgm9bnmp.mjs} +19 -0
- package/dist/{de-DE-C3DzP1nj.js → de-DE-CAL9Mji2.js} +1 -1
- package/dist/{en-US-DvkvbV0p.mjs → en-US-E86eRIxh.mjs} +19 -0
- package/dist/{en-US-X_pSFsNm.js → en-US-_xe5H4TQ.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{invoices-DRgfpkJ6.mjs → invoices-CrO6p4Ms.mjs} +1 -1
- package/dist/{invoices-xOV2YaEV.js → invoices-mw87cNTS.js} +1 -1
- package/dist/{it-IT-YBtHAao1.js → it-IT-QFQ1Ajbb.js} +1 -1
- package/dist/{it-IT-TE7oqvXa.mjs → it-IT-co1BfV5s.mjs} +21 -2
- package/dist/{nl-NL-C8wnyKju.js → nl-NL-CJXJC1bx.js} +1 -1
- package/dist/{nl-NL-Di3-JArV.mjs → nl-NL-Drv2E66B.mjs} +19 -0
- package/dist/paymentFailure-Bh60UhxA.mjs +47 -0
- package/dist/paymentFailure-Cki8c5BX.js +1 -0
- package/dist/{paymentMethods-PmkHYomw.mjs → paymentMethods-BNQbW_f1.mjs} +1 -1
- package/dist/{paymentMethods-CRDIw9lz.js → paymentMethods-CQdhZwq4.js} +1 -1
- package/dist/{payments-jAgXhdp_.js → payments-KTjVHqOa.js} +1 -1
- package/dist/{payments-Dvqh6CGW.mjs → payments-VS_N2xpJ.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 +20 -20
- 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 +10 -10
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +20 -20
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +19 -19
- package/dist/sessionReference-3h-6FdrC.mjs +43 -0
- package/dist/sessionReference-m_6Rp4X1.js +1 -0
- package/dist/subscriptions-Dugd-oZ1.js +1 -0
- package/dist/{subscriptions-XDyI2Cqm.mjs → subscriptions-U4xg2CO1.mjs} +2 -2
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +2 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +10 -1
- package/dist/types/types/errors.d.ts +5 -0
- package/dist/{useActionDispatchProvider-CNAuaHdm.js → useActionDispatchProvider-CTyDGRX8.js} +1 -1
- package/dist/{useActionDispatchProvider-B8-oycQk.mjs → useActionDispatchProvider-DyQbRCxR.mjs} +1 -1
- package/dist/{useCustomer-DSx-wN-6.js → useCustomer-BXI5Vmit.js} +1 -1
- package/dist/{useCustomer-CP8eWUZV.mjs → useCustomer-dcmU1539.mjs} +1 -1
- package/dist/{useCustomerFormLabels-DW6jnDYH.mjs → useCustomerFormLabels-BC1WfqWo.mjs} +5 -5
- package/dist/{useCustomerFormLabels-TVTgy0MT.js → useCustomerFormLabels-Ct6vD_b8.js} +1 -1
- package/dist/{useExperimentalFeature-BvE_EOX-.mjs → useExperimentalFeature-4Y-ppDr7.mjs} +1 -1
- package/dist/{useExperimentalFeature-CC-DrIcL.js → useExperimentalFeature-9-p9_nP6.js} +1 -1
- package/dist/{useInvoiceData-D8ds05CX.mjs → useInvoiceData-B2Z9aD2w.mjs} +2 -2
- package/dist/{useInvoiceData-CRRPdXc6.js → useInvoiceData-CGvtl7Ai.js} +1 -1
- package/dist/{useInvoicesList-DIfQcvER.js → useInvoicesList-Ba0GO8p-.js} +1 -1
- package/dist/{useInvoicesList-SJU5YWBQ.mjs → useInvoicesList-DJPznhig.mjs} +7 -7
- package/dist/{useLoadInitialData-DsabgMLZ.js → useLoadInitialData-BO9ZsSsF.js} +1 -1
- package/dist/{useLoadInitialData-MUljS38K.mjs → useLoadInitialData-CWyI3_RR.mjs} +1 -1
- package/dist/{usePaymentMethodAvailability-D0NUanyF.mjs → usePaymentMethodAvailability-DqIvkjLF.mjs} +4 -4
- package/dist/{usePaymentMethodAvailability-Bt7P9InI.js → usePaymentMethodAvailability-bkmDrPXY.js} +1 -1
- package/dist/{usePaymentMethodOptions-cT1o-BA1.js → usePaymentMethodOptions-BPBVGNDg.js} +1 -1
- package/dist/{usePaymentMethodOptions-B7JYkGsw.mjs → usePaymentMethodOptions-MSEp39xQ.mjs} +1 -1
- package/dist/{usePaymentMethods-DNVw2eVg.js → usePaymentMethods-BAOtOJZD.js} +1 -1
- package/dist/{usePaymentMethods-CpzqXQUT.mjs → usePaymentMethods-U7gnZ0F5.mjs} +1 -1
- package/dist/{usePayments-Gx9kBvNB.mjs → usePayments-Dq2V6bTV.mjs} +6 -6
- package/dist/{usePayments-D9Eo-uBk.js → usePayments-G-HpKpK8.js} +1 -1
- package/dist/{usePortal-DsebXdhx.js → usePortal-BplmMkBG.js} +1 -1
- package/dist/{usePortal-3VCZwSUE.mjs → usePortal-CMHV-ShD.mjs} +1 -1
- package/dist/{useSubscription-K_gP9TeX.js → useSubscription-CvB8ROBt.js} +1 -1
- package/dist/{useSubscription-DnL1wVh1.mjs → useSubscription-V53WsZwQ.mjs} +1 -1
- package/dist/{useTimePeriod.es-CmltiTE-.js → useTimePeriod.es-CtCTu9cz.js} +1 -1
- package/dist/{useTimePeriod.es-DMtKzcoB.mjs → useTimePeriod.es-D31Zl1MJ.mjs} +1 -1
- package/package.json +2 -1
- package/dist/Checkout.entry.ce-C52gkrNZ.js +0 -1
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Cnlbp0om.js +0 -1
- package/dist/ErrorNotification.vue.es-Cd2UKPAz.js +0 -1
- package/dist/IconButton.vue.es-BTAkuFsm.js +0 -1
- package/dist/IconButton.vue.es-C4dQEQAc.mjs +0 -198
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-BnilyGBO.mjs +0 -144
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-CSv-Luvz.js +0 -1
- package/dist/PaymentIntegrationFormAdyen-Q48aDXR7.js +0 -98
- package/dist/PaymentIntegrationFormStripe-BSEqarl7.js +0 -102
- package/dist/PlanCustomizationEditor-XpofGULc.js +0 -1
- package/dist/RadioGroupExtended.vue.es-Cb1iD73r.js +0 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-nmVRb6hj.js +0 -1
- package/dist/component-5wqcK7yz.mjs +0 -8
- package/dist/component-B7ZDyqBp.js +0 -1
- package/dist/subscriptions-fJcj88X9.js +0 -1
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { computed as d, defineComponent as h, toRefs as z, ref as $, openBlock as n, createElementBlock as i, normalizeClass as s, unref as u, createElementVNode as l, createCommentVNode as c, toDisplayString as L, renderSlot as C, useAttrs as A, createBlock as k, withCtx as m, createVNode as y, mergeProps as B, createTextVNode as T } from "vue";
|
|
2
|
-
import { o as j } from "./object.es-8aLDIncs.mjs";
|
|
3
|
-
import { _ as D, T as M, a as N } from "./TooltipParagraph.vue.es-CIedcXGT.mjs";
|
|
4
|
-
import { _ as p } from "./Button.vue.es-Dz-2L8dJ.mjs";
|
|
5
|
-
const V = "py-2 px-4 text-sm", q = {
|
|
6
|
-
danger: "text-feedback-danger",
|
|
7
|
-
neutral: "text-secondary",
|
|
8
|
-
info: "text-feedback-info",
|
|
9
|
-
success: "text-feedback-success",
|
|
10
|
-
warning: "text-feedback-warning"
|
|
11
|
-
}, P = {
|
|
12
|
-
danger: "bg-feedback-danger",
|
|
13
|
-
neutral: "bg-feedback-neutral",
|
|
14
|
-
info: "bg-feedback-info",
|
|
15
|
-
success: "bg-feedback-success",
|
|
16
|
-
warning: "bg-feedback-warning"
|
|
17
|
-
}, S = {
|
|
18
|
-
danger: "rounded-sm border border-red-200",
|
|
19
|
-
neutral: "rounded-sm border border-gray-200",
|
|
20
|
-
info: "rounded-sm border border-blue-200",
|
|
21
|
-
success: "rounded-sm border border-green-200",
|
|
22
|
-
warning: "rounded-sm border border-yellow-200"
|
|
23
|
-
}, E = "ml-auto -mx-1.5 -my-1.5 rounded focus:ring-2 p-1.5 inline-flex h-8 w-8", H = {
|
|
24
|
-
danger: "hover:bg-red-200 focus:ring-red-400 bg-red-100 text-red-500",
|
|
25
|
-
neutral: "hover:bg-gray-200 focus:ring-gray-400 bg-feedback-neutral text-gray-500",
|
|
26
|
-
info: "hover:bg-blue-200 focus:ring-blue-400 bg-blue-100 text-blue-500",
|
|
27
|
-
success: "bg-green-100 text-green-500 focus:ring-green-400 hover:bg-green-200",
|
|
28
|
-
warning: "focus:ring-yellow-400 hover:bg-yellow-200 bg-yellow-100 text-yellow-500"
|
|
29
|
-
};
|
|
30
|
-
function I(e) {
|
|
31
|
-
const f = d(
|
|
32
|
-
() => [
|
|
33
|
-
V,
|
|
34
|
-
P[e.type.value],
|
|
35
|
-
o.value,
|
|
36
|
-
S[e.type.value],
|
|
37
|
-
e.inline.value ? "flex items-center" : ""
|
|
38
|
-
].filter((t) => !!t).join(" ")
|
|
39
|
-
), o = d(() => q[e.type.value] ?? ""), a = d(
|
|
40
|
-
() => [E, H[e.type.value] ?? ""].filter((t) => !!t).join(" ")
|
|
41
|
-
), g = d(() => e.inline.value ? !e.icon.value && !e.title.value ? "" : e.title.value ? "grow ml-1" : "grow ml-2" : "my-2"), b = d(() => !e.icon.value || !e.inline.value ? ["font-medium", e.inline.value ? "" : "text-lg ml-2"].filter((t) => !!t).join(" ") : ["font-medium ml-2", e.inline.value ? "" : "text-lg"].filter((t) => !!t).join(" "));
|
|
42
|
-
return {
|
|
43
|
-
alertClasses: f,
|
|
44
|
-
textClasses: o,
|
|
45
|
-
closeClasses: a,
|
|
46
|
-
contentClasses: g,
|
|
47
|
-
titleClasses: b
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
const R = {
|
|
51
|
-
key: 0,
|
|
52
|
-
class: "ml-auto inline-flex items-center"
|
|
53
|
-
}, Q = /* @__PURE__ */ h({
|
|
54
|
-
__name: "Alert",
|
|
55
|
-
props: {
|
|
56
|
-
type: { default: "info" },
|
|
57
|
-
title: { default: "" },
|
|
58
|
-
closable: { type: Boolean, default: !1 },
|
|
59
|
-
icon: { type: Boolean, default: !0 },
|
|
60
|
-
inline: { type: Boolean, default: !0 }
|
|
61
|
-
},
|
|
62
|
-
setup(e) {
|
|
63
|
-
const f = e, { alertClasses: o, textClasses: a, closeClasses: g, contentClasses: b, titleClasses: t } = I(
|
|
64
|
-
z(f)
|
|
65
|
-
), x = $(!0), w = () => {
|
|
66
|
-
x.value = !1;
|
|
67
|
-
};
|
|
68
|
-
return (v, r) => x.value ? (n(), i("div", {
|
|
69
|
-
key: 0,
|
|
70
|
-
class: s(u(o)),
|
|
71
|
-
role: "alert"
|
|
72
|
-
}, [
|
|
73
|
-
l("div", {
|
|
74
|
-
class: s(e.inline ? "flex" : "flex items-center")
|
|
75
|
-
}, [
|
|
76
|
-
e.icon ? (n(), i("svg", {
|
|
77
|
-
key: 0,
|
|
78
|
-
class: s(["flex-shrink-0", "w-5", "h-5", u(a)]),
|
|
79
|
-
fill: "currentColor",
|
|
80
|
-
viewBox: "0 0 20 20",
|
|
81
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
82
|
-
}, [...r[0] || (r[0] = [
|
|
83
|
-
l("path", {
|
|
84
|
-
"fill-rule": "evenodd",
|
|
85
|
-
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",
|
|
86
|
-
"clip-rule": "evenodd"
|
|
87
|
-
}, null, -1)
|
|
88
|
-
])], 2)) : c("", !0),
|
|
89
|
-
e.title ? (n(), i("span", {
|
|
90
|
-
key: 1,
|
|
91
|
-
class: s(u(t))
|
|
92
|
-
}, L(e.title), 3)) : c("", !0),
|
|
93
|
-
!e.inline && e.closable ? (n(), i("button", {
|
|
94
|
-
key: 2,
|
|
95
|
-
type: "button",
|
|
96
|
-
class: s(u(g)),
|
|
97
|
-
"aria-label": "Close",
|
|
98
|
-
onClick: w
|
|
99
|
-
}, [...r[1] || (r[1] = [
|
|
100
|
-
l("span", { class: "sr-only" }, "Dismiss", -1),
|
|
101
|
-
l("svg", {
|
|
102
|
-
class: "h-5 w-5",
|
|
103
|
-
fill: "currentColor",
|
|
104
|
-
viewBox: "0 0 20 20",
|
|
105
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
106
|
-
}, [
|
|
107
|
-
l("path", {
|
|
108
|
-
"fill-rule": "evenodd",
|
|
109
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
110
|
-
"clip-rule": "evenodd"
|
|
111
|
-
})
|
|
112
|
-
], -1)
|
|
113
|
-
])], 2)) : c("", !0)
|
|
114
|
-
], 2),
|
|
115
|
-
l("div", {
|
|
116
|
-
class: s(u(b))
|
|
117
|
-
}, [
|
|
118
|
-
C(v.$slots, "default")
|
|
119
|
-
], 2),
|
|
120
|
-
v.$slots.actions ? (n(), i("div", R, [
|
|
121
|
-
C(v.$slots, "actions")
|
|
122
|
-
])) : c("", !0),
|
|
123
|
-
e.inline && e.closable ? (n(), i("button", {
|
|
124
|
-
key: 1,
|
|
125
|
-
type: "button",
|
|
126
|
-
class: s(u(g)),
|
|
127
|
-
"aria-label": "Close",
|
|
128
|
-
onClick: w
|
|
129
|
-
}, [...r[2] || (r[2] = [
|
|
130
|
-
l("span", { class: "sr-only" }, "Dismiss", -1),
|
|
131
|
-
l("svg", {
|
|
132
|
-
class: "h-5 w-5",
|
|
133
|
-
fill: "currentColor",
|
|
134
|
-
viewBox: "0 0 20 20",
|
|
135
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
136
|
-
}, [
|
|
137
|
-
l("path", {
|
|
138
|
-
"fill-rule": "evenodd",
|
|
139
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
140
|
-
"clip-rule": "evenodd"
|
|
141
|
-
})
|
|
142
|
-
], -1)
|
|
143
|
-
])], 2)) : c("", !0)
|
|
144
|
-
], 2)) : c("", !0);
|
|
145
|
-
}
|
|
146
|
-
}), F = {
|
|
147
|
-
inheritAttrs: !1
|
|
148
|
-
}, U = /* @__PURE__ */ h({
|
|
149
|
-
...F,
|
|
150
|
-
__name: "IconButton",
|
|
151
|
-
props: {
|
|
152
|
-
tooltip: {},
|
|
153
|
-
icon: {},
|
|
154
|
-
type: {},
|
|
155
|
-
intent: {},
|
|
156
|
-
size: {},
|
|
157
|
-
pill: { type: Boolean },
|
|
158
|
-
square: { type: Boolean },
|
|
159
|
-
loading: { type: Boolean },
|
|
160
|
-
disabled: { type: Boolean },
|
|
161
|
-
iconPrefix: {},
|
|
162
|
-
iconSuffix: {},
|
|
163
|
-
tag: {},
|
|
164
|
-
preventDoubleClick: { type: Boolean }
|
|
165
|
-
},
|
|
166
|
-
setup(e) {
|
|
167
|
-
const f = e, o = A(), a = d(() => j({ ...f, ...o }, "icon", "tooltip"));
|
|
168
|
-
return (g, b) => e.tooltip ? (n(), k(D, { key: 0 }, {
|
|
169
|
-
tooltip: m(() => [
|
|
170
|
-
y(M, null, {
|
|
171
|
-
default: m(() => [
|
|
172
|
-
y(N, null, {
|
|
173
|
-
default: m(() => [
|
|
174
|
-
T(L(e.tooltip), 1)
|
|
175
|
-
]),
|
|
176
|
-
_: 1
|
|
177
|
-
})
|
|
178
|
-
]),
|
|
179
|
-
_: 1
|
|
180
|
-
})
|
|
181
|
-
]),
|
|
182
|
-
default: m(() => [
|
|
183
|
-
y(p, B(a.value, {
|
|
184
|
-
"icon-prefix": e.icon,
|
|
185
|
-
square: ""
|
|
186
|
-
}), null, 16, ["icon-prefix"])
|
|
187
|
-
]),
|
|
188
|
-
_: 1
|
|
189
|
-
})) : (n(), k(p, B({ key: 1 }, a.value, {
|
|
190
|
-
square: "",
|
|
191
|
-
"icon-prefix": e.icon
|
|
192
|
-
}), null, 16, ["icon-prefix"]));
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
export {
|
|
196
|
-
Q as _,
|
|
197
|
-
U as a
|
|
198
|
-
};
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, computed as _, openBlock as n, createBlock as r, withCtx as a, unref as e, createVNode as f, createTextVNode as i, toDisplayString as l, createCommentVNode as c, createElementVNode as E } from "vue";
|
|
2
|
-
import { f as T } from "./formatting.es-RclXHhKo.mjs";
|
|
3
|
-
import { a as A, _ as b } from "./Button.vue.es-Dz-2L8dJ.mjs";
|
|
4
|
-
import { u as y, _ as m } from "./customElements-CSE7dwUr.mjs";
|
|
5
|
-
import { _ as g } from "./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DuorCFo9.mjs";
|
|
6
|
-
const M = /* @__PURE__ */ p({
|
|
7
|
-
__name: "PaymentCompletedCard",
|
|
8
|
-
props: {
|
|
9
|
-
amount: { type: Object },
|
|
10
|
-
variant: { type: String },
|
|
11
|
-
redirecting: { type: Boolean }
|
|
12
|
-
},
|
|
13
|
-
setup(t) {
|
|
14
|
-
const d = t, { $t: s } = y(), o = _(
|
|
15
|
-
() => d.variant === "AUTHORIZE" ? s({
|
|
16
|
-
defaultMessage: "Payment successful",
|
|
17
|
-
description: "The title for when a payment has been successful",
|
|
18
|
-
id: "payment_completed_card.title.authorize"
|
|
19
|
-
}) : s({
|
|
20
|
-
defaultMessage: "Your payment method is added",
|
|
21
|
-
description: "The title for when a payment method was successfully added",
|
|
22
|
-
id: "payment_completed_card.title.tokenize"
|
|
23
|
-
})
|
|
24
|
-
);
|
|
25
|
-
return (u, h) => (n(), r(g, {
|
|
26
|
-
status: "success",
|
|
27
|
-
title: o.value
|
|
28
|
-
}, {
|
|
29
|
-
default: a(() => [
|
|
30
|
-
t.amount ? (n(), r(e(m), {
|
|
31
|
-
key: 0,
|
|
32
|
-
variant: "body-sm",
|
|
33
|
-
class: "mt-1"
|
|
34
|
-
}, {
|
|
35
|
-
default: a(() => [
|
|
36
|
-
f(e(A), { icon: "check" }),
|
|
37
|
-
i(l(e(T)(t.amount)), 1)
|
|
38
|
-
]),
|
|
39
|
-
_: 1
|
|
40
|
-
})) : c("", !0),
|
|
41
|
-
t.redirecting ? (n(), r(e(m), {
|
|
42
|
-
key: 1,
|
|
43
|
-
variant: "body-xs",
|
|
44
|
-
color: "subtle"
|
|
45
|
-
}, {
|
|
46
|
-
default: a(() => [
|
|
47
|
-
i(l(e(s)({
|
|
48
|
-
defaultMessage: "You are being redirected...",
|
|
49
|
-
description: "The text shown after a successful message before a redirect",
|
|
50
|
-
id: "payment_completed_card.redirect_message"
|
|
51
|
-
})), 1)
|
|
52
|
-
]),
|
|
53
|
-
_: 1
|
|
54
|
-
})) : c("", !0)
|
|
55
|
-
]),
|
|
56
|
-
_: 1
|
|
57
|
-
}, 8, ["title"]));
|
|
58
|
-
}
|
|
59
|
-
}), I = {
|
|
60
|
-
UNKNOWN_ERROR: {
|
|
61
|
-
title: "Something went wrong",
|
|
62
|
-
message: "An unknown error has occurred",
|
|
63
|
-
isReloadButtonVisible: !0
|
|
64
|
-
},
|
|
65
|
-
AUTHORIZATION_FAILED: {
|
|
66
|
-
title: "Payment failed",
|
|
67
|
-
message: "The payment failed"
|
|
68
|
-
},
|
|
69
|
-
PAYMENT_DETAILS_CALL_FAILED: {
|
|
70
|
-
title: "Payment details call failed",
|
|
71
|
-
message: "There was a problem getting the payment details"
|
|
72
|
-
},
|
|
73
|
-
PAYMENT_METHOD_STORAGE_FAILED: {
|
|
74
|
-
title: "Failed storing payment method",
|
|
75
|
-
message: "Something went wrong with storing the payment method"
|
|
76
|
-
},
|
|
77
|
-
REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING: {
|
|
78
|
-
title: "Missing payment acceptor",
|
|
79
|
-
message: "A redirect result is set, but a payment acceptor is missing in the url"
|
|
80
|
-
},
|
|
81
|
-
TOKENIZE_FAILED: {
|
|
82
|
-
title: "Tokenization failed",
|
|
83
|
-
message: "The tokenization of the payment method has failed"
|
|
84
|
-
},
|
|
85
|
-
PAYMENT_INTEGRATION_INITIALIZATION_FAILED: {
|
|
86
|
-
title: "Failed loading payment methods",
|
|
87
|
-
message: "Failed loading payment integration",
|
|
88
|
-
isReloadButtonVisible: !0
|
|
89
|
-
},
|
|
90
|
-
RESOURCE_REVOKED: {
|
|
91
|
-
title: "Resource revoked",
|
|
92
|
-
message: "The resource has been revoked",
|
|
93
|
-
isReloadButtonVisible: !0
|
|
94
|
-
}
|
|
95
|
-
}, R = { class: "flex flex-col items-center gap-6" }, x = /* @__PURE__ */ p({
|
|
96
|
-
__name: "PaymentErrorCard",
|
|
97
|
-
props: {
|
|
98
|
-
error: { type: Object }
|
|
99
|
-
},
|
|
100
|
-
setup(t) {
|
|
101
|
-
const d = t, { $t: s } = y(), o = _(() => I[d.error.code]), u = () => {
|
|
102
|
-
window.location.reload();
|
|
103
|
-
};
|
|
104
|
-
return (h, N) => (n(), r(g, {
|
|
105
|
-
status: "error",
|
|
106
|
-
title: o.value.title
|
|
107
|
-
}, {
|
|
108
|
-
default: a(() => [
|
|
109
|
-
E("div", R, [
|
|
110
|
-
f(e(m), {
|
|
111
|
-
variant: "body-xs",
|
|
112
|
-
color: "subtle",
|
|
113
|
-
class: "mt-3"
|
|
114
|
-
}, {
|
|
115
|
-
default: a(() => [
|
|
116
|
-
i(l(o.value.message), 1)
|
|
117
|
-
]),
|
|
118
|
-
_: 1
|
|
119
|
-
}),
|
|
120
|
-
o.value.isReloadButtonVisible ? (n(), r(e(b), {
|
|
121
|
-
key: 0,
|
|
122
|
-
type: "button",
|
|
123
|
-
intent: "secondary",
|
|
124
|
-
onClick: u
|
|
125
|
-
}, {
|
|
126
|
-
default: a(() => [
|
|
127
|
-
i(l(e(s)({
|
|
128
|
-
defaultMessage: "Try again",
|
|
129
|
-
description: "Retry button text when an error has happened during a payment",
|
|
130
|
-
id: "payments.retry_button.label"
|
|
131
|
-
})), 1)
|
|
132
|
-
]),
|
|
133
|
-
_: 1
|
|
134
|
-
})) : c("", !0)
|
|
135
|
-
])
|
|
136
|
-
]),
|
|
137
|
-
_: 1
|
|
138
|
-
}, 8, ["title"]));
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
export {
|
|
142
|
-
M as _,
|
|
143
|
-
x as a
|
|
144
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("vue"),d=require("./formatting.es-C72Nsrmh.js"),i=require("./Button.vue.es-M_jXZda4.js"),o=require("./customElements-Vox1PB6G.js"),c=require("./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DIJbzWMV.js"),u=e.defineComponent({__name:"PaymentCompletedCard",props:{amount:{type:Object},variant:{type:String},redirecting:{type:Boolean}},setup(t){const r=t,{$t:a}=o.useIntl(),n=e.computed(()=>r.variant==="AUTHORIZE"?a({defaultMessage:"Payment successful",description:"The title for when a payment has been successful",id:"payment_completed_card.title.authorize"}):a({defaultMessage:"Your payment method is added",description:"The title for when a payment method was successfully added",id:"payment_completed_card.title.tokenize"}));return(s,l)=>(e.openBlock(),e.createBlock(c._sfc_main,{status:"success",title:n.value},{default:e.withCtx(()=>[t.amount?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:0,variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$1),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(d.formatAmount)(t.amount)),1)]),_:1})):e.createCommentVNode("",!0),t.redirecting?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:1,variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"You are being redirected...",description:"The text shown after a successful message before a redirect",id:"payment_completed_card.redirect_message"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["title"]))}}),m={UNKNOWN_ERROR:{title:"Something went wrong",message:"An unknown error has occurred",isReloadButtonVisible:!0},AUTHORIZATION_FAILED:{title:"Payment failed",message:"The payment failed"},PAYMENT_DETAILS_CALL_FAILED:{title:"Payment details call failed",message:"There was a problem getting the payment details"},PAYMENT_METHOD_STORAGE_FAILED:{title:"Failed storing payment method",message:"Something went wrong with storing the payment method"},REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING:{title:"Missing payment acceptor",message:"A redirect result is set, but a payment acceptor is missing in the url"},TOKENIZE_FAILED:{title:"Tokenization failed",message:"The tokenization of the payment method has failed"},PAYMENT_INTEGRATION_INITIALIZATION_FAILED:{title:"Failed loading payment methods",message:"Failed loading payment integration",isReloadButtonVisible:!0},RESOURCE_REVOKED:{title:"Resource revoked",message:"The resource has been revoked",isReloadButtonVisible:!0}},_={class:"flex flex-col items-center gap-6"},p=e.defineComponent({__name:"PaymentErrorCard",props:{error:{type:Object}},setup(t){const r=t,{$t:a}=o.useIntl(),n=e.computed(()=>m[r.error.code]),s=()=>{window.location.reload()};return(l,f)=>(e.openBlock(),e.createBlock(c._sfc_main,{status:"error",title:n.value.title},{default:e.withCtx(()=>[e.createElementVNode("div",_,[e.createVNode(e.unref(o._sfc_main),{variant:"body-xs",color:"subtle",class:"mt-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value.message),1)]),_:1}),n.value.isReloadButtonVisible?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,type:"button",intent:"secondary",onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Try again",description:"Retry button text when an error has happened during a payment",id:"payments.retry_button.label"})),1)]),_:1})):e.createCommentVNode("",!0)])]),_:1},8,["title"]))}});exports._sfc_main=u;exports._sfc_main$1=p;
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),Q=require("./useService-H7BjLg8P.js"),M=require("./customElements-Vox1PB6G.js"),B=require("./PaymentErrorCard.vue_vue_type_script_setup_true_lang-CSv-Luvz.js"),W=require("./payments-jAgXhdp_.js"),w=require("./url-BNKStNY9.js"),J=require("./paymentMethods-CRDIw9lz.js"),s=require("./adyen-Druit6gz.js"),X=require("./adyenSdk-BP2XXzeJ.js"),ee=require("./useExperimentalFeature-CC-DrIcL.js"),te=l=>{let _={};return l==="TOKENIZE"&&(_={"en-US":{payButton:"Add payment method",confirmPurchase:"Add payment method"},"fr-FR":{payButton:"Ajouter un moyen de paiement",confirmPurchase:"Ajouter un moyen de paiement"},"de-DE":{payButton:"Zahlungsmethode hinzufügen",confirmPurchase:"Zahlungsmethode hinzufügen"},"it-IT":{payButton:"Aggiungi metodo di pagamento",confirmPurchase:"Aggiungi metodo di pagamento"},"es-ES":{payButton:"Añadir método de pago",confirmPurchase:"Añadir método de pago"},"nl-NL":{payButton:"Betaalmethode toevoegen",confirmPurchase:"Betaalmethode toevoegen"},"pt-BR":{payButton:"Adicionar método de pagamento",confirmPurchase:"Adicionar método de pagamento"},"pt-PT":{payButton:"Adicionar método de pagamento",confirmPurchase:"Adicionar método de pagamento"},"pl-PL":{payButton:"Dodaj metodę płatności",confirmPurchase:"Dodaj metodę płatności"},"ru-RU":{payButton:"Добавить способ оплаты",confirmPurchase:"Добавить способ оплаты"},"sv-SE":{payButton:"Lägg till betalningsmetod",confirmPurchase:"Lägg till betalningsmetod"},"da-DK":{payButton:"Tilføj betalingsmetode",confirmPurchase:"Tilføj betalingsmetode"},"fi-FI":{payButton:"Lisää maksutapa",confirmPurchase:"Lisää maksutapa"},"no-NO":{payButton:"Legg til betalingsmetode",confirmPurchase:"Legg til betalingsmetode"},"cs-CZ":{payButton:"Přidat platební metodu",confirmPurchase:"Přidat platební metodu"},"hu-HU":{payButton:"Fizetési mód hozzáadása",confirmPurchase:"Fizetési mód hozzáadása"},"ro-RO":{payButton:"Adăugați metodă de plată",confirmPurchase:"Adăugați metodă de plată"},"ja-JP":{payButton:"支払い方法を追加",confirmPurchase:"支払い方法を追加"},"ko-KR":{payButton:"결제 수단 추가",confirmPurchase:"결제 수단 추가"},"zh-CN":{payButton:"添加支付方式",confirmPurchase:"添加支付方式"},"zh-TW":{payButton:"新增付款方式",confirmPurchase:"新增付款方式"},ar:{payButton:"إضافة وسيلة دفع",confirmPurchase:"إضافة وسيلة دفع"},"hr-HR":{payButton:"Dodajte način plačanja",confirmPurchase:"Dodajte način plačanja"},"el-GR":{payButton:"Προσθήκη μεθόδου πληρωμής",confirmPurchase:"Προσθήκη μεθόδου πληρωμής"},"sk-SK":{payButton:"Pridať spôsob platby",confirmPurchase:"Pridať spôsob platby"},"sl-SI":{payButton:"Dodajte način plačanja",confirmPurchase:"Dodajte način plačanja"},"bg-BG":{payButton:"Добавяне на начин на плащане",confirmPurchase:"Добавяне на начин на плащане"},"ca-ES":{payButton:"Afegir mètode de pagament",confirmPurchase:"Afegir mètode de pagament"},"et-EE":{payButton:"Lisa makseviis",confirmPurchase:"Lisa makseviis"},"lv-LV":{payButton:"Pievienot maksājuma veidu",confirmPurchase:"Pievienot maksājuma veidu"},"lt-LT":{payButton:"Pridėti mokėjimo metodą",confirmPurchase:"Pridėti mokėjimo metodą"}}),_},f="ADYEN",ne=r.defineComponent({__name:"PaymentIntegrationFormAdyen",props:{context:{type:Object},countryCode:{type:String},customerId:{type:String},invoiceId:{type:String},paymentMethodOptionResponseEntry:{type:Object},variant:{type:String},selected:{type:Boolean},amount:{type:Object},validateOnSubmit:{type:Function,default:()=>Promise.resolve(!0)},forceStorePaymentMethod:{type:Boolean},storePaymentMethod:{type:Boolean,default:void 0},redirectsOnSuccess:{type:Boolean}},emits:["select","payment-failed","payment-success","ready"],setup(l,{expose:_,emit:x}){let u=null,P=null;const n=l,m=x;_({submit:j});const y=r.ref(),I=r.ref(!1),h=r.ref(),d=M.useLogger(),{locale:C}=M.useIntl(),{authorizePayment:D,getPaymentDetails:S}=W.createPaymentsService(),{tokenizePaymentMethod:L}=J.createPaymentMethodsService(),g=ee.useExperimentalFeature(),v=r.computed(()=>{var e;return s.getAdyenDropInPaymentMethods(n.paymentMethodOptionResponseEntry,{excludeExpressPaymentMethods:!!((e=g==null?void 0:g.value)!=null&&e["express-checkout"])})}),k=r.computed(()=>v.value.length>0);function j(){try{u==null||u.submit()}catch(e){d.error("ADYEN_SUBMIT_FAILED","Failed to submit Adyen drop-in",{},e)}}async function U(){const e=s.toMinorUnitAmount(n.amount),t=v.value;return{checkoutConfig:{amount:e,clientKey:s.getAdyenClientKeyFromPaymentMethodOptionsResponse(n.paymentMethodOptionResponseEntry),environment:s.getAdyenEnvironmentFromPaymentMethodOptionsResponse(n.paymentMethodOptionResponseEntry,d),locale:C,translations:te(n.variant),countryCode:n.countryCode,analytics:{enabled:!1},paymentMethodsResponse:{paymentMethods:t},onSubmit:Y,onAdditionalDetails:K,onPaymentCompleted:q,onPaymentFailed:H,onError:V,showPayButton:!1},dropInConfig:{disableFinalAnimation:!0,paymentMethodsConfiguration:{card:{hasHolderName:!0,holderNameRequired:!0,enableStoreDetails:!n.forceStorePaymentMethod&&n.storePaymentMethod===void 0&&n.variant==="AUTHORIZE"},paypal:{intent:e.value>0?"authorize":"tokenize",showPayButton:!0}},openFirstPaymentMethod:n.selected,onSelect:({props:{type:a}})=>{a&&m("select",{paymentMethodType:a,paymentGatewayVariant:"ADYEN"})},onReady:()=>m("ready")}}}function F(){return Promise.all([X.loadAdyenSdk(),Promise.resolve().then(()=>require("./adyen-BJfC7N6f.js")).then(e=>e.default)])}async function b(){if(await R(),!k.value){const{payment_acceptor:e,integration:t}=n.paymentMethodOptionResponseEntry;d.warn("PAYMENT_INTEGRATION_NOT_RENDERABLE","No Adyen payment methods to offer",{fingerprint:["PAYMENT_INTEGRATION_NOT_RENDERABLE",e.id],paymentAcceptorId:e.id,integrationId:t.id,...n.invoiceId?{invoiceId:n.invoiceId}:{}});return}if(await r.nextTick(),!!y.value)try{const[e,t]=await F(),{checkoutConfig:a,dropInConfig:o}=await U();P=await e.AdyenCheckout(a),u=new e.Dropin(P,{...o,paymentMethodComponents:e.dropInPaymentMethodComponents}).mount(y.value),z(t)}catch(e){d.error("PAYMENT_INTEGRATION_INITIALIZATION_FAILED","Failed to mount Adyen web drop-in",{error:e})}}async function R(){u&&(u.unmount(),u=null),y.value&&(y.value.innerHTML="")}function z(e){var a;const t=(a=y.value)==null?void 0:a.getRootNode();if(t instanceof ShadowRoot){const o=document.createElement("style");o.textContent=e,t.appendChild(o);const i=document.createElement("style");i.textContent=`
|
|
2
|
-
:host {
|
|
3
|
-
--adyen-sdk-color-background-secondary: transparent;
|
|
4
|
-
--adyen-sdk-color-background-primary: rgb(243 244 246 / 0.5);
|
|
5
|
-
--adyen-sdk-color-outline-secondary: #e5e7eb;
|
|
6
|
-
--adyen-sdk-color-outline-primary: transparent;
|
|
7
|
-
--adyen-sdk-color-background-always-dark: var(--color-primary-500);
|
|
8
|
-
--adyen-sdk-color-background-inverse-primary-hover: var(--color-primary-600);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.adyen-checkout__payment-method__image__wrapper {
|
|
12
|
-
width: 32px;
|
|
13
|
-
height: 32px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.adyen-checkout__payment-method__image {
|
|
17
|
-
height: 32px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.adyen-checkout__input-wrapper,
|
|
21
|
-
.adyen-checkout__input {
|
|
22
|
-
border-color: rgb(229, 231, 235);
|
|
23
|
-
border-radius: var(--adyen-sdk-border-radius-s, 4px);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.adyen-checkout__button,
|
|
27
|
-
.adyen-checkout__payment-method {
|
|
28
|
-
border-radius: var(--adyen-sdk-border-radius-s, 4px);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.adyen-checkout__payment-method {
|
|
32
|
-
border-color: rgb(229, 231, 235);
|
|
33
|
-
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
34
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.adyen-checkout__payment-method--selected {
|
|
38
|
-
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.adyen-checkout__payment-method:after {
|
|
42
|
-
transform: scale(0%);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.adyen-checkout__paypal__button {
|
|
46
|
-
display: block !important;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.adyen-checkout__payment-methods-list {
|
|
50
|
-
gap: 4px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.adyen-checkout__dropdown__list {
|
|
54
|
-
background-color: white;
|
|
55
|
-
border-radius: var(--adyen-sdk-border-radius-s, 4px);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.adyen-checkout__payment-method.adyen-checkout__payment-method--selected:after {
|
|
59
|
-
content: '✓';
|
|
60
|
-
width: 20px;
|
|
61
|
-
height: 20px;
|
|
62
|
-
border-radius: 10px;
|
|
63
|
-
background-color: var(--color-primary-600);
|
|
64
|
-
position: absolute;
|
|
65
|
-
top: 14px;
|
|
66
|
-
right: 14px;
|
|
67
|
-
text-align: center;
|
|
68
|
-
line-height: 20px;
|
|
69
|
-
color: white;
|
|
70
|
-
transform: scale(100%);
|
|
71
|
-
font-size: 12px;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.adyen-checkout__payment-method__header {
|
|
75
|
-
padding: 8px 16px !important;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.adyen-checkout__payment-method__brands {
|
|
79
|
-
align-items: center;
|
|
80
|
-
}
|
|
81
|
-
.adyen-checkout__payment-method__brand-number {
|
|
82
|
-
line-height: 1;
|
|
83
|
-
}
|
|
84
|
-
.adyen-checkout__button__text {
|
|
85
|
-
font-size: 14px;
|
|
86
|
-
}
|
|
87
|
-
.adyen-checkout__store-details {
|
|
88
|
-
background: transparent;
|
|
89
|
-
padding: 0;
|
|
90
|
-
}
|
|
91
|
-
.adyen-checkout__checkbox__input + .adyen-checkout__checkbox__label:after {
|
|
92
|
-
border-color: rgb(229, 231, 235);
|
|
93
|
-
}
|
|
94
|
-
`,n.variant==="AUTHORIZE"&&(i.textContent+=`
|
|
95
|
-
.adyen-checkout__payment-method--cashapp .adyen-checkout-pm-details-wrapper {
|
|
96
|
-
display: none;
|
|
97
|
-
}
|
|
98
|
-
`),t.appendChild(i)}}function O(e,{paymentMethodType:t,actions:a,logFailure:o}){if(e.status==="ACTION_REQUIRED"&&e.action.payment_gateway_variant===f){const i=Z(e,t);if(!i){o(e);return}u.handleAction(i),a.resolve({resultCode:e.action.adyen.result_code,action:i});return}if(e.payment.result==="AUTHORIZED"){I.value=!0,a.resolve({resultCode:"Authorised"});return}o(e),a.resolve({resultCode:"Error"})}function Y(...e){const[t,a,o]=e;n.validateOnSubmit().then(i=>{if(!i)return;const c=n.paymentMethodOptionResponseEntry.payment_acceptor.id,N={risk_data:s.transformObjectToAdyenObject(t.data.riskData),payment_method:s.transformObjectToAdyenObject(t.data.paymentMethod),browser_info:s.transformObjectToAdyenObject(t.data.browserInfo)};if(n.variant==="AUTHORIZE"){const E=s.createReturnUrl({paymentAcceptorId:n.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});D({payment_acceptor_id:c,...n.customerId?{customer_id:n.customerId}:{},payment_gateway_variant:f,adyen:{...N,store_payment_method:n.storePaymentMethod??(n.forceStorePaymentMethod||t.data.storePaymentMethod)},amount:n.amount,...n.context?{context:n.context}:{},return_url:E}).then(p=>O(p,{paymentMethodType:t.data.paymentMethod.type,actions:o,logFailure:A=>d.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${c}`,{error:A})})).catch(p=>{d.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${c}`,{error:p}),o.resolve({resultCode:"Error"})});return}if(n.variant==="TOKENIZE"){const E=s.createReturnUrl({paymentAcceptorId:n.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});if(!n.customerId){d.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${c}`);return}L({customer_id:n.customerId,payment_acceptor_id:c,payment_gateway_variant:f,adyen:N,return_url:E}).then(p=>O(p,{paymentMethodType:t.data.paymentMethod.type,actions:o,logFailure:A=>d.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${c}`,{error:A})})).catch(p=>{d.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${c}`,{error:p}),o.resolve({resultCode:"Error"})})}}).catch(i=>{d.error("INTEGRATION_ERROR","Unhandled error in payment submission flow",{},i)})}function Z(e,t){if(e.status!=="ACTION_REQUIRED")return;const a=e.action;if(a.payment_gateway_variant!="ADYEN")return;const o=a.adyen;return{paymentMethodType:(o==null?void 0:o.payment_method_type)??t,method:a.method,url:a.url,data:a.data,type:o==null?void 0:o.action_type,paymentData:o==null?void 0:o.payment_data,sdkData:o==null?void 0:o.sdk_data}}function K(...e){const[t]=e,a=t.data.details,o=t.data.paymentData;if(n.paymentMethodOptionResponseEntry.payment_acceptor.id){T({detailsResult:a?G(a):void 0,paymentDataResult:o,paymentAcceptorId:n.paymentMethodOptionResponseEntry.payment_acceptor.id});return}const i={code:"UNKNOWN_ERROR",message:"Payment failed",error:e};m("payment-failed",i),h.value=i}function G(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}function H(...e){const[t]=e,a={code:"UNKNOWN_ERROR",message:"Payment failed",error:t};m("payment-failed",a),h.value=a}function q(...e){const[,t]=e;t==null||t.unmount(),m("payment-success")}function V(...e){const[t,a]=e;if(t.name==="CANCEL")return;const o={code:"UNKNOWN_ERROR",message:"Something went wrong",error:t};d.error("INTEGRATION_ERROR","Something went wrong",{error:t}),h.value=o,a==null||a.unmount()}function T({detailsResult:e,threeDSResult:t,redirectResult:a,paymentDataResult:o,paymentAcceptorId:i}){S({paymentAcceptorId:i,paymentGatewayVariant:f,adyen:{...e?{details:e}:{},...a?{redirect_result:a}:{},...t?{threeds_result:t}:{},...o?{payment_data:o}:{}}}).then(c=>{if(c.payment_status==="FAILURE"){m("payment-failed",{code:"UNKNOWN_ERROR",message:"Failed getting payment details",error:c});return}if(c.payment_status==="SUCCESS"){m("payment-success");return}}).catch(c=>{d.error("PAYMENT_DETAILS_CALL_FAILED","Failed fetching payment details",{error:c})})}function $(){const e=w.getQueryParam(s.REDIRECT_RESULT_QUERY_STRING),t=w.getQueryParam(s.PAYMENT_ACCEPTOR_ID_QUERY_STRING);if(e){if(!t){d.error("INVALID_REDIRECT_RESULT","Redirect result is set but payment acceptor id is missing",{context:{redirectResult:e}});return}T({paymentAcceptorId:t,detailsResult:{redirectResult:decodeURI(e)}})}}return r.onMounted(()=>{b(),$()}),r.onBeforeUnmount(()=>{R()}),r.watch(()=>n.paymentMethodOptionResponseEntry,(e,t)=>{Q.isEqual(e,t)||b()},{deep:!0}),(e,t)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[I.value?(r.openBlock(),r.createBlock(B._sfc_main,{key:0,variant:l.variant,redirecting:l.redirectsOnSuccess},null,8,["variant","redirecting"])):h.value?(r.openBlock(),r.createBlock(B._sfc_main$1,{key:1,error:h.value},null,8,["error"])):r.createCommentVNode("",!0),k.value?(r.openBlock(),r.createElementBlock("div",{key:2,ref_key:"dropInContainerRef",ref:y},null,512)):r.createCommentVNode("",!0)],64))}});exports.default=ne;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),K=require("./useService-H7BjLg8P.js"),O=require("./adyen-Druit6gz.js"),N=require("./PaymentErrorCard.vue_vue_type_script_setup_true_lang-CSv-Luvz.js"),B=require("./payments-jAgXhdp_.js"),W=require("./paymentMethods-CRDIw9lz.js"),S=require("./url-BNKStNY9.js"),j=require("./customElements-Vox1PB6G.js"),A="https://js.stripe.com/dahlia/stripe.js",z=`<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<style>
|
|
7
|
-
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
8
|
-
body { overflow: hidden; }
|
|
9
|
-
</style>
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<div id="stripe-root"></div>
|
|
13
|
-
<script src="${A}"><\/script>
|
|
14
|
-
<script>
|
|
15
|
-
(function () {
|
|
16
|
-
let stripe, elements, countryCode, email, name, parentOrigin;
|
|
17
|
-
|
|
18
|
-
window.addEventListener('message', function (event) {
|
|
19
|
-
if (!event.data || typeof event.data !== 'object') return;
|
|
20
|
-
if (event.source !== window.parent) return;
|
|
21
|
-
|
|
22
|
-
if (event.data.type === 'stripe:init') {
|
|
23
|
-
parentOrigin = event.origin;
|
|
24
|
-
countryCode = event.data.countryCode;
|
|
25
|
-
email = event.data.email;
|
|
26
|
-
name = event.data.name;
|
|
27
|
-
stripe = Stripe(event.data.publicKey);
|
|
28
|
-
elements = stripe.elements(event.data.options);
|
|
29
|
-
const paymentElement = elements.create('payment', { layout: { type: 'accordion', defaultCollapsed: false }, wallets: event.data.options.wallets, fields: event.data.options.fields });
|
|
30
|
-
|
|
31
|
-
paymentElement.on('ready', function () {
|
|
32
|
-
parent.postMessage({ type: 'stripe:ready' }, parentOrigin);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
paymentElement.on('change', function (e) {
|
|
36
|
-
parent.postMessage({ type: 'stripe:change', paymentMethodType: e.value.type }, parentOrigin);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
paymentElement.on('loaderror', function (e) {
|
|
40
|
-
parent.postMessage({
|
|
41
|
-
type: 'stripe:loaderror',
|
|
42
|
-
error: { message: e.error.message, type: e.error.type }
|
|
43
|
-
}, parentOrigin);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
paymentElement.mount('#stripe-root');
|
|
47
|
-
|
|
48
|
-
new ResizeObserver(function () {
|
|
49
|
-
parent.postMessage({
|
|
50
|
-
type: 'stripe:resize',
|
|
51
|
-
height: document.documentElement.scrollHeight
|
|
52
|
-
}, parentOrigin);
|
|
53
|
-
}).observe(document.documentElement);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (event.data.type === 'stripe:submit') {
|
|
57
|
-
if (!elements || !parentOrigin || event.origin !== parentOrigin) return;
|
|
58
|
-
const submitEmail = 'email' in event.data ? event.data.email : email;
|
|
59
|
-
const submitName = 'name' in event.data ? event.data.name : name;
|
|
60
|
-
elements.submit().then(function (submitResult) {
|
|
61
|
-
if (submitResult.error) {
|
|
62
|
-
parent.postMessage({
|
|
63
|
-
type: 'stripe:submit:error',
|
|
64
|
-
error: {
|
|
65
|
-
message: submitResult.error.message,
|
|
66
|
-
type: submitResult.error.type,
|
|
67
|
-
code: submitResult.error.code
|
|
68
|
-
}
|
|
69
|
-
}, parentOrigin);
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const billingDetails = {};
|
|
73
|
-
if (countryCode) billingDetails.address = { country: countryCode };
|
|
74
|
-
if (submitEmail) billingDetails.email = submitEmail;
|
|
75
|
-
if (submitName) billingDetails.name = submitName;
|
|
76
|
-
const tokenParams = Object.keys(billingDetails).length
|
|
77
|
-
? { payment_method_data: { billing_details: billingDetails } }
|
|
78
|
-
: {};
|
|
79
|
-
stripe.createConfirmationToken({ elements: elements, params: tokenParams }).then(function (tokenResult) {
|
|
80
|
-
if (tokenResult.error) {
|
|
81
|
-
parent.postMessage({
|
|
82
|
-
type: 'stripe:submit:error',
|
|
83
|
-
error: {
|
|
84
|
-
message: tokenResult.error.message,
|
|
85
|
-
type: tokenResult.error.type,
|
|
86
|
-
code: tokenResult.error.code
|
|
87
|
-
}
|
|
88
|
-
}, parentOrigin);
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
parent.postMessage({
|
|
92
|
-
type: 'stripe:submit:success',
|
|
93
|
-
confirmationTokenId: tokenResult.confirmationToken.id
|
|
94
|
-
}, parentOrigin);
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
})();
|
|
100
|
-
<\/script>
|
|
101
|
-
</body>
|
|
102
|
-
</html>`,q=["src","height"],Q=n.defineComponent({__name:"PaymentIntegrationFormStripeFrame",props:{publicKey:{type:String},options:{type:Object},countryCode:{type:String},email:{type:String},name:{type:String}},emits:["ready","change","loaderror","submit-success","submit-error"],setup(m,{expose:g,emit:E}){const t=m,c=E;g({triggerSubmit:I});const p=n.ref(),d=n.ref(0),_=n.ref();function h(){var o,a;(a=(o=p.value)==null?void 0:o.contentWindow)==null||a.postMessage({type:"stripe:init",publicKey:t.publicKey,options:t.options,countryCode:t.countryCode,email:t.email,name:t.name},"*")}function I(){var o,a;(a=(o=p.value)==null?void 0:o.contentWindow)==null||a.postMessage({type:"stripe:submit",email:t.email,name:t.name},"*")}function y(o){return typeof o=="object"&&o!==null}function u(o){if(!p.value||o.source!==p.value.contentWindow||!y(o.data))return;const a=o.data,R=a.type;if(!(typeof R!="string"||!R.startsWith("stripe:")))switch(R){case"stripe:ready":c("ready");break;case"stripe:change":c("change",typeof a.paymentMethodType=="string"?a.paymentMethodType:"card");break;case"stripe:loaderror":{const l=y(a.error)?a.error:{};c("loaderror",{message:typeof l.message=="string"?l.message:void 0,type:typeof l.type=="string"?l.type:void 0});break}case"stripe:resize":typeof a.height=="number"&&(d.value=a.height);break;case"stripe:submit:success":typeof a.confirmationTokenId=="string"&&c("submit-success",a.confirmationTokenId);break;case"stripe:submit:error":{const l=y(a.error)?a.error:{};c("submit-error",{message:typeof l.message=="string"?l.message:void 0,type:typeof l.type=="string"?l.type:void 0,code:typeof l.code=="string"?l.code:void 0});break}}}return n.onMounted(()=>{const o=new Blob([z],{type:"text/html"});_.value=URL.createObjectURL(o),window.addEventListener("message",u)}),n.onBeforeUnmount(()=>{window.removeEventListener("message",u),_.value&&URL.revokeObjectURL(_.value)}),n.watch(()=>t.options,(o,a)=>{K.isEqual(o,a)||h()},{deep:!0}),(o,a)=>(n.openBlock(),n.createElementBlock("iframe",{ref_key:"iframeRef",ref:p,src:_.value,height:d.value||void 0,frameborder:"0",style:{width:"100%",display:"block",border:"none"},title:"Payment form",onLoad:h},null,40,q))}}),P={link:"never"},k={variables:{borderRadius:"4px",colorBackground:"rgba(243, 244, 246, 0.5)"},rules:{".TermsText":{fontSize:"14px"},".Input":{backgroundColor:"rgba(243, 244, 246, 0.5)",fontSize:"14px",borderColor:"rgb(229, 231, 235)"}}};function $(m,g){return{billingDetails:{address:{country:"never"},...m?{email:"never"}:{},...g?{name:"never"}:{}}}}function V({amount:m,email:g,name:E,variant:t,storePaymentMethod:c=!1}){const p=m.currency.toLowerCase(),d=$(g,E);return t==="TOKENIZE"?{mode:"setup",currency:p,setup_future_usage:"off_session",wallets:P,fields:d,appearance:k}:{mode:"payment",currency:p,amount:O.toMinorUnitAmount(m).value,...c?{setup_future_usage:"off_session"}:{},wallets:P,fields:d,appearance:k}}const v="STRIPE",Y=n.defineComponent({__name:"PaymentIntegrationFormStripe",props:{email:{type:String},name:{type:String},countryCode:{type:String},customerId:{type:String},invoiceId:{type:String},paymentMethodOptionResponseEntry:{type:Object},variant:{type:String},selected:{type:Boolean},amount:{type:Object},validateOnSubmit:{type:Function,default:()=>Promise.resolve(!0)},context:{type:Object},forceStorePaymentMethod:{type:Boolean},storePaymentMethod:{type:Boolean},redirectsOnSuccess:{type:Boolean}},emits:["select","payment-failed","payment-success","ready"],setup(m,{expose:g,emit:E}){const t=m,c=E;g({submit:l});const p=n.ref(!1),d=n.ref(),_=n.ref(),h=n.computed(()=>t.storePaymentMethod??t.forceStorePaymentMethod??!1),I=n.computed(()=>V({amount:t.amount,email:t.email,name:t.name,variant:t.variant,storePaymentMethod:h.value})),y=n.ref(null),u=j.useLogger(),{authorizePayment:o}=B.createPaymentsService(),{tokenizePaymentMethod:a}=W.createPaymentMethodsService(),R=n.computed(()=>{var e,r;return(r=(e=t.paymentMethodOptionResponseEntry.integration.payment_gateway)==null?void 0:e.stripe)==null?void 0:r.public_key});function l(){C().catch(e=>{u.error("STRIPE_SUBMIT_FAILED","Unexpected error during Stripe submission",{},e)})}async function C(){var r;await t.validateOnSubmit()&&((r=_.value)==null||r.triggerSubmit())}function M(e){return new Promise((r,s)=>{if(window.Stripe){r(window.Stripe(e));return}const i=document.createElement("script");i.src=A,i.onload=()=>{if(!window.Stripe){s(new Error("Stripe not available after script load"));return}r(window.Stripe(e))},i.onerror=()=>s(new Error("Failed to load Stripe.js")),document.head.appendChild(i)})}async function U(){if(y.value)return y.value;const e=R.value;if(!e)throw new Error("Missing Stripe public key");const r=await M(e);return y.value=r,r}async function D(e){const r=t.paymentMethodOptionResponseEntry.payment_acceptor.id,s=O.createReturnUrl({paymentAcceptorId:r,redirectUrl:window.location.href});if(t.variant==="AUTHORIZE"){try{const i=await o({payment_acceptor_id:r,...t.customerId?{customer_id:t.customerId}:{},payment_gateway_variant:v,stripe:{confirmation_token_id:e},amount:t.amount,...t.context&&t.context.type!=="CHARGE_ON_DEMAND"?{context:t.context}:{},return_url:s});await T(i)}catch(i){u.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${r}`,{error:i}),f({code:"UNKNOWN_ERROR",message:"Payment authorization failed",error:i})}return}if(t.variant==="TOKENIZE"){if(!t.customerId){u.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${r}`);return}try{const i=await a({customer_id:t.customerId,payment_acceptor_id:r,payment_gateway_variant:v,stripe:{confirmation_token_id:e},return_url:s});await T(i)}catch(i){u.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${r}`,{error:i}),f({code:"UNKNOWN_ERROR",message:"Tokenization failed",error:i})}}}async function T(e){var r;if(e.status==="ACTION_REQUIRED"&&e.action.payment_gateway_variant===v){const s=e.action.client_secret||((r=e.action.data)==null?void 0:r.client_secret);if(!s){u.error("STRIPE_ACTION_FAILED","Missing client_secret in Stripe ACTION_REQUIRED response"),f({code:"UNKNOWN_ERROR",message:"Payment action failed",error:e});return}let i;try{i=await U()}catch(w){u.error("STRIPE_ACTION_FAILED","Failed to load Stripe.js",{error:w}),f({code:"UNKNOWN_ERROR",message:"Payment action failed",error:w});return}const{error:b}=await i.handleNextAction({clientSecret:s});if(b){u.error("STRIPE_ACTION_FAILED","Stripe handleNextAction failed",{error:b}),f({code:"UNKNOWN_ERROR",message:"Payment action failed",error:b});return}p.value=!0,c("payment-success");return}if(e.status==="SUCCESS"){p.value=!0,c("payment-success");return}u.error("STRIPE_ACTION_FAILED","Unexpected payment result status",{error:e}),f({code:"UNKNOWN_ERROR",message:"Payment failed",error:e})}async function L(){const e=t.paymentMethodOptionResponseEntry.payment_acceptor.id;if(S.getQueryParam(O.PAYMENT_ACCEPTOR_ID_QUERY_STRING)!==e)return;const s=S.getQueryParam("redirect_status"),i=S.getQueryParam("payment_intent_client_secret"),b=S.getQueryParam("setup_intent_client_secret");if(!(!s||!i&&!b)){if(s==="succeeded"){p.value=!0,c("payment-success");return}u.error("STRIPE_REDIRECT_RETURN_FAILED","Stripe redirect returned non-succeeded status",{redirectStatus:s}),f({code:"UNKNOWN_ERROR",message:"Payment failed",error:new globalThis.Error(`Stripe redirect returned status: ${s}`)})}}function F(){c("select",{paymentMethodType:"card",paymentGatewayVariant:v}),c("ready")}function x(e){f({code:"UNKNOWN_ERROR",message:e.message??"Failed to load payment form",error:e})}function f(e){d.value=e,c("payment-failed",e)}return n.onMounted(()=>{L().catch(e=>{u.error("STRIPE_REDIRECT_RETURN_FAILED","handleRedirectReturn threw unexpectedly",{error:e})})}),n.onBeforeUnmount(()=>{y.value=null}),(e,r)=>p.value?(n.openBlock(),n.createBlock(N._sfc_main,{key:0,variant:m.variant,redirecting:m.redirectsOnSuccess},null,8,["variant","redirecting"])):d.value?(n.openBlock(),n.createBlock(N._sfc_main$1,{key:1,error:d.value},null,8,["error"])):R.value?(n.openBlock(),n.createBlock(Q,{key:2,ref_key:"frameRef",ref:_,"public-key":R.value,options:I.value,"country-code":m.countryCode,email:m.email,name:m.name,onReady:F,onChange:r[0]||(r[0]=s=>c("select",{paymentMethodType:s,paymentGatewayVariant:v})),onLoaderror:x,onSubmitSuccess:D,onSubmitError:r[1]||(r[1]=s=>n.unref(u).error("STRIPE_CONFIRMATION_TOKEN_FAILED","Stripe submission failed",{error:s}))},null,8,["public-key","options","country-code","email","name"])):n.createCommentVNode("",!0)}});exports.default=Y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),_=require("./Section.vue.es-Btff-cLY.js"),g=require("./customElements-Vox1PB6G.js"),w=require("./useTimePeriod.es-CmltiTE-.js"),x=require("./formatting.es-C72Nsrmh.js"),S=require("./Expand.vue.es-BtM0EZEr.js"),B=require("./Button.vue.es-M_jXZda4.js"),N=require("./IconButton.vue.es-BTAkuFsm.js"),P=require("./Input.vue.es-CTOrmrcB.js"),A=require("./Chip.vue.es-G8doKsZb.js"),y=require("./Checkout.entry.ce-C52gkrNZ.js"),z=require("./index-DwueOtPi.js"),V=require("./PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CGJhKKNL.js"),E=require("./pricing-BVAld27Y.js"),D=require("./pricingPlanSchedule-BM8vsKkV.js"),$=require("./subscription-ZA62t4E9.js"),q=e.defineComponent({__name:"DeltaChip",props:{oldValue:{},newValue:{},intent:{default:"neutral"},content:{},removable:{type:Boolean},size:{},variant:{},textClass:{},tag:{},hasChipBefore:{type:Boolean},hasChipAfter:{type:Boolean}},setup(t){const i=e.createPropsRestProxy(t,["oldValue","newValue","intent"]),n=e.computed(()=>{const o=t.newValue-t.oldValue;return`${o>=0?"+":""}${o}`});return(o,r)=>(e.openBlock(),e.createBlock(e.unref(A._sfc_main),e.mergeProps(i,{intent:t.intent,class:"pointer-events-none select-none"}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},16,["intent"]))}}),U={class:"flex items-center gap-1.5"},T=e.defineComponent({__name:"StepInput",props:e.mergeModels({step:{default:1},min:{default:0},max:{},initialValue:{default:1},unitName:{},showDelta:{type:Boolean,default:!1},size:{default:"md"},name:{},required:{type:Boolean},label:{},error:{},disabled:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const i=t,n=e.useModel(t,"modelValue"),o=e.ref(null),r=e.computed(()=>{if(i.unitName)return i.unitName[n.value===1?"singular":"plural"]}),l=()=>{i.max&&n.value+i.step>i.max||(n.value+=i.step)},c=()=>{n.value-i.step<i.min||(n.value-=i.step)};function a(m){var f;const b=(f=o.value)==null?void 0:f.el;if(!b)return;const v=parseInt(`${m}`);n.value=v,b.innerText=`${v}`,b.focus();const h=document.createRange();h.selectNodeContents(b),h.collapse(!1);const k=window.getSelection();k==null||k.removeAllRanges(),k==null||k.addRange(h)}const p=m=>{const f=m.target;f instanceof HTMLElement&&a(f.innerText)},s=e.computed(()=>i.disabled?!1:i.max?n.value+i.step<i.max:!0),d=e.computed(()=>i.disabled?!1:n.value-i.step>=i.min);function u(){var m;const f=(m=o.value)==null?void 0:m.el;if(!f)return;f.focus();const b=document.createRange();b.selectNodeContents(f);const v=window.getSelection();v==null||v.removeAllRanges(),v==null||v.addRange(b)}return e.onMounted(()=>{var m;const f=(m=o.value)==null?void 0:m.el;f&&(f.innerText=`${n.value}`)}),e.watch(()=>n.value,m=>{a(m)}),(m,f)=>(e.openBlock(),e.createBlock(P._sfc_main,{modelValue:n.value,"onUpdate:modelValue":f[0]||(f[0]=b=>n.value=b),type:"number",class:"text-transparent [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none","prefix-class":{"!px-0 w-5":t.size==="sm","!px-0 w-6":t.size==="md","!px-0 w-7":t.size==="lg"},"suffix-class":{"!px-0 w-5":t.size==="sm","!px-0 w-6":t.size==="md","!px-0 w-7":t.size==="lg"},size:t.size,label:t.label,disabled:t.disabled,name:t.name,required:t.required},e.createSlots({prefix:e.withCtx(()=>[e.createElementVNode("div",{class:"absolute inset-0 flex items-center justify-center",onMousedown:u},[e.createElementVNode("div",U,[e.createVNode(g._sfc_main,{ref_key:"contentEditableRef",ref:o,tag:"span",variant:t.size==="sm"?"body":"body-lg",contenteditable:!t.disabled,class:e.normalizeClass(["outline-none",{"pointer-events-none select-none":t.disabled}]),weight:"semibold",onInput:p},null,8,["variant","contenteditable","class"]),r.value?(e.openBlock(),e.createBlock(g._sfc_main,{key:0,tag:"span",color:"subtle",class:"pointer-events-none select-none"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(" ")+e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("",!0),t.showDelta?(e.openBlock(),e.createBlock(q,{key:1,"old-value":i.initialValue,"new-value":n.value,class:"pointer-events-none ml-0.5 select-none"},null,8,["old-value","new-value"])):e.createCommentVNode("",!0)])],32),e.createVNode(N._sfc_main$1,{disabled:!d.value,type:"button",intent:"subtle",size:"sm",class:e.normalizeClass(["!h-full select-none rounded-br-none rounded-tr-none",{"!w-7":t.size==="lg","!w-5":t.size==="sm","!w-6":t.size==="md"}]),icon:"remove",onMousedown:c},null,8,["disabled","class"])]),suffix:e.withCtx(()=>[e.createVNode(N._sfc_main$1,{disabled:!s.value,type:"button",intent:"subtle",size:"sm",class:e.normalizeClass(["!h-full select-none rounded-bl-none rounded-tl-none",{"!w-7":t.size==="lg","!w-5":t.size==="sm","!w-6":t.size==="md"}]),icon:"add",onMousedown:l},null,8,["disabled","class"])]),_:2},[m.$slots.helper?{name:"helper",fn:e.withCtx(()=>[e.renderSlot(m.$slots,"helper")]),key:"0"}:void 0]),1032,["modelValue","prefix-class","suffix-class","size","label","disabled","name","required"]))}}),I={class:"grid grid-cols-2 gap-2"},F=e.defineComponent({__name:"TieredTableRow",props:{band:{type:Object},previousBand:{type:Object},isFirst:{type:Boolean},period:{type:Object}},setup(t){const i=t,{$t:n}=g.useIntl(),{formatTimePeriod:o}=w.useTimePeriod(),r=e.computed(()=>{var c;if(i.isFirst)return"0";if((c=i.previousBand)!=null&&c.tier_top_bound&&"number"in i.previousBand.tier_top_bound)return i.previousBand.tier_top_bound.number}),l=e.computed(()=>{if(!(!i.band.tier_top_bound||!("number"in i.band.tier_top_bound)))return i.band.tier_top_bound.number});return(c,a)=>(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(e.unref(g._sfc_main),{variant:"body-xs",color:"subtle",tag:"div"},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"{lower_bound} - {upper_bound} seats",id:"seats.tiered_range_label",description:"The label showing the seat count range for a tiered pricing tier"},{lower_bound:r.value??"0",upper_bound:l.value})),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"> {lower_bound} seats",id:"seats.tiered_unbounded_range_label",description:"The label showing the unbounded seat count range (greater than) for a tiered pricing tier"},{lower_bound:r.value??"0"})),1)],64))]),_:1}),e.createVNode(e.unref(g._sfc_main),{variant:"body-xs",color:"subtle",tag:"div",class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.band.amount&&e.unref(n)({defaultMessage:"{amount} per seat/{period}",id:"seats.tiered_price_per_seat_period",description:"The price per seat and billing period label for a tiered pricing tier"},{amount:e.unref(x.formatAmount)(t.band.amount),period:t.period?e.unref(o)(t.period,{short:!0,hideValueForExactPeriods:!0}):""})),1)]),_:1})]))}}),O={class:"grid grid-cols-1 gap-0.5 pt-1.5"},L=e.defineComponent({__name:"TieredTable",props:{bands:{type:Array},period:{type:Object}},setup(t){return(i,n)=>(e.openBlock(),e.createElementBlock("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.bands,(o,r)=>(e.openBlock(),e.createBlock(F,{key:r,band:o,"is-first":r===0,"previous-band":r>0?t.bands[r-1]:void 0,period:t.period},null,8,["band","is-first","previous-band","period"]))),128))]))}});function M({pricings:t,pricingItemConfigId:i}){return e.computed(()=>{var r,l,c,a,p,s,d,u;const{config:n,productItem:o}=y.getPricingItemByPricingConfigId({pricings:t,pricingItemConfigId:i});return{billing:{period:(l=(r=n==null?void 0:n.billing_period_configs)==null?void 0:r[0])==null?void 0:l.billing_period,billedInAdvance:n==null?void 0:n.billing_in_advance},product:{name:o==null?void 0:o.name,description:o==null?void 0:o.description},pricing:{...((c=n==null?void 0:n.details)==null?void 0:c.pricing_type)==="FLAT"&&{amount:(s=(p=(a=n.details)==null?void 0:a.bands)==null?void 0:p[0])==null?void 0:s.amount},...((d=n==null?void 0:n.details)==null?void 0:d.pricing_type)==="TIERED"&&{tiered:{bands:(u=n.details)==null?void 0:u.bands}}}}})}const R={class:"flex flex-row-reverse gap-4 md:flex-row"},j={class:"w-24 shrink-0 justify-start md:w-32"},Y=["tabindex"],K={key:0},X={key:0},H=e.defineComponent({__name:"SeatsEditorItem",props:e.mergeModels({modelValue:{type:Object},defaultValue:{type:Object},pricings:{type:Array}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const i=t,n=e.useModel(t,"modelValue"),{$t:o}=g.useIntl(),{formatTimePeriod:r}=w.useTimePeriod(),l=e.ref(!1),c=e.computed({get:()=>+(n.value.number||y.FALLBACK_SEATS_NUMBER),set(s){n.value={...n.value,number:s!==void 0?s.toString():void 0}}}),a=M({pricings:i.pricings,pricingItemConfigId:n.value.pricing_item_config_id}),p=e.computed(()=>{var s,d;return!!((d=(s=a.value.pricing)==null?void 0:s.tiered)!=null&&d.bands)});return(s,d)=>{var u,m,f;return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",R,[e.createElementVNode("div",j,[e.createVNode(e.unref(T),{modelValue:c.value,"onUpdate:modelValue":d[0]||(d[0]=b=>c.value=b),size:"sm",min:(u=t.defaultValue)!=null&&u.number?+t.defaultValue.number:void 0},null,8,["modelValue","min"])]),e.createElementVNode("div",{class:e.normalizeClass(["flex grow flex-col",{"hover:cursor-pointer":p.value}]),tabindex:p.value?0:void 0,onClick:d[1]||(d[1]=b=>p.value?l.value=!l.value:void 0)},[e.createVNode(e.unref(g._sfc_main),{tag:"span",variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).product.name||e.unref(o)({defaultMessage:"Seats",id:"seats.label",description:"The label for the seats input field"})),1)]),_:1}),e.unref(a).pricing.amount?(e.openBlock(),e.createBlock(e.unref(g._sfc_main),{key:0,tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"{amount} per seat/{period}",id:"seats.price_per_seat_period",description:"The price per seat and billing period label for seat-based pricing"},{amount:e.unref(x.formatAmount)(e.unref(a).pricing.amount),period:e.unref(a).billing.period?e.unref(r)(e.unref(a).billing.period,{short:!0,hideValueForExactPeriods:!0}):""})),1)]),_:1})):e.unref(a).pricing.tiered?(e.openBlock(),e.createBlock(e.unref(g._sfc_main),{key:1,tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Tiered pricing",id:"seats.tiered_pricing_label",description:"The label indicating tiered pricing structure for seats"}))+" ",1),e.createVNode(e.unref(B._sfc_main$1),{icon:"keyboard_arrow_down",size:"xs",class:e.normalizeClass(["absolute text-gray-400 transition ease-in-out",{"rotate-0":!l.value,"rotate-180":l.value}])},null,8,["class"])]),_:1})):e.createCommentVNode("",!0)],10,Y)]),(f=(m=e.unref(a).pricing)==null?void 0:m.tiered)!=null&&f.bands?(e.openBlock(),e.createElementBlock("div",K,[e.createVNode(e.unref(S._sfc_main),{"is-open":l.value},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",X,[e.createVNode(L,{bands:e.unref(a).pricing.tiered.bands,period:e.unref(a).billing.period},null,8,["bands","period"])])):e.createCommentVNode("",!0)]),_:1},8,["is-open"])])):e.createCommentVNode("",!0)])}}}),J={key:0,class:"grid grid-cols-1 gap-1"},Q=e.defineComponent({__name:"SeatsEditor",props:e.mergeModels({modelValue:{type:Array},initialSeatsValues:{type:Array},pricings:{type:Array}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const i=e.useModel(t,"modelValue"),n=o=>e.computed({get:()=>i.value[o],set:r=>{const l=i.value.slice();l[o]=r,i.value=l}});return(o,r)=>t.modelValue.length>0?(e.openBlock(),e.createElementBlock("div",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.modelValue,(l,c)=>(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{key:c},{default:e.withCtx(()=>{var a;return[l.pricing_item_config_id?(e.openBlock(),e.createBlock(H,{key:l.pricing_item_config_id,modelValue:n(c).value,"onUpdate:modelValue":p=>n(c).value=p,"default-value":(a=t.initialSeatsValues)==null?void 0:a[c],pricings:t.pricings},null,8,["modelValue","onUpdate:modelValue","default-value","pricings"])):e.createCommentVNode("",!0)]}),_:2},1024))),128))])):e.createCommentVNode("",!0)}}),W={class:"flex flex-row-reverse gap-4 md:flex-row"},Z={class:"w-24 shrink-0 justify-start md:w-32"},G={class:"flex grow flex-col"},ee=e.defineComponent({__name:"UnitsEditorItem",props:e.mergeModels({modelValue:{type:Object},defaultValue:{type:Object},pricings:{type:Array}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const i=t,n=e.useModel(t,"modelValue"),{$t:o}=g.useIntl(),r=e.computed({get:()=>+(n.value.number||y.FALLBACK_UNITS_NUMBER),set(c){n.value={...n.value,number:c!==void 0?c.toString():void 0}}}),l=M({pricings:i.pricings,pricingItemConfigId:n.value.pricing_item_config_id});return(c,a)=>{var p;return e.openBlock(),e.createElementBlock("div",W,[e.createElementVNode("div",Z,[e.createVNode(e.unref(T),{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=s=>r.value=s),size:"sm",min:(p=t.defaultValue)!=null&&p.number?+t.defaultValue.number:void 0},null,8,["modelValue","min"])]),e.createElementVNode("div",G,[e.createVNode(e.unref(g._sfc_main),{tag:"span",variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).product.name||e.unref(o)({defaultMessage:"Units",id:"units.label",description:"The label for the one-off flat item units input field"})),1)]),_:1}),e.unref(l).pricing.amount?(e.openBlock(),e.createBlock(e.unref(g._sfc_main),{key:0,tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"{amount} per unit",id:"units.price_per_unit",description:"The price per unit label for one-off flat pricing"},{amount:e.unref(x.formatAmount)(e.unref(l).pricing.amount)})),1)]),_:1})):e.createCommentVNode("",!0)])])}}}),te={key:0,class:"grid grid-cols-1 gap-1"},ne=e.defineComponent({__name:"UnitsEditor",props:e.mergeModels({modelValue:{type:Array},initialUnitsValues:{type:Array},pricings:{type:Array}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const i=e.useModel(t,"modelValue"),n=o=>e.computed({get:()=>i.value[o],set:r=>{const l=i.value.slice();l[o]=r,i.value=l}});return(o,r)=>t.modelValue.length>0?(e.openBlock(),e.createElementBlock("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.modelValue,(l,c)=>(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{key:c},{default:e.withCtx(()=>{var a;return[l.pricing_item_config_id?(e.openBlock(),e.createBlock(ee,{key:l.pricing_item_config_id,modelValue:n(c).value,"onUpdate:modelValue":p=>n(c).value=p,"default-value":(a=t.initialUnitsValues)==null?void 0:a[c],pricings:t.pricings},null,8,["modelValue","onUpdate:modelValue","default-value","pricings"])):e.createCommentVNode("",!0)]}),_:2},1024))),128))])):e.createCommentVNode("",!0)}}),ie={class:"p-1"},oe={class:"grid grid-cols-1 gap-1 pt-1"},le=e.defineComponent({__name:"AddonSingleEditor",props:e.mergeModels({constraint:{type:String},modelValue:{type:Array},pricings:{type:Array},billingPeriod:{type:Object},currency:{type:String},groupName:{type:String}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const i=t,n=e.useModel(t,"modelValue"),{$t:o}=g.useIntl(),{describePricing:r}=V.usePricingDescription({currency:e.toRef(i,"currency"),billingPeriod:e.toRef(i,"billingPeriod")}),l=i.pricings.map(s=>s.id),c=e.computed(()=>i.constraint==="AT_MOST_ONE"?o({defaultMessage:"Select up to one product",id:"addon_single_editor.description.at_most_one",description:"The description of the addon single editor for at most one product"}):i.constraint==="EXACTLY_ONE"?o({defaultMessage:"Select one product",id:"addon_single_editor.description.exactly_one",description:"The description of the addon single editor for exactly one product"}):i.constraint==="AT_LEAST_ONE"?o({defaultMessage:"Select at least one product",id:"addon_single_editor.description.at_least_one",description:"The description of the addon single editor for at least one product"}):""),a=s=>i.modelValue.includes(s),p=s=>{if(a(s))n.value=n.value.filter(d=>d!==s);else{const d=n.value.filter(u=>!l.includes(u));n.value=[...d,s]}};return(s,d)=>(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{"no-spacing":""},{default:e.withCtx(()=>[e.createElementVNode("div",ie,[e.createVNode(V._sfc_main$1,null,{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.groupName),1)]),description:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1}),e.createElementVNode("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pricings,u=>(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{key:u.id,"content-background":"none",class:e.normalizeClass({"!bg-white":a(u.id)})},{default:e.withCtx(()=>[e.createVNode(y._sfc_main,{name:e.unref(E.getNameFromPricing)(u)??"",description:e.unref(r)(u)},{default:e.withCtx(()=>[e.createVNode(e.unref(z._sfc_main),{"model-value":a(u.id),"onUpdate:modelValue":m=>p(u.id)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1032,["name","description"])]),_:2},1032,["class"]))),128))])])]),_:1}))}}),ae={class:"grid grid-cols-1 gap-1"},C=e.defineComponent({__name:"AddonMultipleEditor",props:e.mergeModels({modelValue:{type:Array},pricings:{type:Array},billingPeriod:{type:Object},currency:{type:String},groupName:{type:String}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const i=t,n=e.useModel(t,"modelValue"),{$t:o}=g.useIntl(),{describePricing:r}=V.usePricingDescription({currency:e.toRef(i,"currency"),billingPeriod:e.toRef(i,"billingPeriod")}),l=a=>n.value.includes(a),c=a=>{l(a)?n.value=n.value.filter(p=>p!==a):n.value=[...n.value,a]};return(a,p)=>(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{"no-spacing":"","no-border":!t.groupName,"content-background":t.groupName?"gray":"none"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["grid grid-cols-1 gap-1",{"p-1":t.groupName}])},[t.groupName?(e.openBlock(),e.createBlock(V._sfc_main$1,{key:0},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.groupName),1)]),description:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Select any number of products",id:"addon_multiple_editor.description",description:"The description of the addon multiple editor"})),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pricings,s=>(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{key:s.id,"content-background":t.groupName||l(s.id)?"none":"gray",class:e.normalizeClass({"!bg-white":l(s.id)})},{default:e.withCtx(()=>[e.createVNode(y._sfc_main,{name:e.unref(E.getNameFromPricing)(s)??"",description:e.unref(r)(s)},{default:e.withCtx(()=>[l(s.id)?(e.openBlock(),e.createBlock(e.unref(B._sfc_main),{key:0,intent:"secondary",square:"",size:"sm","icon-prefix":"remove_shopping_cart",onClick:d=>c(s.id)},null,8,["onClick"])):(e.openBlock(),e.createBlock(e.unref(B._sfc_main),{key:1,intent:"primary","icon-prefix":"add",size:"sm",onClick:d=>c(s.id)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Add to subscription ",id:"addon_multiple_editor.add_to_subscription_button",description:"The button to add a pricing to the subscription"})),1)]),_:1},8,["onClick"]))]),_:2},1032,["name","description"])]),_:2},1032,["content-background","class"]))),128))])],2)]),_:1},8,["no-border","content-background"]))}});function re(t){var n;return(((n=t.pricing_categories)==null?void 0:n.flatMap(o=>o.pricings??[]))??[]).filter(o=>o!==null)}const se={class:"sv-plan-customization__body grid grid-cols-1 gap-1"},ue=e.defineComponent({__name:"PlanCustomizationEditor",props:e.mergeModels({subscription:{type:Object},enabledPricingIds:{type:Array},initialSeatsValues:{type:Array},initialUnitsValues:{type:Array},billingPeriod:{type:Object},currency:{type:String}},{seatsValues:{required:!0},seatsValuesModifiers:{},unitsValues:{required:!0},unitsValuesModifiers:{},enabledPricingIds:{required:!0},enabledPricingIdsModifiers:{}}),emits:["update:seatsValues","update:unitsValues","update:enabledPricingIds"],setup(t){const i=t,n=e.useModel(t,"seatsValues"),o=e.useModel(t,"unitsValues"),r=e.useModel(t,"enabledPricingIds"),{$t:l}=g.useIntl(),c=e.computed(()=>{var d;const s=(d=D.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:i.subscription.pricing_plan_schedule_infos,type:"DEFAULT"}))==null?void 0:d.pricing_plan_version;return s?re(s):[]}),a=e.computed(()=>c.value.filter(s=>s.product_type==="ADDON")),p=e.computed(()=>$.getPricingGroupsFromExtendedPricingPlanSubscription(i.subscription));return(s,d)=>(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{class:"sv-plan-customization",title:e.unref(l)({defaultMessage:"Customize plan",id:"checkout.customize_plan_block.title",description:"The title of the customize plan block in the checkout form"}),"no-spacing":"","no-border":"","content-background":"none"},{default:e.withCtx(()=>[e.createElementVNode("div",se,[e.createVNode(Q,{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=u=>n.value=u),class:"sv-plan-customization__seats","initial-seats-values":t.initialSeatsValues,pricings:c.value},null,8,["modelValue","initial-seats-values","pricings"]),e.createVNode(ne,{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=u=>o.value=u),class:"sv-plan-customization__units","initial-units-values":t.initialUnitsValues,pricings:c.value},null,8,["modelValue","initial-units-values","pricings"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,u=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u.id},[u.product_type==="DEFAULT"&&u.selection_constraint==="EXACTLY_ONE"?(e.openBlock(),e.createBlock(V._sfc_main,{key:0,modelValue:r.value,"onUpdate:modelValue":d[2]||(d[2]=m=>r.value=m),class:"sv-plan-customization__group","group-name":u.name,pricings:u.pricings,"billing-period":t.billingPeriod,currency:t.currency},null,8,["modelValue","group-name","pricings","billing-period","currency"])):u.product_type==="ADDON"&&u.selection_constraint==="AT_MOST_ONE"?(e.openBlock(),e.createBlock(le,{key:1,modelValue:r.value,"onUpdate:modelValue":d[3]||(d[3]=m=>r.value=m),class:"sv-plan-customization__group","group-name":u.name,pricings:u.pricings,constraint:u.selection_constraint,"billing-period":t.billingPeriod,currency:t.currency},null,8,["modelValue","group-name","pricings","constraint","billing-period","currency"])):u.product_type==="ADDON"&&u.selection_constraint==="ANY"?(e.openBlock(),e.createBlock(C,{key:2,modelValue:r.value,"onUpdate:modelValue":d[4]||(d[4]=m=>r.value=m),class:"sv-plan-customization__group",pricings:u.pricings,"group-name":u.name,"billing-period":t.billingPeriod,currency:t.currency},null,8,["modelValue","pricings","group-name","billing-period","currency"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(C,{modelValue:r.value,"onUpdate:modelValue":d[5]||(d[5]=u=>r.value=u),class:"sv-plan-customization__group",pricings:a.value,"billing-period":t.billingPeriod,currency:t.currency},null,8,["modelValue","pricings","billing-period","currency"])])]),_:1},8,["title"]))}});exports.default=ue;
|