@solvimon/solvimon-web 0.1.0-alpha.6 → 0.1.0-alpha.7

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 (179) hide show
  1. package/dist/Alert.vue.es-DMPvSykx.js +1 -0
  2. package/dist/Alert.vue.es-DsJ1ckRU.mjs +172 -0
  3. package/dist/Amount.vue.es-C6JE5rL8.mjs +23 -0
  4. package/dist/Amount.vue.es-h8wulbBG.js +1 -0
  5. package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +93 -0
  6. package/dist/Avatar.vue.es-BbyE0AjW.js +1 -0
  7. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +1 -0
  8. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DZ1XkSJ3.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs} +6 -4
  9. package/dist/Button.vue.es-6sBk5tBL.mjs +408 -0
  10. package/dist/Button.vue.es-BC4_TItq.js +1 -0
  11. package/dist/CardContent.vue.es-ChEMrFCc.mjs +115 -0
  12. package/dist/CardContent.vue.es-i9ivuGKG.js +1 -0
  13. package/dist/Chip.vue.es-D0fkSe8a.js +1 -0
  14. package/dist/Chip.vue.es-DcW2CjUA.mjs +1576 -0
  15. package/dist/Comparators.vue.es-BdxDqU8o.js +1 -0
  16. package/dist/Comparators.vue.es-DdTKGB80.mjs +406 -0
  17. package/dist/{ContentWithAsideLayout-D_T137tN.mjs → ContentWithAsideLayout-Ct24RV-2.mjs} +1 -1
  18. package/dist/{ContentWithAsideLayout-BZJPhvLh.js → ContentWithAsideLayout-UHovpjZu.js} +1 -1
  19. package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +1 -0
  20. package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +175 -0
  21. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +1 -0
  22. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DK6tiecN.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs} +14 -11
  23. package/dist/Divider.vue.es-ClFG8QtG.js +1 -0
  24. package/dist/Divider.vue.es-wKkIVBgb.mjs +24 -0
  25. package/dist/DividerText.vue.es-B7oa5Xpn.mjs +72 -0
  26. package/dist/DividerText.vue.es-yiFdPQvo.js +1 -0
  27. package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +30 -0
  28. package/dist/ErrorNotification.vue.es-FpRyg0De.js +1 -0
  29. package/dist/FormMessage.vue.es-DFQXxiSC.mjs +46 -0
  30. package/dist/FormMessage.vue.es-LeWoj774.js +1 -0
  31. package/dist/IconButton.vue.es-DNCwwH_j.mjs +825 -0
  32. package/dist/IconButton.vue.es-DiSiGPWO.js +1 -0
  33. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +1 -0
  34. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BWXmZmGZ.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs} +3 -2
  35. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +1 -0
  36. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BSn_Zy0Y.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs} +9 -5
  37. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs +1067 -0
  38. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +1 -0
  39. package/dist/PaymentMethod.vue.es-DYlnmZh7.js +1 -0
  40. package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +1255 -0
  41. package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-X7-dfeZP.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs} +6 -5
  42. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +1 -0
  43. package/dist/Section.vue.es-3-H1pUTB.mjs +79 -0
  44. package/dist/Section.vue.es-BuzTXRLP.js +1 -0
  45. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-AxYjVFUM.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs} +23 -20
  46. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +1 -0
  47. package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +136 -0
  48. package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +1 -0
  49. package/dist/TrialChip.vue.es-BHYbW8b6.mjs +759 -0
  50. package/dist/TrialChip.vue.es-C6Xg_5rR.js +1 -0
  51. package/dist/_flatRest.es-BHFPCqZh.mjs +642 -0
  52. package/dist/_flatRest.es-dFffnTpX.js +1 -0
  53. package/dist/adyen-51SvcyqV.mjs +4 -0
  54. package/dist/adyen-DZsyEXkw.js +1 -0
  55. package/dist/api.es-B4qAAJKr.js +1 -0
  56. package/dist/api.es-UkfpLiLL.mjs +83 -0
  57. package/dist/{cloneDeep-DranHQkY.js → cloneDeep-Hs8Pp07F.js} +1 -1
  58. package/dist/cn.es-C7xoIs3C.js +1 -0
  59. package/dist/cn.es-tfxVlz02.mjs +3191 -0
  60. package/dist/component-ZRZIt3ZW.js +1 -0
  61. package/dist/component-dpA83LIN.mjs +6569 -0
  62. package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -1
  63. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  64. package/dist/components/BillingInformation/BillingInformation.es.js +14 -10
  65. package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -1
  66. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  67. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +27 -23
  68. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -1
  69. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  70. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +3 -3
  71. package/dist/components/Invoice/Invoice.ce.d.ts +1 -1
  72. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  73. package/dist/components/Invoice/Invoice.es.js +2612 -28
  74. package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -1
  75. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  76. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
  77. package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -1
  78. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  79. package/dist/components/InvoicesList/InvoicesList.es.js +2 -2
  80. package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -1
  81. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  82. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
  83. package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -1
  84. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  85. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +10 -8
  86. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -1
  87. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  88. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +4820 -7
  89. package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -1
  90. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  91. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -4
  92. package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -1
  93. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  94. package/dist/components/WalletBalances/WalletBalances.es.js +2 -2
  95. package/dist/core/index.cjs.js +1 -1
  96. package/dist/core/index.es.js +1 -1
  97. package/dist/countryData.es--zJAd6LA.mjs +252 -0
  98. package/dist/countryData.es-D3MFzU92.js +1 -0
  99. package/dist/customer-CJrpbGX4.mjs +32 -0
  100. package/dist/customer-CcQR-JIm.js +1 -0
  101. package/dist/customer.es-D42Md24r.js +1 -0
  102. package/dist/customer.es-LIW2YmLL.mjs +30 -0
  103. package/dist/formatting.es-9hM8aHSg.js +1 -0
  104. package/dist/formatting.es-D5H_ySFv.mjs +68 -0
  105. package/dist/getCountryNameByCode.es-fP52nO_7.js +1 -0
  106. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +8 -0
  107. package/dist/index-CI71bVGE.mjs +2521 -0
  108. package/dist/index-WLSPwi90.js +1 -0
  109. package/dist/index.cjs.js +1 -1
  110. package/dist/index.es-BBJF2O2l.js +1 -0
  111. package/dist/index.es-LCAKs4tH.mjs +438 -0
  112. package/dist/index.es.js +1 -1
  113. package/dist/invoices-3kVHsAXr.js +1 -0
  114. package/dist/{invoices-C7BHqB0g.mjs → invoices-CNK1Ushv.mjs} +15 -1
  115. package/dist/isEmpty.es-Bp1SbWFu.mjs +131 -0
  116. package/dist/isEmpty.es-Dycf-CD_.js +1 -0
  117. package/dist/{paymentMethods-BA7Kt8ti.mjs → paymentMethods-C-ApE-G4.mjs} +2 -1
  118. package/dist/paymentMethods-DZRf0WRl.js +1 -0
  119. package/dist/{payments-NTHUh5je.mjs → payments-CE9U7aKK.mjs} +1 -1
  120. package/dist/{payments-B8W0W6wZ.js → payments-CLt0SExf.js} +1 -1
  121. package/dist/pick.es-BgDAfhAl.js +1 -0
  122. package/dist/pick.es-DdVOyp0Q.mjs +45 -0
  123. package/dist/{registry-DgRnFEVF.mjs → registry-B99ZnfEn.mjs} +1 -2
  124. package/dist/registry-ClZ43bQn.js +1 -0
  125. package/dist/screens/Checkout/Checkout.ce.d.ts +1 -1
  126. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  127. package/dist/screens/Checkout/Checkout.es.js +1862 -162
  128. package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -1
  129. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  130. package/dist/screens/CustomerOverview/CustomerOverview.es.js +11 -11
  131. package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +1 -1
  132. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  133. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +46 -40
  134. package/dist/solvimon-web.css +1 -1
  135. package/dist/subscriptions-CS8HTxzC.js +1 -0
  136. package/dist/{subscriptions-BEoXaAHw.mjs → subscriptions-CoeCrY1I.mjs} +2 -1
  137. package/dist/typeGuards.es-C4nR5FkL.js +1 -0
  138. package/dist/typeGuards.es-fwUoeMCe.mjs +12 -0
  139. package/dist/{useActionDispatchProvider-DmTJ_bqE.js → useActionDispatchProvider-CWVV_xsi.js} +1 -1
  140. package/dist/{useActionDispatchProvider-zSXRlc2S.mjs → useActionDispatchProvider-eO2qFPGv.mjs} +1 -1
  141. package/dist/useCustomer--jycAz--.mjs +25 -0
  142. package/dist/useCustomer-PthyTFLl.js +1 -0
  143. package/dist/useIncrementalLoading-CAdNW-Bf.js +1 -0
  144. package/dist/{useIncrementalLoading-Bgs0mqyb.mjs → useIncrementalLoading-CcnL3flF.mjs} +5 -1
  145. package/dist/{useInvoiceData-B6P2VShe.mjs → useInvoiceData-BiMMoVoW.mjs} +2 -2
  146. package/dist/{useInvoiceData-CS7hLTea.js → useInvoiceData-DvQO_nKz.js} +1 -1
  147. package/dist/useInvoicesList-CHkwSNO9.js +1 -0
  148. package/dist/{useInvoicesList-23Ra-23Z.mjs → useInvoicesList-DFhF_gp7.mjs} +260 -23
  149. package/dist/{usePaymentMethods-BK4unvj2.js → usePaymentMethods-BRQ7-dUr.js} +1 -1
  150. package/dist/{usePaymentMethods-B8Nft16c.mjs → usePaymentMethods-BX2RnHZN.mjs} +2 -2
  151. package/dist/{useService-D-CUtlp3.js → useService-B67YWAcN.js} +1 -1
  152. package/dist/{useService-B4qv5N2D.mjs → useService-DG_zedHV.mjs} +1 -0
  153. package/dist/useWalletBalanceItems-B5FMmoU2.mjs +308 -0
  154. package/dist/useWalletBalanceItems-BY3gq0fc.js +1 -0
  155. package/package.json +14 -8
  156. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-eRGZRjmq.js +0 -1
  157. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BvmKLc2H.js +0 -1
  158. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DNWspHtC.js +0 -1
  159. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Cx4c8E4i.js +0 -1
  160. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Ct26TY0a.js +0 -1
  161. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-WRXecMCj.mjs +0 -6568
  162. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-KnhKv07X.js +0 -1
  163. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D9_G7CyE.js +0 -1
  164. package/dist/component-DI3AxwdD.mjs +0 -58733
  165. package/dist/component-yWF07boR.js +0 -1
  166. package/dist/index-CzL1ZcGi.mjs +0 -85
  167. package/dist/index-DRdBmZ2-.js +0 -1
  168. package/dist/invoices-CjBHfDXp.js +0 -1
  169. package/dist/paymentMethods-A-5SBmy1.js +0 -1
  170. package/dist/registry-SwmYGFn7.js +0 -1
  171. package/dist/subscriptions-DSi93KpN.js +0 -1
  172. package/dist/useCustomer-DkrBNt5f.mjs +0 -45
  173. package/dist/useCustomer-fK-w7ifj.js +0 -1
  174. package/dist/useIncrementalLoading-BK6N8sYW.js +0 -1
  175. package/dist/useInvoicesList-CIFGVsDj.js +0 -1
  176. package/dist/useWalletBalanceItems-DreHuOra.mjs +0 -105
  177. package/dist/useWalletBalanceItems-NlFk6jPD.js +0 -1
  178. /package/dist/{sprite-DZD704h3-CCc3Mz1x.js → sprite.svg.es-CCc3Mz1x.js} +0 -0
  179. /package/dist/{sprite-DZD704h3-DZD704h3.mjs → sprite.svg.es-DZD704h3.mjs} +0 -0
@@ -1,85 +0,0 @@
1
- import { unref } from "vue";
2
- const req = (value) => {
3
- value = unref(value);
4
- if (Array.isArray(value)) return !!value.length;
5
- if (value === void 0 || value === null) {
6
- return false;
7
- }
8
- if (value === false) {
9
- return true;
10
- }
11
- if (value instanceof Date) {
12
- return !isNaN(value.getTime());
13
- }
14
- if (typeof value === "object") {
15
- for (let _ in value) return true;
16
- return false;
17
- }
18
- return !!String(value).length;
19
- };
20
- function regex() {
21
- for (var _len = arguments.length, expr = new Array(_len), _key = 0; _key < _len; _key++) {
22
- expr[_key] = arguments[_key];
23
- }
24
- return (value) => {
25
- value = unref(value);
26
- return !req(value) || expr.every((reg) => {
27
- reg.lastIndex = 0;
28
- return reg.test(value);
29
- });
30
- };
31
- }
32
- regex(/^[a-zA-Z]*$/);
33
- regex(/^[a-zA-Z0-9]*$/);
34
- regex(/^\d*(\.\d+)?$/);
35
- const emailRegex = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
36
- var email$1 = regex(emailRegex);
37
- var email = {
38
- $validator: email$1,
39
- $message: "Value is not a valid email address",
40
- $params: {
41
- type: "email"
42
- }
43
- };
44
- function required$1(value) {
45
- if (typeof value === "string") {
46
- value = value.trim();
47
- }
48
- return req(value);
49
- }
50
- var required = {
51
- $validator: required$1,
52
- $message: "Value is required",
53
- $params: {
54
- type: "required"
55
- }
56
- };
57
- const validate$1 = (prop, val) => prop ? req(typeof val === "string" ? val.trim() : val) : true;
58
- function requiredIf$1(propOrFunction) {
59
- return function(value, parentVM) {
60
- if (typeof propOrFunction !== "function") {
61
- return validate$1(unref(propOrFunction), value);
62
- }
63
- const result = propOrFunction.call(this, value, parentVM);
64
- return validate$1(result, value);
65
- };
66
- }
67
- function requiredIf(prop) {
68
- return {
69
- $validator: requiredIf$1(prop),
70
- $message: "The value is required",
71
- $params: {
72
- type: "requiredIf",
73
- prop
74
- }
75
- };
76
- }
77
- const urlRegex = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
78
- regex(urlRegex);
79
- regex(/(^[0-9]*$)|(^-[0-9]+$)/);
80
- regex(/^[-]?\d*(\.\d+)?$/);
81
- export {
82
- requiredIf as a,
83
- email as e,
84
- required as r
85
- };
@@ -1 +0,0 @@
1
- const e=require("vue"),r=r=>{if(r=e.unref(r),Array.isArray(r))return!!r.length;if(null==r)return!1;if(!1===r)return!0;if(r instanceof Date)return!isNaN(r.getTime());if("object"==typeof r){for(let e in r)return!0;return!1}return!!String(r).length};function a(){for(var a=arguments.length,t=new Array(a),f=0;f<a;f++)t[f]=arguments[f];return a=>(a=e.unref(a),!r(a)||t.every(e=>(e.lastIndex=0,e.test(a))))}a(/^[a-zA-Z]*$/),a(/^[a-zA-Z0-9]*$/),a(/^\d*(\.\d+)?$/);var t={$validator:a(/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i),$message:"Value is not a valid email address",$params:{type:"email"}};var f={$validator:function(e){return"string"==typeof e&&(e=e.trim()),r(e)},$message:"Value is required",$params:{type:"required"}};const i=(e,a)=>!e||r("string"==typeof a?a.trim():a);a(/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i),a(/(^[0-9]*$)|(^-[0-9]+$)/),a(/^[-]?\d*(\.\d+)?$/),exports.email=t,exports.required=f,exports.requiredIf=function(r){return{$validator:(a=r,function(r,t){if("function"!=typeof a)return i(e.unref(a),r);const f=a.call(this,r,t);return i(f,r)}),$message:"The value is required",$params:{type:"requiredIf",prop:r}};var a};
@@ -1 +0,0 @@
1
- const n=require("./component-yWF07boR.js");exports.createInvoicesService=function(){const i=n.createRequestService(),e=n.useConfig();return{getInvoice:function(n){return i({url:`${e.apiUrls.transaction}/portal/invoices/${n}`})},getInvoices:function({customerId:t,pagination:r,query:o}){const a=n.withPagination({customer_id:t,...o??{}},r),c=new URL(`${e.apiUrls.transaction}/portal/invoices`);return Object.entries(a).forEach(([n,i])=>{null!=i&&(Array.isArray(i)?i.forEach(i=>{c.searchParams.append(`${n}[]`,`${i}`)}):c.searchParams.append(n,`${i}`))}),i({url:c.toString(),isCollection:!0})},getInvoicePdf:async function(t){return i({url:`${e.apiUrls.transaction}/portal/invoices/${t}/pdf`,options:{headers:{"Content-Type":"application/pdf"}}}).then(i=>{const e=new Blob([i],{type:"application/pdf"});n.downloadFile(e,`invoice-${t}.pdf`)})},getInvoicePreview:function({customer:n,pricingPlanSubscriptionId:t,startAt:r,customizations:o,pricing_plan_schedule_customizations:a}){return i({url:`${e.apiUrls.transaction}/portal/invoices/preview`,options:{method:"POST"},data:{template_pricing_plan_subscription_id:t,...r&&{start_at:r},...o&&{pricing_plan_schedule_customizations:o},...a&&{pricing_plan_schedule_customizations:a},customer_details:{...n,reference:"preview"}}})}}};
@@ -1 +0,0 @@
1
- const t=require("./component-yWF07boR.js");exports.createPaymentMethodsService=function(){const e=t.createRequestService(),n=t.useConfig();return{getPaymentMethods:function({customerId:o,pagination:r,query:i}){const a=t.withPagination({customer_id:o,...i??{}},r),s=new URL(`${n.apiUrls.config}/portal/payment-methods`);return Object.entries(a).forEach(([t,e])=>{null!=e&&(Array.isArray(e)?e.forEach(e=>{s.searchParams.append(`${t}[]`,`${e}`)}):s.searchParams.append(t,`${e}`))}),e({url:s.toString(),isCollection:!0})},getPaymentMethodOptions:function({customerId:t,country:o,subscriptionId:r,amount:i}){return e({url:`${n.apiUrls.config}/portal/payment-method-options`,options:{method:"POST"},data:{...t&&{customer_id:t},...o&&{country:o},...r&&{pricing_plan_subscription_id:r},amount:i}})},tokenizePaymentMethod:function(t){return e({url:`${n.apiUrls.config}/portal/payment-methods/tokenize`,options:{method:"POST"},data:t})}}};
@@ -1 +0,0 @@
1
- const e=require("./components/PaymentMethodForm/PaymentMethodForm.cjs.js"),n=require("./screens/CustomerOverview/CustomerOverview.cjs.js"),o=require("./screens/Checkout/Checkout.cjs.js"),i=require("./screens/UpgradeSubscription/UpgradeSubscription.cjs.js"),t=require("./components/Invoice/Invoice.cjs.js"),r=require("./components/InvoiceDetails/InvoiceDetails.cjs.js"),s=require("./components/InvoicesList/InvoicesList.cjs.js"),c=require("./components/PaymentHistory/PaymentHistory.cjs.js"),m=require("./components/SubscriptionsList/SubscriptionsList.cjs.js"),u=require("./components/SubscriptionSchedules/SubscriptionSchedules.cjs.js"),l=require("./components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js"),a=require("./components/WalletBalances/WalletBalances.cjs.js"),p=require("./components/BillingInformation/BillingInformation.cjs.js"),v=require("./components/BillingInformationForm/BillingInformationForm.cjs.js"),d=require("./component-yWF07boR.js");require("vue"),require("./PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Ct26TY0a.js");const f={"customer-overview":n.defineSolvimonCustomerOverview,checkout:o.defineSolvimonCheckout,"upgrade-subscription":i.defineSolvimonUpgradeSubscription},j={invoice:t.defineSolvimonInvoice,"invoice-details":r.defineSolvimonInvoiceDetails,"invoices-list":s.defineSolvimonInvoicesList,"payment-history":c.defineSolvimonPaymentHistory,"subscriptions-list":m.defineSolvimonSubscriptionsList,"subscription-schedules":u.defineSolvimonSubscriptionSchedules,"customer-payment-methods":l.defineSolvimonCustomerPaymentMethods,"wallet-balances":a.defineSolvimonWalletBalances,"billing-information":p.defineSolvimonBillingInformation,"billing-information-form":v.defineSolvimonBillingInformationForm,"payment-method-form":e.defineSolvimonPaymentMethodForm};function S(e,n){const o="screen"===n?(i=e,Object.hasOwn(f,i)&&f[e]):function(e){return Object.hasOwn(j,e)}(e)&&j[e];var i;if(!o)throw new Error(`Solvimon: unknown ${n} id "${e}". Registered ${n}s: ${Object.keys("screen"===n?f:j).join(", ")}.`);o()}function b(e,n,o,i){const t=function(e){if("string"==typeof e){const n=document.querySelector(e);if(!n)throw new Error(`Solvimon: container not found for selector "${e}"`);return n}return e}(e);S(n,o);const r=(s=n,d.getComponentName(s));var s;const c=document.createElement(r);return function(e,n){const o={};for(const[i,t]of Object.entries(n))void 0!==t&&(o[i]=t);Object.assign(e,o)}(c,i),t.appendChild(c),{unmount(){c.remove()}}}function h(e){const{container:n,...o}=e;return{container:n,props:Object.fromEntries(Object.entries(o))}}function g(e,n){return{...e,...n}}const y=["customer-overview","checkout","upgrade-subscription"],q=["invoice","invoice-details","invoices-list","payment-history","subscriptions-list","subscription-schedules","customer-payment-methods","wallet-balances","billing-information","billing-information-form","payment-method-form"];exports.createSolvimonCore=function(e={}){return{config:e,createComponent(n,o){const{container:i,props:t}=h(o);return b(i,n,"component",g(e,t)).unmount},createScreen(n,o){const{container:i,props:t}=h(o);return b(i,n,"screen",g(e,t)).unmount}}},exports.getRegisteredComponentIds=function(){return[...q]},exports.getRegisteredScreenIds=function(){return[...y]};
@@ -1 +0,0 @@
1
- const i=require("./component-yWF07boR.js"),e="/portal/pricing-plan-subscriptions";exports.createSubscriptionsService=function(){const n=i.useConfig(),r=i.createRequestService();return{getSubscription:function({id:_,expanded:c=!1}){const s=c?["pricing_plan_schedule_infos.id","pricing_plan_schedule_infos.pricing_plan_version_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_plan_id","pricing_plan_schedule_infos.pricing_plan_version.credit_types","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.product_category_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.product_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.entitlements.feature_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.configs.conditions.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.configs.wallet_grants.wallet_type_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_item_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_based.meter_value_calculation_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter_value_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.product_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.configs.conditions.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.configs.wallet_grants.wallet_type_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_item_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_based.meter_value_calculation_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter_value_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties.id"]:[];return r({url:`${n.apiUrls.config}${e}/${_}${i.serializeQueryParams(i.withExpand({expandParams:s}))}`})},getActiveSubscriptions:function({customerId:_,pagination:c}){const s=c??{},p=i.withExpand({initialParams:{customer_id:_,statuses:["ACTIVE"],type:"BILLING"},expandParams:["pricing_plan_schedule_infos.pricing_plan_version_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_plan_id"]}),t=i.serializeQueryParams(i.withPagination(p,s));return r({url:`${n.apiUrls.config}${e}${t}`,isCollection:!0})}}};
@@ -1,45 +0,0 @@
1
- import { ref } from "vue";
2
- import { c as createRequestService, u as useConfig } from "./component-DI3AxwdD.mjs";
3
- import { u as useService } from "./useService-B4qv5N2D.mjs";
4
- function createCustomerService() {
5
- const request = createRequestService();
6
- const config = useConfig();
7
- function getCustomer(customerId) {
8
- return request({
9
- url: `${config.apiUrls.config}/portal/customers/${customerId}`
10
- });
11
- }
12
- function updateCustomer(customerId, payload) {
13
- return request({
14
- url: `${config.apiUrls.config}/portal/customers/${customerId}`,
15
- options: { method: "PATCH" },
16
- data: payload
17
- });
18
- }
19
- return {
20
- getCustomer,
21
- updateCustomer
22
- };
23
- }
24
- function useCustomer({ customerId }) {
25
- const { getCustomer, updateCustomer } = createCustomerService();
26
- const customer = ref();
27
- const { data: _getData, ...get } = useService({
28
- service: async () => {
29
- const result = await getCustomer(customerId);
30
- customer.value = result;
31
- return result;
32
- }
33
- });
34
- const { data: _updateData, ...update } = useService({
35
- service: async (payload) => {
36
- const result = await updateCustomer(customerId, payload);
37
- customer.value = result;
38
- return result;
39
- }
40
- });
41
- return { customer, get, update };
42
- }
43
- export {
44
- useCustomer as u
45
- };
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./component-yWF07boR.js"),r=require("./useService-D-CUtlp3.js");exports.useCustomer=function({customerId:u}){const{getCustomer:s,updateCustomer:o}=function(){const e=t.createRequestService(),r=t.useConfig();return{getCustomer:function(t){return e({url:`${r.apiUrls.config}/portal/customers/${t}`})},updateCustomer:function(t,u){return e({url:`${r.apiUrls.config}/portal/customers/${t}`,options:{method:"PATCH"},data:u})}}}(),n=e.ref(),{data:c,...a}=r.useService({service:async()=>{const e=await s(u);return n.value=e,e}}),{data:i,...m}=r.useService({service:async e=>{const t=await o(u,e);return n.value=t,t}});return{customer:n,get:a,update:m}};
@@ -1 +0,0 @@
1
- const e=require("./_Uint8Array-DxISR7XF.js"),a=require("./component-yWF07boR.js"),t=require("vue"),i=require("./cloneDeep-DranHQkY.js");exports.useIncrementalLoading=function({initialData:n=[],service:u}){const l=t.shallowRef(n),s=t.ref(e.ApiStatus.Initial),r=t.ref(null),o=t.ref(1),c=t.ref(!1),v=t.computed(()=>s.value===e.ApiStatus.Loading),p=async t=>{var i;if(!v.value)try{r.value=null,s.value=e.ApiStatus.Loading;const n=await u(t);if(!a.isApiSuccessCollectionResponse(n))return void(s.value=e.ApiStatus.Done);c.value=!!(null==(i=n.links)?void 0:i.next),l.value=[...l.value,...n.data],s.value=e.ApiStatus.Done,o.value=t}catch(n){r.value=function(e){return e instanceof Error?e:new Error("Something went wrong while fetching data.")}(n),s.value=e.ApiStatus.Failed}};return{items:t.computed(()=>i.cloneDeep(l.value)),error:r,fetchInitial:async()=>await p(1),fetchMore:async()=>await p(o.value+1),fetchAll:async()=>{r.value=null,s.value=e.ApiStatus.Loading;const t=await a.getPaginatedFullList(async t=>{const i=await u(t);if(!a.isApiSuccessCollectionResponse(i))throw s.value=e.ApiStatus.Failed,new Error("message"in i?i.message:"Request failed");return i});l.value=t.data,s.value=e.ApiStatus.Done},isPending:v,hasNextBatch:c}};
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./component-yWF07boR.js"),i=require("./useActionDispatchProvider-DmTJ_bqE.js"),o=require("./useIncrementalLoading-BK6N8sYW.js"),n=require("./invoices-CjBHfDXp.js"),a={class:"grid-cols-1 gap-4"},c=["onClick"],r={class:"flex flex-col"},s={class:"mt-2 flex items-center justify-center"},l=e.defineComponent({__name:"InvoiceTable",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{type:Object}},emits:["view-invoice","pay-invoice","load-more"],setup(i){const o=i,{formatDate:n,$t:l}=t.useIntl(),d=e.computed(()=>o.configuration.showPayButton),u=e.computed(()=>o.configuration.showViewButton),f=e.computed(()=>o.hasMoreItems);return(o,m)=>(e.openBlock(),e.createElementBlock("div",a,[e.createVNode(e.unref(t._sfc_main$1y),{striped:"","no-border":"",rounded:"",hoverable:"","stripe-class":"group-odd:bg-gray-50/50"},{default:e.withCtx(()=>[e.createVNode(e.unref(t.TableHead),null,{default:e.withCtx(()=>[e.createVNode(e.unref(t.TableHeadRow),null,{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1r),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Invoice",description:"The title of the invoice number header column of the invoice table",id:"invoice_table.header.invoice_number"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$1r),{class:"hidden md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Date",description:"The title of the invoice date header column of the invoice table",id:"invoice_table.header.date"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$1r),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Amount",description:"The title of the invoice amount header column of the invoice table",id:"invoice_table.header.amount"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$1r),{class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Status",description:"The title of the invoice status header column of the invoice table",id:"invoice_table.header.status"})),1)]),_:1})]),_:1})]),_:1}),e.createVNode(e.unref(t.TableBody),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.invoices,i=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1q),{key:i.id},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1p),{"has-padding":"",class:"h-14"},{default:e.withCtx(()=>[e.createElementVNode("div",r,[e.createVNode(e.unref(t._sfc_main$2),{tag:"span",variant:"body-sm",class:"md:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({date:i.invoice_date,format:"date",offsetType:"offsetted",timezone:i.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$2),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.invoice_number),1)]),_:2},1024)])]),_:2},1024),e.createVNode(e.unref(t._sfc_main$1p),{class:"hidden h-14 md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({date:i.invoice_date,format:"date",offsetType:"offsetted",timezone:i.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$1p),{class:"h-14"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$2),{tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$2L),{value:i.invoice_amount_including_tax},null,8,["value"])]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$1p),{class:"h-14 text-right"},{default:e.withCtx(()=>[i.paid?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,color:"green"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Paid",description:"The label of the chip for paid invoices",id:"invoice_table.chip.paid"})),1)]),_:1})):d.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2H),{key:1,variant:"outline",color:"gray",size:"sm",type:"button",onClick:e.withModifiers(e=>o.$emit("pay-invoice",{invoiceId:i.id}),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Pay",description:"The label for the pay invoice button",id:"customer.invoice_table.pay_invoice_button.label"})),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},[u.value?{name:"link",fn:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"absolute inset-0 h-full w-full",onClick:e=>o.$emit("view-invoice",{invoiceId:i.id})},null,8,c)]),key:"0"}:void 0]),1024))),128))]),_:1})]),_:1}),e.createElementVNode("div",s,[f.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2H),{key:0,variant:"outline",color:"gray",size:"sm",class:"w-full",loading:i.isLoading,onClick:m[0]||(m[0]=e=>o.$emit("load-more"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Load more",description:"The label for the load more button",id:"invoice_table.button.load_more"})),1)]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]))}}),d=e.defineComponent({__name:"InvoicesList",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{default:()=>({showPayButton:!0,showViewButton:!0,pagination:{batchSize:15,enabled:!0}}),type:Object}},emits:["load-more"],setup(o){const{$t:n}=t.useIntl(),{dispatchAction:a}=i.useActionDispatchProvider();return(i,c)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{"no-border":"","no-spacing":"","content-background":"none",title:e.unref(n)({defaultMessage:"Invoices",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(l,{configuration:o.configuration,"has-more-items":o.hasMoreItems,invoices:o.invoices,"is-loading":o.isLoading,onLoadMore:c[0]||(c[0]=e=>i.$emit("load-more")),onViewInvoice:c[1]||(c[1]=t=>e.unref(a)({action:"view-invoice",data:{invoiceId:t.invoiceId}})),onPayInvoice:c[2]||(c[2]=t=>e.unref(a)({action:"pay-invoice",data:{invoiceId:t.invoiceId}}))},null,8,["configuration","has-more-items","invoices","is-loading"])]),_:1},8,["title"]))}});exports._sfc_main=d,exports.useInvoicesList=function({customerId:e,batchSize:t=15}){const i=n.createInvoicesService();return o.useIncrementalLoading({service:async o=>i.getInvoices({customerId:e,pagination:{page:o,pageSize:t}})})};
@@ -1,105 +0,0 @@
1
- import { computed, defineComponent, openBlock, createBlock, unref, createCommentVNode } from "vue";
2
- import { c as createRequestService, u as useConfig, b as useIntl, B as _sfc_main$1f, C as _sfc_main$16 } from "./component-DI3AxwdD.mjs";
3
- import { u as useService } from "./useService-B4qv5N2D.mjs";
4
- import { _ as _sfc_main$2 } from "./Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs";
5
- function createWalletsService() {
6
- const request = createRequestService();
7
- const config = useConfig();
8
- function getCustomerWalletBalances(customerId) {
9
- return request({
10
- url: `${config.apiUrls.config}/portal/customers/${customerId}/wallets/balance`,
11
- options: { method: "POST" },
12
- data: {}
13
- });
14
- }
15
- return {
16
- getCustomerWalletBalances
17
- };
18
- }
19
- function useCustomerWalletBalances({ customerId }) {
20
- const { getCustomerWalletBalances } = createWalletsService();
21
- const { data, execute, apiStatus, error, isPending } = useService({
22
- service: () => getCustomerWalletBalances(customerId)
23
- });
24
- const walletBalances = computed(
25
- () => data.value ?? null
26
- );
27
- return { walletBalances, apiStatus, error, fetch: execute, isPending };
28
- }
29
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
30
- __name: "CustomerWalletBalancesBlock",
31
- props: {
32
- walletBalances: { type: Array }
33
- },
34
- setup(__props) {
35
- const { $t } = useIntl();
36
- return (_ctx, _cache) => {
37
- return openBlock(), createBlock(unref(_sfc_main$1f), {
38
- items: __props.walletBalances,
39
- title: unref($t)(
40
- {
41
- defaultMessage: "{count, plural, one {Wallet} other {Wallets}}",
42
- description: "Title for the wallets block on the customer overview page",
43
- id: "customer_overview.wallet_balances_block.title"
44
- },
45
- { count: String(__props.walletBalances.length) }
46
- )
47
- }, null, 8, ["items", "title"]);
48
- };
49
- }
50
- });
51
- const _sfc_main = /* @__PURE__ */ defineComponent({
52
- __name: "CustomerWalletBalances",
53
- props: {
54
- hasError: { type: Boolean },
55
- isLoading: { type: Boolean },
56
- walletBalances: { type: Array }
57
- },
58
- setup(__props) {
59
- const { $t } = useIntl();
60
- return (_ctx, _cache) => {
61
- return __props.isLoading ? (openBlock(), createBlock(_sfc_main$2, {
62
- key: 0,
63
- variant: "section",
64
- class: "min-h-48",
65
- "data-testid": "customer-wallet-balances-skeleton"
66
- })) : __props.hasError ? (openBlock(), createBlock(unref(_sfc_main$16), {
67
- key: 1,
68
- title: unref($t)({
69
- defaultMessage: "Could not load wallet balances",
70
- description: "Error shown when wallet balances fail to load",
71
- id: "wallet_balance.load_failed"
72
- })
73
- }, null, 8, ["title"])) : __props.walletBalances.length > 0 ? (openBlock(), createBlock(_sfc_main$1, {
74
- key: 2,
75
- "wallet-balances": __props.walletBalances
76
- }, null, 8, ["wallet-balances"])) : createCommentVNode("", true);
77
- };
78
- }
79
- });
80
- function useWalletBalanceItems(walletBalances) {
81
- const { $t } = useIntl();
82
- return computed(
83
- () => {
84
- var _a;
85
- return (((_a = walletBalances.value) == null ? void 0 : _a.wallet_balances) ?? []).map((walletBalance) => {
86
- var _a2;
87
- return {
88
- walletId: walletBalance.wallet_id,
89
- title: $t({
90
- defaultMessage: "Balance",
91
- description: "Fallback wallet title in wallet balance components",
92
- id: "H5+NAX"
93
- }),
94
- balance: walletBalance.wallet_balance.open_balance,
95
- balanceAt: walletBalance.wallet_balance.balance_at ?? ((_a2 = walletBalances.value) == null ? void 0 : _a2.balance_at) ?? null
96
- };
97
- });
98
- }
99
- );
100
- }
101
- export {
102
- _sfc_main as _,
103
- useWalletBalanceItems as a,
104
- useCustomerWalletBalances as u
105
- };
@@ -1 +0,0 @@
1
- const e=require("vue"),l=require("./component-yWF07boR.js"),a=require("./useService-D-CUtlp3.js"),t=require("./Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js");const n=e.defineComponent({__name:"CustomerWalletBalancesBlock",props:{walletBalances:{type:Array}},setup(a){const{$t:t}=l.useIntl();return(n,s)=>(e.openBlock(),e.createBlock(e.unref(l._sfc_main$1f),{items:a.walletBalances,title:e.unref(t)({defaultMessage:"{count, plural, one {Wallet} other {Wallets}}",description:"Title for the wallets block on the customer overview page",id:"customer_overview.wallet_balances_block.title"},{count:String(a.walletBalances.length)})},null,8,["items","title"]))}}),s=e.defineComponent({__name:"CustomerWalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array}},setup(a){const{$t:s}=l.useIntl();return(o,r)=>a.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"min-h-48","data-testid":"customer-wallet-balances-skeleton"})):a.hasError?(e.openBlock(),e.createBlock(e.unref(l._sfc_main$16),{key:1,title:e.unref(s)({defaultMessage:"Could not load wallet balances",description:"Error shown when wallet balances fail to load",id:"wallet_balance.load_failed"})},null,8,["title"])):a.walletBalances.length>0?(e.openBlock(),e.createBlock(n,{key:2,"wallet-balances":a.walletBalances},null,8,["wallet-balances"])):e.createCommentVNode("",!0)}});exports._sfc_main=s,exports.useCustomerWalletBalances=function({customerId:t}){const{getCustomerWalletBalances:n}=function(){const e=l.createRequestService(),a=l.useConfig();return{getCustomerWalletBalances:function(l){return e({url:`${a.apiUrls.config}/portal/customers/${l}/wallets/balance`,options:{method:"POST"},data:{}})}}}(),{data:s,execute:o,apiStatus:r,error:c,isPending:u}=a.useService({service:()=>n(t)});return{walletBalances:e.computed(()=>s.value??null),apiStatus:r,error:c,fetch:o,isPending:u}},exports.useWalletBalanceItems=function(a){const{$t:t}=l.useIntl();return e.computed(()=>{var e;return((null==(e=a.value)?void 0:e.wallet_balances)??[]).map(e=>{var l;return{walletId:e.wallet_id,title:t({defaultMessage:"Balance",description:"Fallback wallet title in wallet balance components",id:"H5+NAX"}),balance:e.wallet_balance.open_balance,balanceAt:e.wallet_balance.balance_at??(null==(l=a.value)?void 0:l.balance_at)??null}})})};