@solvimon/solvimon-web 0.1.0-alpha.17 → 0.1.0-alpha.18
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/README.md +28 -26
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-C2IRj-FB.mjs +238 -0
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Rub9ifBk.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BrPsTuoW.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BWnZ98RQ.mjs} +2 -2
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BuQ8bzar.js → BillingInformation.vue_vue_type_script_setup_true_lang-DurgWlLC.js} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CuWrBcoK.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-D7gL7dZX.mjs} +3 -3
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Df7CsbiW.js +1 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-OUg4yv7r.mjs +2654 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-mM5udvi8.js +1 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BIpg-MSJ.mjs +53 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BM3p8Pk8.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D5eSNYH2.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-wxP5IaGt.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DbY35gE_.mjs} +1 -1
- package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-05NKI2A0.js → InvoiceHeader.vue_vue_type_script_setup_true_lang-Ci8r6tuC.js} +1 -1
- package/dist/{InvoiceHeader.vue_vue_type_script_setup_true_lang-17v07F58.mjs → InvoiceHeader.vue_vue_type_script_setup_true_lang-jshby9pF.mjs} +1 -1
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-CNKxTtO7.js +1 -0
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBMgilG2.mjs +153 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CupZFJSF.mjs +52 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D6lpD1zo.js +1 -0
- package/dist/{PaymentHistoryBlock-BitwS9Re.mjs → PaymentHistoryBlock-Bxr8lUGs.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-ZtmPXXwI.js → PaymentHistoryBlock-COjIVYX4.js} +1 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Bmgx7PSt.js +1 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3ZUDUdw.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CDjGab5p.mjs} +1 -1
- package/dist/{PaymentIntegrationForm-BZTzCUiu.js → PaymentIntegrationForm-BSauhuKv.js} +1 -1
- package/dist/{PaymentIntegrationForm-BK2aLPCo.mjs → PaymentIntegrationForm-PIT8gHYN.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-5XKz3kop.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-COO2ZUhN.mjs +148 -0
- package/dist/PaymentIntegrationFormAdyen-B-Jbu2hU.js +1 -0
- package/dist/PaymentIntegrationFormAdyen-Cjj9aK0E.mjs +729 -0
- package/dist/PaymentIntegrationFormStripe-Bnn8S1o5.js +1 -0
- package/dist/PaymentIntegrationFormStripe-arpua_ZT.mjs +545 -0
- package/dist/PaymentMethodForm-B7T5rrNz.mjs +4 -0
- package/dist/PaymentMethodForm-CLz3ZS-b.js +1 -0
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-CIQ0vsko.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-C4Zf92QP.mjs} +2 -2
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-zRr8iihy.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-UH9AVXnG.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DVeB_mqK.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIIt6fGp.mjs} +76 -30
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-ifai5HVr.js +1 -0
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-D1TcP9PR.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DaWlLor0.mjs} +2 -2
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DdUoeTUL.js +1 -0
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BMXr26gF.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CyYhYYRp.mjs} +1 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DdjYVNku.js +1 -0
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cu55ZvCH.js +1 -0
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3cqlbGY.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-z8P1u1Gi.mjs} +16 -63
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-BKDMwuyh.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BDqX6OaE.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BOUSk2ZB.mjs} +5 -5
- package/dist/adyen-BMDZQBUG.js +1 -0
- package/dist/{url-BjZ1Pg0l.mjs → adyen-Ba-mF3Jy.mjs} +31 -73
- package/dist/component--Y7Igv5i.mjs +1022 -0
- package/dist/component-DIy1hvJM.js +1 -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 +4 -4
- 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 +7 -7
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs.js +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.es.js +4 -4
- 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 +4 -4
- 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 +21 -7
- package/dist/core/action-request.types.d.ts +1 -13
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/{customer-DAgdegIW.mjs → customer-DovIxTG1.mjs} +1 -1
- package/dist/{customer-AfRcAZ5P.js → customer-brfznoHY.js} +1 -1
- package/dist/en-US-BvOHPudj.js +1 -0
- package/dist/{en-US-DSzSbgL5.mjs → en-US-CXDO3qhq.mjs} +53 -0
- package/dist/index-BMWWP8xj.js +1 -0
- package/dist/index-Do7kzLpg.mjs +265 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{invoices-BHgajZHq.js → invoices-Cf3dSYSj.js} +1 -1
- package/dist/{invoices-BXDgW8ch.mjs → invoices-Dk-z04lg.mjs} +2 -2
- package/dist/{nl-NL-Li7RW89R.mjs → nl-NL-BgL_PuBn.mjs} +55 -1
- package/dist/nl-NL-COGUFg60.js +1 -0
- package/dist/{paymentMethods-xzFD2L30.mjs → paymentMethods-BnF1XYS1.mjs} +21 -5
- package/dist/paymentMethods-DVDC_WfL.js +1 -0
- package/dist/{payments-DMvmB5vg.js → payments-DVZFO5yb.js} +1 -1
- package/dist/{payments-DV6csRej.mjs → payments-TnRjtlOw.mjs} +1 -1
- package/dist/{pricing-BEjY_5wb.js → pricing-CuYndX6t.js} +1 -1
- package/dist/{pricing-B1uImUm4.mjs → pricing-GwLCiSzs.mjs} +1 -1
- package/dist/{pricingPlanSchedule-C_cqUyTk.mjs → pricingPlanSchedule-CXG3CQ61.mjs} +3 -1
- package/dist/{registry-CyENvS6l.mjs → registry-Ck0Gb6rj.mjs} +1 -1
- package/dist/{registry-CeMxLjwU.js → registry-Cra6yoB4.js} +1 -1
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +37 -36
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +32 -56
- package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -1
- package/dist/screens/PayInvoice/PayInvoice.es.js +28 -12
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs.js +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.es.js +28 -18
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs.js +1 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.es.js +436 -89
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs.js +1 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.es.js +28 -37
- package/dist/solvimon-web.css +1 -1
- package/dist/{subscription-B4dBAY9C.mjs → subscription-C41lG-rH.mjs} +1 -1
- package/dist/subscriptions-BFCKVHnP.js +1 -0
- package/dist/subscriptions-vEE4Y7qm.mjs +58 -0
- package/dist/{useActionDispatchProvider-zB_GKeUR.mjs → useActionDispatchProvider-BlEf-RZ5.mjs} +1 -1
- package/dist/{useActionDispatchProvider-bqR_FeM4.js → useActionDispatchProvider-aJOy3kr1.js} +1 -1
- package/dist/{useCustomer-bO4D6e4Z.js → useCustomer-C1XTqmrQ.js} +1 -1
- package/dist/{useCustomer-VfeQ6rG2.mjs → useCustomer-Cw8LXT6S.mjs} +2 -2
- package/dist/{useIncrementalLoading-C59FXHzp.mjs → useIncrementalLoading-8WtKZ-mP.mjs} +2 -2
- package/dist/useIncrementalLoading-CkY2klIW.js +1 -0
- package/dist/{useInvoiceData-CxxkBTGY.js → useInvoiceData-BrxMo4Zt.js} +1 -1
- package/dist/{useInvoiceData-Dhg-hx8C.mjs → useInvoiceData-Cy_ysMsq.mjs} +2 -2
- package/dist/{useInvoicesList-DBz7T7sM.mjs → useInvoicesList-DMsZn1tE.mjs} +4 -4
- package/dist/{useInvoicesList-BXZ9uV9i.js → useInvoicesList-DmisMQzy.js} +1 -1
- package/dist/{useLoadInitialData-BhpIg7OF.mjs → useLoadInitialData-BP1v7qhd.mjs} +1 -1
- package/dist/{useLoadInitialData-BqiAFNFi.js → useLoadInitialData-_BjCD0Jc.js} +1 -1
- package/dist/{usePaymentMethodOptions-PcMjtMSF.mjs → usePaymentMethodOptions-CWfGvW0U.mjs} +9 -3
- package/dist/{usePaymentMethodOptions-DszFvgKX.js → usePaymentMethodOptions-xeSTmaVo.js} +1 -1
- package/dist/{usePaymentMethods-Bb1Xbads.js → usePaymentMethods-CAFMvSOr.js} +1 -1
- package/dist/{usePaymentMethods-B5AbGWsn.mjs → usePaymentMethods-Cyk4cjoE.mjs} +2 -2
- package/dist/{usePayments-is5c66Z6.js → usePayments-BieVBaz-.js} +1 -1
- package/dist/{usePayments-DgoZoBZh.mjs → usePayments-D88XSZfS.mjs} +10 -4
- package/dist/{usePortal-DWLtNqBB.mjs → usePortal-0NDlbFr9.mjs} +1 -1
- package/dist/{usePortal-C4qWsJeq.js → usePortal-B954nyEB.js} +1 -1
- package/dist/{useService-DKm3QtT4.js → useService-BiljI7XA.js} +1 -1
- package/dist/{useService-BZqFkz7p.mjs → useService-CqfJi5ST.mjs} +1 -1
- package/dist/{useSubscription-CEZJw6wZ.mjs → useSubscription-9rJpFNUF.mjs} +9 -3
- package/dist/{useSubscription-DuUNc1_l.js → useSubscription-k3limdu_.js} +1 -1
- package/dist/vendor-ui-Dfh3_g4q.js +1 -0
- package/dist/{vendor-ui-BoGKOJ36.mjs → vendor-ui-ItGf7wJV.mjs} +1912 -1800
- package/package.json +12 -5
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-1Op9GjGZ.js +0 -1
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C66beqgf.js +0 -1
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D2BhuXsh.mjs +0 -77
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-BbuEBiY3.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-dwIv_xxf.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CMGK71zZ.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B_yDNGK8.mjs +0 -1537
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-GN3WAr10.js +0 -1
- package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-BQIN3zuf.mjs +0 -156
- package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DyL2-vV0.js +0 -1
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-OvGGejpX.js +0 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BxqIfmkK.js +0 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BKz2QQn9.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CyAFjCh7.js +0 -1
- package/dist/component-CUJ_G2Nw.mjs +0 -962
- package/dist/component-CiKxWtdx.js +0 -1
- package/dist/en-US-QzQnGXP1.js +0 -1
- package/dist/index-CzL1ZcGi.mjs +0 -85
- package/dist/index-DRdBmZ2-.js +0 -1
- package/dist/nl-NL-C4rr-1tr.js +0 -1
- package/dist/paymentMethods-BMcc-eTl.js +0 -1
- package/dist/subscriptions-CrNDM9qa.mjs +0 -79
- package/dist/subscriptions-DC-mxa17.js +0 -1
- package/dist/url-D8GJi5rF.js +0 -1
- package/dist/useIncrementalLoading-BgWuwoMo.js +0 -1
- package/dist/useTopUpModal-DNyWrHDv.mjs +0 -1012
- package/dist/useTopUpModal-DeF-cfCK.js +0 -1
- package/dist/vendor-ui-BuRqLx74.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../vendor-ui-BuRqLx74.js"),n=require("../../ContentWithAsideLayout-DHpnJfGA.js"),i=require("../../component-CiKxWtdx.js"),a=require("../../useActionDispatchProvider-bqR_FeM4.js"),o=require("../../usePortal-C4qWsJeq.js"),s=require("../../useSubscription-DuUNc1_l.js"),r=require("../../useCustomer-bO4D6e4Z.js"),l=require("../../usePaymentMethods-Bb1Xbads.js"),c=require("../../usePaymentMethodOptions-DszFvgKX.js"),u=require("../../useLoadInitialData-BqiAFNFi.js"),d=require("../../invoices-BHgajZHq.js"),m=require("../../pricingPlanSchedule-B9HFiXy-.js"),p=require("../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BxqIfmkK.js"),g=require("../../PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DyL2-vV0.js"),v=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),_=require("../../url-D8GJi5rF.js"),h=require("../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-zRr8iihy.js");const f={class:"sv-subscription-management-form__body grid grid-cols-1 gap-4"},b=e.defineComponent({__name:"SubscriptionManagementForm",props:e.mergeModels({pricingGroup:{type:Object},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},billingPeriod:{type:Object},currency:{type:String},disabled:{type:Boolean}},{enabledPricingIds:{required:!0},enabledPricingIdsModifiers:{},paymentMethodId:{},paymentMethodIdModifiers:{}}),emits:e.mergeModels(["add-payment-method"],["update:enabledPricingIds","update:paymentMethodId"]),setup(n,{emit:i}){const a=n,o=i,s=e.useModel(n,"enabledPricingIds"),r=e.useModel(n,"paymentMethodId"),{$t:l}=t.useIntl(),c=e=>{const t=e?Date.parse(e):NaN;return Number.isFinite(t)?t:0},u=e.computed(()=>[...a.paymentMethods??[]].sort((e,t)=>c(t.created_at)-c(e.created_at)));return e.watch(()=>a.paymentMethods,(e,t)=>{var n;const i=null==e?void 0:e.find(({id:e})=>!(null==t?void 0:t.some(t=>t.id===e)));i&&(null==t?void 0:t.length)?r.value=i.id:(null==e?void 0:e.some(({id:e})=>e===r.value))||(r.value=null==(n=(null==e?void 0:e.find(({is_default:e})=>e))??u.value[0])?void 0:n.id)},{immediate:!0}),(i,a)=>(e.openBlock(),e.createElementBlock("form",{class:"sv-subscription-management-form",onSubmit:a[3]||(a[3]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",f,[e.createVNode(p._sfc_main,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=e=>s.value=e),class:"sv-subscription-management-form__pricing-group","group-name":n.pricingGroup.name,pricings:n.pricingGroup.pricings,"billing-period":n.billingPeriod,currency:n.currency},null,8,["modelValue","group-name","pricings","billing-period","currency"]),e.createElementVNode("div",null,[e.createVNode(e.unref(t._sfc_main$30),{spacing:"xs"})]),e.createVNode(g._sfc_main,{modelValue:r.value,"onUpdate:modelValue":a[1]||(a[1]=e=>r.value=e),class:"sv-subscription-management-form__payment-methods","payment-methods":u.value,"payment-method-options":n.paymentMethodOptions,required:"",disabled:n.disabled,label:e.unref(l)({defaultMessage:"Payment method",id:"subscription_management.payment_method_selector.label",description:"Label above the payment method that pays for the subscription change"}),onAddPaymentMethod:a[2]||(a[2]=e=>o("add-payment-method"))},null,8,["modelValue","payment-methods","payment-method-options","disabled","label"])])],32))}}),y=e.defineComponent({__name:"TranslationOverride",props:{messages:{type:Object}},setup(n){const a=n,o=e.inject(i.TRANSLATION_SETTINGS_KEY,void 0),s=e.computed(()=>({...null==o?void 0:o.messages.value,...a.messages}));return(n,i)=>{var a,r;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$31),{locale:null==(a=e.unref(o))?void 0:a.locale.value,"date-locale":null==(r=e.unref(o))?void 0:r.dateLocale.value,messages:s.value,"show-timezones":!1},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["locale","date-locale","messages"])}}}),w=e.defineComponent({__name:"SubscriptionManagementSummary",props:{invoice:{type:Object},isPending:{type:Boolean},hasError:{type:Boolean}},setup(n){const{$t:i}=t.useIntl(),a=e.computed(()=>({"invoice_preview.total_due_today_heading":i({defaultMessage:"Total due",id:"subscription_management.summary.total_due_heading",description:'Heading above the total of the invoice previewing a subscription change, replacing the shared preview’s "Total due today"'})}));return(o,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-subscription-management-summary",title:e.unref(i)({defaultMessage:"Order summary",id:"subscription_management.summary.title",description:"Title of the block previewing what a subscription change is invoiced for"})},{default:e.withCtx(()=>[n.hasError?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$10),{key:0,class:"sv-subscription-management-summary__error sv-error",title:e.unref(i)({defaultMessage:"Unable to calculate the total. Please try again.",id:"subscription_management.summary.error",description:"Error shown when the invoice preview for a subscription change cannot be loaded"})},null,8,["title"])):n.isPending||!n.invoice?(e.openBlock(),e.createBlock(v._sfc_main,{key:1,variant:"section",class:"sv-subscription-management-summary__skeleton min-h-[120px]"},{default:e.withCtx(()=>[n.isPending?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,variant:"body-sm",shade:"lighter",tag:"div",class:"sv-subscription-management-summary__empty-state"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Select your plan to see what it costs.",id:"subscription_management.summary.empty_state",description:"Shown in the order summary before a plan has been picked to preview"})),1)]),_:1}))]),_:1})):(e.openBlock(),e.createBlock(y,{key:2,messages:a.value},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$29),{class:"sv-subscription-management-summary__invoice",invoice:n.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1},8,["messages"]))]),_:1},8,["title"]))}}),M={class:"sv-subscription-management-success grid grid-cols-1 gap-4"},S={class:"sv-subscription-management-success__message"},P=e.defineComponent({__name:"SubscriptionManagementSuccess",props:{pricingGroupName:{type:String}},setup(n){const i=n,{$t:a}=t.useIntl(),o=e.computed(()=>a({defaultMessage:"Subscription updated",description:"Title shown on the manage subscription screen once the change is committed",id:"subscription_management.success.title"})),s=e.computed(()=>i.pricingGroupName?a({defaultMessage:"Your {subject} has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of the pricing group a committed subscription change applied to",id:"subscription_management.success.message"},{subject:i.pricingGroupName}):a({defaultMessage:"Your subscription has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of a committed subscription change when the pricing group is not known",id:"subscription_management.success.message_generic"}));return(t,n)=>(e.openBlock(),e.createElementBlock("div",M,[e.createVNode(_._sfc_main,{status:"success",title:o.value},{default:e.withCtx(()=>[e.createElementVNode("span",S,e.toDisplayString(s.value),1)]),_:1},8,["title"])]))}}),k=e.defineComponent({__name:"AddPaymentMethodModal",props:{showModal:{type:Boolean},customer:{type:Object},paymentMethodOptions:{type:Array},isLoading:{type:Boolean}},emits:["success","failure","close"],setup(n,{emit:i}){const a=n,o=i,{$t:s}=t.useIntl(),r=e.ref(),l=e.computed(()=>{var e;return Boolean(null==(e=r.value)?void 0:e.isPaymentPending)}),c=e.ref(!1);e.watch(()=>a.showModal,e=>{c.value=c.value||e},{immediate:!0});const u=()=>{var e;null==(e=r.value)||e.submit()};return(i,a)=>(e.openBlock(),e.createBlock(e.unref(t.Modal),{"no-click-away":"",class:"sv-add-payment-method-modal",size:"lg","show-modal":n.showModal,"is-loading":l.value,title:e.unref(s)({defaultMessage:"Add payment method",id:"add_payment_method_modal.title",description:"Title of the modal for adding a payment method"}),"sub-title":e.unref(s)({defaultMessage:"Add a new payment method to pay with.",id:"add_payment_method_modal.subtitle",description:"Subtitle of the modal for adding a payment method"}),"confirm-button-text":e.unref(s)({defaultMessage:"Save payment method",id:"add_payment_method_modal.confirm_button.label",description:"Label of the button that stores the payment method being added"}),"cancel-button-text":e.unref(s)({defaultMessage:"Cancel",id:"add_payment_method_modal.cancel_button.label",description:"Label of the button that abandons adding a payment method"}),onConfirm:u,onClose:a[2]||(a[2]=e=>o("close"))},{body:e.withCtx(()=>[n.customer&&c.value?(e.openBlock(),e.createBlock(h._sfc_main,{key:0,ref_key:"paymentMethodFormRef",ref:r,"hide-submit-button":"",class:"sv-add-payment-method-modal__form",customer:n.customer,"payment-method-options":n.paymentMethodOptions,"is-loading":n.isLoading,onSuccess:a[0]||(a[0]=e=>o("success")),onFailure:a[1]||(a[1]=e=>o("failure",e))},null,8,["customer","payment-method-options","is-loading"])):e.createCommentVNode("",!0)]),_:1},8,["show-modal","is-loading","title","sub-title","confirm-button-text","cancel-button-text"]))}}),B={class:"sv-subscription-management__header"},I={class:"flex flex-col gap-2"},C=e.defineComponent({__name:"SubscriptionManagement",props:{configuration:{type:Object}},setup(g){const _=g,{$t:h}=t.useIntl(),f=o.usePortal(),y=i.useLogger(),{dispatchAction:M}=a.useActionDispatchProvider(),{createPricingPlanSchedule:S}=function(){const e=i.createRequestService(),t=i.useConfig();return{getOnDemandPricingItems:function({scheduleId:n}){return e({url:`${t.apiUrls.config}/portal/pricing-plan-schedules/${n}/on-demand-pricing-items`})},createPricingPlanSchedule:function({pricingPlanSubscriptionId:n,enabledPricings:i}){return e({url:`${t.apiUrls.config}/portal/pricing-plan-schedules`,options:{method:"POST"},data:{pricing_plan_subscription_id:n,enabled_pricings:i}})}}}(),{subscription:C,get:N}=s.useSubscription({subscriptionId:_.configuration.subscriptionId}),{items:j,fetchAll:x}=l.usePaymentMethods({customerId:f.value.customer_id}),{customer:O,get:V}=r.useCustomer({customerId:f.value.customer_id}),{paymentMethodOptions:E,get:A}=c.usePaymentMethodOptions(),{isLoading:L}=u.useLoadInitialData(N(),x(),V.execute(),A({customerId:f.value.customer_id})),T=e.ref(!1),q=async()=>{await x(),T.value=!1},$=e.computed(()=>{var e;return m.getActiveDefaultScheduleInfo((null==(e=C.value)?void 0:e.pricing_plan_schedule_infos)??[])}),D=e.computed(()=>{var e;const t=$.value;if(!t)return;const{enabledPricingId:n}=_.configuration;return(n?[n]:((null==(e=t.pricing_plan_schedule)?void 0:e.enabled_pricings)??[]).map(({pricing_id:e})=>e)).map(e=>m.getPricingGroupByPricingId({pricingPlanScheduleInfo:t,pricingId:e})).find(e=>Boolean(e))}),F=e.computed(()=>{var e;return h({defaultMessage:"Manage {subject}",id:"subscription_management.title",description:"Title for the manage subscription page, naming the pricing group being changed"},{subject:(null==(e=D.value)?void 0:e.name)||h({defaultMessage:"subscription",id:"subscription_management.title.default_subject",description:'Stands in for the pricing group name in the manage subscription title when no group is known, e.g. "Manage subscription"'})})}),U=e.ref([]),G=e.ref();e.watch([$,D],([e,t])=>{var n;const i=((null==(n=null==e?void 0:e.pricing_plan_schedule)?void 0:n.enabled_pricings)??[]).map(({pricing_id:e})=>e),{enabledPricingId:a}=_.configuration,o=((null==t?void 0:t.pricings)??[]).map(({id:e})=>e);U.value=a&&o.includes(a)?[...i.filter(e=>!o.includes(e)),a]:i},{immediate:!0});const{invoice:R,isPending:z,error:W,load:Y}=function(){const{getInvoicePreview:t}=d.createInvoicesService(),n=i.useLogger(),a=e.ref(),o=e.ref(!1),s=e.ref();let r=0;return{invoice:a,isPending:o,error:s,load:async({subscription:e,enabledPricingIds:i})=>{const l=m.getScheduleCustomizations({enabledPricings:i.map(e=>({pricing_id:e})),pricingPlanScheduleInfos:e.pricing_plan_schedule_infos});if(!l)return void(a.value=void 0);const c=++r;o.value=!0,s.value=void 0;try{const n=await t({forExistingSubscription:!0,pricingPlanSubscriptionId:e.id,customizations:l});if(c!==r)return;a.value=n.invoice}catch(W){if(c!==r)return;n.error("INVOICE_PREVIEW_FAILED","Failed to preview the subscription upgrade",{},W),s.value=W,a.value=void 0}finally{c===r&&(o.value=!1)}}}}();e.watch([U,C],([e,t])=>{t&&0!==e.length&&Y({subscription:t,enabledPricingIds:e})},{immediate:!0});const K=e.ref(!1),H=e.ref(),J=e.ref(!1),Q=e.computed(()=>!L.value&&!K.value&&U.value.length>0&&Boolean(C.value)&&Boolean(G.value)),X=async()=>{if(Q.value&&C.value){K.value=!0,H.value=void 0;try{await S({pricingPlanSubscriptionId:C.value.id,enabledPricings:U.value.map(e=>({pricing_id:e}))}),J.value=!0}catch(e){y.error("SUBSCRIPTION_UPDATE_FAILED","Failed to start a new pricing plan schedule",{},e),H.value=h({defaultMessage:"Something went wrong. Please try again.",id:"subscription_management.update_error",description:"Error shown when committing a subscription change fails"})}finally{K.value=!1}}},Z=e.computed(()=>{var e,t,n;return(null==(t=null==(e=$.value)?void 0:e.pricing_plan_schedule)?void 0:t.billing_period)??(null==(n=C.value)?void 0:n.billing_period)});return(i,a)=>(e.openBlock(),e.createBlock(e.unref(n.ContentWithAsideLayout),{class:"sv-subscription-management sv-root sv-screen"},{header:e.withCtx(()=>[e.createElementVNode("div",B,[e.createVNode(e.unref(t._sfc_main$3),{variant:"heading-2",tag:"h1",class:"sv-subscription-management__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(F.value),1)]),_:1})])]),content:e.withCtx(()=>{var t,n;return[J.value?(e.openBlock(),e.createBlock(P,{key:0,class:"sv-subscription-management__success","pricing-group-name":null==(t=D.value)?void 0:t.name},null,8,["pricing-group-name"])):e.unref(L)?(e.openBlock(),e.createBlock(v._sfc_main,{key:1,variant:"section",class:"min-h-[220px]"})):D.value&&Z.value?(e.openBlock(),e.createBlock(b,{key:2,"enabled-pricing-ids":U.value,"onUpdate:enabledPricingIds":a[0]||(a[0]=e=>U.value=e),"payment-method-id":G.value,"onUpdate:paymentMethodId":a[1]||(a[1]=e=>G.value=e),class:"sv-subscription-management__form","pricing-group":D.value,"payment-methods":e.unref(j),"payment-method-options":e.unref(E),"billing-period":Z.value,currency:null==(n=e.unref(C))?void 0:n.billing_currency,onAddPaymentMethod:a[2]||(a[2]=e=>T.value=!0)},null,8,["enabled-pricing-ids","payment-method-id","pricing-group","payment-methods","payment-method-options","billing-period","currency"])):e.createCommentVNode("",!0),e.createVNode(k,{"show-modal":T.value,customer:e.unref(O),"payment-method-options":e.unref(E),onSuccess:q,onClose:a[3]||(a[3]=e=>T.value=!1)},null,8,["show-modal","customer","payment-method-options"])]}),aside:e.withCtx(()=>[J.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__done w-full",type:"button",onClick:a[4]||(a[4]=t=>e.unref(M)({action:"navigate-to-customer-overview"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h)({defaultMessage:"Done",id:"subscription_management.done_button.label",description:"Label of the button that leaves the manage subscription screen once the change is committed"})),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{class:"sv-subscription-management__summary",invoice:e.unref(R),"is-pending":e.unref(L)||e.unref(z),"has-error":Boolean(e.unref(W))},null,8,["invoice","is-pending","has-error"]),H.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$10),{key:0,class:"sv-subscription-management__update-error sv-error",title:H.value},null,8,["title"])):e.createCommentVNode("",!0),e.createElementVNode("div",I,[e.createVNode(e.unref(t._sfc_main$1),{size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__update w-full",type:"button",disabled:!Q.value,loading:K.value,onClick:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h)({defaultMessage:"Update subscription",id:"subscription_management.update_button.label",description:"Label of the button that commits the subscription change"})),1)]),_:1},8,["disabled","loading"]),e.createVNode(p._sfc_main$1,{class:"sv-subscription-management__kpi","payment-method-options":e.unref(E)},null,8,["payment-method-options"])])],64))]),_:1}))}}),N=e.defineComponent({__name:"SubscriptionManagement.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=>(n,a)=>{var o,s,r,l;return e.openBlock(),e.createBlock(i._sfc_main,{"custom-element-name":e.unref(x),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(o=t.branding)?void 0:o.colors)?void 0:s.primary,"secondary-color":null==(l=null==(r=t.branding)?void 0:r.colors)?void 0:l.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:a[0]||(a[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(C,{configuration:t.configuration},null,8,["configuration"])]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),j=i.defineCustomElement(N),x=i.getComponentName("subscription-management");exports.COMPONENT_NAME=x,exports.SolvimonSubscriptionManagement=j,exports.defineSolvimonSubscriptionManagement=()=>{customElements.get(x)||customElements.define(x,j)};
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../vendor-ui-Dfh3_g4q.js"),n=require("../../ContentWithAsideLayout-DHpnJfGA.js"),i=require("../../component-DIy1hvJM.js"),a=require("../../useActionDispatchProvider-aJOy3kr1.js"),o=require("../../usePortal-B954nyEB.js"),s=require("../../useSubscription-k3limdu_.js"),r=require("../../useCustomer-C1XTqmrQ.js"),l=require("../../usePaymentMethods-CAFMvSOr.js"),c=require("../../usePaymentMethodOptions-xeSTmaVo.js"),u=require("../../useLoadInitialData-_BjCD0Jc.js"),d=require("../../invoices-Cf3dSYSj.js"),p=require("../../pricingPlanSchedule-B9HFiXy-.js"),m=require("../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DdUoeTUL.js"),g=require("../../AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Rub9ifBk.js"),v=require("../../Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js"),_=require("../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D6lpD1zo.js");const h={class:"sv-subscription-management-form__body grid grid-cols-1 gap-4"},f=e.defineComponent({__name:"SubscriptionManagementForm",props:e.mergeModels({pricingGroup:{type:Object},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},billingPeriod:{type:Object},currency:{type:String},disabled:{type:Boolean}},{enabledPricingIds:{required:!0},enabledPricingIdsModifiers:{},paymentMethodId:{},paymentMethodIdModifiers:{}}),emits:e.mergeModels(["add-payment-method"],["update:enabledPricingIds","update:paymentMethodId"]),setup(n,{emit:i}){const a=n,o=i,s=e.useModel(n,"enabledPricingIds"),r=e.useModel(n,"paymentMethodId"),{$t:l}=t.useIntl(),c=e=>{const t=e?Date.parse(e):NaN;return Number.isFinite(t)?t:0},u=e.computed(()=>[...a.paymentMethods??[]].sort((e,t)=>c(t.created_at)-c(e.created_at)));return e.watch(()=>a.paymentMethods,(e,t)=>{var n;const i=null==e?void 0:e.find(({id:e})=>!(null==t?void 0:t.some(t=>t.id===e)));i&&(null==t?void 0:t.length)?r.value=i.id:(null==e?void 0:e.some(({id:e})=>e===r.value))||(r.value=null==(n=(null==e?void 0:e.find(({is_default:e})=>e))??u.value[0])?void 0:n.id)},{immediate:!0}),(i,a)=>(e.openBlock(),e.createElementBlock("form",{class:"sv-subscription-management-form",onSubmit:a[3]||(a[3]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",h,[e.createVNode(m._sfc_main,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=e=>s.value=e),class:"sv-subscription-management-form__pricing-group","group-name":n.pricingGroup.name,pricings:n.pricingGroup.pricings,"billing-period":n.billingPeriod,currency:n.currency},null,8,["modelValue","group-name","pricings","billing-period","currency"]),e.createElementVNode("div",null,[e.createVNode(e.unref(t._sfc_main$27),{spacing:"xs"})]),e.createVNode(g._sfc_main,{modelValue:r.value,"onUpdate:modelValue":a[1]||(a[1]=e=>r.value=e),class:"sv-subscription-management-form__payment-methods","payment-methods":u.value,"payment-method-options":n.paymentMethodOptions,required:"",disabled:n.disabled,label:e.unref(l)({defaultMessage:"Payment method",id:"subscription_management.payment_method_selector.label",description:"Label above the payment method that pays for the subscription change"}),onAddPaymentMethod:a[2]||(a[2]=e=>o("add-payment-method"))},null,8,["modelValue","payment-methods","payment-method-options","disabled","label"])])],32))}}),b=e.defineComponent({__name:"TranslationOverride",props:{messages:{type:Object}},setup(n){const a=n,o=e.inject(i.TRANSLATION_SETTINGS_KEY,void 0),s=e.computed(()=>({...null==o?void 0:o.messages.value,...a.messages}));return(n,i)=>{var a,r;return e.openBlock(),e.createBlock(e.unref(t._sfc_main$28),{locale:null==(a=e.unref(o))?void 0:a.locale.value,"date-locale":null==(r=e.unref(o))?void 0:r.dateLocale.value,messages:s.value,"show-timezones":!1},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["locale","date-locale","messages"])}}}),y=e.defineComponent({__name:"SubscriptionManagementSummary",props:{invoice:{type:Object},isPending:{type:Boolean},hasError:{type:Boolean}},setup(n){const{$t:i}=t.useIntl(),a=e.computed(()=>({"invoice_preview.total_due_today_heading":i({defaultMessage:"Total due",id:"subscription_management.summary.total_due_heading",description:'Heading above the total of the invoice previewing a subscription change, replacing the shared preview’s "Total due today"'})}));return(o,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{class:"sv-subscription-management-summary",title:e.unref(i)({defaultMessage:"Order summary",id:"subscription_management.summary.title",description:"Title of the block previewing what a subscription change is invoiced for"})},{default:e.withCtx(()=>[n.hasError?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:0,class:"sv-subscription-management-summary__error sv-error",title:e.unref(i)({defaultMessage:"Unable to calculate the total. Please try again.",id:"subscription_management.summary.error",description:"Error shown when the invoice preview for a subscription change cannot be loaded"})},null,8,["title"])):n.isPending||!n.invoice?(e.openBlock(),e.createBlock(v._sfc_main,{key:1,variant:"section",class:"sv-subscription-management-summary__skeleton min-h-[120px]"},{default:e.withCtx(()=>[n.isPending?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:0,variant:"body-sm",shade:"lighter",tag:"div",class:"sv-subscription-management-summary__empty-state"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Select your plan to see what it costs.",id:"subscription_management.summary.empty_state",description:"Shown in the order summary before a plan has been picked to preview"})),1)]),_:1}))]),_:1})):(e.openBlock(),e.createBlock(b,{key:2,messages:a.value},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$29),{class:"sv-subscription-management-summary__invoice",invoice:n.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1},8,["messages"]))]),_:1},8,["title"]))}}),w={class:"sv-subscription-management-success grid grid-cols-1 gap-4"},S={class:"sv-subscription-management-success__message"},M=e.defineComponent({__name:"SubscriptionManagementSuccess",props:{pricingGroupName:{type:String}},setup(n){const i=n,{$t:a}=t.useIntl(),o=e.computed(()=>a({defaultMessage:"Subscription updated",description:"Title shown on the manage subscription screen once the change is committed",id:"subscription_management.success.title"})),s=e.computed(()=>i.pricingGroupName?a({defaultMessage:"Your {subject} has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of the pricing group a committed subscription change applied to",id:"subscription_management.success.message"},{subject:i.pricingGroupName}):a({defaultMessage:"Your subscription has been changed. Please be aware that it can take some time to reflect this change in your subscription.",description:"Confirmation of a committed subscription change when the pricing group is not known",id:"subscription_management.success.message_generic"}));return(t,n)=>(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(_._sfc_main,{status:"success",title:o.value},{default:e.withCtx(()=>[e.createElementVNode("span",S,e.toDisplayString(s.value),1)]),_:1},8,["title"])]))}}),P=e.defineComponent({__name:"AddPaymentMethodModal",props:{showModal:{type:Boolean},customer:{type:Object},paymentMethodOptions:{type:Array},isLoading:{type:Boolean}},emits:["success","failure","close"],setup(n,{emit:i}){const a=i,{$t:o}=t.useIntl(),s=e.ref(),r=e.computed(()=>{var e;return!!(null==(e=s.value)?void 0:e.isSaving)}),l=()=>{var e;null==(e=s.value)||e.submit()};return(i,c)=>(e.openBlock(),e.createBlock(e.unref(t.Modal),{"no-click-away":"",size:"lg","show-modal":n.showModal,"is-loading":r.value,title:e.unref(o)({defaultMessage:"Add payment method",id:"add_payment_method_modal.title",description:"Title of the modal for adding a payment method"}),"sub-title":e.unref(o)({defaultMessage:"Add a new payment method to pay with.",id:"add_payment_method_modal.subtitle",description:"Subtitle of the modal for adding a payment method"}),"confirm-button-text":e.unref(o)({defaultMessage:"Save payment method",id:"add_payment_method_modal.confirm_button.label",description:"Label of the button that stores the payment method being added"}),"cancel-button-text":e.unref(o)({defaultMessage:"Cancel",id:"add_payment_method_modal.cancel_button.label",description:"Label of the button that abandons adding a payment method"}),onConfirm:l,onClose:c[2]||(c[2]=e=>a("close"))},{body:e.withCtx(()=>[e.createVNode(g._sfc_main$1,{ref_key:"addPaymentMethodRef",ref:s,class:"sv-add-payment-method-modal sv-add-payment-method-modal__form",customer:n.customer,"payment-method-options":n.paymentMethodOptions,"is-loading":n.isLoading,"is-active":n.showModal,onSuccess:c[0]||(c[0]=e=>a("success")),onFailure:c[1]||(c[1]=e=>a("failure",e))},null,8,["customer","payment-method-options","is-loading","is-active"])]),_:1},8,["show-modal","is-loading","title","sub-title","confirm-button-text","cancel-button-text"]))}}),k={class:"sv-subscription-management__header"},I={class:"flex flex-col gap-2"},C=e.defineComponent({__name:"SubscriptionManagement",props:{configuration:{type:Object}},setup(g){const _=g,{$t:h}=t.useIntl(),b=o.usePortal(),w=i.useLogger(),{dispatchAction:S}=a.useActionDispatchProvider(),{createPricingPlanSchedule:C}=function(){const e=i.createRequestService(),t=i.useConfig();return{getOnDemandPricingItems:function({scheduleId:n}){return e({url:`${t.apiUrls.config}/portal/pricing-plan-schedules/${n}/on-demand-pricing-items`})},createPricingPlanSchedule:function({pricingPlanSubscriptionId:n,enabledPricings:i}){return e({url:`${t.apiUrls.config}/portal/pricing-plan-schedules`,options:{method:"POST"},data:{pricing_plan_subscription_id:n,enabled_pricings:i,start_at:(new Date).toJSON()}})}}}(),{subscription:B,get:N}=s.useSubscription({subscriptionId:_.configuration.subscriptionId}),{items:j,fetchAll:x}=l.usePaymentMethods({customerId:b.value.customer_id}),{customer:O,get:V}=r.useCustomer({customerId:b.value.customer_id}),{paymentMethodOptions:E,get:A}=c.usePaymentMethodOptions(),{isLoading:L}=u.useLoadInitialData(N(),x(),V.execute(),A({customerId:b.value.customer_id})),T=e.ref(!1),$=async()=>{await x(),T.value=!1},q=e.computed(()=>{var e;return p.getActiveDefaultScheduleInfo((null==(e=B.value)?void 0:e.pricing_plan_schedule_infos)??[])}),D=e.computed(()=>{var e;const t=q.value;if(!t)return;const{enabledPricingId:n}=_.configuration;return(n?[n]:((null==(e=t.pricing_plan_schedule)?void 0:e.enabled_pricings)??[]).map(({pricing_id:e})=>e)).map(e=>p.getPricingGroupByPricingId({pricingPlanScheduleInfo:t,pricingId:e})).find(e=>Boolean(e))}),F=e.computed(()=>{var e;return h({defaultMessage:"Manage {subject}",id:"subscription_management.title",description:"Title for the manage subscription page, naming the pricing group being changed"},{subject:(null==(e=D.value)?void 0:e.name)||h({defaultMessage:"subscription",id:"subscription_management.title.default_subject",description:'Stands in for the pricing group name in the manage subscription title when no group is known, e.g. "Manage subscription"'})})}),U=e.ref([]),G=e.ref();e.watch([q,D],([e,t])=>{var n;const i=((null==(n=null==e?void 0:e.pricing_plan_schedule)?void 0:n.enabled_pricings)??[]).map(({pricing_id:e})=>e),{enabledPricingId:a}=_.configuration,o=((null==t?void 0:t.pricings)??[]).map(({id:e})=>e);U.value=a&&o.includes(a)?[...i.filter(e=>!o.includes(e)),a]:i},{immediate:!0});const{invoice:R,isPending:z,error:W,load:Y}=function(){const{getInvoicePreview:t}=d.createInvoicesService(),n=i.useLogger(),a=e.ref(),o=e.ref(!1),s=e.ref();let r=0;return{invoice:a,isPending:o,error:s,load:async({subscription:e,enabledPricingIds:i})=>{const l=p.getScheduleCustomizations({enabledPricings:i.map(e=>({pricing_id:e})),pricingPlanScheduleInfos:e.pricing_plan_schedule_infos});if(!l)return void(a.value=void 0);const c=++r;o.value=!0,s.value=void 0;try{const n=await t({forExistingSubscription:!0,pricingPlanSubscriptionId:e.id,customizations:l});if(c!==r)return;a.value=n.invoice}catch(W){if(c!==r)return;n.error("INVOICE_PREVIEW_FAILED","Failed to preview the subscription upgrade",{},W),s.value=W,a.value=void 0}finally{c===r&&(o.value=!1)}}}}();e.watch([U,B],([e,t])=>{t&&0!==e.length&&Y({subscription:t,enabledPricingIds:e})},{immediate:!0});const K=e.ref(!1),H=e.ref(),J=e.ref(!1),Q=e.computed(()=>!L.value&&!K.value&&U.value.length>0&&Boolean(B.value)&&Boolean(G.value)),X=async()=>{if(Q.value&&B.value){K.value=!0,H.value=void 0;try{await C({pricingPlanSubscriptionId:B.value.id,enabledPricings:U.value.map(e=>({pricing_id:e}))}),J.value=!0}catch(e){w.error("SUBSCRIPTION_UPDATE_FAILED","Failed to start a new pricing plan schedule",{},e),H.value=h({defaultMessage:"Something went wrong. Please try again.",id:"subscription_management.update_error",description:"Error shown when committing a subscription change fails"})}finally{K.value=!1}}},Z=e.computed(()=>{var e,t,n;return(null==(t=null==(e=q.value)?void 0:e.pricing_plan_schedule)?void 0:t.billing_period)??(null==(n=B.value)?void 0:n.billing_period)});return(i,a)=>(e.openBlock(),e.createBlock(e.unref(n.ContentWithAsideLayout),{class:"sv-subscription-management sv-root sv-screen"},{header:e.withCtx(()=>[e.createElementVNode("div",k,[e.createVNode(e.unref(t._sfc_main$1),{variant:"heading-2",tag:"h1",class:"sv-subscription-management__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(F.value),1)]),_:1})])]),content:e.withCtx(()=>{var t,n;return[J.value?(e.openBlock(),e.createBlock(M,{key:0,class:"sv-subscription-management__success","pricing-group-name":null==(t=D.value)?void 0:t.name},null,8,["pricing-group-name"])):e.unref(L)?(e.openBlock(),e.createBlock(v._sfc_main,{key:1,variant:"section",class:"min-h-[220px]"})):D.value&&Z.value?(e.openBlock(),e.createBlock(f,{key:2,"enabled-pricing-ids":U.value,"onUpdate:enabledPricingIds":a[0]||(a[0]=e=>U.value=e),"payment-method-id":G.value,"onUpdate:paymentMethodId":a[1]||(a[1]=e=>G.value=e),class:"sv-subscription-management__form","pricing-group":D.value,"payment-methods":e.unref(j),"payment-method-options":e.unref(E),"billing-period":Z.value,currency:null==(n=e.unref(B))?void 0:n.billing_currency,onAddPaymentMethod:a[2]||(a[2]=e=>T.value=!0)},null,8,["enabled-pricing-ids","payment-method-id","pricing-group","payment-methods","payment-method-options","billing-period","currency"])):e.createCommentVNode("",!0),e.createVNode(P,{"show-modal":T.value,customer:e.unref(O),"payment-method-options":e.unref(E),onSuccess:$,onClose:a[3]||(a[3]=e=>T.value=!1)},null,8,["show-modal","customer","payment-method-options"])]}),aside:e.withCtx(()=>[J.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__done w-full",type:"button",onClick:a[4]||(a[4]=t=>e.unref(S)({action:"navigate-to-customer-overview"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h)({defaultMessage:"Done",id:"subscription_management.done_button.label",description:"Label of the button that leaves the manage subscription screen once the change is committed"})),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(y,{class:"sv-subscription-management__summary",invoice:e.unref(R),"is-pending":e.unref(L)||e.unref(z),"has-error":Boolean(e.unref(W))},null,8,["invoice","is-pending","has-error"]),H.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:0,class:"sv-subscription-management__update-error sv-error",title:H.value},null,8,["title"])):e.createCommentVNode("",!0),e.createElementVNode("div",I,[e.createVNode(e.unref(t._sfc_main$6),{size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-subscription-management__update w-full",type:"button",disabled:!Q.value,loading:K.value,onClick:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h)({defaultMessage:"Update subscription",id:"subscription_management.update_button.label",description:"Label of the button that commits the subscription change"})),1)]),_:1},8,["disabled","loading"]),e.createVNode(m._sfc_main$1,{class:"sv-subscription-management__kpi","payment-method-options":e.unref(E)},null,8,["payment-method-options"])])],64))]),_:1}))}}),B=e.defineComponent({__name:"SubscriptionManagement.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=>(n,a)=>{var o,s,r,l;return e.openBlock(),e.createBlock(i._sfc_main,{"custom-element-name":e.unref(j),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(o=t.branding)?void 0:o.colors)?void 0:s.primary,"secondary-color":null==(l=null==(r=t.branding)?void 0:r.colors)?void 0:l.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:a[0]||(a[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(C,{configuration:t.configuration},null,8,["configuration"])]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),N=i.defineCustomElement(B),j=i.getComponentName("subscription-management");exports.COMPONENT_NAME=j,exports.SolvimonSubscriptionManagement=N,exports.defineSolvimonSubscriptionManagement=()=>{customElements.get(j)||customElements.define(j,N)};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { ref, defineComponent, useModel, computed, watch, openBlock, createElementBlock, withModifiers, createElementVNode, createVNode, unref, mergeModels, inject, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, Fragment } from "vue";
|
|
2
|
-
import { u as useIntl,
|
|
2
|
+
import { u as useIntl, $ as _sfc_main$8, a0 as _sfc_main$a, b as _sfc_main$b, D as _sfc_main$c, a as _sfc_main$e, a1 as _sfc_main$f, M as Modal, k as _sfc_main$i } from "../../vendor-ui-ItGf7wJV.mjs";
|
|
3
3
|
import { C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-Dy9xgxuF.mjs";
|
|
4
|
-
import { a as useLogger, c as createRequestService, u as useConfig, T as TRANSLATION_SETTINGS_KEY, _ as _sfc_main$k, d as defineCustomElement, g as getComponentName } from "../../component
|
|
5
|
-
import { u as useActionDispatchProvider } from "../../useActionDispatchProvider-
|
|
6
|
-
import { u as usePortal } from "../../usePortal-
|
|
7
|
-
import { u as useSubscription } from "../../useSubscription-
|
|
8
|
-
import { u as useCustomer } from "../../useCustomer-
|
|
9
|
-
import { u as usePaymentMethods } from "../../usePaymentMethods-
|
|
10
|
-
import { u as usePaymentMethodOptions } from "../../usePaymentMethodOptions-
|
|
11
|
-
import { u as useLoadInitialData } from "../../useLoadInitialData-
|
|
12
|
-
import { c as createInvoicesService } from "../../invoices-
|
|
13
|
-
import { b as getScheduleCustomizations, c as getActiveDefaultScheduleInfo, d as getPricingGroupByPricingId } from "../../pricingPlanSchedule-
|
|
14
|
-
import { _ as _sfc_main$7, a as _sfc_main$j } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { _ as _sfc_main$9 } from "../../
|
|
4
|
+
import { a as useLogger, c as createRequestService, u as useConfig, T as TRANSLATION_SETTINGS_KEY, _ as _sfc_main$k, d as defineCustomElement, g as getComponentName } from "../../component--Y7Igv5i.mjs";
|
|
5
|
+
import { u as useActionDispatchProvider } from "../../useActionDispatchProvider-BlEf-RZ5.mjs";
|
|
6
|
+
import { u as usePortal } from "../../usePortal-0NDlbFr9.mjs";
|
|
7
|
+
import { u as useSubscription } from "../../useSubscription-9rJpFNUF.mjs";
|
|
8
|
+
import { u as useCustomer } from "../../useCustomer-Cw8LXT6S.mjs";
|
|
9
|
+
import { u as usePaymentMethods } from "../../usePaymentMethods-Cyk4cjoE.mjs";
|
|
10
|
+
import { u as usePaymentMethodOptions } from "../../usePaymentMethodOptions-CWfGvW0U.mjs";
|
|
11
|
+
import { u as useLoadInitialData } from "../../useLoadInitialData-BP1v7qhd.mjs";
|
|
12
|
+
import { c as createInvoicesService } from "../../invoices-Dk-z04lg.mjs";
|
|
13
|
+
import { b as getScheduleCustomizations, c as getActiveDefaultScheduleInfo, d as getPricingGroupByPricingId } from "../../pricingPlanSchedule-CXG3CQ61.mjs";
|
|
14
|
+
import { _ as _sfc_main$7, a as _sfc_main$j } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DaWlLor0.mjs";
|
|
15
|
+
import { _ as _sfc_main$9, a as _sfc_main$h } from "../../AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-C2IRj-FB.mjs";
|
|
16
16
|
import { _ as _sfc_main$d } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
17
|
-
import { _ as _sfc_main$g } from "../../
|
|
18
|
-
import { _ as _sfc_main$h } from "../../PaymentMethodForm.vue_vue_type_script_setup_true_lang-CIQ0vsko.mjs";
|
|
17
|
+
import { _ as _sfc_main$g } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CupZFJSF.mjs";
|
|
19
18
|
function useSubscriptionUpgradePreview() {
|
|
20
19
|
const { getInvoicePreview } = createInvoicesService();
|
|
21
20
|
const logger = useLogger();
|
|
@@ -85,7 +84,8 @@ function createPricingPlanSchedulesService() {
|
|
|
85
84
|
options: { method: "POST" },
|
|
86
85
|
data: {
|
|
87
86
|
pricing_plan_subscription_id: pricingPlanSubscriptionId,
|
|
88
|
-
enabled_pricings: enabledPricings
|
|
87
|
+
enabled_pricings: enabledPricings,
|
|
88
|
+
start_at: (/* @__PURE__ */ new Date()).toJSON()
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
}
|
|
@@ -342,30 +342,20 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
342
342
|
},
|
|
343
343
|
emits: ["success", "failure", "close"],
|
|
344
344
|
setup(__props, { emit: __emit }) {
|
|
345
|
-
const props = __props;
|
|
346
345
|
const emit = __emit;
|
|
347
346
|
const { $t } = useIntl();
|
|
348
|
-
const
|
|
347
|
+
const addPaymentMethodRef = ref();
|
|
349
348
|
const isSaving = computed(() => {
|
|
350
349
|
var _a;
|
|
351
|
-
return
|
|
350
|
+
return !!((_a = addPaymentMethodRef.value) == null ? void 0 : _a.isSaving);
|
|
352
351
|
});
|
|
353
|
-
const hasEverOpened = ref(false);
|
|
354
|
-
watch(
|
|
355
|
-
() => props.showModal,
|
|
356
|
-
(showModal) => {
|
|
357
|
-
hasEverOpened.value = hasEverOpened.value || showModal;
|
|
358
|
-
},
|
|
359
|
-
{ immediate: true }
|
|
360
|
-
);
|
|
361
352
|
const handleConfirm = () => {
|
|
362
353
|
var _a;
|
|
363
|
-
(_a =
|
|
354
|
+
(_a = addPaymentMethodRef.value) == null ? void 0 : _a.submit();
|
|
364
355
|
};
|
|
365
356
|
return (_ctx, _cache) => {
|
|
366
357
|
return openBlock(), createBlock(unref(Modal), {
|
|
367
358
|
"no-click-away": "",
|
|
368
|
-
class: "sv-add-payment-method-modal",
|
|
369
359
|
size: "lg",
|
|
370
360
|
"show-modal": __props.showModal,
|
|
371
361
|
"is-loading": isSaving.value,
|
|
@@ -393,18 +383,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
393
383
|
onClose: _cache[2] || (_cache[2] = ($event) => emit("close"))
|
|
394
384
|
}, {
|
|
395
385
|
body: withCtx(() => [
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
"hide-submit-button": "",
|
|
401
|
-
class: "sv-add-payment-method-modal__form",
|
|
386
|
+
createVNode(_sfc_main$h, {
|
|
387
|
+
ref_key: "addPaymentMethodRef",
|
|
388
|
+
ref: addPaymentMethodRef,
|
|
389
|
+
class: "sv-add-payment-method-modal sv-add-payment-method-modal__form",
|
|
402
390
|
customer: __props.customer,
|
|
403
391
|
"payment-method-options": __props.paymentMethodOptions,
|
|
404
392
|
"is-loading": __props.isLoading,
|
|
393
|
+
"is-active": __props.showModal,
|
|
405
394
|
onSuccess: _cache[0] || (_cache[0] = ($event) => emit("success")),
|
|
406
395
|
onFailure: _cache[1] || (_cache[1] = (error) => emit("failure", error))
|
|
407
|
-
}, null, 8, ["customer", "payment-method-options", "is-loading"
|
|
396
|
+
}, null, 8, ["customer", "payment-method-options", "is-loading", "is-active"])
|
|
408
397
|
]),
|
|
409
398
|
_: 1
|
|
410
399
|
}, 8, ["show-modal", "is-loading", "title", "sub-title", "confirm-button-text", "cancel-button-text"]);
|
|
@@ -711,7 +700,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
711
700
|
};
|
|
712
701
|
}
|
|
713
702
|
});
|
|
714
|
-
const SolvimonSubscriptionManagement = defineCustomElement(
|
|
703
|
+
const SolvimonSubscriptionManagement = defineCustomElement(
|
|
704
|
+
_sfc_main
|
|
705
|
+
);
|
|
715
706
|
const COMPONENT_NAME = getComponentName("subscription-management");
|
|
716
707
|
const defineSolvimonSubscriptionManagement = () => {
|
|
717
708
|
if (!customElements.get(COMPONENT_NAME)) {
|
package/dist/solvimon-web.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.to-right-enter-active[data-v-c0f85806],.to-right-leave-to[data-v-c0f85806]{opacity:0;transform:translate(-10px)}.to-right-leave[data-v-c0f85806],.to-right-enter-to[data-v-c0f85806]{opacity:1;transform:translate(0)}.to-right-enter-active[data-v-c0f85806],.to-right-leave-active[data-v-c0f85806]{transition:all .25s}.to-left-enter-active[data-v-c0f85806],.to-left-leave-to[data-v-c0f85806]{opacity:0;transform:translate(10px)}.to-left-leave[data-v-c0f85806],.to-left-enter-to[data-v-c0f85806]{opacity:1;transform:translate(0)}.to-left-enter-active[data-v-c0f85806],.to-left-leave-active[data-v-c0f85806]{transition:all .25s}.to-top-enter-active[data-v-c0f85806],.to-top-leave-to[data-v-c0f85806]{opacity:0;transform:translateY(10px)}.to-top-leave[data-v-c0f85806],.to-top-enter-to[data-v-c0f85806]{opacity:1;transform:translateY(0)}.to-top-enter-active[data-v-c0f85806],.to-top-leave-active[data-v-c0f85806]{transition:all .25s}.to-bottom-enter-active[data-v-c0f85806],.to-bottom-leave-to[data-v-c0f85806]{opacity:0;transform:translateY(-10px)}.to-bottom-leave[data-v-c0f85806],.to-bottom-enter-to[data-v-c0f85806]{opacity:1;transform:translateY(0)}.to-bottom-enter-active[data-v-c0f85806],.to-bottom-leave-active[data-v-c0f85806]{transition:all .25s}.expand{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s ease-in-out}.expand--open{grid-template-rows:1fr}.expand__inner{overflow:hidden;min-height:0}@media print{.expand{grid-template-rows:1fr}.expand__inner{overflow:visible}}@media print{.card-print-avoid[data-v-561cca98]{break-inside:avoid-page;page-break-inside:avoid}}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;background:transparent;margin:.5rem 0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:1rem;height:1rem;border:2px solid rgb(229 231 235);border-radius:50%;background:#fff;box-shadow:0 1px 3px #0000004d;cursor:pointer;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}input[type=range]:disabled::-webkit-slider-thumb{cursor:not-allowed}input[type=range]::-moz-range-thumb{-moz-appearance:none;-webkit-appearance:none;appearance:none;width:1rem;height:1rem;border:2px solid rgb(229 231 235);border-radius:50%;background:#fff;box-shadow:0 1px 3px #0000004d;cursor:pointer;-moz-transition:all .1s ease-in-out;transition:all .1s ease-in-out}input[type=range]:disabled::-moz-range-thumb{cursor:not-allowed}input[type=range]:not(:disabled):hover::-webkit-slider-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):hover::-moz-range-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):active::-webkit-slider-thumb{box-shadow:0 0 0 8px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):active::-moz-range-thumb{box-shadow:0 0 0 8px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]::-webkit-slider-runnable-track{width:100%;height:.5rem;cursor:pointer;background:linear-gradient(to right,var(--color-primary-600) var(--range-percentage, 0%),#e0e5eb var(--range-percentage, 0%));border-radius:.25rem}input[type=range]:disabled::-webkit-slider-runnable-track{background:#e0e5eb;cursor:not-allowed}input[type=range]::-moz-range-track{width:100%;height:.5rem;cursor:pointer;background:linear-gradient(to right,var(--color-primary-600) var(--range-percentage, 0%),#e0e5eb var(--range-percentage, 0%));border-radius:.25rem}input[type=range]:disabled::-moz-range-track{background:#e0e5eb;cursor:not-allowed}input[type=range].range-sm::-webkit-slider-thumb{width:.8rem;height:.8rem;margin-top:-.2rem}input[type=range].range-sm::-moz-range-thumb{width:.8rem;height:.8rem}input[type=range].range-sm::-webkit-slider-runnable-track{height:.4rem;border-radius:.2rem}input[type=range].range-sm::-moz-range-track{height:.4rem;border-radius:.2rem}input[type=range].range-md::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem}input[type=range].range-md::-moz-range-thumb{width:1rem;height:1rem}input[type=range].range-md::-webkit-slider-runnable-track{height:.5rem;border-radius:.25rem}input[type=range].range-md::-moz-range-track{height:.5rem;border-radius:.25rem}input[type=range].range-lg::-webkit-slider-thumb{width:1.4rem;height:1.4rem;margin-top:-.35rem}input[type=range].range-lg::-moz-range-thumb{width:1.4rem;height:1.4rem}input[type=range].range-lg::-webkit-slider-runnable-track{height:.7rem;border-radius:.35rem}input[type=range].range-lg::-moz-range-track{height:.7rem;border-radius:.35rem}input[type=range].range-xl::-webkit-slider-thumb{width:1.8rem;height:1.8rem;margin-top:-.5rem}input[type=range].range-xl::-moz-range-thumb{width:1.8rem;height:1.8rem}input[type=range].range-xl::-webkit-slider-runnable-track{height:.9rem;border-radius:.45rem}input[type=range].range-xl::-moz-range-track{height:.9rem;border-radius:.45rem}thead th:first-of-type,tr td:first-of-type{position:sticky;left:0;background:inherit;z-index:2}thead th:last-of-type,tr td:last-of-type{position:sticky;right:0;background:inherit;z-index:2}@media print{.card-header-print-root[data-v-fd2a04c5]{-moz-column-break-after:avoid;break-after:avoid-page;page-break-after:avoid}}@media print{.collapsible-card-print-root[data-v-1072aa4b],.collapsible-card-print-content[data-v-1072aa4b]{-moz-column-break-inside:auto;break-inside:auto;page-break-inside:auto}.collapsible-card-print-content[data-v-1072aa4b]{display:block!important}}.collapsible-list-item-content[data-v-333bc619]{content-visibility:auto}@media print{.collapsible-list-item-content[data-v-333bc619]{content-visibility:visible;display:block!important}}.tiptap h1,.editor-content-typography h1{margin-top:0;font-size:2.1428571em;font-weight:700;line-height:1.2}.tiptap h2,.editor-content-typography h2{margin-top:0;font-size:1.5em;font-weight:700;line-height:1.3333333}.tiptap h3,.editor-content-typography h3{margin-top:0;font-size:1.2857143em;font-weight:600;line-height:1.4444444}.tiptap h4,.editor-content-typography h4{margin-top:0;font-size:1.1em;font-weight:600;line-height:1.4444444}.tiptap p,.editor-content-typography p{margin-top:0;line-height:1.45;--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.tiptap ul,.tiptap ol,.editor-content-typography ul,.editor-content-typography ol{margin-top:0;padding-left:1.625em}.tiptap ul,.editor-content-typography ul{list-style-type:disc}.tiptap ol,.editor-content-typography ol{list-style-type:decimal}.tiptap li,.editor-content-typography li{margin-top:.2em;line-height:1.45;--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.tiptap blockquote,.editor-content-typography blockquote{margin-bottom:1rem;margin-top:0;border-left-width:3px;--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1));padding-left:.875rem;font-style:italic;line-height:1.45;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.tiptap blockquote p,.editor-content-typography blockquote p{margin-bottom:0;color:inherit}.tiptap pre,.editor-content-typography pre{margin-bottom:1rem;margin-top:0;white-space:pre-wrap;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1));padding:.5rem .75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;line-height:1.5;--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.tiptap pre code,.editor-content-typography pre code{background-color:transparent;padding:0;color:inherit}.tiptap code:not(pre code),.editor-content-typography code:not(pre code){border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1));padding:.125rem .25rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.tiptap a,.editor-content-typography a{color:var(--color-primary-600);text-decoration-line:none}.tiptap a:hover,.editor-content-typography a:hover{text-decoration-line:underline}.tiptap>*:last-child,.editor-content-typography *:last-child{margin-bottom:0}[data-v-19945196] .tiptap .is-empty:before{content:attr(data-placeholder);float:left;height:0;pointer-events:none;font-weight:400;font-style:italic;--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.modal-enter-active[data-v-345d512d]{transition:opacity .25s ease-out}.modal-leave-active[data-v-345d512d]{transition:opacity .2s ease-in}.modal-enter-from[data-v-345d512d],.modal-leave-to[data-v-345d512d]{opacity:0}.modal-enter-active .modal-panel[data-v-345d512d]{transition:transform .25s cubic-bezier(.16,1,.3,1)}.modal-leave-active .modal-panel[data-v-345d512d]{transition:transform .2s ease-in}.modal-enter-from .modal-panel[data-v-345d512d],.modal-leave-to .modal-panel[data-v-345d512d]{transform:translateY(1rem)}@media(prefers-reduced-motion:reduce){.modal-enter-active .modal-panel[data-v-345d512d],.modal-leave-active .modal-panel[data-v-345d512d]{transition:none}.modal-enter-from .modal-panel[data-v-345d512d],.modal-leave-to .modal-panel[data-v-345d512d]{transform:none}}.animated-gradient[data-v-f1f0dadf]{background:repeating-linear-gradient(to right,#fff0,#ffffffbf,#fff0);width:100%;background-size:200% auto;background-position:0 100%;animation:gradient-f1f0dadf 2s infinite;animation-fill-mode:forwards;animation-timing-function:linear}@keyframes gradient-f1f0dadf{0%{background-position:0 0}to{background-position:-200% 0}}@media print{.tiered-rule-header[data-v-2d2501dc]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}.tiered-table-print-wrapper[data-v-2d2501dc]{-moz-column-break-inside:auto;break-inside:auto;page-break-inside:auto}.tiered-table-print thead[data-v-2d2501dc]{display:table-header-group}.tiered-table-print-row[data-v-2d2501dc]{-moz-column-break-inside:avoid;break-inside:avoid;page-break-inside:avoid}}.conditions-with-context-menu[data-v-48a7a4db]{padding-right:3rem}@media print{.pricing-item-heading[data-v-24491e06]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}.pricing-item-block[data-v-24491e06]{-moz-column-break-inside:avoid;break-inside:avoid;page-break-inside:avoid}}@media print{.section-label[data-v-2ae5b045]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}}@media print{.category-heading[data-v-28988ce7]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}[data-v-28988ce7] .collapsible-card-print-root .card-header-print-root{border-bottom-width:0}}@media print{[data-v-8abb6425] .card-surface{box-shadow:none!important;border-color:#e5e7eb!important}}.slide-left-enter-active[data-v-1a3d5742],.slide-left-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-left-enter-from[data-v-1a3d5742],.slide-left-leave-to[data-v-1a3d5742]{opacity:0;transform:translate(30px)}.slide-right-enter-active[data-v-1a3d5742],.slide-right-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-right-enter-from[data-v-1a3d5742],.slide-right-leave-to[data-v-1a3d5742]{opacity:0;transform:translate(-30px)}.slide-top-enter-active[data-v-1a3d5742],.slide-top-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-top-enter-from[data-v-1a3d5742],.slide-top-leave-to[data-v-1a3d5742]{opacity:0;transform:translateY(30px)}.slide-bottom-enter-active[data-v-1a3d5742],.slide-bottom-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-bottom-enter-from[data-v-1a3d5742],.slide-bottom-leave-to[data-v-1a3d5742]{opacity:0;transform:translateY(-30px)}.fade-enter-active[data-v-1a3d5742],.fade-leave-active[data-v-1a3d5742]{transition:all .5s ease}.fade-enter-from[data-v-1a3d5742],.fade-leave-to[data-v-1a3d5742]{opacity:0}
|
|
1
|
+
.to-right-enter-active[data-v-c0f85806],.to-right-leave-to[data-v-c0f85806]{opacity:0;transform:translate(-10px)}.to-right-leave[data-v-c0f85806],.to-right-enter-to[data-v-c0f85806]{opacity:1;transform:translate(0)}.to-right-enter-active[data-v-c0f85806],.to-right-leave-active[data-v-c0f85806]{transition:all .25s}.to-left-enter-active[data-v-c0f85806],.to-left-leave-to[data-v-c0f85806]{opacity:0;transform:translate(10px)}.to-left-leave[data-v-c0f85806],.to-left-enter-to[data-v-c0f85806]{opacity:1;transform:translate(0)}.to-left-enter-active[data-v-c0f85806],.to-left-leave-active[data-v-c0f85806]{transition:all .25s}.to-top-enter-active[data-v-c0f85806],.to-top-leave-to[data-v-c0f85806]{opacity:0;transform:translateY(10px)}.to-top-leave[data-v-c0f85806],.to-top-enter-to[data-v-c0f85806]{opacity:1;transform:translateY(0)}.to-top-enter-active[data-v-c0f85806],.to-top-leave-active[data-v-c0f85806]{transition:all .25s}.to-bottom-enter-active[data-v-c0f85806],.to-bottom-leave-to[data-v-c0f85806]{opacity:0;transform:translateY(-10px)}.to-bottom-leave[data-v-c0f85806],.to-bottom-enter-to[data-v-c0f85806]{opacity:1;transform:translateY(0)}.to-bottom-enter-active[data-v-c0f85806],.to-bottom-leave-active[data-v-c0f85806]{transition:all .25s}.expand{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s ease-in-out}.expand--open{grid-template-rows:1fr}.expand__inner{overflow:hidden;min-height:0}@media print{.expand{grid-template-rows:1fr}.expand__inner{overflow:visible}}@media print{.card-print-avoid[data-v-561cca98]{break-inside:avoid-page;page-break-inside:avoid}}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;background:transparent;margin:.5rem 0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:1rem;height:1rem;border:2px solid rgb(229 231 235);border-radius:50%;background:#fff;box-shadow:0 1px 3px #0000004d;cursor:pointer;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}input[type=range]:disabled::-webkit-slider-thumb{cursor:not-allowed}input[type=range]::-moz-range-thumb{-moz-appearance:none;-webkit-appearance:none;appearance:none;width:1rem;height:1rem;border:2px solid rgb(229 231 235);border-radius:50%;background:#fff;box-shadow:0 1px 3px #0000004d;cursor:pointer;-moz-transition:all .1s ease-in-out;transition:all .1s ease-in-out}input[type=range]:disabled::-moz-range-thumb{cursor:not-allowed}input[type=range]:not(:disabled):hover::-webkit-slider-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):hover::-moz-range-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):active::-webkit-slider-thumb{box-shadow:0 0 0 8px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]:not(:disabled):active::-moz-range-thumb{box-shadow:0 0 0 8px color-mix(in srgb,var(--color-primary-200) 50%,transparent)}input[type=range]::-webkit-slider-runnable-track{width:100%;height:.5rem;cursor:pointer;background:linear-gradient(to right,var(--color-primary-600) var(--range-percentage, 0%),#e0e5eb var(--range-percentage, 0%));border-radius:.25rem}input[type=range]:disabled::-webkit-slider-runnable-track{background:#e0e5eb;cursor:not-allowed}input[type=range]::-moz-range-track{width:100%;height:.5rem;cursor:pointer;background:linear-gradient(to right,var(--color-primary-600) var(--range-percentage, 0%),#e0e5eb var(--range-percentage, 0%));border-radius:.25rem}input[type=range]:disabled::-moz-range-track{background:#e0e5eb;cursor:not-allowed}input[type=range].range-sm::-webkit-slider-thumb{width:.8rem;height:.8rem;margin-top:-.2rem}input[type=range].range-sm::-moz-range-thumb{width:.8rem;height:.8rem}input[type=range].range-sm::-webkit-slider-runnable-track{height:.4rem;border-radius:.2rem}input[type=range].range-sm::-moz-range-track{height:.4rem;border-radius:.2rem}input[type=range].range-md::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem}input[type=range].range-md::-moz-range-thumb{width:1rem;height:1rem}input[type=range].range-md::-webkit-slider-runnable-track{height:.5rem;border-radius:.25rem}input[type=range].range-md::-moz-range-track{height:.5rem;border-radius:.25rem}input[type=range].range-lg::-webkit-slider-thumb{width:1.4rem;height:1.4rem;margin-top:-.35rem}input[type=range].range-lg::-moz-range-thumb{width:1.4rem;height:1.4rem}input[type=range].range-lg::-webkit-slider-runnable-track{height:.7rem;border-radius:.35rem}input[type=range].range-lg::-moz-range-track{height:.7rem;border-radius:.35rem}input[type=range].range-xl::-webkit-slider-thumb{width:1.8rem;height:1.8rem;margin-top:-.5rem}input[type=range].range-xl::-moz-range-thumb{width:1.8rem;height:1.8rem}input[type=range].range-xl::-webkit-slider-runnable-track{height:.9rem;border-radius:.45rem}input[type=range].range-xl::-moz-range-track{height:.9rem;border-radius:.45rem}thead th:first-of-type,tr td:first-of-type{position:sticky;left:0;background:inherit;z-index:2}thead th:last-of-type,tr td:last-of-type{position:sticky;right:0;background:inherit;z-index:2}@media print{.card-header-print-root[data-v-fd2a04c5]{-moz-column-break-after:avoid;break-after:avoid-page;page-break-after:avoid}}@media print{.collapsible-card-print-root[data-v-af6dc6e1],.collapsible-card-print-content[data-v-af6dc6e1]{-moz-column-break-inside:auto;break-inside:auto;page-break-inside:auto}.collapsible-card-print-content[data-v-af6dc6e1]{display:block!important}}.collapsible-list-item-content[data-v-333bc619]{content-visibility:auto}@media print{.collapsible-list-item-content[data-v-333bc619]{content-visibility:visible;display:block!important}}.tiptap h1,.editor-content-typography h1{margin-top:0;font-size:2.1428571em;font-weight:700;line-height:1.2}.tiptap h2,.editor-content-typography h2{margin-top:0;font-size:1.5em;font-weight:700;line-height:1.3333333}.tiptap h3,.editor-content-typography h3{margin-top:0;font-size:1.2857143em;font-weight:600;line-height:1.4444444}.tiptap h4,.editor-content-typography h4{margin-top:0;font-size:1.1em;font-weight:600;line-height:1.4444444}.tiptap p,.editor-content-typography p{margin-top:0;line-height:1.45;--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.tiptap ul,.tiptap ol,.editor-content-typography ul,.editor-content-typography ol{margin-top:0;padding-left:1.625em}.tiptap ul,.editor-content-typography ul{list-style-type:disc}.tiptap ol,.editor-content-typography ol{list-style-type:decimal}.tiptap li,.editor-content-typography li{margin-top:.2em;line-height:1.45;--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.tiptap blockquote,.editor-content-typography blockquote{margin-bottom:1rem;margin-top:0;border-left-width:3px;--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1));padding-left:.875rem;font-style:italic;line-height:1.45;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.tiptap blockquote p,.editor-content-typography blockquote p{margin-bottom:0;color:inherit}.tiptap pre,.editor-content-typography pre{margin-bottom:1rem;margin-top:0;white-space:pre-wrap;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1));padding:.5rem .75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;line-height:1.5;--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.tiptap pre code,.editor-content-typography pre code{background-color:transparent;padding:0;color:inherit}.tiptap code:not(pre code),.editor-content-typography code:not(pre code){border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1));padding:.125rem .25rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.tiptap a,.editor-content-typography a{color:var(--color-primary-600);text-decoration-line:none}.tiptap a:hover,.editor-content-typography a:hover{text-decoration-line:underline}.tiptap>*:last-child,.editor-content-typography *:last-child{margin-bottom:0}[data-v-19945196] .tiptap .is-empty:before{content:attr(data-placeholder);float:left;height:0;pointer-events:none;font-weight:400;font-style:italic;--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.modal-enter-active[data-v-f0379c5c]{transition:opacity .25s ease-out}.modal-leave-active[data-v-f0379c5c]{transition:opacity .2s ease-in}.modal-enter-from[data-v-f0379c5c],.modal-leave-to[data-v-f0379c5c]{opacity:0}.modal-enter-active .modal-panel[data-v-f0379c5c]{transition:transform .25s cubic-bezier(.16,1,.3,1)}.modal-leave-active .modal-panel[data-v-f0379c5c]{transition:transform .2s ease-in}.modal-enter-from .modal-panel[data-v-f0379c5c],.modal-leave-to .modal-panel[data-v-f0379c5c]{transform:translateY(1rem)}@media(prefers-reduced-motion:reduce){.modal-enter-active .modal-panel[data-v-f0379c5c],.modal-leave-active .modal-panel[data-v-f0379c5c]{transition:none}.modal-enter-from .modal-panel[data-v-f0379c5c],.modal-leave-to .modal-panel[data-v-f0379c5c]{transform:none}}.animated-gradient[data-v-f1f0dadf]{background:repeating-linear-gradient(to right,#fff0,#ffffffbf,#fff0);width:100%;background-size:200% auto;background-position:0 100%;animation:gradient-f1f0dadf 2s infinite;animation-fill-mode:forwards;animation-timing-function:linear}@keyframes gradient-f1f0dadf{0%{background-position:0 0}to{background-position:-200% 0}}@media print{.tiered-rule-header[data-v-2d2501dc]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}.tiered-table-print-wrapper[data-v-2d2501dc]{-moz-column-break-inside:auto;break-inside:auto;page-break-inside:auto}.tiered-table-print thead[data-v-2d2501dc]{display:table-header-group}.tiered-table-print-row[data-v-2d2501dc]{-moz-column-break-inside:avoid;break-inside:avoid;page-break-inside:avoid}}.conditions-with-context-menu[data-v-48a7a4db]{padding-right:3rem}@media print{.pricing-item-heading[data-v-24491e06]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}.pricing-item-block[data-v-24491e06]{-moz-column-break-inside:avoid;break-inside:avoid;page-break-inside:avoid}}@media print{.section-label[data-v-2ae5b045]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}}@media print{.category-heading[data-v-28988ce7]{-moz-column-break-after:avoid;break-after:avoid;page-break-after:avoid}[data-v-28988ce7] .collapsible-card-print-root .card-header-print-root{border-bottom-width:0}}@media print{[data-v-8abb6425] .card-surface{box-shadow:none!important;border-color:#e5e7eb!important}}.slide-left-enter-active[data-v-1a3d5742],.slide-left-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-left-enter-from[data-v-1a3d5742],.slide-left-leave-to[data-v-1a3d5742]{opacity:0;transform:translate(30px)}.slide-right-enter-active[data-v-1a3d5742],.slide-right-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-right-enter-from[data-v-1a3d5742],.slide-right-leave-to[data-v-1a3d5742]{opacity:0;transform:translate(-30px)}.slide-top-enter-active[data-v-1a3d5742],.slide-top-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-top-enter-from[data-v-1a3d5742],.slide-top-leave-to[data-v-1a3d5742]{opacity:0;transform:translateY(30px)}.slide-bottom-enter-active[data-v-1a3d5742],.slide-bottom-leave-active[data-v-1a3d5742]{transition:all .5s ease}.slide-bottom-enter-from[data-v-1a3d5742],.slide-bottom-leave-to[data-v-1a3d5742]{opacity:0;transform:translateY(-30px)}.fade-enter-active[data-v-1a3d5742],.fade-leave-active[data-v-1a3d5742]{transition:all .5s ease}.fade-enter-from[data-v-1a3d5742],.fade-leave-to[data-v-1a3d5742]{opacity:0}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getFirstPricingPlanScheduleOfType } from "./pricingPlanSchedule-
|
|
1
|
+
import { g as getFirstPricingPlanScheduleOfType } from "./pricingPlanSchedule-CXG3CQ61.mjs";
|
|
2
2
|
function getMostRecentScheduleInfo(subscription) {
|
|
3
3
|
var _a;
|
|
4
4
|
return (_a = subscription == null ? void 0 : subscription.pricing_plan_schedule_infos) == null ? void 0 : _a.at(-1);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const i=require("./vendor-ui-Dfh3_g4q.js"),e=require("./component-DIy1hvJM.js"),n="/portal/pricing-plan-subscriptions",t={CANCEL:"NEXT_BILLING_PERIOD",RENEW:"UNDO"};exports.createSubscriptionsService=function(){const r=e.useConfig(),a=e.createRequestService();return{getSubscription:function({id:t,expanded:s=!1}){return a({url:`${r.apiUrls.config}${n}/${t}${i.serializeQueryParams(i.withExpand({expandParams:e.EXPAND_ALL,expand:s}))}`})},getActiveSubscriptions:function({customerId:t,pagination:s}){const o=s??{},c=i.withExpand({initialParams:{customer_id:t,statuses:["ACTIVE"],type:"BILLING"},expandParams:e.EXPAND_ALL}),u=i.serializeQueryParams(i.withPagination(c,o));return a({url:`${r.apiUrls.config}${n}${u}`,isCollection:!0})},setSubscriptionCancellation:function({id:i,variant:e}){return a({url:`${r.apiUrls.config}${n}/${i}/cancel`,data:{type:t[e]},options:{method:"POST"}})}}};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { w as withExpand, s as serializeQueryParams, d as withPagination } from "./vendor-ui-ItGf7wJV.mjs";
|
|
2
|
+
import { u as useConfig, c as createRequestService, E as EXPAND_ALL } from "./component--Y7Igv5i.mjs";
|
|
3
|
+
const ENDPOINT = "/portal/pricing-plan-subscriptions";
|
|
4
|
+
const SUBSCRIPTION_CANCELLATION_TYPES = {
|
|
5
|
+
CANCEL: "NEXT_BILLING_PERIOD",
|
|
6
|
+
RENEW: "UNDO"
|
|
7
|
+
};
|
|
8
|
+
function createSubscriptionsService() {
|
|
9
|
+
const config = useConfig();
|
|
10
|
+
const request = createRequestService();
|
|
11
|
+
function getSubscription({
|
|
12
|
+
id,
|
|
13
|
+
expanded = false
|
|
14
|
+
}) {
|
|
15
|
+
return request({
|
|
16
|
+
url: `${config.apiUrls.config}${ENDPOINT}/${id}${serializeQueryParams(
|
|
17
|
+
withExpand({ expandParams: EXPAND_ALL, expand: expanded })
|
|
18
|
+
)}`
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function getActiveSubscriptions({
|
|
22
|
+
customerId,
|
|
23
|
+
pagination
|
|
24
|
+
}) {
|
|
25
|
+
const paginationParams = pagination ?? {};
|
|
26
|
+
const queryWithExpand = withExpand({
|
|
27
|
+
initialParams: {
|
|
28
|
+
customer_id: customerId,
|
|
29
|
+
statuses: ["ACTIVE"],
|
|
30
|
+
type: "BILLING"
|
|
31
|
+
},
|
|
32
|
+
expandParams: EXPAND_ALL
|
|
33
|
+
});
|
|
34
|
+
const queryString = serializeQueryParams(withPagination(queryWithExpand, paginationParams));
|
|
35
|
+
return request({
|
|
36
|
+
url: `${config.apiUrls.config}${ENDPOINT}${queryString}`,
|
|
37
|
+
isCollection: true
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function setSubscriptionCancellation({
|
|
41
|
+
id,
|
|
42
|
+
variant
|
|
43
|
+
}) {
|
|
44
|
+
return request({
|
|
45
|
+
url: `${config.apiUrls.config}${ENDPOINT}/${id}/cancel`,
|
|
46
|
+
data: { type: SUBSCRIPTION_CANCELLATION_TYPES[variant] },
|
|
47
|
+
options: { method: "POST" }
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
getSubscription,
|
|
52
|
+
getActiveSubscriptions,
|
|
53
|
+
setSubscriptionCancellation
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
createSubscriptionsService as c
|
|
58
|
+
};
|
package/dist/{useActionDispatchProvider-zB_GKeUR.mjs → useActionDispatchProvider-BlEf-RZ5.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject } from "vue";
|
|
2
|
-
import { A as ACTION_DISPATCHER_PROVIDER_INJECTION_KEY } from "./component
|
|
2
|
+
import { A as ACTION_DISPATCHER_PROVIDER_INJECTION_KEY } from "./component--Y7Igv5i.mjs";
|
|
3
3
|
function useActionDispatchProvider() {
|
|
4
4
|
const dispatchAction = inject(ACTION_DISPATCHER_PROVIDER_INJECTION_KEY);
|
|
5
5
|
if (!dispatchAction) {
|
package/dist/{useActionDispatchProvider-bqR_FeM4.js → useActionDispatchProvider-aJOy3kr1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=require("vue"),i=require("./component-
|
|
1
|
+
const t=require("vue"),i=require("./component-DIy1hvJM.js");exports.useActionDispatchProvider=function(){const o=t.inject(i.ACTION_DISPATCHER_PROVIDER_INJECTION_KEY);if(!o)throw new Error("dispatchAction is not provided");return{dispatchAction:o}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),r=require("./customer-
|
|
1
|
+
const e=require("vue"),r=require("./customer-brfznoHY.js"),t=require("./useService-BiljI7XA.js");exports.useCustomer=function({customerId:u}){const{getCustomer:s,updateCustomer:c}=r.createCustomerService(),a=e.ref(),{data:o,...i}=t.useService({service:async()=>{const e=await s(u);return a.value=e,e}}),{data:n,...v}=t.useService({service:async e=>{const r=await c(u,e);return a.value=r,r}});return{customer:a,get:i,update:v}};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
|
-
import { c as createCustomerService } from "./customer-
|
|
3
|
-
import { u as useService } from "./useService-
|
|
2
|
+
import { c as createCustomerService } from "./customer-DovIxTG1.mjs";
|
|
3
|
+
import { u as useService } from "./useService-CqfJi5ST.mjs";
|
|
4
4
|
function useCustomer({ customerId }) {
|
|
5
5
|
const { getCustomer, updateCustomer } = createCustomerService();
|
|
6
6
|
const customer = ref();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as ApiStatus } from "./ApiStatus-CyNDp_op.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { g as getPaginatedFullList, h as isApiSuccessCollectionResponse } from "./vendor-ui-ItGf7wJV.mjs";
|
|
3
3
|
import { shallowRef, ref, computed } from "vue";
|
|
4
4
|
function toError(error) {
|
|
5
5
|
return error instanceof Error ? error : new Error("Something went wrong while fetching data.");
|
|
@@ -51,7 +51,7 @@ function useIncrementalLoading({
|
|
|
51
51
|
const fetchMore = async () => {
|
|
52
52
|
return await loadPage(page.value + 1);
|
|
53
53
|
};
|
|
54
|
-
const nonMutableItems = computed(() =>
|
|
54
|
+
const nonMutableItems = computed(() => [...items.value]);
|
|
55
55
|
const fetchInitial = async () => {
|
|
56
56
|
return await loadPage(1, { replace: true });
|
|
57
57
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./ApiStatus-oqvUEWJx.js"),a=require("./vendor-ui-Dfh3_g4q.js"),t=require("vue");exports.useIncrementalLoading=function({initialData:i=[],service:n}){const u=t.shallowRef(i),l=t.ref(e.ApiStatus.Initial),s=t.ref(null),r=t.ref(1),o=t.ref(!1),c=t.computed(()=>l.value===e.ApiStatus.Loading),v=async(t,{replace:i=!1}={})=>{var v;if(!c.value)try{s.value=null,l.value=e.ApiStatus.Loading;const c=await n(t);if(!a.isApiSuccessCollectionResponse(c))return void(l.value=e.ApiStatus.Done);o.value=!!(null==(v=c.links)?void 0:v.next),u.value=i?c.data:[...u.value,...c.data],l.value=e.ApiStatus.Done,r.value=t}catch(p){s.value=function(e){return e instanceof Error?e:new Error("Something went wrong while fetching data.")}(p),l.value=e.ApiStatus.Failed}};return{items:t.computed(()=>[...u.value]),error:s,fetchInitial:async()=>await v(1,{replace:!0}),fetchMore:async()=>await v(r.value+1),fetchAll:async()=>{s.value=null,l.value=e.ApiStatus.Loading;const t=await a.getPaginatedFullList(async t=>{const i=await n(t);if(!a.isApiSuccessCollectionResponse(i))throw l.value=e.ApiStatus.Failed,new Error("message"in i?i.message:"Request failed");return i});u.value=t.data,l.value=e.ApiStatus.Done},isPending:c,hasNextBatch:o}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./invoices-
|
|
1
|
+
const e=require("./invoices-Cf3dSYSj.js"),t=require("./payments-DVZFO5yb.js"),n=require("vue"),a=require("./useWatchDebounced-C_YxgoQ6.js");exports.useInvoiceData=function(c){const{getInvoice:r}=e.createInvoicesService(),{getPayments:s}=t.createPaymentsService();return(({getData:e,onError:t,watchValue:c,debounce:r=200})=>{const s=n.ref(),u=n.ref(!0),i=async()=>{try{s.value=await e(c)}catch(n){null==t||t(n)}finally{u.value=!1}};return c&&a.useWatchDebounced(c,()=>{i()},{debounce:r}),n.onMounted(async()=>{i()}),{data:s,isPending:u}})({getData:async()=>{const[e,t]=await Promise.all([r(c),s(c)]);return{invoice:e,paymentAttempts:t}}})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createInvoicesService } from "./invoices-
|
|
2
|
-
import { c as createPaymentsService } from "./payments-
|
|
1
|
+
import { c as createInvoicesService } from "./invoices-Dk-z04lg.mjs";
|
|
2
|
+
import { c as createPaymentsService } from "./payments-TnRjtlOw.mjs";
|
|
3
3
|
import { ref, onMounted } from "vue";
|
|
4
4
|
import { u as useWatchDebounced } from "./useWatchDebounced-Zmxd6InB.mjs";
|
|
5
5
|
const useData = ({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, Fragment, renderList, createBlock, createSlots, createElementVNode, withModifiers, createCommentVNode } from "vue";
|
|
2
|
-
import { u as useIntl,
|
|
3
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
4
|
-
import { u as useIncrementalLoading } from "./useIncrementalLoading-
|
|
5
|
-
import { c as createInvoicesService } from "./invoices-
|
|
2
|
+
import { u as useIntl, v as _sfc_main$2, T as TableHead, x as TableHeadRow, y as _sfc_main$3, z as TableBody, A as _sfc_main$4, B as _sfc_main$5, a as _sfc_main$6, C as _sfc_main$7, l as _sfc_main$8, k as _sfc_main$9, b as _sfc_main$a } from "./vendor-ui-ItGf7wJV.mjs";
|
|
3
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-BlEf-RZ5.mjs";
|
|
4
|
+
import { u as useIncrementalLoading } from "./useIncrementalLoading-8WtKZ-mP.mjs";
|
|
5
|
+
import { c as createInvoicesService } from "./invoices-Dk-z04lg.mjs";
|
|
6
6
|
const _hoisted_1 = { class: "sv-table sv-invoices-list__table grid-cols-1 gap-4" };
|
|
7
7
|
const _hoisted_2 = ["onClick"];
|
|
8
8
|
const _hoisted_3 = { class: "flex flex-col" };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./vendor-ui-
|
|
1
|
+
const e=require("vue"),t=require("./vendor-ui-Dfh3_g4q.js"),i=require("./useActionDispatchProvider-aJOy3kr1.js"),o=require("./useIncrementalLoading-CkY2klIW.js"),a=require("./invoices-Cf3dSYSj.js"),n={class:"sv-table sv-invoices-list__table grid-cols-1 gap-4"},s=["onClick"],c={class:"flex flex-col"},l={class:"sv-invoices-list__load-more mt-2 flex items-center justify-center"},r=e.defineComponent({__name:"InvoiceTable",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{type:Object}},emits:["view-invoice","pay-invoice","load-more"],setup(i){const o=i,{formatDate:a,$t:r}=t.useIntl(),d=e.computed(()=>o.configuration.showPayButton),u=e.computed(()=>o.configuration.showViewButton),_=e.computed(()=>o.hasMoreItems);return(o,v)=>(e.openBlock(),e.createElementBlock("div",n,[e.createVNode(e.unref(t._sfc_main$11),{striped:"","no-border":"",rounded:"",hoverable:"","stripe-class":"group-odd:bg-gray-50/50"},{default:e.withCtx(()=>[e.createVNode(e.unref(t.TableHead),null,{default:e.withCtx(()=>[e.createVNode(e.unref(t.TableHeadRow),{class:"sv-table__head"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$12),{class:"sv-table__cell sv-invoices-list__cell--invoice"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Invoice",description:"The title of the invoice number header column of the invoice table",id:"invoice_table.header.invoice_number"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$12),{class:"sv-table__cell sv-invoices-list__cell--date hidden md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Date",description:"The title of the invoice date header column of the invoice table",id:"invoice_table.header.date"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$12),{class:"sv-table__cell sv-invoices-list__cell--amount"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Amount",description:"The title of the invoice amount header column of the invoice table",id:"invoice_table.header.amount"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$12),{class:"sv-table__cell sv-invoices-list__cell--status text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Status",description:"The title of the invoice status header column of the invoice table",id:"invoice_table.header.status"})),1)]),_:1})]),_:1})]),_:1}),e.createVNode(e.unref(t.TableBody),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.invoices,i=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$13),{key:i.id,class:"sv-table__row sv-invoices-list__row"},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$14),{"has-padding":"",class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--invoice h-14"},{default:e.withCtx(()=>[e.createElementVNode("div",c,[e.createVNode(e.unref(t._sfc_main$1),{tag:"span",variant:"body-sm",class:"md:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:i.invoice_date,format:"date",offsetType:"offsetted",timezone:i.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$1),{tag:"span",variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.invoice_number),1)]),_:2},1024)])]),_:2},1024),e.createVNode(e.unref(t._sfc_main$14),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--date hidden h-14 md:table-cell"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:i.invoice_date,format:"date",offsetType:"offsetted",timezone:i.customer.timezone})),1)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$14),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--amount h-14"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$1),{tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$15),{value:i.invoice_amount_including_tax},null,8,["value"])]),_:2},1024)]),_:2},1024),e.createVNode(e.unref(t._sfc_main$14),{class:"sv-table__cell sv-invoices-list__cell sv-invoices-list__cell--status h-14 text-right"},{default:e.withCtx(()=>[i.paid?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$7),{key:0,color:"green"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Paid",description:"The label of the chip for paid invoices",id:"invoice_table.chip.paid"})),1)]),_:1})):d.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:1,variant:"outline",color:"gray",size:"sm",class:"sv-action sv-action--secondary sv-invoices-list__pay",type:"button",onClick:e.withModifiers(e=>o.$emit("pay-invoice",{invoiceId:i.id}),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Pay",description:"The label for the pay invoice button",id:"customer.invoice_table.pay_invoice_button.label"})),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},[u.value?{name:"link",fn:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"sv-invoices-list__row-action absolute inset-0 h-full w-full",onClick:e=>o.$emit("view-invoice",{invoiceId:i.id})},null,8,s)]),key:"0"}:void 0]),1024))),128))]),_:1})]),_:1}),e.createElementVNode("div",l,[_.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$6),{key:0,variant:"outline",color:"gray",size:"sm",class:"sv-action sv-action--secondary sv-action--full-width w-full",loading:i.isLoading,onClick:v[0]||(v[0]=e=>o.$emit("load-more"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Load more",description:"The label for the load more button",id:"invoice_table.button.load_more"})),1)]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]))}}),d=e.defineComponent({__name:"InvoicesList",props:{invoices:{type:Array},isLoading:{type:Boolean},hasMoreItems:{type:Boolean},configuration:{default:()=>({showPayButton:!0,showViewButton:!0,pagination:{batchSize:15,enabled:!0}}),type:Object}},emits:["load-more"],setup(o){const{$t:a}=t.useIntl(),{dispatchAction:n}=i.useActionDispatchProvider();return(i,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{class:"sv-invoices-list sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:e.unref(a)({defaultMessage:"Invoices",description:"Invoices list title",id:"invoices_list.title"})},{default:e.withCtx(()=>[e.createVNode(r,{class:"sv-invoices-list__table",configuration:o.configuration,"has-more-items":o.hasMoreItems,invoices:o.invoices,"is-loading":o.isLoading,onLoadMore:s[0]||(s[0]=e=>i.$emit("load-more")),onViewInvoice:s[1]||(s[1]=t=>e.unref(n)({action:"view-invoice",data:{invoiceId:t.invoiceId}})),onPayInvoice:s[2]||(s[2]=t=>e.unref(n)({action:"pay-invoice",data:{invoiceId:t.invoiceId}}))},null,8,["configuration","has-more-items","invoices","is-loading"])]),_:1},8,["title"]))}});exports._sfc_main=d,exports.useInvoicesList=function({customerId:e,batchSize:t=15}){const i=a.createInvoicesService();return o.useIncrementalLoading({service:async o=>i.getInvoices({customerId:e,pagination:{page:o,pageSize:t}})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),a=require("./component-
|
|
1
|
+
const e=require("vue"),a=require("./component-DIy1hvJM.js");exports.useLoadInitialData=function(...o){const t=e.ref(!0),n=a.useLogger();return e.onMounted(async()=>{await Promise.all(o).then(()=>{t.value=!1}).catch(e=>{t.value=!1,n.error("INITIAL_DATA_LOAD_FAILED","Failed to load initial data",{},e)})}),{isLoading:t}};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as useService } from "./useService-
|
|
2
|
-
import { c as createPaymentMethodsService } from "./paymentMethods-
|
|
1
|
+
import { u as useService } from "./useService-CqfJi5ST.mjs";
|
|
2
|
+
import { c as createPaymentMethodsService } from "./paymentMethods-BnF1XYS1.mjs";
|
|
3
3
|
function hasCustomerId(payload) {
|
|
4
4
|
return payload.customerId !== void 0;
|
|
5
5
|
}
|
|
@@ -15,7 +15,13 @@ function usePaymentMethodOptions() {
|
|
|
15
15
|
country: payload.country
|
|
16
16
|
});
|
|
17
17
|
const initialValue = [];
|
|
18
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
data,
|
|
20
|
+
execute: get,
|
|
21
|
+
apiStatus,
|
|
22
|
+
error,
|
|
23
|
+
isPending
|
|
24
|
+
} = useService({
|
|
19
25
|
initialValue,
|
|
20
26
|
service
|
|
21
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useService-
|
|
1
|
+
const e=require("./useService-BiljI7XA.js"),t=require("./paymentMethods-DVDC_WfL.js");exports.usePaymentMethodOptions=function(){const{getPaymentMethodOptions:n}=t.createPaymentMethodsService(),{data:o,execute:r,apiStatus:u,error:i,isPending:s}=e.useService({initialValue:[],service:e=>function(e){return void 0!==e.customerId}(e)?n({customerId:e.customerId,amount:e.amount,country:e.country}):n({subscriptionId:e.subscriptionId,amount:e.amount,country:e.country})});return{paymentMethodOptions:o,get:r,apiStatus:u,error:i,isPending:s}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useIncrementalLoading-
|
|
1
|
+
const e=require("./useIncrementalLoading-CkY2klIW.js"),t=require("./paymentMethods-DVDC_WfL.js");exports.usePaymentMethods=function({customerId:n,pageSize:s=15}){const{getPaymentMethods:a}=t.createPaymentMethodsService();return e.useIncrementalLoading({service:async e=>a({customerId:n,pagination:{page:e,pageSize:s}})})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as useIncrementalLoading } from "./useIncrementalLoading-
|
|
2
|
-
import { c as createPaymentMethodsService } from "./paymentMethods-
|
|
1
|
+
import { u as useIncrementalLoading } from "./useIncrementalLoading-8WtKZ-mP.mjs";
|
|
2
|
+
import { c as createPaymentMethodsService } from "./paymentMethods-BnF1XYS1.mjs";
|
|
3
3
|
function usePaymentMethods({
|
|
4
4
|
customerId,
|
|
5
5
|
pageSize = 15
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./invoices-
|
|
1
|
+
const e=require("./invoices-Cf3dSYSj.js"),i=require("./useService-BiljI7XA.js"),t=require("./payments-DVZFO5yb.js");exports.useInvoice=function({invoiceId:t}){const{getInvoice:r,getInvoicePdf:n}=e.createInvoicesService(),{data:s,execute:c,apiStatus:o,error:a,isPending:u}=i.useService({service:()=>r(t)});return{invoice:s,downloadInvoicePdf:n,apiStatus:o,error:a,get:c,isPending:u}},exports.usePayments=function(){const{getPayments:e}=t.createPaymentsService(),{data:r,execute:n,error:s,apiStatus:c,isPending:o}=i.useService({service:e,isCollection:!0});return{payments:r,get:n,error:s,apiStatus:c,isPending:o}};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createInvoicesService } from "./invoices-
|
|
2
|
-
import { u as useService } from "./useService-
|
|
3
|
-
import { c as createPaymentsService } from "./payments-
|
|
1
|
+
import { c as createInvoicesService } from "./invoices-Dk-z04lg.mjs";
|
|
2
|
+
import { u as useService } from "./useService-CqfJi5ST.mjs";
|
|
3
|
+
import { c as createPaymentsService } from "./payments-TnRjtlOw.mjs";
|
|
4
4
|
function useInvoice({ invoiceId }) {
|
|
5
5
|
const { getInvoice, getInvoicePdf: downloadInvoicePdf } = createInvoicesService();
|
|
6
6
|
const service = () => getInvoice(invoiceId);
|
|
@@ -24,7 +24,13 @@ function useInvoice({ invoiceId }) {
|
|
|
24
24
|
}
|
|
25
25
|
function usePayments() {
|
|
26
26
|
const { getPayments } = createPaymentsService();
|
|
27
|
-
const {
|
|
27
|
+
const {
|
|
28
|
+
data,
|
|
29
|
+
execute: get,
|
|
30
|
+
error,
|
|
31
|
+
apiStatus,
|
|
32
|
+
isPending
|
|
33
|
+
} = useService({
|
|
28
34
|
service: getPayments,
|
|
29
35
|
isCollection: true
|
|
30
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const r=require("vue"),e=require("./component-
|
|
1
|
+
const r=require("vue"),e=require("./component-DIy1hvJM.js");exports.usePortal=function(){const o=r.inject(e.PORTAL_INJECTION_KEY);if(!o)throw new Error("PortalProvider is not provided");return o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./ApiStatus-oqvUEWJx.js"),t=require("vue"),r=require("./vendor-ui-
|
|
1
|
+
const e=require("./ApiStatus-oqvUEWJx.js"),t=require("vue"),r=require("./vendor-ui-Dfh3_g4q.js");function n(e,t){return t?function(e){if(!function(e){return"object"==typeof e&&null!==e&&"data"in e}(e))throw new Error("Expected collection response.");return e.data}(e):e}exports.useService=function({initialValue:i,service:u,isCollection:a=!1}){const o=t.shallowRef(i),l=t.ref(e.ApiStatus.Initial),s=t.ref(null),c=t.computed(()=>l.value===e.ApiStatus.Loading);return{data:o,execute:async(...t)=>{try{l.value=e.ApiStatus.Loading,s.value=null;const v=n(await u(...t),a);return i=o,c=v,r.isEqual(i.value,c)||(i.value=c),l.value=e.ApiStatus.Done,v}catch(v){return s.value=function(e){return e instanceof Error?e:new Error("Something went wrong while fetching data.")}(v),l.value=e.ApiStatus.Failed,Promise.reject()}var i,c},apiStatus:l,isPending:c,error:s}};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as ApiStatus } from "./ApiStatus-CyNDp_op.mjs";
|
|
2
2
|
import { shallowRef, ref, computed } from "vue";
|
|
3
|
-
import {
|
|
3
|
+
import { q as isEqual } from "./vendor-ui-ItGf7wJV.mjs";
|
|
4
4
|
function updateRefIfChanged(ref2, value) {
|
|
5
5
|
if (isEqual(ref2.value, value)) {
|
|
6
6
|
return;
|