@solvimon/solvimon-web 0.1.0-alpha.16 → 0.1.0-alpha.18

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.
Files changed (175) hide show
  1. package/README.md +33 -31
  2. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-C2IRj-FB.mjs +238 -0
  3. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Rub9ifBk.js +1 -0
  4. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BYBAO4Au.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BWnZ98RQ.mjs} +2 -2
  5. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BI3Lg7nO.js → BillingInformation.vue_vue_type_script_setup_true_lang-DurgWlLC.js} +1 -1
  6. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CTnn1gkW.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D7gL7dZX.mjs} +3 -3
  7. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Df7CsbiW.js +1 -0
  8. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-OUg4yv7r.mjs +2654 -0
  9. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-mM5udvi8.js +1 -0
  10. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BIpg-MSJ.mjs +53 -0
  11. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BM3p8Pk8.js +1 -0
  12. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D5eSNYH2.js +1 -0
  13. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DbY35gE_.mjs} +1 -1
  14. package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js → InvoiceHeader.vue_vue_type_script_setup_true_lang-Ci8r6tuC.js} +1 -1
  15. package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs → InvoiceHeader.vue_vue_type_script_setup_true_lang-jshby9pF.mjs} +1 -1
  16. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-CNKxTtO7.js +1 -0
  17. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBMgilG2.mjs +153 -0
  18. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CupZFJSF.mjs +52 -0
  19. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D6lpD1zo.js +1 -0
  20. package/dist/{PaymentHistoryBlock-BKMttUyk.mjs → PaymentHistoryBlock-Bxr8lUGs.mjs} +1 -1
  21. package/dist/{PaymentHistoryBlock-BGbTy4Se.js → PaymentHistoryBlock-COjIVYX4.js} +1 -1
  22. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Bmgx7PSt.js +1 -0
  23. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CDjGab5p.mjs} +1 -1
  24. package/dist/{PaymentIntegrationForm-D4QupHWl.js → PaymentIntegrationForm-BSauhuKv.js} +1 -1
  25. package/dist/{PaymentIntegrationForm-CypW6fZY.mjs → PaymentIntegrationForm-PIT8gHYN.mjs} +1 -1
  26. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-5XKz3kop.js +1 -0
  27. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-COO2ZUhN.mjs +148 -0
  28. package/dist/PaymentIntegrationFormAdyen-B-Jbu2hU.js +1 -0
  29. package/dist/PaymentIntegrationFormAdyen-Cjj9aK0E.mjs +729 -0
  30. package/dist/PaymentIntegrationFormStripe-Bnn8S1o5.js +1 -0
  31. package/dist/PaymentIntegrationFormStripe-arpua_ZT.mjs +545 -0
  32. package/dist/PaymentMethodForm-B7T5rrNz.mjs +4 -0
  33. package/dist/PaymentMethodForm-CLz3ZS-b.js +1 -0
  34. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-B8eNptZp.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-C4Zf92QP.mjs} +25 -14
  35. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-UH9AVXnG.js +1 -0
  36. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIIt6fGp.mjs} +77 -31
  37. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-ifai5HVr.js +1 -0
  38. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cqk-vonA.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DaWlLor0.mjs} +115 -68
  39. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DdUoeTUL.js +1 -0
  40. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CyYhYYRp.mjs +37 -0
  41. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DdjYVNku.js +1 -0
  42. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cu55ZvCH.js +1 -0
  43. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-z8P1u1Gi.mjs +100 -0
  44. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-BKDMwuyh.js +1 -0
  45. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DB1p61kZ.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BOUSk2ZB.mjs} +22 -119
  46. package/dist/adyen-BMDZQBUG.js +1 -0
  47. package/dist/{url-1Lbg5Yni.mjs → adyen-Ba-mF3Jy.mjs} +31 -73
  48. package/dist/component--Y7Igv5i.mjs +1022 -0
  49. package/dist/component-DIy1hvJM.js +1 -0
  50. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  51. package/dist/components/BillingInformation/BillingInformation.es.js +4 -4
  52. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  53. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +4 -4
  54. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  55. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +4 -4
  56. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  57. package/dist/components/Invoice/Invoice.es.js +7 -7
  58. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  59. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
  60. package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -1
  61. package/dist/components/InvoiceHeader/InvoiceHeader.es.js +4 -4
  62. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  63. package/dist/components/InvoicesList/InvoicesList.es.js +3 -3
  64. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  65. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
  66. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  67. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +6 -6
  68. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  69. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +7 -58
  70. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  71. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +5 -5
  72. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  73. package/dist/components/WalletBalances/WalletBalances.es.js +25 -9
  74. package/dist/core/action-request.types.d.ts +3 -15
  75. package/dist/core/index.cjs.js +1 -1
  76. package/dist/core/index.es.js +1 -1
  77. package/dist/core/types.d.ts +4 -2
  78. package/dist/{customer-Bv_fqXzO.mjs → customer-DovIxTG1.mjs} +1 -1
  79. package/dist/{customer-_W8gIX5m.js → customer-brfznoHY.js} +1 -1
  80. package/dist/en-US-BvOHPudj.js +1 -0
  81. package/dist/{en-US-DAgOSlgv.mjs → en-US-CXDO3qhq.mjs} +121 -36
  82. package/dist/index-BMWWP8xj.js +1 -0
  83. package/dist/index-Do7kzLpg.mjs +265 -0
  84. package/dist/index.cjs.js +1 -1
  85. package/dist/index.d.ts +2 -1
  86. package/dist/index.es.js +7 -4
  87. package/dist/invoices-Cf3dSYSj.js +1 -0
  88. package/dist/{invoices-BGb0AwVF.mjs → invoices-Dk-z04lg.mjs} +32 -16
  89. package/dist/{nl-NL-DCsmrA8A.mjs → nl-NL-BgL_PuBn.mjs} +126 -40
  90. package/dist/nl-NL-COGUFg60.js +1 -0
  91. package/dist/{paymentMethods-DvqlWe96.mjs → paymentMethods-BnF1XYS1.mjs} +21 -5
  92. package/dist/paymentMethods-DVDC_WfL.js +1 -0
  93. package/dist/{payments-DMDDI3MK.js → payments-DVZFO5yb.js} +1 -1
  94. package/dist/{payments-CpzTVrQM.mjs → payments-TnRjtlOw.mjs} +1 -1
  95. package/dist/pricing-CuYndX6t.js +1 -0
  96. package/dist/pricing-GwLCiSzs.mjs +19 -0
  97. package/dist/pricingPlanSchedule-B9HFiXy-.js +1 -0
  98. package/dist/pricingPlanSchedule-CXG3CQ61.mjs +146 -0
  99. package/dist/{registry-B-If1W_u.mjs → registry-Ck0Gb6rj.mjs} +7 -4
  100. package/dist/registry-Cra6yoB4.js +1 -0
  101. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  102. package/dist/screens/Checkout/Checkout.es.js +429 -689
  103. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  104. package/dist/screens/CustomerOverview/CustomerOverview.es.js +61 -39
  105. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
  106. package/dist/screens/PayInvoice/PayInvoice.es.js +30 -13
  107. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -1
  108. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +28 -18
  109. package/dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts +3 -0
  110. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs.js +1 -0
  111. package/dist/screens/SubscriptionDetails/SubscriptionDetails.es.js +889 -0
  112. package/dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts +3 -0
  113. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs.js +1 -0
  114. package/dist/screens/SubscriptionManagement/SubscriptionManagement.es.js +716 -0
  115. package/dist/solvimon-web.css +1 -1
  116. package/dist/subscription-C41lG-rH.mjs +89 -0
  117. package/dist/subscription-b0OPx8Du.js +1 -0
  118. package/dist/subscriptions-BFCKVHnP.js +1 -0
  119. package/dist/subscriptions-vEE4Y7qm.mjs +58 -0
  120. package/dist/{useActionDispatchProvider-Dz8-e4gZ.mjs → useActionDispatchProvider-BlEf-RZ5.mjs} +1 -1
  121. package/dist/{useActionDispatchProvider-BHTknMoH.js → useActionDispatchProvider-aJOy3kr1.js} +1 -1
  122. package/dist/{useCustomer-Z24KchWC.js → useCustomer-C1XTqmrQ.js} +1 -1
  123. package/dist/{useCustomer-VVJi8z2w.mjs → useCustomer-Cw8LXT6S.mjs} +2 -2
  124. package/dist/{useIncrementalLoading-DmOT2MXH.mjs → useIncrementalLoading-8WtKZ-mP.mjs} +2 -2
  125. package/dist/useIncrementalLoading-CkY2klIW.js +1 -0
  126. package/dist/{useInvoiceData-Bl87gzIS.js → useInvoiceData-BrxMo4Zt.js} +1 -1
  127. package/dist/{useInvoiceData-Di5pLPM0.mjs → useInvoiceData-Cy_ysMsq.mjs} +2 -2
  128. package/dist/{useInvoicesList-z19cteaD.mjs → useInvoicesList-DMsZn1tE.mjs} +4 -4
  129. package/dist/useInvoicesList-DmisMQzy.js +1 -0
  130. package/dist/{useLoadInitialData-CkpryfjF.mjs → useLoadInitialData-BP1v7qhd.mjs} +1 -1
  131. package/dist/{useLoadInitialData-CTqfiMTN.js → useLoadInitialData-_BjCD0Jc.js} +1 -1
  132. package/dist/{usePaymentMethodOptions-BoGHJjng.mjs → usePaymentMethodOptions-CWfGvW0U.mjs} +9 -3
  133. package/dist/{usePaymentMethodOptions-BsCZnCQW.js → usePaymentMethodOptions-xeSTmaVo.js} +1 -1
  134. package/dist/{usePaymentMethods-AC-4rrR9.js → usePaymentMethods-CAFMvSOr.js} +1 -1
  135. package/dist/{usePaymentMethods-ocHmNoP7.mjs → usePaymentMethods-Cyk4cjoE.mjs} +2 -2
  136. package/dist/{usePayments-CgXZeWrU.js → usePayments-BieVBaz-.js} +1 -1
  137. package/dist/{usePayments-D85eB5l4.mjs → usePayments-D88XSZfS.mjs} +10 -4
  138. package/dist/{usePortal-B1O1zgdV.mjs → usePortal-0NDlbFr9.mjs} +1 -1
  139. package/dist/{usePortal-DVD7PcWI.js → usePortal-B954nyEB.js} +1 -1
  140. package/dist/{useService-CHrkefKd.js → useService-BiljI7XA.js} +1 -1
  141. package/dist/{useService-DF57xuDd.mjs → useService-CqfJi5ST.mjs} +1 -1
  142. package/dist/useSubscription-9rJpFNUF.mjs +29 -0
  143. package/dist/useSubscription-k3limdu_.js +1 -0
  144. package/dist/vendor-ui-Dfh3_g4q.js +1 -0
  145. package/dist/{vendor-ui-B8IlviSs.mjs → vendor-ui-ItGf7wJV.mjs} +8006 -6329
  146. package/package.json +23 -9
  147. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C_uHr21N.js +0 -1
  148. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js +0 -1
  149. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js +0 -1
  150. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js +0 -1
  151. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CrGSfZZs.mjs +0 -1537
  152. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-eWmC5GOT.js +0 -1
  153. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js +0 -1
  154. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVoS3ZXS.js +0 -1
  155. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-56vu59V4.js +0 -1
  156. package/dist/component-Bg2JVC_O.mjs +0 -933
  157. package/dist/component-Bs8oszfD.js +0 -1
  158. package/dist/en-US-C0gIE4Q1.js +0 -1
  159. package/dist/index-CzL1ZcGi.mjs +0 -85
  160. package/dist/index-DRdBmZ2-.js +0 -1
  161. package/dist/invoices-D-OKipCg.js +0 -1
  162. package/dist/nl-NL-Br7muSHK.js +0 -1
  163. package/dist/paymentMethods-DIbB759g.js +0 -1
  164. package/dist/registry-uG2isab0.js +0 -1
  165. package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +0 -3
  166. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +0 -1
  167. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +0 -1102
  168. package/dist/subscriptions-BPYyv09M.mjs +0 -75
  169. package/dist/subscriptions-CC61I6Nj.js +0 -1
  170. package/dist/url-B6-3PkW2.js +0 -1
  171. package/dist/useIncrementalLoading-CuSndpP2.js +0 -1
  172. package/dist/useInvoicesList-CFk-_oVK.js +0 -1
  173. package/dist/useWalletBalanceItems-BL-R5foK.js +0 -1
  174. package/dist/useWalletBalanceItems-COQDLfoZ.mjs +0 -109
  175. package/dist/vendor-ui-C3Tq-qY_.js +0 -1
@@ -0,0 +1,148 @@
1
+ import { defineComponent, defineAsyncComponent, ref, computed, openBlock, createElementBlock, Fragment, renderList, unref, createBlock, createCommentVNode, withCtx, createTextVNode, toDisplayString } from "vue";
2
+ import { u as useIntl, r as _sfc_main$1 } from "./vendor-ui-ItGf7wJV.mjs";
3
+ const isAdyenPaymentIntegration = (paymentMethodOption) => {
4
+ var _a;
5
+ return ((_a = paymentMethodOption.integration.payment_gateway) == null ? void 0 : _a.variant) === "ADYEN";
6
+ };
7
+ const isStripePaymentIntegration = (paymentMethodOption) => {
8
+ var _a;
9
+ return ((_a = paymentMethodOption.integration.payment_gateway) == null ? void 0 : _a.variant) === "STRIPE";
10
+ };
11
+ const isSelectedIntegration = ({
12
+ selectedIntegration,
13
+ paymentMethodOption
14
+ }) => {
15
+ var _a, _b;
16
+ return selectedIntegration === ((_b = (_a = paymentMethodOption.integration) == null ? void 0 : _a.payment_gateway) == null ? void 0 : _b.variant);
17
+ };
18
+ const _sfc_main = /* @__PURE__ */ defineComponent({
19
+ __name: "PaymentIntegrationForm",
20
+ props: {
21
+ customerId: { type: String },
22
+ variant: { type: String },
23
+ context: { type: Object },
24
+ paymentMethodOptions: { type: Array },
25
+ countryCode: { type: String },
26
+ invoiceId: { type: String },
27
+ amount: { type: Object },
28
+ selectedOption: { type: String },
29
+ email: { type: String },
30
+ name: { type: String },
31
+ validateOnSubmit: { type: Function },
32
+ forceStorePaymentMethod: { type: Boolean }
33
+ },
34
+ emits: ["select", "payment-failed", "payment-success", "ready"],
35
+ setup(__props, { expose: __expose, emit: __emit }) {
36
+ const PaymentIntegrationFormStripe = defineAsyncComponent(
37
+ () => import("./PaymentIntegrationFormStripe-arpua_ZT.mjs").then(
38
+ (m) => m.default
39
+ )
40
+ );
41
+ const PaymentIntegrationFormAdyen = defineAsyncComponent(
42
+ () => import("./PaymentIntegrationFormAdyen-Cjj9aK0E.mjs").then(
43
+ (m) => m.default
44
+ )
45
+ );
46
+ const props = __props;
47
+ const emit = __emit;
48
+ __expose({ submit });
49
+ const { $t } = useIntl();
50
+ const userSelectedIntegration = ref();
51
+ const selectedIntegration = computed(
52
+ () => {
53
+ var _a, _b;
54
+ return userSelectedIntegration.value ?? ((_b = (_a = props.paymentMethodOptions[0]) == null ? void 0 : _a.integration.payment_gateway) == null ? void 0 : _b.variant);
55
+ }
56
+ );
57
+ const integrationRefs = ref(/* @__PURE__ */ new Map());
58
+ const showIntegrationError = ref(false);
59
+ const handleSelect = ({
60
+ paymentGatewayVariant,
61
+ paymentMethodType
62
+ }) => {
63
+ showIntegrationError.value = false;
64
+ userSelectedIntegration.value = paymentGatewayVariant;
65
+ emit("select", { paymentGatewayVariant, paymentMethodType });
66
+ };
67
+ const setIntegrationRef = (paymentMethodOption) => {
68
+ return (el) => {
69
+ var _a;
70
+ return integrationRefs.value.set((_a = paymentMethodOption.integration.payment_gateway) == null ? void 0 : _a.variant, el);
71
+ };
72
+ };
73
+ function submit() {
74
+ var _a, _b;
75
+ if (!selectedIntegration.value) {
76
+ showIntegrationError.value = true;
77
+ void ((_a = props.validateOnSubmit) == null ? void 0 : _a.call(props));
78
+ }
79
+ (_b = integrationRefs.value.get(selectedIntegration.value)) == null ? void 0 : _b.submit();
80
+ }
81
+ return (_ctx, _cache) => {
82
+ return openBlock(), createElementBlock(Fragment, null, [
83
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.paymentMethodOptions, (paymentMethodOption) => {
84
+ return openBlock(), createElementBlock(Fragment, {
85
+ key: paymentMethodOption.integration.id
86
+ }, [
87
+ unref(isAdyenPaymentIntegration)(paymentMethodOption) ? (openBlock(), createBlock(unref(PaymentIntegrationFormAdyen), {
88
+ key: 0,
89
+ ref_for: true,
90
+ ref: setIntegrationRef(paymentMethodOption),
91
+ context: __props.context,
92
+ "payment-method-option-response-entry": paymentMethodOption,
93
+ "country-code": __props.countryCode,
94
+ "customer-id": __props.customerId,
95
+ variant: __props.variant,
96
+ amount: __props.amount,
97
+ "invoice-id": __props.invoiceId,
98
+ selected: unref(isSelectedIntegration)({ selectedIntegration: selectedIntegration.value, paymentMethodOption }),
99
+ "validate-on-submit": __props.validateOnSubmit,
100
+ "force-store-payment-method": __props.forceStorePaymentMethod,
101
+ onSelect: handleSelect,
102
+ onPaymentFailed: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("payment-failed", $event)),
103
+ onPaymentSuccess: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("payment-success")),
104
+ onReady: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("ready"))
105
+ }, null, 8, ["context", "payment-method-option-response-entry", "country-code", "customer-id", "variant", "amount", "invoice-id", "selected", "validate-on-submit", "force-store-payment-method"])) : unref(isStripePaymentIntegration)(paymentMethodOption) ? (openBlock(), createBlock(unref(PaymentIntegrationFormStripe), {
106
+ key: 1,
107
+ ref_for: true,
108
+ ref: setIntegrationRef(paymentMethodOption),
109
+ context: __props.context,
110
+ "payment-method-option-response-entry": paymentMethodOption,
111
+ "country-code": __props.countryCode,
112
+ "customer-id": __props.customerId,
113
+ variant: __props.variant,
114
+ amount: __props.amount,
115
+ "invoice-id": __props.invoiceId,
116
+ selected: unref(isSelectedIntegration)({ selectedIntegration: selectedIntegration.value, paymentMethodOption }),
117
+ email: __props.email,
118
+ name: __props.name,
119
+ "validate-on-submit": __props.validateOnSubmit,
120
+ "force-store-payment-method": __props.forceStorePaymentMethod,
121
+ onSelect: handleSelect,
122
+ onPaymentFailed: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("payment-failed", $event)),
123
+ onPaymentSuccess: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("payment-success")),
124
+ onReady: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("ready"))
125
+ }, null, 8, ["context", "payment-method-option-response-entry", "country-code", "customer-id", "variant", "amount", "invoice-id", "selected", "email", "name", "validate-on-submit", "force-store-payment-method"])) : createCommentVNode("", true)
126
+ ], 64);
127
+ }), 128)),
128
+ showIntegrationError.value ? (openBlock(), createBlock(unref(_sfc_main$1), {
129
+ key: 0,
130
+ variant: "error",
131
+ class: "mt-2"
132
+ }, {
133
+ default: withCtx(() => [
134
+ createTextVNode(toDisplayString(unref($t)({
135
+ defaultMessage: "Select a payment method",
136
+ id: "payment_integration_form.select_payment_method_error",
137
+ description: "Error shown when no payment method is selected"
138
+ })), 1)
139
+ ]),
140
+ _: 1
141
+ })) : createCommentVNode("", true)
142
+ ], 64);
143
+ };
144
+ }
145
+ });
146
+ export {
147
+ _sfc_main as _
148
+ };
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),n=require("./PaymentErrorCard.vue_vue_type_script_setup_true_lang-CNKxTtO7.js"),a=require("./payments-DVZFO5yb.js"),o=require("./adyen-BMDZQBUG.js"),r=require("./paymentMethods-DVDC_WfL.js"),i=require("./component-DIy1hvJM.js"),d=e=>{let t={};return"TOKENIZE"===e&&(t={"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ą"}}),t},c=["applepay"];const s="ADYEN",p=e.defineComponent({__name:"PaymentIntegrationFormAdyen",props:{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}},emits:["select","payment-failed","payment-success","ready"],setup(p,{expose:u,emit:m}){let y=null,l=null;const h=p,_=m;u({submit:function(){try{null==y||y.submit()}catch(e){A.error("ADYEN_SUBMIT_FAILED","Failed to submit Adyen drop-in",{},e)}}});const f=e.ref(),g=e.ref(!1),E=e.ref(),A=i.useLogger(),{locale:v}=t.useIntl(),{authorizePayment:R,getPaymentDetails:P}=a.createPaymentsService(),{tokenizePaymentMethod:I}=r.createPaymentMethodsService(),b=e.inject(i.EXPERIMENTAL_FEATURE_INJECTION_KEY);async function k(){var e;const t=o.toMinorUnitAmount(h.amount),n=(null==(e=null==b?void 0:b.value)?void 0:e["express-checkout"])?function(e){return e.filter(e=>!c.some(t=>{var n;return t===(null==(n=e.type)?void 0:n.toLowerCase())}))}(o.mapAdyenPaymentMethods(h.paymentMethodOptionResponseEntry)):o.mapAdyenPaymentMethods(h.paymentMethodOptionResponseEntry);return{checkoutConfig:{amount:t,clientKey:o.getAdyenClientKeyFromPaymentMethodOptionsResponse(h.paymentMethodOptionResponseEntry),environment:o.getAdyenEnvironmentFromPaymentMethodOptionsResponse(h.paymentMethodOptionResponseEntry,A),locale:v,translations:d(h.variant),countryCode:h.countryCode,analytics:{enabled:!1},paymentMethodsResponse:{paymentMethods:n},onSubmit:N,onAdditionalDetails:w,onPaymentCompleted:D,onPaymentFailed:C,onError:x,showPayButton:!1},dropInConfig:{disableFinalAnimation:!0,paymentMethodsConfiguration:{card:{hasHolderName:!0,holderNameRequired:!0,enableStoreDetails:!h.forceStorePaymentMethod&&"AUTHORIZE"===h.variant},paypal:{intent:t.value>0?"authorize":"tokenize",showPayButton:!0}},openFirstPaymentMethod:h.selected,onSelect:({props:{type:e}})=>{e&&_("select",{paymentMethodType:e,paymentGatewayVariant:"ADYEN"})},onReady:()=>_("ready")}}}async function O(){if(f.value)try{await T();const[e,{default:t}]=await Promise.all([Promise.resolve().then(()=>require("./index-DIFK3mcJ.js")),Promise.resolve().then(()=>require("./adyen-DZsyEXkw.js"))]),{AdyenCheckout:n,Dropin:a,Card:o,Bancontact:r,Ach:i,AmazonPay:d,ApplePay:c,BcmcMobile:s,BacsDirectDebit:p,CashAppPay:u,EPS:m,GooglePay:_,Klarna:g,PayByBank:E,PayPal:A,SepaDirectDebit:v,Trustly:R,Twint:P,PayByBankUS:I,Redirect:b}=e,{checkoutConfig:O,dropInConfig:N}=await k();l=await n(O),y=new a(l,{...N,paymentMethodComponents:[o,r,i,d,c,s,p,u,m,_,g,E,A,v,R,P,I,b]}).mount(f.value),function(e){var t;const n=null==(t=f.value)?void 0:t.getRootNode();if(n instanceof ShadowRoot){const t=document.createElement("style");t.textContent=e,n.appendChild(t);const a=document.createElement("style");a.textContent="\n :host {\n --adyen-sdk-color-background-secondary: transparent;\n --adyen-sdk-color-background-primary: rgb(243 244 246 / 0.5);\n --adyen-sdk-color-outline-secondary: #e5e7eb;\n --adyen-sdk-color-outline-primary: transparent;\n --adyen-sdk-color-background-always-dark: var(--color-primary-500);\n --adyen-sdk-color-background-inverse-primary-hover: var(--color-primary-600);\n }\n\n .adyen-checkout__payment-method__image__wrapper {\n width: 32px;\n height: 32px;\n }\n\n .adyen-checkout__payment-method__image {\n height: 32px;\n }\n\n .adyen-checkout__input-wrapper,\n .adyen-checkout__input {\n border-color: rgb(229, 231, 235);\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__button,\n .adyen-checkout__payment-method {\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__payment-method {\n border-color: rgb(229, 231, 235);\n box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n transition: box-shadow 0.2s ease-in-out;\n }\n\n .adyen-checkout__payment-method--selected {\n box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n }\n\n .adyen-checkout__payment-method:after {\n transform: scale(0%);\n }\n\n .adyen-checkout__paypal__button {\n display: block !important;\n }\n\n .adyen-checkout__payment-methods-list {\n gap: 4px;\n }\n\n .adyen-checkout__dropdown__list {\n background-color: white;\n border-radius: var(--adyen-sdk-border-radius-s, 4px);\n }\n\n .adyen-checkout__payment-method.adyen-checkout__payment-method--selected:after {\n content: '✓';\n width: 20px;\n height: 20px;\n border-radius: 10px;\n background-color: var(--color-primary-600);\n position: absolute;\n top: 14px;\n right: 14px;\n text-align: center;\n line-height: 20px;\n color: white;\n transform: scale(100%);\n font-size: 12px;\n }\n\n .adyen-checkout__payment-method__header {\n padding: 8px 16px !important;\n }\n\n .adyen-checkout__payment-method__brands {\n align-items: center;\n }\n .adyen-checkout__payment-method__brand-number {\n line-height: 1;\n }\n .adyen-checkout__button__text {\n font-size: 14px;\n }\n .adyen-checkout__store-details {\n background: transparent;\n padding: 0;\n }\n .adyen-checkout__checkbox__input + .adyen-checkout__checkbox__label:after {\n border-color: rgb(229, 231, 235);\n }\n ","AUTHORIZE"===h.variant&&(a.textContent+="\n .adyen-checkout__payment-method--cashapp .adyen-checkout-pm-details-wrapper {\n display: none;\n }\n "),n.appendChild(a)}}(t)}catch(e){A.error("PAYMENT_INTEGRATION_INITIALIZATION_FAILED","Failed to mount Adyen web drop-in",{error:e})}}async function T(){y&&(y.unmount(),y=null),f.value&&(f.value.innerHTML="")}function N(...e){const[t,n,a]=e;h.validateOnSubmit().then(e=>{if(!e)return;const n=h.paymentMethodOptionResponseEntry.payment_acceptor.id,r={risk_data:o.transformObjectToAdyenObject(t.data.riskData),payment_method:o.transformObjectToAdyenObject(t.data.paymentMethod),browser_info:o.transformObjectToAdyenObject(t.data.browserInfo)};if("AUTHORIZE"===h.variant){const e=o.createReturnUrl({paymentAcceptorId:h.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});return void R({payment_acceptor_id:n,...h.customerId?{customer_id:h.customerId}:{},payment_gateway_variant:s,adyen:{...r,store_payment_method:h.forceStorePaymentMethod||t.data.storePaymentMethod},amount:h.amount,...h.context?{context:h.context}:{},return_url:e}).then(e=>{const o=t.data.paymentMethod.type;if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===s){const t=B(e,o);return t?(y.handleAction(t),void a.resolve({resultCode:e.action.adyen.result_code,action:t})):void A.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${n}`,{error:e})}if("AUTHORIZED"===e.payment.result)return g.value=!0,void a.resolve({resultCode:"Authorised"});A.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${n}`,{error:e}),a.resolve({resultCode:"Error"})}).catch(e=>{A.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${n}`,{error:e}),a.resolve({resultCode:"Error"})})}if("TOKENIZE"===h.variant){const e=o.createReturnUrl({paymentAcceptorId:h.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});if(!h.customerId)return void A.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${n}`);I({customer_id:h.customerId,payment_acceptor_id:n,payment_gateway_variant:s,adyen:r,return_url:e}).then(e=>{const o=t.data.paymentMethod.type;if("ACTION_REQUIRED"===e.status&&e.action.payment_gateway_variant===s){const t=B(e,o);return t?(y.handleAction(t),void a.resolve({resultCode:e.action.adyen.result_code,action:t})):void A.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${n}`,{error:e})}if("AUTHORIZED"===e.payment.result)return g.value=!0,void a.resolve({resultCode:"Authorised"});A.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${n}`,{error:e}),a.resolve({resultCode:"Error"})}).catch(e=>{A.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${n}`,{error:e}),a.resolve({resultCode:"Error"})})}}).catch(e=>{A.error("INTEGRATION_ERROR","Unhandled error in payment submission flow",{},e)})}function B(e,t){if("ACTION_REQUIRED"!==e.status)return;const n=e.action;if("ADYEN"!=n.payment_gateway_variant)return;const a=n.adyen;return{paymentMethodType:(null==a?void 0:a.payment_method_type)??t,method:n.method,url:n.url,data:n.data,type:null==a?void 0:a.action_type,paymentData:null==a?void 0:a.payment_data,sdkData:null==a?void 0:a.sdk_data}}function w(...e){const[t]=e,n=t.data.details,a=t.data.paymentData;if(h.paymentMethodOptionResponseEntry.payment_acceptor.id)return void M({detailsResult:n?(o=n,Object.fromEntries(Object.entries(o).filter(([,e])=>null!=e))):void 0,paymentDataResult:a,paymentAcceptorId:h.paymentMethodOptionResponseEntry.payment_acceptor.id});var o;const r={code:"UNKNOWN_ERROR",message:"Payment failed",error:e};_("payment-failed",r),E.value=r}function C(...e){const[t]=e,n={code:"UNKNOWN_ERROR",message:"Payment failed",error:t};_("payment-failed",n),E.value=n}function D(...e){const[,t]=e;null==t||t.unmount(),_("payment-success")}function x(...e){const[t,n]=e;if("CANCEL"===t.name)return;const a={code:"UNKNOWN_ERROR",message:"Something went wrong",error:t};A.error("INTEGRATION_ERROR","Something went wrong",{error:t}),E.value=a,null==n||n.unmount()}function M({detailsResult:e,threeDSResult:t,redirectResult:n,paymentDataResult:a,paymentAcceptorId:o}){P({paymentAcceptorId:o,paymentGatewayVariant:s,adyen:{...e?{details:e}:{},...n?{redirect_result:n}:{},...t?{threeds_result:t}:{},...a?{payment_data:a}:{}}}).then(e=>{"FAILURE"!==e.payment_status?"SUCCESS"!==e.payment_status||_("payment-success"):_("payment-failed",{code:"UNKNOWN_ERROR",message:"Failed getting payment details",error:e})}).catch(e=>{A.error("PAYMENT_DETAILS_CALL_FAILED","Failed fetching payment details",{error:e})})}return e.onMounted(()=>{O(),function(){const e=o.getQueryParam(o.REDIRECT_RESULT_QUERY_STRING),t=o.getQueryParam(o.PAYMENT_ACCEPTOR_ID_QUERY_STRING);e&&(t?M({paymentAcceptorId:t,detailsResult:{redirectResult:decodeURI(e)}}):A.error("INVALID_REDIRECT_RESULT","Redirect result is set but payment acceptor id is missing",{context:{redirectResult:e}}))}()}),e.onBeforeUnmount(()=>{T()}),e.watch(()=>h.paymentMethodOptionResponseEntry,(e,n)=>{t.isEqual(e,n)||O()},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[g.value?(e.openBlock(),e.createBlock(n._sfc_main,{key:0,variant:p.variant},null,8,["variant"])):E.value?(e.openBlock(),e.createBlock(n._sfc_main$1,{key:1,error:E.value},null,8,["error"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"dropInContainerRef",ref:f},null,512)],64))}});exports.default=p;