@solvimon/solvimon-web 0.1.0-alpha.6 → 0.1.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Alert.vue.es-DMPvSykx.js +1 -0
- package/dist/Alert.vue.es-DsJ1ckRU.mjs +172 -0
- package/dist/Amount.vue.es-C6JE5rL8.mjs +23 -0
- package/dist/Amount.vue.es-h8wulbBG.js +1 -0
- package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +93 -0
- package/dist/Avatar.vue.es-BbyE0AjW.js +1 -0
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DZ1XkSJ3.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs} +6 -4
- package/dist/Button.vue.es-6sBk5tBL.mjs +408 -0
- package/dist/Button.vue.es-BC4_TItq.js +1 -0
- package/dist/CardContent.vue.es-ChEMrFCc.mjs +115 -0
- package/dist/CardContent.vue.es-i9ivuGKG.js +1 -0
- package/dist/Chip.vue.es-D0fkSe8a.js +1 -0
- package/dist/Chip.vue.es-DcW2CjUA.mjs +1576 -0
- package/dist/Comparators.vue.es-BdxDqU8o.js +1 -0
- package/dist/Comparators.vue.es-DdTKGB80.mjs +406 -0
- package/dist/{ContentWithAsideLayout-D_T137tN.mjs → ContentWithAsideLayout-Ct24RV-2.mjs} +1 -1
- package/dist/{ContentWithAsideLayout-BZJPhvLh.js → ContentWithAsideLayout-UHovpjZu.js} +1 -1
- package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +1 -0
- package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +175 -0
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +1 -0
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DK6tiecN.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs} +14 -11
- package/dist/Divider.vue.es-ClFG8QtG.js +1 -0
- package/dist/Divider.vue.es-wKkIVBgb.mjs +24 -0
- package/dist/DividerText.vue.es-B7oa5Xpn.mjs +72 -0
- package/dist/DividerText.vue.es-yiFdPQvo.js +1 -0
- package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +30 -0
- package/dist/ErrorNotification.vue.es-FpRyg0De.js +1 -0
- package/dist/FormMessage.vue.es-DFQXxiSC.mjs +46 -0
- package/dist/FormMessage.vue.es-LeWoj774.js +1 -0
- package/dist/IconButton.vue.es-DNCwwH_j.mjs +825 -0
- package/dist/IconButton.vue.es-DiSiGPWO.js +1 -0
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +1 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BWXmZmGZ.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs} +3 -2
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +1 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BSn_Zy0Y.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs} +9 -5
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs +1067 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +1 -0
- package/dist/PaymentMethod.vue.es-DYlnmZh7.js +1 -0
- package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +1255 -0
- package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-X7-dfeZP.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs} +6 -5
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +1 -0
- package/dist/Section.vue.es-3-H1pUTB.mjs +79 -0
- package/dist/Section.vue.es-BuzTXRLP.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-AxYjVFUM.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs} +23 -20
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +1 -0
- package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +136 -0
- package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +1 -0
- package/dist/TrialChip.vue.es-BHYbW8b6.mjs +759 -0
- package/dist/TrialChip.vue.es-C6Xg_5rR.js +1 -0
- package/dist/_flatRest.es-BHFPCqZh.mjs +642 -0
- package/dist/_flatRest.es-dFffnTpX.js +1 -0
- package/dist/adyen-51SvcyqV.mjs +4 -0
- package/dist/adyen-DZsyEXkw.js +1 -0
- package/dist/api.es-B4qAAJKr.js +1 -0
- package/dist/api.es-UkfpLiLL.mjs +83 -0
- package/dist/{cloneDeep-DranHQkY.js → cloneDeep-Hs8Pp07F.js} +1 -1
- package/dist/cn.es-C7xoIs3C.js +1 -0
- package/dist/cn.es-tfxVlz02.mjs +3191 -0
- package/dist/component-ZRZIt3ZW.js +1 -0
- package/dist/component-dpA83LIN.mjs +6569 -0
- package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -1
- package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
- package/dist/components/BillingInformation/BillingInformation.es.js +14 -10
- package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.es.js +27 -23
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +3 -3
- package/dist/components/Invoice/Invoice.ce.d.ts +1 -1
- package/dist/components/Invoice/Invoice.cjs.js +1 -1
- package/dist/components/Invoice/Invoice.es.js +2612 -28
- package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.es.js +3 -3
- package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -1
- package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
- package/dist/components/InvoicesList/InvoicesList.es.js +2 -2
- package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.es.js +3 -3
- package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +10 -8
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +4820 -7
- package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +4 -4
- package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -1
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
- package/dist/components/WalletBalances/WalletBalances.es.js +2 -2
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/countryData.es--zJAd6LA.mjs +252 -0
- package/dist/countryData.es-D3MFzU92.js +1 -0
- package/dist/customer-CJrpbGX4.mjs +32 -0
- package/dist/customer-CcQR-JIm.js +1 -0
- package/dist/customer.es-D42Md24r.js +1 -0
- package/dist/customer.es-LIW2YmLL.mjs +30 -0
- package/dist/formatting.es-9hM8aHSg.js +1 -0
- package/dist/formatting.es-D5H_ySFv.mjs +68 -0
- package/dist/getCountryNameByCode.es-fP52nO_7.js +1 -0
- package/dist/getCountryNameByCode.es-ymC9R46j.mjs +8 -0
- package/dist/index-CI71bVGE.mjs +2521 -0
- package/dist/index-WLSPwi90.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es-BBJF2O2l.js +1 -0
- package/dist/index.es-LCAKs4tH.mjs +438 -0
- package/dist/index.es.js +1 -1
- package/dist/invoices-3kVHsAXr.js +1 -0
- package/dist/{invoices-C7BHqB0g.mjs → invoices-CNK1Ushv.mjs} +15 -1
- package/dist/isEmpty.es-Bp1SbWFu.mjs +131 -0
- package/dist/isEmpty.es-Dycf-CD_.js +1 -0
- package/dist/{paymentMethods-BA7Kt8ti.mjs → paymentMethods-C-ApE-G4.mjs} +2 -1
- package/dist/paymentMethods-DZRf0WRl.js +1 -0
- package/dist/{payments-NTHUh5je.mjs → payments-CE9U7aKK.mjs} +1 -1
- package/dist/{payments-B8W0W6wZ.js → payments-CLt0SExf.js} +1 -1
- package/dist/pick.es-BgDAfhAl.js +1 -0
- package/dist/pick.es-DdVOyp0Q.mjs +45 -0
- package/dist/{registry-DgRnFEVF.mjs → registry-B99ZnfEn.mjs} +1 -2
- package/dist/registry-ClZ43bQn.js +1 -0
- package/dist/screens/Checkout/Checkout.ce.d.ts +1 -1
- package/dist/screens/Checkout/Checkout.cjs.js +1 -1
- package/dist/screens/Checkout/Checkout.es.js +1862 -162
- package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +11 -11
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +46 -40
- package/dist/solvimon-web.css +1 -1
- package/dist/subscriptions-CS8HTxzC.js +1 -0
- package/dist/{subscriptions-BEoXaAHw.mjs → subscriptions-CoeCrY1I.mjs} +2 -1
- package/dist/typeGuards.es-C4nR5FkL.js +1 -0
- package/dist/typeGuards.es-fwUoeMCe.mjs +12 -0
- package/dist/{useActionDispatchProvider-DmTJ_bqE.js → useActionDispatchProvider-CWVV_xsi.js} +1 -1
- package/dist/{useActionDispatchProvider-zSXRlc2S.mjs → useActionDispatchProvider-eO2qFPGv.mjs} +1 -1
- package/dist/useCustomer--jycAz--.mjs +25 -0
- package/dist/useCustomer-PthyTFLl.js +1 -0
- package/dist/useIncrementalLoading-CAdNW-Bf.js +1 -0
- package/dist/{useIncrementalLoading-Bgs0mqyb.mjs → useIncrementalLoading-CcnL3flF.mjs} +5 -1
- package/dist/{useInvoiceData-B6P2VShe.mjs → useInvoiceData-BiMMoVoW.mjs} +2 -2
- package/dist/{useInvoiceData-CS7hLTea.js → useInvoiceData-DvQO_nKz.js} +1 -1
- package/dist/useInvoicesList-CHkwSNO9.js +1 -0
- package/dist/{useInvoicesList-23Ra-23Z.mjs → useInvoicesList-DFhF_gp7.mjs} +260 -23
- package/dist/{usePaymentMethods-BK4unvj2.js → usePaymentMethods-BRQ7-dUr.js} +1 -1
- package/dist/{usePaymentMethods-B8Nft16c.mjs → usePaymentMethods-BX2RnHZN.mjs} +2 -2
- package/dist/{useService-D-CUtlp3.js → useService-B67YWAcN.js} +1 -1
- package/dist/{useService-B4qv5N2D.mjs → useService-DG_zedHV.mjs} +1 -0
- package/dist/useWalletBalanceItems-B5FMmoU2.mjs +308 -0
- package/dist/useWalletBalanceItems-BY3gq0fc.js +1 -0
- package/package.json +14 -8
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-eRGZRjmq.js +0 -1
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BvmKLc2H.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DNWspHtC.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Cx4c8E4i.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Ct26TY0a.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-WRXecMCj.mjs +0 -6568
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-KnhKv07X.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D9_G7CyE.js +0 -1
- package/dist/component-DI3AxwdD.mjs +0 -58733
- package/dist/component-yWF07boR.js +0 -1
- package/dist/index-CzL1ZcGi.mjs +0 -85
- package/dist/index-DRdBmZ2-.js +0 -1
- package/dist/invoices-CjBHfDXp.js +0 -1
- package/dist/paymentMethods-A-5SBmy1.js +0 -1
- package/dist/registry-SwmYGFn7.js +0 -1
- package/dist/subscriptions-DSi93KpN.js +0 -1
- package/dist/useCustomer-DkrBNt5f.mjs +0 -45
- package/dist/useCustomer-fK-w7ifj.js +0 -1
- package/dist/useIncrementalLoading-BK6N8sYW.js +0 -1
- package/dist/useInvoicesList-CIFGVsDj.js +0 -1
- package/dist/useWalletBalanceItems-DreHuOra.mjs +0 -105
- package/dist/useWalletBalanceItems-NlFk6jPD.js +0 -1
- /package/dist/{sprite-DZD704h3-CCc3Mz1x.js → sprite.svg.es-CCc3Mz1x.js} +0 -0
- /package/dist/{sprite-DZD704h3-DZD704h3.mjs → sprite.svg.es-DZD704h3.mjs} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SolvimonCustomerOverview: import('
|
|
1
|
+
export declare const SolvimonCustomerOverview: import('../../../../node_modules/vue/dist/vue.d.ts').VueElementConstructor<unknown>;
|
|
2
2
|
export declare const COMPONENT_NAME: string;
|
|
3
3
|
export declare const defineSolvimonCustomerOverview: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../_Uint8Array-DxISR7XF.js"),o=require("../../ContentWithAsideLayout-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../_Uint8Array-DxISR7XF.js"),o=require("../../ContentWithAsideLayout-UHovpjZu.js"),r=require("../../useInvoicesList-CHkwSNO9.js"),n=require("../../SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js"),s=require("../../useCustomer-PthyTFLl.js"),a=require("../../usePaymentMethods-BRQ7-dUr.js"),i=require("../../BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js"),u=require("../../useLoadInitialData-BRg7IWqW.js"),l=require("../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js"),c=require("../../paymentMethods-DZRf0WRl.js"),m=require("../../useService-B67YWAcN.js"),p=require("../../useWalletBalanceItems-BY3gq0fc.js"),d=require("../../component-ZRZIt3ZW.js");const v=e.defineComponent({__name:"CustomerOverview",props:{configuration:{type:Object}},setup(d){var v;const y=null==(v=o.usePortal().value)?void 0:v.customer_id,f=s.useCustomer({customerId:y}),g=r.useInvoicesList({customerId:y,batchSize:5}),_=n.useSubscriptionsList({customerId:y,batchSize:2}),h=a.usePaymentMethods({customerId:y}),C=function({customerId:e,amount:t}){const{getPaymentMethodOptions:o}=c.createPaymentMethodsService(),{data:r,execute:n,error:s,apiStatus:a,isPending:i}=m.useService({initialValue:[],service:async()=>(await o({customerId:e,amount:t})).flatMap(e=>e.options??[])});return{error:s,apiStatus:a,items:r,fetch:n,isPending:i}}({customerId:y}),S=p.useCustomerWalletBalances({customerId:y}),j=p.useWalletBalanceItems(S.walletBalances),{isLoading:b}=u.useLoadInitialData(f.get.execute(),g.fetchInitial(),_.fetchInitial(),h.fetchAll(),C.fetch(),S.fetch());return(s,a)=>(e.openBlock(),e.createBlock(e.unref(o.ContentWithAsideLayout),null,{header:e.withCtx(()=>[e.unref(f).customer.value?(e.openBlock(),e.createBlock(n._sfc_main,{key:0,customer:e.unref(f).customer.value,subscriptions:e.unref(_).items.value,"payment-methods":e.unref(h).items.value,"is-loading":e.unref(b),onLoadMore:e.unref(_).fetchMore},null,8,["customer","subscriptions","payment-methods","is-loading","onLoadMore"])):e.createCommentVNode("",!0)]),content:e.withCtx(()=>[e.createVNode(r._sfc_main,{invoices:e.unref(g).items.value,"has-more-items":e.unref(g).hasNextBatch.value,"is-loading":e.unref(b),onLoadMore:e.unref(g).fetchMore},null,8,["invoices","has-more-items","is-loading","onLoadMore"])]),aside:e.withCtx(()=>[e.createVNode(p._sfc_main,{"has-error":e.unref(S).apiStatus.value===e.unref(t.ApiStatus).Failed,"is-loading":e.unref(b),"wallet-balances":e.unref(j)},null,8,["has-error","is-loading","wallet-balances"]),e.createVNode(l._sfc_main,{"is-loading":e.unref(b),"payment-methods":e.unref(h).items.value},null,8,["is-loading","payment-methods"]),e.unref(f).customer.value?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,"is-loading":e.unref(b),customer:e.unref(f).customer.value},null,8,["is-loading","customer"])):e.createCommentVNode("",!0)]),_:1}))}}),y=e.defineComponent({__name:"CustomerOverview.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:t=>(o,r)=>{var n,s,a,i;return e.openBlock(),e.createBlock(d._sfc_main$1,{"custom-element-name":e.unref(g),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(s=null==(n=t.branding)?void 0:n.colors)?void 0:s.primary,"secondary-color":null==(i=null==(a=t.branding)?void 0:a.colors)?void 0:i.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:r[0]||(r[0]=e=>o.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(v)]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),f=d.defineCustomElement(y),g=d.getComponentName("customer-overview");exports.COMPONENT_NAME=g,exports.SolvimonCustomerOverview=f,exports.defineSolvimonCustomerOverview=()=>{customElements.get(g)||customElements.define(g,f)};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, createCommentVNode } from "vue";
|
|
2
2
|
import { A as ApiStatus } from "../../_Uint8Array-DHE03FZr.mjs";
|
|
3
|
-
import { u as usePortal, C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-
|
|
4
|
-
import { u as useInvoicesList, _ as _sfc_main$5 } from "../../useInvoicesList-
|
|
5
|
-
import { u as useSubscriptionsList, _ as _sfc_main$6 } from "../../SubscriptionsList.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { u as useCustomer } from "../../useCustomer
|
|
7
|
-
import { u as usePaymentMethods } from "../../usePaymentMethods-
|
|
8
|
-
import { _ as _sfc_main$4 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { u as usePortal, C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-Ct24RV-2.mjs";
|
|
4
|
+
import { u as useInvoicesList, _ as _sfc_main$5 } from "../../useInvoicesList-DFhF_gp7.mjs";
|
|
5
|
+
import { u as useSubscriptionsList, _ as _sfc_main$6 } from "../../SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs";
|
|
6
|
+
import { u as useCustomer } from "../../useCustomer--jycAz--.mjs";
|
|
7
|
+
import { u as usePaymentMethods } from "../../usePaymentMethods-BX2RnHZN.mjs";
|
|
8
|
+
import { _ as _sfc_main$4 } from "../../BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs";
|
|
9
9
|
import { u as useLoadInitialData } from "../../useLoadInitialData-Dm48tlSO.mjs";
|
|
10
|
-
import { _ as _sfc_main$3 } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { c as createPaymentMethodsService } from "../../paymentMethods-
|
|
12
|
-
import { u as useService } from "../../useService-
|
|
13
|
-
import { u as useCustomerWalletBalances, a as useWalletBalanceItems, _ as _sfc_main$2 } from "../../useWalletBalanceItems-
|
|
14
|
-
import {
|
|
10
|
+
import { _ as _sfc_main$3 } from "../../CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs";
|
|
11
|
+
import { c as createPaymentMethodsService } from "../../paymentMethods-C-ApE-G4.mjs";
|
|
12
|
+
import { u as useService } from "../../useService-DG_zedHV.mjs";
|
|
13
|
+
import { u as useCustomerWalletBalances, a as useWalletBalanceItems, _ as _sfc_main$2 } from "../../useWalletBalanceItems-B5FMmoU2.mjs";
|
|
14
|
+
import { b as _sfc_main$7, d as defineCustomElement, g as getComponentName } from "../../component-dpA83LIN.mjs";
|
|
15
15
|
function useCustomerPaymentMethodOptions({
|
|
16
16
|
customerId,
|
|
17
17
|
amount
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SolvimonUpgradeSubscription: import('
|
|
1
|
+
export declare const SolvimonUpgradeSubscription: import('../../../../node_modules/vue/dist/vue.d.ts').VueElementConstructor<unknown>;
|
|
2
2
|
export declare const COMPONENT_NAME: string;
|
|
3
3
|
export declare const defineSolvimonUpgradeSubscription: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../component-yWF07boR.js"),n=require("../../PricingGroupContent.vue_vue_type_script_setup_true_lang-KnhKv07X.js"),a=require("../../paymentMethods-A-5SBmy1.js"),i=require("../../ContentWithAsideLayout-BZJPhvLh.js"),r=require("../../useActionDispatchProvider-DmTJ_bqE.js"),o={id:"ppsu_hwDeeN0vhvcVCsAIdp1G",pricing_plan_schedule_infos:[{id:"ppsc_IwDeeN0vhvcVCIAQdq1a",pricing_plan_version_id:"ppve_MwDeeN0vhvcEuaADdd1f",start_at:"2026-04-05T22:00:00Z",pricing_plan_version:{pricing_categories:[{product_category:{id:"proc_iwDeeN0vhphn6VAtBD1w",name:"Add ons"},display_order:1,pricings:[{id:"pric_ywDeeN0vhvcPguAadr1V",name:"Integration setup",products:[{name:"Integration setup"}],items:[{id:"prii_NwDeeN0vhvcPguAxds12",product_items:[{name:"Rillet integration setup",model_type:"ONE_OFF"}],configs:[{on_demand:!0,bands:[{fixed_amount:{quantity:"5000.00",currency:"EUR"}}]}]},{id:"prii_IwDeeN0vhvcPgvAsdS1Q",product_items:[{name:"Attio integration setup",model_type:"ONE_OFF"}],configs:[{on_demand:!0,bands:[{amount:{quantity:"50000.00",currency:"EUR"}}]}]}]}],pricing_groups:[]}]}}]},l=e=>{var t,n;return((null==(t=e.configs)?void 0:t.some(e=>e.on_demand))??!1)&&((null==(n=e.product_items)?void 0:n.some(e=>"ONE_OFF"===e.model_type))??!1)},c=e=>{var t,n;return{id:e.id,name:null==(n=null==(t=e.product_items)?void 0:t[0])?void 0:n.name,items:[{id:e.id,configs:(e.configs??[]).map(e=>({bands:(e.bands??[]).map(e=>({fixed_amount:e.fixed_amount??e.amount}))}))}]}},s=e=>(e.items??[]).filter(l).map(c),d=e=>({display_order:e.display_order,product_category:e.product_category,pricings:(e.pricings??[]).flatMap(s),pricing_groups:(e.pricing_groups??[]).map(e=>({id:e.id,name:e.name,pricings:(e.pricings??[]).flatMap(s)})).filter(e=>e.pricings.length>0)}),u=Object.fromEntries(o.pricing_plan_schedule_infos.flatMap(e=>e.pricing_plan_version.pricing_categories).flatMap(e=>e.pricings).flatMap(e=>e.items).filter(l).map(e=>{var t,n,a,i,r;const o=null==(a=null==(n=null==(t=e.configs)?void 0:t[0])?void 0:n.bands)?void 0:a[0],l=(null==(i=null==o?void 0:o.fixed_amount)?void 0:i.quantity)??(null==(r=null==o?void 0:o.amount)?void 0:r.quantity)??"0";return[e.id,parseFloat(l)]})),p=e=>({quantity:e.toFixed(2),currency:"EUR"}),m={id:"paya_NwDeeN0vgXgeP1AyNx14",object_type:"PAYMENT_ACCEPTOR",status:"ACTIVE",reference:"mock-payment-acceptor",name:"Mock payment acceptor",type:"PAYMENT_GATEWAY"},g={id:"intg_zwDeeN0vgXgeM6APNW1g",object_type:"INTEGRATION",reference:"mock-payment-integration",name:"Mock payment integration",description:"Mock payment integration",status:"ACTIVE",type:"PAYMENT_GATEWAY"},_={class:"mb-3 flex flex-col gap-2"},f={class:"flex flex-col gap-1 border-t pt-3"},y={class:"flex items-center justify-between"},v={class:"flex items-center justify-between"},h={class:"flex items-center justify-between border-t pt-3"},b=e.defineComponent({__name:"UpgradeOrderSummary",props:{selectedPricings:{type:Array},invoice:{type:Object},isPending:{type:Boolean}},setup(n){const a=n,{$t:i}=t.useIntl(),r=e.computed(()=>0===a.selectedPricings.length),o=e=>{var t,n,a,i,r,o;return null==(o=null==(r=null==(i=null==(a=null==(n=null==(t=e.items)?void 0:t[0])?void 0:n.configs)?void 0:a[0])?void 0:i.bands)?void 0:r[0])?void 0:o.fixed_amount};return(a,l)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),null,{default:e.withCtx(()=>{var a;return[e.createVNode(e.unref(t._sfc_main$2),{variant:"heading-3",tag:"h2",class:"mb-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Order summary",id:"upgrade_subscription.order_summary.title",description:"Title for the order summary section on the upgrade subscription page"})),1)]),_:1}),r.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:0,variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Select add-ons to see pricing.",id:"upgrade_subscription.order_summary.empty_state",description:"Placeholder shown when no add-ons are selected in the order summary"})),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.selectedPricings,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,class:"flex items-center justify-between"},[e.createElementVNode("div",null,[e.createVNode(e.unref(t._sfc_main$2),{variant:"body-sm"},{default:e.withCtx(()=>{var t,a;return[e.createTextVNode(e.toDisplayString(n.name??(null==(a=null==(t=n.products)?void 0:t[0])?void 0:a.name)),1)]}),_:2},1024),e.createVNode(e.unref(t._sfc_main$2),{variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"one-off",id:"upgrade_subscription.order_summary.one_off_label",description:"One-off payment label next to a line item in order summary"})),1)]),_:1})]),o(n)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:0,variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(o(n))),1)]),_:2},1024)):e.createCommentVNode("",!0)]))),128))]),(null==(a=n.invoice)?void 0:a.tax_summary)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",f,[e.createElementVNode("div",y,[e.createVNode(e.unref(t._sfc_main$2),{variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Total excluding taxes",id:"upgrade_subscription.order_summary.subtotal_label",description:"Subtotal before tax label in order summary"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$2),{variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(n.invoice.tax_summary.base_amount)),1)]),_:1})]),e.createElementVNode("div",v,[e.createVNode(e.unref(t._sfc_main$2),{variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Taxes",id:"upgrade_subscription.order_summary.taxes_label",description:"Tax amount label in order summary"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$2),{variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(n.invoice.tax_summary.tax_amount)),1)]),_:1})])]),e.createElementVNode("div",h,[e.createVNode(e.unref(t._sfc_main$2),{variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Total due today",id:"upgrade_subscription.order_summary.total_label",description:"Total amount due today label in order summary"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$2),{variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(n.invoice.tax_summary.total_amount)),1)]),_:1})])],64)):e.createCommentVNode("",!0)],64))]}),_:1}))}}),k=e.defineComponent({__name:"OnDemandPricingRow",props:{pricing:{type:Object},selected:{type:Boolean}},emits:["toggle"],setup(a,{emit:i}){const r=a,o=i,{$t:l}=t.useIntl(),c=e.computed(()=>{var e,t;return r.pricing.name??(null==(t=null==(e=r.pricing.products)?void 0:e[0])?void 0:t.name)??"—"}),s=e.computed(()=>{var e,t,n,a,i,o;return null==(o=null==(i=null==(a=null==(n=null==(t=null==(e=r.pricing.items)?void 0:e[0])?void 0:t.configs)?void 0:n[0])?void 0:a.bands)?void 0:i[0])?void 0:o.fixed_amount}),d=e.computed(()=>s.value?`${t.formatAmount(s.value)} ${l({defaultMessage:"one-off",id:"on_demand_pricing_row.one_off_label",description:"One-off label shown next to the price in an on-demand pricing row"})}`:"");return(i,r)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{"content-background":a.selected?"none":"gray",class:e.normalizeClass({"!bg-white":a.selected})},{default:e.withCtx(()=>[e.createVNode(n._sfc_main,{name:c.value,description:d.value},{default:e.withCtx(()=>[a.selected?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2H),{key:0,color:"gray",variant:"outline",size:"sm","icon-prefix":"remove_shopping_cart",onClick:r[0]||(r[0]=e=>o("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Remove",id:"on_demand_pricing_row.remove_button_label",description:"Label for the remove button in an on-demand pricing row"})),1)]),_:1})):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2H),{key:1,color:"primary",size:"sm","icon-prefix":"add",onClick:r[1]||(r[1]=e=>o("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Add to cart",id:"on_demand_pricing_row.add_to_cart_button_label",description:"Label for the add to cart button in an on-demand pricing row"})),1)]),_:1}))]),_:1},8,["name","description"])]),_:1},8,["content-background","class"]))}}),x={class:"grid grid-cols-1 gap-1"},N=e.defineComponent({__name:"OnDemandPricingList",props:{categories:{type:Array},selectedPricingIds:{type:Array}},emits:["toggle"],setup(n,{emit:a}){const i=n,r=a,o=e.computed(()=>[...i.categories].sort((e,t)=>(e.display_order??0)-(t.display_order??0)));return(a,i)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id??a.display_order,class:"flex flex-col gap-2"},[e.createVNode(e.unref(t._sfc_main$2),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>{var t;return[e.createTextVNode(e.toDisplayString((null==(t=a.product_category)?void 0:t.name)??a.name),1)]}),_:2},1024),e.createElementVNode("div",x,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricings,t=>(e.openBlock(),e.createBlock(k,{key:t.id,pricing:t,selected:n.selectedPricingIds.includes(t.id),onToggle:i[0]||(i[0]=e=>r("toggle",e))},null,8,["pricing","selected"]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricing_groups,a=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.id},[e.createVNode(e.unref(t._sfc_main$2),{variant:"body-sm",weight:"semibold",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.name),1)]),_:2},1024),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricings,t=>(e.openBlock(),e.createBlock(k,{key:t.id,pricing:t,selected:n.selectedPricingIds.includes(t.id),onToggle:i[1]||(i[1]=e=>r("toggle",e))},null,8,["pricing","selected"]))),128))],64))),128))])]))),128))}}),w={class:"flex flex-col gap-4"},B={key:0,class:"flex flex-col gap-2"},V={class:"flex flex-col gap-1"},C={key:1,class:"flex flex-col gap-2"},E={class:"flex flex-col gap-1"},T={class:"flex items-center gap-3"},S={key:0,class:"flex h-9 w-9 shrink-0 items-center gap-0.5"},A=["src","alt"],I={key:1,class:"flex h-9 w-9 shrink-0 items-center justify-center overflow-clip rounded"},D=["src","alt"],M={key:2,class:"flex flex-col gap-1"},P=e.defineComponent({__name:"PaymentMethodPicker",props:{customerId:{type:String},subscriptionId:{type:String},selectedId:{type:String}},emits:["select"],setup(n,{emit:i}){const r=n,o=i,{$t:l}=t.useIntl(),{getPaymentMethods:c}=a.createPaymentMethodsService(),s=e.ref([]),d=e.ref([]),u=e.ref(!1),p=e.computed(()=>d.value.flatMap(e=>e.options??[])),_=e=>`https://checkoutshopper-live.adyen.com/checkoutshopper/images/logos/small/${e}.svg`,f=["visa","mc","amex","maestro"],y=e=>{if(!e)return[];return[...f.filter(t=>e.includes(t)),...e.filter(e=>!f.includes(e))].slice(0,4)};return e.onMounted(async()=>{u.value=!0;try{const e=await c({customerId:r.customerId,pagination:{page:1,pageSize:50}});s.value=e.data,d.value=[{payment_acceptor:m,integration:g,options:[{name:"iDeal",payment_method_variant:"ONLINE_BANKING",payment_gateway_variant:"ADYEN",adyen:{name:"iDEAL | Wero",type:"ideal"}},{name:"Cards",payment_method_variant:"CARD",payment_gateway_variant:"ADYEN",adyen:{name:"Cards",type:"scheme",brands:["maestro","accel","amex","cup","diners","hipercard","jcb","mc","nyce","pulse","star","visa"]}},{name:"PayPal",payment_method_variant:"DIGITAL_WALLET",payment_gateway_variant:"ADYEN",adyen:{name:"PayPal",type:"paypal",configuration:{intent:"capture"}}},{name:"Trustly",payment_method_variant:"ONLINE_BANKING",payment_gateway_variant:"ADYEN",adyen:{name:"Trustly - Instant Bank Payment",type:"trustly"}}]}]}finally{u.value=!1}}),(a,i)=>(e.openBlock(),e.createElementBlock("div",w,[s.value.length>0?(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.unref(t._sfc_main$2),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Saved payment methods",id:"upgrade_subscription.payment_picker.saved_title",description:"Heading for the saved payment methods section in the upgrade subscription payment picker"})),1)]),_:1}),e.createElementVNode("div",V,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{key:a.id,"content-background":n.selectedId===a.id?"none":"gray",class:e.normalizeClass([{"!bg-white":n.selectedId===a.id},"cursor-pointer"]),onClick:e=>o("select",a.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main),{"payment-method":a},null,8,["payment-method"])]),_:2},1032,["content-background","class","onClick"]))),128))])])):e.createCommentVNode("",!0),p.value.length>0?(e.openBlock(),e.createElementBlock("div",C,[e.createVNode(e.unref(t._sfc_main$2),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"All payment methods",id:"upgrade_subscription.payment_picker.all_title",description:"Heading for the all payment methods section in the upgrade subscription payment picker"})),1)]),_:1}),e.createElementVNode("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{key:a.adyen.type,"content-background":n.selectedId===a.adyen.type?"none":"gray",class:e.normalizeClass([{"!bg-white":n.selectedId===a.adyen.type},"cursor-pointer"]),onClick:e=>o("select",a.adyen.type)},{default:e.withCtx(()=>{return[e.createElementVNode("div",T,["scheme"===a.adyen.type?(e.openBlock(),e.createElementBlock("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y(a.adyen.brands),t=>(e.openBlock(),e.createElementBlock("img",{key:t,src:_(t),alt:t,class:"h-5 w-auto rounded"},null,8,A))),128))])):(e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("img",{src:(n=a.adyen.type,`https://checkoutshopper-live.adyen.com/checkoutshopper/images/logos/${n}.svg`),alt:a.name,class:"h-9 w-9 object-contain"},null,8,D)])),e.createVNode(e.unref(t._sfc_main$2),{variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.name),1)]),_:2},1024)])];var n}),_:2},1032,["content-background","class","onClick"]))),128))])])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("div",M,[...i[0]||(i[0]=[e.createElementVNode("div",{class:"h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1)])])):e.createCommentVNode("",!0)]))}});const $={key:0,class:"flex h-full items-center justify-center p-8"},O={class:"flex flex-col items-center py-10"},j=e.defineComponent({__name:"UpgradeSubscription",props:{configuration:{type:Object}},setup(a){const l=a,{$t:c}=t.useIntl(),{dispatchAction:s}=r.useActionDispatchProvider(),{chargeOnDemandPricingItems:m}=function(){const e=t.createRequestService(),n=t.useConfig();return{chargeOnDemandPricingItems:function({scheduleId:t,pricingPlanVersionId:a,pricingItemIds:i,startAt:r,finalizeImmediately:o=!0,paymentMethodId:l}){return e({url:`${n.apiUrls.config}/portal/pricing-plan-schedules/${t}/charge-on-demand-pricing-items`,options:{method:"POST"},data:{...a?{pricing_plan_version_id:a}:{},pricing_item_ids:i,...r?{start_at:r}:{},finalize_immediately:o,...l?{payment_method_id:l}:{}}})}}}(),g=i.usePortal(),_=e.computed(()=>g.value.customer_id),f=e.ref([]),y=e.ref(void 0),v=e.ref(!1),h=e.ref(!1),k=e.ref(void 0),x=e.ref(!1),w=e.computed(()=>(e=>{var t;const n=Date.now(),a=o.pricing_plan_schedule_infos,i=a.find(e=>{const t=Date.parse(e.start_at);return Number.isFinite(t)&&t<=n})??a[0],r=((null==(t=null==i?void 0:i.pricing_plan_version)?void 0:t.pricing_categories)??[]).map(d).filter(e=>{var t,n;return((null==(t=e.pricings)?void 0:t.length)??0)>0||((null==(n=e.pricing_groups)?void 0:n.length)??0)>0});return{pricing_plan_subscription_id:e||o.id,pricing_plan_schedule_id:(null==i?void 0:i.id)??"",pricing_plan_version_id:(null==i?void 0:i.pricing_plan_version_id)??"",billing_period:{type:"MONTH",value:1},billing_currency:"EUR",pricing_categories:r}})(l.configuration.subscriptionId)),B=e.computed(()=>w.value.pricing_categories),V=e.computed(()=>B.value.flatMap(e=>[...e.pricings??[],...(e.pricing_groups??[]).flatMap(e=>e.pricings??[])])),C=e.computed(()=>V.value.filter(e=>f.value.includes(e.id)));let E;e.watch(f,e=>{if(clearTimeout(E),0===e.length)return k.value=void 0,void(x.value=!1);x.value=!0,E=setTimeout(()=>{k.value=(e=>{const t=e.reduce((e,t)=>e+(u[t]??0),0),n=Math.round(.21*t*100)/100,a=t+n;return{invoice:{tax_summary:{base_amount:p(t),tax_amount:p(n),total_amount:p(a),country_code:"NL"}},first_invoice:{},invoice_infos:[]}})(e).invoice,x.value=!1},400)});const T=e=>{f.value.includes(e)?f.value=f.value.filter(t=>t!==e):f.value=[...f.value,e]},S=e.computed(()=>f.value.length>0&&!!y.value),A=e.ref(void 0),I=async()=>{if(S.value){v.value=!0,A.value=void 0;try{const e=C.value.map(e=>{var t,n;return null==(n=null==(t=e.items)?void 0:t[0])?void 0:n.id}).filter(e=>!!e),t=y.value&&y.value.startsWith("pmet_")?y.value:void 0,n=await m({scheduleId:w.value.pricing_plan_schedule_id,pricingPlanVersionId:w.value.pricing_plan_version_id,pricingItemIds:e,finalizeImmediately:!0,paymentMethodId:t});t?h.value=!0:s({action:"pay-invoice",data:{invoiceId:n.id}})}catch{A.value=c({defaultMessage:"Something went wrong. Please try again.",id:"upgrade_subscription.purchase_error",description:"Error message shown when the purchase call fails on the upgrade subscription page"})}finally{v.value=!1}}};return(r,o)=>h.value?(e.openBlock(),e.createElementBlock("div",$,[e.createVNode(e.unref(t._sfc_main$1g),null,{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(e.unref(t._sfc_main$4),{icon:"check_circle",class:"text-green-400",size:"lg"}),e.createVNode(e.unref(t._sfc_main$2),{variant:"heading-3",tag:"span",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Payment successful",id:"upgrade_subscription.success.title",description:"Title shown after a successful add-on purchase"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$2),{variant:"body-sm",shade:"lighter",tag:"span",class:"mt-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Your add-ons have been activated.",id:"upgrade_subscription.success.subtitle",description:"Subtitle shown after a successful add-on purchase"})),1)]),_:1})])]),_:1})])):(e.openBlock(),e.createBlock(e.unref(i.ContentWithAsideLayout),{key:1},{content:e.withCtx(()=>[B.value.length>0?(e.openBlock(),e.createBlock(N,{key:0,categories:B.value,"selected-pricing-ids":f.value,onToggle:T},null,8,["categories","selected-pricing-ids"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:1,variant:"body-sm",shade:"lighter",class:"p-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"No on-demand add-ons are available for this subscription.",id:"upgrade_subscription.empty_state",description:"Shown when there are no on-demand add-ons available for the subscription"})),1)]),_:1})),e.createVNode(e.unref(t._sfc_main$2p),{spacing:"sm"}),e.createVNode(P,{"customer-id":_.value,"subscription-id":a.configuration.subscriptionId,"selected-id":y.value,onSelect:o[0]||(o[0]=e=>y.value=e)},null,8,["customer-id","subscription-id","selected-id"])]),aside:e.withCtx(()=>[e.createVNode(b,{"selected-pricings":C.value,invoice:k.value,"is-pending":x.value},null,8,["selected-pricings","invoice","is-pending"]),A.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$16),{key:0,title:A.value},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$2H),{size:"lg",class:"full-width",type:"button",disabled:!S.value||v.value,loading:v.value,onClick:I},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Purchase",id:"upgrade_subscription.purchase_button.label",description:"Label for the purchase button on the upgrade subscription page"})),1)]),_:1},8,["disabled","loading"]),e.createVNode(e.unref(t._sfc_main$2),{tag:"div",variant:"body-sm",shade:"lighter",class:"flex grow justify-center"},{default:e.withCtx(()=>[e.createVNode(n._sfc_main$1,{icon:"lock",kpi:e.unref(c)({defaultMessage:"Secure and encrypted payments",id:"upgrade_subscription.kpi.encrypted_payments.label",description:"The encrypted payments KPI shown on the upgrade subscription page"})},null,8,["kpi"])]),_:1})]),_:1}))}}),L=e.defineComponent({__name:"UpgradeSubscription.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:n=>(a,i)=>{var r,o,l,c;return e.openBlock(),e.createBlock(t._sfc_main$1,{"custom-element-name":e.unref(q),environment:n.environment,locale:n.locale,"portal-object":n.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(o=null==(r=n.branding)?void 0:r.colors)?void 0:o.primary,"secondary-color":null==(c=null==(l=n.branding)?void 0:l.colors)?void 0:c.secondary,"experimental-features":n.experimentalFeatures,"log-level":n.logLevel,"on-log":n.onLog,onError:i[0]||(i[0]=e=>a.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(j,{configuration:n.configuration},null,8,["configuration"])]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),F=t.defineCustomElement(L),q=t.getComponentName("upgrade-subscription");exports.COMPONENT_NAME=q,exports.SolvimonUpgradeSubscription=F,exports.defineSolvimonUpgradeSubscription=()=>{customElements.get(q)||customElements.define(q,F)};
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../Section.vue.es-BuzTXRLP.js"),n=require("../../Button.vue.es-BC4_TItq.js"),a=require("../../Divider.vue.es-ClFG8QtG.js"),i=require("../../ErrorNotification.vue.es-FpRyg0De.js"),r=require("../../component-ZRZIt3ZW.js"),o=require("../../formatting.es-9hM8aHSg.js"),l=require("../../PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js"),c=require("../../PaymentMethod.vue.es-DYlnmZh7.js"),s=require("../../paymentMethods-DZRf0WRl.js"),d=require("../../ContentWithAsideLayout-UHovpjZu.js"),u=require("../../useActionDispatchProvider-CWVV_xsi.js"),p={id:"ppsu_hwDeeN0vhvcVCsAIdp1G",pricing_plan_schedule_infos:[{id:"ppsc_IwDeeN0vhvcVCIAQdq1a",pricing_plan_version_id:"ppve_MwDeeN0vhvcEuaADdd1f",start_at:"2026-04-05T22:00:00Z",pricing_plan_version:{pricing_categories:[{product_category:{id:"proc_iwDeeN0vhphn6VAtBD1w",name:"Add ons"},display_order:1,pricings:[{id:"pric_ywDeeN0vhvcPguAadr1V",name:"Integration setup",products:[{name:"Integration setup"}],items:[{id:"prii_NwDeeN0vhvcPguAxds12",product_items:[{name:"Rillet integration setup",model_type:"ONE_OFF"}],configs:[{on_demand:!0,bands:[{fixed_amount:{quantity:"5000.00",currency:"EUR"}}]}]},{id:"prii_IwDeeN0vhvcPgvAsdS1Q",product_items:[{name:"Attio integration setup",model_type:"ONE_OFF"}],configs:[{on_demand:!0,bands:[{amount:{quantity:"50000.00",currency:"EUR"}}]}]}]}],pricing_groups:[]}]}}]},m=e=>{var t,n;return((null==(t=e.configs)?void 0:t.some(e=>e.on_demand))??!1)&&((null==(n=e.product_items)?void 0:n.some(e=>"ONE_OFF"===e.model_type))??!1)},g=e=>{var t,n;return{id:e.id,name:null==(n=null==(t=e.product_items)?void 0:t[0])?void 0:n.name,items:[{id:e.id,configs:(e.configs??[]).map(e=>({bands:(e.bands??[]).map(e=>({fixed_amount:e.fixed_amount??e.amount}))}))}]}},_=e=>(e.items??[]).filter(m).map(g),f=e=>({display_order:e.display_order,product_category:e.product_category,pricings:(e.pricings??[]).flatMap(_),pricing_groups:(e.pricing_groups??[]).map(e=>({id:e.id,name:e.name,pricings:(e.pricings??[]).flatMap(_)})).filter(e=>e.pricings.length>0)}),y=Object.fromEntries(p.pricing_plan_schedule_infos.flatMap(e=>e.pricing_plan_version.pricing_categories).flatMap(e=>e.pricings).flatMap(e=>e.items).filter(m).map(e=>{var t,n,a,i,r;const o=null==(a=null==(n=null==(t=e.configs)?void 0:t[0])?void 0:n.bands)?void 0:a[0],l=(null==(i=null==o?void 0:o.fixed_amount)?void 0:i.quantity)??(null==(r=null==o?void 0:o.amount)?void 0:r.quantity)??"0";return[e.id,parseFloat(l)]})),v=e=>({quantity:e.toFixed(2),currency:"EUR"}),h={id:"paya_NwDeeN0vgXgeP1AyNx14",object_type:"PAYMENT_ACCEPTOR",status:"ACTIVE",reference:"mock-payment-acceptor",name:"Mock payment acceptor",type:"PAYMENT_GATEWAY"},b={id:"intg_zwDeeN0vgXgeM6APNW1g",object_type:"INTEGRATION",reference:"mock-payment-integration",name:"Mock payment integration",description:"Mock payment integration",status:"ACTIVE",type:"PAYMENT_GATEWAY"},k={class:"mb-3 flex flex-col gap-2"},x={class:"flex flex-col gap-1 border-t pt-3"},N={class:"flex items-center justify-between"},w={class:"flex items-center justify-between"},B={class:"flex items-center justify-between border-t pt-3"},V=e.defineComponent({__name:"UpgradeOrderSummary",props:{selectedPricings:{type:Array},invoice:{type:Object},isPending:{type:Boolean}},setup(n){const a=n,{$t:i}=r.useIntl(),l=e.computed(()=>0===a.selectedPricings.length),c=e=>{var t,n,a,i,r,o;return null==(o=null==(r=null==(i=null==(a=null==(n=null==(t=e.items)?void 0:t[0])?void 0:n.configs)?void 0:a[0])?void 0:i.bands)?void 0:r[0])?void 0:o.fixed_amount};return(a,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),null,{default:e.withCtx(()=>{var t;return[e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"h2",class:"mb-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Order summary",id:"upgrade_subscription.order_summary.title",description:"Title for the order summary section on the upgrade subscription page"})),1)]),_:1}),l.value?(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:0,variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Select add-ons to see pricing.",id:"upgrade_subscription.order_summary.empty_state",description:"Placeholder shown when no add-ons are selected in the order summary"})),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.selectedPricings,t=>(e.openBlock(),e.createElementBlock("div",{key:t.id,class:"flex items-center justify-between"},[e.createElementVNode("div",null,[e.createVNode(e.unref(r._sfc_main),{variant:"body-sm"},{default:e.withCtx(()=>{var n,a;return[e.createTextVNode(e.toDisplayString(t.name??(null==(a=null==(n=t.products)?void 0:n[0])?void 0:a.name)),1)]}),_:2},1024),e.createVNode(e.unref(r._sfc_main),{variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"one-off",id:"upgrade_subscription.order_summary.one_off_label",description:"One-off payment label next to a line item in order summary"})),1)]),_:1})]),c(t)?(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:0,variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o.formatAmount)(c(t))),1)]),_:2},1024)):e.createCommentVNode("",!0)]))),128))]),(null==(t=n.invoice)?void 0:t.tax_summary)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",x,[e.createElementVNode("div",N,[e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Total excluding taxes",id:"upgrade_subscription.order_summary.subtotal_label",description:"Subtotal before tax label in order summary"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o.formatAmount)(n.invoice.tax_summary.base_amount)),1)]),_:1})]),e.createElementVNode("div",w,[e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Taxes",id:"upgrade_subscription.order_summary.taxes_label",description:"Tax amount label in order summary"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o.formatAmount)(n.invoice.tax_summary.tax_amount)),1)]),_:1})])]),e.createElementVNode("div",B,[e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Total due today",id:"upgrade_subscription.order_summary.total_label",description:"Total amount due today label in order summary"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o.formatAmount)(n.invoice.tax_summary.total_amount)),1)]),_:1})])],64)):e.createCommentVNode("",!0)],64))]}),_:1}))}}),C=e.defineComponent({__name:"OnDemandPricingRow",props:{pricing:{type:Object},selected:{type:Boolean}},emits:["toggle"],setup(a,{emit:i}){const c=a,s=i,{$t:d}=r.useIntl(),u=e.computed(()=>{var e,t;return c.pricing.name??(null==(t=null==(e=c.pricing.products)?void 0:e[0])?void 0:t.name)??"—"}),p=e.computed(()=>{var e,t,n,a,i,r;return null==(r=null==(i=null==(a=null==(n=null==(t=null==(e=c.pricing.items)?void 0:e[0])?void 0:t.configs)?void 0:n[0])?void 0:a.bands)?void 0:i[0])?void 0:r.fixed_amount}),m=e.computed(()=>p.value?`${o.formatAmount(p.value)} ${d({defaultMessage:"one-off",id:"on_demand_pricing_row.one_off_label",description:"One-off label shown next to the price in an on-demand pricing row"})}`:"");return(i,r)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"content-background":a.selected?"none":"gray",class:e.normalizeClass({"!bg-white":a.selected})},{default:e.withCtx(()=>[e.createVNode(l._sfc_main,{name:u.value,description:m.value},{default:e.withCtx(()=>[a.selected?(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:0,color:"gray",variant:"outline",size:"sm","icon-prefix":"remove_shopping_cart",onClick:r[0]||(r[0]=e=>s("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"Remove",id:"on_demand_pricing_row.remove_button_label",description:"Label for the remove button in an on-demand pricing row"})),1)]),_:1})):(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:1,color:"primary",size:"sm","icon-prefix":"add",onClick:r[1]||(r[1]=e=>s("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"Add to cart",id:"on_demand_pricing_row.add_to_cart_button_label",description:"Label for the add to cart button in an on-demand pricing row"})),1)]),_:1}))]),_:1},8,["name","description"])]),_:1},8,["content-background","class"]))}}),E={class:"grid grid-cols-1 gap-1"},S=e.defineComponent({__name:"OnDemandPricingList",props:{categories:{type:Array},selectedPricingIds:{type:Array}},emits:["toggle"],setup(t,{emit:n}){const a=t,i=n,o=e.computed(()=>[...a.categories].sort((e,t)=>(e.display_order??0)-(t.display_order??0)));return(n,a)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id??n.display_order,class:"flex flex-col gap-2"},[e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>{var t;return[e.createTextVNode(e.toDisplayString((null==(t=n.product_category)?void 0:t.name)??n.name),1)]}),_:2},1024),e.createElementVNode("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pricings,n=>(e.openBlock(),e.createBlock(C,{key:n.id,pricing:n,selected:t.selectedPricingIds.includes(n.id),onToggle:a[0]||(a[0]=e=>i("toggle",e))},null,8,["pricing","selected"]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pricing_groups,n=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n.id},[e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",weight:"semibold",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.name),1)]),_:2},1024),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pricings,n=>(e.openBlock(),e.createBlock(C,{key:n.id,pricing:n,selected:t.selectedPricingIds.includes(n.id),onToggle:a[1]||(a[1]=e=>i("toggle",e))},null,8,["pricing","selected"]))),128))],64))),128))])]))),128))}}),T={class:"flex flex-col gap-4"},A={key:0,class:"flex flex-col gap-2"},D={class:"flex flex-col gap-1"},I={key:1,class:"flex flex-col gap-2"},M={class:"flex flex-col gap-1"},P={class:"flex items-center gap-3"},j={key:0,class:"flex h-9 w-9 shrink-0 items-center gap-0.5"},O=["src","alt"],L={key:1,class:"flex h-9 w-9 shrink-0 items-center justify-center overflow-clip rounded"},F=["src","alt"],q={key:2,class:"flex flex-col gap-1"},$=e.defineComponent({__name:"PaymentMethodPicker",props:{customerId:{type:String},subscriptionId:{type:String},selectedId:{type:String}},emits:["select"],setup(n,{emit:a}){const i=n,o=a,{$t:l}=r.useIntl(),{getPaymentMethods:d}=s.createPaymentMethodsService(),u=e.ref([]),p=e.ref([]),m=e.ref(!1),g=e.computed(()=>p.value.flatMap(e=>e.options??[])),_=e=>`https://checkoutshopper-live.adyen.com/checkoutshopper/images/logos/small/${e}.svg`,f=["visa","mc","amex","maestro"],y=e=>{if(!e)return[];return[...f.filter(t=>e.includes(t)),...e.filter(e=>!f.includes(e))].slice(0,4)};return e.onMounted(async()=>{m.value=!0;try{const e=await d({customerId:i.customerId,pagination:{page:1,pageSize:50}});u.value=e.data,p.value=[{payment_acceptor:h,integration:b,options:[{name:"iDeal",payment_method_variant:"ONLINE_BANKING",payment_gateway_variant:"ADYEN",adyen:{name:"iDEAL | Wero",type:"ideal"}},{name:"Cards",payment_method_variant:"CARD",payment_gateway_variant:"ADYEN",adyen:{name:"Cards",type:"scheme",brands:["maestro","accel","amex","cup","diners","hipercard","jcb","mc","nyce","pulse","star","visa"]}},{name:"PayPal",payment_method_variant:"DIGITAL_WALLET",payment_gateway_variant:"ADYEN",adyen:{name:"PayPal",type:"paypal",configuration:{intent:"capture"}}},{name:"Trustly",payment_method_variant:"ONLINE_BANKING",payment_gateway_variant:"ADYEN",adyen:{name:"Trustly - Instant Bank Payment",type:"trustly"}}]}]}finally{m.value=!1}}),(a,i)=>(e.openBlock(),e.createElementBlock("div",T,[u.value.length>0?(e.openBlock(),e.createElementBlock("div",A,[e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Saved payment methods",id:"upgrade_subscription.payment_picker.saved_title",description:"Heading for the saved payment methods section in the upgrade subscription payment picker"})),1)]),_:1}),e.createElementVNode("div",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:a.id,"content-background":n.selectedId===a.id?"none":"gray",class:e.normalizeClass([{"!bg-white":n.selectedId===a.id},"cursor-pointer"]),onClick:e=>o("select",a.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(c._sfc_main),{"payment-method":a},null,8,["payment-method"])]),_:2},1032,["content-background","class","onClick"]))),128))])])):e.createCommentVNode("",!0),g.value.length>0?(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"All payment methods",id:"upgrade_subscription.payment_picker.all_title",description:"Heading for the all payment methods section in the upgrade subscription payment picker"})),1)]),_:1}),e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:a.adyen.type,"content-background":n.selectedId===a.adyen.type?"none":"gray",class:e.normalizeClass([{"!bg-white":n.selectedId===a.adyen.type},"cursor-pointer"]),onClick:e=>o("select",a.adyen.type)},{default:e.withCtx(()=>{return[e.createElementVNode("div",P,["scheme"===a.adyen.type?(e.openBlock(),e.createElementBlock("div",j,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y(a.adyen.brands),t=>(e.openBlock(),e.createElementBlock("img",{key:t,src:_(t),alt:t,class:"h-5 w-auto rounded"},null,8,O))),128))])):(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("img",{src:(t=a.adyen.type,`https://checkoutshopper-live.adyen.com/checkoutshopper/images/logos/${t}.svg`),alt:a.name,class:"h-9 w-9 object-contain"},null,8,F)])),e.createVNode(e.unref(r._sfc_main),{variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.name),1)]),_:2},1024)])];var t}),_:2},1032,["content-background","class","onClick"]))),128))])])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("div",q,[...i[0]||(i[0]=[e.createElementVNode("div",{class:"h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1)])])):e.createCommentVNode("",!0)]))}});const z={key:0,class:"flex h-full items-center justify-center p-8"},R={class:"flex flex-col items-center py-10"},U=e.defineComponent({__name:"UpgradeSubscription",props:{configuration:{type:Object}},setup(o){const c=o,{$t:s}=r.useIntl(),{dispatchAction:m}=u.useActionDispatchProvider(),{chargeOnDemandPricingItems:g}=function(){const e=r.createRequestService(),t=r.useConfig();return{chargeOnDemandPricingItems:function({scheduleId:n,pricingPlanVersionId:a,pricingItemIds:i,startAt:r,finalizeImmediately:o=!0,paymentMethodId:l}){return e({url:`${t.apiUrls.config}/portal/pricing-plan-schedules/${n}/charge-on-demand-pricing-items`,options:{method:"POST"},data:{...a?{pricing_plan_version_id:a}:{},pricing_item_ids:i,...r?{start_at:r}:{},finalize_immediately:o,...l?{payment_method_id:l}:{}}})}}}(),_=d.usePortal(),h=e.computed(()=>_.value.customer_id),b=e.ref([]),k=e.ref(void 0),x=e.ref(!1),N=e.ref(!1),w=e.ref(void 0),B=e.ref(!1),C=e.computed(()=>(e=>{var t;const n=Date.now(),a=p.pricing_plan_schedule_infos,i=a.find(e=>{const t=Date.parse(e.start_at);return Number.isFinite(t)&&t<=n})??a[0],r=((null==(t=null==i?void 0:i.pricing_plan_version)?void 0:t.pricing_categories)??[]).map(f).filter(e=>{var t,n;return((null==(t=e.pricings)?void 0:t.length)??0)>0||((null==(n=e.pricing_groups)?void 0:n.length)??0)>0});return{pricing_plan_subscription_id:e||p.id,pricing_plan_schedule_id:(null==i?void 0:i.id)??"",pricing_plan_version_id:(null==i?void 0:i.pricing_plan_version_id)??"",billing_period:{type:"MONTH",value:1},billing_currency:"EUR",pricing_categories:r}})(c.configuration.subscriptionId)),E=e.computed(()=>C.value.pricing_categories),T=e.computed(()=>E.value.flatMap(e=>[...e.pricings??[],...(e.pricing_groups??[]).flatMap(e=>e.pricings??[])])),A=e.computed(()=>T.value.filter(e=>b.value.includes(e.id)));let D;e.watch(b,e=>{if(clearTimeout(D),0===e.length)return w.value=void 0,void(B.value=!1);B.value=!0,D=setTimeout(()=>{w.value=(e=>{const t=e.reduce((e,t)=>e+(y[t]??0),0),n=Math.round(.21*t*100)/100,a=t+n;return{invoice:{tax_summary:{base_amount:v(t),tax_amount:v(n),total_amount:v(a),country_code:"NL"}},first_invoice:{},invoice_infos:[]}})(e).invoice,B.value=!1},400)});const I=e=>{b.value.includes(e)?b.value=b.value.filter(t=>t!==e):b.value=[...b.value,e]},M=e.computed(()=>b.value.length>0&&!!k.value),P=e.ref(void 0),j=async()=>{if(M.value){x.value=!0,P.value=void 0;try{const e=A.value.map(e=>{var t,n;return null==(n=null==(t=e.items)?void 0:t[0])?void 0:n.id}).filter(e=>!!e),t=k.value&&k.value.startsWith("pmet_")?k.value:void 0,n=await g({scheduleId:C.value.pricing_plan_schedule_id,pricingPlanVersionId:C.value.pricing_plan_version_id,pricingItemIds:e,finalizeImmediately:!0,paymentMethodId:t});t?N.value=!0:m({action:"pay-invoice",data:{invoiceId:n.id}})}catch{P.value=s({defaultMessage:"Something went wrong. Please try again.",id:"upgrade_subscription.purchase_error",description:"Error message shown when the purchase call fails on the upgrade subscription page"})}finally{x.value=!1}}};return(c,u)=>N.value?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(e.unref(t._sfc_main),null,{default:e.withCtx(()=>[e.createElementVNode("div",R,[e.createVNode(e.unref(n._sfc_main$1),{icon:"check_circle",class:"text-green-400",size:"lg"}),e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"span",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Payment successful",id:"upgrade_subscription.success.title",description:"Title shown after a successful add-on purchase"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",shade:"lighter",tag:"span",class:"mt-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Your add-ons have been activated.",id:"upgrade_subscription.success.subtitle",description:"Subtitle shown after a successful add-on purchase"})),1)]),_:1})])]),_:1})])):(e.openBlock(),e.createBlock(e.unref(d.ContentWithAsideLayout),{key:1},{content:e.withCtx(()=>[E.value.length>0?(e.openBlock(),e.createBlock(S,{key:0,categories:E.value,"selected-pricing-ids":b.value,onToggle:I},null,8,["categories","selected-pricing-ids"])):(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:1,variant:"body-sm",shade:"lighter",class:"p-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"No on-demand add-ons are available for this subscription.",id:"upgrade_subscription.empty_state",description:"Shown when there are no on-demand add-ons available for the subscription"})),1)]),_:1})),e.createVNode(e.unref(a._sfc_main),{spacing:"sm"}),e.createVNode($,{"customer-id":h.value,"subscription-id":o.configuration.subscriptionId,"selected-id":k.value,onSelect:u[0]||(u[0]=e=>k.value=e)},null,8,["customer-id","subscription-id","selected-id"])]),aside:e.withCtx(()=>[e.createVNode(V,{"selected-pricings":A.value,invoice:w.value,"is-pending":B.value},null,8,["selected-pricings","invoice","is-pending"]),P.value?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,title:P.value},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(n._sfc_main),{size:"lg",class:"full-width",type:"button",disabled:!M.value||x.value,loading:x.value,onClick:j},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Purchase",id:"upgrade_subscription.purchase_button.label",description:"Label for the purchase button on the upgrade subscription page"})),1)]),_:1},8,["disabled","loading"]),e.createVNode(e.unref(r._sfc_main),{tag:"div",variant:"body-sm",shade:"lighter",class:"flex grow justify-center"},{default:e.withCtx(()=>[e.createVNode(l._sfc_main$1,{icon:"lock",kpi:e.unref(s)({defaultMessage:"Secure and encrypted payments",id:"upgrade_subscription.kpi.encrypted_payments.label",description:"The encrypted payments KPI shown on the upgrade subscription page"})},null,8,["kpi"])]),_:1})]),_:1}))}}),Y=e.defineComponent({__name:"UpgradeSubscription.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:t=>(n,a)=>{var i,o,l,c;return e.openBlock(),e.createBlock(r._sfc_main$1,{"custom-element-name":e.unref(W),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(o=null==(i=t.branding)?void 0:i.colors)?void 0:o.primary,"secondary-color":null==(c=null==(l=t.branding)?void 0:l.colors)?void 0:c.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:a[0]||(a[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(U,{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"])}}),G=r.defineCustomElement(Y),W=r.getComponentName("upgrade-subscription");exports.COMPONENT_NAME=W,exports.SolvimonUpgradeSubscription=G,exports.defineSolvimonUpgradeSubscription=()=>{customElements.get(W)||customElements.define(W,G)};
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createVNode, createTextVNode, toDisplayString, createElementBlock, Fragment, createElementVNode, renderList, createCommentVNode, normalizeClass, ref, onMounted, watch } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { _ as _sfc_main$
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { u as
|
|
2
|
+
import { _ as _sfc_main$6 } from "../../Section.vue.es-3-H1pUTB.mjs";
|
|
3
|
+
import { _ as _sfc_main$9, a as _sfc_main$b } from "../../Button.vue.es-6sBk5tBL.mjs";
|
|
4
|
+
import { _ as _sfc_main$e } from "../../Divider.vue.es-wKkIVBgb.mjs";
|
|
5
|
+
import { _ as _sfc_main$c } from "../../ErrorNotification.vue.es-Bgw0MIl8.mjs";
|
|
6
|
+
import { a as useIntl, _ as _sfc_main$7, c as createRequestService, u as useConfig, b as _sfc_main$f, d as defineCustomElement, g as getComponentName } from "../../component-dpA83LIN.mjs";
|
|
7
|
+
import { a as formatAmount } from "../../formatting.es-D5H_ySFv.mjs";
|
|
8
|
+
import { _ as _sfc_main$8, a as _sfc_main$d } from "../../PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs";
|
|
9
|
+
import { _ as _sfc_main$a } from "../../PaymentMethod.vue.es-nXZoQjG3.mjs";
|
|
10
|
+
import { c as createPaymentMethodsService } from "../../paymentMethods-C-ApE-G4.mjs";
|
|
11
|
+
import { u as usePortal, C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-Ct24RV-2.mjs";
|
|
12
|
+
import { u as useActionDispatchProvider } from "../../useActionDispatchProvider-eO2qFPGv.mjs";
|
|
7
13
|
const mockSubscriptionGetResponse = {
|
|
8
14
|
id: "ppsu_hwDeeN0vhvcVCsAIdp1G",
|
|
9
15
|
pricing_plan_schedule_infos: [
|
|
@@ -249,11 +255,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
249
255
|
return (_f = (_e = (_d = (_c = (_b = (_a = pricing.items) == null ? void 0 : _a[0]) == null ? void 0 : _b.configs) == null ? void 0 : _c[0]) == null ? void 0 : _d.bands) == null ? void 0 : _e[0]) == null ? void 0 : _f.fixed_amount;
|
|
250
256
|
};
|
|
251
257
|
return (_ctx, _cache) => {
|
|
252
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
258
|
+
return openBlock(), createBlock(unref(_sfc_main$6), null, {
|
|
253
259
|
default: withCtx(() => {
|
|
254
260
|
var _a;
|
|
255
261
|
return [
|
|
256
|
-
createVNode(unref(_sfc_main$
|
|
262
|
+
createVNode(unref(_sfc_main$7), {
|
|
257
263
|
variant: "heading-3",
|
|
258
264
|
tag: "h2",
|
|
259
265
|
class: "mb-3"
|
|
@@ -267,7 +273,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
267
273
|
]),
|
|
268
274
|
_: 1
|
|
269
275
|
}),
|
|
270
|
-
isEmpty.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
276
|
+
isEmpty.value ? (openBlock(), createBlock(unref(_sfc_main$7), {
|
|
271
277
|
key: 0,
|
|
272
278
|
variant: "body-sm",
|
|
273
279
|
shade: "lighter"
|
|
@@ -288,7 +294,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
288
294
|
class: "flex items-center justify-between"
|
|
289
295
|
}, [
|
|
290
296
|
createElementVNode("div", null, [
|
|
291
|
-
createVNode(unref(_sfc_main$
|
|
297
|
+
createVNode(unref(_sfc_main$7), { variant: "body-sm" }, {
|
|
292
298
|
default: withCtx(() => {
|
|
293
299
|
var _a2, _b;
|
|
294
300
|
return [
|
|
@@ -297,7 +303,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
297
303
|
}),
|
|
298
304
|
_: 2
|
|
299
305
|
}, 1024),
|
|
300
|
-
createVNode(unref(_sfc_main$
|
|
306
|
+
createVNode(unref(_sfc_main$7), {
|
|
301
307
|
variant: "body-xs",
|
|
302
308
|
shade: "lighter"
|
|
303
309
|
}, {
|
|
@@ -311,7 +317,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
311
317
|
_: 1
|
|
312
318
|
})
|
|
313
319
|
]),
|
|
314
|
-
getPrice(pricing) ? (openBlock(), createBlock(unref(_sfc_main$
|
|
320
|
+
getPrice(pricing) ? (openBlock(), createBlock(unref(_sfc_main$7), {
|
|
315
321
|
key: 0,
|
|
316
322
|
variant: "body-sm"
|
|
317
323
|
}, {
|
|
@@ -326,7 +332,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
326
332
|
((_a = __props.invoice) == null ? void 0 : _a.tax_summary) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
327
333
|
createElementVNode("div", _hoisted_2$2, [
|
|
328
334
|
createElementVNode("div", _hoisted_3$1, [
|
|
329
|
-
createVNode(unref(_sfc_main$
|
|
335
|
+
createVNode(unref(_sfc_main$7), {
|
|
330
336
|
variant: "body-sm",
|
|
331
337
|
shade: "lighter"
|
|
332
338
|
}, {
|
|
@@ -339,7 +345,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
339
345
|
]),
|
|
340
346
|
_: 1
|
|
341
347
|
}),
|
|
342
|
-
createVNode(unref(_sfc_main$
|
|
348
|
+
createVNode(unref(_sfc_main$7), { variant: "body-sm" }, {
|
|
343
349
|
default: withCtx(() => [
|
|
344
350
|
createTextVNode(toDisplayString(unref(formatAmount)(__props.invoice.tax_summary.base_amount)), 1)
|
|
345
351
|
]),
|
|
@@ -347,7 +353,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
347
353
|
})
|
|
348
354
|
]),
|
|
349
355
|
createElementVNode("div", _hoisted_4$1, [
|
|
350
|
-
createVNode(unref(_sfc_main$
|
|
356
|
+
createVNode(unref(_sfc_main$7), {
|
|
351
357
|
variant: "body-sm",
|
|
352
358
|
shade: "lighter"
|
|
353
359
|
}, {
|
|
@@ -360,7 +366,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
360
366
|
]),
|
|
361
367
|
_: 1
|
|
362
368
|
}),
|
|
363
|
-
createVNode(unref(_sfc_main$
|
|
369
|
+
createVNode(unref(_sfc_main$7), { variant: "body-sm" }, {
|
|
364
370
|
default: withCtx(() => [
|
|
365
371
|
createTextVNode(toDisplayString(unref(formatAmount)(__props.invoice.tax_summary.tax_amount)), 1)
|
|
366
372
|
]),
|
|
@@ -369,7 +375,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
369
375
|
])
|
|
370
376
|
]),
|
|
371
377
|
createElementVNode("div", _hoisted_5$1, [
|
|
372
|
-
createVNode(unref(_sfc_main$
|
|
378
|
+
createVNode(unref(_sfc_main$7), {
|
|
373
379
|
variant: "body-sm",
|
|
374
380
|
weight: "semibold"
|
|
375
381
|
}, {
|
|
@@ -382,7 +388,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
382
388
|
]),
|
|
383
389
|
_: 1
|
|
384
390
|
}),
|
|
385
|
-
createVNode(unref(_sfc_main$
|
|
391
|
+
createVNode(unref(_sfc_main$7), {
|
|
386
392
|
variant: "body-sm",
|
|
387
393
|
weight: "semibold"
|
|
388
394
|
}, {
|
|
@@ -428,17 +434,17 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
428
434
|
})}` : ""
|
|
429
435
|
);
|
|
430
436
|
return (_ctx, _cache) => {
|
|
431
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
437
|
+
return openBlock(), createBlock(unref(_sfc_main$6), {
|
|
432
438
|
"content-background": __props.selected ? "none" : "gray",
|
|
433
439
|
class: normalizeClass({ "!bg-white": __props.selected })
|
|
434
440
|
}, {
|
|
435
441
|
default: withCtx(() => [
|
|
436
|
-
createVNode(_sfc_main$
|
|
442
|
+
createVNode(_sfc_main$8, {
|
|
437
443
|
name: title.value,
|
|
438
444
|
description: description.value
|
|
439
445
|
}, {
|
|
440
446
|
default: withCtx(() => [
|
|
441
|
-
__props.selected ? (openBlock(), createBlock(unref(_sfc_main$
|
|
447
|
+
__props.selected ? (openBlock(), createBlock(unref(_sfc_main$9), {
|
|
442
448
|
key: 0,
|
|
443
449
|
color: "gray",
|
|
444
450
|
variant: "outline",
|
|
@@ -454,7 +460,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
454
460
|
})), 1)
|
|
455
461
|
]),
|
|
456
462
|
_: 1
|
|
457
|
-
})) : (openBlock(), createBlock(unref(_sfc_main$
|
|
463
|
+
})) : (openBlock(), createBlock(unref(_sfc_main$9), {
|
|
458
464
|
key: 1,
|
|
459
465
|
color: "primary",
|
|
460
466
|
size: "sm",
|
|
@@ -499,7 +505,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
499
505
|
key: category.id ?? category.display_order,
|
|
500
506
|
class: "flex flex-col gap-2"
|
|
501
507
|
}, [
|
|
502
|
-
createVNode(unref(_sfc_main$
|
|
508
|
+
createVNode(unref(_sfc_main$7), {
|
|
503
509
|
variant: "heading-3",
|
|
504
510
|
tag: "h2"
|
|
505
511
|
}, {
|
|
@@ -524,7 +530,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
524
530
|
return openBlock(), createElementBlock(Fragment, {
|
|
525
531
|
key: group.id
|
|
526
532
|
}, [
|
|
527
|
-
createVNode(unref(_sfc_main$
|
|
533
|
+
createVNode(unref(_sfc_main$7), {
|
|
528
534
|
variant: "body-sm",
|
|
529
535
|
weight: "semibold",
|
|
530
536
|
class: "mt-2"
|
|
@@ -620,7 +626,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
620
626
|
return (_ctx, _cache) => {
|
|
621
627
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
622
628
|
savedMethods.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
623
|
-
createVNode(unref(_sfc_main$
|
|
629
|
+
createVNode(unref(_sfc_main$7), {
|
|
624
630
|
variant: "heading-3",
|
|
625
631
|
tag: "h2"
|
|
626
632
|
}, {
|
|
@@ -635,14 +641,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
635
641
|
}),
|
|
636
642
|
createElementVNode("div", _hoisted_3, [
|
|
637
643
|
(openBlock(true), createElementBlock(Fragment, null, renderList(savedMethods.value, (method) => {
|
|
638
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
644
|
+
return openBlock(), createBlock(unref(_sfc_main$6), {
|
|
639
645
|
key: method.id,
|
|
640
646
|
"content-background": __props.selectedId === method.id ? "none" : "gray",
|
|
641
647
|
class: normalizeClass([{ "!bg-white": __props.selectedId === method.id }, "cursor-pointer"]),
|
|
642
648
|
onClick: ($event) => emit("select", method.id)
|
|
643
649
|
}, {
|
|
644
650
|
default: withCtx(() => [
|
|
645
|
-
createVNode(unref(_sfc_main$
|
|
651
|
+
createVNode(unref(_sfc_main$a), { "payment-method": method }, null, 8, ["payment-method"])
|
|
646
652
|
]),
|
|
647
653
|
_: 2
|
|
648
654
|
}, 1032, ["content-background", "class", "onClick"]);
|
|
@@ -650,7 +656,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
650
656
|
])
|
|
651
657
|
])) : createCommentVNode("", true),
|
|
652
658
|
newOptions.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
653
|
-
createVNode(unref(_sfc_main$
|
|
659
|
+
createVNode(unref(_sfc_main$7), {
|
|
654
660
|
variant: "heading-3",
|
|
655
661
|
tag: "h2"
|
|
656
662
|
}, {
|
|
@@ -665,7 +671,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
665
671
|
}),
|
|
666
672
|
createElementVNode("div", _hoisted_5, [
|
|
667
673
|
(openBlock(true), createElementBlock(Fragment, null, renderList(newOptions.value, (option) => {
|
|
668
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
674
|
+
return openBlock(), createBlock(unref(_sfc_main$6), {
|
|
669
675
|
key: option.adyen.type,
|
|
670
676
|
"content-background": __props.selectedId === option.adyen.type ? "none" : "gray",
|
|
671
677
|
class: normalizeClass([{ "!bg-white": __props.selectedId === option.adyen.type }, "cursor-pointer"]),
|
|
@@ -689,7 +695,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
689
695
|
class: "h-9 w-9 object-contain"
|
|
690
696
|
}, null, 8, _hoisted_10)
|
|
691
697
|
])),
|
|
692
|
-
createVNode(unref(_sfc_main$
|
|
698
|
+
createVNode(unref(_sfc_main$7), { variant: "body-sm" }, {
|
|
693
699
|
default: withCtx(() => [
|
|
694
700
|
createTextVNode(toDisplayString(option.name), 1)
|
|
695
701
|
]),
|
|
@@ -832,15 +838,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
832
838
|
};
|
|
833
839
|
return (_ctx, _cache) => {
|
|
834
840
|
return isPurchased.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
835
|
-
createVNode(unref(_sfc_main$
|
|
841
|
+
createVNode(unref(_sfc_main$6), null, {
|
|
836
842
|
default: withCtx(() => [
|
|
837
843
|
createElementVNode("div", _hoisted_2, [
|
|
838
|
-
createVNode(unref(_sfc_main$
|
|
844
|
+
createVNode(unref(_sfc_main$b), {
|
|
839
845
|
icon: "check_circle",
|
|
840
846
|
class: "text-green-400",
|
|
841
847
|
size: "lg"
|
|
842
848
|
}),
|
|
843
|
-
createVNode(unref(_sfc_main$
|
|
849
|
+
createVNode(unref(_sfc_main$7), {
|
|
844
850
|
variant: "heading-3",
|
|
845
851
|
tag: "span",
|
|
846
852
|
class: "mt-2"
|
|
@@ -854,7 +860,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
854
860
|
]),
|
|
855
861
|
_: 1
|
|
856
862
|
}),
|
|
857
|
-
createVNode(unref(_sfc_main$
|
|
863
|
+
createVNode(unref(_sfc_main$7), {
|
|
858
864
|
variant: "body-sm",
|
|
859
865
|
shade: "lighter",
|
|
860
866
|
tag: "span",
|
|
@@ -880,7 +886,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
880
886
|
categories: categories.value,
|
|
881
887
|
"selected-pricing-ids": selectedPricingIds.value,
|
|
882
888
|
onToggle: handleToggle
|
|
883
|
-
}, null, 8, ["categories", "selected-pricing-ids"])) : (openBlock(), createBlock(unref(_sfc_main$
|
|
889
|
+
}, null, 8, ["categories", "selected-pricing-ids"])) : (openBlock(), createBlock(unref(_sfc_main$7), {
|
|
884
890
|
key: 1,
|
|
885
891
|
variant: "body-sm",
|
|
886
892
|
shade: "lighter",
|
|
@@ -895,7 +901,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
895
901
|
]),
|
|
896
902
|
_: 1
|
|
897
903
|
})),
|
|
898
|
-
createVNode(unref(_sfc_main$
|
|
904
|
+
createVNode(unref(_sfc_main$e), { spacing: "sm" }),
|
|
899
905
|
createVNode(_sfc_main$2, {
|
|
900
906
|
"customer-id": customerId.value,
|
|
901
907
|
"subscription-id": __props.configuration.subscriptionId,
|
|
@@ -909,11 +915,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
909
915
|
invoice: previewInvoice.value,
|
|
910
916
|
"is-pending": isPreviewPending.value
|
|
911
917
|
}, null, 8, ["selected-pricings", "invoice", "is-pending"]),
|
|
912
|
-
purchaseError.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
918
|
+
purchaseError.value ? (openBlock(), createBlock(unref(_sfc_main$c), {
|
|
913
919
|
key: 0,
|
|
914
920
|
title: purchaseError.value
|
|
915
921
|
}, null, 8, ["title"])) : createCommentVNode("", true),
|
|
916
|
-
createVNode(unref(_sfc_main$
|
|
922
|
+
createVNode(unref(_sfc_main$9), {
|
|
917
923
|
size: "lg",
|
|
918
924
|
class: "full-width",
|
|
919
925
|
type: "button",
|
|
@@ -930,14 +936,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
930
936
|
]),
|
|
931
937
|
_: 1
|
|
932
938
|
}, 8, ["disabled", "loading"]),
|
|
933
|
-
createVNode(unref(_sfc_main$
|
|
939
|
+
createVNode(unref(_sfc_main$7), {
|
|
934
940
|
tag: "div",
|
|
935
941
|
variant: "body-sm",
|
|
936
942
|
shade: "lighter",
|
|
937
943
|
class: "flex grow justify-center"
|
|
938
944
|
}, {
|
|
939
945
|
default: withCtx(() => [
|
|
940
|
-
createVNode(_sfc_main$
|
|
946
|
+
createVNode(_sfc_main$d, {
|
|
941
947
|
icon: "lock",
|
|
942
948
|
kpi: unref($t)({
|
|
943
949
|
defaultMessage: "Secure and encrypted payments",
|
|
@@ -977,7 +983,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
977
983
|
setup(__props) {
|
|
978
984
|
return (_ctx, _cache) => {
|
|
979
985
|
var _a, _b, _c, _d;
|
|
980
|
-
return openBlock(), createBlock(_sfc_main$
|
|
986
|
+
return openBlock(), createBlock(_sfc_main$f, {
|
|
981
987
|
"custom-element-name": unref(COMPONENT_NAME),
|
|
982
988
|
environment: __props.environment,
|
|
983
989
|
locale: __props.locale,
|
package/dist/solvimon-web.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '[data-v-afd5600c].tiptap h1,.editor-content-typography[data-v-afd5600c]h1{margin-top: 0px;font-size: 2.1428571em;font-weight: 700;line-height: 1.2;}[data-v-afd5600c].tiptap h2,.editor-content-typography[data-v-afd5600c]h2{margin-top: 0px;font-size: 1.5em;font-weight: 700;line-height: 1.3333333;}[data-v-afd5600c].tiptap h3,.editor-content-typography[data-v-afd5600c]h3{margin-top: 0px;font-size: 1.2857143em;font-weight: 600;line-height: 1.4444444;}[data-v-afd5600c].tiptap h4,.editor-content-typography[data-v-afd5600c]h4{margin-top: 0px;font-size: 1.1em;font-weight: 600;line-height: 1.4444444;}[data-v-afd5600c].tiptap p,.editor-content-typography[data-v-afd5600c]p{margin-top: 0px;line-height: 1.45;--tw-text-opacity: 1;color: rgb(71 85 105/var(--tw-text-opacity,1));}[data-v-afd5600c].tiptap ul,[data-v-afd5600c].tiptap ol,.editor-content-typography[data-v-afd5600c]ul,.editor-content-typography[data-v-afd5600c]ol{margin-top: 0px;padding-left: 1.625em;}[data-v-afd5600c].tiptap ul,.editor-content-typography[data-v-afd5600c]ul{list-style-type: disc;}[data-v-afd5600c].tiptap ol,.editor-content-typography[data-v-afd5600c]ol{list-style-type: decimal;}[data-v-afd5600c].tiptap li,.editor-content-typography[data-v-afd5600c]li{margin-top: 0.2em;line-height: 1.45;--tw-text-opacity: 1;color: rgb(71 85 105/var(--tw-text-opacity,1));}[data-v-afd5600c].tiptap blockquote,.editor-content-typography[data-v-afd5600c]blockquote{margin-top: 0px;margin-bottom: 1rem;border-left-width: 3px;--tw-border-opacity: 1;border-color: rgb(203 213 225/var(--tw-border-opacity,1));padding-left: 0.875rem;font-style: italic;line-height: 1.45;--tw-text-opacity: 1;color: rgb(100 116 139/var(--tw-text-opacity,1));}[data-v-afd5600c].tiptap blockquote p,.editor-content-typography[data-v-afd5600c]blockquote p{margin-bottom: 0px;color: inherit;}[data-v-afd5600c].tiptap pre,.editor-content-typography[data-v-afd5600c]pre{margin-top: 0px;margin-bottom: 1rem;white-space: pre-wrap;border-radius: 0.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-left: 0.75rem;padding-right: 0.75rem;padding-top: 0.5rem;padding-bottom: 0.5rem;font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size: 0.875em;line-height: 1.5;--tw-text-opacity: 1;color: rgb(51 65 85/var(--tw-text-opacity,1));}[data-v-afd5600c].tiptap pre code,.editor-content-typography[data-v-afd5600c]pre code{background-color: transparent;padding: 0px;color: inherit;}[data-v-afd5600c].tiptap code:not(pre code),.editor-content-typography[data-v-afd5600c]code:not(pre code){border-radius: 0.25rem;--tw-bg-opacity: 1;background-color: rgb(241 245 249/var(--tw-bg-opacity,1));padding-left: 0.25rem;padding-right: 0.25rem;padding-top: 0.125rem;padding-bottom: 0.125rem;font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size: 0.875em;--tw-text-opacity: 1;color: rgb(51 65 85/var(--tw-text-opacity,1));}[data-v-afd5600c].tiptap a,.editor-content-typography[data-v-afd5600c]a{--tw-text-opacity: 1;color: rgb(37 99 235/var(--tw-text-opacity,1));text-decoration-line: none;}[data-v-afd5600c].tiptap a:hover,.editor-content-typography[data-v-afd5600c]a:hover{text-decoration-line: underline;}[data-v-afd5600c].tiptap>*:last-child,.editor-content-typography[data-v-afd5600c]*:last-child{margin-bottom: 0px;}[data-v-afd5600c].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));}';export default ".to-right-enter-active[data-v-ce4df87e],.to-right-leave-to[data-v-ce4df87e]{opacity: 0;transform: translateX(-10px);}.to-right-leave[data-v-ce4df87e],.to-right-enter-to[data-v-ce4df87e]{opacity: 1;transform: translateX(0);}.to-right-enter-active[data-v-ce4df87e],.to-right-leave-active[data-v-ce4df87e]{transition: all 250ms;}.to-left-enter-active[data-v-ce4df87e],.to-left-leave-to[data-v-ce4df87e]{opacity: 0;transform: translateX(10px);}.to-left-leave[data-v-ce4df87e],.to-left-enter-to[data-v-ce4df87e]{opacity: 1;transform: translateX(0);}.to-left-enter-active[data-v-ce4df87e],.to-left-leave-active[data-v-ce4df87e]{transition: all 250ms;}.to-top-enter-active[data-v-ce4df87e],.to-top-leave-to[data-v-ce4df87e]{opacity: 0;transform: translateY(10px);}.to-top-leave[data-v-ce4df87e],.to-top-enter-to[data-v-ce4df87e]{opacity: 1;transform: translateY(0);}.to-top-enter-active[data-v-ce4df87e],.to-top-leave-active[data-v-ce4df87e]{transition: all 250ms;}.to-bottom-enter-active[data-v-ce4df87e],.to-bottom-leave-to[data-v-ce4df87e]{opacity: 0;transform: translateY(-10px);}.to-bottom-leave[data-v-ce4df87e],.to-bottom-enter-to[data-v-ce4df87e]{opacity: 1;transform: translateY(0);}.to-bottom-enter-active[data-v-ce4df87e],.to-bottom-leave-active[data-v-ce4df87e]{transition: all 250ms;}.expand-enter-active,.expand-leave-active{transition: height 300ms ease-in-out;overflow: hidden;}.expand-enter,.expand-leave-to{height: 0;}input[type='range']{-webkit-appearance: none;-moz-appearance: none;appearance: none;width: 100%;background: transparent;margin: 0.5rem 0;}input[type='range']::-webkit-slider-thumb{-webkit-appearance: none;appearance: none;width: 1rem;height: 1rem;border: 2px solid rgb(229 231 235);border-radius: 50%;background: #ffffff;box-shadow: 0 1px 3px 0 rgba(0,0,0,0.3);cursor: pointer;-webkit-transition: all 0.1s ease-in-out;transition: all 0.1s ease-in-out;}input[type='range']:disabled::-webkit-slider-thumb{cursor: not-allowed;}input[type='range']::-moz-range-thumb{-moz-appearance: none;appearance: none;width: 1rem;height: 1rem;border: 2px solid rgb(229 231 235);border-radius: 50%;background: #ffffff;box-shadow: 0 1px 3px 0 rgba(0,0,0,0.3);cursor: pointer;-moz-transition: all 0.1s ease-in-out;transition: all 0.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: 0.5rem;cursor: pointer;background: linear-gradient(to right,var(--color-primary-600)var(--range-percentage,0%),n#e0e5eb var(--range-percentage, 0%)n);border-radius: 0.25rem;}input[type='range']:disabled::-webkit-slider-runnable-track{background: #e0e5eb;cursor: not-allowed;}input[type='range']::-moz-range-track{width: 100%;height: 0.5rem;cursor: pointer;background: linear-gradient(to right,var(--color-primary-600)var(--range-percentage,0%),n#e0e5eb var(--range-percentage, 0%)n);border-radius: 0.25rem;}input[type='range']:disabled::-moz-range-track{background: #e0e5eb;cursor: not-allowed;}input[type='range'].range-sm::-webkit-slider-thumb{width: 0.8rem;height: 0.8rem;margin-top:-0.2rem;}input[type='range'].range-sm::-moz-range-thumb{width: 0.8rem;height: 0.8rem;}input[type='range'].range-sm::-webkit-slider-runnable-track{height: 0.4rem;border-radius: 0.2rem;}input[type='range'].range-sm::-moz-range-track{height: 0.4rem;border-radius: 0.2rem;}input[type='range'].range-md::-webkit-slider-thumb{width: 1rem;height: 1rem;margin-top:-0.25rem;}input[type='range'].range-md::-moz-range-thumb{width: 1rem;height: 1rem;}input[type='range'].range-md::-webkit-slider-runnable-track{height: 0.5rem;border-radius: 0.25rem;}input[type='range'].range-md::-moz-range-track{height: 0.5rem;border-radius: 0.25rem;}input[type='range'].range-lg::-webkit-slider-thumb{width: 1.4rem;height: 1.4rem;margin-top:-0.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: 0.7rem;border-radius: 0.35rem;}input[type='range'].range-lg::-moz-range-track{height: 0.7rem;border-radius: 0.35rem;}input[type='range'].range-xl::-webkit-slider-thumb{width: 1.8rem;height: 1.8rem;margin-top:-0.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: 0.9rem;border-radius: 0.45rem;}input[type='range'].range-xl::-moz-range-track{height: 0.9rem;border-radius: 0.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;}.slide-left-enter-active[data-v-1a3d5742],.slide-left-leave-active[data-v-1a3d5742]{transition: all 0.5s ease;}.slide-left-enter-from[data-v-1a3d5742],.slide-left-leave-to[data-v-1a3d5742]{opacity: 0;transform: translateX(30px);}.slide-right-enter-active[data-v-1a3d5742],.slide-right-leave-active[data-v-1a3d5742]{transition: all 0.5s ease;}.slide-right-enter-from[data-v-1a3d5742],.slide-right-leave-to[data-v-1a3d5742]{opacity: 0;transform: translateX(-30px);}.slide-top-enter-active[data-v-1a3d5742],.slide-top-leave-active[data-v-1a3d5742]{transition: all 0.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 0.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 0.5s ease;}.fade-enter-from[data-v-1a3d5742],.fade-leave-to[data-v-1a3d5742]{opacity: 0;}.animated-gradient[data-v-f1f0dadf]{background: repeating-linear-gradient(to right,rgba(255,255,255,0)0%,rgba(255,255,255,0.75)50%,rgba(255,255,255,0)100%);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;}100%{background-position:-200% 0;}}.nested-conditions-border::before{background-image: url(\"data:image/svg+xml,%3Csvg width='4' height='5' fill='none' xmlns='http:}.conditions-root:focus-within>.conditions-with-context-menu[data-v-8d2c7588],.conditions-root:hover>.conditions-with-context-menu[data-v-8d2c7588]{padding-right: 3rem;}.conditions-root:focus-within>.conditions-with-context-menu+.context-menu-wrapper[data-v-8d2c7588],.conditions-root:hover>.conditions-with-context-menu+.context-menu-wrapper[data-v-8d2c7588]{opacity: 1;}";{}
|
|
1
|
+
export default ".expand-enter-active,.expand-leave-active{transition: height 300ms ease-in-out;overflow: hidden;}.expand-enter,.expand-leave-to{height: 0;}";export default "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;}";export default "input[type='range']{-webkit-appearance: none;-moz-appearance: none;appearance: none;width: 100%;background: transparent;margin: 0.5rem 0;}input[type='range']::-webkit-slider-thumb{-webkit-appearance: none;appearance: none;width: 1rem;height: 1rem;border: 2px solid rgb(229 231 235);border-radius: 50%;background: #ffffff;box-shadow: 0 1px 3px 0 rgba(0,0,0,0.3);cursor: pointer;-webkit-transition: all 0.1s ease-in-out;transition: all 0.1s ease-in-out;}input[type='range']:disabled::-webkit-slider-thumb{cursor: not-allowed;}input[type='range']::-moz-range-thumb{-moz-appearance: none;appearance: none;width: 1rem;height: 1rem;border: 2px solid rgb(229 231 235);border-radius: 50%;background: #ffffff;box-shadow: 0 1px 3px 0 rgba(0,0,0,0.3);cursor: pointer;-moz-transition: all 0.1s ease-in-out;transition: all 0.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: 0.5rem;cursor: pointer;background: linear-gradient(to right,var(--color-primary-600)var(--range-percentage,0%),n#e0e5eb var(--range-percentage, 0%)n);border-radius: 0.25rem;}input[type='range']:disabled::-webkit-slider-runnable-track{background: #e0e5eb;cursor: not-allowed;}input[type='range']::-moz-range-track{width: 100%;height: 0.5rem;cursor: pointer;background: linear-gradient(to right,var(--color-primary-600)var(--range-percentage,0%),n#e0e5eb var(--range-percentage, 0%)n);border-radius: 0.25rem;}input[type='range']:disabled::-moz-range-track{background: #e0e5eb;cursor: not-allowed;}input[type='range'].range-sm::-webkit-slider-thumb{width: 0.8rem;height: 0.8rem;margin-top:-0.2rem;}input[type='range'].range-sm::-moz-range-thumb{width: 0.8rem;height: 0.8rem;}input[type='range'].range-sm::-webkit-slider-runnable-track{height: 0.4rem;border-radius: 0.2rem;}input[type='range'].range-sm::-moz-range-track{height: 0.4rem;border-radius: 0.2rem;}input[type='range'].range-md::-webkit-slider-thumb{width: 1rem;height: 1rem;margin-top:-0.25rem;}input[type='range'].range-md::-moz-range-thumb{width: 1rem;height: 1rem;}input[type='range'].range-md::-webkit-slider-runnable-track{height: 0.5rem;border-radius: 0.25rem;}input[type='range'].range-md::-moz-range-track{height: 0.5rem;border-radius: 0.25rem;}input[type='range'].range-lg::-webkit-slider-thumb{width: 1.4rem;height: 1.4rem;margin-top:-0.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: 0.7rem;border-radius: 0.35rem;}input[type='range'].range-lg::-moz-range-track{height: 0.7rem;border-radius: 0.35rem;}input[type='range'].range-xl::-webkit-slider-thumb{width: 1.8rem;height: 1.8rem;margin-top:-0.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: 0.9rem;border-radius: 0.45rem;}input[type='range'].range-xl::-moz-range-track{height: 0.9rem;border-radius: 0.45rem;}";export default ".to-right-enter-active[data-v-ce4df87e],.to-right-leave-to[data-v-ce4df87e]{opacity: 0;transform: translateX(-10px);}.to-right-leave[data-v-ce4df87e],.to-right-enter-to[data-v-ce4df87e]{opacity: 1;transform: translateX(0);}.to-right-enter-active[data-v-ce4df87e],.to-right-leave-active[data-v-ce4df87e]{transition: all 250ms;}.to-left-enter-active[data-v-ce4df87e],.to-left-leave-to[data-v-ce4df87e]{opacity: 0;transform: translateX(10px);}.to-left-leave[data-v-ce4df87e],.to-left-enter-to[data-v-ce4df87e]{opacity: 1;transform: translateX(0);}.to-left-enter-active[data-v-ce4df87e],.to-left-leave-active[data-v-ce4df87e]{transition: all 250ms;}.to-top-enter-active[data-v-ce4df87e],.to-top-leave-to[data-v-ce4df87e]{opacity: 0;transform: translateY(10px);}.to-top-leave[data-v-ce4df87e],.to-top-enter-to[data-v-ce4df87e]{opacity: 1;transform: translateY(0);}.to-top-enter-active[data-v-ce4df87e],.to-top-leave-active[data-v-ce4df87e]{transition: all 250ms;}.to-bottom-enter-active[data-v-ce4df87e],.to-bottom-leave-to[data-v-ce4df87e]{opacity: 0;transform: translateY(-10px);}.to-bottom-leave[data-v-ce4df87e],.to-bottom-enter-to[data-v-ce4df87e]{opacity: 1;transform: translateY(0);}.to-bottom-enter-active[data-v-ce4df87e],.to-bottom-leave-active[data-v-ce4df87e]{transition: all 250ms;}";export default ".conditions-root:focus-within>.conditions-with-context-menu[data-v-6310fe1d],.conditions-root:hover>.conditions-with-context-menu[data-v-6310fe1d]{padding-right: 3rem;}.conditions-root:focus-within>.conditions-with-context-menu+.context-menu-wrapper[data-v-6310fe1d],.conditions-root:hover>.conditions-with-context-menu+.context-menu-wrapper[data-v-6310fe1d]{opacity: 1;}";export default ".nested-conditions-border::before{background-image: url(\"data:image/svg+xml,%3Csvg width='4' height='5' fill='none' xmlns='http:}";{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const i=require("./api.es-B4qAAJKr.js"),e=require("./component-ZRZIt3ZW.js"),r="/portal/pricing-plan-subscriptions";exports.createSubscriptionsService=function(){const n=e.useConfig(),_=e.createRequestService();return{getSubscription:function({id:e,expanded:c=!1}){const s=c?["pricing_plan_schedule_infos.id","pricing_plan_schedule_infos.pricing_plan_version_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_plan_id","pricing_plan_schedule_infos.pricing_plan_version.credit_types","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.product_category_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.product_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.entitlements.feature_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.configs.conditions.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.configs.wallet_grants.wallet_type_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_item_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_based.meter_value_calculation_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter_value_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.product_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.configs.conditions.meter_properties.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.configs.wallet_grants.wallet_type_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_item_ids","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_based.meter_value_calculation_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter_value_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_values.id","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties","pricing_plan_schedule_infos.pricing_plan_version.pricing_categories.pricing_groups.pricings.items.product_items.usage_metric.meter_value_calculation.meter.meter_properties.id"]:[];return _({url:`${n.apiUrls.config}${r}/${e}${i.serializeQueryParams(i.withExpand({expandParams:s}))}`})},getActiveSubscriptions:function({customerId:e,pagination:c}){const s=c??{},p=i.withExpand({initialParams:{customer_id:e,statuses:["ACTIVE"],type:"BILLING"},expandParams:["pricing_plan_schedule_infos.pricing_plan_version_id","pricing_plan_schedule_infos.pricing_plan_version.pricing_plan_id"]}),t=i.serializeQueryParams(i.withPagination(p,s));return _({url:`${n.apiUrls.config}${r}${t}`,isCollection:!0})}}};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as withExpand, s as serializeQueryParams, a as withPagination } from "./api.es-UkfpLiLL.mjs";
|
|
2
|
+
import { u as useConfig, c as createRequestService } from "./component-dpA83LIN.mjs";
|
|
2
3
|
const ENDPOINT = "/portal/pricing-plan-subscriptions";
|
|
3
4
|
function createSubscriptionsService() {
|
|
4
5
|
const config = useConfig();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports.isBandAmount=n=>!!n&&"amount"in n,exports.isBandCount=n=>!!n&&"count"in n,exports.isBandNumber=n=>!!n&&"number"in n,exports.isIndividual=n=>"INDIVIDUAL"===n.type,exports.isOrganization=n=>"ORGANIZATION"===n.type;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const isBandNumber = (data) => data ? "number" in data : false;
|
|
2
|
+
const isBandCount = (data) => data ? "count" in data : false;
|
|
3
|
+
const isBandAmount = (data) => data ? "amount" in data : false;
|
|
4
|
+
const isOrganization = (data) => data.type === "ORGANIZATION";
|
|
5
|
+
const isIndividual = (data) => data.type === "INDIVIDUAL";
|
|
6
|
+
export {
|
|
7
|
+
isOrganization as a,
|
|
8
|
+
isBandNumber as b,
|
|
9
|
+
isBandCount as c,
|
|
10
|
+
isBandAmount as d,
|
|
11
|
+
isIndividual as i
|
|
12
|
+
};
|
package/dist/{useActionDispatchProvider-DmTJ_bqE.js → useActionDispatchProvider-CWVV_xsi.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=require("vue"),i=require("./component-
|
|
1
|
+
const t=require("vue"),i=require("./component-ZRZIt3ZW.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}};
|
package/dist/{useActionDispatchProvider-zSXRlc2S.mjs → useActionDispatchProvider-eO2qFPGv.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-dpA83LIN.mjs";
|
|
3
3
|
function useActionDispatchProvider() {
|
|
4
4
|
const dispatchAction = inject(ACTION_DISPATCHER_PROVIDER_INJECTION_KEY);
|
|
5
5
|
if (!dispatchAction) {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
import { c as createCustomerService } from "./customer-CJrpbGX4.mjs";
|
|
3
|
+
import { u as useService } from "./useService-DG_zedHV.mjs";
|
|
4
|
+
function useCustomer({ customerId }) {
|
|
5
|
+
const { getCustomer, updateCustomer } = createCustomerService();
|
|
6
|
+
const customer = ref();
|
|
7
|
+
const { data: _getData, ...get } = useService({
|
|
8
|
+
service: async () => {
|
|
9
|
+
const result = await getCustomer(customerId);
|
|
10
|
+
customer.value = result;
|
|
11
|
+
return result;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
const { data: _updateData, ...update } = useService({
|
|
15
|
+
service: async (payload) => {
|
|
16
|
+
const result = await updateCustomer(customerId, payload);
|
|
17
|
+
customer.value = result;
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return { customer, get, update };
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
useCustomer as u
|
|
25
|
+
};
|