@solvimon/solvimon-web 0.1.0-alpha.15 → 0.1.0-alpha.16
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-xuCWAVgf.js → BillingInformation.vue_vue_type_script_setup_true_lang-BI3Lg7nO.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-ugPPvTKf.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BYBAO4Au.mjs} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D_PE2UbX.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CTnn1gkW.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BpN9nSMC.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C_uHr21N.js} +1 -1
- package/dist/{PaymentIntegrationForm-BGxjGJGz.mjs → PaymentIntegrationForm-CypW6fZY.mjs} +1 -1
- package/dist/{PaymentIntegrationForm-liOVNKEG.js → PaymentIntegrationForm-D4QupHWl.js} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BBEM-YPz.js +1 -0
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-aP-gCq7V.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CrGSfZZs.mjs} +5 -5
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-h-JUw1DV.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-B8eNptZp.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-DfdaWRO0.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-eWmC5GOT.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-j5VNsyu7.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BUTqn4Ey.mjs} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DxndhDxR.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-Be_fF-R_.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-D6hHXndB.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-56vu59V4.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Cv6lz35J.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DB1p61kZ.mjs} +2 -2
- package/dist/{component-BSnccqm1.mjs → component-Bg2JVC_O.mjs} +1 -1
- package/dist/{component-B53Df2Rt.js → component-Bs8oszfD.js} +1 -1
- 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 +2 -2
- 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 +3 -3
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +2 -2
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.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 +2 -2
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +5 -5
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +3 -3
- 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/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/{customer-CANPEYH9.mjs → customer-Bv_fqXzO.mjs} +1 -1
- package/dist/{customer-B5b2tLhw.js → customer-_W8gIX5m.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{invoices-DBv0qkgm.mjs → invoices-BGb0AwVF.mjs} +1 -1
- package/dist/{invoices-BCmE_nnb.js → invoices-D-OKipCg.js} +1 -1
- package/dist/{paymentMethods-u5y9B5ng.js → paymentMethods-DIbB759g.js} +1 -1
- package/dist/{paymentMethods-D-5FNN8W.mjs → paymentMethods-DvqlWe96.mjs} +1 -1
- package/dist/{payments-BK8yzqJ5.mjs → payments-CpzTVrQM.mjs} +1 -1
- package/dist/{payments-BTTtcfyI.js → payments-DMDDI3MK.js} +1 -1
- package/dist/{registry-CMo7X2FD.mjs → registry-B-If1W_u.mjs} +1 -1
- package/dist/{registry-Cx7p19-6.js → registry-uG2isab0.js} +1 -1
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +8 -8
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +11 -11
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
- package/dist/screens/PayInvoice/PayInvoice.es.js +6 -6
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +7 -7
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +8 -8
- package/dist/{subscriptions-DHjXDyH1.mjs → subscriptions-BPYyv09M.mjs} +1 -1
- package/dist/{subscriptions-AMC4DirD.js → subscriptions-CC61I6Nj.js} +1 -1
- package/dist/{useActionDispatchProvider-CizNgRwv.js → useActionDispatchProvider-BHTknMoH.js} +1 -1
- package/dist/{useActionDispatchProvider-DmhD9mYX.mjs → useActionDispatchProvider-Dz8-e4gZ.mjs} +1 -1
- package/dist/{useCustomer-DCPq7eHM.mjs → useCustomer-VVJi8z2w.mjs} +1 -1
- package/dist/{useCustomer-DYc54GVD.js → useCustomer-Z24KchWC.js} +1 -1
- package/dist/{useInvoiceData-BajCyf-x.js → useInvoiceData-Bl87gzIS.js} +1 -1
- package/dist/{useInvoiceData-BgtUKbHY.mjs → useInvoiceData-Di5pLPM0.mjs} +2 -2
- package/dist/{useInvoicesList-wnvjyB_H.js → useInvoicesList-CFk-_oVK.js} +1 -1
- package/dist/{useInvoicesList-DRD5yix0.mjs → useInvoicesList-z19cteaD.mjs} +2 -2
- package/dist/{useLoadInitialData-BObRB7Vo.js → useLoadInitialData-CTqfiMTN.js} +1 -1
- package/dist/{useLoadInitialData-IlbmC6p0.mjs → useLoadInitialData-CkpryfjF.mjs} +1 -1
- package/dist/{usePaymentMethodOptions-DRkWBjv6.mjs → usePaymentMethodOptions-BoGHJjng.mjs} +1 -1
- package/dist/{usePaymentMethodOptions-CzqsebhN.js → usePaymentMethodOptions-BsCZnCQW.js} +1 -1
- package/dist/{usePaymentMethods-ZPxKg5Y3.js → usePaymentMethods-AC-4rrR9.js} +1 -1
- package/dist/{usePaymentMethods-DFkRNreh.mjs → usePaymentMethods-ocHmNoP7.mjs} +1 -1
- package/dist/{usePayments-DwiGafZj.js → usePayments-CgXZeWrU.js} +1 -1
- package/dist/{usePayments-E_Jsqo98.mjs → usePayments-D85eB5l4.mjs} +2 -2
- package/dist/{usePortal-DcOz9FEL.mjs → usePortal-B1O1zgdV.mjs} +1 -1
- package/dist/{usePortal-CxTS2TQh.js → usePortal-DVD7PcWI.js} +1 -1
- package/dist/{useWalletBalanceItems-BQEXDCBg.js → useWalletBalanceItems-BL-R5foK.js} +1 -1
- package/dist/{useWalletBalanceItems-MlHgedWR.mjs → useWalletBalanceItems-COQDLfoZ.mjs} +1 -1
- package/package.json +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BxdcIX-Z.js +0 -1
|
@@ -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-CTnn1gkW.mjs";
|
|
3
|
+
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-Bg2JVC_O.mjs";
|
|
4
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-CkpryfjF.mjs";
|
|
5
|
+
import { u as usePaymentMethods } from "../../usePaymentMethods-ocHmNoP7.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-BObRB7Vo.js"),o=require("../../usePayments-DwiGafZj.js"),n=require("../../component-B53Df2Rt.js"),i=require("../../vendor-ui-C3Tq-qY_.js"),a=require("../../InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js"),r=require("../../useViewport-CKRY1CKR.js"),l=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js"),c=e.defineComponent({__name:"Invoice.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(n){const i=n,a=o.useInvoice({invoiceId:i.configuration.invoiceId}),r=o.usePayments(),{isLoading:l}=t.useLoadInitialData(a.get(),r.get(i.configuration.invoiceId));return(t,o)=>e.renderSlot(t.$slots,"default",{invoice:e.unref(a).invoice.value,invoiceDownloadService:e.unref(a).downloadInvoicePdf,payments:e.unref(r),isLoading:e.unref(l)})}}),s={key:0,class:"mt-8"},d={class:"flex flex-col gap-6"},u=["onClick","onKeyup"],p={class:"ml-1 inline-flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-100 text-2xs font-bold text-blue-600"},m={key:0},f={class:"p-0"},v={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},_=e.defineComponent({__name:"InvoiceCreditsBreakdown",props:{invoice:{type:Object}},setup(t){const o=t,{formatDate:n,$t:a,formatMessage:r,formatNumber:l}=i.useIntl(),{getIsOpen:c,toggle:_}=i.useToggleList(),g=e.computed(()=>Object.fromEntries((o.invoice.credit_types??[]).map(e=>[e.id,e]))),y=e=>r({defaultMessage:"Service period - {startAt} - {endAt}",id:"wallet_balance.service_period_heading",description:"Heading shown above wallet balance details for an invoice period"},{startAt:n({date:e.start_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone}),endAt:n({date:e.end_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone})}),b=e=>{var t;return(null==e?void 0:e.credit_type_id)?(null==(t=g.value[e.credit_type_id])?void 0:t.name)??e.credit_type_id:r({defaultMessage:"Credits",id:"wallet_balance.credit_type_fallback_label",description:"Fallback label for wallet balance credit types when no name is available"})},w=e=>e?l(Number(e)):r({defaultMessage:"-",id:"empty_value_placeholder",description:"Placeholder shown when a wallet balance quantity is missing"}),h=e.computed(()=>(({invoice:e,getPeriodTitle:t,getCreditTypeLabel:o,formatQuantity:n})=>[...e.periods??[],...e.closed_periods??[]].map(e=>{var i,a,r,l;const c=new Map,s=new Map;for(const t of e.groups??[])for(const d of t.lines??[]){const u=null==(i=null==d?void 0:d.details)?void 0:i.wallet_balance_details;if(!u)continue;const p=u.used_wallet_credits??u.left_wallet_credits??u.available_wallet_credits,m=o(p),f={id:`${e.period_order}-${t.group_order}-${d.line_order}`,label:m,used:n(null==(a=u.used_wallet_credits)?void 0:a.quantity),left:n(null==(r=u.left_wallet_credits)?void 0:r.quantity),available:n(null==(l=u.available_wallet_credits)?void 0:l.quantity)},v=`${f.label}-${f.used}-${f.left}-${f.available}`,_=s.get(m)??new Set;if(_.has(v))continue;_.add(v),s.set(m,_);const g=c.get(m)??{id:`${e.period_order}-${m}`,label:m,amount:f.available,rows:[]};g.rows.push(f),c.set(m,g)}return{id:`${e.period_order}-${e.start_at}`,title:t(e),rows:[...c.values()]}}).filter(e=>e.rows.length>0))({invoice:o.invoice,getPeriodTitle:y,getCreditTypeLabel:b,formatQuantity:w}));return(t,o)=>h.value.length>0?(e.openBlock(),e.createElementBlock("section",s,[e.createElementVNode("div",d,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,t=>(e.openBlock(),e.createElementBlock("section",{key:t.id},[e.createVNode(e.unref(i._sfc_main$19),{class:"mt-4"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$3),{tag:"h3",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(i.InvoiceTable),{class:"mt-3"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$20),{left:"",class:"text-gray-600"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Wallet balance",id:"wallet_balance.details.header",description:"Section header for invoice wallet balance details"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.id},[e.createElementVNode("tr",{class:"cursor-pointer border-t",tabindex:"0",onClick:o=>e.unref(_)(t.id),onKeyup:[e.withKeys(o=>e.unref(_)(t.id),["enter"]),e.withKeys(o=>e.unref(_)(t.id),["space"])]},[e.createVNode(e.unref(i._sfc_main$21),{class:"p-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$14),{icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(c)(t.id)}])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(t.label)+" ",1),e.createElementVNode("span",p,e.toDisplayString(t.rows.length),1)]),_:2},1024)],40,u),e.unref(c)(t.id)?(e.openBlock(),e.createElementBlock("tr",m,[e.createElementVNode("td",f,[e.createElementVNode("div",v,[e.createVNode(e.unref(i.InvoiceTable),null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$20),{left:"",class:"w-2/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Credit breakdown",id:"invoice_credits.credit_breakdown.table_header",description:"Column header for wallet balance credit type details"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$20),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Balance",id:"invoice_credits.balance.table_header",description:"Column header for the available wallet balance amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$20),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Used",id:"invoice_credits.used.table_header",description:"Column header for the used wallet credit amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$20),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Remaining",id:"invoice_credits.remaining.table_header",description:"Column header for the remaining wallet credit amount"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock("tr",{key:t.id,class:"border-t"},[e.createVNode(e.unref(i._sfc_main$21),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$21),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.available),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$21),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.used),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$21),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.left),1)]),_:2},1024)]))),128))]),_:2},1024)])])])):e.createCommentVNode("",!0)],64))),128))]),_:2},1024)]))),128))])])):e.createCommentVNode("",!0)}}),g=e.defineComponent({__name:"InvoiceBlock",props:{invoice:{type:Object}},setup(t){const{$t:o}=i.useIntl(),{isMobileViewport:n}=r.useViewport();return(a,r)=>(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{class:"sv-invoice__summary grow",title:e.unref(o)({defaultMessage:"Invoice",description:"Title for the invoice block on the invoice details page",id:"sdk.invoice_details.invoice.title"})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["sv-invoice__summary-body",{"p-6 pt-2":!e.unref(n)}])},[e.unref(n)?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$22),{key:0,variant:"default","has-icon":"",class:"sv-invoice__download-hint justify-center border-gray-100 bg-gray-50 font-semibold text-gray-800"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Download the PDF for a full breakdown",description:"Download the PDF for a full breakdown",id:"sdk.invoice_details.invoice.download_pdf"})),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(i._sfc_main$15),{class:"sv-invoice__summary-content",invoice:t.invoice,"is-expandable":!e.unref(n)},{logo:e.withCtx(()=>[e.renderSlot(a.$slots,"logo")]),_:3},8,["invoice","is-expandable"]),e.createVNode(_,{class:"sv-invoice__credits-breakdown",invoice:t.invoice},null,8,["invoice"])],2)]),_:3},8,["title"]))}}),y={class:"sv-invoice sv-root sv-component"},b={class:"sv-invoice__body flex flex-col gap-3 lg:flex-row lg:gap-6"},w={class:"sv-invoice__aside flex shrink-0 flex-col gap-8 lg:w-72 lg:gap-6"},h=e.defineComponent({__name:"Invoice",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup(t){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../../PaymentHistoryBlock-BGbTy4Se.js"))),{$t:n}=i.useIntl();return(r,c)=>{var s,d;return e.openBlock(),e.createElementBlock("div",y,[e.createVNode(a._sfc_main,{class:"sv-invoice__header mb-6",invoice:t.invoice,payments:t.payments,"invoice-download-service":t.invoiceDownloadService,"is-loading":t.isLoading,configuration:t.configuration},null,8,["invoice","payments","invoice-download-service","is-loading","configuration"]),e.createElementVNode("div",b,[t.invoice?(e.openBlock(),e.createBlock(g,{key:0,class:"sv-invoice__main",invoice:t.invoice},null,8,["invoice"])):e.createCommentVNode("",!0),e.createElementVNode("div",w,[e.createVNode(l._sfc_main,{class:"sv-invoice__details",invoice:t.invoice},null,8,["invoice"]),(null==(s=t.configuration)?void 0:s.enablePaymentAttempts)&&(null==(d=t.payments)?void 0:d.length)?(e.openBlock(),e.createBlock(e.unref(o),{key:0,class:"sv-invoice__payment-history","payment-attempts":t.payments,customer:t.invoice.customer},null,8,["payment-attempts","customer"])):e.createCommentVNode("",!0),t.configuration.enableCustomerBillingInformation?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$4),{key:1,class:"sv-invoice__billing-information",customer:t.invoice.customer,title:e.unref(n)({defaultMessage:"Your billing information",description:"Title for the billing information on the detailed invoice view",id:"sdk.invoice_details.customer_billing_information.title"})},null,8,["customer","title"])):e.createCommentVNode("",!0)])])])}}}),x=e.defineComponent({__name:"Invoice.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){var o;const i=t;if(!(null==(o=i.configuration)?void 0:o.invoiceId))throw new Error("Missing invoice id");const a=e.computed(()=>({...i,configuration:{enableCustomerBillingInformation:!0,enableDownloadButton:!0,enablePaymentAttempts:!0,...i.configuration}}));return(o,i)=>{var r,l,s,d;return e.openBlock(),e.createBlock(e.unref(n._sfc_main),{"custom-element-name":e.unref(C),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(r=t.branding)?void 0:r.colors)?void 0:l.primary,"secondary-color":null==(d=null==(s=t.branding)?void 0:s.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:i[0]||(i[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(c,e.normalizeProps(e.guardReactiveProps(a.value)),{default:e.withCtx(({invoice:t,payments:o,isLoading:n,invoiceDownloadService:i})=>[t?(e.openBlock(),e.createBlock(h,{key:0,"is-loading":n,invoice:t,"invoice-download-service":i,payments:o.payments.value,configuration:a.value.configuration},null,8,["is-loading","invoice","invoice-download-service","payments","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),k=n.defineCustomElement(x),C=n.getComponentName("invoice");exports.COMPONENT_NAME=C,exports.SolvimonInvoice=k,exports.defineSolvimonInvoice=()=>{customElements.get(C)||customElements.define(C,k)};
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../useLoadInitialData-CTqfiMTN.js"),o=require("../../usePayments-CgXZeWrU.js"),n=require("../../component-Bs8oszfD.js"),i=require("../../vendor-ui-C3Tq-qY_.js"),a=require("../../InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js"),r=require("../../useViewport-CKRY1CKR.js"),l=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js"),c=e.defineComponent({__name:"Invoice.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(n){const i=n,a=o.useInvoice({invoiceId:i.configuration.invoiceId}),r=o.usePayments(),{isLoading:l}=t.useLoadInitialData(a.get(),r.get(i.configuration.invoiceId));return(t,o)=>e.renderSlot(t.$slots,"default",{invoice:e.unref(a).invoice.value,invoiceDownloadService:e.unref(a).downloadInvoicePdf,payments:e.unref(r),isLoading:e.unref(l)})}}),s={key:0,class:"mt-8"},d={class:"flex flex-col gap-6"},u=["onClick","onKeyup"],p={class:"ml-1 inline-flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-100 text-2xs font-bold text-blue-600"},m={key:0},f={class:"p-0"},v={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},_=e.defineComponent({__name:"InvoiceCreditsBreakdown",props:{invoice:{type:Object}},setup(t){const o=t,{formatDate:n,$t:a,formatMessage:r,formatNumber:l}=i.useIntl(),{getIsOpen:c,toggle:_}=i.useToggleList(),g=e.computed(()=>Object.fromEntries((o.invoice.credit_types??[]).map(e=>[e.id,e]))),y=e=>r({defaultMessage:"Service period - {startAt} - {endAt}",id:"wallet_balance.service_period_heading",description:"Heading shown above wallet balance details for an invoice period"},{startAt:n({date:e.start_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone}),endAt:n({date:e.end_at,format:"date",offsetType:"offsetted",timezone:o.invoice.customer.timezone})}),b=e=>{var t;return(null==e?void 0:e.credit_type_id)?(null==(t=g.value[e.credit_type_id])?void 0:t.name)??e.credit_type_id:r({defaultMessage:"Credits",id:"wallet_balance.credit_type_fallback_label",description:"Fallback label for wallet balance credit types when no name is available"})},w=e=>e?l(Number(e)):r({defaultMessage:"-",id:"empty_value_placeholder",description:"Placeholder shown when a wallet balance quantity is missing"}),h=e.computed(()=>(({invoice:e,getPeriodTitle:t,getCreditTypeLabel:o,formatQuantity:n})=>[...e.periods??[],...e.closed_periods??[]].map(e=>{var i,a,r,l;const c=new Map,s=new Map;for(const t of e.groups??[])for(const d of t.lines??[]){const u=null==(i=null==d?void 0:d.details)?void 0:i.wallet_balance_details;if(!u)continue;const p=u.used_wallet_credits??u.left_wallet_credits??u.available_wallet_credits,m=o(p),f={id:`${e.period_order}-${t.group_order}-${d.line_order}`,label:m,used:n(null==(a=u.used_wallet_credits)?void 0:a.quantity),left:n(null==(r=u.left_wallet_credits)?void 0:r.quantity),available:n(null==(l=u.available_wallet_credits)?void 0:l.quantity)},v=`${f.label}-${f.used}-${f.left}-${f.available}`,_=s.get(m)??new Set;if(_.has(v))continue;_.add(v),s.set(m,_);const g=c.get(m)??{id:`${e.period_order}-${m}`,label:m,amount:f.available,rows:[]};g.rows.push(f),c.set(m,g)}return{id:`${e.period_order}-${e.start_at}`,title:t(e),rows:[...c.values()]}}).filter(e=>e.rows.length>0))({invoice:o.invoice,getPeriodTitle:y,getCreditTypeLabel:b,formatQuantity:w}));return(t,o)=>h.value.length>0?(e.openBlock(),e.createElementBlock("section",s,[e.createElementVNode("div",d,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,t=>(e.openBlock(),e.createElementBlock("section",{key:t.id},[e.createVNode(e.unref(i._sfc_main$19),{class:"mt-4"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$3),{tag:"h3",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(i.InvoiceTable),{class:"mt-3"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$20),{left:"",class:"text-gray-600"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Wallet balance",id:"wallet_balance.details.header",description:"Section header for invoice wallet balance details"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.id},[e.createElementVNode("tr",{class:"cursor-pointer border-t",tabindex:"0",onClick:o=>e.unref(_)(t.id),onKeyup:[e.withKeys(o=>e.unref(_)(t.id),["enter"]),e.withKeys(o=>e.unref(_)(t.id),["space"])]},[e.createVNode(e.unref(i._sfc_main$21),{class:"p-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$14),{icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(c)(t.id)}])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(t.label)+" ",1),e.createElementVNode("span",p,e.toDisplayString(t.rows.length),1)]),_:2},1024)],40,u),e.unref(c)(t.id)?(e.openBlock(),e.createElementBlock("tr",m,[e.createElementVNode("td",f,[e.createElementVNode("div",v,[e.createVNode(e.unref(i.InvoiceTable),null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(e.unref(i._sfc_main$20),{left:"",class:"w-2/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Credit breakdown",id:"invoice_credits.credit_breakdown.table_header",description:"Column header for wallet balance credit type details"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$20),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Balance",id:"invoice_credits.balance.table_header",description:"Column header for the available wallet balance amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$20),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Used",id:"invoice_credits.used.table_header",description:"Column header for the used wallet credit amount"})),1)]),_:1}),e.createVNode(e.unref(i._sfc_main$20),{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Remaining",id:"invoice_credits.remaining.table_header",description:"Column header for the remaining wallet credit amount"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,t=>(e.openBlock(),e.createElementBlock("tr",{key:t.id,class:"border-t"},[e.createVNode(e.unref(i._sfc_main$21),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$21),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.available),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$21),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.used),1)]),_:2},1024),e.createVNode(e.unref(i._sfc_main$21),{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.left),1)]),_:2},1024)]))),128))]),_:2},1024)])])])):e.createCommentVNode("",!0)],64))),128))]),_:2},1024)]))),128))])])):e.createCommentVNode("",!0)}}),g=e.defineComponent({__name:"InvoiceBlock",props:{invoice:{type:Object}},setup(t){const{$t:o}=i.useIntl(),{isMobileViewport:n}=r.useViewport();return(a,r)=>(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{class:"sv-invoice__summary grow",title:e.unref(o)({defaultMessage:"Invoice",description:"Title for the invoice block on the invoice details page",id:"sdk.invoice_details.invoice.title"})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["sv-invoice__summary-body",{"p-6 pt-2":!e.unref(n)}])},[e.unref(n)?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$22),{key:0,variant:"default","has-icon":"",class:"sv-invoice__download-hint justify-center border-gray-100 bg-gray-50 font-semibold text-gray-800"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Download the PDF for a full breakdown",description:"Download the PDF for a full breakdown",id:"sdk.invoice_details.invoice.download_pdf"})),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(i._sfc_main$15),{class:"sv-invoice__summary-content",invoice:t.invoice,"is-expandable":!e.unref(n)},{logo:e.withCtx(()=>[e.renderSlot(a.$slots,"logo")]),_:3},8,["invoice","is-expandable"]),e.createVNode(_,{class:"sv-invoice__credits-breakdown",invoice:t.invoice},null,8,["invoice"])],2)]),_:3},8,["title"]))}}),y={class:"sv-invoice sv-root sv-component"},b={class:"sv-invoice__body flex flex-col gap-3 lg:flex-row lg:gap-6"},w={class:"sv-invoice__aside flex shrink-0 flex-col gap-8 lg:w-72 lg:gap-6"},h=e.defineComponent({__name:"Invoice",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup(t){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../../PaymentHistoryBlock-BGbTy4Se.js"))),{$t:n}=i.useIntl();return(r,c)=>{var s,d;return e.openBlock(),e.createElementBlock("div",y,[e.createVNode(a._sfc_main,{class:"sv-invoice__header mb-6",invoice:t.invoice,payments:t.payments,"invoice-download-service":t.invoiceDownloadService,"is-loading":t.isLoading,configuration:t.configuration},null,8,["invoice","payments","invoice-download-service","is-loading","configuration"]),e.createElementVNode("div",b,[t.invoice?(e.openBlock(),e.createBlock(g,{key:0,class:"sv-invoice__main",invoice:t.invoice},null,8,["invoice"])):e.createCommentVNode("",!0),e.createElementVNode("div",w,[e.createVNode(l._sfc_main,{class:"sv-invoice__details",invoice:t.invoice},null,8,["invoice"]),(null==(s=t.configuration)?void 0:s.enablePaymentAttempts)&&(null==(d=t.payments)?void 0:d.length)?(e.openBlock(),e.createBlock(e.unref(o),{key:0,class:"sv-invoice__payment-history","payment-attempts":t.payments,customer:t.invoice.customer},null,8,["payment-attempts","customer"])):e.createCommentVNode("",!0),t.configuration.enableCustomerBillingInformation?(e.openBlock(),e.createBlock(e.unref(i._sfc_main$4),{key:1,class:"sv-invoice__billing-information",customer:t.invoice.customer,title:e.unref(n)({defaultMessage:"Your billing information",description:"Title for the billing information on the detailed invoice view",id:"sdk.invoice_details.customer_billing_information.title"})},null,8,["customer","title"])):e.createCommentVNode("",!0)])])])}}}),x=e.defineComponent({__name:"Invoice.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){var o;const i=t;if(!(null==(o=i.configuration)?void 0:o.invoiceId))throw new Error("Missing invoice id");const a=e.computed(()=>({...i,configuration:{enableCustomerBillingInformation:!0,enableDownloadButton:!0,enablePaymentAttempts:!0,...i.configuration}}));return(o,i)=>{var r,l,s,d;return e.openBlock(),e.createBlock(e.unref(n._sfc_main),{"custom-element-name":e.unref(C),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(l=null==(r=t.branding)?void 0:r.colors)?void 0:l.primary,"secondary-color":null==(d=null==(s=t.branding)?void 0:s.colors)?void 0:d.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:i[0]||(i[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(c,e.normalizeProps(e.guardReactiveProps(a.value)),{default:e.withCtx(({invoice:t,payments:o,isLoading:n,invoiceDownloadService:i})=>[t?(e.openBlock(),e.createBlock(h,{key:0,"is-loading":n,invoice:t,"invoice-download-service":i,payments:o.payments.value,configuration:a.value.configuration},null,8,["is-loading","invoice","invoice-download-service","payments","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),k=n.defineCustomElement(x),C=n.getComponentName("invoice");exports.COMPONENT_NAME=C,exports.SolvimonInvoice=k,exports.defineSolvimonInvoice=()=>{customElements.get(C)||customElements.define(C,k)};
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
2
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-CkpryfjF.mjs";
|
|
3
|
+
import { u as useInvoice, a as usePayments } from "../../usePayments-D85eB5l4.mjs";
|
|
4
|
+
import { _ as _sfc_main$g, d as defineCustomElement, g as getComponentName } from "../../component-Bg2JVC_O.mjs";
|
|
5
5
|
import { u as useIntl, G as useToggleList, H as _sfc_main$5, e as _sfc_main$6, I as InvoiceTable, J as _sfc_main$7, K as _sfc_main$8, A as _sfc_main$9, _ as _sfc_main$a, L as _sfc_main$b, C as _sfc_main$c, j as _sfc_main$f } from "../../vendor-ui-B8IlviSs.mjs";
|
|
6
6
|
import { _ as _sfc_main$d } from "../../InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs";
|
|
7
7
|
import { u as useViewport } from "../../useViewport-Bu0cyeSi.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js"),t=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("../../useInvoiceData-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DU6X3zxr.js"),t=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("../../useInvoiceData-Bl87gzIS.js"),i=require("../../component-Bs8oszfD.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
2
|
import { _ as _sfc_main$4 } from "../../InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-ryvFEQMV.mjs";
|
|
3
3
|
import { _ as _sfc_main$3 } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
4
|
-
import { u as useInvoiceData } from "../../useInvoiceData-
|
|
5
|
-
import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
4
|
+
import { u as useInvoiceData } from "../../useInvoiceData-Di5pLPM0.mjs";
|
|
5
|
+
import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-Bg2JVC_O.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("../../useLoadInitialData-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../../useLoadInitialData-CTqfiMTN.js"),n=require("../../usePayments-CgXZeWrU.js"),t=require("../../InvoiceHeader.vue_vue_type_script_setup_true_lang-DdpPrYxi.js"),r=require("../../component-Bs8oszfD.js"),i=e.defineComponent({__name:"InvoiceHeader.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(t){const r=t,i=n.useInvoice({invoiceId:r.configuration.invoiceId}),a=n.usePayments(),{isLoading:l}=o.useLoadInitialData(i.get(),a.get(r.configuration.invoiceId));return(o,n)=>e.renderSlot(o.$slots,"default",{invoice:e.unref(i).invoice.value,invoiceDownloadService:e.unref(i).downloadInvoicePdf,payments:e.unref(a),isLoading:e.unref(l)})}}),a=e.defineComponent({__name:"InvoiceHeader.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup(o){var n;const a=r.getComponentName("invoice-header"),l=o;if(!(null==(n=l.configuration)?void 0:n.invoiceId))throw new Error("Missing invoice id");const c=e.computed(()=>({...l,configuration:{enableDownloadButton:!0,...l.configuration}}));return(n,l)=>{var s,p,d,u;return e.openBlock(),e.createBlock(e.unref(r._sfc_main),{"custom-element-name":e.unref(a),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(s=o.branding)?void 0:s.colors)?void 0:p.primary,"secondary-color":null==(u=null==(d=o.branding)?void 0:d.colors)?void 0:u.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:l[0]||(l[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(i,e.normalizeProps(e.guardReactiveProps(c.value)),{default:e.withCtx(({invoice:o,payments:n,isLoading:r,invoiceDownloadService:i})=>[o?(e.openBlock(),e.createBlock(t._sfc_main,{key:0,"is-loading":r,invoice:o,"invoice-download-service":i,payments:n.payments.value,configuration:c.value.configuration},null,8,["is-loading","invoice","invoice-download-service","payments","configuration"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),l=r.defineCustomElement(a),c=r.getComponentName("invoice-header");exports.COMPONENT_NAME=c,exports.SolvimonInvoiceHeader=l,exports.defineSolvimonInvoiceHeader=()=>{customElements.get(c)||customElements.define(c,l)};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, renderSlot, unref, computed, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
|
|
2
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
3
|
-
import { u as useInvoice, a as usePayments } from "../../usePayments-
|
|
2
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-CkpryfjF.mjs";
|
|
3
|
+
import { u as useInvoice, a as usePayments } from "../../usePayments-D85eB5l4.mjs";
|
|
4
4
|
import { _ as _sfc_main$3 } from "../../InvoiceHeader.vue_vue_type_script_setup_true_lang-bAiAbtMi.mjs";
|
|
5
|
-
import { _ as _sfc_main$2, g as getComponentName, d as defineCustomElement } from "../../component-
|
|
5
|
+
import { _ as _sfc_main$2, g as getComponentName, d as defineCustomElement } from "../../component-Bg2JVC_O.mjs";
|
|
6
6
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "InvoiceHeader.entry.view",
|
|
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-CFk-_oVK.js"),t=require("../../useLoadInitialData-CTqfiMTN.js"),r=require("../../component-Bs8oszfD.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-z19cteaD.mjs";
|
|
3
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-CkpryfjF.mjs";
|
|
4
|
+
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-Bg2JVC_O.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-CixdxEGm.js"),o=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("../../useInvoiceData-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CixdxEGm.js"),o=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),n=require("../../useInvoiceData-Bl87gzIS.js"),r=require("../../component-Bs8oszfD.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
2
|
import { _ as _sfc_main$4 } from "../../PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-tM7f_fQS.mjs";
|
|
3
3
|
import { _ as _sfc_main$3 } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
4
|
-
import { u as useInvoiceData } from "../../useInvoiceData-
|
|
5
|
-
import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
4
|
+
import { u as useInvoiceData } from "../../useInvoiceData-Di5pLPM0.mjs";
|
|
5
|
+
import { _ as _sfc_main$5, d as defineCustomElement, g as getComponentName } from "../../component-Bg2JVC_O.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-Bs8oszfD.js"),o=require("../../vendor-ui-C3Tq-qY_.js"),r=require("../../useLoadInitialData-CTqfiMTN.js"),n=require("../../useCustomer-Z24KchWC.js"),a=require("../../usePaymentMethodOptions-BsCZnCQW.js"),i=require("../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-eWmC5GOT.js"),s=e.defineComponent({__name:"PaymentMethodForm.entry.view",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(t){const i=t,s=n.useCustomer({customerId:i.portalObject.customer_id}),l=a.usePaymentMethodOptions(),{isLoading:p}=r.useLoadInitialData((async()=>{var e;const t=await s.get.execute(),r=o.getCustomerCountry(t);await l.get({customerId:t.id,country:r,amount:null==(e=i.configuration)?void 0:e.amount})})());return(t,o)=>e.renderSlot(t.$slots,"default",{customer:e.unref(s).customer.value,paymentMethodOptions:e.unref(l),isLoading:e.unref(p)})}}),l=e.defineComponent({__name:"PaymentMethodForm.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object},countryCode:{type:String}},setup(o){const r=o;return(n,a)=>{var l,p,m,u;return e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"custom-element-name":e.unref(c),environment:o.environment,locale:o.locale,"portal-object":o.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(p=null==(l=o.branding)?void 0:l.colors)?void 0:p.primary,"secondary-color":null==(u=null==(m=o.branding)?void 0:m.colors)?void 0:u.secondary,"experimental-features":o.experimentalFeatures,"log-level":o.logLevel,"on-log":o.onLog,"css-overrides":o.cssOverrides,onError:a[0]||(a[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(s,e.normalizeProps(e.guardReactiveProps(r)),{default:e.withCtx(({customer:t,paymentMethodOptions:r,isLoading:n})=>[t?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,customer:t,"payment-method-options":r.paymentMethodOptions.value,configuration:o.configuration,"is-loading":n},null,8,["customer","payment-method-options","configuration","is-loading"])):e.createCommentVNode("",!0)]),_:1},16)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}}),p=t.defineCustomElement(l),c=t.getComponentName("payment-method-form");exports.COMPONENT_NAME=c,exports.SolvimonPaymentMethodForm=p,exports.defineSolvimonPaymentMethodForm=()=>{customElements.get(c)||customElements.define(c,p)};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, renderSlot, unref, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
|
|
2
|
-
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-
|
|
2
|
+
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-Bg2JVC_O.mjs";
|
|
3
3
|
import { g as getCustomerCountry } from "../../vendor-ui-B8IlviSs.mjs";
|
|
4
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
5
|
-
import { u as useCustomer } from "../../useCustomer-
|
|
6
|
-
import { u as usePaymentMethodOptions } from "../../usePaymentMethodOptions-
|
|
7
|
-
import { _ as _sfc_main$3 } from "../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-CkpryfjF.mjs";
|
|
5
|
+
import { u as useCustomer } from "../../useCustomer-VVJi8z2w.mjs";
|
|
6
|
+
import { u as usePaymentMethodOptions } from "../../usePaymentMethodOptions-BoGHJjng.mjs";
|
|
7
|
+
import { _ as _sfc_main$3 } from "../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-B8eNptZp.mjs";
|
|
8
8
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "PaymentMethodForm.entry.view",
|
|
10
10
|
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-Bs8oszfD.js"),n=require("../../vendor-ui-C3Tq-qY_.js"),r=require("../../useService-CHrkefKd.js"),o=require("../../subscriptions-CC61I6Nj.js"),i=require("../../useLoadInitialData-CTqfiMTN.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-
|
|
2
|
+
import { _ as _sfc_main$4, d as defineCustomElement, g as getComponentName } from "../../component-Bg2JVC_O.mjs";
|
|
3
3
|
import { u as useIntl, _ as _sfc_main$3, P as PricingPlanSchedules } from "../../vendor-ui-B8IlviSs.mjs";
|
|
4
4
|
import { u as useService } from "../../useService-DF57xuDd.mjs";
|
|
5
|
-
import { c as createSubscriptionsService } from "../../subscriptions-
|
|
6
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
5
|
+
import { c as createSubscriptionsService } from "../../subscriptions-BPYyv09M.mjs";
|
|
6
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-CkpryfjF.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-56vu59V4.js"),t=require("../../component-Bs8oszfD.js"),r=require("../../useCustomer-Z24KchWC.js"),n=require("../../useLoadInitialData-CTqfiMTN.js"),s=require("../../usePaymentMethods-AC-4rrR9.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-DB1p61kZ.mjs";
|
|
3
|
+
import { _ as _sfc_main$2, d as defineCustomElement, g as getComponentName } from "../../component-Bg2JVC_O.mjs";
|
|
4
|
+
import { u as useCustomer } from "../../useCustomer-VVJi8z2w.mjs";
|
|
5
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-CkpryfjF.mjs";
|
|
6
|
+
import { u as usePaymentMethods } from "../../usePaymentMethods-ocHmNoP7.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-BL-R5foK.js"),r=require("../../useLoadInitialData-CTqfiMTN.js"),l=require("../../component-Bs8oszfD.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-COQDLfoZ.mjs";
|
|
4
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-CkpryfjF.mjs";
|
|
5
|
+
import { _ as _sfc_main$4, d as defineCustomElement, g as getComponentName } from "../../component-Bg2JVC_O.mjs";
|
|
6
6
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "WalletBalances",
|
|
8
8
|
props: {
|
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-uG2isab0.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-Bg2JVC_O.mjs";
|
|
2
2
|
function createCustomerService() {
|
|
3
3
|
const request = createRequestService();
|
|
4
4
|
const config = useConfig();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=require("./component-
|
|
1
|
+
const t=require("./component-Bs8oszfD.js");exports.createCustomerService=function(){const e=t.createRequestService(),r=t.useConfig();return{getCustomer:function(t){return e({url:`${r.apiUrls.config}/portal/customers/${t}`})},updateCustomer:function(t,o){return e({url:`${r.apiUrls.config}/portal/customers/${t}`,options:{method:"PATCH"},data:o})},checkTaxID:function(t){return e({url:`${r.apiUrls.config}/portal/customers/validate-tax-id`,options:{method:"POST"},data:t})}}};
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./registry-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./registry-uG2isab0.js"),e=require("./screens/Checkout/Checkout.cjs.js"),i=require("./screens/CustomerOverview/CustomerOverview.cjs.js"),n=require("./screens/UpgradeSubscription/UpgradeSubscription.cjs.js"),s=require("./screens/PayInvoice/PayInvoice.cjs.js"),t=require("./components/BillingInformation/BillingInformation.cjs.js"),r=require("./components/BillingInformationForm/BillingInformationForm.cjs.js"),m=require("./components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js"),l=require("./components/WalletBalances/WalletBalances.cjs.js"),v=require("./components/InvoiceDetails/InvoiceDetails.cjs.js"),c=require("./components/InvoicesList/InvoicesList.cjs.js"),S=require("./components/PaymentHistory/PaymentHistory.cjs.js"),a=require("./components/SubscriptionSchedules/SubscriptionSchedules.cjs.js"),p=require("./components/SubscriptionsList/SubscriptionsList.cjs.js"),d=require("./components/PaymentMethodForm/PaymentMethodForm.cjs.js");exports.createSolvimonCore=o.createSolvimonCore,exports.getRegisteredComponentIds=o.getRegisteredComponentIds,exports.getRegisteredScreenIds=o.getRegisteredScreenIds,exports.SolvimonCheckout=e.SolvimonCheckout,exports.defineSolvimonCheckout=e.defineSolvimonCheckout,exports.SolvimonCustomerOverview=i.SolvimonCustomerOverview,exports.defineSolvimonCustomerOverview=i.defineSolvimonCustomerOverview,exports.SolvimonUpgradeSubscription=n.SolvimonUpgradeSubscription,exports.defineSolvimonUpgradeSubscription=n.defineSolvimonUpgradeSubscription,exports.SolvimonPayInvoice=s.SolvimonPayInvoice,exports.defineSolvimonPayInvoice=s.defineSolvimonPayInvoice,exports.SolvimonBillingInformation=t.SolvimonBillingInformation,exports.defineSolvimonBillingInformation=t.defineSolvimonBillingInformation,exports.SolvimonBillingInformationForm=r.SolvimonBillingInformationForm,exports.defineSolvimonBillingInformationForm=r.defineSolvimonBillingInformationForm,exports.SolvimonCustomerPaymentMethods=m.SolvimonCustomerPaymentMethods,exports.defineSolvimonCustomerPaymentMethods=m.defineSolvimonCustomerPaymentMethods,exports.SolvimonWalletBalances=l.SolvimonWalletBalances,exports.defineSolvimonWalletBalances=l.defineSolvimonWalletBalances,exports.SolvimonInvoiceDetails=v.SolvimonInvoiceDetails,exports.defineSolvimonInvoiceDetails=v.defineSolvimonInvoiceDetails,exports.SolvimonInvoicesList=c.SolvimonInvoicesList,exports.defineSolvimonInvoicesList=c.defineSolvimonInvoicesList,exports.SolvimonPaymentHistory=S.SolvimonPaymentHistory,exports.defineSolvimonPaymentHistory=S.defineSolvimonPaymentHistory,exports.SolvimonSubscriptionSchedules=a.SolvimonSubscriptionSchedules,exports.defineSolvimonSubscriptionSchedules=a.defineSolvimonSubscriptionSchedules,exports.SolvimonSubscriptionsList=p.SolvimonSubscriptionsList,exports.defineSolvimonSubscriptionsList=p.defineSolvimonSubscriptionsList,exports.SolvimonPaymentMethodForm=d.SolvimonPaymentMethodForm,exports.defineSolvimonPaymentMethodForm=d.defineSolvimonPaymentMethodForm;
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c, g, a } from "./registry-
|
|
1
|
+
import { c, g, a } from "./registry-B-If1W_u.mjs";
|
|
2
2
|
import { SolvimonCheckout, defineSolvimonCheckout } from "./screens/Checkout/Checkout.es.js";
|
|
3
3
|
import { SolvimonCustomerOverview, defineSolvimonCustomerOverview } from "./screens/CustomerOverview/CustomerOverview.es.js";
|
|
4
4
|
import { SolvimonUpgradeSubscription, defineSolvimonUpgradeSubscription } from "./screens/UpgradeSubscription/UpgradeSubscription.es.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as downloadFile, a as withPagination } from "./vendor-ui-B8IlviSs.mjs";
|
|
2
|
-
import { c as createRequestService, u as useConfig } from "./component-
|
|
2
|
+
import { c as createRequestService, u as useConfig } from "./component-Bg2JVC_O.mjs";
|
|
3
3
|
function createInvoicesService() {
|
|
4
4
|
const request = createRequestService();
|
|
5
5
|
const config = useConfig();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const i=require("./vendor-ui-C3Tq-qY_.js"),e=require("./component-
|
|
1
|
+
const i=require("./vendor-ui-C3Tq-qY_.js"),e=require("./component-Bs8oszfD.js");exports.createInvoicesService=function(){const n=e.createRequestService(),t=e.useConfig();return{getInvoice:function(i){return n({url:`${t.apiUrls.transaction}/portal/invoices/${i}`})},getInvoices:function({customerId:e,pagination:r,query:a}){const o=i.withPagination({customer_id:e,...a??{}},r),c=new URL(`${t.apiUrls.transaction}/portal/invoices`);return Object.entries(o).forEach(([i,e])=>{null!=e&&(Array.isArray(e)?e.forEach(e=>{c.searchParams.append(`${i}[]`,`${e}`)}):c.searchParams.append(i,`${e}`))}),n({url:c.toString(),isCollection:!0})},getInvoicePdf:async function(e){return n({url:`${t.apiUrls.transaction}/portal/invoices/${e}/pdf`,options:{headers:{"Content-Type":"application/pdf"}}}).then(n=>{const t=new Blob([n],{type:"application/pdf"});i.downloadFile(t,`invoice-${e}.pdf`)})},getInvoicePreview:function({customer:i,pricingPlanSubscriptionId:e,startAt:r,customizations:a,pricing_plan_schedule_customizations:o}){return n({url:`${t.apiUrls.transaction}/portal/invoices/preview`,options:{method:"POST"},data:{template_pricing_plan_subscription_id:e,...r&&{start_at:r},...a&&{pricing_plan_schedule_customizations:a},...o&&{pricing_plan_schedule_customizations:o},customer_details:{...i,reference:"preview"}}})},previewChargeOnDemandPricingItems:function({pricingPlanScheduleId:i,pricingItemIds:e,startAt:r}){return n({url:`${t.apiUrls.transaction}/portal/invoices/charge-on-demand-pricing-items`,options:{method:"POST"},data:{pricing_plan_schedule_id:i,pricing_items:e.map(i=>({pricing_item_id:i})),...r?{start_at:r}:{},preview:!0}})}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=require("./vendor-ui-C3Tq-qY_.js"),e=require("./component-
|
|
1
|
+
const t=require("./vendor-ui-C3Tq-qY_.js"),e=require("./component-Bs8oszfD.js");exports.createPaymentMethodsService=function(){const n=e.createRequestService(),o=e.useConfig(),r="/portal/payment-methods";return{getPaymentMethods:function({customerId:e,pagination:i,query:a}){const s=t.withPagination({customer_id:e,...a??{}},i),u=new URL(`${o.apiUrls.config}${r}`);return Object.entries(s).forEach(([t,e])=>{null!=e&&(Array.isArray(e)?e.forEach(e=>{u.searchParams.append(`${t}[]`,`${e}`)}):u.searchParams.append(t,`${e}`))}),n({url:u.toString(),isCollection:!0})},getPaymentMethodOptions:function({customerId:t,country:e,subscriptionId:r,amount:i}){return n({url:`${o.apiUrls.config}/portal/payment-method-options`,options:{method:"POST"},data:{...t&&{customer_id:t},...e&&{country:e},...r&&{pricing_plan_subscription_id:r},amount:i}})},tokenizePaymentMethod:function(t){return n({url:`${o.apiUrls.config}/portal/payment-methods/tokenize`,options:{method:"POST"},data:t})},setDefaultPaymentMethod:function({paymentMethodId:t}){return n({url:`${o.apiUrls.config}${r}/${t}`,options:{method:"PATCH"},data:{is_default:!0}})}}};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as withPagination } from "./vendor-ui-B8IlviSs.mjs";
|
|
2
|
-
import { c as createRequestService, u as useConfig } from "./component-
|
|
2
|
+
import { c as createRequestService, u as useConfig } from "./component-Bg2JVC_O.mjs";
|
|
3
3
|
function createPaymentMethodsService() {
|
|
4
4
|
const request = createRequestService();
|
|
5
5
|
const config = useConfig();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createRequestService, u as useConfig } from "./component-
|
|
1
|
+
import { c as createRequestService, u as useConfig } from "./component-Bg2JVC_O.mjs";
|
|
2
2
|
const BASE_URL = "/portal/payments";
|
|
3
3
|
const createPaymentsService = () => {
|
|
4
4
|
const request = createRequestService();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=require("./component-
|
|
1
|
+
const t=require("./component-Bs8oszfD.js"),e="/portal/payments";exports.createPaymentsService=()=>{const a=t.createRequestService(),n=t.useConfig();return{getPayments:function(t){return a({url:`${n.apiUrls.transaction}${e}`,query:{invoice_id:t},isCollection:!0})},getPaymentDetails:function({paymentAcceptorId:t,paymentGatewayVariant:r,adyen:i}){return a({url:`${n.apiUrls.transaction}${e}/verify-details`,options:{method:"POST"},data:{payment_acceptor_id:t,payment_gateway_variant:r,adyen:i}})},authorizePayment:function(t){return a({url:`${n.apiUrls.transaction}${e}/authorize`,options:{method:"POST"},data:t})}}};
|
|
@@ -15,7 +15,7 @@ import { defineSolvimonCustomerPaymentMethods } from "./components/CustomerPayme
|
|
|
15
15
|
import { defineSolvimonWalletBalances } from "./components/WalletBalances/WalletBalances.es.js";
|
|
16
16
|
import { defineSolvimonBillingInformation } from "./components/BillingInformation/BillingInformation.es.js";
|
|
17
17
|
import { defineSolvimonBillingInformationForm } from "./components/BillingInformationForm/BillingInformationForm.es.js";
|
|
18
|
-
import { g as getComponentName } from "./component-
|
|
18
|
+
import { g as getComponentName } from "./component-Bg2JVC_O.mjs";
|
|
19
19
|
const SCREEN_DEFINERS = {
|
|
20
20
|
"customer-overview": defineSolvimonCustomerOverview,
|
|
21
21
|
checkout: defineSolvimonCheckout,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./components/PaymentMethodForm/PaymentMethodForm.cjs.js"),n=require("./screens/CustomerOverview/CustomerOverview.cjs.js"),o=require("./screens/Checkout/Checkout.cjs.js"),i=require("./screens/UpgradeSubscription/UpgradeSubscription.cjs.js"),t=require("./screens/PayInvoice/PayInvoice.cjs.js"),s=require("./screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js"),r=require("./components/Invoice/Invoice.cjs.js"),c=require("./components/InvoiceHeader/InvoiceHeader.cjs.js"),m=require("./components/InvoiceDetails/InvoiceDetails.cjs.js"),a=require("./components/InvoicesList/InvoicesList.cjs.js"),u=require("./components/PaymentHistory/PaymentHistory.cjs.js"),l=require("./components/SubscriptionsList/SubscriptionsList.cjs.js"),d=require("./components/SubscriptionSchedules/SubscriptionSchedules.cjs.js"),p=require("./components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js"),v=require("./components/WalletBalances/WalletBalances.cjs.js"),f=require("./components/BillingInformation/BillingInformation.cjs.js"),j=require("./components/BillingInformationForm/BillingInformationForm.cjs.js"),S=require("./component-
|
|
1
|
+
const e=require("./components/PaymentMethodForm/PaymentMethodForm.cjs.js"),n=require("./screens/CustomerOverview/CustomerOverview.cjs.js"),o=require("./screens/Checkout/Checkout.cjs.js"),i=require("./screens/UpgradeSubscription/UpgradeSubscription.cjs.js"),t=require("./screens/PayInvoice/PayInvoice.cjs.js"),s=require("./screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js"),r=require("./components/Invoice/Invoice.cjs.js"),c=require("./components/InvoiceHeader/InvoiceHeader.cjs.js"),m=require("./components/InvoiceDetails/InvoiceDetails.cjs.js"),a=require("./components/InvoicesList/InvoicesList.cjs.js"),u=require("./components/PaymentHistory/PaymentHistory.cjs.js"),l=require("./components/SubscriptionsList/SubscriptionsList.cjs.js"),d=require("./components/SubscriptionSchedules/SubscriptionSchedules.cjs.js"),p=require("./components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js"),v=require("./components/WalletBalances/WalletBalances.cjs.js"),f=require("./components/BillingInformation/BillingInformation.cjs.js"),j=require("./components/BillingInformationForm/BillingInformationForm.cjs.js"),S=require("./component-Bs8oszfD.js"),h={"customer-overview":n.defineSolvimonCustomerOverview,checkout:o.defineSolvimonCheckout,"upgrade-subscription":i.defineSolvimonUpgradeSubscription,"pay-invoice":t.defineSolvimonPayInvoice,"payment-methods-management":s.defineSolvimonPaymentMethodsManagement},y={invoice:r.defineSolvimonInvoice,"invoice-header":c.defineSolvimonInvoiceHeader,"invoice-details":m.defineSolvimonInvoiceDetails,"invoices-list":a.defineSolvimonInvoicesList,"payment-history":u.defineSolvimonPaymentHistory,"subscriptions-list":l.defineSolvimonSubscriptionsList,"subscription-schedules":d.defineSolvimonSubscriptionSchedules,"customer-payment-methods":p.defineSolvimonCustomerPaymentMethods,"wallet-balances":v.defineSolvimonWalletBalances,"billing-information":f.defineSolvimonBillingInformation,"billing-information-form":j.defineSolvimonBillingInformationForm,"payment-method-form":e.defineSolvimonPaymentMethodForm};function g(e,n){const o="screen"===n?(i=e,Object.hasOwn(h,i)&&h[e]):function(e){return Object.hasOwn(y,e)}(e)&&y[e];var i;if(!o)throw new Error(`Solvimon: unknown ${n} id "${e}". Registered ${n}s: ${Object.keys("screen"===n?h:y).join(", ")}.`);o()}function b(e,n,o,i){const t=function(e){if("string"==typeof e){const n=document.querySelector(e);if(!n)throw new Error(`Solvimon: container not found for selector "${e}"`);return n}return e}(e);g(n,o);const s=(r=n,S.getComponentName(r));var r;const c=document.createElement(s);return function(e,n){const o={};for(const[i,t]of Object.entries(n))void 0!==t&&(o[i]=t);Object.assign(e,o)}(c,i),t.appendChild(c),{unmount(){c.remove()}}}function I(e){const{container:n,...o}=e;return{container:n,props:Object.fromEntries(Object.entries(o))}}function q(e,n){return{...e,...n}}const P=["customer-overview","checkout","upgrade-subscription","pay-invoice","payment-methods-management"],w=["invoice","invoice-header","invoice-details","invoices-list","payment-history","subscriptions-list","subscription-schedules","customer-payment-methods","wallet-balances","billing-information","billing-information-form","payment-method-form"];exports.createSolvimonCore=function(e={}){return{config:e,createComponent(n,o){const{container:i,props:t}=I(o);return b(i,n,"component",q(e,t)).unmount},createScreen(n,o){const{container:i,props:t}=I(o);return b(i,n,"screen",q(e,t)).unmount}}},exports.getRegisteredComponentIds=function(){return[...w]},exports.getRegisteredScreenIds=function(){return[...P]};
|