@solvimon/solvimon-web 0.1.0-alpha.13 → 0.1.0-alpha.15

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 (135) hide show
  1. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-ugPPvTKf.mjs} +2 -2
  2. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js → BillingInformation.vue_vue_type_script_setup_true_lang-xuCWAVgf.js} +1 -1
  3. package/dist/ContentWithAsideLayout-DHpnJfGA.js +1 -0
  4. package/dist/{ContentWithAsideLayout-DhfUkZZg.mjs → ContentWithAsideLayout-Dy9xgxuF.mjs} +6 -3
  5. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BpN9nSMC.js +1 -0
  6. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D_PE2UbX.mjs} +8 -23
  7. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js +1 -0
  8. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs} +1 -1
  9. package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js +1 -0
  10. package/dist/InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs +27 -0
  11. package/dist/{PaymentHistoryBlock-BiiFJkpT.js → PaymentHistoryBlock-BGbTy4Se.js} +1 -1
  12. package/dist/{PaymentHistoryBlock-D_B099M7.mjs → PaymentHistoryBlock-BKMttUyk.mjs} +1 -1
  13. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js +1 -0
  14. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs} +1 -1
  15. package/dist/{PaymentIntegrationForm-CkXYj9xs.mjs → PaymentIntegrationForm-BGxjGJGz.mjs} +1 -1
  16. package/dist/{PaymentIntegrationForm-bfGmfwQT.js → PaymentIntegrationForm-liOVNKEG.js} +1 -1
  17. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BxdcIX-Z.js +1 -0
  18. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BnMmcoAu.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-aP-gCq7V.mjs} +736 -162
  19. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-DfdaWRO0.js +1 -0
  20. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-h-JUw1DV.mjs +145 -0
  21. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-DxndhDxR.js +1 -0
  22. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-j5VNsyu7.mjs +139 -0
  23. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVoS3ZXS.js +1 -0
  24. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cqk-vonA.mjs +170 -0
  25. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BkzLj8n2.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-Cv6lz35J.mjs} +48 -23
  26. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D6hHXndB.js +1 -0
  27. package/dist/component-B53Df2Rt.js +1 -0
  28. package/dist/component-BSnccqm1.mjs +933 -0
  29. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  30. package/dist/components/BillingInformation/BillingInformation.es.js +4 -4
  31. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  32. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +3 -3
  33. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  34. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +4 -4
  35. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  36. package/dist/components/Invoice/Invoice.es.js +14 -13
  37. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  38. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
  39. package/dist/components/InvoiceHeader/InvoiceHeader.ce.d.ts +3 -0
  40. package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -0
  41. package/dist/components/InvoiceHeader/InvoiceHeader.es.js +123 -0
  42. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  43. package/dist/components/InvoicesList/InvoicesList.es.js +3 -3
  44. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  45. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
  46. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  47. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +11 -110
  48. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  49. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +5 -5
  50. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  51. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +5 -5
  52. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  53. package/dist/components/WalletBalances/WalletBalances.es.js +3 -3
  54. package/dist/core/action-request.types.d.ts +10 -1
  55. package/dist/core/index.cjs.js +1 -1
  56. package/dist/core/index.es.js +1 -1
  57. package/dist/core/types.d.ts +4 -0
  58. package/dist/{customer-hDxW1Dbp.js → customer-B5b2tLhw.js} +1 -1
  59. package/dist/{customer-B31QzznT.mjs → customer-CANPEYH9.mjs} +1 -1
  60. package/dist/en-US-C0gIE4Q1.js +1 -0
  61. package/dist/{en-US-N3CUCsVy.mjs → en-US-DAgOSlgv.mjs} +33 -18
  62. package/dist/index.cjs.js +1 -1
  63. package/dist/index.es.js +1 -1
  64. package/dist/invoices-BCmE_nnb.js +1 -0
  65. package/dist/{invoices-DIYPN2j_.mjs → invoices-DBv0qkgm.mjs} +22 -3
  66. package/dist/nl-NL-Br7muSHK.js +1 -0
  67. package/dist/{nl-NL-B8U9b85I.mjs → nl-NL-DCsmrA8A.mjs} +33 -14
  68. package/dist/{paymentMethods-67b3UlTZ.mjs → paymentMethods-D-5FNN8W.mjs} +11 -3
  69. package/dist/paymentMethods-u5y9B5ng.js +1 -0
  70. package/dist/{payments-Dq6R37Fz.mjs → payments-BK8yzqJ5.mjs} +1 -1
  71. package/dist/{payments-DkHhTHto.js → payments-BTTtcfyI.js} +1 -1
  72. package/dist/{registry-Df_26rJy.mjs → registry-CMo7X2FD.mjs} +9 -3
  73. package/dist/registry-Cx7p19-6.js +1 -0
  74. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  75. package/dist/screens/Checkout/Checkout.es.js +330 -414
  76. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  77. package/dist/screens/CustomerOverview/CustomerOverview.es.js +13 -13
  78. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
  79. package/dist/screens/PayInvoice/PayInvoice.es.js +45 -34
  80. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.ce.d.ts +3 -0
  81. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -0
  82. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +231 -0
  83. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  84. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +756 -720
  85. package/dist/solvimon-web.css +1 -1
  86. package/dist/{subscriptions-jelITJcX.js → subscriptions-AMC4DirD.js} +1 -1
  87. package/dist/{subscriptions-ClGIr_aS.mjs → subscriptions-DHjXDyH1.mjs} +2 -2
  88. package/dist/{adyen-Bwewy3HC.mjs → url-1Lbg5Yni.mjs} +35 -35
  89. package/dist/url-B6-3PkW2.js +1 -0
  90. package/dist/{useActionDispatchProvider-rw9kWeE0.js → useActionDispatchProvider-CizNgRwv.js} +1 -1
  91. package/dist/{useActionDispatchProvider-BC57-Ufn.mjs → useActionDispatchProvider-DmhD9mYX.mjs} +1 -1
  92. package/dist/{useCustomer-Ba9WRtuT.mjs → useCustomer-DCPq7eHM.mjs} +2 -2
  93. package/dist/{useCustomer-CUcaeQn_.js → useCustomer-DYc54GVD.js} +1 -1
  94. package/dist/useIncrementalLoading-CuSndpP2.js +1 -0
  95. package/dist/{useIncrementalLoading-Cnzh2mAz.mjs → useIncrementalLoading-DmOT2MXH.mjs} +4 -4
  96. package/dist/{useInvoiceData-lIMEwwMy.js → useInvoiceData-BajCyf-x.js} +1 -1
  97. package/dist/{useInvoiceData-D7YN2SAd.mjs → useInvoiceData-BgtUKbHY.mjs} +2 -2
  98. package/dist/{useInvoicesList-CFzAxyae.mjs → useInvoicesList-DRD5yix0.mjs} +4 -4
  99. package/dist/useInvoicesList-wnvjyB_H.js +1 -0
  100. package/dist/{useLoadInitialData-DjwRHcAH.js → useLoadInitialData-BObRB7Vo.js} +1 -1
  101. package/dist/{useLoadInitialData-5sgImpzc.mjs → useLoadInitialData-IlbmC6p0.mjs} +1 -1
  102. package/dist/{usePaymentMethodOptions-DYO6xr3-.js → usePaymentMethodOptions-CzqsebhN.js} +1 -1
  103. package/dist/{usePaymentMethodOptions-C2k4npCQ.mjs → usePaymentMethodOptions-DRkWBjv6.mjs} +2 -2
  104. package/dist/{usePaymentMethods-CRWbH48K.mjs → usePaymentMethods-DFkRNreh.mjs} +2 -2
  105. package/dist/{usePaymentMethods-ryN_YohI.js → usePaymentMethods-ZPxKg5Y3.js} +1 -1
  106. package/dist/{usePayments-DWXPGFvp.js → usePayments-DwiGafZj.js} +1 -1
  107. package/dist/{usePayments-Cw5PPEJa.mjs → usePayments-E_Jsqo98.mjs} +3 -3
  108. package/dist/{usePortal-CxX4nrE4.js → usePortal-CxTS2TQh.js} +1 -1
  109. package/dist/{usePortal-cmE08vYs.mjs → usePortal-DcOz9FEL.mjs} +1 -1
  110. package/dist/{useService-Bb9r_sOQ.js → useService-CHrkefKd.js} +1 -1
  111. package/dist/{useService-BsSEI8DZ.mjs → useService-DF57xuDd.mjs} +1 -1
  112. package/dist/{useWalletBalanceItems-CpZ1NWPr.js → useWalletBalanceItems-BQEXDCBg.js} +1 -1
  113. package/dist/{useWalletBalanceItems-CkDqmk36.mjs → useWalletBalanceItems-MlHgedWR.mjs} +3 -3
  114. package/dist/{vendor-ui-C0K3osvz.mjs → vendor-ui-B8IlviSs.mjs} +6482 -5866
  115. package/dist/vendor-ui-C3Tq-qY_.js +1 -0
  116. package/package.json +5 -4
  117. package/dist/ContentWithAsideLayout-B5B8Kwaw.js +0 -1
  118. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js +0 -1
  119. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js +0 -1
  120. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js +0 -1
  121. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CiyyUp4z.js +0 -1
  122. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs +0 -50
  123. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Br3bEUlP.js +0 -1
  124. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-AHw3iTfi.js +0 -1
  125. package/dist/adyen-R6aSZ0Yf.js +0 -1
  126. package/dist/component-BOqPDAVk.js +0 -1
  127. package/dist/component-Djrf1L-Z.mjs +0 -889
  128. package/dist/en-US-CgPY97Vq.js +0 -1
  129. package/dist/invoices-DzkA1jDc.js +0 -1
  130. package/dist/nl-NL-qMRaTRrM.js +0 -1
  131. package/dist/paymentMethods-C_sdTkSF.js +0 -1
  132. package/dist/registry-BkViv4tv.js +0 -1
  133. package/dist/useIncrementalLoading-DoTTXM2Y.js +0 -1
  134. package/dist/useInvoicesList-CaBCGs4h.js +0 -1
  135. package/dist/vendor-ui-5pJF5KBP.js +0 -1
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js"),o=require("../../useCustomer-CUcaeQn_.js"),r=require("../../useLoadInitialData-DjwRHcAH.js"),n=require("../../component-BOqPDAVk.js"),i=e.defineComponent({__name:"BillingInformation.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const n=t.portalObject.customer_id,i=o.useCustomer({customerId:n}),{isLoading:l}=r.useLoadInitialData(i.get.execute());return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(i),isLoading:e.unref(l)})}}),l=e.defineComponent({__name:"BillingInformation.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:o=>(r,l)=>{var a,p,c,m;return e.openBlock(),e.createBlock(e.unref(n._sfc_main),{"custom-element-name":e.unref(s),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(a=o.branding)?void 0:a.colors)?void 0:p.primary,"secondary-color":null==(m=null==(c=o.branding)?void 0:c.colors)?void 0:m.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:l[0]||(l[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(r.$props)),{default:e.withCtx(({customer:o,isLoading:r})=>[e.createVNode(t._sfc_main,{"is-loading":r,customer:o.customer.value},null,8,["is-loading","customer"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),a=n.defineCustomElement(l),s=n.getComponentName("billing-information");exports.COMPONENT_NAME=s,exports.SolvimonBillingInformation=a,exports.defineSolvimonBillingInformation=()=>{customElements.get(s)||customElements.define(s,a)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-xuCWAVgf.js"),o=require("../../useCustomer-DYc54GVD.js"),r=require("../../useLoadInitialData-BObRB7Vo.js"),n=require("../../component-B53Df2Rt.js"),i=e.defineComponent({__name:"BillingInformation.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const n=t.portalObject.customer_id,i=o.useCustomer({customerId:n}),{isLoading:l}=r.useLoadInitialData(i.get.execute());return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(i),isLoading:e.unref(l)})}}),l=e.defineComponent({__name:"BillingInformation.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:o=>(r,l)=>{var a,p,c,m;return e.openBlock(),e.createBlock(e.unref(n._sfc_main),{"custom-element-name":e.unref(s),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(a=o.branding)?void 0:a.colors)?void 0:p.primary,"secondary-color":null==(m=null==(c=o.branding)?void 0:c.colors)?void 0:m.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:l[0]||(l[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(r.$props)),{default:e.withCtx(({customer:o,isLoading:r})=>[e.createVNode(t._sfc_main,{"is-loading":r,customer:o.customer.value},null,8,["is-loading","customer"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),a=n.defineCustomElement(l),s=n.getComponentName("billing-information");exports.COMPONENT_NAME=s,exports.SolvimonBillingInformation=a,exports.defineSolvimonBillingInformation=()=>{customElements.get(s)||customElements.define(s,a)};
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, renderSlot, unref, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps } from "vue";
2
- import { _ as _sfc_main$3 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs";
3
- import { u as useCustomer } from "../../useCustomer-Ba9WRtuT.mjs";
4
- import { u as useLoadInitialData } from "../../useLoadInitialData-5sgImpzc.mjs";
5
- import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
2
+ import { _ as _sfc_main$3 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-ugPPvTKf.mjs";
3
+ import { u as useCustomer } from "../../useCustomer-DCPq7eHM.mjs";
4
+ import { u as useLoadInitialData } from "../../useLoadInitialData-IlbmC6p0.mjs";
5
+ import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-BSnccqm1.mjs";
6
6
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7
7
  __name: "BillingInformation.entry.view",
8
8
  props: {
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../vendor-ui-5pJF5KBP.js"),a=require("../../index-DRdBmZ2-.js"),o=require("../../useCustomer-CUcaeQn_.js"),r=require("../../component-BOqPDAVk.js"),l={type:"INDIVIDUAL",email:"",country:"",addressLine1:"",postalCode:"",city:"",state:""};function n({initialState:o={},onSubmit:r}){const{form:n,validation:s,changes:u,hasChanges:c,updateInitialState:m,initialState:p}=(({initialState:a,validationRules:o,nullifyEmptyValues:r=!1,mode:l="shallow"})=>{const n=e.shallowRef(structuredClone(a)),i=e.shallowRef(structuredClone(a)),d=t.useValidation(o??{},i),s=e.computed(()=>t.objectDiff({from:n.value,to:i.value,mode:l,nullifyEmptyValues:r})),u=e.computed(()=>Object.entries(s.value).length>0);return{form:i,validation:d,changes:s,hasChanges:u,reset:()=>{i.value=structuredClone(a),d.value.$reset()},updateInitialState:e=>{i.value=structuredClone(e),n.value=structuredClone(e)},initialState:n}})({initialState:{...l,...o},validationRules:{email:{required:a.required,email:a.email}},nullifyEmptyValues:!0,mode:"deep"});return{form:n,isOrganization:t.isOrganization,validation:s,changes:u,hasChanges:c,updateInitialState:e=>{m(i(e))},submit:(e,t=n.value)=>r({customerId:e,payload:d(t)}),initialState:p}}const i=e=>{var a,o,r,l;if(t.isIndividual(e)){const t=e.individual.residential_address;return{type:"INDIVIDUAL",email:e.email??"",country:(null==t?void 0:t.country)??"",addressLine1:(null==t?void 0:t.line1)??"",addressLine2:(null==t?void 0:t.line2)??"",postalCode:(null==t?void 0:t.postal_code)??"",city:(null==t?void 0:t.city)??"",state:(null==t?void 0:t.state)??"",firstName:(null==(a=e.individual.name)?void 0:a.first_name)??"",lastName:(null==(o=e.individual.name)?void 0:o.last_name)??""}}const n=e.organization.registered_address;return{type:"ORGANIZATION",email:e.email??"",country:(null==n?void 0:n.country)??"",addressLine1:(null==n?void 0:n.line1)??"",addressLine2:(null==n?void 0:n.line2)??"",postalCode:(null==n?void 0:n.postal_code)??"",city:(null==n?void 0:n.city)??"",state:(null==n?void 0:n.state)??"",companyLegalName:e.organization.legal_name??"",companyVatNumber:(null==(l=null==(r=e.organization.tax_ids)?void 0:r[0])?void 0:l.id)??""}},d=e=>"ORGANIZATION"===e.type?{type:"ORGANIZATION",email:e.email,organization:{legal_name:e.companyLegalName??"",tax_ids:e.companyVatNumber?[{id:e.companyVatNumber,type:"GENERIC_TAX_ID"}]:void 0,registered_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}}:{type:"INDIVIDUAL",email:e.email,individual:{name:{first_name:e.firstName??"",last_name:e.lastName??""},residential_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}},s={class:"grid grid-cols-1 gap-4"},u={class:"flex grow flex-col"},c={class:"mt-6 flex items-center justify-between gap-4"},m={class:"flex flex-col gap-2"},p={key:0,class:"grid grid-cols-2 gap-2"},f={class:"grid grid-cols-3 gap-2"},h=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},isLoading:{type:Boolean},apiError:{type:null},updateCustomer:{type:Function}},setup(a){const o=a,{$t:r}=t.useIntl(),{validation:l,form:i,updateInitialState:d,submit:h,hasChanges:g}=n({onSubmit:({customerId:e,payload:t})=>o.updateCustomer({customerId:e,payload:t})}),y=e.ref(!1),v=e.computed(()=>"ORGANIZATION"===i.value.type),_=e.computed(()=>!y.value),b=e.computed({get:()=>v.value,set:e=>i.value.type=e?"ORGANIZATION":"INDIVIDUAL"}),V=async()=>{var e;await l.value.$validate();!l.value.$invalid&&(null==(e=o.customer)?void 0:e.id)&&await h(o.customer.id)};return e.watch(()=>o.customer,e=>{e&&!y.value&&(d(e),y.value=!0)},{immediate:!0}),(o,n)=>{var d,h,y,N,k,C,S,E,I,L,T,x,O;return e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(V,["prevent"])},[e.createVNode(e.unref(t._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Customer information",id:"checkout.contact_information_block.title",description:"The title of the contact information block in the checkout form"})),1)]),_:1}),e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).email,"onUpdate:modelValue":n[0]||(n[0]=t=>e.unref(i).email=t),required:"",type:"email",label:e.unref(r)({defaultMessage:"Email address",id:"checkout.email_address.label",description:"The email address of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Email address...",id:"checkout.email_address.placeholder",description:"The email address of the customer in the checkout form"}),error:(null==(d=e.unref(l).email)?void 0:d.$errors)||(null==(h=a.apiError)?void 0:h.email)},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$21),{"single-model-value":e.unref(i).country,"onUpdate:singleModelValue":n[1]||(n[1]=t=>e.unref(i).country=t),label:e.unref(r)({defaultMessage:"Country",id:"checkout.country.label",description:"The country of the customer in the checkout form"}),error:null==(y=a.apiError)?void 0:y.country},null,8,["single-model-value","label","error"]),_.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$22),{key:0,modelValue:b.value,"onUpdate:modelValue":n[2]||(n[2]=e=>b.value=e),"label-position":"before"},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",u,[e.createVNode(e.unref(t._sfc_main),{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Company purchase",id:"checkout.company_purchase_toggle.title",description:"The title of the company purchase toggle in the checkout"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"I am purchasing on behalf of a company",id:"checkout.company_purchase_toggle.sub_title",description:"The subtitle of the company purchase toggle in the checkout"})),1)]),_:1})])]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).companyVatNumber,"onUpdate:modelValue":n[3]||(n[3]=t=>e.unref(i).companyVatNumber=t),name:"vat_number",label:e.unref(r)({defaultMessage:"VAT number",id:"checkout.vat_number.label",description:"The label for the vat number in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"VAT number...",id:"checkout.vat_number.placeholder",description:"The label for the vat number in the checkout form"}),error:null==(N=a.apiError)?void 0:N.vat_number},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).companyLegalName,"onUpdate:modelValue":n[4]||(n[4]=t=>e.unref(i).companyLegalName=t),required:"",name:"legal_name",label:e.unref(r)({defaultMessage:"Legal entity name",id:"checkout.legal_name.label",description:"The legal name of the organization customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Legal entity name...",id:"checkout.legal_name.placeholder",description:"The legal name of the organization customer in the checkout form"}),error:null==(k=a.apiError)?void 0:k.legal_name},null,8,["modelValue","label","placeholder","error"])],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",c,[e.createVNode(e.unref(t._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Billing details",id:"checkout.billing_information_block.title",description:"The title of the billing information block in the checkout form"})),1)]),_:1})]),e.createElementVNode("div",m,[v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).firstName,"onUpdate:modelValue":n[5]||(n[5]=t=>e.unref(i).firstName=t),name:"first_name",label:e.unref(r)({defaultMessage:"First name",id:"checkout.first_name.label",description:"The first name of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"First name...",id:"checkout.first_name.placeholder",description:"The first name of the customer in the checkout form"}),error:null==(C=a.apiError)?void 0:C.first_name},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).lastName,"onUpdate:modelValue":n[6]||(n[6]=t=>e.unref(i).lastName=t),name:"last_name",label:e.unref(r)({defaultMessage:"Last name",id:"checkout.last_name.label",description:"The last name of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Last name...",id:"checkout.last_name.placeholder",description:"The last name of the customer in the checkout form"}),error:null==(S=a.apiError)?void 0:S.last_name},null,8,["modelValue","label","placeholder","error"])])),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).addressLine1,"onUpdate:modelValue":n[7]||(n[7]=t=>e.unref(i).addressLine1=t),name:"address_line_1",label:e.unref(r)({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Address line 1...",id:"checkout.address.line1.placeholder",description:"Address line 1 of the customer address in the checkout form"}),error:null==(E=a.apiError)?void 0:E.address_line_1},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).addressLine2,"onUpdate:modelValue":n[8]||(n[8]=t=>e.unref(i).addressLine2=t),name:"address_line_2",placeholder:e.unref(r)({defaultMessage:"Address line 2...",id:"checkout.address.line2.placeholder",description:"Address line 2 of the customer address in the checkout form"}),error:null==(I=a.apiError)?void 0:I.address_line_2},null,8,["modelValue","placeholder","error"]),e.createElementVNode("div",f,[e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).postalCode,"onUpdate:modelValue":n[9]||(n[9]=t=>e.unref(i).postalCode=t),name:"postal_code",placeholder:e.unref(r)({defaultMessage:"Postal code...",id:"checkout.address.portal_code.placeholder",description:"Postal code of the customer address in the checkout form"}),error:null==(L=a.apiError)?void 0:L.postal_code},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).city,"onUpdate:modelValue":n[10]||(n[10]=t=>e.unref(i).city=t),name:"city",placeholder:e.unref(r)({defaultMessage:"City...",id:"checkout.address.city.placeholder",description:"City of the customer address in the checkout form"}),error:null==(T=a.apiError)?void 0:T.city},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).state,"onUpdate:modelValue":n[11]||(n[11]=t=>e.unref(i).state=t),name:"state",placeholder:e.unref(r)({defaultMessage:"State...",id:"checkout.address.state.placeholder",description:"State of the customer address in the checkout form"}),error:null==(x=a.apiError)?void 0:x.state},null,8,["modelValue","placeholder","error"])])]),(null==(O=a.apiError)?void 0:O._generic)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$15),{key:0,class:"mt-4",title:a.apiError._generic},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$3),{type:"submit",color:"primary",disabled:!e.unref(g),loading:a.isLoading,class:"mt-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Save changes",id:"billing_information_form.submit_button.label",description:"The label for the submit button of the billing information form"})),1)]),_:1},8,["disabled","loading"])],32)}}}),g=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},apiError:{type:null},updateCustomer:{type:Function},isLoading:{type:Boolean}},setup:t=>(a,o)=>(e.openBlock(),e.createBlock(h,{class:"sv-billing-form sv-root sv-component",customer:t.customer,"update-customer":t.updateCustomer,"is-loading":t.isLoading,"api-error":t.apiError},null,8,["customer","update-customer","is-loading","api-error"]))}),y=e.defineComponent({__name:"BillingInformationForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(a){const r=a.portalObject.customer_id,{customer:l,get:n,update:i}=o.useCustomer({customerId:r});return e.onMounted(async()=>{await n.execute()}),(a,o)=>e.renderSlot(a.$slots,"default",{customer:e.unref(l),isLoading:e.unref(n).isPending.value||e.unref(i).isPending.value,updateCustomer:e.unref(i),apiError:e.unref(t.getApiError)(e.unref(i).error)})}}),v=e.defineComponent({__name:"BillingInformationForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},emits:["error"],setup:t=>(a,o)=>{var l,n,i,d;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(b),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(n=null==(l=t.branding)?void 0:l.colors)?void 0:n.primary,"secondary-color":null==(d=null==(i=t.branding)?void 0:i.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:o[0]||(o[0]=e=>a.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(a.$props)),{default:e.withCtx(({customer:t,updateCustomer:a,isLoading:o,apiError:r})=>[t?(e.openBlock(),e.createBlock(g,{key:0,customer:t,"is-loading":o,"update-customer":({payload:e})=>a.execute(e),"api-error":r},null,8,["customer","is-loading","update-customer","api-error"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),_=r.defineCustomElement(v),b=r.getComponentName("billing-information-form");exports.COMPONENT_NAME=b,exports.SolvimonBillingInformationForm=_,exports.defineSolvimonBillingInformationForm=()=>{customElements.get(b)||customElements.define(b,_)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../vendor-ui-C3Tq-qY_.js"),a=require("../../index-DRdBmZ2-.js"),o=require("../../useCustomer-DYc54GVD.js"),r=require("../../component-B53Df2Rt.js"),l={type:"INDIVIDUAL",email:"",country:"",addressLine1:"",postalCode:"",city:"",state:""};function n({initialState:o={},onSubmit:r}){const{form:n,validation:s,changes:u,hasChanges:c,updateInitialState:m,initialState:p}=(({initialState:a,validationRules:o,nullifyEmptyValues:r=!1,mode:l="shallow"})=>{const n=e.shallowRef(structuredClone(a)),i=e.shallowRef(structuredClone(a)),d=t.useValidation(o??{},i),s=e.computed(()=>t.objectDiff({from:n.value,to:i.value,mode:l,nullifyEmptyValues:r})),u=e.computed(()=>Object.entries(s.value).length>0);return{form:i,validation:d,changes:s,hasChanges:u,reset:()=>{i.value=structuredClone(a),d.value.$reset()},updateInitialState:e=>{i.value=structuredClone(e),n.value=structuredClone(e)},initialState:n}})({initialState:{...l,...o},validationRules:{email:{required:a.required,email:a.email}},nullifyEmptyValues:!0,mode:"deep"});return{form:n,isOrganization:t.isOrganization,validation:s,changes:u,hasChanges:c,updateInitialState:e=>{m(i(e))},submit:(e,t=n.value)=>r({customerId:e,payload:d(t)}),initialState:p}}const i=e=>{var a,o,r,l;if(t.isIndividual(e)){const t=e.individual.residential_address;return{type:"INDIVIDUAL",email:e.email??"",country:(null==t?void 0:t.country)??"",addressLine1:(null==t?void 0:t.line1)??"",addressLine2:(null==t?void 0:t.line2)??"",postalCode:(null==t?void 0:t.postal_code)??"",city:(null==t?void 0:t.city)??"",state:(null==t?void 0:t.state)??"",firstName:(null==(a=e.individual.name)?void 0:a.first_name)??"",lastName:(null==(o=e.individual.name)?void 0:o.last_name)??""}}const n=e.organization.registered_address;return{type:"ORGANIZATION",email:e.email??"",country:(null==n?void 0:n.country)??"",addressLine1:(null==n?void 0:n.line1)??"",addressLine2:(null==n?void 0:n.line2)??"",postalCode:(null==n?void 0:n.postal_code)??"",city:(null==n?void 0:n.city)??"",state:(null==n?void 0:n.state)??"",companyLegalName:e.organization.legal_name??"",companyVatNumber:(null==(l=null==(r=e.organization.tax_ids)?void 0:r[0])?void 0:l.id)??""}},d=e=>"ORGANIZATION"===e.type?{type:"ORGANIZATION",email:e.email,organization:{legal_name:e.companyLegalName??"",tax_ids:e.companyVatNumber?[{id:e.companyVatNumber,type:"GENERIC_TAX_ID"}]:void 0,registered_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}}:{type:"INDIVIDUAL",email:e.email,individual:{name:{first_name:e.firstName??"",last_name:e.lastName??""},residential_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}},s={class:"grid grid-cols-1 gap-4"},u={class:"flex grow flex-col"},c={class:"mt-6 flex items-center justify-between gap-4"},m={class:"flex flex-col gap-2"},p={key:0,class:"grid grid-cols-2 gap-2"},f={class:"grid grid-cols-3 gap-2"},h=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},isLoading:{type:Boolean},apiError:{type:null},updateCustomer:{type:Function}},setup(a){const o=a,{$t:r}=t.useIntl(),{validation:l,form:i,updateInitialState:d,submit:h,hasChanges:g}=n({onSubmit:({customerId:e,payload:t})=>o.updateCustomer({customerId:e,payload:t})}),y=e.ref(!1),v=e.computed(()=>"ORGANIZATION"===i.value.type),_=e.computed(()=>!y.value),b=e.computed({get:()=>v.value,set:e=>i.value.type=e?"ORGANIZATION":"INDIVIDUAL"}),V=async()=>{var e;await l.value.$validate();!l.value.$invalid&&(null==(e=o.customer)?void 0:e.id)&&await h(o.customer.id)};return e.watch(()=>o.customer,e=>{e&&!y.value&&(d(e),y.value=!0)},{immediate:!0}),(o,n)=>{var d,h,y,k,N,C,S,E,I,L,T,x,O;return e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(V,["prevent"])},[e.createVNode(e.unref(t._sfc_main$3),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Customer information",id:"checkout.contact_information_block.title",description:"The title of the contact information block in the checkout form"})),1)]),_:1}),e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$23),{modelValue:e.unref(i).email,"onUpdate:modelValue":n[0]||(n[0]=t=>e.unref(i).email=t),required:"",type:"email",label:e.unref(r)({defaultMessage:"Email address",id:"checkout.email_address.label",description:"The email address of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Email address...",id:"checkout.email_address.placeholder",description:"The email address of the customer in the checkout form"}),error:(null==(d=e.unref(l).email)?void 0:d.$errors)||(null==(h=a.apiError)?void 0:h.email)},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$24),{"single-model-value":e.unref(i).country,"onUpdate:singleModelValue":n[1]||(n[1]=t=>e.unref(i).country=t),label:e.unref(r)({defaultMessage:"Country",id:"checkout.country.label",description:"The country of the customer in the checkout form"}),error:null==(y=a.apiError)?void 0:y.country},null,8,["single-model-value","label","error"]),_.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$25),{key:0,modelValue:b.value,"onUpdate:modelValue":n[2]||(n[2]=e=>b.value=e),"label-position":"before"},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",u,[e.createVNode(e.unref(t._sfc_main$3),{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Company purchase",id:"checkout.company_purchase_toggle.title",description:"The title of the company purchase toggle in the checkout"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$3),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"I am purchasing on behalf of a company",id:"checkout.company_purchase_toggle.sub_title",description:"The subtitle of the company purchase toggle in the checkout"})),1)]),_:1})])]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(t._sfc_main$23),{modelValue:e.unref(i).companyVatNumber,"onUpdate:modelValue":n[3]||(n[3]=t=>e.unref(i).companyVatNumber=t),name:"vat_number",label:e.unref(r)({defaultMessage:"VAT number",id:"checkout.vat_number.label",description:"The label for the vat number in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"VAT number...",id:"checkout.vat_number.placeholder",description:"The label for the vat number in the checkout form"}),error:null==(k=a.apiError)?void 0:k.vat_number},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$23),{modelValue:e.unref(i).companyLegalName,"onUpdate:modelValue":n[4]||(n[4]=t=>e.unref(i).companyLegalName=t),required:"",name:"legal_name",label:e.unref(r)({defaultMessage:"Legal entity name",id:"checkout.legal_name.label",description:"The legal name of the organization customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Legal entity name...",id:"checkout.legal_name.placeholder",description:"The legal name of the organization customer in the checkout form"}),error:null==(N=a.apiError)?void 0:N.legal_name},null,8,["modelValue","label","placeholder","error"])],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",c,[e.createVNode(e.unref(t._sfc_main$3),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Billing details",id:"checkout.billing_information_block.title",description:"The title of the billing information block in the checkout form"})),1)]),_:1})]),e.createElementVNode("div",m,[v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(e.unref(t._sfc_main$23),{modelValue:e.unref(i).firstName,"onUpdate:modelValue":n[5]||(n[5]=t=>e.unref(i).firstName=t),name:"first_name",label:e.unref(r)({defaultMessage:"First name",id:"checkout.first_name.label",description:"The first name of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"First name...",id:"checkout.first_name.placeholder",description:"The first name of the customer in the checkout form"}),error:null==(C=a.apiError)?void 0:C.first_name},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$23),{modelValue:e.unref(i).lastName,"onUpdate:modelValue":n[6]||(n[6]=t=>e.unref(i).lastName=t),name:"last_name",label:e.unref(r)({defaultMessage:"Last name",id:"checkout.last_name.label",description:"The last name of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Last name...",id:"checkout.last_name.placeholder",description:"The last name of the customer in the checkout form"}),error:null==(S=a.apiError)?void 0:S.last_name},null,8,["modelValue","label","placeholder","error"])])),e.createVNode(e.unref(t._sfc_main$23),{modelValue:e.unref(i).addressLine1,"onUpdate:modelValue":n[7]||(n[7]=t=>e.unref(i).addressLine1=t),name:"address_line_1",label:e.unref(r)({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Address line 1...",id:"checkout.address.line1.placeholder",description:"Address line 1 of the customer address in the checkout form"}),error:null==(E=a.apiError)?void 0:E.address_line_1},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$23),{modelValue:e.unref(i).addressLine2,"onUpdate:modelValue":n[8]||(n[8]=t=>e.unref(i).addressLine2=t),name:"address_line_2",placeholder:e.unref(r)({defaultMessage:"Address line 2...",id:"checkout.address.line2.placeholder",description:"Address line 2 of the customer address in the checkout form"}),error:null==(I=a.apiError)?void 0:I.address_line_2},null,8,["modelValue","placeholder","error"]),e.createElementVNode("div",f,[e.createVNode(e.unref(t._sfc_main$23),{modelValue:e.unref(i).postalCode,"onUpdate:modelValue":n[9]||(n[9]=t=>e.unref(i).postalCode=t),name:"postal_code",placeholder:e.unref(r)({defaultMessage:"Postal code...",id:"checkout.address.portal_code.placeholder",description:"Postal code of the customer address in the checkout form"}),error:null==(L=a.apiError)?void 0:L.postal_code},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$23),{modelValue:e.unref(i).city,"onUpdate:modelValue":n[10]||(n[10]=t=>e.unref(i).city=t),name:"city",placeholder:e.unref(r)({defaultMessage:"City...",id:"checkout.address.city.placeholder",description:"City of the customer address in the checkout form"}),error:null==(T=a.apiError)?void 0:T.city},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$23),{modelValue:e.unref(i).state,"onUpdate:modelValue":n[11]||(n[11]=t=>e.unref(i).state=t),name:"state",placeholder:e.unref(r)({defaultMessage:"State...",id:"checkout.address.state.placeholder",description:"State of the customer address in the checkout form"}),error:null==(x=a.apiError)?void 0:x.state},null,8,["modelValue","placeholder","error"])])]),(null==(O=a.apiError)?void 0:O._generic)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$17),{key:0,class:"mt-4",title:a.apiError._generic},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$1),{type:"submit",color:"primary",disabled:!e.unref(g),loading:a.isLoading,class:"mt-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Save changes",id:"billing_information_form.submit_button.label",description:"The label for the submit button of the billing information form"})),1)]),_:1},8,["disabled","loading"])],32)}}}),g=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},apiError:{type:null},updateCustomer:{type:Function},isLoading:{type:Boolean}},setup:t=>(a,o)=>(e.openBlock(),e.createBlock(h,{class:"sv-billing-form sv-root sv-component",customer:t.customer,"update-customer":t.updateCustomer,"is-loading":t.isLoading,"api-error":t.apiError},null,8,["customer","update-customer","is-loading","api-error"]))}),y=e.defineComponent({__name:"BillingInformationForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(a){const r=a.portalObject.customer_id,{customer:l,get:n,update:i}=o.useCustomer({customerId:r});return e.onMounted(async()=>{await n.execute()}),(a,o)=>e.renderSlot(a.$slots,"default",{customer:e.unref(l),isLoading:e.unref(n).isPending.value||e.unref(i).isPending.value,updateCustomer:e.unref(i),apiError:e.unref(t.getApiError)(e.unref(i).error)})}}),v=e.defineComponent({__name:"BillingInformationForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},emits:["error"],setup:t=>(a,o)=>{var l,n,i,d;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(b),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(n=null==(l=t.branding)?void 0:l.colors)?void 0:n.primary,"secondary-color":null==(d=null==(i=t.branding)?void 0:i.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:o[0]||(o[0]=e=>a.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(a.$props)),{default:e.withCtx(({customer:t,updateCustomer:a,isLoading:o,apiError:r})=>[t?(e.openBlock(),e.createBlock(g,{key:0,customer:t,"is-loading":o,"update-customer":({payload:e})=>a.execute(e),"api-error":r},null,8,["customer","is-loading","update-customer","api-error"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),_=r.defineCustomElement(v),b=r.getComponentName("billing-information-form");exports.COMPONENT_NAME=b,exports.SolvimonBillingInformationForm=_,exports.defineSolvimonBillingInformationForm=()=>{customElements.get(b)||customElements.define(b,_)};
@@ -1,8 +1,8 @@
1
1
  import { shallowRef, computed, defineComponent, ref, watch, openBlock, createElementBlock, withModifiers, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode, createBlock, createCommentVNode, Fragment, onMounted, renderSlot, normalizeProps, guardReactiveProps } from "vue";
2
- import { H as useValidation, J as objectDiff, K as isOrganization, L as isIndividual, u as useIntl, _ as _sfc_main$4, M as _sfc_main$5, N as _sfc_main$6, O as _sfc_main$7, B as _sfc_main$8, e as _sfc_main$9, Q as getApiError } from "../../vendor-ui-C0K3osvz.mjs";
2
+ import { M as useValidation, N as objectDiff, O as isOrganization, Q as isIndividual, u as useIntl, e as _sfc_main$4, R as _sfc_main$5, S as _sfc_main$6, U as _sfc_main$7, E as _sfc_main$8, c as _sfc_main$9, V as getApiError } from "../../vendor-ui-B8IlviSs.mjs";
3
3
  import { e as email, r as required } from "../../index-CzL1ZcGi.mjs";
4
- import { u as useCustomer } from "../../useCustomer-Ba9WRtuT.mjs";
5
- import { _ as _sfc_main$a, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
4
+ import { u as useCustomer } from "../../useCustomer-DCPq7eHM.mjs";
5
+ import { _ as _sfc_main$a, d as defineCustomElement, g as getComponentName } from "../../component-BSnccqm1.mjs";
6
6
  const useForm = ({
7
7
  initialState,
8
8
  validationRules,
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js"),t=require("../../component-BOqPDAVk.js"),r=require("../../useLoadInitialData-DjwRHcAH.js"),n=require("../../usePaymentMethods-ryN_YohI.js"),a=e.defineComponent({__name:"CustomerPaymentMethods.entry.view",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){var a;const l=o,i=l.portalObject.customer_id,p=n.usePaymentMethods({customerId:i,pageSize:(null==(a=l.configuration)?void 0:a.maxItems)||3}),{isLoading:c}=r.useLoadInitialData(p.fetchInitial());return(r,n)=>{var a,l,i,m;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(s),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(a=o.branding)?void 0:a.colors)?void 0:l.primary,"secondary-color":null==(m=null==(i=o.branding)?void 0:i.colors)?void 0:m.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:n[0]||(n[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{paymentMethods:e.unref(p).items.value,isLoading:e.unref(c)})]),_:3},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),l=e.defineComponent({__name:"CustomerPaymentMethods.entry",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:r=>(n,l)=>{var i,p,c,m;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(s),environment:r.environment,locale:r.locale,"portal-object":r.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(i=r.branding)?void 0:i.colors)?void 0:p.primary,"secondary-color":null==(m=null==(c=r.branding)?void 0:c.colors)?void 0:m.secondary,"experimental-features":r.experimentalFeatures,"log-level":r.logLevel,"on-log":r.onLog,"css-overrides":r.cssOverrides,onError:l[0]||(l[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(n.$props)),{default:e.withCtx(({paymentMethods:t,isLoading:n})=>[e.createVNode(o._sfc_main,{configuration:r.configuration,"payment-methods":t,"is-loading":n},null,8,["configuration","payment-methods","is-loading"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),i=t.defineCustomElement(l),s=t.getComponentName("customer-payment-methods");exports.COMPONENT_NAME=s,exports.SolvimonCustomerPaymentMethods=i,exports.defineSolvimonCustomerPaymentMethods=()=>{customElements.get(s)||customElements.define(s,i)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BpN9nSMC.js"),t=require("../../component-B53Df2Rt.js"),r=require("../../useLoadInitialData-BObRB7Vo.js"),n=require("../../usePaymentMethods-ZPxKg5Y3.js"),a=e.defineComponent({__name:"CustomerPaymentMethods.entry.view",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){var a;const l=o,i=l.portalObject.customer_id,p=n.usePaymentMethods({customerId:i,pageSize:(null==(a=l.configuration)?void 0:a.maxItems)||3}),{isLoading:c}=r.useLoadInitialData(p.fetchInitial());return(r,n)=>{var a,l,i,m;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(s),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(a=o.branding)?void 0:a.colors)?void 0:l.primary,"secondary-color":null==(m=null==(i=o.branding)?void 0:i.colors)?void 0:m.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:n[0]||(n[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{paymentMethods:e.unref(p).items.value,isLoading:e.unref(c)})]),_:3},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),l=e.defineComponent({__name:"CustomerPaymentMethods.entry",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:r=>(n,l)=>{var i,p,c,m;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(s),environment:r.environment,locale:r.locale,"portal-object":r.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(i=r.branding)?void 0:i.colors)?void 0:p.primary,"secondary-color":null==(m=null==(c=r.branding)?void 0:c.colors)?void 0:m.secondary,"experimental-features":r.experimentalFeatures,"log-level":r.logLevel,"on-log":r.onLog,"css-overrides":r.cssOverrides,onError:l[0]||(l[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(n.$props)),{default:e.withCtx(({paymentMethods:t,isLoading:n})=>[e.createVNode(o._sfc_main,{configuration:r.configuration,"payment-methods":t,"is-loading":n},null,8,["configuration","payment-methods","is-loading"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),i=t.defineCustomElement(l),s=t.getComponentName("customer-payment-methods");exports.COMPONENT_NAME=s,exports.SolvimonCustomerPaymentMethods=i,exports.defineSolvimonCustomerPaymentMethods=()=>{customElements.get(s)||customElements.define(s,i)};
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, normalizeProps, guardReactiveProps } from "vue";
2
- import { _ as _sfc_main$3 } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs";
3
- import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
4
- import { u as useLoadInitialData } from "../../useLoadInitialData-5sgImpzc.mjs";
5
- import { u as usePaymentMethods } from "../../usePaymentMethods-CRWbH48K.mjs";
2
+ import { _ as _sfc_main$3 } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D_PE2UbX.mjs";
3
+ import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-BSnccqm1.mjs";
4
+ import { u as useLoadInitialData } from "../../useLoadInitialData-IlbmC6p0.mjs";
5
+ import { u as usePaymentMethods } from "../../usePaymentMethods-DFkRNreh.mjs";
6
6
  const DEFAULT_MAX_ITEMS = 3;
7
7
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8
8
  __name: "CustomerPaymentMethods.entry.view",
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../useLoadInitialData-DjwRHcAH.js"),o=require("../../usePayments-DWXPGFvp.js"),n=require("../../component-BOqPDAVk.js"),i=require("../../vendor-ui-5pJF5KBP.js"),a=require("../../useViewport-CKRY1CKR.js"),r=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js"),l=e.defineComponent({__name:"Invoice.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(n){const i=n,a=o.useInvoice({invoiceId:i.configuration.invoiceId}),r=o.usePayments(),{isLoading:l}=t.useLoadInitialData(a.get(),r.get(i.configuration.invoiceId));return(t,o)=>e.renderSlot(t.$slots,"default",{invoice:e.unref(a).invoice.value,invoiceDownloadService:e.unref(a).downloadInvoicePdf,payments:e.unref(r),isLoading:e.unref(l)})}}),c={key:0,class:"mt-8"},s={class:"flex flex-col gap-6"},d=["onClick","onKeyup"],u={class:"ml-1 inline-flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-100 text-2xs font-bold text-blue-600"},p={key:0},m={class:"p-0"},f={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},v=e.defineComponent({__name:"InvoiceCreditsBreakdown",props:{invoice:{type:Object}},setup(t){const o=t,{formatDate:n,$t:a,formatMessage:r,formatNumber:l}=i.useIntl(),{getIsOpen:v,toggle:_}=i.useToggleList(),g=e.computed(()=>Object.fromEntries((o.invoice.credit_types??[]).map(e=>[e.id,e]))),y=e=>r({defaultMessage:"Service period - {startAt} - {endAt}",id:"wallet_balance.service_period_heading",description:"Heading shown above wallet balance details for an invoice period"},{startAt:n({date:e.start_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone}),endAt:n({date:e.end_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone})}),b=e=>{var t;return(null==e?void 0:e.credit_type_id)?(null==(t=g.value[e.credit_type_id])?void 0:t.name)??e.credit_type_id:r({defaultMessage:"Credits",id:"wallet_balance.credit_type_fallback_label",description:"Fallback label for wallet balance credit types when no name is available"})},w=e=>e?l(Number(e)):r({defaultMessage:"-",id:"empty_value_placeholder",description:"Placeholder shown when a wallet balance quantity is missing"}),h=e.computed(()=>(({invoice:e,getPeriodTitle:t,getCreditTypeLabel:o,formatQuantity:n})=>[...e.periods??[],...e.closed_periods??[]].map(e=>{var i,a,r,l;const c=new Map,s=new Map;for(const t of e.groups??[])for(const d of t.lines??[]){const u=null==(i=null==d?void 0:d.details)?void 0:i.wallet_balance_details;if(!u)continue;const p=u.used_wallet_credits??u.left_wallet_credits??u.available_wallet_credits,m=o(p),f={id:`${e.period_order}-${t.group_order}-${d.line_order}`,label:m,used:n(null==(a=u.used_wallet_credits)?void 0:a.quantity),left:n(null==(r=u.left_wallet_credits)?void 0:r.quantity),available:n(null==(l=u.available_wallet_credits)?void 0:l.quantity)},v=`${f.label}-${f.used}-${f.left}-${f.available}`,_=s.get(m)??new Set;if(_.has(v))continue;_.add(v),s.set(m,_);const g=c.get(m)??{id:`${e.period_order}-${m}`,label:m,amount:f.available,rows:[]};g.rows.push(f),c.set(m,g)}return{id:`${e.period_order}-${e.start_at}`,title:t(e),rows:[...c.values()]}}).filter(e=>e.rows.length>0))({invoice:o.invoice,getPeriodTitle:y,getCreditTypeLabel:b,formatQuantity:w}));return(t,o)=>h.value.length>0?(e.openBlock(),e.createElementBlock("section",c,[e.createElementVNode("div",s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,t=>(e.openBlock(),e.createElementBlock("section",{key:t.id},[e.createVNode(e.unref(i._sfc_main$16),{class:"mt-4"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main),{tag:"h3",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(i.InvoiceTable),{class:"mt-3"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$17),{left:"",class:"text-gray-600"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Wallet balance",id:"wallet_balance.details.header",description:"Section header for invoice wallet balance details"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.id},[e.createElementVNode("tr",{class:"cursor-pointer border-t",tabindex:"0",onClick:o=>e.unref(_)(t.id),onKeyup:[e.withKeys(o=>e.unref(_)(t.id),["enter"]),e.withKeys(o=>e.unref(_)(t.id),["space"])]},[e.createVNode(e.unref(i._sfc_main$18),{class:"p-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$6),{icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(v)(t.id)}])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(t.label)+" ",1),e.createElementVNode("span",u,e.toDisplayString(t.rows.length),1)]),_:2},1024)],40,d),e.unref(v)(t.id)?(e.openBlock(),e.createElementBlock("tr",p,[e.createElementVNode("td",m,[e.createElementVNode("div",f,[e.createVNode(e.unref(i.InvoiceTable),null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$17),{left:"",class:"w-2/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Credit breakdown",id:"invoice_credits.credit_breakdown.table_header",description:"Column header for wallet balance credit type details"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$17),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Balance",id:"invoice_credits.balance.table_header",description:"Column header for the available wallet balance amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$17),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Used",id:"invoice_credits.used.table_header",description:"Column header for the used wallet credit amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$17),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Remaining",id:"invoice_credits.remaining.table_header",description:"Column header for the remaining wallet credit amount"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock("tr",{key:t.id,class:"border-t"},[e.createVNode(e.unref(i._sfc_main$18),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$18),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.available),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$18),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.used),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$18),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.left),1)]),_:2},1024)]))),128))]),_:2},1024)])])])):e.createCommentVNode("",!0)],64))),128))]),_:2},1024)]))),128))])])):e.createCommentVNode("",!0)}}),_=e.defineComponent({__name:"InvoiceBlock",props:{invoice:{type:Object}},setup(t){const{$t:o}=i.useIntl(),{isMobileViewport:n}=a.useViewport();return(a,r)=>(e.openBlock(),e.createBlock(e.unref(i._sfc_main$1),{class:"sv-invoice__summary grow",title:e.unref(o)({defaultMessage:"Invoice",description:"Title for the invoice block on the invoice details page",id:"sdk.invoice_details.invoice.title"})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["sv-invoice__summary-body",{"p-6 pt-2":!e.unref(n)}])},[e.unref(n)?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$19),{key:0,variant:"default","has-icon":"",class:"sv-invoice__download-hint justify-center border-gray-100 bg-gray-50 font-semibold text-gray-800"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Download the PDF for a full breakdown",description:"Download the PDF for a full breakdown",id:"sdk.invoice_details.invoice.download_pdf"})),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(i._sfc_main$12),{class:"sv-invoice__summary-content",invoice:t.invoice,"is-expandable":!e.unref(n)},{logo:e.withCtx(()=>[e.renderSlot(a.$slots,"logo")]),_:3},8,["invoice","is-expandable"]),e.createVNode(v,{class:"sv-invoice__credits-breakdown",invoice:t.invoice},null,8,["invoice"])],2)]),_:3},8,["title"]))}}),g={class:"sv-invoice sv-root sv-component"},y={class:"sv-invoice__body flex flex-col gap-3 lg:flex-row lg:gap-6"},b={class:"sv-invoice__aside flex shrink-0 flex-col gap-8 lg:w-72 lg:gap-6"},w=e.defineComponent({__name:"Invoice",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup(t){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../../PaymentHistoryBlock-BiiFJkpT.js"))),{$t:n}=i.useIntl();return(a,l)=>{var c,s;return e.openBlock(),e.createElementBlock("div",g,[e.createVNode(e.unref(i._sfc_main$13),{class:"sv-invoice__header mb-6","payment-attempts":t.payments??[],invoice:t.invoice,"download-service":()=>t.invoiceDownloadService(t.invoice.id),"show-download-button":t.configuration.enableDownloadButton,variant:"external"},null,8,["payment-attempts","invoice","download-service","show-download-button"]),e.createElementVNode("div",y,[t.invoice?(e.openBlock(),e.createBlock(_,{key:0,class:"sv-invoice__main",invoice:t.invoice},null,8,["invoice"])):e.createCommentVNode("",!0),e.createElementVNode("div",b,[e.createVNode(r._sfc_main,{class:"sv-invoice__details",invoice:t.invoice},null,8,["invoice"]),(null==(c=t.configuration)?void 0:c.enablePaymentAttempts)&&(null==(s=t.payments)?void 0:s.length)?(e.openBlock(),e.createBlock(e.unref(o),{key:0,class:"sv-invoice__payment-history","payment-attempts":t.payments,customer:t.invoice.customer},null,8,["payment-attempts","customer"])):e.createCommentVNode("",!0),t.configuration.enableCustomerBillingInformation?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$2),{key:1,class:"sv-invoice__billing-information",customer:t.invoice.customer,title:e.unref(n)({defaultMessage:"Your billing information",description:"Title for the billing information on the detailed invoice view",id:"sdk.invoice_details.customer_billing_information.title"})},null,8,["customer","title"])):e.createCommentVNode("",!0)])])])}}}),h=e.defineComponent({__name:"Invoice.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){var o;const i=t;if(!(null==(o=i.configuration)?void 0:o.invoiceId))throw new Error("Missing invoice id");const a=e.computed(()=>({...i,configuration:{enableCustomerBillingInformation:!0,enableDownloadButton:!0,enablePaymentAttempts:!0,...i.configuration}}));return(o,i)=>{var r,c,s,d;return e.openBlock(),e.createBlock(e.unref(n._sfc_main),{"custom-element-name":e.unref(k),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(r=t.branding)?void 0:r.colors)?void 0:c.primary,"secondary-color":null==(d=null==(s=t.branding)?void 0:s.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:i[0]||(i[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(l,e.normalizeProps(e.guardReactiveProps(a.value)),{default:e.withCtx(({invoice:o,payments:n,isLoading:i,invoiceDownloadService:a})=>[o?(e.openBlock(),e.createBlock(w,{key:0,"is-loading":i,invoice:o,"invoice-download-service":a,payments:n.payments.value,configuration:t.configuration},null,8,["is-loading","invoice","invoice-download-service","payments","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),x=n.defineCustomElement(h),k=n.getComponentName("invoice");exports.COMPONENT_NAME=k,exports.SolvimonInvoice=x,exports.defineSolvimonInvoice=()=>{customElements.get(k)||customElements.define(k,x)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../useLoadInitialData-BObRB7Vo.js"),o=require("../../usePayments-DwiGafZj.js"),n=require("../../component-B53Df2Rt.js"),i=require("../../vendor-ui-C3Tq-qY_.js"),a=require("../../InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js"),r=require("../../useViewport-CKRY1CKR.js"),l=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js"),c=e.defineComponent({__name:"Invoice.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(n){const i=n,a=o.useInvoice({invoiceId:i.configuration.invoiceId}),r=o.usePayments(),{isLoading:l}=t.useLoadInitialData(a.get(),r.get(i.configuration.invoiceId));return(t,o)=>e.renderSlot(t.$slots,"default",{invoice:e.unref(a).invoice.value,invoiceDownloadService:e.unref(a).downloadInvoicePdf,payments:e.unref(r),isLoading:e.unref(l)})}}),s={key:0,class:"mt-8"},d={class:"flex flex-col gap-6"},u=["onClick","onKeyup"],p={class:"ml-1 inline-flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-100 text-2xs font-bold text-blue-600"},m={key:0},f={class:"p-0"},v={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},_=e.defineComponent({__name:"InvoiceCreditsBreakdown",props:{invoice:{type:Object}},setup(t){const o=t,{formatDate:n,$t:a,formatMessage:r,formatNumber:l}=i.useIntl(),{getIsOpen:c,toggle:_}=i.useToggleList(),g=e.computed(()=>Object.fromEntries((o.invoice.credit_types??[]).map(e=>[e.id,e]))),y=e=>r({defaultMessage:"Service period - {startAt} - {endAt}",id:"wallet_balance.service_period_heading",description:"Heading shown above wallet balance details for an invoice period"},{startAt:n({date:e.start_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone}),endAt:n({date:e.end_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone})}),b=e=>{var t;return(null==e?void 0:e.credit_type_id)?(null==(t=g.value[e.credit_type_id])?void 0:t.name)??e.credit_type_id:r({defaultMessage:"Credits",id:"wallet_balance.credit_type_fallback_label",description:"Fallback label for wallet balance credit types when no name is available"})},w=e=>e?l(Number(e)):r({defaultMessage:"-",id:"empty_value_placeholder",description:"Placeholder shown when a wallet balance quantity is missing"}),h=e.computed(()=>(({invoice:e,getPeriodTitle:t,getCreditTypeLabel:o,formatQuantity:n})=>[...e.periods??[],...e.closed_periods??[]].map(e=>{var i,a,r,l;const c=new Map,s=new Map;for(const t of e.groups??[])for(const d of t.lines??[]){const u=null==(i=null==d?void 0:d.details)?void 0:i.wallet_balance_details;if(!u)continue;const p=u.used_wallet_credits??u.left_wallet_credits??u.available_wallet_credits,m=o(p),f={id:`${e.period_order}-${t.group_order}-${d.line_order}`,label:m,used:n(null==(a=u.used_wallet_credits)?void 0:a.quantity),left:n(null==(r=u.left_wallet_credits)?void 0:r.quantity),available:n(null==(l=u.available_wallet_credits)?void 0:l.quantity)},v=`${f.label}-${f.used}-${f.left}-${f.available}`,_=s.get(m)??new Set;if(_.has(v))continue;_.add(v),s.set(m,_);const g=c.get(m)??{id:`${e.period_order}-${m}`,label:m,amount:f.available,rows:[]};g.rows.push(f),c.set(m,g)}return{id:`${e.period_order}-${e.start_at}`,title:t(e),rows:[...c.values()]}}).filter(e=>e.rows.length>0))({invoice:o.invoice,getPeriodTitle:y,getCreditTypeLabel:b,formatQuantity:w}));return(t,o)=>h.value.length>0?(e.openBlock(),e.createElementBlock("section",s,[e.createElementVNode("div",d,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,t=>(e.openBlock(),e.createElementBlock("section",{key:t.id},[e.createVNode(e.unref(i._sfc_main$19),{class:"mt-4"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$3),{tag:"h3",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(i.InvoiceTable),{class:"mt-3"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$20),{left:"",class:"text-gray-600"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Wallet balance",id:"wallet_balance.details.header",description:"Section header for invoice wallet balance details"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.id},[e.createElementVNode("tr",{class:"cursor-pointer border-t",tabindex:"0",onClick:o=>e.unref(_)(t.id),onKeyup:[e.withKeys(o=>e.unref(_)(t.id),["enter"]),e.withKeys(o=>e.unref(_)(t.id),["space"])]},[e.createVNode(e.unref(i._sfc_main$21),{class:"p-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$14),{icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(c)(t.id)}])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(t.label)+" ",1),e.createElementVNode("span",p,e.toDisplayString(t.rows.length),1)]),_:2},1024)],40,u),e.unref(c)(t.id)?(e.openBlock(),e.createElementBlock("tr",m,[e.createElementVNode("td",f,[e.createElementVNode("div",v,[e.createVNode(e.unref(i.InvoiceTable),null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$20),{left:"",class:"w-2/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Credit breakdown",id:"invoice_credits.credit_breakdown.table_header",description:"Column header for wallet balance credit type details"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$20),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Balance",id:"invoice_credits.balance.table_header",description:"Column header for the available wallet balance amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$20),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Used",id:"invoice_credits.used.table_header",description:"Column header for the used wallet credit amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$20),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Remaining",id:"invoice_credits.remaining.table_header",description:"Column header for the remaining wallet credit amount"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock("tr",{key:t.id,class:"border-t"},[e.createVNode(e.unref(i._sfc_main$21),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$21),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.available),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$21),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.used),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$21),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.left),1)]),_:2},1024)]))),128))]),_:2},1024)])])])):e.createCommentVNode("",!0)],64))),128))]),_:2},1024)]))),128))])])):e.createCommentVNode("",!0)}}),g=e.defineComponent({__name:"InvoiceBlock",props:{invoice:{type:Object}},setup(t){const{$t:o}=i.useIntl(),{isMobileViewport:n}=r.useViewport();return(a,r)=>(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{class:"sv-invoice__summary grow",title:e.unref(o)({defaultMessage:"Invoice",description:"Title for the invoice block on the invoice details page",id:"sdk.invoice_details.invoice.title"})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["sv-invoice__summary-body",{"p-6 pt-2":!e.unref(n)}])},[e.unref(n)?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$22),{key:0,variant:"default","has-icon":"",class:"sv-invoice__download-hint justify-center border-gray-100 bg-gray-50 font-semibold text-gray-800"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Download the PDF for a full breakdown",description:"Download the PDF for a full breakdown",id:"sdk.invoice_details.invoice.download_pdf"})),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(i._sfc_main$15),{class:"sv-invoice__summary-content",invoice:t.invoice,"is-expandable":!e.unref(n)},{logo:e.withCtx(()=>[e.renderSlot(a.$slots,"logo")]),_:3},8,["invoice","is-expandable"]),e.createVNode(_,{class:"sv-invoice__credits-breakdown",invoice:t.invoice},null,8,["invoice"])],2)]),_:3},8,["title"]))}}),y={class:"sv-invoice sv-root sv-component"},b={class:"sv-invoice__body flex flex-col gap-3 lg:flex-row lg:gap-6"},w={class:"sv-invoice__aside flex shrink-0 flex-col gap-8 lg:w-72 lg:gap-6"},h=e.defineComponent({__name:"Invoice",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup(t){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../../PaymentHistoryBlock-BGbTy4Se.js"))),{$t:n}=i.useIntl();return(r,c)=>{var s,d;return e.openBlock(),e.createElementBlock("div",y,[e.createVNode(a._sfc_main,{class:"sv-invoice__header mb-6",invoice:t.invoice,payments:t.payments,"invoice-download-service":t.invoiceDownloadService,"is-loading":t.isLoading,configuration:t.configuration},null,8,["invoice","payments","invoice-download-service","is-loading","configuration"]),e.createElementVNode("div",b,[t.invoice?(e.openBlock(),e.createBlock(g,{key:0,class:"sv-invoice__main",invoice:t.invoice},null,8,["invoice"])):e.createCommentVNode("",!0),e.createElementVNode("div",w,[e.createVNode(l._sfc_main,{class:"sv-invoice__details",invoice:t.invoice},null,8,["invoice"]),(null==(s=t.configuration)?void 0:s.enablePaymentAttempts)&&(null==(d=t.payments)?void 0:d.length)?(e.openBlock(),e.createBlock(e.unref(o),{key:0,class:"sv-invoice__payment-history","payment-attempts":t.payments,customer:t.invoice.customer},null,8,["payment-attempts","customer"])):e.createCommentVNode("",!0),t.configuration.enableCustomerBillingInformation?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$4),{key:1,class:"sv-invoice__billing-information",customer:t.invoice.customer,title:e.unref(n)({defaultMessage:"Your billing information",description:"Title for the billing information on the detailed invoice view",id:"sdk.invoice_details.customer_billing_information.title"})},null,8,["customer","title"])):e.createCommentVNode("",!0)])])])}}}),x=e.defineComponent({__name:"Invoice.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){var o;const i=t;if(!(null==(o=i.configuration)?void 0:o.invoiceId))throw new Error("Missing invoice id");const a=e.computed(()=>({...i,configuration:{enableCustomerBillingInformation:!0,enableDownloadButton:!0,enablePaymentAttempts:!0,...i.configuration}}));return(o,i)=>{var r,l,s,d;return e.openBlock(),e.createBlock(e.unref(n._sfc_main),{"custom-element-name":e.unref(C),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(r=t.branding)?void 0:r.colors)?void 0:l.primary,"secondary-color":null==(d=null==(s=t.branding)?void 0:s.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:i[0]||(i[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(c,e.normalizeProps(e.guardReactiveProps(a.value)),{default:e.withCtx(({invoice:t,payments:o,isLoading:n,invoiceDownloadService:i})=>[t?(e.openBlock(),e.createBlock(h,{key:0,"is-loading":n,invoice:t,"invoice-download-service":i,payments:o.payments.value,configuration:a.value.configuration},null,8,["is-loading","invoice","invoice-download-service","payments","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),k=n.defineCustomElement(x),C=n.getComponentName("invoice");exports.COMPONENT_NAME=C,exports.SolvimonInvoice=k,exports.defineSolvimonInvoice=()=>{customElements.get(C)||customElements.define(C,k)};
@@ -1,10 +1,11 @@
1
1
  import { defineComponent, renderSlot, unref, computed, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createVNode, withCtx, createTextVNode, toDisplayString, withKeys, normalizeClass, createCommentVNode, createBlock, defineAsyncComponent, normalizeProps, guardReactiveProps } from "vue";
2
- import { u as useLoadInitialData } from "../../useLoadInitialData-5sgImpzc.mjs";
3
- import { u as useInvoice, a as usePayments } from "../../usePayments-Cw5PPEJa.mjs";
4
- import { _ as _sfc_main$g, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
5
- import { u as useIntl, C as useToggleList, D as _sfc_main$5, _ as _sfc_main$6, I as InvoiceTable, E as _sfc_main$7, F as _sfc_main$8, l as _sfc_main$9, b as _sfc_main$a, G as _sfc_main$b, y as _sfc_main$c, z as _sfc_main$d, c as _sfc_main$f } from "../../vendor-ui-C0K3osvz.mjs";
2
+ import { u as useLoadInitialData } from "../../useLoadInitialData-IlbmC6p0.mjs";
3
+ import { u as useInvoice, a as usePayments } from "../../usePayments-E_Jsqo98.mjs";
4
+ import { _ as _sfc_main$g, d as defineCustomElement, g as getComponentName } from "../../component-BSnccqm1.mjs";
5
+ import { u as useIntl, G as useToggleList, H as _sfc_main$5, e as _sfc_main$6, I as InvoiceTable, J as _sfc_main$7, K as _sfc_main$8, A as _sfc_main$9, _ as _sfc_main$a, L as _sfc_main$b, C as _sfc_main$c, j as _sfc_main$f } from "../../vendor-ui-B8IlviSs.mjs";
6
+ import { _ as _sfc_main$d } from "../../InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs";
6
7
  import { u as useViewport } from "../../useViewport-Bu0cyeSi.mjs";
7
- import { _ as _sfc_main$e } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs";
8
+ import { _ as _sfc_main$e } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs";
8
9
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9
10
  __name: "Invoice.entry.view",
10
11
  props: {
@@ -409,20 +410,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
409
410
  },
410
411
  setup(__props) {
411
412
  const PaymentHistoryBlock = defineAsyncComponent(
412
- () => import("../../PaymentHistoryBlock-D_B099M7.mjs")
413
+ () => import("../../PaymentHistoryBlock-BKMttUyk.mjs")
413
414
  );
414
415
  const { $t } = useIntl();
415
416
  return (_ctx, _cache) => {
416
417
  var _a, _b;
417
418
  return openBlock(), createElementBlock("div", _hoisted_1, [
418
- createVNode(unref(_sfc_main$d), {
419
+ createVNode(_sfc_main$d, {
419
420
  class: "sv-invoice__header mb-6",
420
- "payment-attempts": __props.payments ?? [],
421
421
  invoice: __props.invoice,
422
- "download-service": () => __props.invoiceDownloadService(__props.invoice.id),
423
- "show-download-button": __props.configuration.enableDownloadButton,
424
- variant: "external"
425
- }, null, 8, ["payment-attempts", "invoice", "download-service", "show-download-button"]),
422
+ payments: __props.payments,
423
+ "invoice-download-service": __props.invoiceDownloadService,
424
+ "is-loading": __props.isLoading,
425
+ configuration: __props.configuration
426
+ }, null, 8, ["invoice", "payments", "invoice-download-service", "is-loading", "configuration"]),
426
427
  createElementVNode("div", _hoisted_2, [
427
428
  __props.invoice ? (openBlock(), createBlock(_sfc_main$2, {
428
429
  key: 0,
@@ -515,7 +516,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
515
516
  invoice,
516
517
  "invoice-download-service": invoiceDownloadService,
517
518
  payments: payments.payments.value,
518
- configuration: __props.configuration
519
+ configuration: resolvedProps.value.configuration
519
520
  }, null, 8, ["is-loading", "invoice", "invoice-download-service", "payments", "configuration"])) : createCommentVNode("", true)
520
521
  ]),
521
522
  _: 1
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js"),t=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("../../useInvoiceData-lIMEwwMy.js"),i=require("../../component-BOqPDAVk.js"),r=e.defineComponent({__name:"InvoiceDetails",props:{invoice:{type:Object},isLoading:{type:Boolean},configuration:{type:Object}},setup:n=>(i,r)=>n.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"sv-invoice-details sv-root sv-component sv-loading min-h-[100px]","data-testid":"invoice-details-skeleton"})):(e.openBlock(),e.createBlock(o._sfc_main,{key:1,class:"sv-invoice-details sv-root sv-component",invoice:n.invoice},null,8,["invoice"]))}),a=e.defineComponent({__name:"InvoiceDetails.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){const t=o,i=n.useInvoiceData(t.configuration.invoiceId);return(o,t)=>{var n;return e.renderSlot(o.$slots,"default",{invoice:null==(n=e.unref(i).data.value)?void 0:n.invoice,isLoading:e.unref(i).isPending.value})}}}),l=e.defineComponent({__name:"InvoiceDetails.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){var t;if(!(null==(t=o.configuration)?void 0:t.invoiceId))throw new Error("Missing invoice id");return(t,n)=>{var l,s,p,v;return e.openBlock(),e.createBlock(e.unref(i._sfc_main),{"custom-element-name":e.unref(c),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(l=o.branding)?void 0:l.colors)?void 0:s.primary,"secondary-color":null==(v=null==(p=o.branding)?void 0:p.colors)?void 0:v.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:n[0]||(n[0]=e=>t.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(({invoice:t,isLoading:n})=>[t?(e.openBlock(),e.createBlock(r,{key:0,"is-loading":n,invoice:t,configuration:o.configuration},null,8,["is-loading","invoice","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),s=i.defineCustomElement(l),c=i.getComponentName("invoice-details");exports.COMPONENT_NAME=c,exports.SolvimonInvoiceDetails=s,exports.defineSolvimonInvoiceDetails=()=>{customElements.get(c)||customElements.define(c,s)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js"),t=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("../../useInvoiceData-BajCyf-x.js"),i=require("../../component-B53Df2Rt.js"),r=e.defineComponent({__name:"InvoiceDetails",props:{invoice:{type:Object},isLoading:{type:Boolean},configuration:{type:Object}},setup:n=>(i,r)=>n.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"sv-invoice-details sv-root sv-component sv-loading min-h-[100px]","data-testid":"invoice-details-skeleton"})):(e.openBlock(),e.createBlock(o._sfc_main,{key:1,class:"sv-invoice-details sv-root sv-component",invoice:n.invoice},null,8,["invoice"]))}),a=e.defineComponent({__name:"InvoiceDetails.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){const t=o,i=n.useInvoiceData(t.configuration.invoiceId);return(o,t)=>{var n;return e.renderSlot(o.$slots,"default",{invoice:null==(n=e.unref(i).data.value)?void 0:n.invoice,isLoading:e.unref(i).isPending.value})}}}),l=e.defineComponent({__name:"InvoiceDetails.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){var t;if(!(null==(t=o.configuration)?void 0:t.invoiceId))throw new Error("Missing invoice id");return(t,n)=>{var l,s,p,v;return e.openBlock(),e.createBlock(e.unref(i._sfc_main),{"custom-element-name":e.unref(c),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(l=o.branding)?void 0:l.colors)?void 0:s.primary,"secondary-color":null==(v=null==(p=o.branding)?void 0:p.colors)?void 0:v.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:n[0]||(n[0]=e=>t.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(({invoice:t,isLoading:n})=>[t?(e.openBlock(),e.createBlock(r,{key:0,"is-loading":n,invoice:t,configuration:o.configuration},null,8,["is-loading","invoice","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),s=i.defineCustomElement(l),c=i.getComponentName("invoice-details");exports.COMPONENT_NAME=c,exports.SolvimonInvoiceDetails=s,exports.defineSolvimonInvoiceDetails=()=>{customElements.get(c)||customElements.define(c,s)};
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, openBlock, createBlock, renderSlot, unref, withCtx, createVNode, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
2
- import { _ as _sfc_main$4 } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs";
2
+ import { _ as _sfc_main$4 } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs";
3
3
  import { _ as _sfc_main$3 } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
4
- import { u as useInvoiceData } from "../../useInvoiceData-D7YN2SAd.mjs";
5
- import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
4
+ import { u as useInvoiceData } from "../../useInvoiceData-BgtUKbHY.mjs";
5
+ import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-BSnccqm1.mjs";
6
6
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7
7
  __name: "InvoiceDetails",
8
8
  props: {
@@ -0,0 +1,3 @@
1
+ export declare const SolvimonInvoiceHeader: import('../../../../node_modules/vue/dist/vue.d.ts').VueElementConstructor<unknown>;
2
+ export declare const COMPONENT_NAME: string;
3
+ export declare const defineSolvimonInvoiceHeader: () => void;
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../useLoadInitialData-BObRB7Vo.js"),n=require("../../usePayments-DwiGafZj.js"),t=require("../../InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js"),r=require("../../component-B53Df2Rt.js"),i=e.defineComponent({__name:"InvoiceHeader.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const r=t,i=n.useInvoice({invoiceId:r.configuration.invoiceId}),a=n.usePayments(),{isLoading:l}=o.useLoadInitialData(i.get(),a.get(r.configuration.invoiceId));return(o,n)=>e.renderSlot(o.$slots,"default",{invoice:e.unref(i).invoice.value,invoiceDownloadService:e.unref(i).downloadInvoicePdf,payments:e.unref(a),isLoading:e.unref(l)})}}),a=e.defineComponent({__name:"InvoiceHeader.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){var n;const a=r.getComponentName("invoice-header"),l=o;if(!(null==(n=l.configuration)?void 0:n.invoiceId))throw new Error("Missing invoice id");const c=e.computed(()=>({...l,configuration:{enableDownloadButton:!0,...l.configuration}}));return(n,l)=>{var s,p,d,u;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(a),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(s=o.branding)?void 0:s.colors)?void 0:p.primary,"secondary-color":null==(u=null==(d=o.branding)?void 0:d.colors)?void 0:u.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:l[0]||(l[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(c.value)),{default:e.withCtx(({invoice:o,payments:n,isLoading:r,invoiceDownloadService:i})=>[o?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,"is-loading":r,invoice:o,"invoice-download-service":i,payments:n.payments.value,configuration:c.value.configuration},null,8,["is-loading","invoice","invoice-download-service","payments","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),l=r.defineCustomElement(a),c=r.getComponentName("invoice-header");exports.COMPONENT_NAME=c,exports.SolvimonInvoiceHeader=l,exports.defineSolvimonInvoiceHeader=()=>{customElements.get(c)||customElements.define(c,l)};
@@ -0,0 +1,123 @@
1
+ import { defineComponent, renderSlot, unref, computed, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
2
+ import { u as useLoadInitialData } from "../../useLoadInitialData-IlbmC6p0.mjs";
3
+ import { u as useInvoice, a as usePayments } from "../../usePayments-E_Jsqo98.mjs";
4
+ import { _ as _sfc_main$3 } from "../../InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs";
5
+ import { _ as _sfc_main$2, g as getComponentName, d as defineCustomElement } from "../../component-BSnccqm1.mjs";
6
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7
+ __name: "InvoiceHeader.entry.view",
8
+ props: {
9
+ environment: { type: String },
10
+ locale: { type: String },
11
+ dateLocale: { type: String },
12
+ messages: { type: Object },
13
+ primaryColor: { type: String },
14
+ secondaryColor: { type: String },
15
+ isShadowRoot: { type: Boolean },
16
+ experimentalFeatures: { type: Array },
17
+ logLevel: { type: String },
18
+ onLog: { type: Function },
19
+ allowedPortalTypes: { type: Array },
20
+ portalObject: { type: Object },
21
+ cssOverrides: { type: [String, Array] },
22
+ branding: { type: Object },
23
+ configuration: { type: Object }
24
+ },
25
+ setup(__props) {
26
+ const props = __props;
27
+ const invoice = useInvoice({ invoiceId: props.configuration.invoiceId });
28
+ const payments = usePayments();
29
+ const { isLoading } = useLoadInitialData(
30
+ invoice.get(),
31
+ payments.get(props.configuration.invoiceId)
32
+ );
33
+ return (_ctx, _cache) => {
34
+ return renderSlot(_ctx.$slots, "default", {
35
+ invoice: unref(invoice).invoice.value,
36
+ invoiceDownloadService: unref(invoice).downloadInvoicePdf,
37
+ payments: unref(payments),
38
+ isLoading: unref(isLoading)
39
+ });
40
+ };
41
+ }
42
+ });
43
+ const _sfc_main = /* @__PURE__ */ defineComponent({
44
+ __name: "InvoiceHeader.entry",
45
+ props: {
46
+ environment: { type: String },
47
+ locale: { type: String },
48
+ dateLocale: { type: String },
49
+ messages: { type: Object },
50
+ primaryColor: { type: String },
51
+ secondaryColor: { type: String },
52
+ isShadowRoot: { type: Boolean },
53
+ experimentalFeatures: { type: Array },
54
+ logLevel: { type: String },
55
+ onLog: { type: Function },
56
+ allowedPortalTypes: { type: Array },
57
+ portalObject: { type: Object },
58
+ cssOverrides: { type: [String, Array] },
59
+ branding: { type: Object },
60
+ configuration: { type: Object }
61
+ },
62
+ setup(__props) {
63
+ var _a;
64
+ const COMPONENT_NAME2 = getComponentName("invoice-header");
65
+ const props = __props;
66
+ if (!((_a = props.configuration) == null ? void 0 : _a.invoiceId)) {
67
+ throw new Error("Missing invoice id");
68
+ }
69
+ const resolvedProps = computed(() => ({
70
+ ...props,
71
+ configuration: {
72
+ enableDownloadButton: true,
73
+ ...props.configuration
74
+ }
75
+ }));
76
+ return (_ctx, _cache) => {
77
+ var _a2, _b, _c, _d;
78
+ return openBlock(), createBlock(unref(_sfc_main$2), {
79
+ "custom-element-name": unref(COMPONENT_NAME2),
80
+ environment: __props.environment,
81
+ locale: __props.locale,
82
+ "portal-object": __props.portalObject,
83
+ "allowed-portal-types": ["CUSTOMER"],
84
+ "primary-color": (_b = (_a2 = __props.branding) == null ? void 0 : _a2.colors) == null ? void 0 : _b.primary,
85
+ "secondary-color": (_d = (_c = __props.branding) == null ? void 0 : _c.colors) == null ? void 0 : _d.secondary,
86
+ "experimental-features": __props.experimentalFeatures,
87
+ "log-level": __props.logLevel,
88
+ "on-log": __props.onLog,
89
+ "css-overrides": __props.cssOverrides,
90
+ onError: _cache[0] || (_cache[0] = (error) => _ctx.$emit("error", error))
91
+ }, {
92
+ default: withCtx(() => [
93
+ createVNode(_sfc_main$1, normalizeProps(guardReactiveProps(resolvedProps.value)), {
94
+ default: withCtx(({ invoice, payments, isLoading, invoiceDownloadService }) => [
95
+ invoice ? (openBlock(), createBlock(_sfc_main$3, {
96
+ key: 0,
97
+ "is-loading": isLoading,
98
+ invoice,
99
+ "invoice-download-service": invoiceDownloadService,
100
+ payments: payments.payments.value,
101
+ configuration: resolvedProps.value.configuration
102
+ }, null, 8, ["is-loading", "invoice", "invoice-download-service", "payments", "configuration"])) : createCommentVNode("", true)
103
+ ]),
104
+ _: 1
105
+ }, 16)
106
+ ]),
107
+ _: 1
108
+ }, 8, ["custom-element-name", "environment", "locale", "portal-object", "primary-color", "secondary-color", "experimental-features", "log-level", "on-log", "css-overrides"]);
109
+ };
110
+ }
111
+ });
112
+ const SolvimonInvoiceHeader = defineCustomElement(_sfc_main);
113
+ const COMPONENT_NAME = getComponentName("invoice-header");
114
+ const defineSolvimonInvoiceHeader = () => {
115
+ if (!customElements.get(COMPONENT_NAME)) {
116
+ customElements.define(COMPONENT_NAME, SolvimonInvoiceHeader);
117
+ }
118
+ };
119
+ export {
120
+ COMPONENT_NAME,
121
+ SolvimonInvoiceHeader,
122
+ defineSolvimonInvoiceHeader
123
+ };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../useInvoicesList-CaBCGs4h.js"),t=require("../../useLoadInitialData-DjwRHcAH.js"),r=require("../../component-BOqPDAVk.js"),n=e.defineComponent({__name:"InvoicesList.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(r){var n,i;const a=r,s=a.portalObject.customer_id,l=o.useInvoicesList({customerId:s,batchSize:(null==(i=null==(n=a.configuration)?void 0:n.pagination)?void 0:i.batchSize)||15}),{isLoading:c}=t.useLoadInitialData(l.fetchInitial());return(o,t)=>e.renderSlot(o.$slots,"default",{isLoading:e.unref(c),invoices:e.unref(l)})}}),i=e.defineComponent({__name:"InvoicesList.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:t=>(i,a)=>{var l,c,p,y;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(s),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(l=t.branding)?void 0:l.colors)?void 0:c.primary,"secondary-color":null==(y=null==(p=t.branding)?void 0:p.colors)?void 0:y.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:a[0]||(a[0]=e=>i.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(n,e.normalizeProps(e.guardReactiveProps(i.$props)),{default:e.withCtx(({invoices:r,isLoading:n})=>[e.createVNode(o._sfc_main,{configuration:t.configuration,invoices:r.items.value,"is-loading":n,"has-more-items":r.hasNextBatch.value,onLoadMore:r.fetchMore},null,8,["configuration","invoices","is-loading","has-more-items","onLoadMore"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),a=r.defineCustomElement(i),s=r.getComponentName("invoices-list");exports.COMPONENT_NAME=s,exports.SolvimonInvoicesList=a,exports.defineSolvimonInvoicesList=()=>{customElements.get(s)||customElements.define(s,a)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../useInvoicesList-wnvjyB_H.js"),t=require("../../useLoadInitialData-BObRB7Vo.js"),r=require("../../component-B53Df2Rt.js"),n=e.defineComponent({__name:"InvoicesList.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(r){var n,i;const a=r,s=a.portalObject.customer_id,l=o.useInvoicesList({customerId:s,batchSize:(null==(i=null==(n=a.configuration)?void 0:n.pagination)?void 0:i.batchSize)||15}),{isLoading:c}=t.useLoadInitialData(l.fetchInitial());return(o,t)=>e.renderSlot(o.$slots,"default",{isLoading:e.unref(c),invoices:e.unref(l)})}}),i=e.defineComponent({__name:"InvoicesList.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:t=>(i,a)=>{var l,c,p,y;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(s),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(l=t.branding)?void 0:l.colors)?void 0:c.primary,"secondary-color":null==(y=null==(p=t.branding)?void 0:p.colors)?void 0:y.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:a[0]||(a[0]=e=>i.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(n,e.normalizeProps(e.guardReactiveProps(i.$props)),{default:e.withCtx(({invoices:r,isLoading:n})=>[e.createVNode(o._sfc_main,{configuration:t.configuration,invoices:r.items.value,"is-loading":n,"has-more-items":r.hasNextBatch.value,onLoadMore:r.fetchMore},null,8,["configuration","invoices","is-loading","has-more-items","onLoadMore"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),a=r.defineCustomElement(i),s=r.getComponentName("invoices-list");exports.COMPONENT_NAME=s,exports.SolvimonInvoicesList=a,exports.defineSolvimonInvoicesList=()=>{customElements.get(s)||customElements.define(s,a)};
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, renderSlot, unref, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps } from "vue";
2
- import { u as useInvoicesList, _ as _sfc_main$3 } from "../../useInvoicesList-CFzAxyae.mjs";
3
- import { u as useLoadInitialData } from "../../useLoadInitialData-5sgImpzc.mjs";
4
- import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
2
+ import { u as useInvoicesList, _ as _sfc_main$3 } from "../../useInvoicesList-DRD5yix0.mjs";
3
+ import { u as useLoadInitialData } from "../../useLoadInitialData-IlbmC6p0.mjs";
4
+ import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-BSnccqm1.mjs";
5
5
  const DEFAULT_BATCH_SIZE = 15;
6
6
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7
7
  __name: "InvoicesList.entry.view",
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js"),o=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("../../useInvoiceData-lIMEwwMy.js"),r=require("../../component-BOqPDAVk.js"),a=e.defineComponent({__name:"PaymentHistory",props:{customer:{type:Object},paymentAttempts:{type:Array},isLoading:{type:Boolean},configuration:{type:Object}},setup:n=>(r,a)=>n.isLoading?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,variant:"section",class:"sv-payment-history sv-root sv-component sv-loading min-h-[100px]","data-testid":"payment-history-skeleton"})):n.paymentAttempts.length?(e.openBlock(),e.createBlock(t._sfc_main,{key:1,class:"sv-payment-history sv-root sv-component","payment-attempts":n.paymentAttempts,customer:n.customer},null,8,["payment-attempts","customer"])):e.createCommentVNode("",!0)}),i=e.defineComponent({__name:"PaymentHistory.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const o=t,r=n.useInvoiceData(o.configuration.invoiceId);return(t,o)=>{var n,a;return e.renderSlot(t.$slots,"default",{invoice:null==(n=e.unref(r).data.value)?void 0:n.invoice,paymentAttempts:null==(a=e.unref(r).data.value)?void 0:a.paymentAttempts.data,isLoading:e.unref(r).isPending.value})}}}),s=e.defineComponent({__name:"PaymentHistory.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){var o;if(!(null==(o=t.configuration)?void 0:o.invoiceId))throw new Error("Missing invoice id");return(o,n)=>{var s,l,c,y;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(p),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(s=t.branding)?void 0:s.colors)?void 0:l.primary,"secondary-color":null==(y=null==(c=t.branding)?void 0:c.colors)?void 0:y.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:n[0]||(n[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(o.$props)),{default:e.withCtx(({invoice:o,paymentAttempts:n,isLoading:r})=>[o&&n?(e.openBlock(),e.createBlock(a,{key:0,"is-loading":r,customer:o.customer,"payment-attempts":n,configuration:t.configuration},null,8,["is-loading","customer","payment-attempts","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),l=r.defineCustomElement(s),p=r.getComponentName("payment-history");exports.COMPONENT_NAME=p,exports.SolvimonPaymentHistory=l,exports.defineSolvimonPaymentHistory=()=>{customElements.get(p)||customElements.define(p,l)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js"),o=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("../../useInvoiceData-BajCyf-x.js"),r=require("../../component-B53Df2Rt.js"),a=e.defineComponent({__name:"PaymentHistory",props:{customer:{type:Object},paymentAttempts:{type:Array},isLoading:{type:Boolean},configuration:{type:Object}},setup:n=>(r,a)=>n.isLoading?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,variant:"section",class:"sv-payment-history sv-root sv-component sv-loading min-h-[100px]","data-testid":"payment-history-skeleton"})):n.paymentAttempts.length?(e.openBlock(),e.createBlock(t._sfc_main,{key:1,class:"sv-payment-history sv-root sv-component","payment-attempts":n.paymentAttempts,customer:n.customer},null,8,["payment-attempts","customer"])):e.createCommentVNode("",!0)}),i=e.defineComponent({__name:"PaymentHistory.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const o=t,r=n.useInvoiceData(o.configuration.invoiceId);return(t,o)=>{var n,a;return e.renderSlot(t.$slots,"default",{invoice:null==(n=e.unref(r).data.value)?void 0:n.invoice,paymentAttempts:null==(a=e.unref(r).data.value)?void 0:a.paymentAttempts.data,isLoading:e.unref(r).isPending.value})}}}),s=e.defineComponent({__name:"PaymentHistory.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){var o;if(!(null==(o=t.configuration)?void 0:o.invoiceId))throw new Error("Missing invoice id");return(o,n)=>{var s,l,c,y;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(p),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(s=t.branding)?void 0:s.colors)?void 0:l.primary,"secondary-color":null==(y=null==(c=t.branding)?void 0:c.colors)?void 0:y.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:n[0]||(n[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(o.$props)),{default:e.withCtx(({invoice:o,paymentAttempts:n,isLoading:r})=>[o&&n?(e.openBlock(),e.createBlock(a,{key:0,"is-loading":r,customer:o.customer,"payment-attempts":n,configuration:t.configuration},null,8,["is-loading","customer","payment-attempts","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),l=r.defineCustomElement(s),p=r.getComponentName("payment-history");exports.COMPONENT_NAME=p,exports.SolvimonPaymentHistory=l,exports.defineSolvimonPaymentHistory=()=>{customElements.get(p)||customElements.define(p,l)};
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, openBlock, createBlock, createCommentVNode, renderSlot, unref, withCtx, createVNode, normalizeProps, guardReactiveProps } from "vue";
2
- import { _ as _sfc_main$4 } from "../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs";
2
+ import { _ as _sfc_main$4 } from "../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs";
3
3
  import { _ as _sfc_main$3 } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
4
- import { u as useInvoiceData } from "../../useInvoiceData-D7YN2SAd.mjs";
5
- import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-Djrf1L-Z.mjs";
4
+ import { u as useInvoiceData } from "../../useInvoiceData-BgtUKbHY.mjs";
5
+ import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-BSnccqm1.mjs";
6
6
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7
7
  __name: "PaymentHistory",
8
8
  props: {
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-BOqPDAVk.js"),o=require("../../vendor-ui-5pJF5KBP.js"),n=require("../../useLoadInitialData-DjwRHcAH.js"),r=require("../../useCustomer-CUcaeQn_.js"),a=require("../../usePaymentMethodOptions-DYO6xr3-.js"),i=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),s=require("../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CiyyUp4z.js"),l=e.defineComponent({__name:"PaymentMethodForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(t){const i=t,s=r.useCustomer({customerId:i.portalObject.customer_id}),l=a.usePaymentMethodOptions(),{isLoading:c}=n.useLoadInitialData((async()=>{var e;const t=await s.get.execute(),n=o.getCustomerCountry(t);await l.get({customerId:t.id,country:n,amount:null==(e=i.configuration)?void 0:e.amount})})());return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(s).customer.value,paymentMethodOptions:e.unref(l),isLoading:e.unref(c)})}}),c=e.defineComponent({__name:"PaymentMethodForm",props:{customer:{type:Object},paymentMethodOptions:{type:Array},configuration:{type:Object},isLoading:{type:Boolean,default:!1},countryCode:{type:String}},setup(t){const n={currency:"EUR",quantity:"0"},r=t,{$t:a}=o.useIntl(),l=e.computed(()=>{return"AUTHORIZE"===(null==(e=r.configuration)?void 0:e.variant)?e:{...e,variant:"TOKENIZE"};var e}),c=e.computed(()=>{let e="NL";if(r.countryCode)return e=r.countryCode,e;if(r.customer){const t=o.getCustomerCountry(r.customer);if(t)return e=t,e}return"NL"}),u=e.computed(()=>"AUTHORIZE"===l.value.variant?{paymentMethodOptions:r.paymentMethodOptions,countryCode:c.value,variant:"AUTHORIZE",amount:l.value.amount,context:l.value.context,invoiceId:l.value.invoiceId,successRedirectUrl:l.value.successRedirectUrl,selectedOption:l.value.selectedOption,validateOnSubmit:l.value.validateOnSubmit,forceStorePaymentMethod:l.value.forceStorePaymentMethod}:{paymentMethodOptions:r.paymentMethodOptions,customerId:r.customer.id,countryCode:c.value,variant:"TOKENIZE",amount:l.value.amount??n,invoiceId:l.value.invoiceId,successRedirectUrl:l.value.successRedirectUrl,selectedOption:l.value.selectedOption,validateOnSubmit:l.value.validateOnSubmit,forceStorePaymentMethod:l.value.forceStorePaymentMethod});return(n,r)=>t.isLoading?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,variant:"section",class:"sv-payment-method-form sv-root sv-component sv-loading min-h-[180px]","data-testid":"payment-method-form-skeleton"})):(e.openBlock(),e.createBlock(e.unref(o._sfc_main$1),{key:1,class:"sv-payment-method-form sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:e.unref(a)({defaultMessage:"Available payment methods",description:"Title of the available payment methods form",id:"components.payment_method_form.section_title"})},{default:e.withCtx(()=>[e.createVNode(s._sfc_main,e.mergeProps({class:"sv-payment-method-form__integration"},u.value),null,16)]),_:1},8,["title"]))}}),u=e.defineComponent({__name:"PaymentMethodForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(o){const n=o;return(r,a)=>{var i,s,u,m;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(p),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(i=o.branding)?void 0:i.colors)?void 0:s.primary,"secondary-color":null==(m=null==(u=o.branding)?void 0:u.colors)?void 0:m.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:a[0]||(a[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(l,e.normalizeProps(e.guardReactiveProps(n)),{default:e.withCtx(({customer:t,paymentMethodOptions:n,isLoading:r})=>[t?(e.openBlock(),e.createBlock(c,{key:0,customer:t,"payment-method-options":n.paymentMethodOptions.value,configuration:o.configuration,"is-loading":r},null,8,["customer","payment-method-options","configuration","is-loading"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),m=t.defineCustomElement(u),p=t.getComponentName("payment-method-form");exports.COMPONENT_NAME=p,exports.SolvimonPaymentMethodForm=m,exports.defineSolvimonPaymentMethodForm=()=>{customElements.get(p)||customElements.define(p,m)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-B53Df2Rt.js"),o=require("../../vendor-ui-C3Tq-qY_.js"),r=require("../../useLoadInitialData-BObRB7Vo.js"),n=require("../../useCustomer-DYc54GVD.js"),a=require("../../usePaymentMethodOptions-CzqsebhN.js"),i=require("../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-DfdaWRO0.js"),s=e.defineComponent({__name:"PaymentMethodForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(t){const i=t,s=n.useCustomer({customerId:i.portalObject.customer_id}),l=a.usePaymentMethodOptions(),{isLoading:p}=r.useLoadInitialData((async()=>{var e;const t=await s.get.execute(),r=o.getCustomerCountry(t);await l.get({customerId:t.id,country:r,amount:null==(e=i.configuration)?void 0:e.amount})})());return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(s).customer.value,paymentMethodOptions:e.unref(l),isLoading:e.unref(p)})}}),l=e.defineComponent({__name:"PaymentMethodForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(o){const r=o;return(n,a)=>{var l,p,m,u;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(c),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(l=o.branding)?void 0:l.colors)?void 0:p.primary,"secondary-color":null==(u=null==(m=o.branding)?void 0:m.colors)?void 0:u.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:a[0]||(a[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(s,e.normalizeProps(e.guardReactiveProps(r)),{default:e.withCtx(({customer:t,paymentMethodOptions:r,isLoading:n})=>[t?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,customer:t,"payment-method-options":r.paymentMethodOptions.value,configuration:o.configuration,"is-loading":n},null,8,["customer","payment-method-options","configuration","is-loading"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),p=t.defineCustomElement(l),c=t.getComponentName("payment-method-form");exports.COMPONENT_NAME=c,exports.SolvimonPaymentMethodForm=p,exports.defineSolvimonPaymentMethodForm=()=>{customElements.get(c)||customElements.define(c,p)};