@solvimon/solvimon-web 0.1.0-alpha.1 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-VMlVPI4O.js → BillingInformation.vue_vue_type_script_setup_true_lang-BD3CrJzj.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-B42EzZ97.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DQAp1xwu.mjs} +2 -2
- package/dist/{ContentWithAsideLayout-BC-C5Gjt.mjs → ContentWithAsideLayout-CRsFr9TH.mjs} +1 -1
- package/dist/{ContentWithAsideLayout-CIVSoqFr.js → ContentWithAsideLayout-DczcgSrt.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-t6E9_dWJ.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BE3I7Oe1.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-5yBnSRap.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0ie9Krt.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CknZKCmY.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DVDOsMnT.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-8UxAr2hU.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-sNdlKgdU.js} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BCdv5DbH.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJEZEEwZ.mjs} +5 -5
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Sn1Jq19s.js +1 -0
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Bifo4jTH.js +1 -0
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-DWp42_G4.mjs +75 -0
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-BFFJw-5h.mjs → Skeleton.vue_vue_type_script_setup_true_lang-C-taYlG4.mjs} +5 -4
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DfB5BqiH.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-Bp5RvQVS.mjs} +5 -5
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DqZLFDCv.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-yyhwzYSM.js} +1 -1
- package/dist/auto-DzZuCneB.mjs +14387 -0
- package/dist/auto-PpnAChnH.js +6 -0
- package/dist/{cloneDeep-Hs8Pp07F.js → cloneDeep-DranHQkY.js} +1 -1
- package/dist/{component-BkmcE85U.mjs → component-DEo_ndpK.mjs} +92 -78
- package/dist/component-XHQYFLA_.js +1 -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 +96 -5
- 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 +582 -5
- 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 +132 -5
- 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 +580 -5
- 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 +127 -5
- 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 +102 -5
- 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 +131 -5
- 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 +236 -5
- 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 +150 -5
- 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 +132 -5
- package/dist/components/WalletBalances/WalletBalances.ce.d.ts +3 -0
- package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -0
- package/dist/{InvoiceDetails.entry.ce-Cnpz8CLJ.mjs → components/WalletBalances/WalletBalances.es.js} +41 -51
- package/dist/core/configuration.d.ts +2 -1
- package/dist/core/index.cjs.js +1 -1
- package/dist/core/index.es.js +1 -1
- package/dist/core/registry.d.ts +1 -1
- package/dist/core/types.d.ts +4 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +40 -34
- package/dist/invoices-BW1notiX.js +1 -0
- package/dist/{invoices-C31Wz1Bu.mjs → invoices-M5oYVch6.mjs} +1 -1
- package/dist/{paymentMethods-CzUqDlvc.js → paymentMethods-BX80t2zk.js} +1 -1
- package/dist/{paymentMethods-CrU4G_2Y.mjs → paymentMethods-CqKUfc3w.mjs} +1 -1
- package/dist/{payments-C3LPk9k9.js → payments-BHv4hCeJ.js} +1 -1
- package/dist/{payments-NtWI8KlU.mjs → payments-CosaPZwo.mjs} +1 -1
- package/dist/registry-BwKEYOf7.js +1 -0
- package/dist/registry-Cag1Jj7P.mjs +143 -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 +5140 -5
- 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 +134 -5
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +3 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -0
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +1012 -0
- package/dist/{subscriptions-3R7aMoky.mjs → subscriptions-Bs4DIE8f.mjs} +1 -1
- package/dist/{subscriptions-CqK7t-fF.js → subscriptions-CnxvsBXd.js} +1 -1
- package/dist/{useActionDispatchProvider-CBo_Hwu5.mjs → useActionDispatchProvider-CgRcOqv3.mjs} +1 -1
- package/dist/useActionDispatchProvider-Cru69mAl.js +1 -0
- package/dist/{useCustomer-Dp8sGHI0.js → useCustomer-B0NK96dA.js} +1 -1
- package/dist/{useCustomer-BRY0tuBH.mjs → useCustomer-DlcjY3fP.mjs} +2 -2
- package/dist/{useCustomerPaymentMethodOptions-Fe_dLxfv.mjs → useCustomerPaymentMethodOptions-BzEquyUV.mjs} +7 -6
- package/dist/{useCustomerPaymentMethodOptions-DYpMDnJR.js → useCustomerPaymentMethodOptions-C-8BLzqb.js} +1 -1
- package/dist/{useIncrementalLoading-fHCizCSo.mjs → useIncrementalLoading-C7ToTmZK.mjs} +9 -7
- package/dist/useIncrementalLoading-D60Vttil.js +1 -0
- package/dist/{useInvoiceData-dyvoDwFF.mjs → useInvoiceData-CcueV3We.mjs} +2 -2
- package/dist/{useInvoiceData-DImEH1ca.js → useInvoiceData-DstXfI7t.js} +1 -1
- package/dist/{useInvoicesList-rDvRzMqe.mjs → useInvoicesList-CXng3aUm.mjs} +4 -4
- package/dist/{useInvoicesList-BZQ9Y0qN.js → useInvoicesList-DmzjgMlW.js} +1 -1
- package/dist/{usePaymentMethods-Dbimodf0.js → usePaymentMethods-DCGVRXA4.js} +1 -1
- package/dist/{usePaymentMethods-Bq5fWl1Q.mjs → usePaymentMethods-Db-1R6rI.mjs} +2 -2
- package/dist/{useService-Dz13Nxbi.mjs → useService-B4qv5N2D.mjs} +14 -5
- package/dist/useService-D-CUtlp3.js +1 -0
- package/dist/useWalletBalanceItems-BZyiAhcV.js +1 -0
- package/dist/useWalletBalanceItems-CHkLaccm.mjs +105 -0
- package/package.json +16 -3
- package/dist/BillingInformation.entry.ce-1xVdsWlL.mjs +0 -99
- package/dist/BillingInformation.entry.ce-DkrfEvK_.js +0 -1
- package/dist/BillingInformationForm.entry.ce-MPMirEsk.js +0 -1
- package/dist/BillingInformationForm.entry.ce-xfT0Jqps.mjs +0 -579
- package/dist/Checkout.entry.ce-Bif6vR1K.mjs +0 -5185
- package/dist/Checkout.entry.ce-CkQnLAn4.js +0 -1
- package/dist/CustomerOverview.entry.ce-C__omsVl.js +0 -1
- package/dist/CustomerOverview.entry.ce-Ce_Yk8-i.mjs +0 -231
- package/dist/CustomerPaymentMethods.entry.ce-CZwy8Aqq.mjs +0 -135
- package/dist/CustomerPaymentMethods.entry.ce-DnjlRHPA.js +0 -1
- package/dist/Invoice.entry.ce-CdJ9TPZe.mjs +0 -583
- package/dist/Invoice.entry.ce-Cgr43ome.js +0 -1
- package/dist/InvoiceDetails.entry.ce-jHDyWra2.js +0 -1
- package/dist/InvoicesList.entry.ce-38iOW5qh.js +0 -1
- package/dist/InvoicesList.entry.ce-BBaHEtAD.mjs +0 -105
- package/dist/PaymentHistory.entry.ce-DDeHMhK_.js +0 -1
- package/dist/PaymentHistory.entry.ce-Dw2NiP4l.mjs +0 -134
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-xJ8kJbRo.js +0 -1
- package/dist/PaymentMethodForm.entry.ce-f4cFExKc.mjs +0 -238
- package/dist/PaymentMethodForm.entry.ce-zxeBXZW6.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CQqTurIt.js +0 -1
- package/dist/SubscriptionSchedules.entry.ce-B4T_yQC1.js +0 -1
- package/dist/SubscriptionSchedules.entry.ce-B4vQ7QLk.mjs +0 -153
- package/dist/SubscriptionsList.entry.ce-B5SJCQW0.js +0 -1
- package/dist/SubscriptionsList.entry.ce-cNYuQZZj.mjs +0 -135
- package/dist/auto-B_36W1Fc.js +0 -6
- package/dist/auto-BfMZdgp-.mjs +0 -14207
- package/dist/component-Df5eNqYX.js +0 -1
- package/dist/invoices-8M_3ur_U.js +0 -1
- package/dist/registry-By94DXE2.js +0 -1
- package/dist/registry-shRKDl3K.mjs +0 -127
- package/dist/useActionDispatchProvider-DsIljrhi.js +0 -1
- package/dist/useIncrementalLoading-D8oKNxX7.js +0 -1
- package/dist/useService-bNNi4GB8.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const n=require("./component-Df5eNqYX.js");exports.createInvoicesService=function(){const e=n.createRequestService(),i=n.useConfig();return{getInvoice:function(n){return e({url:`${i.apiUrls.transaction}/portal/invoices/${n}`})},getInvoices:function({customerId:t,pagination:r,query:o}){const a=n.withPagination({customer_id:t,...o??{}},r),c=new URL(`${i.apiUrls.transaction}/portal/invoices`);return Object.entries(a).forEach(([n,e])=>{null!=e&&(Array.isArray(e)?e.forEach(e=>{c.searchParams.append(`${n}[]`,`${e}`)}):c.searchParams.append(n,`${e}`))}),e({url:c.toString(),isCollection:!0})},getInvoicePdf:async function(t){return e({url:`${i.apiUrls.transaction}/portal/invoices/${t}/pdf`,options:{headers:{"Content-Type":"application/pdf"}}}).then(e=>{const i=new Blob([e],{type:"application/pdf"});n.downloadFile(i,`invoice-${t}.pdf`)})},getInvoicePreview:function({customer:n,pricingPlanSubscriptionId:t,startAt:r,customizations:o,pricing_plan_schedule_customizations:a}){return e({url:`${i.apiUrls.transaction}/portal/invoices/preview`,options:{method:"POST"},data:{template_pricing_plan_subscription_id:t,...r&&{start_at:r},...o&&{pricing_plan_schedule_customizations:o},...a&&{pricing_plan_schedule_customizations:a},customer_details:{...n,reference:"preview"}}})}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./PaymentMethodForm.entry.ce-zxeBXZW6.js"),n=require("./CustomerOverview.entry.ce-C__omsVl.js"),o=require("./Checkout.entry.ce-CkQnLAn4.js"),i=require("./Invoice.entry.ce-Cgr43ome.js"),t=require("./InvoiceDetails.entry.ce-jHDyWra2.js"),r=require("./InvoicesList.entry.ce-38iOW5qh.js"),s=require("./PaymentHistory.entry.ce-DDeHMhK_.js"),c=require("./SubscriptionsList.entry.ce-B5SJCQW0.js"),m=require("./SubscriptionSchedules.entry.ce-B4T_yQC1.js"),u=require("./CustomerPaymentMethods.entry.ce-DnjlRHPA.js"),f=require("./BillingInformation.entry.ce-DkrfEvK_.js"),a=require("./BillingInformationForm.entry.ce-MPMirEsk.js"),l=require("./component-Df5eNqYX.js"),d={"customer-overview":n.defineSolvimonCustomerOverview,checkout:o.defineSolvimonCheckout},v={invoice:i.defineSolvimonInvoice,"invoice-details":t.defineSolvimonInvoiceDetails,"invoices-list":r.defineSolvimonInvoicesList,"payment-history":s.defineSolvimonPaymentHistory,"subscriptions-list":c.defineSolvimonSubscriptionsList,"subscription-schedules":m.defineSolvimonSubscriptionSchedules,"customer-payment-methods":u.defineSolvimonCustomerPaymentMethods,"billing-information":f.defineSolvimonBillingInformation,"billing-information-form":a.defineSolvimonBillingInformationForm,"payment-method-form":e.defineSolvimonPaymentMethodForm};function y(e,n,o,i){const t=function(e){if("string"==typeof e){const n=document.querySelector(e);if(!n)throw new Error(`Solvimon: container not found for selector "${e}"`);return n}return e}(e);!function(e,n){const o="screen"===n?d[e]:v[e];if(!o)throw new Error(`Solvimon: unknown ${n} id "${e}". Registered ${n}s: ${Object.keys("screen"===n?d:v).join(", ")}.`);o()}(n,o);const r=(s=n,l.getComponentName(s));var s;const c=document.createElement(r);return function(e,n){const o=e;for(const[i,t]of Object.entries(n))void 0!==t&&(o[i]=t)}(c,i),t.appendChild(c),{unmount(){c.remove()}}}function p(e){const{container:n,...o}=e;return{container:n,props:o}}const S={"customer-overview":n._sfc_main,checkout:o._sfc_main},_={invoice:i._sfc_main,"invoice-details":t._sfc_main,"invoices-list":r._sfc_main,"payment-history":s._sfc_main,"subscriptions-list":c._sfc_main,"subscription-schedules":m._sfc_main,"customer-payment-methods":u._sfc_main,"billing-information":f._sfc_main,"billing-information-form":a._sfc_main,"payment-method-form":e._sfc_main};exports.createSolvimonCore=function(e={}){return{config:e,createComponent(n,o){const{container:i,props:t}=p(o);return y(i,n,"component",{...e,...t}).unmount},createScreen(n,o){const{container:i,props:t}=p(o);return y(i,n,"screen",{...e,...t}).unmount}}},exports.getRegisteredComponentIds=function(){return Object.keys(_)},exports.getRegisteredScreenIds=function(){return Object.keys(S)};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { d as defineSolvimonPaymentMethodForm, _ as _sfc_main } from "./PaymentMethodForm.entry.ce-f4cFExKc.mjs";
|
|
2
|
-
import { d as defineSolvimonCustomerOverview, _ as _sfc_main$b } from "./CustomerOverview.entry.ce-Ce_Yk8-i.mjs";
|
|
3
|
-
import { d as defineSolvimonCheckout, _ as _sfc_main$a } from "./Checkout.entry.ce-Bif6vR1K.mjs";
|
|
4
|
-
import { d as defineSolvimonInvoice, _ as _sfc_main$9 } from "./Invoice.entry.ce-CdJ9TPZe.mjs";
|
|
5
|
-
import { d as defineSolvimonInvoiceDetails, _ as _sfc_main$8 } from "./InvoiceDetails.entry.ce-Cnpz8CLJ.mjs";
|
|
6
|
-
import { d as defineSolvimonInvoicesList, _ as _sfc_main$7 } from "./InvoicesList.entry.ce-BBaHEtAD.mjs";
|
|
7
|
-
import { d as defineSolvimonPaymentHistory, _ as _sfc_main$6 } from "./PaymentHistory.entry.ce-Dw2NiP4l.mjs";
|
|
8
|
-
import { d as defineSolvimonSubscriptionsList, _ as _sfc_main$5 } from "./SubscriptionsList.entry.ce-cNYuQZZj.mjs";
|
|
9
|
-
import { d as defineSolvimonSubscriptionSchedules, _ as _sfc_main$4 } from "./SubscriptionSchedules.entry.ce-B4vQ7QLk.mjs";
|
|
10
|
-
import { d as defineSolvimonCustomerPaymentMethods, _ as _sfc_main$3 } from "./CustomerPaymentMethods.entry.ce-CZwy8Aqq.mjs";
|
|
11
|
-
import { d as defineSolvimonBillingInformation, _ as _sfc_main$2 } from "./BillingInformation.entry.ce-1xVdsWlL.mjs";
|
|
12
|
-
import { d as defineSolvimonBillingInformationForm, _ as _sfc_main$1 } from "./BillingInformationForm.entry.ce-xfT0Jqps.mjs";
|
|
13
|
-
import { n as getComponentName } from "./component-BkmcE85U.mjs";
|
|
14
|
-
const SCREEN_DEFINERS = {
|
|
15
|
-
"customer-overview": defineSolvimonCustomerOverview,
|
|
16
|
-
checkout: defineSolvimonCheckout
|
|
17
|
-
};
|
|
18
|
-
const COMPONENT_DEFINERS = {
|
|
19
|
-
invoice: defineSolvimonInvoice,
|
|
20
|
-
"invoice-details": defineSolvimonInvoiceDetails,
|
|
21
|
-
"invoices-list": defineSolvimonInvoicesList,
|
|
22
|
-
"payment-history": defineSolvimonPaymentHistory,
|
|
23
|
-
"subscriptions-list": defineSolvimonSubscriptionsList,
|
|
24
|
-
"subscription-schedules": defineSolvimonSubscriptionSchedules,
|
|
25
|
-
"customer-payment-methods": defineSolvimonCustomerPaymentMethods,
|
|
26
|
-
"billing-information": defineSolvimonBillingInformation,
|
|
27
|
-
"billing-information-form": defineSolvimonBillingInformationForm,
|
|
28
|
-
"payment-method-form": defineSolvimonPaymentMethodForm
|
|
29
|
-
};
|
|
30
|
-
function getCustomElementTagName(viewId) {
|
|
31
|
-
return getComponentName(viewId);
|
|
32
|
-
}
|
|
33
|
-
function ensureCustomElementDefined(viewId, type) {
|
|
34
|
-
const defineFn = type === "screen" ? SCREEN_DEFINERS[viewId] : COMPONENT_DEFINERS[viewId];
|
|
35
|
-
if (!defineFn) {
|
|
36
|
-
throw new Error(
|
|
37
|
-
`Solvimon: unknown ${type} id "${viewId}". Registered ${type}s: ${Object.keys(
|
|
38
|
-
type === "screen" ? SCREEN_DEFINERS : COMPONENT_DEFINERS
|
|
39
|
-
).join(", ")}.`
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
defineFn();
|
|
43
|
-
}
|
|
44
|
-
function resolveContainer(container) {
|
|
45
|
-
if (typeof container === "string") {
|
|
46
|
-
const el = document.querySelector(container);
|
|
47
|
-
if (!el) {
|
|
48
|
-
throw new Error(`Solvimon: container not found for selector "${container}"`);
|
|
49
|
-
}
|
|
50
|
-
return el;
|
|
51
|
-
}
|
|
52
|
-
return container;
|
|
53
|
-
}
|
|
54
|
-
function setElementProps(element, props) {
|
|
55
|
-
const el = element;
|
|
56
|
-
for (const [key, value] of Object.entries(props)) {
|
|
57
|
-
if (value === void 0) continue;
|
|
58
|
-
el[key] = value;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function mountSolvimonElement(container, id, type, props) {
|
|
62
|
-
const parent = resolveContainer(container);
|
|
63
|
-
ensureCustomElementDefined(id, type);
|
|
64
|
-
const tagName = getCustomElementTagName(id);
|
|
65
|
-
const element = document.createElement(tagName);
|
|
66
|
-
setElementProps(element, props);
|
|
67
|
-
parent.appendChild(element);
|
|
68
|
-
return {
|
|
69
|
-
unmount() {
|
|
70
|
-
element.remove();
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
function splitContainer(configuration) {
|
|
75
|
-
const { container, ...props } = configuration;
|
|
76
|
-
return { container, props };
|
|
77
|
-
}
|
|
78
|
-
function createSolvimonCore(config = {}) {
|
|
79
|
-
return {
|
|
80
|
-
config,
|
|
81
|
-
createComponent(id, configuration) {
|
|
82
|
-
const { container, props } = splitContainer(configuration);
|
|
83
|
-
return mountSolvimonElement(
|
|
84
|
-
container,
|
|
85
|
-
id,
|
|
86
|
-
"component",
|
|
87
|
-
{ ...config, ...props }
|
|
88
|
-
).unmount;
|
|
89
|
-
},
|
|
90
|
-
createScreen(id, configuration) {
|
|
91
|
-
const { container, props } = splitContainer(configuration);
|
|
92
|
-
return mountSolvimonElement(
|
|
93
|
-
container,
|
|
94
|
-
id,
|
|
95
|
-
"screen",
|
|
96
|
-
{ ...config, ...props }
|
|
97
|
-
).unmount;
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
const SCREENS = {
|
|
102
|
-
"customer-overview": _sfc_main$b,
|
|
103
|
-
checkout: _sfc_main$a
|
|
104
|
-
};
|
|
105
|
-
const COMPONENTS = {
|
|
106
|
-
invoice: _sfc_main$9,
|
|
107
|
-
"invoice-details": _sfc_main$8,
|
|
108
|
-
"invoices-list": _sfc_main$7,
|
|
109
|
-
"payment-history": _sfc_main$6,
|
|
110
|
-
"subscriptions-list": _sfc_main$5,
|
|
111
|
-
"subscription-schedules": _sfc_main$4,
|
|
112
|
-
"customer-payment-methods": _sfc_main$3,
|
|
113
|
-
"billing-information": _sfc_main$2,
|
|
114
|
-
"billing-information-form": _sfc_main$1,
|
|
115
|
-
"payment-method-form": _sfc_main
|
|
116
|
-
};
|
|
117
|
-
function getRegisteredScreenIds() {
|
|
118
|
-
return Object.keys(SCREENS);
|
|
119
|
-
}
|
|
120
|
-
function getRegisteredComponentIds() {
|
|
121
|
-
return Object.keys(COMPONENTS);
|
|
122
|
-
}
|
|
123
|
-
export {
|
|
124
|
-
getRegisteredScreenIds as a,
|
|
125
|
-
createSolvimonCore as c,
|
|
126
|
-
getRegisteredComponentIds as g
|
|
127
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=require("vue"),e=require("./component-Df5eNqYX.js");exports.useActionDispatchProvider=function(){const i=t.inject(e.ACTION_DISPATCHER_PROVIDER_INJECTION_KEY);if(!i)throw new Error("dispatchAction is not provided");return{dispatchAction:i}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./_Uint8Array-DxISR7XF.js"),a=require("./component-Df5eNqYX.js"),t=require("vue"),i=require("./cloneDeep-Hs8Pp07F.js");exports.useIncrementalLoading=function({initialData:n=[],service:u}){const s=t.ref(n),l=t.ref(e.ApiStatus.Initial),o=t.ref(null),r=t.ref(1),c=t.ref(!1),v=t.computed(()=>l.value===e.ApiStatus.Loading),p=async t=>{var i;if(!v.value)try{o.value=null,l.value=e.ApiStatus.Loading;const n=await u(t);if(!a.isApiSuccessCollectionResponse(n))return void(l.value=e.ApiStatus.Done);const v=n;c.value=!!(null==(i=v.links)?void 0:i.next),s.value=[...s.value,...v.data],l.value=e.ApiStatus.Done,r.value=t}catch(n){o.value=n,l.value=e.ApiStatus.Failed}};return{items:t.computed(()=>i.cloneDeep(s.value)),error:o,fetchInitial:async()=>await p(1),fetchMore:async()=>await p(r.value+1),fetchAll:async()=>{o.value=null,l.value=e.ApiStatus.Loading;const t=await a.getPaginatedFullList(async t=>{const i=await u(t);if(!a.isApiSuccessCollectionResponse(i))throw l.value=e.ApiStatus.Failed,new Error("message"in i?i.message:"Request failed");return i});s.value=t.data,l.value=e.ApiStatus.Done},isPending:v,hasNextBatch:c}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./_Uint8Array-DxISR7XF.js"),t=require("vue");function r(t){var r=-1,n=null==t?0:t.length;for(this.__data__=new e.MapCache;++r<n;)this.add(t[r])}function n(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}r.prototype.add=r.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},r.prototype.has=function(e){return this.__data__.has(e)};function a(e,t,a,i,u,o){var c=1&a,f=e.length,s=t.length;if(f!=s&&!(c&&s>f))return!1;var l=o.get(e),v=o.get(t);if(l&&v)return l==t&&v==e;var b=-1,p=!0,y=2&a?new r:void 0;for(o.set(e,t),o.set(t,e);++b<f;){var h=e[b],g=t[b];if(i)var d=c?i(g,h,b,t,e,o):i(h,g,b,e,t,o);if(void 0!==d){if(d)continue;p=!1;break}if(y){if(!n(t,function(e,t){if(r=t,!y.has(r)&&(h===e||u(h,e,a,i,o)))return y.push(t);var r})){p=!1;break}}else if(h!==g&&!u(h,g,a,i,o)){p=!1;break}}return o.delete(e),o.delete(t),p}function i(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function u(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var o=e.Symbol?e.Symbol.prototype:void 0,c=o?o.valueOf:void 0;var f=Object.prototype.hasOwnProperty;var s="[object Arguments]",l="[object Array]",v="[object Object]",b=Object.prototype.hasOwnProperty;function p(t,r,n,o,p,y){var h=e.isArray(t),g=e.isArray(r),d=h?l:e.getTag(t),_=g?l:e.getTag(r),j=(d=d==s?v:d)==v,w=(_=_==s?v:_)==v,A=d==_;if(A&&e.isBuffer(t)){if(!e.isBuffer(r))return!1;h=!0,j=!1}if(A&&!j)return y||(y=new e.Stack),h||e.isTypedArray(t)?a(t,r,n,o,p,y):function(t,r,n,o,f,s,l){switch(n){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!s(new e.Uint8Array(t),new e.Uint8Array(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return e.eq(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var v=i;case"[object Set]":var b=1&o;if(v||(v=u),t.size!=r.size&&!b)return!1;var p=l.get(t);if(p)return p==r;o|=2,l.set(t,r);var y=a(v(t),v(r),o,f,s,l);return l.delete(t),y;case"[object Symbol]":if(c)return c.call(t)==c.call(r)}return!1}(t,r,d,n,o,p,y);if(!(1&n)){var S=j&&b.call(t,"__wrapped__"),m=w&&b.call(r,"__wrapped__");if(S||m){var O=S?t.value():t,k=m?r.value():r;return y||(y=new e.Stack),p(O,k,n,o,y)}}return!!A&&(y||(y=new e.Stack),function(t,r,n,a,i,u){var o=1&n,c=e.getAllKeys(t),s=c.length;if(s!=e.getAllKeys(r).length&&!o)return!1;for(var l=s;l--;){var v=c[l];if(!(o?v in r:f.call(r,v)))return!1}var b=u.get(t),p=u.get(r);if(b&&p)return b==r&&p==t;var y=!0;u.set(t,r),u.set(r,t);for(var h=o;++l<s;){var g=t[v=c[l]],d=r[v];if(a)var _=o?a(d,g,v,r,t,u):a(g,d,v,t,r,u);if(!(void 0===_?g===d||i(g,d,n,a,u):_)){y=!1;break}h||(h="constructor"==v)}if(y&&!h){var j=t.constructor,w=r.constructor;j==w||!("constructor"in t)||!("constructor"in r)||"function"==typeof j&&j instanceof j&&"function"==typeof w&&w instanceof w||(y=!1)}return u.delete(t),u.delete(r),y}(t,r,n,o,p,y))}function y(t,r,n,a,i){return t===r||(null==t||null==r||!e.isObjectLike(t)&&!e.isObjectLike(r)?t!=t&&r!=r:p(t,r,n,a,y,i))}function h(e,t){(function(e,t){return y(e,t)})(e.value,t)||(e.value=t)}exports.useService=function({initialValue:r,service:n,isCollection:a=!1}){const i=t.ref(r),u=t.ref(e.ApiStatus.Initial),o=t.ref(null),c=t.computed(()=>u.value===e.ApiStatus.Loading);return{data:i,execute:async(...t)=>{try{u.value=e.ApiStatus.Loading,o.value=null;const r=await n(...t),c=function(e,t){return t}(0,a)?r.data:r;return h(i,c),u.value=e.ApiStatus.Done,c}catch(r){return o.value=function(e){return e instanceof Error?e:new Error("Something went wrong while fetching data.")}(r),u.value=e.ApiStatus.Failed,Promise.reject()}},apiStatus:u,isPending:c,error:o}};
|