@solvimon/solvimon-web 0.1.0-alpha.28 → 0.1.0-alpha.29

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 (189) hide show
  1. package/README.md +26 -1
  2. package/dist/{Alert.vue.es-lIiAWf2S.mjs → Alert.vue.es-CNrEaLvh.mjs} +58 -46
  3. package/dist/AuthProvider.handle-DKfNs8rr.mjs +50 -0
  4. package/dist/{Avatar.vue.es-Beg7umjO.mjs → Avatar.vue.es-r0NbcIib.mjs} +1 -1
  5. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DBGe1PvD.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-Cp4yGqaw.mjs} +8 -8
  6. package/dist/{Button.vue.es-rh6mITmN.mjs → Button.vue.es-Zw--kuaU.mjs} +4 -4
  7. package/dist/{ChargeOnDemandModal-CPjPa_uq.mjs → ChargeOnDemandModal-B8FDkS9U.mjs} +35 -34
  8. package/dist/Checkout.entry.ce-DsGl-5aR.mjs +4202 -0
  9. package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-2D8VM_7W.mjs +828 -0
  10. package/dist/{Chip.vue.es-Cn2R_0mE.mjs → Chip.vue.es-D3UDSyXC.mjs} +3 -3
  11. package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +32 -0
  12. package/dist/{ContextMenu.vue.es-DRxsa7bZ.mjs → ContextMenu.vue.es-B9mFpUQK.mjs} +87 -88
  13. package/dist/{CustomerBillingInformation.vue.es-DQfL5RMR.mjs → CustomerBillingInformation.vue.es-B8NiQaJs.mjs} +3 -3
  14. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Ct-eYaEN.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DBivC5Eb.mjs} +21 -20
  15. package/dist/CustomerShippingAddresses-Bj8Y17O8.mjs +397 -0
  16. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BzTSwo4i.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BmPKfIjT.mjs} +798 -792
  17. package/dist/{DividerText.vue.es-M0XqSz55.mjs → DividerText.vue.es-CNbgif-3.mjs} +1 -1
  18. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs +55 -0
  19. package/dist/{ErrorNotification.vue.es-CKlt4hr2.mjs → ErrorNotification.vue.es-DNd65mQq.mjs} +2 -2
  20. package/dist/FormMessage.vue.es-Cjv358Ab.mjs +39 -0
  21. package/dist/{IconButton.vue.es-oe4MVBK1.mjs → IconButton.vue.es-C8lYFx5_.mjs} +2 -2
  22. package/dist/{IconTitle.vue.es-BO6KBS4v.mjs → IconTitle.vue.es-O2kcqgKm.mjs} +3 -3
  23. package/dist/{Input.vue.es-DAlPmtE_.mjs → Input.vue.es-D8Oj8MWv.mjs} +23 -22
  24. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CCTl5GWa.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-rhqYVdfV.mjs} +2 -2
  25. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DMGqj_Uk.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-06R-M8Q3.mjs} +4 -4
  26. package/dist/InvoicePreview.vue.es-4Q2hzaFS.mjs +286 -0
  27. package/dist/InvoicePricingClauseChip.vue.es-DKU0xu0t.mjs +124 -0
  28. package/dist/Label.vue.es-DtpLM1KH.mjs +113 -0
  29. package/dist/{Modal.vue.es-CTNACAst.mjs → Modal.vue.es-C8ZcO117.mjs} +109 -103
  30. package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-3DQLCR3U.mjs +441 -0
  31. package/dist/PaymentCompletedCard.vue_vue_type_script_setup_true_lang-DfTb9psX.mjs +48 -0
  32. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DLfAfB_m.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BoGTtg5G.mjs} +46 -88
  33. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CKm-XYuF.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BIAm22Kq.mjs} +3 -3
  34. package/dist/{PaymentHistoryBlock-BmA8jbMb.mjs → PaymentHistoryBlock-BvY2nXGV.mjs} +1 -1
  35. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BDMse2lO.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-bQKhUonq.mjs} +4 -4
  36. package/dist/{PaymentIntegrationForm-D1Xw-xIt.mjs → PaymentIntegrationForm-CcfQSzKM.mjs} +1 -1
  37. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCxw0PCv.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvzcLJVq.mjs} +68 -69
  38. package/dist/{PaymentIntegrationFormAdyen-CfT5aD4L.mjs → PaymentIntegrationFormAdyen-DqgDfO6K.mjs} +126 -117
  39. package/dist/{PaymentIntegrationFormStripe-DKXJ-mjd.mjs → PaymentIntegrationFormStripe-BYdAkvLt.mjs} +193 -179
  40. package/dist/{PaymentMethod.vue.es-Cauxx4Xr.mjs → PaymentMethod.vue.es-b0p3a0L-.mjs} +7 -7
  41. package/dist/{PaymentMethodForm-CypZOYUZ.mjs → PaymentMethodForm-BsTrTwCg.mjs} +1 -1
  42. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-De8FgdYD.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-sUOmLORl.mjs} +7 -7
  43. package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Dw28tfpD.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs} +36 -35
  44. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-OtjVO7lR.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CSW4LfmH.mjs} +7 -7
  45. package/dist/{PlanCustomizationEditor-Xtww2r9K.mjs → PlanCustomizationEditor-D29N4HUM.mjs} +9 -9
  46. package/dist/PortalLinkUnverified-B_EE2wTJ.mjs +52 -0
  47. package/dist/{PortalNotAvailable-B_59GUwN.mjs → PortalNotAvailable-DPE9y37H.mjs} +2 -2
  48. package/dist/{PricingGroupRangeInput.vue.es-C9LJW3b8.mjs → PricingGroupRangeInput.vue.es-tIMXIhpZ.mjs} +14 -13
  49. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DdWxoB8q.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DqxWxSQe.mjs} +32 -32
  50. package/dist/RadioGroupExtended.vue.es-3nDXqIGi.mjs +176 -0
  51. package/dist/{Section.vue.es-iS8hVGWA.mjs → Section.vue.es-CvX9tg2f.mjs} +1 -1
  52. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs +60 -0
  53. package/dist/ShippingAddressesModal-C4p1IXXk.mjs +418 -0
  54. package/dist/{StepInput.vue.es-Dpan1RQd.mjs → StepInput.vue.es-DweyzpkL.mjs} +4 -4
  55. package/dist/{SubscriptionDetails.entry.ce-DufQX3uI.mjs → SubscriptionDetails.entry.ce-D5SwM0YS.mjs} +230 -225
  56. package/dist/{SubscriptionSchedules-DAahcNoI.mjs → SubscriptionSchedules-BZqlpAtk.mjs} +1 -1
  57. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BH7DdOWK.mjs +5185 -0
  58. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-Wmjqy7RZ.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DoJxiqVB.mjs} +3 -3
  59. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BeRLuEyR.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BbjdBHSQ.mjs} +23 -22
  60. package/dist/TooltipParagraph.vue.es-Dw0ndjle.mjs +132 -0
  61. package/dist/TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs +31 -0
  62. package/dist/{TrialChip.vue.es-B-XBSHWE.mjs → TrialChip.vue.es-DOopmaXA.mjs} +2 -2
  63. package/dist/{api.es-QaC926Xu.mjs → api.es-qgvzNMU-.mjs} +2 -2
  64. package/dist/{cn.es-2bVdkiFV.mjs → cn.es-B8acFrov.mjs} +380 -476
  65. package/dist/components/BillingInformation/BillingInformation.mjs +9 -7
  66. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +57 -54
  67. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +20 -18
  68. package/dist/components/Invoice/Invoice.mjs +2660 -193
  69. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +6 -4
  70. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +18 -17
  71. package/dist/components/InvoicesList/InvoicesList.mjs +13 -11
  72. package/dist/components/PaymentHistory/PaymentHistory.mjs +8 -6
  73. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +19 -17
  74. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +19 -17
  75. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +20 -18
  76. package/dist/components/WalletBalances/WalletBalances.mjs +17 -15
  77. package/dist/customElements-BTj4ii4f.mjs +5072 -0
  78. package/dist/{customer-CqddTiOr.mjs → customer-BIjC0CWJ.mjs} +1 -1
  79. package/dist/customer.es-DQKl6wFt.mjs +24 -0
  80. package/dist/{de-DE-BW8dMvhW.mjs → de-DE-DBbERiFr.mjs} +38 -0
  81. package/dist/{de-DE-BNMj3boy.mjs → de-DE-UJ6X6jXu.mjs} +1 -1
  82. package/dist/floating-ui.vue.es-BvAf8-si.mjs +1003 -0
  83. package/dist/{formControl-CsITfsBk.mjs → formControl-BZQLHnOO.mjs} +5 -5
  84. package/dist/fr-FR-Cvvbkwlj.mjs +307 -0
  85. package/dist/fr-FR-IWJE-urI.mjs +431 -0
  86. package/dist/icon-sprite.svg.es-BWBB8SGw.mjs +4 -0
  87. package/dist/{index.es-CXkP_k3u.mjs → index.es-C7J3WGGo.mjs} +4 -4
  88. package/dist/index.es-CpmQmvOg.mjs +633 -0
  89. package/dist/index.mjs +2 -2
  90. package/dist/{invoices-Cf1qDAv4.mjs → invoices-e1sKLgxg.mjs} +3 -3
  91. package/dist/{it-IT-Byg06KWc.mjs → it-IT-B7ui2oxO.mjs} +38 -0
  92. package/dist/{it-IT-DRvuxM1F.mjs → it-IT-DnJP5URH.mjs} +1 -1
  93. package/dist/{nl-NL-x3zQqzZ7.mjs → nl-NL-Bafh2xoT.mjs} +38 -0
  94. package/dist/{nl-NL-DLUwWbMG.mjs → nl-NL-q9xfTZF0.mjs} +1 -1
  95. package/dist/{paymentMethods-BUuOmDq9.mjs → paymentMethods-B_82JGk_.mjs} +2 -2
  96. package/dist/paymentMethods-Nfv9HdkS.mjs +61 -0
  97. package/dist/{paymentOutcome-D17VD4MV.mjs → paymentOutcome-BXEU5-84.mjs} +5 -5
  98. package/dist/payments-BnxbzQUC.mjs +68 -0
  99. package/dist/pricing-BOhvWWMj.mjs +29 -0
  100. package/dist/{pricingPlanScheduleOverrides-COr9F8DO.mjs → pricingPlanScheduleOverrides-Dxv5FOBd.mjs} +2 -2
  101. package/dist/{pricingPlanSchedules-BK_o9p6h.mjs → pricingPlanSchedules-Dv7ZCgNp.mjs} +1 -1
  102. package/dist/screens/Checkout/Checkout.mjs +2 -2
  103. package/dist/screens/CustomerOverview/CustomerOverview.mjs +128 -83
  104. package/dist/screens/PayInvoice/PayInvoice.mjs +572 -218
  105. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +21 -19
  106. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
  107. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +261 -266
  108. package/dist/{sorting.es-qtEN8J8T.mjs → sorting.es-CVyKw23D.mjs} +1 -1
  109. package/dist/subscriptions-BWXZGK0E.mjs +66 -0
  110. package/dist/taxId.es-DkD3Ltr8.mjs +243 -0
  111. package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +2 -0
  112. package/dist/types/components/customer/ShippingAddressForm/ShippingAddressForm.types.d.ts +9 -0
  113. package/dist/types/components/customer/ShippingAddresses/ShippingAddressCard.types.d.ts +11 -0
  114. package/dist/types/components/customer/ShippingAddresses/ShippingAddressList.types.d.ts +9 -0
  115. package/dist/types/components/customer/ShippingAddresses/ShippingAddressesModal.types.d.ts +26 -0
  116. package/dist/types/components/invoices/InvoiceOrderSummary/InvoiceOrderSummary.types.d.ts +5 -0
  117. package/dist/types/components/payments/PayButton/PayButton.types.d.ts +2 -0
  118. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +11 -0
  119. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +4 -1
  120. package/dist/types/components/providers/AuthProvider/AuthProvider.handle.d.ts +17 -0
  121. package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +23 -1
  122. package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +12 -0
  123. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +3 -1
  124. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
  125. package/dist/types/components/providers/Provider/Provider.types.d.ts +1 -1
  126. package/dist/types/components/providers/Provider/Provider.vue.d.ts +3 -1
  127. package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +16 -0
  128. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +2 -0
  129. package/dist/types/public/components/CustomerShippingAddresses/CustomerShippingAddresses.types.d.ts +12 -0
  130. package/dist/types/public/core/types.d.ts +5 -0
  131. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +3 -1
  132. package/dist/types/translations/supported.d.ts +1 -1
  133. package/dist/types/types/portalAuthentication.d.ts +2 -0
  134. package/dist/types/types/portalToken.d.ts +9 -0
  135. package/dist/types/types/shippingAddress.d.ts +9 -0
  136. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +2 -0
  137. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +1 -1
  138. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +27 -6
  139. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +3 -0
  140. package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +6 -0
  141. package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +9 -1
  142. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +16 -1
  143. package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +10 -0
  144. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyVariable.d.ts +16 -0
  145. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +6 -0
  146. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
  147. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +12 -3
  148. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +71 -0
  149. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +14 -0
  150. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +1 -0
  151. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +35 -0
  152. package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +16 -0
  153. package/dist/types/vendor/@solvimon/solvimon-types/types/ShippingAddress.d.ts +54 -0
  154. package/dist/{useActionDispatchProvider-DC_fUykI.mjs → useActionDispatchProvider-3W2vEyIg.mjs} +1 -1
  155. package/dist/{useCustomer-C3kTh7wn.mjs → useCustomer-cObBvDOu.mjs} +2 -2
  156. package/dist/useCustomerFormLabels-DJWf2O17.mjs +1173 -0
  157. package/dist/{useIncrementalLoading-C_sHmW7d.mjs → useIncrementalLoading-CATuO36d.mjs} +2 -2
  158. package/dist/{useInvoiceData-BIh8-h8b.mjs → useInvoiceData-DD44HTl7.mjs} +2 -2
  159. package/dist/{useInvoicesList-Y6p0Pqpy.mjs → useInvoicesList-CpB-41MQ.mjs} +10 -10
  160. package/dist/useLazyFloating.es-CycqRyeb.mjs +68 -0
  161. package/dist/useLoadInitialData-qzdnBoui.mjs +15 -0
  162. package/dist/{usePaymentFormHold-FfNc578l.mjs → usePaymentFormHold-ByUZi3A-.mjs} +28 -36
  163. package/dist/{usePaymentMethodAvailability-CnYTvG15.mjs → usePaymentMethodAvailability-DUdrs0Ji.mjs} +4 -4
  164. package/dist/usePaymentMethods-ByaKF7mf.mjs +21 -0
  165. package/dist/{usePayments-CykCZPG2.mjs → usePayments-BXABv-lF.mjs} +9 -9
  166. package/dist/{usePortal-CxzKGhbK.mjs → usePortal-CwR_FxTb.mjs} +1 -1
  167. package/dist/{useService-B0OQJmif.mjs → useService-BZcbUZHI.mjs} +3 -3
  168. package/dist/{useTimePeriod.es-JkXdHNWr.mjs → useTimePeriod.es-BpdiVwg8.mjs} +1 -1
  169. package/package.json +7 -7
  170. package/dist/Checkbox.vue.es-DsyiJ-VY.mjs +0 -50
  171. package/dist/Checkout.entry.ce-BZ1rYQvt.mjs +0 -5279
  172. package/dist/ContentWithAsideLayout-BCM8tmZN.mjs +0 -38
  173. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-Bk4zwyWa.mjs +0 -362
  174. package/dist/FormMessage.vue.es-jG3fQZms.mjs +0 -29
  175. package/dist/InvoiceSummary.vue.es-DbNoGfYN.mjs +0 -2596
  176. package/dist/RadioGroupExtended.vue.es-UtKsdmiv.mjs +0 -163
  177. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Djc1SkEU.mjs +0 -688
  178. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DNr1CqVj.mjs +0 -5221
  179. package/dist/TooltipParagraph.vue.es-BjCn2BF6.mjs +0 -129
  180. package/dist/customElements-Di3zwlEU.mjs +0 -6447
  181. package/dist/customer.es-B5ppZf0j.mjs +0 -20
  182. package/dist/floating-ui.vue.es-CYt0fSY7.mjs +0 -1108
  183. package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +0 -4
  184. package/dist/payments-Ci8bF4C6.mjs +0 -45
  185. package/dist/subscriptions-CwogJODR.mjs +0 -54
  186. package/dist/useCustomerFormLabels-CK7K50nB.mjs +0 -1369
  187. package/dist/useLoadInitialData-4k_Cyqef.mjs +0 -15
  188. package/dist/usePaymentMethodOptions-1QBcmgUf.mjs +0 -40
  189. package/dist/usePaymentMethods-gvr-rmwE.mjs +0 -15
@@ -0,0 +1,397 @@
1
+ import { defineComponent as $, computed as I, openBlock as c, createElementBlock as M, createElementVNode as E, createBlock as m, unref as t, withCtx as f, createTextVNode as k, toDisplayString as S, createCommentVNode as y, Fragment as B, renderList as N, createVNode as O, ref as b, toValue as j, defineAsyncComponent as z, watch as U } from "vue";
2
+ import { _ as F } from "./Button.vue.es-Zw--kuaU.mjs";
3
+ import { _ as H } from "./ErrorNotification.vue.es-DNd65mQq.mjs";
4
+ import { _ as P } from "./Section.vue.es-CvX9tg2f.mjs";
5
+ import { a as T, d as D, c as q, u as R, b as w, e as G } from "./customElements-BTj4ii4f.mjs";
6
+ import { _ as W } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs";
7
+ import { b as J } from "./customer.es-DQKl6wFt.mjs";
8
+ import { g as Z } from "./getCountryNameByCode.es-BDHua7VM.mjs";
9
+ import { _ as K } from "./Chip.vue.es-D3UDSyXC.mjs";
10
+ import { a as Q } from "./ContextMenu.vue.es-B9mFpUQK.mjs";
11
+ import { _ as x } from "./Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs";
12
+ import { w as X } from "./api.es-qgvzNMU-.mjs";
13
+ const Y = ({
14
+ line1: e,
15
+ line2: s,
16
+ city: r,
17
+ postal_code: n,
18
+ state: o,
19
+ country: i
20
+ }) => ({
21
+ line1: e ?? void 0,
22
+ line2: s ?? void 0,
23
+ city: r ?? void 0,
24
+ postal_code: n ?? void 0,
25
+ state: o ?? void 0,
26
+ country: i
27
+ }), ee = { class: "sv-shipping-address flex items-start gap-2" }, se = { class: "sv-shipping-address__content grid grow grid-cols-1 gap-0.5" }, te = /* @__PURE__ */ $({
28
+ __name: "ShippingAddressCard",
29
+ props: {
30
+ address: { type: Object },
31
+ menuItems: { type: Array },
32
+ showDefault: { type: Boolean },
33
+ compact: { type: Boolean }
34
+ },
35
+ setup(e) {
36
+ const s = e, { $t: r } = T(), n = I(() => {
37
+ var a, h;
38
+ const { individual: i, organization: d } = s.address.recipient ?? {};
39
+ return d ? [d.company_name, d.attention_name].filter(Boolean).join(", ") : [(a = i == null ? void 0 : i.name) == null ? void 0 : a.first_name, (h = i == null ? void 0 : i.name) == null ? void 0 : h.last_name].filter(Boolean).join(" ");
40
+ }), o = I(() => [
41
+ ...J(Y(s.address.address)),
42
+ ...s.address.address.country ? [Z(s.address.address.country)] : []
43
+ ]);
44
+ return (i, d) => {
45
+ var a, h;
46
+ return c(), M("div", ee, [
47
+ E("div", se, [
48
+ n.value && !e.compact ? (c(), m(t(D), {
49
+ key: 0,
50
+ tag: "span",
51
+ variant: "body-sm",
52
+ weight: "semibold",
53
+ class: "sv-shipping-address__recipient"
54
+ }, {
55
+ default: f(() => [
56
+ k(S(n.value), 1)
57
+ ]),
58
+ _: 1
59
+ })) : y("", !0),
60
+ (c(!0), M(B, null, N(o.value, (_, A) => (c(), m(t(D), {
61
+ key: A,
62
+ tag: "span",
63
+ variant: "body-sm",
64
+ color: e.compact ? void 0 : "secondary",
65
+ class: "sv-shipping-address__line"
66
+ }, {
67
+ default: f(() => [
68
+ k(S(_), 1)
69
+ ]),
70
+ _: 2
71
+ }, 1032, ["color"]))), 128)),
72
+ (a = e.address.recipient) != null && a.phone_number && !e.compact ? (c(), m(t(D), {
73
+ key: 1,
74
+ tag: "span",
75
+ variant: "body-sm",
76
+ color: "secondary",
77
+ class: "sv-shipping-address__phone"
78
+ }, {
79
+ default: f(() => {
80
+ var _;
81
+ return [
82
+ k(S((_ = e.address.recipient) == null ? void 0 : _.phone_number), 1)
83
+ ];
84
+ }),
85
+ _: 1
86
+ })) : y("", !0)
87
+ ]),
88
+ e.showDefault && e.address.is_default ? (c(), m(t(K), {
89
+ key: 0,
90
+ class: "sv-shipping-address__default",
91
+ intent: "info",
92
+ size: "sm",
93
+ content: t(r)({
94
+ defaultMessage: "Default",
95
+ id: "shipping_address.default_chip.label",
96
+ description: "Marks the shipping address the customer uses by default"
97
+ })
98
+ }, null, 8, ["content"])) : y("", !0),
99
+ (h = e.menuItems) != null && h.length ? (c(), m(t(Q), {
100
+ key: 1,
101
+ class: "sv-shipping-address__menu",
102
+ items: e.menuItems
103
+ }, null, 8, ["items"])) : y("", !0)
104
+ ]);
105
+ };
106
+ }
107
+ }), ne = /* @__PURE__ */ $({
108
+ __name: "ShippingAddressList",
109
+ props: {
110
+ addresses: { type: Array },
111
+ getMenuItems: { type: Function },
112
+ compact: { type: Boolean }
113
+ },
114
+ setup(e) {
115
+ return (s, r) => (c(), m(t(P), {
116
+ "no-spacing": "",
117
+ "content-classes": "divide-y divide-gray-100",
118
+ class: "sv-shipping-address-list"
119
+ }, {
120
+ default: f(() => [
121
+ (c(!0), M(B, null, N(e.addresses, (n) => {
122
+ var o;
123
+ return c(), M("div", {
124
+ key: n.id,
125
+ class: "sv-shipping-address-list__item px-3 py-2"
126
+ }, [
127
+ O(te, {
128
+ address: n,
129
+ "menu-items": (o = e.getMenuItems) == null ? void 0 : o.call(e, n),
130
+ compact: e.compact,
131
+ "show-default": ""
132
+ }, null, 8, ["address", "menu-items", "compact"])
133
+ ]);
134
+ }), 128))
135
+ ]),
136
+ _: 1
137
+ }));
138
+ }
139
+ }), ie = 50;
140
+ function ae() {
141
+ const e = q(), s = R(), r = ["portal", "shipping-addresses"];
142
+ function n({
143
+ customerId: a
144
+ }) {
145
+ return e({
146
+ url: w(s.apiUrls.config, ...r),
147
+ query: X(
148
+ { customer_id: a, statuses: ["ACTIVE"] },
149
+ { page: 1, pageSize: ie }
150
+ ),
151
+ isCollection: !0
152
+ });
153
+ }
154
+ function o(a) {
155
+ return e({
156
+ url: w(s.apiUrls.config, ...r),
157
+ data: a,
158
+ options: { method: "POST" }
159
+ });
160
+ }
161
+ function i({
162
+ shippingAddressId: a,
163
+ payload: h
164
+ }) {
165
+ return e({
166
+ url: w(s.apiUrls.config, ...r, a),
167
+ data: h,
168
+ options: { method: "PATCH" }
169
+ });
170
+ }
171
+ function d({
172
+ shippingAddressId: a
173
+ }) {
174
+ return e({
175
+ url: w(s.apiUrls.config, ...r, a, "deprecate"),
176
+ options: { method: "POST" }
177
+ });
178
+ }
179
+ return {
180
+ getShippingAddresses: n,
181
+ createShippingAddress: o,
182
+ updateShippingAddress: i,
183
+ deleteShippingAddress: d
184
+ };
185
+ }
186
+ const C = ({ reference: e, ...s }) => JSON.stringify(s), oe = (e, s) => +!!s.is_default - +!!e.is_default || (Date.parse(s.created_at ?? "") || 0) - (Date.parse(e.created_at ?? "") || 0);
187
+ function re({
188
+ customerId: e
189
+ }) {
190
+ const s = ae(), r = G(), n = b([]), o = b(!1), i = b(), d = async () => {
191
+ const u = j(e);
192
+ if (u) {
193
+ o.value = !0, i.value = void 0;
194
+ try {
195
+ const l = await s.getShippingAddresses({ customerId: u });
196
+ n.value = l.data.filter(({ status: p }) => p === "ACTIVE").sort(oe);
197
+ } catch (l) {
198
+ r.error(
199
+ "SHIPPING_ADDRESSES_LOAD_FAILED",
200
+ "Failed to load the shipping addresses",
201
+ {},
202
+ l
203
+ ), i.value = l;
204
+ } finally {
205
+ o.value = !1;
206
+ }
207
+ }
208
+ }, a = (u) => s.createShippingAddress({ ...u, status: "ACTIVE" });
209
+ return {
210
+ items: n,
211
+ isPending: o,
212
+ error: i,
213
+ fetchAll: d,
214
+ create: async (u) => {
215
+ try {
216
+ return await a(u);
217
+ } finally {
218
+ await d();
219
+ }
220
+ },
221
+ replace: async (u, l, p) => {
222
+ l = { description: u.description, ...l };
223
+ try {
224
+ return p.replacement ? p.storedDetails !== C(l) && (p.replacement = await s.updateShippingAddress({
225
+ shippingAddressId: p.replacement.id,
226
+ payload: {
227
+ ...l,
228
+ reference: p.replacement.reference ?? l.reference
229
+ }
230
+ }), p.storedDetails = C(l)) : (p.replacement = await a(l), p.storedDetails = C(l)), await s.deleteShippingAddress({ shippingAddressId: u.id }), p.replacement;
231
+ } finally {
232
+ await d();
233
+ }
234
+ },
235
+ remove: async (u) => {
236
+ await s.deleteShippingAddress({ shippingAddressId: u.id }), await d();
237
+ }
238
+ };
239
+ }
240
+ function de({
241
+ onEdit: e,
242
+ onDelete: s
243
+ }) {
244
+ const { $t: r } = T();
245
+ return { getMenuItems: (o) => [
246
+ {
247
+ label: r({
248
+ defaultMessage: "Edit",
249
+ id: "shipping_address.context_menu.edit.label",
250
+ description: "Menu option that opens the form to change a shipping address"
251
+ }),
252
+ onClick: () => e(o)
253
+ },
254
+ {
255
+ label: r({
256
+ defaultMessage: "Delete",
257
+ id: "shipping_address.context_menu.delete.label",
258
+ description: "Menu option that deletes a shipping address"
259
+ }),
260
+ onClick: () => s(o)
261
+ }
262
+ ] };
263
+ }
264
+ const ce = { class: "grid grid-cols-1 gap-2" }, le = 3, pe = /* @__PURE__ */ $({
265
+ __name: "CustomerShippingAddresses",
266
+ props: {
267
+ customerId: { type: String },
268
+ customer: { type: Object },
269
+ isLoading: { type: Boolean }
270
+ },
271
+ setup(e) {
272
+ const s = z(
273
+ () => import("./ShippingAddressesModal-C4p1IXXk.mjs")
274
+ ), r = e, { $t: n } = T(), o = I(() => {
275
+ var g;
276
+ return r.customerId ?? ((g = r.customer) == null ? void 0 : g.id);
277
+ }), i = re({ customerId: o }), { items: d, isPending: a, error: h } = i, _ = I(() => d.value.slice(0, le));
278
+ U(
279
+ o,
280
+ (g) => {
281
+ g && i.fetchAll();
282
+ },
283
+ { immediate: !0 }
284
+ );
285
+ const A = b(!1), u = b(!1), l = b({ step: "LIST" }), p = (g) => {
286
+ l.value = g, A.value = !0, u.value = !0;
287
+ }, { getMenuItems: V } = de({
288
+ onEdit: (g) => p({ step: "EDIT", address: g }),
289
+ onDelete: (g) => p({ step: "DELETE", address: g })
290
+ });
291
+ return (g, v) => e.isLoading ? (c(), m(x, {
292
+ key: 0,
293
+ variant: "section",
294
+ class: "sv-shipping-addresses sv-root sv-component sv-loading min-h-[100px]"
295
+ })) : e.customer ? (c(), m(t(P), {
296
+ key: 1,
297
+ class: "sv-shipping-addresses sv-root sv-component",
298
+ "no-spacing": "",
299
+ "no-border": "",
300
+ "content-background": "none",
301
+ title: t(n)(
302
+ {
303
+ defaultMessage: "{count, plural, one {Shipping address} other {Shipping addresses}}",
304
+ id: "customer_overview.shipping_addresses_block.title",
305
+ description: "Title of the block that lists the customer shipping addresses"
306
+ },
307
+ { count: String(t(d).length) }
308
+ )
309
+ }, {
310
+ right: f(() => [
311
+ O(t(F), {
312
+ size: "xs",
313
+ intent: "subtle",
314
+ class: "sv-action sv-action--ghost sv-shipping-addresses__manage",
315
+ onClick: v[0] || (v[0] = (L) => p({ step: "LIST" }))
316
+ }, {
317
+ default: f(() => [
318
+ k(S(t(n)({
319
+ defaultMessage: "Manage",
320
+ id: "customer_overview.shipping_addresses_block.manage_button_label",
321
+ description: "Label of the button that opens the modal to manage the customer shipping addresses"
322
+ })), 1)
323
+ ]),
324
+ _: 1
325
+ })
326
+ ]),
327
+ default: f(() => [
328
+ E("div", ce, [
329
+ t(h) ? (c(), m(t(H), {
330
+ key: 0,
331
+ class: "sv-shipping-addresses__error sv-error",
332
+ title: t(n)({
333
+ defaultMessage: "We could not load your shipping addresses.",
334
+ id: "customer_overview.shipping_addresses_block.load_error",
335
+ description: "Shown in the shipping addresses block when the addresses cannot be loaded"
336
+ })
337
+ }, null, 8, ["title"])) : t(a) && !t(d).length ? (c(), m(x, {
338
+ key: 1,
339
+ variant: "section",
340
+ class: "min-h-[100px]"
341
+ })) : t(d).length ? (c(), m(ne, {
342
+ key: 2,
343
+ class: "sv-shipping-addresses__list",
344
+ addresses: _.value,
345
+ "get-menu-items": t(V),
346
+ compact: ""
347
+ }, null, 8, ["addresses", "get-menu-items"])) : (c(), m(W, {
348
+ key: 3,
349
+ class: "sv-shipping-addresses__empty",
350
+ icon: "home"
351
+ }, {
352
+ title: f(() => [
353
+ k(S(t(n)({
354
+ defaultMessage: "No shipping addresses yet",
355
+ id: "customer_overview.shipping_addresses_block.empty",
356
+ description: "Shown in the shipping addresses block when the customer has no shipping addresses"
357
+ })), 1)
358
+ ]),
359
+ message: f(() => [
360
+ E("button", {
361
+ type: "button",
362
+ class: "sv-action sv-action--link sv-shipping-addresses__add underline",
363
+ onClick: v[1] || (v[1] = (L) => p({ step: "ADD" }))
364
+ }, S(t(n)({
365
+ defaultMessage: "Add shipping address",
366
+ id: "customer_overview.shipping_addresses_block.add_button_label",
367
+ description: "Label of the link that opens the form for a first shipping address"
368
+ })), 1)
369
+ ]),
370
+ _: 1
371
+ }))
372
+ ]),
373
+ A.value && e.customer ? (c(), m(t(s), {
374
+ key: 0,
375
+ "show-modal": u.value,
376
+ start: l.value,
377
+ customer: e.customer,
378
+ addresses: t(d),
379
+ "is-loading": t(a),
380
+ actions: t(i),
381
+ onClose: v[2] || (v[2] = (L) => u.value = !1)
382
+ }, null, 8, ["show-modal", "start", "customer", "addresses", "is-loading", "actions"])) : y("", !0)
383
+ ]),
384
+ _: 1
385
+ }, 8, ["title"])) : y("", !0);
386
+ }
387
+ }), we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
388
+ __proto__: null,
389
+ default: pe
390
+ }, Symbol.toStringTag, { value: "Module" }));
391
+ export {
392
+ we as C,
393
+ te as _,
394
+ ne as a,
395
+ Y as t,
396
+ de as u
397
+ };