@solvimon/solvimon-web 0.1.0-alpha.4 → 0.1.0-alpha.5

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 (75) hide show
  1. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-LQgNMjOT.js → BillingInformation.vue_vue_type_script_setup_true_lang-BouYyZhD.js} +1 -1
  2. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-_GGUwxEJ.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CvUwy_tp.mjs} +2 -2
  3. package/dist/{ContentWithAsideLayout-BQpDxDXI.js → ContentWithAsideLayout-BjJufFeN.js} +1 -1
  4. package/dist/{ContentWithAsideLayout-BJ0Ccghd.mjs → ContentWithAsideLayout-CKbnuXMU.mjs} +1 -1
  5. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DxoeHBT0.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DaEPSNrY.mjs} +1 -1
  6. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BgcSUvE1.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-sbmK2un9.js} +1 -1
  7. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CCJ-J0t4.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CLU-8-Ao.mjs} +1 -1
  8. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BKlI9Y8m.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-NRmK7iN3.js} +1 -1
  9. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Dhoaaymm.js → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Ck_1lRDB.js} +1 -1
  10. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D_JmUGZS.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DFCX2tcj.mjs} +3 -3
  11. package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-DCfpg7nK.js → PricingGroupContent.vue_vue_type_script_setup_true_lang-BOZurit_.js} +1 -1
  12. package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-wxetfLSR.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-DAwMy1l8.mjs} +1 -1
  13. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DcunVa40.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-Cj4cnM8z.mjs} +4 -4
  14. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-C6AOtXAD.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-D49i1DHa.js} +1 -1
  15. package/dist/{component-BhrlC5ZJ.mjs → component-B0RYS5uK.mjs} +1 -1
  16. package/dist/{component-B5y7wYnP.js → component-BeqkeC9h.js} +1 -1
  17. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  18. package/dist/components/BillingInformation/BillingInformation.es.js +3 -3
  19. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  20. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +2 -2
  21. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  22. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +3 -3
  23. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  24. package/dist/components/Invoice/Invoice.es.js +5 -5
  25. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  26. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
  27. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  28. package/dist/components/InvoicesList/InvoicesList.es.js +2 -2
  29. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  30. package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
  31. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  32. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +4 -4
  33. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  34. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +2 -2
  35. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  36. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -4
  37. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  38. package/dist/components/WalletBalances/WalletBalances.es.js +2 -2
  39. package/dist/core/index.cjs.js +1 -1
  40. package/dist/core/index.es.js +1 -1
  41. package/dist/index.cjs.js +1 -1
  42. package/dist/index.es.js +1 -1
  43. package/dist/{invoices-BYnoNgSR.js → invoices-CUrXmVXe.js} +1 -1
  44. package/dist/{invoices-C8nfTLon.mjs → invoices-CoEBP5UT.mjs} +1 -1
  45. package/dist/{paymentMethods-BJVTwjzp.mjs → paymentMethods-C2gWIbEr.mjs} +1 -1
  46. package/dist/{paymentMethods-CwzFgccc.js → paymentMethods-D_rYLg3F.js} +1 -1
  47. package/dist/{payments-Da5LVn5H.js → payments-ClJySb0d.js} +1 -1
  48. package/dist/{payments-AWzaFsBd.mjs → payments-DLjkq_hN.mjs} +1 -1
  49. package/dist/{registry-DN-NWLUK.js → registry-EPF-VAYZ.js} +1 -1
  50. package/dist/{registry-Dll2lIBv.mjs → registry-bo_7pcbl.mjs} +2 -2
  51. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  52. package/dist/screens/Checkout/Checkout.es.js +8 -8
  53. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  54. package/dist/screens/CustomerOverview/CustomerOverview.es.js +9 -9
  55. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  56. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +5 -5
  57. package/dist/{subscriptions-CMBt--lb.mjs → subscriptions-BepBTXR5.mjs} +1 -1
  58. package/dist/{subscriptions-0_i6paaS.js → subscriptions-DERHtyHo.js} +1 -1
  59. package/dist/{useActionDispatchProvider-J1S-vXqg.mjs → useActionDispatchProvider-B_SkyymZ.mjs} +1 -1
  60. package/dist/{useActionDispatchProvider-C-uVJcgJ.js → useActionDispatchProvider-D4OtXsNA.js} +1 -1
  61. package/dist/{useCustomer-DZKD_AMw.mjs → useCustomer-C0RKKfGJ.mjs} +1 -1
  62. package/dist/{useCustomer-ClGwkeNn.js → useCustomer-CEFUPIDZ.js} +1 -1
  63. package/dist/{useCustomerPaymentMethodOptions-D_5UvLze.js → useCustomerPaymentMethodOptions-BgCFkLeQ.js} +1 -1
  64. package/dist/{useCustomerPaymentMethodOptions-CbnzYwYp.mjs → useCustomerPaymentMethodOptions-BlFH4zxG.mjs} +3 -3
  65. package/dist/{useIncrementalLoading-DbQxYZ1J.mjs → useIncrementalLoading-BqD4k_-r.mjs} +1 -1
  66. package/dist/{useIncrementalLoading-DrgYXlRK.js → useIncrementalLoading-CDpeHhKs.js} +1 -1
  67. package/dist/{useInvoiceData-ca_-ah5G.mjs → useInvoiceData-7mqBeSPa.mjs} +2 -2
  68. package/dist/{useInvoiceData-BtxiSooD.js → useInvoiceData-DvNf2402.js} +1 -1
  69. package/dist/{useInvoicesList-CbzCTBaM.mjs → useInvoicesList-B5vYDRyl.mjs} +4 -4
  70. package/dist/{useInvoicesList-BMeLWF8r.js → useInvoicesList-CBqZG_rw.js} +1 -1
  71. package/dist/{usePaymentMethods-CuhSSaz4.mjs → usePaymentMethods-4Io2ZHlo.mjs} +2 -2
  72. package/dist/{usePaymentMethods-CaE9qm2M.js → usePaymentMethods-BdZkt6re.js} +1 -1
  73. package/dist/{useWalletBalanceItems-Cjis6nYZ.mjs → useWalletBalanceItems-B0NZuM3W.mjs} +1 -1
  74. package/dist/{useWalletBalanceItems-B-6IRohi.js → useWalletBalanceItems-CzV3PcJH.js} +1 -1
  75. package/package.json +1 -1
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-LQgNMjOT.js"),t=require("../../useCustomer-ClGwkeNn.js"),n=require("../../component-B5y7wYnP.js"),r=e.defineComponent({__name:"BillingInformation.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(o){const n=o.portalObject.customer_id,r=t.useCustomer({customerId:n});return(o,t)=>e.renderSlot(o.$slots,"default",{customer:e.unref(r)})}}),l=e.defineComponent({__name:"BillingInformation.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:t=>(l,i)=>{var p,s,m,c;return e.openBlock(),e.createBlock(e.unref(n._sfc_main$1),{"custom-element-name":e.unref(a),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(p=t.branding)?void 0:p.colors)?void 0:s.primary,"secondary-color":null==(c=null==(m=t.branding)?void 0:m.colors)?void 0:c.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:i[0]||(i[0]=e=>l.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(r,e.normalizeProps(e.guardReactiveProps(l.$props)),{default:e.withCtx(({customer:t})=>[t.customer.value?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,"is-loading":t.get.isPending.value,customer:t.customer.value},null,8,["is-loading","customer"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),i=n.defineCustomElement(l),a=n.getComponentName("billing-information");exports.COMPONENT_NAME=a,exports.SolvimonBillingInformation=i,exports.defineSolvimonBillingInformation=()=>{customElements.get(a)||customElements.define(a,i)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-BouYyZhD.js"),t=require("../../useCustomer-CEFUPIDZ.js"),n=require("../../component-BeqkeC9h.js"),r=e.defineComponent({__name:"BillingInformation.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(o){const n=o.portalObject.customer_id,r=t.useCustomer({customerId:n});return(o,t)=>e.renderSlot(o.$slots,"default",{customer:e.unref(r)})}}),l=e.defineComponent({__name:"BillingInformation.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:t=>(l,i)=>{var p,s,m,c;return e.openBlock(),e.createBlock(e.unref(n._sfc_main$1),{"custom-element-name":e.unref(a),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(p=t.branding)?void 0:p.colors)?void 0:s.primary,"secondary-color":null==(c=null==(m=t.branding)?void 0:m.colors)?void 0:c.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:i[0]||(i[0]=e=>l.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(r,e.normalizeProps(e.guardReactiveProps(l.$props)),{default:e.withCtx(({customer:t})=>[t.customer.value?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,"is-loading":t.get.isPending.value,customer:t.customer.value},null,8,["is-loading","customer"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),i=n.defineCustomElement(l),a=n.getComponentName("billing-information");exports.COMPONENT_NAME=a,exports.SolvimonBillingInformation=i,exports.defineSolvimonBillingInformation=()=>{customElements.get(a)||customElements.define(a,i)};
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, renderSlot, unref, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
2
- import { _ as _sfc_main$3 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-_GGUwxEJ.mjs";
3
- import { u as useCustomer } from "../../useCustomer-DZKD_AMw.mjs";
4
- import { p as _sfc_main$2, q as defineCustomElement, o as getComponentName } from "../../component-BhrlC5ZJ.mjs";
2
+ import { _ as _sfc_main$3 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-CvUwy_tp.mjs";
3
+ import { u as useCustomer } from "../../useCustomer-C0RKKfGJ.mjs";
4
+ import { p as _sfc_main$2, q as defineCustomElement, o as getComponentName } from "../../component-B0RYS5uK.mjs";
5
5
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
6
6
  __name: "BillingInformation.entry.view",
7
7
  props: {
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-B5y7wYnP.js"),a=require("../../index-DRdBmZ2-.js"),o=require("../../cloneDeep-DranHQkY.js"),r=require("../../useCustomer-ClGwkeNn.js"),l={type:"INDIVIDUAL",email:"",country:"",addressLine1:"",postalCode:"",city:"",state:""};function n({initialState:r={},onSubmit:n}){const{form:s,validation:u,changes:c,hasChanges:m,updateInitialState:p,initialState:f}=(({initialState:a,validationRules:r,nullifyEmptyValues:l=!1,mode:n="shallow"})=>{const i=e.shallowRef(o.cloneDeep(a)),d=e.shallowRef(o.cloneDeep(a)),s=t.useValidation(r??{},d),u=e.computed(()=>t.objectDiff({from:i.value,to:d.value,mode:n,nullifyEmptyValues:l})),c=e.computed(()=>Object.entries(u.value).length>0);return{form:d,validation:s,changes:u,hasChanges:c,reset:()=>{d.value=o.cloneDeep(a),s.value.$reset()},updateInitialState:e=>{d.value=o.cloneDeep(e),i.value=o.cloneDeep(e)},initialState:i}})({initialState:{...l,...r},validationRules:{email:{required:a.required,email:a.email}},nullifyEmptyValues:!0,mode:"deep"});return{form:s,isOrganization:t.isOrganization,validation:u,changes:c,hasChanges:m,updateInitialState:e=>{p(i(e))},submit:(e,t=s.value)=>n({customerId:e,payload:d(t)}),initialState:f}}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),_=e.computed(()=>"ORGANIZATION"===i.value.type),v=e.computed(()=>!y.value),b=e.computed({get:()=>_.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,E,S,I,L,T,x,B;return e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(V,["prevent"])},[e.createVNode(e.unref(t._sfc_main$2),{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$2a),{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).value.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$1$),{"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"]),v.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$20),{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$2),{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$2),{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),_.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(t._sfc_main$2a),{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$2a),{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$2),{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,[_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(e.unref(t._sfc_main$2a),{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$2a),{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==(E=a.apiError)?void 0:E.last_name},null,8,["modelValue","label","placeholder","error"])])),e.createVNode(e.unref(t._sfc_main$2a),{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==(S=a.apiError)?void 0:S.address_line_1},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{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$2a),{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$2a),{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$2a),{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==(B=a.apiError)?void 0:B._generic)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:0,class:"mt-4",title:a.apiError._generic},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$2H),{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,{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},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object}},setup(a){const o=a.portalObject.customer_id,{customer:l,get:n,update:i}=r.useCustomer({customerId:o});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)})}}),_=e.defineComponent({__name:"BillingInformationForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object}},emits:["error"],setup:a=>(o,r)=>{var l,n,i,d;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(b),environment:a.environment,locale:a.locale,"portal-object":a.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(n=null==(l=a.branding)?void 0:l.colors)?void 0:n.primary,"secondary-color":null==(d=null==(i=a.branding)?void 0:i.colors)?void 0:d.secondary,"experimental-features":a.experimentalFeatures,"log-level":a.logLevel,"on-log":a.onLog,onError:r[0]||(r[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(o.$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"])}}),v=t.defineCustomElement(_),b=t.getComponentName("billing-information-form");exports.COMPONENT_NAME=b,exports.SolvimonBillingInformationForm=v,exports.defineSolvimonBillingInformationForm=()=>{customElements.get(b)||customElements.define(b,v)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-BeqkeC9h.js"),a=require("../../index-DRdBmZ2-.js"),o=require("../../cloneDeep-DranHQkY.js"),r=require("../../useCustomer-CEFUPIDZ.js"),l={type:"INDIVIDUAL",email:"",country:"",addressLine1:"",postalCode:"",city:"",state:""};function n({initialState:r={},onSubmit:n}){const{form:s,validation:u,changes:c,hasChanges:m,updateInitialState:p,initialState:f}=(({initialState:a,validationRules:r,nullifyEmptyValues:l=!1,mode:n="shallow"})=>{const i=e.shallowRef(o.cloneDeep(a)),d=e.shallowRef(o.cloneDeep(a)),s=t.useValidation(r??{},d),u=e.computed(()=>t.objectDiff({from:i.value,to:d.value,mode:n,nullifyEmptyValues:l})),c=e.computed(()=>Object.entries(u.value).length>0);return{form:d,validation:s,changes:u,hasChanges:c,reset:()=>{d.value=o.cloneDeep(a),s.value.$reset()},updateInitialState:e=>{d.value=o.cloneDeep(e),i.value=o.cloneDeep(e)},initialState:i}})({initialState:{...l,...r},validationRules:{email:{required:a.required,email:a.email}},nullifyEmptyValues:!0,mode:"deep"});return{form:s,isOrganization:t.isOrganization,validation:u,changes:c,hasChanges:m,updateInitialState:e=>{p(i(e))},submit:(e,t=s.value)=>n({customerId:e,payload:d(t)}),initialState:f}}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),_=e.computed(()=>"ORGANIZATION"===i.value.type),v=e.computed(()=>!y.value),b=e.computed({get:()=>_.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,E,S,I,L,T,x,B;return e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(V,["prevent"])},[e.createVNode(e.unref(t._sfc_main$2),{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$2a),{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).value.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$1$),{"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"]),v.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$20),{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$2),{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$2),{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),_.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(t._sfc_main$2a),{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$2a),{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$2),{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,[_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(e.unref(t._sfc_main$2a),{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$2a),{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==(E=a.apiError)?void 0:E.last_name},null,8,["modelValue","label","placeholder","error"])])),e.createVNode(e.unref(t._sfc_main$2a),{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==(S=a.apiError)?void 0:S.address_line_1},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$2a),{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$2a),{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$2a),{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$2a),{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==(B=a.apiError)?void 0:B._generic)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:0,class:"mt-4",title:a.apiError._generic},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$2H),{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,{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},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object}},setup(a){const o=a.portalObject.customer_id,{customer:l,get:n,update:i}=r.useCustomer({customerId:o});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)})}}),_=e.defineComponent({__name:"BillingInformationForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object}},emits:["error"],setup:a=>(o,r)=>{var l,n,i,d;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(b),environment:a.environment,locale:a.locale,"portal-object":a.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(n=null==(l=a.branding)?void 0:l.colors)?void 0:n.primary,"secondary-color":null==(d=null==(i=a.branding)?void 0:i.colors)?void 0:d.secondary,"experimental-features":a.experimentalFeatures,"log-level":a.logLevel,"on-log":a.onLog,onError:r[0]||(r[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(o.$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"])}}),v=t.defineCustomElement(_),b=t.getComponentName("billing-information-form");exports.COMPONENT_NAME=b,exports.SolvimonBillingInformationForm=v,exports.defineSolvimonBillingInformationForm=()=>{customElements.get(b)||customElements.define(b,v)};
@@ -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 { G as useValidation, H as objectDiff, I as isOrganization, J as isIndividual, b as useIntl, _ as _sfc_main$2$1, K as _sfc_main$2a, L as _sfc_main$1$, M as _sfc_main$20, D as _sfc_main$16, m as _sfc_main$2H, N as getApiError, p as _sfc_main$4, q as defineCustomElement, o as getComponentName } from "../../component-BhrlC5ZJ.mjs";
2
+ import { G as useValidation, H as objectDiff, I as isOrganization, J as isIndividual, b as useIntl, _ as _sfc_main$2$1, K as _sfc_main$2a, L as _sfc_main$1$, M as _sfc_main$20, D as _sfc_main$16, m as _sfc_main$2H, N as getApiError, p as _sfc_main$4, q as defineCustomElement, o as getComponentName } from "../../component-B0RYS5uK.mjs";
3
3
  import { e as email, r as required } from "../../index-CzL1ZcGi.mjs";
4
4
  import { c as cloneDeep } from "../../cloneDeep-sm9cY-u2.mjs";
5
- import { u as useCustomer } from "../../useCustomer-DZKD_AMw.mjs";
5
+ import { u as useCustomer } from "../../useCustomer-C0RKKfGJ.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("../../useCustomerPaymentMethodOptions-D_5UvLze.js"),t=require("../../component-B5y7wYnP.js"),n=require("../../useLoadInitialData-BRg7IWqW.js"),r=require("../../usePaymentMethods-CaE9qm2M.js"),a=e.defineComponent({__name:"CustomerPaymentMethods.entry.view",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(a){var l;const i=a,m=i.portalObject.customer_id,p=r.usePaymentMethods({customerId:m,pageSize:(null==(l=i.configuration)?void 0:l.maxItems)||3}),c=o.useCustomerPaymentMethodOptions({customerId:m}),{isLoading:u}=n.useLoadInitialData(p.fetchInitial(),c.fetch());return(o,n)=>{var r,l,i,m;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(s),environment:a.environment,locale:a.locale,"portal-object":a.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(r=a.branding)?void 0:r.colors)?void 0:l.primary,"secondary-color":null==(m=null==(i=a.branding)?void 0:i.colors)?void 0:m.secondary,"experimental-features":a.experimentalFeatures,"log-level":a.logLevel,"on-log":a.onLog,onError:n[0]||(n[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{paymentMethods:e.unref(p).items.value,paymentMethodsOptions:e.unref(c).items.value,isLoading:e.unref(u)})]),_:3},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}}),l=e.defineComponent({__name:"CustomerPaymentMethods.entry",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:n=>(r,l)=>{var i,m,p,c;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(s),environment:n.environment,locale:n.locale,"portal-object":n.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(m=null==(i=n.branding)?void 0:i.colors)?void 0:m.primary,"secondary-color":null==(c=null==(p=n.branding)?void 0:p.colors)?void 0:c.secondary,"experimental-features":n.experimentalFeatures,"log-level":n.logLevel,"on-log":n.onLog,onError:l[0]||(l[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(r.$props)),{default:e.withCtx(({paymentMethods:t,paymentMethodsOptions:r,isLoading:a})=>[e.createVNode(o._sfc_main,{configuration:n.configuration,"payment-methods":t,"payment-methods-options":r,"is-loading":a},null,8,["configuration","payment-methods","payment-methods-options","is-loading"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),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("../../useCustomerPaymentMethodOptions-BgCFkLeQ.js"),t=require("../../component-BeqkeC9h.js"),n=require("../../useLoadInitialData-BRg7IWqW.js"),r=require("../../usePaymentMethods-BdZkt6re.js"),a=e.defineComponent({__name:"CustomerPaymentMethods.entry.view",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(a){var l;const i=a,m=i.portalObject.customer_id,p=r.usePaymentMethods({customerId:m,pageSize:(null==(l=i.configuration)?void 0:l.maxItems)||3}),c=o.useCustomerPaymentMethodOptions({customerId:m}),{isLoading:u}=n.useLoadInitialData(p.fetchInitial(),c.fetch());return(o,n)=>{var r,l,i,m;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(s),environment:a.environment,locale:a.locale,"portal-object":a.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(r=a.branding)?void 0:r.colors)?void 0:l.primary,"secondary-color":null==(m=null==(i=a.branding)?void 0:i.colors)?void 0:m.secondary,"experimental-features":a.experimentalFeatures,"log-level":a.logLevel,"on-log":a.onLog,onError:n[0]||(n[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{paymentMethods:e.unref(p).items.value,paymentMethodsOptions:e.unref(c).items.value,isLoading:e.unref(u)})]),_:3},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}}),l=e.defineComponent({__name:"CustomerPaymentMethods.entry",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:n=>(r,l)=>{var i,m,p,c;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(s),environment:n.environment,locale:n.locale,"portal-object":n.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(m=null==(i=n.branding)?void 0:i.colors)?void 0:m.primary,"secondary-color":null==(c=null==(p=n.branding)?void 0:p.colors)?void 0:c.secondary,"experimental-features":n.experimentalFeatures,"log-level":n.logLevel,"on-log":n.onLog,onError:l[0]||(l[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(r.$props)),{default:e.withCtx(({paymentMethods:t,paymentMethodsOptions:r,isLoading:a})=>[e.createVNode(o._sfc_main,{configuration:n.configuration,"payment-methods":t,"payment-methods-options":r,"is-loading":a},null,8,["configuration","payment-methods","payment-methods-options","is-loading"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),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 { u as useCustomerPaymentMethodOptions, _ as _sfc_main$3 } from "../../useCustomerPaymentMethodOptions-CbnzYwYp.mjs";
3
- import { p as _sfc_main$2, q as defineCustomElement, o as getComponentName } from "../../component-BhrlC5ZJ.mjs";
2
+ import { u as useCustomerPaymentMethodOptions, _ as _sfc_main$3 } from "../../useCustomerPaymentMethodOptions-BlFH4zxG.mjs";
3
+ import { p as _sfc_main$2, q as defineCustomElement, o as getComponentName } from "../../component-B0RYS5uK.mjs";
4
4
  import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
5
- import { u as usePaymentMethods } from "../../usePaymentMethods-CuhSSaz4.mjs";
5
+ import { u as usePaymentMethods } from "../../usePaymentMethods-4Io2ZHlo.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-BRg7IWqW.js"),o=require("../../invoices-BYnoNgSR.js"),n=require("../../useService-D-CUtlp3.js"),i=require("../../payments-Da5LVn5H.js"),a=require("../../component-B5y7wYnP.js"),r=require("../../index-CWSXne1Q.js"),l=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BgcSUvE1.js"),c=require("../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BKlI9Y8m.js");const s=e.defineComponent({__name:"Invoice.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(a){const r=a,l=function({invoiceId:e}){const{getInvoice:t,getInvoicePdf:i}=o.createInvoicesService(),{data:a,execute:r,apiStatus:l,error:c,isPending:s}=n.useService({service:()=>t(e)});return{invoice:a,downloadInvoicePdf:i,apiStatus:l,error:c,get:r,isPending:s}}({invoiceId:r.configuration.invoiceId}),c=function(){const{getPayments:e}=i.createPaymentsService(),{data:t,execute:o,error:a,apiStatus:r,isPending:l}=n.useService({service:e,isCollection:!0});return{payments:t,get:o,error:a,apiStatus:r,isPending:l}}(),{isLoading:s}=t.useLoadInitialData(l.get(),c.get(r.configuration.invoiceId));return(t,o)=>e.renderSlot(t.$slots,"default",{invoice:e.unref(l).invoice.value,invoiceDownloadService:e.unref(l).downloadInvoicePdf,payments:e.unref(c),isLoading:e.unref(s)})}}),d={key:0,class:"mt-8"},u={class:"flex flex-col gap-6"},p=["onClick","onKeyup"],m={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"},f={key:0},v={class:"p-0"},g={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},y=e.defineComponent({__name:"InvoiceCreditsBreakdown",props:{invoice:{type:Object}},setup(t){const o=t,{formatDate:n,$t:i,formatMessage:r,formatNumber:l}=a.useIntl(),{getIsOpen:c,toggle:s}=a.useToggleList(),y=e.computed(()=>Object.fromEntries((o.invoice.credit_types??[]).map(e=>[e.id,e]))),_=e=>r({defaultMessage:"Service period - {startAt} - {endAt}",id:"kFCxC4",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})}),w=e=>{var t;return(null==e?void 0:e.credit_type_id)?(null==(t=y.value[e.credit_type_id])?void 0:t.name)??e.credit_type_id:r({defaultMessage:"Credits",id:"K2fM1n",description:"Fallback label for wallet balance credit types when no name is available"})},b=e=>e?l(Number(e)):r({defaultMessage:"-",id:"dHb0fN",description:"Placeholder shown when a wallet balance quantity is missing"}),x=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}`,g=s.get(m)??new Set;if(g.has(v))continue;g.add(v),s.set(m,g);const y=c.get(m)??{id:`${e.period_order}-${m}`,label:m,amount:f.available,rows:[]};y.rows.push(f),c.set(m,y)}return{id:`${e.period_order}-${e.start_at}`,title:t(e),rows:[...c.values()]}}).filter(e=>e.rows.length>0))({invoice:o.invoice,getPeriodTitle:_,getCreditTypeLabel:w,formatQuantity:b}));return(t,o)=>x.value.length>0?(e.openBlock(),e.createElementBlock("section",d,[e.createElementVNode("div",u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,t=>(e.openBlock(),e.createElementBlock("section",{key:t.id},[e.createVNode(e.unref(a._sfc_main$2q),{class:"mt-4"},{default:e.withCtx(()=>[e.createVNode(e.unref(a._sfc_main$2),{tag:"h3",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(a.InvoiceTable),{class:"mt-3"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(a._sfc_main$t),{left:"",class:"text-gray-600"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Wallet balance",id:"j2d7b2",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(s)(t.id),onKeyup:[e.withKeys(o=>e.unref(s)(t.id),["enter"]),e.withKeys(o=>e.unref(s)(t.id),["space"])]},[e.createVNode(e.unref(a._sfc_main$u),{class:"p-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(a._sfc_main$4),{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",m,e.toDisplayString(t.rows.length),1)]),_:2},1024)],40,p),e.unref(c)(t.id)?(e.openBlock(),e.createElementBlock("tr",f,[e.createElementVNode("td",v,[e.createElementVNode("div",g,[e.createVNode(e.unref(a.InvoiceTable),null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(a._sfc_main$t),{left:"",class:"w-2/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Credit breakdown",id:"65I4e4",description:"Column header for wallet balance credit type details"})),1)]),_:1}),e.createVNode(e.unref(a._sfc_main$t),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Balance",id:"4UjRe6",description:"Column header for the available wallet balance amount"})),1)]),_:1}),e.createVNode(e.unref(a._sfc_main$t),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Used",id:"rUy4Lk",description:"Column header for the used wallet credit amount"})),1)]),_:1}),e.createVNode(e.unref(a._sfc_main$t),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Remaining",id:"C8F4/r",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(a._sfc_main$u),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1024),e.createVNode(e.unref(a._sfc_main$u),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.available),1)]),_:2},1024),e.createVNode(e.unref(a._sfc_main$u),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.used),1)]),_:2},1024),e.createVNode(e.unref(a._sfc_main$u),{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}=a.useIntl(),{width:n}=r.useWindowSize(),i=e.computed(()=>n.value<=768);return(n,r)=>(e.openBlock(),e.createBlock(e.unref(a._sfc_main$1g),{title:e.unref(o)({defaultMessage:"Invoice",description:"Title for the invoice block on the invoice details page",id:"sdk.invoice_details.invoice.title"}),class:"grow"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass({"p-6 pt-2":!i.value})},[i.value?(e.openBlock(),e.createBlock(e.unref(a._sfc_main$1J),{key:0,variant:"default","has-icon":"",class:"justify-center bg-gray-50 border-gray-100 text-gray-800 font-semibold"},{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(a._sfc_main$e),{invoice:t.invoice,"is-expandable":!i.value},{logo:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),_:3},8,["invoice","is-expandable"]),e.createVNode(y,{invoice:t.invoice},null,8,["invoice"])],2)]),_:3},8,["title"]))}}),w={class:"flex flex-col gap-3 lg:flex-row lg:gap-6"},b={class:"flex shrink-0 flex-col gap-8 lg:w-72 lg:gap-6"},x=e.defineComponent({__name:"Invoice",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup(t){const{$t:o}=a.useIntl();return(n,i)=>{var r,s;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(a._sfc_main$w),{class:"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",w,[t.invoice?(e.openBlock(),e.createBlock(_,{key:0,invoice:t.invoice},null,8,["invoice"])):e.createCommentVNode("",!0),e.createElementVNode("div",b,[e.createVNode(l._sfc_main,{invoice:t.invoice},null,8,["invoice"]),(null==(r=t.configuration)?void 0:r.enablePaymentAttempts)&&(null==(s=t.payments)?void 0:s.length)?(e.openBlock(),e.createBlock(c._sfc_main,{key:0,"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(a._sfc_main$z),{key:1,customer:t.invoice.customer,title:e.unref(o)({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)])])],64)}}}),h=e.defineComponent({__name:"Invoice.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(t){var o;const n=t;if(!(null==(o=n.configuration)?void 0:o.invoiceId))throw new Error("Missing invoice id");const i=e.computed(()=>({...n,configuration:{enableCustomerBillingInformation:!0,enableDownloadButton:!0,enablePaymentAttempts:!0,...n.configuration}}));return(o,n)=>{var r,l,c,d;return e.openBlock(),e.createBlock(e.unref(a._sfc_main$1),{"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==(c=t.branding)?void 0:c.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:n[0]||(n[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(s,e.normalizeProps(e.guardReactiveProps(i.value)),{default:e.withCtx(({invoice:o,payments:n,isLoading:i,invoiceDownloadService:a})=>[o?(e.openBlock(),e.createBlock(x,{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"])}}}),k=a.defineCustomElement(h),C=a.getComponentName("invoice");exports.COMPONENT_NAME=C,exports.SolvimonInvoice=k,exports.defineSolvimonInvoice=()=>{customElements.get(C)||customElements.define(C,k)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../useLoadInitialData-BRg7IWqW.js"),o=require("../../invoices-CUrXmVXe.js"),n=require("../../useService-D-CUtlp3.js"),i=require("../../payments-ClJySb0d.js"),a=require("../../component-BeqkeC9h.js"),r=require("../../index-CWSXne1Q.js"),l=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-sbmK2un9.js"),c=require("../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-NRmK7iN3.js");const s=e.defineComponent({__name:"Invoice.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(a){const r=a,l=function({invoiceId:e}){const{getInvoice:t,getInvoicePdf:i}=o.createInvoicesService(),{data:a,execute:r,apiStatus:l,error:c,isPending:s}=n.useService({service:()=>t(e)});return{invoice:a,downloadInvoicePdf:i,apiStatus:l,error:c,get:r,isPending:s}}({invoiceId:r.configuration.invoiceId}),c=function(){const{getPayments:e}=i.createPaymentsService(),{data:t,execute:o,error:a,apiStatus:r,isPending:l}=n.useService({service:e,isCollection:!0});return{payments:t,get:o,error:a,apiStatus:r,isPending:l}}(),{isLoading:s}=t.useLoadInitialData(l.get(),c.get(r.configuration.invoiceId));return(t,o)=>e.renderSlot(t.$slots,"default",{invoice:e.unref(l).invoice.value,invoiceDownloadService:e.unref(l).downloadInvoicePdf,payments:e.unref(c),isLoading:e.unref(s)})}}),d={key:0,class:"mt-8"},u={class:"flex flex-col gap-6"},p=["onClick","onKeyup"],m={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"},f={key:0},v={class:"p-0"},g={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},y=e.defineComponent({__name:"InvoiceCreditsBreakdown",props:{invoice:{type:Object}},setup(t){const o=t,{formatDate:n,$t:i,formatMessage:r,formatNumber:l}=a.useIntl(),{getIsOpen:c,toggle:s}=a.useToggleList(),y=e.computed(()=>Object.fromEntries((o.invoice.credit_types??[]).map(e=>[e.id,e]))),_=e=>r({defaultMessage:"Service period - {startAt} - {endAt}",id:"kFCxC4",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})}),w=e=>{var t;return(null==e?void 0:e.credit_type_id)?(null==(t=y.value[e.credit_type_id])?void 0:t.name)??e.credit_type_id:r({defaultMessage:"Credits",id:"K2fM1n",description:"Fallback label for wallet balance credit types when no name is available"})},b=e=>e?l(Number(e)):r({defaultMessage:"-",id:"dHb0fN",description:"Placeholder shown when a wallet balance quantity is missing"}),x=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}`,g=s.get(m)??new Set;if(g.has(v))continue;g.add(v),s.set(m,g);const y=c.get(m)??{id:`${e.period_order}-${m}`,label:m,amount:f.available,rows:[]};y.rows.push(f),c.set(m,y)}return{id:`${e.period_order}-${e.start_at}`,title:t(e),rows:[...c.values()]}}).filter(e=>e.rows.length>0))({invoice:o.invoice,getPeriodTitle:_,getCreditTypeLabel:w,formatQuantity:b}));return(t,o)=>x.value.length>0?(e.openBlock(),e.createElementBlock("section",d,[e.createElementVNode("div",u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,t=>(e.openBlock(),e.createElementBlock("section",{key:t.id},[e.createVNode(e.unref(a._sfc_main$2q),{class:"mt-4"},{default:e.withCtx(()=>[e.createVNode(e.unref(a._sfc_main$2),{tag:"h3",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(a.InvoiceTable),{class:"mt-3"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(a._sfc_main$t),{left:"",class:"text-gray-600"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Wallet balance",id:"j2d7b2",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(s)(t.id),onKeyup:[e.withKeys(o=>e.unref(s)(t.id),["enter"]),e.withKeys(o=>e.unref(s)(t.id),["space"])]},[e.createVNode(e.unref(a._sfc_main$u),{class:"p-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(a._sfc_main$4),{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",m,e.toDisplayString(t.rows.length),1)]),_:2},1024)],40,p),e.unref(c)(t.id)?(e.openBlock(),e.createElementBlock("tr",f,[e.createElementVNode("td",v,[e.createElementVNode("div",g,[e.createVNode(e.unref(a.InvoiceTable),null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(a._sfc_main$t),{left:"",class:"w-2/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Credit breakdown",id:"65I4e4",description:"Column header for wallet balance credit type details"})),1)]),_:1}),e.createVNode(e.unref(a._sfc_main$t),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Balance",id:"4UjRe6",description:"Column header for the available wallet balance amount"})),1)]),_:1}),e.createVNode(e.unref(a._sfc_main$t),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Used",id:"rUy4Lk",description:"Column header for the used wallet credit amount"})),1)]),_:1}),e.createVNode(e.unref(a._sfc_main$t),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Remaining",id:"C8F4/r",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(a._sfc_main$u),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1024),e.createVNode(e.unref(a._sfc_main$u),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.available),1)]),_:2},1024),e.createVNode(e.unref(a._sfc_main$u),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.used),1)]),_:2},1024),e.createVNode(e.unref(a._sfc_main$u),{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}=a.useIntl(),{width:n}=r.useWindowSize(),i=e.computed(()=>n.value<=768);return(n,r)=>(e.openBlock(),e.createBlock(e.unref(a._sfc_main$1g),{title:e.unref(o)({defaultMessage:"Invoice",description:"Title for the invoice block on the invoice details page",id:"sdk.invoice_details.invoice.title"}),class:"grow"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass({"p-6 pt-2":!i.value})},[i.value?(e.openBlock(),e.createBlock(e.unref(a._sfc_main$1J),{key:0,variant:"default","has-icon":"",class:"justify-center bg-gray-50 border-gray-100 text-gray-800 font-semibold"},{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(a._sfc_main$e),{invoice:t.invoice,"is-expandable":!i.value},{logo:e.withCtx(()=>[e.renderSlot(n.$slots,"logo")]),_:3},8,["invoice","is-expandable"]),e.createVNode(y,{invoice:t.invoice},null,8,["invoice"])],2)]),_:3},8,["title"]))}}),w={class:"flex flex-col gap-3 lg:flex-row lg:gap-6"},b={class:"flex shrink-0 flex-col gap-8 lg:w-72 lg:gap-6"},x=e.defineComponent({__name:"Invoice",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup(t){const{$t:o}=a.useIntl();return(n,i)=>{var r,s;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(a._sfc_main$w),{class:"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",w,[t.invoice?(e.openBlock(),e.createBlock(_,{key:0,invoice:t.invoice},null,8,["invoice"])):e.createCommentVNode("",!0),e.createElementVNode("div",b,[e.createVNode(l._sfc_main,{invoice:t.invoice},null,8,["invoice"]),(null==(r=t.configuration)?void 0:r.enablePaymentAttempts)&&(null==(s=t.payments)?void 0:s.length)?(e.openBlock(),e.createBlock(c._sfc_main,{key:0,"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(a._sfc_main$z),{key:1,customer:t.invoice.customer,title:e.unref(o)({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)])])],64)}}}),h=e.defineComponent({__name:"Invoice.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(t){var o;const n=t;if(!(null==(o=n.configuration)?void 0:o.invoiceId))throw new Error("Missing invoice id");const i=e.computed(()=>({...n,configuration:{enableCustomerBillingInformation:!0,enableDownloadButton:!0,enablePaymentAttempts:!0,...n.configuration}}));return(o,n)=>{var r,l,c,d;return e.openBlock(),e.createBlock(e.unref(a._sfc_main$1),{"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==(c=t.branding)?void 0:c.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:n[0]||(n[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(s,e.normalizeProps(e.guardReactiveProps(i.value)),{default:e.withCtx(({invoice:o,payments:n,isLoading:i,invoiceDownloadService:a})=>[o?(e.openBlock(),e.createBlock(x,{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"])}}}),k=a.defineCustomElement(h),C=a.getComponentName("invoice");exports.COMPONENT_NAME=C,exports.SolvimonInvoice=k,exports.defineSolvimonInvoice=()=>{customElements.get(C)||customElements.define(C,k)};
@@ -1,12 +1,12 @@
1
1
  import { defineComponent, renderSlot, unref, computed, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createVNode, withCtx, createTextVNode, toDisplayString, withKeys, normalizeClass, createCommentVNode, createBlock, normalizeProps, guardReactiveProps } from "vue";
2
2
  import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
3
- import { c as createInvoicesService } from "../../invoices-C8nfTLon.mjs";
3
+ import { c as createInvoicesService } from "../../invoices-CoEBP5UT.mjs";
4
4
  import { u as useService } from "../../useService-B4qv5N2D.mjs";
5
- import { c as createPaymentsService } from "../../payments-AWzaFsBd.mjs";
6
- import { b as useIntl, R as useToggleList, S as _sfc_main$2q, _ as _sfc_main$2$1, U as InvoiceTable, V as _sfc_main$t, W as _sfc_main$u, n as _sfc_main$4$1, d as _sfc_main$1g, X as _sfc_main$1J, Y as _sfc_main$e, Z as _sfc_main$w, l as _sfc_main$z, p as _sfc_main$7, q as defineCustomElement, o as getComponentName } from "../../component-BhrlC5ZJ.mjs";
5
+ import { c as createPaymentsService } from "../../payments-DLjkq_hN.mjs";
6
+ import { b as useIntl, R as useToggleList, S as _sfc_main$2q, _ as _sfc_main$2$1, U as InvoiceTable, V as _sfc_main$t, W as _sfc_main$u, n as _sfc_main$4$1, d as _sfc_main$1g, X as _sfc_main$1J, Y as _sfc_main$e, Z as _sfc_main$w, l as _sfc_main$z, p as _sfc_main$7, q as defineCustomElement, o as getComponentName } from "../../component-B0RYS5uK.mjs";
7
7
  import { u as useWindowSize } from "../../index-D3v7hAtc.mjs";
8
- import { _ as _sfc_main$5 } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DxoeHBT0.mjs";
9
- import { _ as _sfc_main$6 } from "../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CCJ-J0t4.mjs";
8
+ import { _ as _sfc_main$5 } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DaEPSNrY.mjs";
9
+ import { _ as _sfc_main$6 } from "../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CLU-8-Ao.mjs";
10
10
  function useInvoice({ invoiceId }) {
11
11
  const { getInvoice, getInvoicePdf: downloadInvoicePdf } = createInvoicesService();
12
12
  const service = () => getInvoice(invoiceId);
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BgcSUvE1.js"),t=require("../../Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js"),n=require("../../useInvoiceData-BtxiSooD.js"),i=require("../../component-B5y7wYnP.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:"min-h-[100px]","data-testid":"invoice-details-skeleton"})):(e.openBlock(),e.createBlock(o._sfc_main,{key:1,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},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},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},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},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,c,s,u;return e.openBlock(),e.createBlock(e.unref(i._sfc_main$1),{"custom-element-name":e.unref(p),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(l=o.branding)?void 0:l.colors)?void 0:c.primary,"secondary-color":null==(u=null==(s=o.branding)?void 0:s.colors)?void 0:u.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,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"])}}}),c=i.defineCustomElement(l),p=i.getComponentName("invoice-details");exports.COMPONENT_NAME=p,exports.SolvimonInvoiceDetails=c,exports.defineSolvimonInvoiceDetails=()=>{customElements.get(p)||customElements.define(p,c)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-sbmK2un9.js"),t=require("../../Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js"),n=require("../../useInvoiceData-DvNf2402.js"),i=require("../../component-BeqkeC9h.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:"min-h-[100px]","data-testid":"invoice-details-skeleton"})):(e.openBlock(),e.createBlock(o._sfc_main,{key:1,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},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},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},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},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,c,s,u;return e.openBlock(),e.createBlock(e.unref(i._sfc_main$1),{"custom-element-name":e.unref(p),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(l=o.branding)?void 0:l.colors)?void 0:c.primary,"secondary-color":null==(u=null==(s=o.branding)?void 0:s.colors)?void 0:u.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,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"])}}}),c=i.defineCustomElement(l),p=i.getComponentName("invoice-details");exports.COMPONENT_NAME=p,exports.SolvimonInvoiceDetails=c,exports.defineSolvimonInvoiceDetails=()=>{customElements.get(p)||customElements.define(p,c)};
@@ -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-DxoeHBT0.mjs";
2
+ import { _ as _sfc_main$4 } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DaEPSNrY.mjs";
3
3
  import { _ as _sfc_main$3 } from "../../Skeleton.vue_vue_type_script_setup_true_lang-C-taYlG4.mjs";
4
- import { u as useInvoiceData } from "../../useInvoiceData-ca_-ah5G.mjs";
5
- import { p as _sfc_main$5, q as defineCustomElement, o as getComponentName } from "../../component-BhrlC5ZJ.mjs";
4
+ import { u as useInvoiceData } from "../../useInvoiceData-7mqBeSPa.mjs";
5
+ import { p as _sfc_main$5, q as defineCustomElement, o as getComponentName } from "../../component-B0RYS5uK.mjs";
6
6
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7
7
  __name: "InvoiceDetails",
8
8
  props: {
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../useInvoicesList-BMeLWF8r.js"),t=require("../../useLoadInitialData-BRg7IWqW.js"),n=require("../../component-B5y7wYnP.js"),r=e.defineComponent({__name:"InvoicesList.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(n){var r,i;const a=n,l=a.portalObject.customer_id,s=o.useInvoicesList({customerId:l,batchSize:(null==(i=null==(r=a.configuration)?void 0:r.pagination)?void 0:i.batchSize)||15}),{isLoading:c}=t.useLoadInitialData(s.fetchInitial());return(o,t)=>e.renderSlot(o.$slots,"default",{isLoading:e.unref(c),invoices:e.unref(s)})}}),i=e.defineComponent({__name:"InvoicesList.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:t=>(i,a)=>{var s,c,p,m;return e.openBlock(),e.createBlock(e.unref(n._sfc_main$1),{"custom-element-name":e.unref(l),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(s=t.branding)?void 0:s.colors)?void 0:c.primary,"secondary-color":null==(m=null==(p=t.branding)?void 0:p.colors)?void 0:m.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:a[0]||(a[0]=e=>i.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(r,e.normalizeProps(e.guardReactiveProps(i.$props)),{default:e.withCtx(({invoices:n,isLoading:r})=>[e.createVNode(o._sfc_main,{configuration:t.configuration,invoices:n.items.value,"is-loading":r,"has-more-items":n.hasNextBatch.value,onLoadMore:n.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"])}}),a=n.defineCustomElement(i),l=n.getComponentName("invoices-list");exports.COMPONENT_NAME=l,exports.SolvimonInvoicesList=a,exports.defineSolvimonInvoicesList=()=>{customElements.get(l)||customElements.define(l,a)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../useInvoicesList-CBqZG_rw.js"),t=require("../../useLoadInitialData-BRg7IWqW.js"),n=require("../../component-BeqkeC9h.js"),r=e.defineComponent({__name:"InvoicesList.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(n){var r,i;const a=n,l=a.portalObject.customer_id,s=o.useInvoicesList({customerId:l,batchSize:(null==(i=null==(r=a.configuration)?void 0:r.pagination)?void 0:i.batchSize)||15}),{isLoading:c}=t.useLoadInitialData(s.fetchInitial());return(o,t)=>e.renderSlot(o.$slots,"default",{isLoading:e.unref(c),invoices:e.unref(s)})}}),i=e.defineComponent({__name:"InvoicesList.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:t=>(i,a)=>{var s,c,p,m;return e.openBlock(),e.createBlock(e.unref(n._sfc_main$1),{"custom-element-name":e.unref(l),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(s=t.branding)?void 0:s.colors)?void 0:c.primary,"secondary-color":null==(m=null==(p=t.branding)?void 0:p.colors)?void 0:m.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:a[0]||(a[0]=e=>i.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(r,e.normalizeProps(e.guardReactiveProps(i.$props)),{default:e.withCtx(({invoices:n,isLoading:r})=>[e.createVNode(o._sfc_main,{configuration:t.configuration,invoices:n.items.value,"is-loading":r,"has-more-items":n.hasNextBatch.value,onLoadMore:n.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"])}}),a=n.defineCustomElement(i),l=n.getComponentName("invoices-list");exports.COMPONENT_NAME=l,exports.SolvimonInvoicesList=a,exports.defineSolvimonInvoicesList=()=>{customElements.get(l)||customElements.define(l,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-CbzCTBaM.mjs";
2
+ import { u as useInvoicesList, _ as _sfc_main$3 } from "../../useInvoicesList-B5vYDRyl.mjs";
3
3
  import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
4
- import { p as _sfc_main$2, q as defineCustomElement, o as getComponentName } from "../../component-BhrlC5ZJ.mjs";
4
+ import { p as _sfc_main$2, q as defineCustomElement, o as getComponentName } from "../../component-B0RYS5uK.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-BKlI9Y8m.js"),o=require("../../Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js"),n=require("../../useInvoiceData-BtxiSooD.js"),r=require("../../component-B5y7wYnP.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:"min-h-[100px]","data-testid":"payment-history-skeleton"})):n.paymentAttempts.length?(e.openBlock(),e.createBlock(t._sfc_main,{key:1,"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},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},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})}}}),l=e.defineComponent({__name:"PaymentHistory.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},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 l,p,m,c;return e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{"custom-element-name":e.unref(s),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(l=t.branding)?void 0:l.colors)?void 0:p.primary,"secondary-color":null==(c=null==(m=t.branding)?void 0:m.colors)?void 0:c.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,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"])}}}),p=r.defineCustomElement(l),s=r.getComponentName("payment-history");exports.COMPONENT_NAME=s,exports.SolvimonPaymentHistory=p,exports.defineSolvimonPaymentHistory=()=>{customElements.get(s)||customElements.define(s,p)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-NRmK7iN3.js"),o=require("../../Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js"),n=require("../../useInvoiceData-DvNf2402.js"),r=require("../../component-BeqkeC9h.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:"min-h-[100px]","data-testid":"payment-history-skeleton"})):n.paymentAttempts.length?(e.openBlock(),e.createBlock(t._sfc_main,{key:1,"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},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},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})}}}),l=e.defineComponent({__name:"PaymentHistory.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},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 l,p,m,c;return e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{"custom-element-name":e.unref(s),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(l=t.branding)?void 0:l.colors)?void 0:p.primary,"secondary-color":null==(c=null==(m=t.branding)?void 0:m.colors)?void 0:c.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,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"])}}}),p=r.defineCustomElement(l),s=r.getComponentName("payment-history");exports.COMPONENT_NAME=s,exports.SolvimonPaymentHistory=p,exports.defineSolvimonPaymentHistory=()=>{customElements.get(s)||customElements.define(s,p)};
@@ -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-CCJ-J0t4.mjs";
2
+ import { _ as _sfc_main$4 } from "../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CLU-8-Ao.mjs";
3
3
  import { _ as _sfc_main$3 } from "../../Skeleton.vue_vue_type_script_setup_true_lang-C-taYlG4.mjs";
4
- import { u as useInvoiceData } from "../../useInvoiceData-ca_-ah5G.mjs";
5
- import { p as _sfc_main$5, q as defineCustomElement, o as getComponentName } from "../../component-BhrlC5ZJ.mjs";
4
+ import { u as useInvoiceData } from "../../useInvoiceData-7mqBeSPa.mjs";
5
+ import { p as _sfc_main$5, q as defineCustomElement, o as getComponentName } from "../../component-B0RYS5uK.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-B5y7wYnP.js"),o=require("../../useLoadInitialData-BRg7IWqW.js"),n=require("../../useCustomer-ClGwkeNn.js"),r=require("../../useService-D-CUtlp3.js"),a=require("../../paymentMethods-CwzFgccc.js"),i=require("../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Dhoaaymm.js");const u=e.defineComponent({__name:"PaymentMethodForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(i){const u=i,c=n.useCustomer({customerId:u.portalObject.customer_id}),s=function(){const{getPaymentMethodOptions:e}=a.createPaymentMethodsService(),{data:t,execute:o,apiStatus:n,error:i,isPending:u}=r.useService({initialValue:[],service:t=>function(e){return void 0!==e.customerId}(t)?e({customerId:t.customerId,amount:t.amount,country:t.country}):e({subscriptionId:t.subscriptionId,amount:t.amount,country:t.country})});return{paymentMethodOptions:t,get:o,apiStatus:n,error:i,isPending:u}}(),{isLoading:l}=o.useLoadInitialData((async()=>{var e;const o=await c.get.execute(),n=t.getCustomerCountry(o);await s.get({customerId:o.id,country:n,amount:null==(e=u.configuration)?void 0:e.amount})})());return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(c).customer.value,paymentMethodOptions:e.unref(s),isLoading:e.unref(l)})}}),c=e.defineComponent({__name:"PaymentMethodForm",props:{customer:{type:Object},paymentMethodOptions:{type:Array},configuration:{type:Object},isLoading:{type:Boolean,default:!1},countryCode:{type:String}},setup(o){const n={currency:"EUR",quantity:"0"},r=o,{$t:a}=t.useIntl(),u=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 o=t.getCustomerCountry(r.customer);if(o)return e=o,e}return"NL"}),s=e.computed(()=>"AUTHORIZE"===u.value.variant?{paymentMethodOptions:r.paymentMethodOptions,countryCode:c.value,variant:"AUTHORIZE",amount:u.value.amount,context:u.value.context,invoiceId:u.value.invoiceId,successRedirectUrl:u.value.successRedirectUrl,selectedOption:u.value.selectedOption,validateOnSubmit:u.value.validateOnSubmit,forceStorePaymentMethod:u.value.forceStorePaymentMethod}:{paymentMethodOptions:r.paymentMethodOptions,customerId:r.customer.id,countryCode:c.value,variant:"TOKENIZE",amount:u.value.amount??n,invoiceId:u.value.invoiceId,successRedirectUrl:u.value.successRedirectUrl,selectedOption:u.value.selectedOption,validateOnSubmit:u.value.validateOnSubmit,forceStorePaymentMethod:u.value.forceStorePaymentMethod});return(n,r)=>o.isLoading?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$14),{key:0,variant:"section",class:"min-h-[180px]"})):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{key:1,"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(i._sfc_main,e.normalizeProps(e.guardReactiveProps(s.value)),null,16)]),_:1},8,["title"]))}}),s=e.defineComponent({__name:"PaymentMethodForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(o){const n=o;return(r,a)=>{var i,s,l,p;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(m),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==(p=null==(l=o.branding)?void 0:l.colors)?void 0:p.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,onError:a[0]||(a[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(u,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"])}}}),l=t.defineCustomElement(s),m=t.getComponentName("payment-method-form");exports.COMPONENT_NAME=m,exports.SolvimonPaymentMethodForm=l,exports.defineSolvimonPaymentMethodForm=()=>{customElements.get(m)||customElements.define(m,l)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-BeqkeC9h.js"),o=require("../../useLoadInitialData-BRg7IWqW.js"),n=require("../../useCustomer-CEFUPIDZ.js"),r=require("../../useService-D-CUtlp3.js"),a=require("../../paymentMethods-D_rYLg3F.js"),i=require("../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Ck_1lRDB.js");const u=e.defineComponent({__name:"PaymentMethodForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(i){const u=i,c=n.useCustomer({customerId:u.portalObject.customer_id}),s=function(){const{getPaymentMethodOptions:e}=a.createPaymentMethodsService(),{data:t,execute:o,apiStatus:n,error:i,isPending:u}=r.useService({initialValue:[],service:t=>function(e){return void 0!==e.customerId}(t)?e({customerId:t.customerId,amount:t.amount,country:t.country}):e({subscriptionId:t.subscriptionId,amount:t.amount,country:t.country})});return{paymentMethodOptions:t,get:o,apiStatus:n,error:i,isPending:u}}(),{isLoading:l}=o.useLoadInitialData((async()=>{var e;const o=await c.get.execute(),n=t.getCustomerCountry(o);await s.get({customerId:o.id,country:n,amount:null==(e=u.configuration)?void 0:e.amount})})());return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(c).customer.value,paymentMethodOptions:e.unref(s),isLoading:e.unref(l)})}}),c=e.defineComponent({__name:"PaymentMethodForm",props:{customer:{type:Object},paymentMethodOptions:{type:Array},configuration:{type:Object},isLoading:{type:Boolean,default:!1},countryCode:{type:String}},setup(o){const n={currency:"EUR",quantity:"0"},r=o,{$t:a}=t.useIntl(),u=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 o=t.getCustomerCountry(r.customer);if(o)return e=o,e}return"NL"}),s=e.computed(()=>"AUTHORIZE"===u.value.variant?{paymentMethodOptions:r.paymentMethodOptions,countryCode:c.value,variant:"AUTHORIZE",amount:u.value.amount,context:u.value.context,invoiceId:u.value.invoiceId,successRedirectUrl:u.value.successRedirectUrl,selectedOption:u.value.selectedOption,validateOnSubmit:u.value.validateOnSubmit,forceStorePaymentMethod:u.value.forceStorePaymentMethod}:{paymentMethodOptions:r.paymentMethodOptions,customerId:r.customer.id,countryCode:c.value,variant:"TOKENIZE",amount:u.value.amount??n,invoiceId:u.value.invoiceId,successRedirectUrl:u.value.successRedirectUrl,selectedOption:u.value.selectedOption,validateOnSubmit:u.value.validateOnSubmit,forceStorePaymentMethod:u.value.forceStorePaymentMethod});return(n,r)=>o.isLoading?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$14),{key:0,variant:"section",class:"min-h-[180px]"})):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{key:1,"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(i._sfc_main,e.normalizeProps(e.guardReactiveProps(s.value)),null,16)]),_:1},8,["title"]))}}),s=e.defineComponent({__name:"PaymentMethodForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(o){const n=o;return(r,a)=>{var i,s,l,p;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(m),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==(p=null==(l=o.branding)?void 0:l.colors)?void 0:p.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,onError:a[0]||(a[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(u,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"])}}}),l=t.defineCustomElement(s),m=t.getComponentName("payment-method-form");exports.COMPONENT_NAME=m,exports.SolvimonPaymentMethodForm=l,exports.defineSolvimonPaymentMethodForm=()=>{customElements.get(m)||customElements.define(m,l)};
@@ -1,10 +1,10 @@
1
1
  import { defineComponent, renderSlot, unref, computed, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
2
- import { F as getCustomerCountry, b as useIntl, k as _sfc_main$14, d as _sfc_main$1g, p as _sfc_main$4, q as defineCustomElement, o as getComponentName } from "../../component-BhrlC5ZJ.mjs";
2
+ import { F as getCustomerCountry, b as useIntl, k as _sfc_main$14, d as _sfc_main$1g, p as _sfc_main$4, q as defineCustomElement, o as getComponentName } from "../../component-B0RYS5uK.mjs";
3
3
  import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
4
- import { u as useCustomer } from "../../useCustomer-DZKD_AMw.mjs";
4
+ import { u as useCustomer } from "../../useCustomer-C0RKKfGJ.mjs";
5
5
  import { u as useService } from "../../useService-B4qv5N2D.mjs";
6
- import { c as createPaymentMethodsService } from "../../paymentMethods-BJVTwjzp.mjs";
7
- import { _ as _sfc_main$3 } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D_JmUGZS.mjs";
6
+ import { c as createPaymentMethodsService } from "../../paymentMethods-C2gWIbEr.mjs";
7
+ import { _ as _sfc_main$3 } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DFCX2tcj.mjs";
8
8
  function hasCustomerId(payload) {
9
9
  return payload.customerId !== void 0;
10
10
  }
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-B5y7wYnP.js"),n=require("../../useService-D-CUtlp3.js"),o=require("../../subscriptions-0_i6paaS.js"),r=require("../../useLoadInitialData-BRg7IWqW.js"),i=e.defineComponent({__name:"SubscriptionSchedules",props:{schedulesData:{type:Array},configuration:{type:Object},isLoading:{type:Boolean}},setup(n){const{$t:o}=t.useIntl();return(r,i)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{"no-border":"",spacing:"none","content-background":"none",title:e.unref(o)({defaultMessage:"Schedules",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$E),{schedules:n.schedulesData},null,8,["schedules"])]),_:1},8,["title"]))}});const a=e.defineComponent({__name:"SubscriptionSchedules.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(t){const i=t,{subscription:a,withPlanData:s,get:l}=function({subscriptionId:e}){const{getSubscription:t}=o.createSubscriptionsService(),{data:r,execute:i,apiStatus:a,error:s,isPending:l}=n.useService({service:()=>t({id:e,expanded:!0})});return{subscription:r,withPlanData:e=>e.pricing_plan_schedule_infos.map(e=>({schedule:e.pricing_plan_schedule,selectedPricingPlan:e.pricing_plan_version.pricing_plan,selectedPricingPlanVersion:e.pricing_plan_version})),apiStatus:a,error:s,get:i,isPending:l}}({subscriptionId:i.configuration.subscriptionId}),{isLoading:c}=r.useLoadInitialData(l());return(t,n)=>e.renderSlot(t.$slots,"default",{schedulesData:e.unref(a)?e.unref(s)(e.unref(a)):void 0,isLoading:e.unref(c)})}}),s=e.defineComponent({__name:"SubscriptionSchedules.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(n){const o=n;return(r,s)=>{var l,p,u,d;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(c),environment:n.environment,locale:n.locale,"portal-object":n.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(l=n.branding)?void 0:l.colors)?void 0:p.primary,"secondary-color":null==(d=null==(u=n.branding)?void 0:u.colors)?void 0:d.secondary,"experimental-features":n.experimentalFeatures,"log-level":n.logLevel,"on-log":n.onLog,onError:s[0]||(s[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(o)),{default:e.withCtx(({schedulesData:t,isLoading:o})=>[t?(e.openBlock(),e.createBlock(i,{key:0,"schedules-data":t,"is-loading":o,configuration:n.configuration},null,8,["schedules-data","is-loading","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"])}}}),l=t.defineCustomElement(s),c=t.getComponentName("subscription-schedules");exports.COMPONENT_NAME=c,exports.SolvimonSubscriptionSchedules=l,exports.defineSolvimonSubscriptionSchedules=()=>{customElements.get(c)||customElements.define(c,l)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-BeqkeC9h.js"),n=require("../../useService-D-CUtlp3.js"),o=require("../../subscriptions-DERHtyHo.js"),r=require("../../useLoadInitialData-BRg7IWqW.js"),i=e.defineComponent({__name:"SubscriptionSchedules",props:{schedulesData:{type:Array},configuration:{type:Object},isLoading:{type:Boolean}},setup(n){const{$t:o}=t.useIntl();return(r,i)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{"no-border":"",spacing:"none","content-background":"none",title:e.unref(o)({defaultMessage:"Schedules",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$E),{schedules:n.schedulesData},null,8,["schedules"])]),_:1},8,["title"]))}});const a=e.defineComponent({__name:"SubscriptionSchedules.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(t){const i=t,{subscription:a,withPlanData:s,get:l}=function({subscriptionId:e}){const{getSubscription:t}=o.createSubscriptionsService(),{data:r,execute:i,apiStatus:a,error:s,isPending:l}=n.useService({service:()=>t({id:e,expanded:!0})});return{subscription:r,withPlanData:e=>e.pricing_plan_schedule_infos.map(e=>({schedule:e.pricing_plan_schedule,selectedPricingPlan:e.pricing_plan_version.pricing_plan,selectedPricingPlanVersion:e.pricing_plan_version})),apiStatus:a,error:s,get:i,isPending:l}}({subscriptionId:i.configuration.subscriptionId}),{isLoading:c}=r.useLoadInitialData(l());return(t,n)=>e.renderSlot(t.$slots,"default",{schedulesData:e.unref(a)?e.unref(s)(e.unref(a)):void 0,isLoading:e.unref(c)})}}),s=e.defineComponent({__name:"SubscriptionSchedules.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(n){const o=n;return(r,s)=>{var l,p,u,d;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(c),environment:n.environment,locale:n.locale,"portal-object":n.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(l=n.branding)?void 0:l.colors)?void 0:p.primary,"secondary-color":null==(d=null==(u=n.branding)?void 0:u.colors)?void 0:d.secondary,"experimental-features":n.experimentalFeatures,"log-level":n.logLevel,"on-log":n.onLog,onError:s[0]||(s[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(o)),{default:e.withCtx(({schedulesData:t,isLoading:o})=>[t?(e.openBlock(),e.createBlock(i,{key:0,"schedules-data":t,"is-loading":o,configuration:n.configuration},null,8,["schedules-data","is-loading","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"])}}}),l=t.defineCustomElement(s),c=t.getComponentName("subscription-schedules");exports.COMPONENT_NAME=c,exports.SolvimonSubscriptionSchedules=l,exports.defineSolvimonSubscriptionSchedules=()=>{customElements.get(c)||customElements.define(c,l)};
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
2
- import { b as useIntl, d as _sfc_main$1g, E as _sfc_main$E, p as _sfc_main$3, q as defineCustomElement, o as getComponentName } from "../../component-BhrlC5ZJ.mjs";
2
+ import { b as useIntl, d as _sfc_main$1g, E as _sfc_main$E, p as _sfc_main$3, q as defineCustomElement, o as getComponentName } from "../../component-B0RYS5uK.mjs";
3
3
  import { u as useService } from "../../useService-B4qv5N2D.mjs";
4
- import { c as createSubscriptionsService } from "../../subscriptions-CMBt--lb.mjs";
4
+ import { c as createSubscriptionsService } from "../../subscriptions-BepBTXR5.mjs";
5
5
  import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
6
6
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7
7
  __name: "SubscriptionSchedules",
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../SubscriptionsList.vue_vue_type_script_setup_true_lang-C6AOtXAD.js"),t=require("../../component-B5y7wYnP.js"),r=require("../../useCustomer-ClGwkeNn.js"),n=require("../../useLoadInitialData-BRg7IWqW.js"),l=require("../../usePaymentMethods-CaE9qm2M.js"),i=e.defineComponent({__name:"SubscriptionsList.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(i){const a=i.portalObject.customer_id,s=r.useCustomer({customerId:a}),p=o.useSubscriptionsList({customerId:a}),u=l.usePaymentMethods({customerId:a}),{isLoading:m}=n.useLoadInitialData(s.get.execute(),p.fetchInitial(),u.fetchAll());return(o,r)=>{var n,l,a,y;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(c),environment:i.environment,locale:i.locale,"portal-object":i.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(n=i.branding)?void 0:n.colors)?void 0:l.primary,"secondary-color":null==(y=null==(a=i.branding)?void 0:a.colors)?void 0:y.secondary,"experimental-features":i.experimentalFeatures,"log-level":i.logLevel,"on-log":i.onLog,onError:r[0]||(r[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{customer:e.unref(s),subscriptions:e.unref(p).items,paymentMethods:e.unref(u).items,isLoading:e.unref(m),loadMore:e.unref(p).fetchMore})]),_:3},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}}),a=e.defineComponent({__name:"SubscriptionsList.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:r=>(n,l)=>{var a,s,p,u;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(c),environment:r.environment,locale:r.locale,"portal-object":r.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(a=r.branding)?void 0:a.colors)?void 0:s.primary,"secondary-color":null==(u=null==(p=r.branding)?void 0:p.colors)?void 0:u.secondary,"experimental-features":r.experimentalFeatures,"log-level":r.logLevel,"on-log":r.onLog,onError:l[0]||(l[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(n.$props)),{default:e.withCtx(({customer:t,subscriptions:n,paymentMethods:l,isLoading:i,loadMore:a})=>[e.createVNode(o._sfc_main,{configuration:r.configuration,customer:t.customer.value,subscriptions:n.value,"payment-methods":l.value,"is-loading":i,onLoadMore:a},null,8,["configuration","customer","subscriptions","payment-methods","is-loading","onLoadMore"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),s=t.defineCustomElement(a),c=t.getComponentName("subscriptions-list");exports.COMPONENT_NAME=c,exports.SolvimonSubscriptionsList=s,exports.defineSolvimonSubscriptionsList=()=>{customElements.get(c)||customElements.define(c,s)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../SubscriptionsList.vue_vue_type_script_setup_true_lang-D49i1DHa.js"),t=require("../../component-BeqkeC9h.js"),r=require("../../useCustomer-CEFUPIDZ.js"),n=require("../../useLoadInitialData-BRg7IWqW.js"),l=require("../../usePaymentMethods-BdZkt6re.js"),i=e.defineComponent({__name:"SubscriptionsList.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup(i){const a=i.portalObject.customer_id,s=r.useCustomer({customerId:a}),p=o.useSubscriptionsList({customerId:a}),u=l.usePaymentMethods({customerId:a}),{isLoading:m}=n.useLoadInitialData(s.get.execute(),p.fetchInitial(),u.fetchAll());return(o,r)=>{var n,l,a,y;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(c),environment:i.environment,locale:i.locale,"portal-object":i.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(n=i.branding)?void 0:n.colors)?void 0:l.primary,"secondary-color":null==(y=null==(a=i.branding)?void 0:a.colors)?void 0:y.secondary,"experimental-features":i.experimentalFeatures,"log-level":i.logLevel,"on-log":i.onLog,onError:r[0]||(r[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{customer:e.unref(s),subscriptions:e.unref(p).items,paymentMethods:e.unref(u).items,isLoading:e.unref(m),loadMore:e.unref(p).fetchMore})]),_:3},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}}),a=e.defineComponent({__name:"SubscriptionsList.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:r=>(n,l)=>{var a,s,p,u;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"custom-element-name":e.unref(c),environment:r.environment,locale:r.locale,"portal-object":r.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(a=r.branding)?void 0:a.colors)?void 0:s.primary,"secondary-color":null==(u=null==(p=r.branding)?void 0:p.colors)?void 0:u.secondary,"experimental-features":r.experimentalFeatures,"log-level":r.logLevel,"on-log":r.onLog,onError:l[0]||(l[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(n.$props)),{default:e.withCtx(({customer:t,subscriptions:n,paymentMethods:l,isLoading:i,loadMore:a})=>[e.createVNode(o._sfc_main,{configuration:r.configuration,customer:t.customer.value,subscriptions:n.value,"payment-methods":l.value,"is-loading":i,onLoadMore:a},null,8,["configuration","customer","subscriptions","payment-methods","is-loading","onLoadMore"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),s=t.defineCustomElement(a),c=t.getComponentName("subscriptions-list");exports.COMPONENT_NAME=c,exports.SolvimonSubscriptionsList=s,exports.defineSolvimonSubscriptionsList=()=>{customElements.get(c)||customElements.define(c,s)};
@@ -1,9 +1,9 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, normalizeProps, guardReactiveProps } from "vue";
2
- import { u as useSubscriptionsList, _ as _sfc_main$3 } from "../../SubscriptionsList.vue_vue_type_script_setup_true_lang-DcunVa40.mjs";
3
- import { p as _sfc_main$2, q as defineCustomElement, o as getComponentName } from "../../component-BhrlC5ZJ.mjs";
4
- import { u as useCustomer } from "../../useCustomer-DZKD_AMw.mjs";
2
+ import { u as useSubscriptionsList, _ as _sfc_main$3 } from "../../SubscriptionsList.vue_vue_type_script_setup_true_lang-Cj4cnM8z.mjs";
3
+ import { p as _sfc_main$2, q as defineCustomElement, o as getComponentName } from "../../component-B0RYS5uK.mjs";
4
+ import { u as useCustomer } from "../../useCustomer-C0RKKfGJ.mjs";
5
5
  import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
6
- import { u as usePaymentMethods } from "../../usePaymentMethods-CuhSSaz4.mjs";
6
+ import { u as usePaymentMethods } from "../../usePaymentMethods-4Io2ZHlo.mjs";
7
7
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8
8
  __name: "SubscriptionsList.entry.view",
9
9
  props: {
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../_Uint8Array-DxISR7XF.js"),a=require("../../useWalletBalanceItems-B-6IRohi.js"),o=require("../../useLoadInitialData-BRg7IWqW.js"),l=require("../../component-B5y7wYnP.js"),n=e.defineComponent({__name:"WalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array}},setup:t=>(o,l)=>(e.openBlock(),e.createBlock(a._sfc_main,{"has-error":t.hasError,"is-loading":t.isLoading,"wallet-balances":t.walletBalances},null,8,["has-error","is-loading","wallet-balances"]))}),r=e.defineComponent({__name:"WalletBalances.entry.view",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object}},setup(t){const l=t.portalObject.customer_id,n=a.useCustomerWalletBalances({customerId:l}),r=a.useWalletBalanceItems(n.walletBalances),{isLoading:s}=o.useLoadInitialData(n.fetch());return(t,a)=>e.renderSlot(t.$slots,"default",{customerWalletBalances:e.unref(n),walletBalanceItems:e.unref(r),isLoading:e.unref(s)})}}),s=e.defineComponent({__name:"WalletBalances.entry",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object}},setup:a=>(o,s)=>{var i,c,m,u;return e.openBlock(),e.createBlock(e.unref(l._sfc_main$1),{"custom-element-name":e.unref(p),environment:a.environment,locale:a.locale,"portal-object":a.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(i=a.branding)?void 0:i.colors)?void 0:c.primary,"secondary-color":null==(u=null==(m=a.branding)?void 0:m.colors)?void 0:u.secondary,"experimental-features":a.experimentalFeatures,"log-level":a.logLevel,"on-log":a.onLog,onError:s[0]||(s[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(r,e.normalizeProps(e.guardReactiveProps(o.$props)),{default:e.withCtx(({customerWalletBalances:a,walletBalanceItems:o,isLoading:l})=>[e.createVNode(n,{"has-error":a.apiStatus.value===e.unref(t.ApiStatus).Failed,"is-loading":l,"wallet-balances":o},null,8,["has-error","is-loading","wallet-balances"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),i=l.defineCustomElement(s),p=l.getComponentName("wallet-balances");exports.COMPONENT_NAME=p,exports.SolvimonWalletBalances=i,exports.defineSolvimonWalletBalances=()=>{customElements.get(p)||customElements.define(p,i)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../_Uint8Array-DxISR7XF.js"),a=require("../../useWalletBalanceItems-CzV3PcJH.js"),o=require("../../useLoadInitialData-BRg7IWqW.js"),l=require("../../component-BeqkeC9h.js"),n=e.defineComponent({__name:"WalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array}},setup:t=>(o,l)=>(e.openBlock(),e.createBlock(a._sfc_main,{"has-error":t.hasError,"is-loading":t.isLoading,"wallet-balances":t.walletBalances},null,8,["has-error","is-loading","wallet-balances"]))}),r=e.defineComponent({__name:"WalletBalances.entry.view",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object}},setup(t){const l=t.portalObject.customer_id,n=a.useCustomerWalletBalances({customerId:l}),r=a.useWalletBalanceItems(n.walletBalances),{isLoading:s}=o.useLoadInitialData(n.fetch());return(t,a)=>e.renderSlot(t.$slots,"default",{customerWalletBalances:e.unref(n),walletBalanceItems:e.unref(r),isLoading:e.unref(s)})}}),s=e.defineComponent({__name:"WalletBalances.entry",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},customElementName:{type:String},branding:{type:Object}},setup:a=>(o,s)=>{var i,c,m,u;return e.openBlock(),e.createBlock(e.unref(l._sfc_main$1),{"custom-element-name":e.unref(p),environment:a.environment,locale:a.locale,"portal-object":a.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(i=a.branding)?void 0:i.colors)?void 0:c.primary,"secondary-color":null==(u=null==(m=a.branding)?void 0:m.colors)?void 0:u.secondary,"experimental-features":a.experimentalFeatures,"log-level":a.logLevel,"on-log":a.onLog,onError:s[0]||(s[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(r,e.normalizeProps(e.guardReactiveProps(o.$props)),{default:e.withCtx(({customerWalletBalances:a,walletBalanceItems:o,isLoading:l})=>[e.createVNode(n,{"has-error":a.apiStatus.value===e.unref(t.ApiStatus).Failed,"is-loading":l,"wallet-balances":o},null,8,["has-error","is-loading","wallet-balances"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),i=l.defineCustomElement(s),p=l.getComponentName("wallet-balances");exports.COMPONENT_NAME=p,exports.SolvimonWalletBalances=i,exports.defineSolvimonWalletBalances=()=>{customElements.get(p)||customElements.define(p,i)};
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, openBlock, createBlock, renderSlot, unref, withCtx, createVNode, normalizeProps, guardReactiveProps } from "vue";
2
2
  import { A as ApiStatus } from "../../_Uint8Array-DHE03FZr.mjs";
3
- import { _ as _sfc_main$3, u as useCustomerWalletBalances, a as useWalletBalanceItems } from "../../useWalletBalanceItems-Cjis6nYZ.mjs";
3
+ import { _ as _sfc_main$3, u as useCustomerWalletBalances, a as useWalletBalanceItems } from "../../useWalletBalanceItems-B0NZuM3W.mjs";
4
4
  import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
5
- import { p as _sfc_main$4, q as defineCustomElement, o as getComponentName } from "../../component-BhrlC5ZJ.mjs";
5
+ import { p as _sfc_main$4, q as defineCustomElement, o as getComponentName } from "../../component-B0RYS5uK.mjs";
6
6
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7
7
  __name: "WalletBalances",
8
8
  props: {
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../registry-DN-NWLUK.js");exports.createSolvimonCore=e.createSolvimonCore,exports.getRegisteredComponentIds=e.getRegisteredComponentIds,exports.getRegisteredScreenIds=e.getRegisteredScreenIds;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../registry-EPF-VAYZ.js");exports.createSolvimonCore=e.createSolvimonCore,exports.getRegisteredComponentIds=e.getRegisteredComponentIds,exports.getRegisteredScreenIds=e.getRegisteredScreenIds;
@@ -1,4 +1,4 @@
1
- import { c, g, a } from "../registry-Dll2lIBv.mjs";
1
+ import { c, g, a } from "../registry-bo_7pcbl.mjs";
2
2
  export {
3
3
  c as createSolvimonCore,
4
4
  g as getRegisteredComponentIds,
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./registry-DN-NWLUK.js"),e=require("./screens/Checkout/Checkout.cjs.js"),i=require("./screens/CustomerOverview/CustomerOverview.cjs.js"),n=require("./screens/UpgradeSubscription/UpgradeSubscription.cjs.js"),s=require("./components/BillingInformation/BillingInformation.cjs.js"),t=require("./components/BillingInformationForm/BillingInformationForm.cjs.js"),r=require("./components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js"),m=require("./components/WalletBalances/WalletBalances.cjs.js"),l=require("./components/InvoiceDetails/InvoiceDetails.cjs.js"),S=require("./components/InvoicesList/InvoicesList.cjs.js"),c=require("./components/PaymentHistory/PaymentHistory.cjs.js"),v=require("./components/SubscriptionSchedules/SubscriptionSchedules.cjs.js"),p=require("./components/SubscriptionsList/SubscriptionsList.cjs.js"),a=require("./components/PaymentMethodForm/PaymentMethodForm.cjs.js");exports.createSolvimonCore=o.createSolvimonCore,exports.getRegisteredComponentIds=o.getRegisteredComponentIds,exports.getRegisteredScreenIds=o.getRegisteredScreenIds,exports.SolvimonCheckout=e.SolvimonCheckout,exports.defineSolvimonCheckout=e.defineSolvimonCheckout,exports.SolvimonCustomerOverview=i.SolvimonCustomerOverview,exports.defineSolvimonCustomerOverview=i.defineSolvimonCustomerOverview,exports.SolvimonUpgradeSubscription=n.SolvimonUpgradeSubscription,exports.defineSolvimonUpgradeSubscription=n.defineSolvimonUpgradeSubscription,exports.SolvimonBillingInformation=s.SolvimonBillingInformation,exports.defineSolvimonBillingInformation=s.defineSolvimonBillingInformation,exports.SolvimonBillingInformationForm=t.SolvimonBillingInformationForm,exports.defineSolvimonBillingInformationForm=t.defineSolvimonBillingInformationForm,exports.SolvimonCustomerPaymentMethods=r.SolvimonCustomerPaymentMethods,exports.defineSolvimonCustomerPaymentMethods=r.defineSolvimonCustomerPaymentMethods,exports.SolvimonWalletBalances=m.SolvimonWalletBalances,exports.defineSolvimonWalletBalances=m.defineSolvimonWalletBalances,exports.SolvimonInvoiceDetails=l.SolvimonInvoiceDetails,exports.defineSolvimonInvoiceDetails=l.defineSolvimonInvoiceDetails,exports.SolvimonInvoicesList=S.SolvimonInvoicesList,exports.defineSolvimonInvoicesList=S.defineSolvimonInvoicesList,exports.SolvimonPaymentHistory=c.SolvimonPaymentHistory,exports.defineSolvimonPaymentHistory=c.defineSolvimonPaymentHistory,exports.SolvimonSubscriptionSchedules=v.SolvimonSubscriptionSchedules,exports.defineSolvimonSubscriptionSchedules=v.defineSolvimonSubscriptionSchedules,exports.SolvimonSubscriptionsList=p.SolvimonSubscriptionsList,exports.defineSolvimonSubscriptionsList=p.defineSolvimonSubscriptionsList,exports.SolvimonPaymentMethodForm=a.SolvimonPaymentMethodForm,exports.defineSolvimonPaymentMethodForm=a.defineSolvimonPaymentMethodForm;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./registry-EPF-VAYZ.js"),e=require("./screens/Checkout/Checkout.cjs.js"),i=require("./screens/CustomerOverview/CustomerOverview.cjs.js"),n=require("./screens/UpgradeSubscription/UpgradeSubscription.cjs.js"),s=require("./components/BillingInformation/BillingInformation.cjs.js"),t=require("./components/BillingInformationForm/BillingInformationForm.cjs.js"),r=require("./components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js"),m=require("./components/WalletBalances/WalletBalances.cjs.js"),l=require("./components/InvoiceDetails/InvoiceDetails.cjs.js"),S=require("./components/InvoicesList/InvoicesList.cjs.js"),c=require("./components/PaymentHistory/PaymentHistory.cjs.js"),v=require("./components/SubscriptionSchedules/SubscriptionSchedules.cjs.js"),p=require("./components/SubscriptionsList/SubscriptionsList.cjs.js"),a=require("./components/PaymentMethodForm/PaymentMethodForm.cjs.js");exports.createSolvimonCore=o.createSolvimonCore,exports.getRegisteredComponentIds=o.getRegisteredComponentIds,exports.getRegisteredScreenIds=o.getRegisteredScreenIds,exports.SolvimonCheckout=e.SolvimonCheckout,exports.defineSolvimonCheckout=e.defineSolvimonCheckout,exports.SolvimonCustomerOverview=i.SolvimonCustomerOverview,exports.defineSolvimonCustomerOverview=i.defineSolvimonCustomerOverview,exports.SolvimonUpgradeSubscription=n.SolvimonUpgradeSubscription,exports.defineSolvimonUpgradeSubscription=n.defineSolvimonUpgradeSubscription,exports.SolvimonBillingInformation=s.SolvimonBillingInformation,exports.defineSolvimonBillingInformation=s.defineSolvimonBillingInformation,exports.SolvimonBillingInformationForm=t.SolvimonBillingInformationForm,exports.defineSolvimonBillingInformationForm=t.defineSolvimonBillingInformationForm,exports.SolvimonCustomerPaymentMethods=r.SolvimonCustomerPaymentMethods,exports.defineSolvimonCustomerPaymentMethods=r.defineSolvimonCustomerPaymentMethods,exports.SolvimonWalletBalances=m.SolvimonWalletBalances,exports.defineSolvimonWalletBalances=m.defineSolvimonWalletBalances,exports.SolvimonInvoiceDetails=l.SolvimonInvoiceDetails,exports.defineSolvimonInvoiceDetails=l.defineSolvimonInvoiceDetails,exports.SolvimonInvoicesList=S.SolvimonInvoicesList,exports.defineSolvimonInvoicesList=S.defineSolvimonInvoicesList,exports.SolvimonPaymentHistory=c.SolvimonPaymentHistory,exports.defineSolvimonPaymentHistory=c.defineSolvimonPaymentHistory,exports.SolvimonSubscriptionSchedules=v.SolvimonSubscriptionSchedules,exports.defineSolvimonSubscriptionSchedules=v.defineSolvimonSubscriptionSchedules,exports.SolvimonSubscriptionsList=p.SolvimonSubscriptionsList,exports.defineSolvimonSubscriptionsList=p.defineSolvimonSubscriptionsList,exports.SolvimonPaymentMethodForm=a.SolvimonPaymentMethodForm,exports.defineSolvimonPaymentMethodForm=a.defineSolvimonPaymentMethodForm;
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c, g, a } from "./registry-Dll2lIBv.mjs";
1
+ import { c, g, a } from "./registry-bo_7pcbl.mjs";
2
2
  import { SolvimonCheckout, defineSolvimonCheckout } from "./screens/Checkout/Checkout.es.js";
3
3
  import { SolvimonCustomerOverview, defineSolvimonCustomerOverview } from "./screens/CustomerOverview/CustomerOverview.es.js";
4
4
  import { SolvimonUpgradeSubscription, defineSolvimonUpgradeSubscription } from "./screens/UpgradeSubscription/UpgradeSubscription.es.js";
@@ -1 +1 @@
1
- const n=require("./component-B5y7wYnP.js");exports.createInvoicesService=function(){const i=n.createRequestService(),e=n.useConfig();return{getInvoice:function(n){return i({url:`${e.apiUrls.transaction}/portal/invoices/${n}`})},getInvoices:function({customerId:t,pagination:r,query:o}){const a=n.withPagination({customer_id:t,...o??{}},r),c=new URL(`${e.apiUrls.transaction}/portal/invoices`);return Object.entries(a).forEach(([n,i])=>{null!=i&&(Array.isArray(i)?i.forEach(i=>{c.searchParams.append(`${n}[]`,`${i}`)}):c.searchParams.append(n,`${i}`))}),i({url:c.toString(),isCollection:!0})},getInvoicePdf:async function(t){return i({url:`${e.apiUrls.transaction}/portal/invoices/${t}/pdf`,options:{headers:{"Content-Type":"application/pdf"}}}).then(i=>{const e=new Blob([i],{type:"application/pdf"});n.downloadFile(e,`invoice-${t}.pdf`)})},getInvoicePreview:function({customer:n,pricingPlanSubscriptionId:t,startAt:r,customizations:o,pricing_plan_schedule_customizations:a}){return i({url:`${e.apiUrls.transaction}/portal/invoices/preview`,options:{method:"POST"},data:{template_pricing_plan_subscription_id:t,...r&&{start_at:r},...o&&{pricing_plan_schedule_customizations:o},...a&&{pricing_plan_schedule_customizations:a},customer_details:{...n,reference:"preview"}}})}}};
1
+ const n=require("./component-BeqkeC9h.js");exports.createInvoicesService=function(){const i=n.createRequestService(),e=n.useConfig();return{getInvoice:function(n){return i({url:`${e.apiUrls.transaction}/portal/invoices/${n}`})},getInvoices:function({customerId:t,pagination:r,query:o}){const a=n.withPagination({customer_id:t,...o??{}},r),c=new URL(`${e.apiUrls.transaction}/portal/invoices`);return Object.entries(a).forEach(([n,i])=>{null!=i&&(Array.isArray(i)?i.forEach(i=>{c.searchParams.append(`${n}[]`,`${i}`)}):c.searchParams.append(n,`${i}`))}),i({url:c.toString(),isCollection:!0})},getInvoicePdf:async function(t){return i({url:`${e.apiUrls.transaction}/portal/invoices/${t}/pdf`,options:{headers:{"Content-Type":"application/pdf"}}}).then(i=>{const e=new Blob([i],{type:"application/pdf"});n.downloadFile(e,`invoice-${t}.pdf`)})},getInvoicePreview:function({customer:n,pricingPlanSubscriptionId:t,startAt:r,customizations:o,pricing_plan_schedule_customizations:a}){return i({url:`${e.apiUrls.transaction}/portal/invoices/preview`,options:{method:"POST"},data:{template_pricing_plan_subscription_id:t,...r&&{start_at:r},...o&&{pricing_plan_schedule_customizations:o},...a&&{pricing_plan_schedule_customizations:a},customer_details:{...n,reference:"preview"}}})}}};
@@ -1,4 +1,4 @@
1
- import { c as createRequestService, u as useConfig, h as downloadFile, a as withPagination } from "./component-BhrlC5ZJ.mjs";
1
+ import { c as createRequestService, u as useConfig, h as downloadFile, a as withPagination } from "./component-B0RYS5uK.mjs";
2
2
  function createInvoicesService() {
3
3
  const request = createRequestService();
4
4
  const config = useConfig();
@@ -1,4 +1,4 @@
1
- import { c as createRequestService, u as useConfig, a as withPagination } from "./component-BhrlC5ZJ.mjs";
1
+ import { c as createRequestService, u as useConfig, a as withPagination } from "./component-B0RYS5uK.mjs";
2
2
  function createPaymentMethodsService() {
3
3
  const request = createRequestService();
4
4
  const config = useConfig();