@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,146 @@
1
+ function getFirstPricingPlanScheduleOfType({
2
+ pricingPlanScheduleInfos,
3
+ type
4
+ }) {
5
+ return (pricingPlanScheduleInfos ?? []).find(
6
+ (scheduleInfo) => {
7
+ var _a;
8
+ return (((_a = scheduleInfo.pricing_plan_schedule) == null ? void 0 : _a.type) ?? scheduleInfo.type) === type;
9
+ }
10
+ );
11
+ }
12
+ function getActiveDefaultScheduleId(subscriptions) {
13
+ var _a;
14
+ return (_a = getActiveDefaultScheduleInfo(
15
+ subscriptions.flatMap(
16
+ ({ pricing_plan_schedule_infos }) => pricing_plan_schedule_infos ?? []
17
+ )
18
+ )) == null ? void 0 : _a.id;
19
+ }
20
+ const getStartAt = (scheduleInfo) => {
21
+ var _a;
22
+ return Date.parse(scheduleInfo.start_at ?? ((_a = scheduleInfo.pricing_plan_schedule) == null ? void 0 : _a.start_at));
23
+ };
24
+ function getActiveDefaultScheduleInfo(scheduleInfos) {
25
+ const now = Date.now();
26
+ return scheduleInfos.filter((scheduleInfo) => {
27
+ const schedule = scheduleInfo.pricing_plan_schedule;
28
+ const type = (schedule == null ? void 0 : schedule.type) ?? scheduleInfo.type;
29
+ const startAt = getStartAt(scheduleInfo);
30
+ const endAtValue = scheduleInfo.end_at ?? (schedule == null ? void 0 : schedule.end_at);
31
+ const endAt = endAtValue ? Date.parse(endAtValue) : void 0;
32
+ const hasStarted = Number.isFinite(startAt) && startAt <= now;
33
+ const hasNotEnded = endAt === void 0 || !Number.isFinite(endAt) || endAt > now;
34
+ return type === "DEFAULT" && hasStarted && hasNotEnded;
35
+ }).sort((a, b) => getStartAt(b) - getStartAt(a)).at(0);
36
+ }
37
+ function getPricingGroupByPricingId({
38
+ pricingPlanScheduleInfo,
39
+ pricingId
40
+ }) {
41
+ var _a;
42
+ return (((_a = pricingPlanScheduleInfo.pricing_plan_version) == null ? void 0 : _a.pricing_categories) ?? []).flatMap((category) => category.pricing_groups ?? []).find((group) => (group.pricings ?? []).some((pricing) => pricing.id === pricingId));
43
+ }
44
+ function getPricingItemConfigMetaById({
45
+ pricingPlanScheduleInfo
46
+ }) {
47
+ const metaById = /* @__PURE__ */ new Map();
48
+ const categories = pricingPlanScheduleInfo.pricing_plan_version.pricing_categories ?? [];
49
+ categories.forEach((category) => {
50
+ var _a;
51
+ (_a = category.pricings) == null ? void 0 : _a.forEach((pricing) => {
52
+ var _a2;
53
+ (_a2 = pricing.items) == null ? void 0 : _a2.forEach((item) => {
54
+ var _a3, _b, _c;
55
+ (_a3 = item.billing_period_configs) == null ? void 0 : _a3.forEach((billingConfig) => {
56
+ var _a4;
57
+ (_a4 = billingConfig.configs) == null ? void 0 : _a4.forEach((config) => {
58
+ var _a5, _b2, _c2, _d;
59
+ if (config.id) {
60
+ const currency = (_d = (_c2 = (_b2 = (_a5 = config.details) == null ? void 0 : _a5.bands) == null ? void 0 : _b2.find(
61
+ (band) => {
62
+ var _a6;
63
+ return (_a6 = band.amount) == null ? void 0 : _a6.currency;
64
+ }
65
+ )) == null ? void 0 : _c2.amount) == null ? void 0 : _d.currency;
66
+ metaById.set(config.id, {
67
+ ...currency && { currency },
68
+ billingPeriod: billingConfig.billing_period
69
+ });
70
+ }
71
+ });
72
+ });
73
+ (_b = item.configs) == null ? void 0 : _b.forEach((config) => {
74
+ var _a4, _b2, _c2, _d;
75
+ if (config.id) {
76
+ const currency = (_d = (_c2 = (_b2 = (_a4 = config.details) == null ? void 0 : _a4.bands) == null ? void 0 : _b2.find(
77
+ (band) => {
78
+ var _a5;
79
+ return (_a5 = band.amount) == null ? void 0 : _a5.currency;
80
+ }
81
+ )) == null ? void 0 : _c2.amount) == null ? void 0 : _d.currency;
82
+ metaById.set(config.id, {
83
+ ...currency && { currency }
84
+ });
85
+ }
86
+ });
87
+ (_c = item.pricing_currency_configs) == null ? void 0 : _c.forEach((currencyConfig) => {
88
+ var _a4, _b2;
89
+ const currency = currencyConfig.currency;
90
+ (_a4 = currencyConfig.billing_period_configs) == null ? void 0 : _a4.forEach((billingConfig) => {
91
+ var _a5;
92
+ (_a5 = billingConfig.configs) == null ? void 0 : _a5.forEach((config) => {
93
+ if (config.id) {
94
+ metaById.set(config.id, {
95
+ currency,
96
+ billingPeriod: billingConfig.billing_period
97
+ });
98
+ }
99
+ });
100
+ });
101
+ (_b2 = currencyConfig.configs) == null ? void 0 : _b2.forEach((config) => {
102
+ if (config.id) {
103
+ metaById.set(config.id, { currency });
104
+ }
105
+ });
106
+ });
107
+ });
108
+ });
109
+ });
110
+ return metaById;
111
+ }
112
+ function getScheduleCustomizations({
113
+ enabledPricings,
114
+ seatsValues,
115
+ pricingPlanScheduleInfos,
116
+ pricingCurrency,
117
+ billingPeriod
118
+ }) {
119
+ const subscriptionSchedule = getFirstPricingPlanScheduleOfType({
120
+ pricingPlanScheduleInfos,
121
+ type: "DEFAULT"
122
+ });
123
+ if (!subscriptionSchedule || !enabledPricings && !seatsValues) {
124
+ return void 0;
125
+ }
126
+ return [
127
+ {
128
+ pricing_plan_schedule_id: subscriptionSchedule.id,
129
+ enabled_pricings: enabledPricings,
130
+ seats_values: seatsValues == null ? void 0 : seatsValues.map(({ pricing_item_config_id, number }) => ({
131
+ pricing_item_config_id,
132
+ number
133
+ })),
134
+ ...pricingCurrency && { pricing_currency: pricingCurrency },
135
+ ...billingPeriod && { billing_period: billingPeriod }
136
+ }
137
+ ];
138
+ }
139
+ export {
140
+ getActiveDefaultScheduleId as a,
141
+ getScheduleCustomizations as b,
142
+ getActiveDefaultScheduleInfo as c,
143
+ getPricingGroupByPricingId as d,
144
+ getPricingItemConfigMetaById as e,
145
+ getFirstPricingPlanScheduleOfType as g
146
+ };
@@ -1,7 +1,8 @@
1
1
  import { defineSolvimonPaymentMethodForm } from "./components/PaymentMethodForm/PaymentMethodForm.es.js";
2
2
  import { defineSolvimonCustomerOverview } from "./screens/CustomerOverview/CustomerOverview.es.js";
3
3
  import { defineSolvimonCheckout } from "./screens/Checkout/Checkout.es.js";
4
- import { defineSolvimonUpgradeSubscription } from "./screens/UpgradeSubscription/UpgradeSubscription.es.js";
4
+ import { defineSolvimonSubscriptionManagement } from "./screens/SubscriptionManagement/SubscriptionManagement.es.js";
5
+ import { defineSolvimonSubscriptionDetails } from "./screens/SubscriptionDetails/SubscriptionDetails.es.js";
5
6
  import { defineSolvimonPayInvoice } from "./screens/PayInvoice/PayInvoice.es.js";
6
7
  import { defineSolvimonPaymentMethodsManagement } from "./screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js";
7
8
  import { defineSolvimonInvoice } from "./components/Invoice/Invoice.es.js";
@@ -15,11 +16,12 @@ import { defineSolvimonCustomerPaymentMethods } from "./components/CustomerPayme
15
16
  import { defineSolvimonWalletBalances } from "./components/WalletBalances/WalletBalances.es.js";
16
17
  import { defineSolvimonBillingInformation } from "./components/BillingInformation/BillingInformation.es.js";
17
18
  import { defineSolvimonBillingInformationForm } from "./components/BillingInformationForm/BillingInformationForm.es.js";
18
- import { g as getComponentName } from "./component-Bg2JVC_O.mjs";
19
+ import { g as getComponentName } from "./component--Y7Igv5i.mjs";
19
20
  const SCREEN_DEFINERS = {
20
21
  "customer-overview": defineSolvimonCustomerOverview,
21
22
  checkout: defineSolvimonCheckout,
22
- "upgrade-subscription": defineSolvimonUpgradeSubscription,
23
+ "subscription-management": defineSolvimonSubscriptionManagement,
24
+ "subscription-details": defineSolvimonSubscriptionDetails,
23
25
  "pay-invoice": defineSolvimonPayInvoice,
24
26
  "payment-methods-management": defineSolvimonPaymentMethodsManagement
25
27
  };
@@ -119,7 +121,8 @@ function createSolvimonCore(config = {}) {
119
121
  const REGISTERED_SCREEN_IDS = [
120
122
  "customer-overview",
121
123
  "checkout",
122
- "upgrade-subscription",
124
+ "subscription-management",
125
+ "subscription-details",
123
126
  "pay-invoice",
124
127
  "payment-methods-management"
125
128
  ];
@@ -0,0 +1 @@
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/SubscriptionManagement/SubscriptionManagement.cjs.js"),t=require("./screens/SubscriptionDetails/SubscriptionDetails.cjs.js"),s=require("./screens/PayInvoice/PayInvoice.cjs.js"),r=require("./screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js"),c=require("./components/Invoice/Invoice.cjs.js"),m=require("./components/InvoiceHeader/InvoiceHeader.cjs.js"),a=require("./components/InvoiceDetails/InvoiceDetails.cjs.js"),u=require("./components/InvoicesList/InvoicesList.cjs.js"),l=require("./components/PaymentHistory/PaymentHistory.cjs.js"),v=require("./components/SubscriptionsList/SubscriptionsList.cjs.js"),d=require("./components/SubscriptionSchedules/SubscriptionSchedules.cjs.js"),p=require("./components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js"),f=require("./components/WalletBalances/WalletBalances.cjs.js"),j=require("./components/BillingInformation/BillingInformation.cjs.js"),S=require("./components/BillingInformationForm/BillingInformationForm.cjs.js"),h=require("./component-DIy1hvJM.js"),b={"customer-overview":n.defineSolvimonCustomerOverview,checkout:o.defineSolvimonCheckout,"subscription-management":i.defineSolvimonSubscriptionManagement,"subscription-details":t.defineSolvimonSubscriptionDetails,"pay-invoice":s.defineSolvimonPayInvoice,"payment-methods-management":r.defineSolvimonPaymentMethodsManagement},y={invoice:c.defineSolvimonInvoice,"invoice-header":m.defineSolvimonInvoiceHeader,"invoice-details":a.defineSolvimonInvoiceDetails,"invoices-list":u.defineSolvimonInvoicesList,"payment-history":l.defineSolvimonPaymentHistory,"subscriptions-list":v.defineSolvimonSubscriptionsList,"subscription-schedules":d.defineSolvimonSubscriptionSchedules,"customer-payment-methods":p.defineSolvimonCustomerPaymentMethods,"wallet-balances":f.defineSolvimonWalletBalances,"billing-information":j.defineSolvimonBillingInformation,"billing-information-form":S.defineSolvimonBillingInformationForm,"payment-method-form":e.defineSolvimonPaymentMethodForm};function g(e,n){const o="screen"===n?(i=e,Object.hasOwn(b,i)&&b[e]):function(e){return Object.hasOwn(y,e)}(e)&&y[e];var i;if(!o)throw new Error(`Solvimon: unknown ${n} id "${e}". Registered ${n}s: ${Object.keys("screen"===n?b:y).join(", ")}.`);o()}function I(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);g(n,o);const s=(r=n,h.getComponentName(r));var r;const c=document.createElement(s);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 q(e){const{container:n,...o}=e;return{container:n,props:Object.fromEntries(Object.entries(o))}}function M(e,n){return{...e,...n}}const P=["customer-overview","checkout","subscription-management","subscription-details","pay-invoice","payment-methods-management"],w=["invoice","invoice-header","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}=q(o);return I(i,n,"component",M(e,t)).unmount},createScreen(n,o){const{container:i,props:t}=q(o);return I(i,n,"screen",M(e,t)).unmount}}},exports.getRegisteredComponentIds=function(){return[...w]},exports.getRegisteredScreenIds=function(){return[...P]};