@solvimon/solvimon-web 0.1.0-alpha.12 → 0.1.0-alpha.14
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.
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js → BillingInformation.vue_vue_type_script_setup_true_lang-0_VYW5Wu.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-D8ZeVBWO.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DEqfojR8.mjs} +2 -2
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-zdBaVj-K.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CFLR4ptB.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-COnrD4ew.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-D_B099M7.mjs → PaymentHistoryBlock-BTRFc4ki.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-BiiFJkpT.js → PaymentHistoryBlock-DUeSRR3k.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-GeyErAW6.mjs} +1 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-TgZYSSQe.js +1 -0
- package/dist/{PaymentIntegrationForm-bfGmfwQT.js → PaymentIntegrationForm-CQntx0TH.js} +1 -1
- package/dist/{PaymentIntegrationForm-CkXYj9xs.mjs → PaymentIntegrationForm-DX6kv0_v.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BhGQB-c9.js +1 -0
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BnMmcoAu.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Dkd-Cp8c.mjs} +5 -5
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BuJGxitV.js +1 -0
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-D-BFQZiM.mjs +169 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BkzLj8n2.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-B7IOIy-v.mjs} +48 -23
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D-hpJL8I.js +1 -0
- package/dist/adyen-BvNyYAg-.js +1 -0
- package/dist/{adyen-Bwewy3HC.mjs → adyen-D0yvZvq5.mjs} +1 -1
- package/dist/component-By_A1VHh.js +1 -0
- package/dist/component-CGfjV_7z.mjs +889 -0
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +4 -4
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +3 -3
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +4 -4
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +6 -6
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +6 -6
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +5 -5
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +5 -5
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +3 -3
- package/dist/core/action-request.types.d.ts +10 -1
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/{customer-B31QzznT.mjs → customer-Bn6GdxP8.mjs} +1 -1
- package/dist/{customer-hDxW1Dbp.js → customer-CGyZojAB.js} +1 -1
- package/dist/{en-US-N3CUCsVy.mjs → en-US-BKhsdJQ2.mjs} +15 -7
- package/dist/en-US-G2HBHqjq.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/invoices-DDeL8tvI.js +1 -0
- package/dist/{invoices-DIYPN2j_.mjs → invoices-Rs-QBUGS.mjs} +22 -3
- package/dist/{nl-NL-B8U9b85I.mjs → nl-NL-BdeAy1tY.mjs} +25 -13
- package/dist/nl-NL-DvVsMfhA.js +1 -0
- package/dist/{paymentMethods-C_sdTkSF.js → paymentMethods-BR9w3qy8.js} +1 -1
- package/dist/{paymentMethods-67b3UlTZ.mjs → paymentMethods-DOH9-6M1.mjs} +2 -2
- package/dist/{payments-DkHhTHto.js → payments-C0vYbn5Q.js} +1 -1
- package/dist/{payments-Dq6R37Fz.mjs → payments-DGPENXiS.mjs} +1 -1
- package/dist/{registry-Df_26rJy.mjs → registry-7UKVW93Q.mjs} +1 -1
- package/dist/{registry-BkViv4tv.js → registry-DrV0jFnM.js} +1 -1
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +265 -376
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +12 -12
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
- package/dist/screens/PayInvoice/PayInvoice.es.js +8 -8
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +758 -717
- package/dist/{subscriptions-ClGIr_aS.mjs → subscriptions-BIGqt2N0.mjs} +2 -2
- package/dist/{subscriptions-jelITJcX.js → subscriptions-CcpEwubd.js} +1 -1
- package/dist/{useActionDispatchProvider-BC57-Ufn.mjs → useActionDispatchProvider-Ca1YbU61.mjs} +1 -1
- package/dist/{useActionDispatchProvider-rw9kWeE0.js → useActionDispatchProvider-aqYyqIdb.js} +1 -1
- package/dist/{useCustomer-CUcaeQn_.js → useCustomer-D9ZrqMFY.js} +1 -1
- package/dist/{useCustomer-Ba9WRtuT.mjs → useCustomer-DUA8Y-2I.mjs} +2 -2
- package/dist/{useIncrementalLoading-Cnzh2mAz.mjs → useIncrementalLoading-C1LKdVP8.mjs} +1 -1
- package/dist/{useIncrementalLoading-DoTTXM2Y.js → useIncrementalLoading-FNH4k4a3.js} +1 -1
- package/dist/{useInvoiceData-BJwwDur7.mjs → useInvoiceData-Bz4a2Mfa.mjs} +3 -3
- package/dist/{useInvoiceData-D2jkdmlA.js → useInvoiceData-HNnt3703.js} +1 -1
- package/dist/useInvoicesList-DXBTGdcI.js +1 -0
- package/dist/{useInvoicesList-CFzAxyae.mjs → useInvoicesList-b2_fiHsc.mjs} +4 -4
- package/dist/{useLoadInitialData-5sgImpzc.mjs → useLoadInitialData-Cyp1xpuv.mjs} +1 -1
- package/dist/{useLoadInitialData-DjwRHcAH.js → useLoadInitialData-D0t-Lk3k.js} +1 -1
- package/dist/{usePaymentMethodOptions-DYO6xr3-.js → usePaymentMethodOptions-DgGDcVeE.js} +1 -1
- package/dist/{usePaymentMethodOptions-C2k4npCQ.mjs → usePaymentMethodOptions-r0Opz7BC.mjs} +2 -2
- package/dist/{usePaymentMethods-ryN_YohI.js → usePaymentMethods-BHLXXaCa.js} +1 -1
- package/dist/{usePaymentMethods-CRWbH48K.mjs → usePaymentMethods-C-NCtOom.mjs} +2 -2
- package/dist/{usePayments-Cw5PPEJa.mjs → usePayments-BtByiIMy.mjs} +3 -3
- package/dist/{usePayments-DWXPGFvp.js → usePayments-DADpdoI7.js} +1 -1
- package/dist/{usePortal-cmE08vYs.mjs → usePortal-CpW3EDD-.mjs} +1 -1
- package/dist/{usePortal-CxX4nrE4.js → usePortal-DhaZBAGi.js} +1 -1
- package/dist/{useService-BsSEI8DZ.mjs → useService-BcYQRxPS.mjs} +1 -1
- package/dist/{useService-Bb9r_sOQ.js → useService-C0h9UlQW.js} +1 -1
- package/dist/{useWalletBalanceItems-CpZ1NWPr.js → useWalletBalanceItems-COzKSpmt.js} +1 -1
- package/dist/{useWalletBalanceItems-CkDqmk36.mjs → useWalletBalanceItems-DKz-2vUy.mjs} +3 -3
- package/dist/{useWatchDebounced-2ZLnfgvG.js → useWatchDebounced-C_YxgoQ6.js} +1 -1
- package/dist/{useWatchDebounced-D1xuIX6_.mjs → useWatchDebounced-Zmxd6InB.mjs} +8 -4
- package/dist/{vendor-ui-5pJF5KBP.js → vendor-ui-1SHma7t1.js} +1 -1
- package/dist/{vendor-ui-C0K3osvz.mjs → vendor-ui-CdOX_IS-.mjs} +42 -42
- package/package.json +1 -1
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CiyyUp4z.js +0 -1
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs +0 -50
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Br3bEUlP.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-AHw3iTfi.js +0 -1
- package/dist/adyen-R6aSZ0Yf.js +0 -1
- package/dist/component-BOqPDAVk.js +0 -1
- package/dist/component-Djrf1L-Z.mjs +0 -889
- package/dist/en-US-CgPY97Vq.js +0 -1
- package/dist/invoices-DzkA1jDc.js +0 -1
- package/dist/nl-NL-qMRaTRrM.js +0 -1
- package/dist/useInvoicesList-CaBCGs4h.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-0_VYW5Wu.js"),o=require("../../useCustomer-D9ZrqMFY.js"),r=require("../../useLoadInitialData-D0t-Lk3k.js"),n=require("../../component-By_A1VHh.js"),i=e.defineComponent({__name:"BillingInformation.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const n=t.portalObject.customer_id,i=o.useCustomer({customerId:n}),{isLoading:l}=r.useLoadInitialData(i.get.execute());return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(i),isLoading:e.unref(l)})}}),l=e.defineComponent({__name:"BillingInformation.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:o=>(r,l)=>{var a,p,c,m;return e.openBlock(),e.createBlock(e.unref(n._sfc_main),{"custom-element-name":e.unref(s),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(a=o.branding)?void 0:a.colors)?void 0:p.primary,"secondary-color":null==(m=null==(c=o.branding)?void 0:c.colors)?void 0:m.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:l[0]||(l[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(r.$props)),{default:e.withCtx(({customer:o,isLoading:r})=>[e.createVNode(t._sfc_main,{"is-loading":r,customer:o.customer.value},null,8,["is-loading","customer"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),a=n.defineCustomElement(l),s=n.getComponentName("billing-information");exports.COMPONENT_NAME=s,exports.SolvimonBillingInformation=a,exports.defineSolvimonBillingInformation=()=>{customElements.get(s)||customElements.define(s,a)};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, renderSlot, unref, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
-
import { _ as _sfc_main$3 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { u as useCustomer } from "../../useCustomer-
|
|
4
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
5
|
-
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
2
|
+
import { _ as _sfc_main$3 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-D8ZeVBWO.mjs";
|
|
3
|
+
import { u as useCustomer } from "../../useCustomer-DUA8Y-2I.mjs";
|
|
4
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-Cyp1xpuv.mjs";
|
|
5
|
+
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.mjs";
|
|
6
6
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "BillingInformation.entry.view",
|
|
8
8
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../vendor-ui-5pJF5KBP.js"),a=require("../../index-DRdBmZ2-.js"),o=require("../../useCustomer-CUcaeQn_.js"),r=require("../../component-BOqPDAVk.js"),l={type:"INDIVIDUAL",email:"",country:"",addressLine1:"",postalCode:"",city:"",state:""};function n({initialState:o={},onSubmit:r}){const{form:n,validation:s,changes:u,hasChanges:c,updateInitialState:m,initialState:p}=(({initialState:a,validationRules:o,nullifyEmptyValues:r=!1,mode:l="shallow"})=>{const n=e.shallowRef(structuredClone(a)),i=e.shallowRef(structuredClone(a)),d=t.useValidation(o??{},i),s=e.computed(()=>t.objectDiff({from:n.value,to:i.value,mode:l,nullifyEmptyValues:r})),u=e.computed(()=>Object.entries(s.value).length>0);return{form:i,validation:d,changes:s,hasChanges:u,reset:()=>{i.value=structuredClone(a),d.value.$reset()},updateInitialState:e=>{i.value=structuredClone(e),n.value=structuredClone(e)},initialState:n}})({initialState:{...l,...o},validationRules:{email:{required:a.required,email:a.email}},nullifyEmptyValues:!0,mode:"deep"});return{form:n,isOrganization:t.isOrganization,validation:s,changes:u,hasChanges:c,updateInitialState:e=>{m(i(e))},submit:(e,t=n.value)=>r({customerId:e,payload:d(t)}),initialState:p}}const i=e=>{var a,o,r,l;if(t.isIndividual(e)){const t=e.individual.residential_address;return{type:"INDIVIDUAL",email:e.email??"",country:(null==t?void 0:t.country)??"",addressLine1:(null==t?void 0:t.line1)??"",addressLine2:(null==t?void 0:t.line2)??"",postalCode:(null==t?void 0:t.postal_code)??"",city:(null==t?void 0:t.city)??"",state:(null==t?void 0:t.state)??"",firstName:(null==(a=e.individual.name)?void 0:a.first_name)??"",lastName:(null==(o=e.individual.name)?void 0:o.last_name)??""}}const n=e.organization.registered_address;return{type:"ORGANIZATION",email:e.email??"",country:(null==n?void 0:n.country)??"",addressLine1:(null==n?void 0:n.line1)??"",addressLine2:(null==n?void 0:n.line2)??"",postalCode:(null==n?void 0:n.postal_code)??"",city:(null==n?void 0:n.city)??"",state:(null==n?void 0:n.state)??"",companyLegalName:e.organization.legal_name??"",companyVatNumber:(null==(l=null==(r=e.organization.tax_ids)?void 0:r[0])?void 0:l.id)??""}},d=e=>"ORGANIZATION"===e.type?{type:"ORGANIZATION",email:e.email,organization:{legal_name:e.companyLegalName??"",tax_ids:e.companyVatNumber?[{id:e.companyVatNumber,type:"GENERIC_TAX_ID"}]:void 0,registered_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}}:{type:"INDIVIDUAL",email:e.email,individual:{name:{first_name:e.firstName??"",last_name:e.lastName??""},residential_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}},s={class:"grid grid-cols-1 gap-4"},u={class:"flex grow flex-col"},c={class:"mt-6 flex items-center justify-between gap-4"},m={class:"flex flex-col gap-2"},p={key:0,class:"grid grid-cols-2 gap-2"},f={class:"grid grid-cols-3 gap-2"},h=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},isLoading:{type:Boolean},apiError:{type:null},updateCustomer:{type:Function}},setup(a){const o=a,{$t:r}=t.useIntl(),{validation:l,form:i,updateInitialState:d,submit:h,hasChanges:g}=n({onSubmit:({customerId:e,payload:t})=>o.updateCustomer({customerId:e,payload:t})}),y=e.ref(!1),v=e.computed(()=>"ORGANIZATION"===i.value.type),_=e.computed(()=>!y.value),b=e.computed({get:()=>v.value,set:e=>i.value.type=e?"ORGANIZATION":"INDIVIDUAL"}),V=async()=>{var e;await l.value.$validate();!l.value.$invalid&&(null==(e=o.customer)?void 0:e.id)&&await h(o.customer.id)};return e.watch(()=>o.customer,e=>{e&&!y.value&&(d(e),y.value=!0)},{immediate:!0}),(o,n)=>{var d,h,y,N,k,C,S,E,I,L,T,x,O;return e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(V,["prevent"])},[e.createVNode(e.unref(t._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Customer information",id:"checkout.contact_information_block.title",description:"The title of the contact information block in the checkout form"})),1)]),_:1}),e.createElementVNode("div",s,[e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).email,"onUpdate:modelValue":n[0]||(n[0]=t=>e.unref(i).email=t),required:"",type:"email",label:e.unref(r)({defaultMessage:"Email address",id:"checkout.email_address.label",description:"The email address of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Email address...",id:"checkout.email_address.placeholder",description:"The email address of the customer in the checkout form"}),error:(null==(d=e.unref(l).email)?void 0:d.$errors)||(null==(h=a.apiError)?void 0:h.email)},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$21),{"single-model-value":e.unref(i).country,"onUpdate:singleModelValue":n[1]||(n[1]=t=>e.unref(i).country=t),label:e.unref(r)({defaultMessage:"Country",id:"checkout.country.label",description:"The country of the customer in the checkout form"}),error:null==(y=a.apiError)?void 0:y.country},null,8,["single-model-value","label","error"]),_.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$22),{key:0,modelValue:b.value,"onUpdate:modelValue":n[2]||(n[2]=e=>b.value=e),"label-position":"before"},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",u,[e.createVNode(e.unref(t._sfc_main),{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Company purchase",id:"checkout.company_purchase_toggle.title",description:"The title of the company purchase toggle in the checkout"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"I am purchasing on behalf of a company",id:"checkout.company_purchase_toggle.sub_title",description:"The subtitle of the company purchase toggle in the checkout"})),1)]),_:1})])]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).companyVatNumber,"onUpdate:modelValue":n[3]||(n[3]=t=>e.unref(i).companyVatNumber=t),name:"vat_number",label:e.unref(r)({defaultMessage:"VAT number",id:"checkout.vat_number.label",description:"The label for the vat number in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"VAT number...",id:"checkout.vat_number.placeholder",description:"The label for the vat number in the checkout form"}),error:null==(N=a.apiError)?void 0:N.vat_number},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).companyLegalName,"onUpdate:modelValue":n[4]||(n[4]=t=>e.unref(i).companyLegalName=t),required:"",name:"legal_name",label:e.unref(r)({defaultMessage:"Legal entity name",id:"checkout.legal_name.label",description:"The legal name of the organization customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Legal entity name...",id:"checkout.legal_name.placeholder",description:"The legal name of the organization customer in the checkout form"}),error:null==(k=a.apiError)?void 0:k.legal_name},null,8,["modelValue","label","placeholder","error"])],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",c,[e.createVNode(e.unref(t._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Billing details",id:"checkout.billing_information_block.title",description:"The title of the billing information block in the checkout form"})),1)]),_:1})]),e.createElementVNode("div",m,[v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).firstName,"onUpdate:modelValue":n[5]||(n[5]=t=>e.unref(i).firstName=t),name:"first_name",label:e.unref(r)({defaultMessage:"First name",id:"checkout.first_name.label",description:"The first name of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"First name...",id:"checkout.first_name.placeholder",description:"The first name of the customer in the checkout form"}),error:null==(C=a.apiError)?void 0:C.first_name},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).lastName,"onUpdate:modelValue":n[6]||(n[6]=t=>e.unref(i).lastName=t),name:"last_name",label:e.unref(r)({defaultMessage:"Last name",id:"checkout.last_name.label",description:"The last name of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Last name...",id:"checkout.last_name.placeholder",description:"The last name of the customer in the checkout form"}),error:null==(S=a.apiError)?void 0:S.last_name},null,8,["modelValue","label","placeholder","error"])])),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).addressLine1,"onUpdate:modelValue":n[7]||(n[7]=t=>e.unref(i).addressLine1=t),name:"address_line_1",label:e.unref(r)({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Address line 1...",id:"checkout.address.line1.placeholder",description:"Address line 1 of the customer address in the checkout form"}),error:null==(E=a.apiError)?void 0:E.address_line_1},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).addressLine2,"onUpdate:modelValue":n[8]||(n[8]=t=>e.unref(i).addressLine2=t),name:"address_line_2",placeholder:e.unref(r)({defaultMessage:"Address line 2...",id:"checkout.address.line2.placeholder",description:"Address line 2 of the customer address in the checkout form"}),error:null==(I=a.apiError)?void 0:I.address_line_2},null,8,["modelValue","placeholder","error"]),e.createElementVNode("div",f,[e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).postalCode,"onUpdate:modelValue":n[9]||(n[9]=t=>e.unref(i).postalCode=t),name:"postal_code",placeholder:e.unref(r)({defaultMessage:"Postal code...",id:"checkout.address.portal_code.placeholder",description:"Postal code of the customer address in the checkout form"}),error:null==(L=a.apiError)?void 0:L.postal_code},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).city,"onUpdate:modelValue":n[10]||(n[10]=t=>e.unref(i).city=t),name:"city",placeholder:e.unref(r)({defaultMessage:"City...",id:"checkout.address.city.placeholder",description:"City of the customer address in the checkout form"}),error:null==(T=a.apiError)?void 0:T.city},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$20),{modelValue:e.unref(i).state,"onUpdate:modelValue":n[11]||(n[11]=t=>e.unref(i).state=t),name:"state",placeholder:e.unref(r)({defaultMessage:"State...",id:"checkout.address.state.placeholder",description:"State of the customer address in the checkout form"}),error:null==(x=a.apiError)?void 0:x.state},null,8,["modelValue","placeholder","error"])])]),(null==(O=a.apiError)?void 0:O._generic)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$15),{key:0,class:"mt-4",title:a.apiError._generic},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$3),{type:"submit",color:"primary",disabled:!e.unref(g),loading:a.isLoading,class:"mt-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Save changes",id:"billing_information_form.submit_button.label",description:"The label for the submit button of the billing information form"})),1)]),_:1},8,["disabled","loading"])],32)}}}),g=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},apiError:{type:null},updateCustomer:{type:Function},isLoading:{type:Boolean}},setup:t=>(a,o)=>(e.openBlock(),e.createBlock(h,{class:"sv-billing-form sv-root sv-component",customer:t.customer,"update-customer":t.updateCustomer,"is-loading":t.isLoading,"api-error":t.apiError},null,8,["customer","update-customer","is-loading","api-error"]))}),y=e.defineComponent({__name:"BillingInformationForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(a){const r=a.portalObject.customer_id,{customer:l,get:n,update:i}=o.useCustomer({customerId:r});return e.onMounted(async()=>{await n.execute()}),(a,o)=>e.renderSlot(a.$slots,"default",{customer:e.unref(l),isLoading:e.unref(n).isPending.value||e.unref(i).isPending.value,updateCustomer:e.unref(i),apiError:e.unref(t.getApiError)(e.unref(i).error)})}}),v=e.defineComponent({__name:"BillingInformationForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},emits:["error"],setup:t=>(a,o)=>{var l,n,i,d;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(b),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(n=null==(l=t.branding)?void 0:l.colors)?void 0:n.primary,"secondary-color":null==(d=null==(i=t.branding)?void 0:i.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:o[0]||(o[0]=e=>a.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(a.$props)),{default:e.withCtx(({customer:t,updateCustomer:a,isLoading:o,apiError:r})=>[t?(e.openBlock(),e.createBlock(g,{key:0,customer:t,"is-loading":o,"update-customer":({payload:e})=>a.execute(e),"api-error":r},null,8,["customer","is-loading","update-customer","api-error"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),_=r.defineCustomElement(v),b=r.getComponentName("billing-information-form");exports.COMPONENT_NAME=b,exports.SolvimonBillingInformationForm=_,exports.defineSolvimonBillingInformationForm=()=>{customElements.get(b)||customElements.define(b,_)};
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../vendor-ui-1SHma7t1.js"),a=require("../../index-DRdBmZ2-.js"),o=require("../../useCustomer-D9ZrqMFY.js"),r=require("../../component-By_A1VHh.js"),l={type:"INDIVIDUAL",email:"",country:"",addressLine1:"",postalCode:"",city:"",state:""};function n({initialState:o={},onSubmit:r}){const{form:n,validation:s,changes:u,hasChanges:c,updateInitialState:m,initialState:p}=(({initialState:a,validationRules:o,nullifyEmptyValues:r=!1,mode:l="shallow"})=>{const n=e.shallowRef(structuredClone(a)),i=e.shallowRef(structuredClone(a)),d=t.useValidation(o??{},i),s=e.computed(()=>t.objectDiff({from:n.value,to:i.value,mode:l,nullifyEmptyValues:r})),u=e.computed(()=>Object.entries(s.value).length>0);return{form:i,validation:d,changes:s,hasChanges:u,reset:()=>{i.value=structuredClone(a),d.value.$reset()},updateInitialState:e=>{i.value=structuredClone(e),n.value=structuredClone(e)},initialState:n}})({initialState:{...l,...o},validationRules:{email:{required:a.required,email:a.email}},nullifyEmptyValues:!0,mode:"deep"});return{form:n,isOrganization:t.isOrganization,validation:s,changes:u,hasChanges:c,updateInitialState:e=>{m(i(e))},submit:(e,t=n.value)=>r({customerId:e,payload:d(t)}),initialState:p}}const i=e=>{var a,o,r,l;if(t.isIndividual(e)){const t=e.individual.residential_address;return{type:"INDIVIDUAL",email:e.email??"",country:(null==t?void 0:t.country)??"",addressLine1:(null==t?void 0:t.line1)??"",addressLine2:(null==t?void 0:t.line2)??"",postalCode:(null==t?void 0:t.postal_code)??"",city:(null==t?void 0:t.city)??"",state:(null==t?void 0:t.state)??"",firstName:(null==(a=e.individual.name)?void 0:a.first_name)??"",lastName:(null==(o=e.individual.name)?void 0:o.last_name)??""}}const n=e.organization.registered_address;return{type:"ORGANIZATION",email:e.email??"",country:(null==n?void 0:n.country)??"",addressLine1:(null==n?void 0:n.line1)??"",addressLine2:(null==n?void 0:n.line2)??"",postalCode:(null==n?void 0:n.postal_code)??"",city:(null==n?void 0:n.city)??"",state:(null==n?void 0:n.state)??"",companyLegalName:e.organization.legal_name??"",companyVatNumber:(null==(l=null==(r=e.organization.tax_ids)?void 0:r[0])?void 0:l.id)??""}},d=e=>"ORGANIZATION"===e.type?{type:"ORGANIZATION",email:e.email,organization:{legal_name:e.companyLegalName??"",tax_ids:e.companyVatNumber?[{id:e.companyVatNumber,type:"GENERIC_TAX_ID"}]:void 0,registered_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}}:{type:"INDIVIDUAL",email:e.email,individual:{name:{first_name:e.firstName??"",last_name:e.lastName??""},residential_address:{line1:e.addressLine1,line2:e.addressLine2??"",postal_code:e.postalCode,city:e.city,country:e.country,state:e.state??""}}},s={class:"grid grid-cols-1 gap-4"},u={class:"flex grow flex-col"},c={class:"mt-6 flex items-center justify-between gap-4"},m={class:"flex flex-col gap-2"},p={key:0,class:"grid grid-cols-2 gap-2"},f={class:"grid grid-cols-3 gap-2"},h=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},isLoading:{type:Boolean},apiError:{type:null},updateCustomer:{type:Function}},setup(a){const o=a,{$t:r}=t.useIntl(),{validation:l,form:i,updateInitialState:d,submit:h,hasChanges:g}=n({onSubmit:({customerId:e,payload:t})=>o.updateCustomer({customerId:e,payload:t})}),y=e.ref(!1),v=e.computed(()=>"ORGANIZATION"===i.value.type),_=e.computed(()=>!y.value),b=e.computed({get:()=>v.value,set:e=>i.value.type=e?"ORGANIZATION":"INDIVIDUAL"}),V=async()=>{var e;await l.value.$validate();!l.value.$invalid&&(null==(e=o.customer)?void 0:e.id)&&await h(o.customer.id)};return e.watch(()=>o.customer,e=>{e&&!y.value&&(d(e),y.value=!0)},{immediate:!0}),(o,n)=>{var d,h,y,N,k,C,S,E,I,L,T,x,O;return e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(V,["prevent"])},[e.createVNode(e.unref(t._sfc_main$1),{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$22),{modelValue:e.unref(i).email,"onUpdate:modelValue":n[0]||(n[0]=t=>e.unref(i).email=t),required:"",type:"email",label:e.unref(r)({defaultMessage:"Email address",id:"checkout.email_address.label",description:"The email address of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Email address...",id:"checkout.email_address.placeholder",description:"The email address of the customer in the checkout form"}),error:(null==(d=e.unref(l).email)?void 0:d.$errors)||(null==(h=a.apiError)?void 0:h.email)},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$23),{"single-model-value":e.unref(i).country,"onUpdate:singleModelValue":n[1]||(n[1]=t=>e.unref(i).country=t),label:e.unref(r)({defaultMessage:"Country",id:"checkout.country.label",description:"The country of the customer in the checkout form"}),error:null==(y=a.apiError)?void 0:y.country},null,8,["single-model-value","label","error"]),_.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$24),{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$1),{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$1),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"I am purchasing on behalf of a company",id:"checkout.company_purchase_toggle.sub_title",description:"The subtitle of the company purchase toggle in the checkout"})),1)]),_:1})])]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(t._sfc_main$22),{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$22),{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$1),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Billing details",id:"checkout.billing_information_block.title",description:"The title of the billing information block in the checkout form"})),1)]),_:1})]),e.createElementVNode("div",m,[v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(e.unref(t._sfc_main$22),{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$22),{modelValue:e.unref(i).lastName,"onUpdate:modelValue":n[6]||(n[6]=t=>e.unref(i).lastName=t),name:"last_name",label:e.unref(r)({defaultMessage:"Last name",id:"checkout.last_name.label",description:"The last name of the customer in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Last name...",id:"checkout.last_name.placeholder",description:"The last name of the customer in the checkout form"}),error:null==(S=a.apiError)?void 0:S.last_name},null,8,["modelValue","label","placeholder","error"])])),e.createVNode(e.unref(t._sfc_main$22),{modelValue:e.unref(i).addressLine1,"onUpdate:modelValue":n[7]||(n[7]=t=>e.unref(i).addressLine1=t),name:"address_line_1",label:e.unref(r)({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),placeholder:e.unref(r)({defaultMessage:"Address line 1...",id:"checkout.address.line1.placeholder",description:"Address line 1 of the customer address in the checkout form"}),error:null==(E=a.apiError)?void 0:E.address_line_1},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(t._sfc_main$22),{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$22),{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$22),{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$22),{modelValue:e.unref(i).state,"onUpdate:modelValue":n[11]||(n[11]=t=>e.unref(i).state=t),name:"state",placeholder:e.unref(r)({defaultMessage:"State...",id:"checkout.address.state.placeholder",description:"State of the customer address in the checkout form"}),error:null==(x=a.apiError)?void 0:x.state},null,8,["modelValue","placeholder","error"])])]),(null==(O=a.apiError)?void 0:O._generic)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:0,class:"mt-4",title:a.apiError._generic},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$3),{type:"submit",color:"primary",disabled:!e.unref(g),loading:a.isLoading,class:"mt-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Save changes",id:"billing_information_form.submit_button.label",description:"The label for the submit button of the billing information form"})),1)]),_:1},8,["disabled","loading"])],32)}}}),g=e.defineComponent({__name:"BillingInformationForm",props:{customer:{type:Object},apiError:{type:null},updateCustomer:{type:Function},isLoading:{type:Boolean}},setup:t=>(a,o)=>(e.openBlock(),e.createBlock(h,{class:"sv-billing-form sv-root sv-component",customer:t.customer,"update-customer":t.updateCustomer,"is-loading":t.isLoading,"api-error":t.apiError},null,8,["customer","update-customer","is-loading","api-error"]))}),y=e.defineComponent({__name:"BillingInformationForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(a){const r=a.portalObject.customer_id,{customer:l,get:n,update:i}=o.useCustomer({customerId:r});return e.onMounted(async()=>{await n.execute()}),(a,o)=>e.renderSlot(a.$slots,"default",{customer:e.unref(l),isLoading:e.unref(n).isPending.value||e.unref(i).isPending.value,updateCustomer:e.unref(i),apiError:e.unref(t.getApiError)(e.unref(i).error)})}}),v=e.defineComponent({__name:"BillingInformationForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},emits:["error"],setup:t=>(a,o)=>{var l,n,i,d;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(b),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(n=null==(l=t.branding)?void 0:l.colors)?void 0:n.primary,"secondary-color":null==(d=null==(i=t.branding)?void 0:i.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:o[0]||(o[0]=e=>a.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(y,e.normalizeProps(e.guardReactiveProps(a.$props)),{default:e.withCtx(({customer:t,updateCustomer:a,isLoading:o,apiError:r})=>[t?(e.openBlock(),e.createBlock(g,{key:0,customer:t,"is-loading":o,"update-customer":({payload:e})=>a.execute(e),"api-error":r},null,8,["customer","is-loading","update-customer","api-error"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),_=r.defineCustomElement(v),b=r.getComponentName("billing-information-form");exports.COMPONENT_NAME=b,exports.SolvimonBillingInformationForm=_,exports.defineSolvimonBillingInformationForm=()=>{customElements.get(b)||customElements.define(b,_)};
|
|
@@ -1,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 {
|
|
2
|
+
import { K as useValidation, L as objectDiff, M as isOrganization, N as isIndividual, u as useIntl, b as _sfc_main$4, O as _sfc_main$5, Q as _sfc_main$6, R as _sfc_main$7, C as _sfc_main$8, e as _sfc_main$9, S as getApiError } from "../../vendor-ui-CdOX_IS-.mjs";
|
|
3
3
|
import { e as email, r as required } from "../../index-CzL1ZcGi.mjs";
|
|
4
|
-
import { u as useCustomer } from "../../useCustomer-
|
|
5
|
-
import { _ as _sfc_main$a, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
4
|
+
import { u as useCustomer } from "../../useCustomer-DUA8Y-2I.mjs";
|
|
5
|
+
import { _ as _sfc_main$a, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.mjs";
|
|
6
6
|
const useForm = ({
|
|
7
7
|
initialState,
|
|
8
8
|
validationRules,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-zdBaVj-K.js"),t=require("../../component-By_A1VHh.js"),r=require("../../useLoadInitialData-D0t-Lk3k.js"),n=require("../../usePaymentMethods-BHLXXaCa.js"),a=e.defineComponent({__name:"CustomerPaymentMethods.entry.view",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){var a;const l=o,i=l.portalObject.customer_id,p=n.usePaymentMethods({customerId:i,pageSize:(null==(a=l.configuration)?void 0:a.maxItems)||3}),{isLoading:c}=r.useLoadInitialData(p.fetchInitial());return(r,n)=>{var a,l,i,m;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(s),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(a=o.branding)?void 0:a.colors)?void 0:l.primary,"secondary-color":null==(m=null==(i=o.branding)?void 0:i.colors)?void 0:m.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:n[0]||(n[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{paymentMethods:e.unref(p).items.value,isLoading:e.unref(c)})]),_:3},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),l=e.defineComponent({__name:"CustomerPaymentMethods.entry",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:r=>(n,l)=>{var i,p,c,m;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(s),environment:r.environment,locale:r.locale,"portal-object":r.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(i=r.branding)?void 0:i.colors)?void 0:p.primary,"secondary-color":null==(m=null==(c=r.branding)?void 0:c.colors)?void 0:m.secondary,"experimental-features":r.experimentalFeatures,"log-level":r.logLevel,"on-log":r.onLog,"css-overrides":r.cssOverrides,onError:l[0]||(l[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(n.$props)),{default:e.withCtx(({paymentMethods:t,isLoading:n})=>[e.createVNode(o._sfc_main,{configuration:r.configuration,"payment-methods":t,"is-loading":n},null,8,["configuration","payment-methods","is-loading"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),i=t.defineCustomElement(l),s=t.getComponentName("customer-payment-methods");exports.COMPONENT_NAME=s,exports.SolvimonCustomerPaymentMethods=i,exports.defineSolvimonCustomerPaymentMethods=()=>{customElements.get(s)||customElements.define(s,i)};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
-
import { _ as _sfc_main$3 } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
4
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
5
|
-
import { u as usePaymentMethods } from "../../usePaymentMethods-
|
|
2
|
+
import { _ as _sfc_main$3 } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DEqfojR8.mjs";
|
|
3
|
+
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.mjs";
|
|
4
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-Cyp1xpuv.mjs";
|
|
5
|
+
import { u as usePaymentMethods } from "../../usePaymentMethods-C-NCtOom.mjs";
|
|
6
6
|
const DEFAULT_MAX_ITEMS = 3;
|
|
7
7
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "CustomerPaymentMethods.entry.view",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../useLoadInitialData-DjwRHcAH.js"),o=require("../../usePayments-DWXPGFvp.js"),n=require("../../component-BOqPDAVk.js"),i=require("../../vendor-ui-5pJF5KBP.js"),a=require("../../useViewport-CKRY1CKR.js"),r=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js"),l=e.defineComponent({__name:"Invoice.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(n){const i=n,a=o.useInvoice({invoiceId:i.configuration.invoiceId}),r=o.usePayments(),{isLoading:l}=t.useLoadInitialData(a.get(),r.get(i.configuration.invoiceId));return(t,o)=>e.renderSlot(t.$slots,"default",{invoice:e.unref(a).invoice.value,invoiceDownloadService:e.unref(a).downloadInvoicePdf,payments:e.unref(r),isLoading:e.unref(l)})}}),c={key:0,class:"mt-8"},s={class:"flex flex-col gap-6"},d=["onClick","onKeyup"],u={class:"ml-1 inline-flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-100 text-2xs font-bold text-blue-600"},p={key:0},m={class:"p-0"},f={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},v=e.defineComponent({__name:"InvoiceCreditsBreakdown",props:{invoice:{type:Object}},setup(t){const o=t,{formatDate:n,$t:a,formatMessage:r,formatNumber:l}=i.useIntl(),{getIsOpen:v,toggle:_}=i.useToggleList(),g=e.computed(()=>Object.fromEntries((o.invoice.credit_types??[]).map(e=>[e.id,e]))),y=e=>r({defaultMessage:"Service period - {startAt} - {endAt}",id:"wallet_balance.service_period_heading",description:"Heading shown above wallet balance details for an invoice period"},{startAt:n({date:e.start_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone}),endAt:n({date:e.end_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone})}),b=e=>{var t;return(null==e?void 0:e.credit_type_id)?(null==(t=g.value[e.credit_type_id])?void 0:t.name)??e.credit_type_id:r({defaultMessage:"Credits",id:"wallet_balance.credit_type_fallback_label",description:"Fallback label for wallet balance credit types when no name is available"})},w=e=>e?l(Number(e)):r({defaultMessage:"-",id:"empty_value_placeholder",description:"Placeholder shown when a wallet balance quantity is missing"}),h=e.computed(()=>(({invoice:e,getPeriodTitle:t,getCreditTypeLabel:o,formatQuantity:n})=>[...e.periods??[],...e.closed_periods??[]].map(e=>{var i,a,r,l;const c=new Map,s=new Map;for(const t of e.groups??[])for(const d of t.lines??[]){const u=null==(i=null==d?void 0:d.details)?void 0:i.wallet_balance_details;if(!u)continue;const p=u.used_wallet_credits??u.left_wallet_credits??u.available_wallet_credits,m=o(p),f={id:`${e.period_order}-${t.group_order}-${d.line_order}`,label:m,used:n(null==(a=u.used_wallet_credits)?void 0:a.quantity),left:n(null==(r=u.left_wallet_credits)?void 0:r.quantity),available:n(null==(l=u.available_wallet_credits)?void 0:l.quantity)},v=`${f.label}-${f.used}-${f.left}-${f.available}`,_=s.get(m)??new Set;if(_.has(v))continue;_.add(v),s.set(m,_);const g=c.get(m)??{id:`${e.period_order}-${m}`,label:m,amount:f.available,rows:[]};g.rows.push(f),c.set(m,g)}return{id:`${e.period_order}-${e.start_at}`,title:t(e),rows:[...c.values()]}}).filter(e=>e.rows.length>0))({invoice:o.invoice,getPeriodTitle:y,getCreditTypeLabel:b,formatQuantity:w}));return(t,o)=>h.value.length>0?(e.openBlock(),e.createElementBlock("section",c,[e.createElementVNode("div",s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,t=>(e.openBlock(),e.createElementBlock("section",{key:t.id},[e.createVNode(e.unref(i._sfc_main$16),{class:"mt-4"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main),{tag:"h3",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(i.InvoiceTable),{class:"mt-3"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$17),{left:"",class:"text-gray-600"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Wallet balance",id:"wallet_balance.details.header",description:"Section header for invoice wallet balance details"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.id},[e.createElementVNode("tr",{class:"cursor-pointer border-t",tabindex:"0",onClick:o=>e.unref(_)(t.id),onKeyup:[e.withKeys(o=>e.unref(_)(t.id),["enter"]),e.withKeys(o=>e.unref(_)(t.id),["space"])]},[e.createVNode(e.unref(i._sfc_main$18),{class:"p-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$6),{icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(v)(t.id)}])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(t.label)+" ",1),e.createElementVNode("span",u,e.toDisplayString(t.rows.length),1)]),_:2},1024)],40,d),e.unref(v)(t.id)?(e.openBlock(),e.createElementBlock("tr",p,[e.createElementVNode("td",m,[e.createElementVNode("div",f,[e.createVNode(e.unref(i.InvoiceTable),null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$17),{left:"",class:"w-2/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Credit breakdown",id:"invoice_credits.credit_breakdown.table_header",description:"Column header for wallet balance credit type details"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$17),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Balance",id:"invoice_credits.balance.table_header",description:"Column header for the available wallet balance amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$17),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Used",id:"invoice_credits.used.table_header",description:"Column header for the used wallet credit amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$17),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Remaining",id:"invoice_credits.remaining.table_header",description:"Column header for the remaining wallet credit amount"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock("tr",{key:t.id,class:"border-t"},[e.createVNode(e.unref(i._sfc_main$18),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$18),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.available),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$18),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.used),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$18),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.left),1)]),_:2},1024)]))),128))]),_:2},1024)])])])):e.createCommentVNode("",!0)],64))),128))]),_:2},1024)]))),128))])])):e.createCommentVNode("",!0)}}),_=e.defineComponent({__name:"InvoiceBlock",props:{invoice:{type:Object}},setup(t){const{$t:o}=i.useIntl(),{isMobileViewport:n}=a.useViewport();return(a,r)=>(e.openBlock(),e.createBlock(e.unref(i._sfc_main$1),{class:"sv-invoice__summary grow",title:e.unref(o)({defaultMessage:"Invoice",description:"Title for the invoice block on the invoice details page",id:"sdk.invoice_details.invoice.title"})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["sv-invoice__summary-body",{"p-6 pt-2":!e.unref(n)}])},[e.unref(n)?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$19),{key:0,variant:"default","has-icon":"",class:"sv-invoice__download-hint justify-center border-gray-100 bg-gray-50 font-semibold text-gray-800"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Download the PDF for a full breakdown",description:"Download the PDF for a full breakdown",id:"sdk.invoice_details.invoice.download_pdf"})),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(i._sfc_main$12),{class:"sv-invoice__summary-content",invoice:t.invoice,"is-expandable":!e.unref(n)},{logo:e.withCtx(()=>[e.renderSlot(a.$slots,"logo")]),_:3},8,["invoice","is-expandable"]),e.createVNode(v,{class:"sv-invoice__credits-breakdown",invoice:t.invoice},null,8,["invoice"])],2)]),_:3},8,["title"]))}}),g={class:"sv-invoice sv-root sv-component"},y={class:"sv-invoice__body flex flex-col gap-3 lg:flex-row lg:gap-6"},b={class:"sv-invoice__aside flex shrink-0 flex-col gap-8 lg:w-72 lg:gap-6"},w=e.defineComponent({__name:"Invoice",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup(t){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../../PaymentHistoryBlock-BiiFJkpT.js"))),{$t:n}=i.useIntl();return(a,l)=>{var c,s;return e.openBlock(),e.createElementBlock("div",g,[e.createVNode(e.unref(i._sfc_main$13),{class:"sv-invoice__header mb-6","payment-attempts":t.payments??[],invoice:t.invoice,"download-service":()=>t.invoiceDownloadService(t.invoice.id),"show-download-button":t.configuration.enableDownloadButton,variant:"external"},null,8,["payment-attempts","invoice","download-service","show-download-button"]),e.createElementVNode("div",y,[t.invoice?(e.openBlock(),e.createBlock(_,{key:0,class:"sv-invoice__main",invoice:t.invoice},null,8,["invoice"])):e.createCommentVNode("",!0),e.createElementVNode("div",b,[e.createVNode(r._sfc_main,{class:"sv-invoice__details",invoice:t.invoice},null,8,["invoice"]),(null==(c=t.configuration)?void 0:c.enablePaymentAttempts)&&(null==(s=t.payments)?void 0:s.length)?(e.openBlock(),e.createBlock(e.unref(o),{key:0,class:"sv-invoice__payment-history","payment-attempts":t.payments,customer:t.invoice.customer},null,8,["payment-attempts","customer"])):e.createCommentVNode("",!0),t.configuration.enableCustomerBillingInformation?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$2),{key:1,class:"sv-invoice__billing-information",customer:t.invoice.customer,title:e.unref(n)({defaultMessage:"Your billing information",description:"Title for the billing information on the detailed invoice view",id:"sdk.invoice_details.customer_billing_information.title"})},null,8,["customer","title"])):e.createCommentVNode("",!0)])])])}}}),h=e.defineComponent({__name:"Invoice.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){var o;const i=t;if(!(null==(o=i.configuration)?void 0:o.invoiceId))throw new Error("Missing invoice id");const a=e.computed(()=>({...i,configuration:{enableCustomerBillingInformation:!0,enableDownloadButton:!0,enablePaymentAttempts:!0,...i.configuration}}));return(o,i)=>{var r,c,s,d;return e.openBlock(),e.createBlock(e.unref(n._sfc_main),{"custom-element-name":e.unref(k),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(r=t.branding)?void 0:r.colors)?void 0:c.primary,"secondary-color":null==(d=null==(s=t.branding)?void 0:s.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:i[0]||(i[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(l,e.normalizeProps(e.guardReactiveProps(a.value)),{default:e.withCtx(({invoice:o,payments:n,isLoading:i,invoiceDownloadService:a})=>[o?(e.openBlock(),e.createBlock(w,{key:0,"is-loading":i,invoice:o,"invoice-download-service":a,payments:n.payments.value,configuration:t.configuration},null,8,["is-loading","invoice","invoice-download-service","payments","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),x=n.defineCustomElement(h),k=n.getComponentName("invoice");exports.COMPONENT_NAME=k,exports.SolvimonInvoice=x,exports.defineSolvimonInvoice=()=>{customElements.get(k)||customElements.define(k,x)};
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../useLoadInitialData-D0t-Lk3k.js"),o=require("../../usePayments-DADpdoI7.js"),n=require("../../component-By_A1VHh.js"),i=require("../../vendor-ui-1SHma7t1.js"),a=require("../../useViewport-CKRY1CKR.js"),r=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CFLR4ptB.js"),l=e.defineComponent({__name:"Invoice.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(n){const i=n,a=o.useInvoice({invoiceId:i.configuration.invoiceId}),r=o.usePayments(),{isLoading:l}=t.useLoadInitialData(a.get(),r.get(i.configuration.invoiceId));return(t,o)=>e.renderSlot(t.$slots,"default",{invoice:e.unref(a).invoice.value,invoiceDownloadService:e.unref(a).downloadInvoicePdf,payments:e.unref(r),isLoading:e.unref(l)})}}),c={key:0,class:"mt-8"},s={class:"flex flex-col gap-6"},d=["onClick","onKeyup"],u={class:"ml-1 inline-flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-100 text-2xs font-bold text-blue-600"},p={key:0},m={class:"p-0"},f={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},v=e.defineComponent({__name:"InvoiceCreditsBreakdown",props:{invoice:{type:Object}},setup(t){const o=t,{formatDate:n,$t:a,formatMessage:r,formatNumber:l}=i.useIntl(),{getIsOpen:v,toggle:_}=i.useToggleList(),g=e.computed(()=>Object.fromEntries((o.invoice.credit_types??[]).map(e=>[e.id,e]))),y=e=>r({defaultMessage:"Service period - {startAt} - {endAt}",id:"wallet_balance.service_period_heading",description:"Heading shown above wallet balance details for an invoice period"},{startAt:n({date:e.start_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone}),endAt:n({date:e.end_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone})}),b=e=>{var t;return(null==e?void 0:e.credit_type_id)?(null==(t=g.value[e.credit_type_id])?void 0:t.name)??e.credit_type_id:r({defaultMessage:"Credits",id:"wallet_balance.credit_type_fallback_label",description:"Fallback label for wallet balance credit types when no name is available"})},w=e=>e?l(Number(e)):r({defaultMessage:"-",id:"empty_value_placeholder",description:"Placeholder shown when a wallet balance quantity is missing"}),h=e.computed(()=>(({invoice:e,getPeriodTitle:t,getCreditTypeLabel:o,formatQuantity:n})=>[...e.periods??[],...e.closed_periods??[]].map(e=>{var i,a,r,l;const c=new Map,s=new Map;for(const t of e.groups??[])for(const d of t.lines??[]){const u=null==(i=null==d?void 0:d.details)?void 0:i.wallet_balance_details;if(!u)continue;const p=u.used_wallet_credits??u.left_wallet_credits??u.available_wallet_credits,m=o(p),f={id:`${e.period_order}-${t.group_order}-${d.line_order}`,label:m,used:n(null==(a=u.used_wallet_credits)?void 0:a.quantity),left:n(null==(r=u.left_wallet_credits)?void 0:r.quantity),available:n(null==(l=u.available_wallet_credits)?void 0:l.quantity)},v=`${f.label}-${f.used}-${f.left}-${f.available}`,_=s.get(m)??new Set;if(_.has(v))continue;_.add(v),s.set(m,_);const g=c.get(m)??{id:`${e.period_order}-${m}`,label:m,amount:f.available,rows:[]};g.rows.push(f),c.set(m,g)}return{id:`${e.period_order}-${e.start_at}`,title:t(e),rows:[...c.values()]}}).filter(e=>e.rows.length>0))({invoice:o.invoice,getPeriodTitle:y,getCreditTypeLabel:b,formatQuantity:w}));return(t,o)=>h.value.length>0?(e.openBlock(),e.createElementBlock("section",c,[e.createElementVNode("div",s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,t=>(e.openBlock(),e.createElementBlock("section",{key:t.id},[e.createVNode(e.unref(i._sfc_main$18),{class:"mt-4"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$1),{tag:"h3",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(i.InvoiceTable),{class:"mt-3"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$19),{left:"",class:"text-gray-600"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Wallet balance",id:"wallet_balance.details.header",description:"Section header for invoice wallet balance details"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.id},[e.createElementVNode("tr",{class:"cursor-pointer border-t",tabindex:"0",onClick:o=>e.unref(_)(t.id),onKeyup:[e.withKeys(o=>e.unref(_)(t.id),["enter"]),e.withKeys(o=>e.unref(_)(t.id),["space"])]},[e.createVNode(e.unref(i._sfc_main$20),{class:"p-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$6),{icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(v)(t.id)}])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(t.label)+" ",1),e.createElementVNode("span",u,e.toDisplayString(t.rows.length),1)]),_:2},1024)],40,d),e.unref(v)(t.id)?(e.openBlock(),e.createElementBlock("tr",p,[e.createElementVNode("td",m,[e.createElementVNode("div",f,[e.createVNode(e.unref(i.InvoiceTable),null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$19),{left:"",class:"w-2/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Credit breakdown",id:"invoice_credits.credit_breakdown.table_header",description:"Column header for wallet balance credit type details"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$19),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Balance",id:"invoice_credits.balance.table_header",description:"Column header for the available wallet balance amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$19),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Used",id:"invoice_credits.used.table_header",description:"Column header for the used wallet credit amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$19),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Remaining",id:"invoice_credits.remaining.table_header",description:"Column header for the remaining wallet credit amount"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock("tr",{key:t.id,class:"border-t"},[e.createVNode(e.unref(i._sfc_main$20),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$20),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.available),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$20),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.used),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$20),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.left),1)]),_:2},1024)]))),128))]),_:2},1024)])])])):e.createCommentVNode("",!0)],64))),128))]),_:2},1024)]))),128))])])):e.createCommentVNode("",!0)}}),_=e.defineComponent({__name:"InvoiceBlock",props:{invoice:{type:Object}},setup(t){const{$t:o}=i.useIntl(),{isMobileViewport:n}=a.useViewport();return(a,r)=>(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{class:"sv-invoice__summary grow",title:e.unref(o)({defaultMessage:"Invoice",description:"Title for the invoice block on the invoice details page",id:"sdk.invoice_details.invoice.title"})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["sv-invoice__summary-body",{"p-6 pt-2":!e.unref(n)}])},[e.unref(n)?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$21),{key:0,variant:"default","has-icon":"",class:"sv-invoice__download-hint justify-center border-gray-100 bg-gray-50 font-semibold text-gray-800"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Download the PDF for a full breakdown",description:"Download the PDF for a full breakdown",id:"sdk.invoice_details.invoice.download_pdf"})),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(i._sfc_main$13),{class:"sv-invoice__summary-content",invoice:t.invoice,"is-expandable":!e.unref(n)},{logo:e.withCtx(()=>[e.renderSlot(a.$slots,"logo")]),_:3},8,["invoice","is-expandable"]),e.createVNode(v,{class:"sv-invoice__credits-breakdown",invoice:t.invoice},null,8,["invoice"])],2)]),_:3},8,["title"]))}}),g={class:"sv-invoice sv-root sv-component"},y={class:"sv-invoice__body flex flex-col gap-3 lg:flex-row lg:gap-6"},b={class:"sv-invoice__aside flex shrink-0 flex-col gap-8 lg:w-72 lg:gap-6"},w=e.defineComponent({__name:"Invoice",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup(t){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../../PaymentHistoryBlock-DUeSRR3k.js"))),{$t:n}=i.useIntl();return(a,l)=>{var c,s;return e.openBlock(),e.createElementBlock("div",g,[e.createVNode(e.unref(i._sfc_main$14),{class:"sv-invoice__header mb-6","payment-attempts":t.payments??[],invoice:t.invoice,"download-service":()=>t.invoiceDownloadService(t.invoice.id),"show-download-button":t.configuration.enableDownloadButton,variant:"external"},null,8,["payment-attempts","invoice","download-service","show-download-button"]),e.createElementVNode("div",y,[t.invoice?(e.openBlock(),e.createBlock(_,{key:0,class:"sv-invoice__main",invoice:t.invoice},null,8,["invoice"])):e.createCommentVNode("",!0),e.createElementVNode("div",b,[e.createVNode(r._sfc_main,{class:"sv-invoice__details",invoice:t.invoice},null,8,["invoice"]),(null==(c=t.configuration)?void 0:c.enablePaymentAttempts)&&(null==(s=t.payments)?void 0:s.length)?(e.openBlock(),e.createBlock(e.unref(o),{key:0,class:"sv-invoice__payment-history","payment-attempts":t.payments,customer:t.invoice.customer},null,8,["payment-attempts","customer"])):e.createCommentVNode("",!0),t.configuration.enableCustomerBillingInformation?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$2),{key:1,class:"sv-invoice__billing-information",customer:t.invoice.customer,title:e.unref(n)({defaultMessage:"Your billing information",description:"Title for the billing information on the detailed invoice view",id:"sdk.invoice_details.customer_billing_information.title"})},null,8,["customer","title"])):e.createCommentVNode("",!0)])])])}}}),h=e.defineComponent({__name:"Invoice.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){var o;const i=t;if(!(null==(o=i.configuration)?void 0:o.invoiceId))throw new Error("Missing invoice id");const a=e.computed(()=>({...i,configuration:{enableCustomerBillingInformation:!0,enableDownloadButton:!0,enablePaymentAttempts:!0,...i.configuration}}));return(o,i)=>{var r,c,s,d;return e.openBlock(),e.createBlock(e.unref(n._sfc_main),{"custom-element-name":e.unref(k),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(r=t.branding)?void 0:r.colors)?void 0:c.primary,"secondary-color":null==(d=null==(s=t.branding)?void 0:s.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:i[0]||(i[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(l,e.normalizeProps(e.guardReactiveProps(a.value)),{default:e.withCtx(({invoice:o,payments:n,isLoading:i,invoiceDownloadService:a})=>[o?(e.openBlock(),e.createBlock(w,{key:0,"is-loading":i,invoice:o,"invoice-download-service":a,payments:n.payments.value,configuration:t.configuration},null,8,["is-loading","invoice","invoice-download-service","payments","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),x=n.defineCustomElement(h),k=n.getComponentName("invoice");exports.COMPONENT_NAME=k,exports.SolvimonInvoice=x,exports.defineSolvimonInvoice=()=>{customElements.get(k)||customElements.define(k,x)};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, renderSlot, unref, computed, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createVNode, withCtx, createTextVNode, toDisplayString, withKeys, normalizeClass, createCommentVNode, createBlock, defineAsyncComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
3
|
-
import { u as useInvoice, a as usePayments } from "../../usePayments-
|
|
4
|
-
import { _ as _sfc_main$g, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
5
|
-
import { u as useIntl,
|
|
2
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-Cyp1xpuv.mjs";
|
|
3
|
+
import { u as useInvoice, a as usePayments } from "../../usePayments-BtByiIMy.mjs";
|
|
4
|
+
import { _ as _sfc_main$g, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.mjs";
|
|
5
|
+
import { u as useIntl, E as useToggleList, F as _sfc_main$5, b as _sfc_main$6, I as InvoiceTable, G as _sfc_main$7, H as _sfc_main$8, l as _sfc_main$9, _ as _sfc_main$a, J as _sfc_main$b, z as _sfc_main$c, A as _sfc_main$d, c as _sfc_main$f } from "../../vendor-ui-CdOX_IS-.mjs";
|
|
6
6
|
import { u as useViewport } from "../../useViewport-Bu0cyeSi.mjs";
|
|
7
|
-
import { _ as _sfc_main$e } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as _sfc_main$e } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-COnrD4ew.mjs";
|
|
8
8
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "Invoice.entry.view",
|
|
10
10
|
props: {
|
|
@@ -409,7 +409,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
409
409
|
},
|
|
410
410
|
setup(__props) {
|
|
411
411
|
const PaymentHistoryBlock = defineAsyncComponent(
|
|
412
|
-
() => import("../../PaymentHistoryBlock-
|
|
412
|
+
() => import("../../PaymentHistoryBlock-BTRFc4ki.mjs")
|
|
413
413
|
);
|
|
414
414
|
const { $t } = useIntl();
|
|
415
415
|
return (_ctx, _cache) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CFLR4ptB.js"),t=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("../../useInvoiceData-HNnt3703.js"),i=require("../../component-By_A1VHh.js"),r=e.defineComponent({__name:"InvoiceDetails",props:{invoice:{type:Object},isLoading:{type:Boolean},configuration:{type:Object}},setup:n=>(i,r)=>n.isLoading?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,variant:"section",class:"sv-invoice-details sv-root sv-component sv-loading min-h-[100px]","data-testid":"invoice-details-skeleton"})):(e.openBlock(),e.createBlock(o._sfc_main,{key:1,class:"sv-invoice-details sv-root sv-component",invoice:n.invoice},null,8,["invoice"]))}),a=e.defineComponent({__name:"InvoiceDetails.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){const t=o,i=n.useInvoiceData(t.configuration.invoiceId);return(o,t)=>{var n;return e.renderSlot(o.$slots,"default",{invoice:null==(n=e.unref(i).data.value)?void 0:n.invoice,isLoading:e.unref(i).isPending.value})}}}),l=e.defineComponent({__name:"InvoiceDetails.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){var t;if(!(null==(t=o.configuration)?void 0:t.invoiceId))throw new Error("Missing invoice id");return(t,n)=>{var l,s,p,v;return e.openBlock(),e.createBlock(e.unref(i._sfc_main),{"custom-element-name":e.unref(c),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(l=o.branding)?void 0:l.colors)?void 0:s.primary,"secondary-color":null==(v=null==(p=o.branding)?void 0:p.colors)?void 0:v.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:n[0]||(n[0]=e=>t.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(({invoice:t,isLoading:n})=>[t?(e.openBlock(),e.createBlock(r,{key:0,"is-loading":n,invoice:t,configuration:o.configuration},null,8,["is-loading","invoice","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),s=i.defineCustomElement(l),c=i.getComponentName("invoice-details");exports.COMPONENT_NAME=c,exports.SolvimonInvoiceDetails=s,exports.defineSolvimonInvoiceDetails=()=>{customElements.get(c)||customElements.define(c,s)};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, renderSlot, unref, withCtx, createVNode, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
|
|
2
|
-
import { _ as _sfc_main$4 } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as _sfc_main$4 } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-COnrD4ew.mjs";
|
|
3
3
|
import { _ as _sfc_main$3 } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
4
|
-
import { u as useInvoiceData } from "../../useInvoiceData-
|
|
5
|
-
import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
4
|
+
import { u as useInvoiceData } from "../../useInvoiceData-Bz4a2Mfa.mjs";
|
|
5
|
+
import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../useInvoicesList-DXBTGdcI.js"),t=require("../../useLoadInitialData-D0t-Lk3k.js"),r=require("../../component-By_A1VHh.js"),n=e.defineComponent({__name:"InvoicesList.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(r){var n,i;const a=r,s=a.portalObject.customer_id,l=o.useInvoicesList({customerId:s,batchSize:(null==(i=null==(n=a.configuration)?void 0:n.pagination)?void 0:i.batchSize)||15}),{isLoading:c}=t.useLoadInitialData(l.fetchInitial());return(o,t)=>e.renderSlot(o.$slots,"default",{isLoading:e.unref(c),invoices:e.unref(l)})}}),i=e.defineComponent({__name:"InvoicesList.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:t=>(i,a)=>{var l,c,p,y;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(s),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(l=t.branding)?void 0:l.colors)?void 0:c.primary,"secondary-color":null==(y=null==(p=t.branding)?void 0:p.colors)?void 0:y.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:a[0]||(a[0]=e=>i.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(n,e.normalizeProps(e.guardReactiveProps(i.$props)),{default:e.withCtx(({invoices:r,isLoading:n})=>[e.createVNode(o._sfc_main,{configuration:t.configuration,invoices:r.items.value,"is-loading":n,"has-more-items":r.hasNextBatch.value,onLoadMore:r.fetchMore},null,8,["configuration","invoices","is-loading","has-more-items","onLoadMore"])]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),a=r.defineCustomElement(i),s=r.getComponentName("invoices-list");exports.COMPONENT_NAME=s,exports.SolvimonInvoicesList=a,exports.defineSolvimonInvoicesList=()=>{customElements.get(s)||customElements.define(s,a)};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, renderSlot, unref, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
-
import { u as useInvoicesList, _ as _sfc_main$3 } from "../../useInvoicesList-
|
|
3
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
4
|
-
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
2
|
+
import { u as useInvoicesList, _ as _sfc_main$3 } from "../../useInvoicesList-b2_fiHsc.mjs";
|
|
3
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-Cyp1xpuv.mjs";
|
|
4
|
+
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-TgZYSSQe.js"),o=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("../../useInvoiceData-HNnt3703.js"),r=require("../../component-By_A1VHh.js"),a=e.defineComponent({__name:"PaymentHistory",props:{customer:{type:Object},paymentAttempts:{type:Array},isLoading:{type:Boolean},configuration:{type:Object}},setup:n=>(r,a)=>n.isLoading?(e.openBlock(),e.createBlock(o._sfc_main,{key:0,variant:"section",class:"sv-payment-history sv-root sv-component sv-loading min-h-[100px]","data-testid":"payment-history-skeleton"})):n.paymentAttempts.length?(e.openBlock(),e.createBlock(t._sfc_main,{key:1,class:"sv-payment-history sv-root sv-component","payment-attempts":n.paymentAttempts,customer:n.customer},null,8,["payment-attempts","customer"])):e.createCommentVNode("",!0)}),i=e.defineComponent({__name:"PaymentHistory.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const o=t,r=n.useInvoiceData(o.configuration.invoiceId);return(t,o)=>{var n,a;return e.renderSlot(t.$slots,"default",{invoice:null==(n=e.unref(r).data.value)?void 0:n.invoice,paymentAttempts:null==(a=e.unref(r).data.value)?void 0:a.paymentAttempts.data,isLoading:e.unref(r).isPending.value})}}}),s=e.defineComponent({__name:"PaymentHistory.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){var o;if(!(null==(o=t.configuration)?void 0:o.invoiceId))throw new Error("Missing invoice id");return(o,n)=>{var s,l,c,y;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(p),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(s=t.branding)?void 0:s.colors)?void 0:l.primary,"secondary-color":null==(y=null==(c=t.branding)?void 0:c.colors)?void 0:y.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:n[0]||(n[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(o.$props)),{default:e.withCtx(({invoice:o,paymentAttempts:n,isLoading:r})=>[o&&n?(e.openBlock(),e.createBlock(a,{key:0,"is-loading":r,customer:o.customer,"payment-attempts":n,configuration:t.configuration},null,8,["is-loading","customer","payment-attempts","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),l=r.defineCustomElement(s),p=r.getComponentName("payment-history");exports.COMPONENT_NAME=p,exports.SolvimonPaymentHistory=l,exports.defineSolvimonPaymentHistory=()=>{customElements.get(p)||customElements.define(p,l)};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, createCommentVNode, renderSlot, unref, withCtx, createVNode, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
-
import { _ as _sfc_main$4 } from "../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as _sfc_main$4 } from "../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-GeyErAW6.mjs";
|
|
3
3
|
import { _ as _sfc_main$3 } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
4
|
-
import { u as useInvoiceData } from "../../useInvoiceData-
|
|
5
|
-
import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
4
|
+
import { u as useInvoiceData } from "../../useInvoiceData-Bz4a2Mfa.mjs";
|
|
5
|
+
import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.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-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-By_A1VHh.js"),o=require("../../vendor-ui-1SHma7t1.js"),n=require("../../useLoadInitialData-D0t-Lk3k.js"),r=require("../../useCustomer-D9ZrqMFY.js"),a=require("../../usePaymentMethodOptions-DgGDcVeE.js"),i=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),s=require("../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BhGQB-c9.js"),l=e.defineComponent({__name:"PaymentMethodForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(t){const i=t,s=r.useCustomer({customerId:i.portalObject.customer_id}),l=a.usePaymentMethodOptions(),{isLoading:c}=n.useLoadInitialData((async()=>{var e;const t=await s.get.execute(),n=o.getCustomerCountry(t);await l.get({customerId:t.id,country:n,amount:null==(e=i.configuration)?void 0:e.amount})})());return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(s).customer.value,paymentMethodOptions:e.unref(l),isLoading:e.unref(c)})}}),c=e.defineComponent({__name:"PaymentMethodForm",props:{customer:{type:Object},paymentMethodOptions:{type:Array},configuration:{type:Object},isLoading:{type:Boolean,default:!1},countryCode:{type:String}},setup(t){const n={currency:"EUR",quantity:"0"},r=t,{$t:a}=o.useIntl(),l=e.computed(()=>{return"AUTHORIZE"===(null==(e=r.configuration)?void 0:e.variant)?e:{...e,variant:"TOKENIZE"};var e}),c=e.computed(()=>{let e="NL";if(r.countryCode)return e=r.countryCode,e;if(r.customer){const t=o.getCustomerCountry(r.customer);if(t)return e=t,e}return"NL"}),u=e.computed(()=>"AUTHORIZE"===l.value.variant?{paymentMethodOptions:r.paymentMethodOptions,countryCode:c.value,variant:"AUTHORIZE",amount:l.value.amount,context:l.value.context,invoiceId:l.value.invoiceId,successRedirectUrl:l.value.successRedirectUrl,selectedOption:l.value.selectedOption,validateOnSubmit:l.value.validateOnSubmit,forceStorePaymentMethod:l.value.forceStorePaymentMethod}:{paymentMethodOptions:r.paymentMethodOptions,customerId:r.customer.id,countryCode:c.value,variant:"TOKENIZE",amount:l.value.amount??n,invoiceId:l.value.invoiceId,successRedirectUrl:l.value.successRedirectUrl,selectedOption:l.value.selectedOption,validateOnSubmit:l.value.validateOnSubmit,forceStorePaymentMethod:l.value.forceStorePaymentMethod});return(n,r)=>t.isLoading?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,variant:"section",class:"sv-payment-method-form sv-root sv-component sv-loading min-h-[180px]","data-testid":"payment-method-form-skeleton"})):(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:1,class:"sv-payment-method-form sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:e.unref(a)({defaultMessage:"Available payment methods",description:"Title of the available payment methods form",id:"components.payment_method_form.section_title"})},{default:e.withCtx(()=>[e.createVNode(s._sfc_main,e.mergeProps({class:"sv-payment-method-form__integration"},u.value),null,16)]),_:1},8,["title"]))}}),u=e.defineComponent({__name:"PaymentMethodForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(o){const n=o;return(r,a)=>{var i,s,u,m;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(p),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(i=o.branding)?void 0:i.colors)?void 0:s.primary,"secondary-color":null==(m=null==(u=o.branding)?void 0:u.colors)?void 0:m.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:a[0]||(a[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(l,e.normalizeProps(e.guardReactiveProps(n)),{default:e.withCtx(({customer:t,paymentMethodOptions:n,isLoading:r})=>[t?(e.openBlock(),e.createBlock(c,{key:0,customer:t,"payment-method-options":n.paymentMethodOptions.value,configuration:o.configuration,"is-loading":r},null,8,["customer","payment-method-options","configuration","is-loading"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),m=t.defineCustomElement(u),p=t.getComponentName("payment-method-form");exports.COMPONENT_NAME=p,exports.SolvimonPaymentMethodForm=m,exports.defineSolvimonPaymentMethodForm=()=>{customElements.get(p)||customElements.define(p,m)};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent, renderSlot, unref, computed, openBlock, createBlock, withCtx, createVNode, mergeProps, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
|
|
2
|
-
import { _ as _sfc_main$6, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
3
|
-
import {
|
|
4
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
5
|
-
import { u as useCustomer } from "../../useCustomer-
|
|
6
|
-
import { u as usePaymentMethodOptions } from "../../usePaymentMethodOptions-
|
|
2
|
+
import { _ as _sfc_main$6, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.mjs";
|
|
3
|
+
import { x as getCustomerCountry, u as useIntl, _ as _sfc_main$4 } from "../../vendor-ui-CdOX_IS-.mjs";
|
|
4
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-Cyp1xpuv.mjs";
|
|
5
|
+
import { u as useCustomer } from "../../useCustomer-DUA8Y-2I.mjs";
|
|
6
|
+
import { u as usePaymentMethodOptions } from "../../usePaymentMethodOptions-r0Opz7BC.mjs";
|
|
7
7
|
import { _ as _sfc_main$3 } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
8
|
-
import { _ as _sfc_main$5 } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as _sfc_main$5 } from "../../PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Dkd-Cp8c.mjs";
|
|
9
9
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
10
10
|
__name: "PaymentMethodForm.entry.view",
|
|
11
11
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-By_A1VHh.js"),n=require("../../vendor-ui-1SHma7t1.js"),r=require("../../useService-C0h9UlQW.js"),o=require("../../subscriptions-CcpEwubd.js"),i=require("../../useLoadInitialData-D0t-Lk3k.js"),s=e.defineComponent({__name:"SubscriptionSchedules",props:{schedulesData:{type:Array},configuration:{type:Object},isLoading:{type:Boolean}},setup(t){const{$t:r}=n.useIntl();return(o,i)=>(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{class:"sv-subscription-schedules sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:e.unref(r)({defaultMessage:"Schedules",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(e.unref(n.PricingPlanSchedules),{class:"sv-subscription-schedules__list",schedules:t.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},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const n=t,{subscription:s,withPlanData:a,get:l}=function({subscriptionId:e}){const{getSubscription:t}=o.createSubscriptionsService(),{data:n,execute:i,apiStatus:s,error:a,isPending:l}=r.useService({service:()=>t({id:e,expanded:!0})});return{subscription:n,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:s,error:a,get:i,isPending:l}}({subscriptionId:n.configuration.subscriptionId}),{isLoading:c}=i.useLoadInitialData(l());return(t,n)=>e.renderSlot(t.$slots,"default",{schedulesData:e.unref(s)?e.unref(a)(e.unref(s)):void 0,isLoading:e.unref(c)})}}),l=e.defineComponent({__name:"SubscriptionSchedules.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(n){const r=n;return(o,i)=>{var l,c,u,d;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(p),environment:n.environment,locale:n.locale,"portal-object":n.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(c=null==(l=n.branding)?void 0:l.colors)?void 0:c.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,"css-overrides":n.cssOverrides,onError:i[0]||(i[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(a,e.normalizeProps(e.guardReactiveProps(r)),{default:e.withCtx(({schedulesData:t,isLoading:r})=>[t?(e.openBlock(),e.createBlock(s,{key:0,"schedules-data":t,"is-loading":r,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","css-overrides"])}}}),c=t.defineCustomElement(l),p=t.getComponentName("subscription-schedules");exports.COMPONENT_NAME=p,exports.SolvimonSubscriptionSchedules=c,exports.defineSolvimonSubscriptionSchedules=()=>{customElements.get(p)||customElements.define(p,c)};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
|
|
2
|
-
import { _ as _sfc_main$4, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
3
|
-
import { u as useIntl,
|
|
4
|
-
import { u as useService } from "../../useService-
|
|
5
|
-
import { c as createSubscriptionsService } from "../../subscriptions-
|
|
6
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
2
|
+
import { _ as _sfc_main$4, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.mjs";
|
|
3
|
+
import { u as useIntl, _ as _sfc_main$3, P as PricingPlanSchedules } from "../../vendor-ui-CdOX_IS-.mjs";
|
|
4
|
+
import { u as useService } from "../../useService-BcYQRxPS.mjs";
|
|
5
|
+
import { c as createSubscriptionsService } from "../../subscriptions-BIGqt2N0.mjs";
|
|
6
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-Cyp1xpuv.mjs";
|
|
7
7
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "SubscriptionSchedules",
|
|
9
9
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../SubscriptionsList.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../SubscriptionsList.vue_vue_type_script_setup_true_lang-D-hpJL8I.js"),t=require("../../component-By_A1VHh.js"),r=require("../../useCustomer-D9ZrqMFY.js"),n=require("../../useLoadInitialData-D0t-Lk3k.js"),s=require("../../usePaymentMethods-BHLXXaCa.js"),i=e.defineComponent({__name:"SubscriptionsList.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(i){const l=i.portalObject.customer_id,a=r.useCustomer({customerId:l}),p=o.useSubscriptionsList({customerId:l}),u=s.usePaymentMethods({customerId:l}),{isLoading:m}=n.useLoadInitialData(a.get.execute(),p.fetchInitial(),u.fetchAll());return(o,r)=>{var n,s,l,d;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(c),environment:i.environment,locale:i.locale,"portal-object":i.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(n=i.branding)?void 0:n.colors)?void 0:s.primary,"secondary-color":null==(d=null==(l=i.branding)?void 0:l.colors)?void 0:d.secondary,"experimental-features":i.experimentalFeatures,"log-level":i.logLevel,"on-log":i.onLog,"css-overrides":i.cssOverrides,onError:r[0]||(r[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{customer:e.unref(a),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","css-overrides"])}}}),l=e.defineComponent({__name:"SubscriptionsList.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:r=>(n,s)=>{var l,a,p,u;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(c),environment:r.environment,locale:r.locale,"portal-object":r.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(a=null==(l=r.branding)?void 0:l.colors)?void 0:a.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,"css-overrides":r.cssOverrides,onError:s[0]||(s[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:s,isLoading:i,loadMore:l})=>[e.createVNode(o._sfc_main,{configuration:r.configuration,customer:t.customer.value,subscriptions:n.value,"payment-methods":s.value,"is-loading":i,onLoadMore:l},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","css-overrides"])}}),a=t.defineCustomElement(l),c=t.getComponentName("subscriptions-list");exports.COMPONENT_NAME=c,exports.SolvimonSubscriptionsList=a,exports.defineSolvimonSubscriptionsList=()=>{customElements.get(c)||customElements.define(c,a)};
|
|
@@ -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-
|
|
3
|
-
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
4
|
-
import { u as useCustomer } from "../../useCustomer-
|
|
5
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
6
|
-
import { u as usePaymentMethods } from "../../usePaymentMethods-
|
|
2
|
+
import { u as useSubscriptionsList, _ as _sfc_main$3 } from "../../SubscriptionsList.vue_vue_type_script_setup_true_lang-B7IOIy-v.mjs";
|
|
3
|
+
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.mjs";
|
|
4
|
+
import { u as useCustomer } from "../../useCustomer-DUA8Y-2I.mjs";
|
|
5
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-Cyp1xpuv.mjs";
|
|
6
|
+
import { u as usePaymentMethods } from "../../usePaymentMethods-C-NCtOom.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("../../ApiStatus-oqvUEWJx.js"),a=require("../../useWalletBalanceItems-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../ApiStatus-oqvUEWJx.js"),a=require("../../useWalletBalanceItems-COzKSpmt.js"),r=require("../../useLoadInitialData-D0t-Lk3k.js"),l=require("../../component-By_A1VHh.js"),o=e.defineComponent({__name:"WalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array}},setup:t=>(r,l)=>(e.openBlock(),e.createBlock(a._sfc_main,{class:"sv-wallet-balances sv-root sv-component","has-error":t.hasError,"is-loading":t.isLoading,"wallet-balances":t.walletBalances},null,8,["has-error","is-loading","wallet-balances"]))}),n=e.defineComponent({__name:"WalletBalances.entry.view",props:{portalObject:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(t){const l=t.portalObject.customer_id,o=a.useCustomerWalletBalances({customerId:l}),n=a.useWalletBalanceItems(o.walletBalances),{isLoading:s}=r.useLoadInitialData(o.fetch());return(t,a)=>e.renderSlot(t.$slots,"default",{customerWalletBalances:e.unref(o),walletBalanceItems:e.unref(n),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},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup:a=>(r,s)=>{var i,p,m,u;return e.openBlock(),e.createBlock(e.unref(l._sfc_main),{"custom-element-name":e.unref(c),environment:a.environment,locale:a.locale,"portal-object":a.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(i=a.branding)?void 0:i.colors)?void 0:p.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,"css-overrides":a.cssOverrides,onError:s[0]||(s[0]=e=>r.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(n,e.normalizeProps(e.guardReactiveProps(r.$props)),{default:e.withCtx(({customerWalletBalances:a,walletBalanceItems:r,isLoading:l})=>[e.createVNode(o,{"has-error":a.apiStatus.value===e.unref(t.ApiStatus).Failed,"is-loading":l,"wallet-balances":r},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","css-overrides"])}}),i=l.defineCustomElement(s),c=l.getComponentName("wallet-balances");exports.COMPONENT_NAME=c,exports.SolvimonWalletBalances=i,exports.defineSolvimonWalletBalances=()=>{customElements.get(c)||customElements.define(c,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 "../../ApiStatus-CyNDp_op.mjs";
|
|
3
|
-
import { _ as _sfc_main$3, u as useCustomerWalletBalances, a as useWalletBalanceItems } from "../../useWalletBalanceItems-
|
|
4
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
5
|
-
import { _ as _sfc_main$4, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
3
|
+
import { _ as _sfc_main$3, u as useCustomerWalletBalances, a as useWalletBalanceItems } from "../../useWalletBalanceItems-DKz-2vUy.mjs";
|
|
4
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-Cyp1xpuv.mjs";
|
|
5
|
+
import { _ as _sfc_main$4, d as defineCustomElement, g as getComponentName } from "../../component-CGfjV_7z.mjs";
|
|
6
6
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "WalletBalances",
|
|
8
8
|
props: {
|
|
@@ -42,6 +42,12 @@ export interface ActionRequestDetailRenewSubscription extends ActionRequestDetai
|
|
|
42
42
|
subscriptionId: string;
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
+
export interface ActionRequestDetailUpgradeSubscription extends ActionRequestDetailBase {
|
|
46
|
+
action: 'upgrade-subscription';
|
|
47
|
+
data: {
|
|
48
|
+
subscriptionId: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
45
51
|
export interface ActionRequestDetailEditBillingInformation extends ActionRequestDetailBase {
|
|
46
52
|
action: 'edit-billing-information';
|
|
47
53
|
}
|
|
@@ -51,7 +57,10 @@ export interface ActionRequestDetailViewAllPaymentMethods extends ActionRequestD
|
|
|
51
57
|
export interface ActionRequestDetailAddPaymentMethod extends ActionRequestDetailBase {
|
|
52
58
|
action: 'add-payment-method';
|
|
53
59
|
}
|
|
54
|
-
export
|
|
60
|
+
export interface ActionRequestDetailNavigateToCustomerOverview extends ActionRequestDetailBase {
|
|
61
|
+
action: 'navigate-to-customer-overview';
|
|
62
|
+
}
|
|
63
|
+
export type ActionRequestDetail = ActionRequestDetailViewInvoice | ActionRequestDetailPayInvoice | ActionRequestDetailViewSubscriptionDetails | ActionRequestDetailViewAllSubscriptions | ActionRequestDetailCancelSubscription | ActionRequestDetailRenewSubscription | ActionRequestDetailUpgradeSubscription | ActionRequestDetailEditBillingInformation | ActionRequestDetailViewAllPaymentMethods | ActionRequestDetailAddPaymentMethod | ActionRequestDetailNavigateToCustomerOverview;
|
|
55
64
|
/**
|
|
56
65
|
* Type for the 'action-request' custom event. Use when listening for action-request on document or container.
|
|
57
66
|
*/
|
package/dist/core/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../registry-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../registry-DrV0jFnM.js");exports.createSolvimonCore=e.createSolvimonCore,exports.getRegisteredComponentIds=e.getRegisteredComponentIds,exports.getRegisteredScreenIds=e.getRegisteredScreenIds;
|
package/dist/core/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createRequestService, u as useConfig } from "./component-
|
|
1
|
+
import { c as createRequestService, u as useConfig } from "./component-CGfjV_7z.mjs";
|
|
2
2
|
function createCustomerService() {
|
|
3
3
|
const request = createRequestService();
|
|
4
4
|
const config = useConfig();
|