@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
@@ -1,9 +1,10 @@
1
- import { u as useIncrementalLoading } from "./useIncrementalLoading-DmOT2MXH.mjs";
2
- import { c as createSubscriptionsService } from "./subscriptions-BPYyv09M.mjs";
1
+ import { u as useIncrementalLoading } from "./useIncrementalLoading-8WtKZ-mP.mjs";
2
+ import { c as createSubscriptionsService } from "./subscriptions-vEE4Y7qm.mjs";
3
3
  import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode, createElementBlock, createSlots, Fragment, renderList } from "vue";
4
- import { u as useIntl, _ as _sfc_main$3, e as _sfc_main$4, m as _sfc_main$5, c as _sfc_main$6, z as _sfc_main$7 } from "./vendor-ui-B8IlviSs.mjs";
5
- import { _ as _sfc_main$8 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
6
- import { u as useActionDispatchProvider } from "./useActionDispatchProvider-Dz8-e4gZ.mjs";
4
+ import { u as useIntl, b as _sfc_main$3, a as _sfc_main$4, n as _sfc_main$5, k as _sfc_main$6 } from "./vendor-ui-ItGf7wJV.mjs";
5
+ import { g as getMostRecentPricingPlan, a as getSubscriptionName } from "./subscription-C41lG-rH.mjs";
6
+ import { _ as _sfc_main$7 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
7
+ import { u as useActionDispatchProvider } from "./useActionDispatchProvider-BlEf-RZ5.mjs";
7
8
  function useSubscriptionsList({
8
9
  customerId,
9
10
  batchSize: pageSize = 15
@@ -29,34 +30,23 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
29
30
  subscription: { type: Object },
30
31
  paymentMethod: { type: Object },
31
32
  customer: { type: Object },
32
- showViewSubscriptionDetailsButton: { type: Boolean, default: true },
33
- showCancelSubscriptionButton: { type: Boolean, default: true },
34
- showRenewSubscriptionButton: { type: Boolean, default: true },
35
- showUpgradeSubscriptionButton: { type: Boolean, default: true }
33
+ showViewSubscriptionDetailsButton: { type: Boolean, default: true }
36
34
  },
37
- emits: ["view-subscription-details", "cancel-subscription", "renew-subscription", "upgrade-subscription"],
35
+ emits: ["view-subscription-details"],
38
36
  setup(__props) {
39
37
  const props = __props;
40
38
  const { $t } = useIntl();
41
39
  const { formatDate } = useIntl();
42
- const mostRecentPricingPlan = computed(() => {
43
- var _a;
44
- const scheduleInfos = props.subscription.pricing_plan_schedule_infos;
45
- if (scheduleInfos.length === 0) {
46
- return void 0;
47
- }
48
- const latestScheduleInfo = scheduleInfos[scheduleInfos.length - 1];
49
- return (_a = latestScheduleInfo == null ? void 0 : latestScheduleInfo.pricing_plan_version) == null ? void 0 : _a.pricing_plan;
50
- });
40
+ const mostRecentPricingPlan = computed(() => getMostRecentPricingPlan(props.subscription));
51
41
  const subscriptionName = computed(
52
- () => {
53
- var _a;
54
- return props.subscription.name || ((_a = mostRecentPricingPlan.value) == null ? void 0 : _a.name) || $t({
42
+ () => getSubscriptionName({
43
+ subscription: props.subscription,
44
+ fallback: $t({
55
45
  defaultMessage: "Subscription",
56
46
  description: "The fallback name for when no subscription name can be determined",
57
47
  id: "customer_overview.subscriptions_block.fallback_subscription_name"
58
- });
59
- }
48
+ })
49
+ })
60
50
  );
61
51
  const subscriptionDescription = computed(
62
52
  () => {
@@ -64,20 +54,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
64
54
  return (_a = mostRecentPricingPlan.value) == null ? void 0 : _a.description;
65
55
  }
66
56
  );
67
- const isCancellable = computed(() => {
68
- const inactivePeriods = props.subscription.inactive_periods;
69
- return !inactivePeriods || inactivePeriods.length === 0;
70
- });
71
- const isRenewable = computed(() => {
72
- const inactivePeriods = props.subscription.inactive_periods;
73
- return Array.isArray(inactivePeriods) && inactivePeriods.length > 0;
74
- });
75
- const isCancelButtonVisible = computed(
76
- () => isCancellable.value && props.showCancelSubscriptionButton
77
- );
78
- const isRenewButtonVisible = computed(
79
- () => isRenewable.value && props.showRenewSubscriptionButton
80
- );
81
57
  const isDetailButtonVisible = computed(() => props.showViewSubscriptionDetailsButton);
82
58
  return (_ctx, _cache) => {
83
59
  return openBlock(), createBlock(unref(_sfc_main$3), { class: "sv-subscriptions-list__item" }, {
@@ -163,55 +139,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
163
139
  })), 1)
164
140
  ]),
165
141
  _: 1
166
- })) : createCommentVNode("", true),
167
- __props.showUpgradeSubscriptionButton ? (openBlock(), createBlock(unref(_sfc_main$6), {
168
- key: 1,
169
- variant: "outline",
170
- color: "gray",
171
- class: "sv-action sv-action--secondary sv-subscriptions-list__item-upgrade w-full md:w-auto",
172
- type: "button",
173
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("upgrade-subscription", { subscriptionId: __props.subscription.id }))
174
- }, {
175
- default: withCtx(() => [
176
- createTextVNode(toDisplayString(unref($t)({
177
- defaultMessage: "Upgrade subscription",
178
- description: "The label for the upgrade subscription button in the subscriptions block",
179
- id: "customer.subscriptions_block.upgrade_button_label"
180
- })), 1)
181
- ]),
182
- _: 1
183
- })) : createCommentVNode("", true),
184
- isCancelButtonVisible.value ? (openBlock(), createBlock(unref(_sfc_main$7), {
185
- key: 2,
186
- icon: "delete",
187
- variant: "outline",
188
- color: "gray",
189
- size: "md",
190
- class: "sv-action sv-subscriptions-list__item-cancel",
191
- type: "button",
192
- "aria-label": unref($t)({
193
- defaultMessage: "Cancel subscription",
194
- description: "Aria label for the cancel subscription icon button",
195
- id: "customer.subscriptions_block.cancel_button_label"
196
- }),
197
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("cancel-subscription", { subscriptionId: __props.subscription.id }))
198
- }, null, 8, ["aria-label"])) : createCommentVNode("", true),
199
- isRenewButtonVisible.value ? (openBlock(), createBlock(unref(_sfc_main$6), {
200
- key: 3,
201
- variant: "outline",
202
- color: "gray",
203
- class: "sv-action sv-action--secondary sv-subscriptions-list__item-renew w-full md:w-auto",
204
- type: "button",
205
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("renew-subscription", { subscriptionId: __props.subscription.id }))
206
- }, {
207
- default: withCtx(() => [
208
- createTextVNode(toDisplayString(unref($t)({
209
- defaultMessage: "Renew subscription",
210
- description: "The label for the renew subscription button in the subscriptions block",
211
- id: "customer.subscriptions_block.renew_button_label"
212
- })), 1)
213
- ]),
214
- _: 1
215
142
  })) : createCommentVNode("", true)
216
143
  ])
217
144
  ])
@@ -233,12 +160,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
233
160
  paymentMethods: { default: () => [], type: Array },
234
161
  isLoading: { type: Boolean },
235
162
  showViewAllButton: { type: Boolean, default: true },
236
- showViewDetailsButton: { type: Boolean, default: true },
237
- showCancelButton: { type: Boolean, default: true },
238
- showRenewButton: { type: Boolean, default: true },
239
- showUpgradeButton: { type: Boolean, default: true }
163
+ showViewDetailsButton: { type: Boolean, default: true }
240
164
  },
241
- emits: ["view-subscription-details", "view-all-subscriptions", "cancel-subscription", "renew-subscription", "upgrade-subscription", "load-more"],
165
+ emits: ["view-subscription-details", "view-all-subscriptions", "load-more"],
242
166
  setup(__props) {
243
167
  const props = __props;
244
168
  const { $t } = useIntl();
@@ -304,14 +228,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
304
228
  "payment-method": getPaymentMethod(subscription.payment_method_id),
305
229
  customer: __props.customer,
306
230
  "show-view-subscription-details-button": __props.showViewDetailsButton,
307
- "show-cancel-subscription-button": __props.showCancelButton,
308
- "show-renew-subscription-button": __props.showRenewButton,
309
- "show-upgrade-subscription-button": __props.showUpgradeButton,
310
- onViewSubscriptionDetails: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("view-subscription-details", $event)),
311
- onCancelSubscription: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("cancel-subscription", $event)),
312
- onRenewSubscription: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("renew-subscription", $event)),
313
- onUpgradeSubscription: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("upgrade-subscription", $event))
314
- }, null, 8, ["subscription", "payment-method", "customer", "show-view-subscription-details-button", "show-cancel-subscription-button", "show-renew-subscription-button", "show-upgrade-subscription-button"]);
231
+ onViewSubscriptionDetails: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("view-subscription-details", $event))
232
+ }, null, 8, ["subscription", "payment-method", "customer", "show-view-subscription-details-button"]);
315
233
  }), 128))
316
234
  ]))
317
235
  ]),
@@ -358,8 +276,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
358
276
  setup(__props) {
359
277
  const { dispatchAction } = useActionDispatchProvider();
360
278
  return (_ctx, _cache) => {
361
- var _a, _b, _c, _d, _e;
362
- return __props.isLoading ? (openBlock(), createBlock(_sfc_main$8, {
279
+ var _a, _b;
280
+ return __props.isLoading ? (openBlock(), createBlock(_sfc_main$7, {
363
281
  key: 0,
364
282
  variant: "section",
365
283
  class: "sv-subscriptions-list sv-root sv-component sv-loading min-h-[100px]",
@@ -373,28 +291,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
373
291
  "is-loading": __props.isLoading,
374
292
  "show-view-all-button": (_a = __props.configuration) == null ? void 0 : _a.showViewAllButton,
375
293
  "show-view-details-button": (_b = __props.configuration) == null ? void 0 : _b.showViewDetailsButton,
376
- "show-cancel-button": (_c = __props.configuration) == null ? void 0 : _c.showCancelButton,
377
- "show-renew-button": (_d = __props.configuration) == null ? void 0 : _d.showRenewButton,
378
- "show-upgrade-button": (_e = __props.configuration) == null ? void 0 : _e.showUpgradeButton,
379
294
  onViewSubscriptionDetails: _cache[0] || (_cache[0] = ($event) => unref(dispatchAction)({
380
295
  action: "view-subscription-details",
381
296
  data: { subscriptionId: $event.subscriptionId }
382
297
  })),
383
298
  onViewAllSubscriptions: _cache[1] || (_cache[1] = ($event) => unref(dispatchAction)({ action: "view-all-subscriptions" })),
384
- onCancelSubscription: _cache[2] || (_cache[2] = ($event) => unref(dispatchAction)({
385
- action: "cancel-subscription",
386
- data: { subscriptionId: $event.subscriptionId }
387
- })),
388
- onRenewSubscription: _cache[3] || (_cache[3] = ($event) => unref(dispatchAction)({
389
- action: "renew-subscription",
390
- data: { subscriptionId: $event.subscriptionId }
391
- })),
392
- onUpgradeSubscription: _cache[4] || (_cache[4] = ($event) => unref(dispatchAction)({
393
- action: "upgrade-subscription",
394
- data: { subscriptionId: $event.subscriptionId }
395
- })),
396
- onLoadMore: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("load-more"))
397
- }, null, 8, ["customer", "subscriptions", "payment-methods", "is-loading", "show-view-all-button", "show-view-details-button", "show-cancel-button", "show-renew-button", "show-upgrade-button"])) : createCommentVNode("", true);
299
+ onLoadMore: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("load-more"))
300
+ }, null, 8, ["customer", "subscriptions", "payment-methods", "is-loading", "show-view-all-button", "show-view-details-button"])) : createCommentVNode("", true);
398
301
  };
399
302
  }
400
303
  });
@@ -0,0 +1 @@
1
+ const e=new Set(["https:","http:"]);function n(e){const n=new Intl.NumberFormat(void 0,{style:"currency",currency:e.currency}),{maximumFractionDigits:t=10}=n.resolvedOptions();return{value:Math.round(+e.quantity*Math.pow(10,t)),currency:e.currency}}const t="payment_acceptor_id";function r(e){var n,t;return null==(t=null==(n=e.integration.payment_gateway)?void 0:n.adyen)?void 0:t.public_key}function o(e){var n;return(null==(n=e.options)?void 0:n.filter(e=>"ADYEN"===e.payment_gateway_variant).flatMap(e=>{return{type:(n=e.adyen).type,name:n.name,...n.issuers?{issuers:n.issuers}:{},...n.brands?{brands:n.brands}:{},...n.funding_source?{fundingSource:n.funding_source}:{},...n.configuration?{configuration:n.configuration}:{}};var n}))??[]}function a(e,n){var t,r;const o=null==(r=null==(t=null==e?void 0:e.integration.payment_gateway)?void 0:t.adyen)?void 0:r.environment;if(!o)return n.warn("ADYEN_INVALID_CONFIGURATION","No environment set for adyen advanced flow, defaulted to live"),"live";switch(o){case"TEST":return"test";case"LIVE_IN":return"live-in";case"LIVE_AU":return"live-au";case"LIVE_US":return"live-us";case"LIVE_APSE":return"live-apse";case"LIVE":return"live";default:return n.warn("ADYEN_INVALID_CONFIGURATION",`Unsupported environment "${o}" for adyen advanced flow, defaulted to "live"`),"live"}}exports.PAYMENT_ACCEPTOR_ID_QUERY_STRING=t,exports.REDIRECT_RESULT_QUERY_STRING="redirectResult",exports.createReturnUrl=function({paymentAcceptorId:e,redirectUrl:n=window.location.href}){const r=new URL(n);return r.searchParams.set(t,e),r.toString()},exports.getAdyenClientKeyFromPaymentMethodOptionsResponse=r,exports.getAdyenEnvironmentFromPaymentMethodOptionsResponse=a,exports.getAdyenExpressCheckoutConfiguration=function({amount:e,countryCode:t,locale:i,paymentMethodOptionResponse:s,logger:c}){return{...e?{amount:n(e)}:{},analytics:{enabled:!1},clientKey:r(s),countryCode:t,environment:a(s,c),locale:i,paymentMethodsResponse:{paymentMethods:o(s)}}},exports.getQueryParam=function(e,n=window.location.search){return new URLSearchParams(n).get(e)},exports.mapAdyenPaymentMethods=o,exports.safeUrlRedirect=function(n){const t=function(n){try{const t=new URL(n);return e.has(t.protocol)?n:""}catch{return""}}(n);t&&window.location.replace(t)},exports.toMinorUnitAmount=n,exports.transformObjectToAdyenObject=function(e){return e?Object.fromEntries(Object.entries(e).map(([e,n])=>[e,String(n)])):void 0};
@@ -1,5 +1,21 @@
1
- import { defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, normalizeClass, createTextVNode, toDisplayString, renderSlot, createCommentVNode } from "vue";
2
- import { _ as _sfc_main$1, A as _sfc_main$2, e as _sfc_main$3 } from "./vendor-ui-B8IlviSs.mjs";
1
+ const SAFE_PROTOCOLS = /* @__PURE__ */ new Set(["https:", "http:"]);
2
+ function getQueryParam(name, locationSearch = window.location.search) {
3
+ const currentUrl = new URLSearchParams(locationSearch);
4
+ return currentUrl.get(name);
5
+ }
6
+ function sanitizeUrl(url) {
7
+ try {
8
+ const parsed = new URL(url);
9
+ if (!SAFE_PROTOCOLS.has(parsed.protocol)) return "";
10
+ return url;
11
+ } catch {
12
+ return "";
13
+ }
14
+ }
15
+ function safeUrlRedirect(url) {
16
+ const safe = sanitizeUrl(url);
17
+ if (safe) window.location.replace(safe);
18
+ }
3
19
  function toMinorUnitAmount(amount) {
4
20
  const formatter = new Intl.NumberFormat(void 0, {
5
21
  style: "currency",
@@ -11,53 +27,6 @@ function toMinorUnitAmount(amount) {
11
27
  currency: amount.currency
12
28
  };
13
29
  }
14
- const _hoisted_1 = { class: "flex flex-col items-center py-10" };
15
- const _sfc_main = /* @__PURE__ */ defineComponent({
16
- __name: "PaymentFeedbackCard",
17
- props: {
18
- status: { default: "success", type: String },
19
- title: { type: String }
20
- },
21
- setup(__props) {
22
- return (_ctx, _cache) => {
23
- return openBlock(), createBlock(unref(_sfc_main$1), null, {
24
- default: withCtx(() => [
25
- createElementVNode("div", _hoisted_1, [
26
- createVNode(unref(_sfc_main$2), {
27
- icon: __props.status === "success" ? "check_circle" : "error",
28
- class: normalizeClass({
29
- "text-green-400": __props.status === "success",
30
- "text-red-600": __props.status === "error"
31
- }),
32
- size: "lg"
33
- }, null, 8, ["icon", "class"]),
34
- createVNode(unref(_sfc_main$3), {
35
- variant: "heading-3",
36
- tag: "span",
37
- class: "mt-2"
38
- }, {
39
- default: withCtx(() => [
40
- createTextVNode(toDisplayString(__props.title), 1)
41
- ]),
42
- _: 1
43
- }),
44
- _ctx.$slots.default ? (openBlock(), createBlock(unref(_sfc_main$3), {
45
- key: 0,
46
- tag: "div",
47
- variant: "body-sm"
48
- }, {
49
- default: withCtx(() => [
50
- renderSlot(_ctx.$slots, "default")
51
- ]),
52
- _: 3
53
- })) : createCommentVNode("", true)
54
- ])
55
- ]),
56
- _: 3
57
- });
58
- };
59
- }
60
- });
61
30
  const PAYMENT_ACCEPTOR_ID_QUERY_STRING = "payment_acceptor_id";
62
31
  const REDIRECT_RESULT_QUERY_STRING = "redirectResult";
63
32
  function getAdyenClientKeyFromPaymentMethodOptionsResponse(paymentMethodOptionResponse) {
@@ -66,7 +35,9 @@ function getAdyenClientKeyFromPaymentMethodOptionsResponse(paymentMethodOptionRe
66
35
  }
67
36
  function mapAdyenPaymentMethods(paymentMethodOptionResponse) {
68
37
  var _a;
69
- return ((_a = paymentMethodOptionResponse.options) == null ? void 0 : _a.filter((option) => option.payment_gateway_variant === "ADYEN").flatMap(
38
+ return ((_a = paymentMethodOptionResponse.options) == null ? void 0 : _a.filter(
39
+ (option) => option.payment_gateway_variant === "ADYEN"
40
+ ).flatMap(
70
41
  (adyenPaymentMethodOption) => mapAdyenPaymentMethod(adyenPaymentMethodOption.adyen)
71
42
  )) ?? [];
72
43
  }
@@ -92,7 +63,10 @@ function getAdyenEnvironmentFromPaymentMethodOptionsResponse(paymentMethodsOptio
92
63
  var _a, _b;
93
64
  const environment = (_b = (_a = paymentMethodsOptionsResponse == null ? void 0 : paymentMethodsOptionsResponse.integration.payment_gateway) == null ? void 0 : _a.adyen) == null ? void 0 : _b.environment;
94
65
  if (!environment) {
95
- logger.warn("ADYEN_INVALID_CONFIGURATION", "No environment set for adyen advanced flow, defaulted to live");
66
+ logger.warn(
67
+ "ADYEN_INVALID_CONFIGURATION",
68
+ "No environment set for adyen advanced flow, defaulted to live"
69
+ );
96
70
  return "live";
97
71
  }
98
72
  switch (environment) {
@@ -109,7 +83,10 @@ function getAdyenEnvironmentFromPaymentMethodOptionsResponse(paymentMethodsOptio
109
83
  case "LIVE":
110
84
  return "live";
111
85
  default:
112
- logger.warn("ADYEN_INVALID_CONFIGURATION", `Unsupported environment "${environment}" for adyen advanced flow, defaulted to "live"`);
86
+ logger.warn(
87
+ "ADYEN_INVALID_CONFIGURATION",
88
+ `Unsupported environment "${environment}" for adyen advanced flow, defaulted to "live"`
89
+ );
113
90
  return "live";
114
91
  }
115
92
  }
@@ -138,32 +115,13 @@ function getAdyenExpressCheckoutConfiguration({
138
115
  function transformObjectToAdyenObject(obj) {
139
116
  return obj ? Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, String(value)])) : void 0;
140
117
  }
141
- const SAFE_PROTOCOLS = /* @__PURE__ */ new Set(["https:", "http:"]);
142
- function getQueryParam(name, locationSearch = window.location.search) {
143
- const currentUrl = new URLSearchParams(locationSearch);
144
- return currentUrl.get(name);
145
- }
146
- function sanitizeUrl(url) {
147
- try {
148
- const parsed = new URL(url);
149
- if (!SAFE_PROTOCOLS.has(parsed.protocol)) return "";
150
- return url;
151
- } catch {
152
- return "";
153
- }
154
- }
155
- function safeUrlRedirect(url) {
156
- const safe = sanitizeUrl(url);
157
- if (safe) window.location.replace(safe);
158
- }
159
118
  export {
160
119
  PAYMENT_ACCEPTOR_ID_QUERY_STRING as P,
161
120
  REDIRECT_RESULT_QUERY_STRING as R,
162
- _sfc_main as _,
163
121
  getAdyenEnvironmentFromPaymentMethodOptionsResponse as a,
164
122
  getAdyenClientKeyFromPaymentMethodOptionsResponse as b,
165
- createReturnUrl as c,
166
- transformObjectToAdyenObject as d,
123
+ transformObjectToAdyenObject as c,
124
+ createReturnUrl as d,
167
125
  getAdyenExpressCheckoutConfiguration as e,
168
126
  getQueryParam as g,
169
127
  mapAdyenPaymentMethods as m,