@solvimon/solvimon-web 0.1.0-alpha.3 → 0.1.0-alpha.5
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 +70 -42
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BD3CrJzj.js → BillingInformation.vue_vue_type_script_setup_true_lang-BouYyZhD.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DQAp1xwu.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CvUwy_tp.mjs} +2 -2
- package/dist/{ContentWithAsideLayout-DczcgSrt.js → ContentWithAsideLayout-BjJufFeN.js} +1 -1
- package/dist/{ContentWithAsideLayout-CRsFr9TH.mjs → ContentWithAsideLayout-CKbnuXMU.mjs} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0ie9Krt.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DaEPSNrY.mjs} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BE3I7Oe1.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-sbmK2un9.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DVDOsMnT.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CLU-8-Ao.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-sNdlKgdU.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-NRmK7iN3.js} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Sn1Jq19s.js → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Ck_1lRDB.js} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJEZEEwZ.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DFCX2tcj.mjs} +3 -3
- package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-Bifo4jTH.js → PricingGroupContent.vue_vue_type_script_setup_true_lang-BOZurit_.js} +1 -1
- package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-DWp42_G4.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-DAwMy1l8.mjs} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Bp5RvQVS.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-Cj4cnM8z.mjs} +4 -4
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-yyhwzYSM.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-D49i1DHa.js} +1 -1
- package/dist/{component-DEo_ndpK.mjs → component-B0RYS5uK.mjs} +5 -7
- package/dist/component-BeqkeC9h.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 +3 -3
- 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 +2 -2
- 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 +26 -49
- 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 +11 -6
- 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 +4 -4
- 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 +2 -2
- 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/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{invoices-BW1notiX.js → invoices-CUrXmVXe.js} +1 -1
- package/dist/{invoices-M5oYVch6.mjs → invoices-CoEBP5UT.mjs} +1 -1
- package/dist/{paymentMethods-CqKUfc3w.mjs → paymentMethods-C2gWIbEr.mjs} +1 -1
- package/dist/{paymentMethods-BX80t2zk.js → paymentMethods-D_rYLg3F.js} +1 -1
- package/dist/{payments-BHv4hCeJ.js → payments-ClJySb0d.js} +1 -1
- package/dist/{payments-CosaPZwo.mjs → payments-DLjkq_hN.mjs} +1 -1
- package/dist/{registry-BwKEYOf7.js → registry-EPF-VAYZ.js} +1 -1
- package/dist/{registry-Cag1Jj7P.mjs → registry-bo_7pcbl.mjs} +2 -2
- 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 +8 -8
- 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 +9 -9
- 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 +5 -5
- package/dist/{subscriptions-Bs4DIE8f.mjs → subscriptions-BepBTXR5.mjs} +1 -1
- package/dist/{subscriptions-CnxvsBXd.js → subscriptions-DERHtyHo.js} +1 -1
- package/dist/{useActionDispatchProvider-CgRcOqv3.mjs → useActionDispatchProvider-B_SkyymZ.mjs} +1 -1
- package/dist/{useActionDispatchProvider-Cru69mAl.js → useActionDispatchProvider-D4OtXsNA.js} +1 -1
- package/dist/{useCustomer-DlcjY3fP.mjs → useCustomer-C0RKKfGJ.mjs} +1 -1
- package/dist/{useCustomer-B0NK96dA.js → useCustomer-CEFUPIDZ.js} +1 -1
- package/dist/{useCustomerPaymentMethodOptions-C-8BLzqb.js → useCustomerPaymentMethodOptions-BgCFkLeQ.js} +1 -1
- package/dist/{useCustomerPaymentMethodOptions-BzEquyUV.mjs → useCustomerPaymentMethodOptions-BlFH4zxG.mjs} +3 -3
- package/dist/{useIncrementalLoading-C7ToTmZK.mjs → useIncrementalLoading-BqD4k_-r.mjs} +1 -1
- package/dist/{useIncrementalLoading-D60Vttil.js → useIncrementalLoading-CDpeHhKs.js} +1 -1
- package/dist/{useInvoiceData-CcueV3We.mjs → useInvoiceData-7mqBeSPa.mjs} +2 -2
- package/dist/{useInvoiceData-DstXfI7t.js → useInvoiceData-DvNf2402.js} +1 -1
- package/dist/{useInvoicesList-CXng3aUm.mjs → useInvoicesList-B5vYDRyl.mjs} +4 -4
- package/dist/{useInvoicesList-DmzjgMlW.js → useInvoicesList-CBqZG_rw.js} +1 -1
- package/dist/{usePaymentMethods-Db-1R6rI.mjs → usePaymentMethods-4Io2ZHlo.mjs} +2 -2
- package/dist/{usePaymentMethods-DCGVRXA4.js → usePaymentMethods-BdZkt6re.js} +1 -1
- package/dist/{useWalletBalanceItems-CHkLaccm.mjs → useWalletBalanceItems-B0NZuM3W.mjs} +1 -1
- package/dist/{useWalletBalanceItems-BZyiAhcV.js → useWalletBalanceItems-CzV3PcJH.js} +1 -1
- package/package.json +3 -3
- package/dist/component-XHQYFLA_.js +0 -1
package/README.md
CHANGED
|
@@ -1,80 +1,108 @@
|
|
|
1
1
|
# @solvimon/solvimon-web
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Solvimon's front-end SDK. Provides framework-agnostic web components and a set of screens for building a billing self-serve experience.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
8
|
npm install @solvimon/solvimon-web
|
|
7
9
|
```
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
Every component requires at minimum:
|
|
14
|
+
|
|
15
|
+
| Property | Type | Description |
|
|
16
|
+
| ------------- | -------------------- | ------------------------------------------- |
|
|
17
|
+
| `token` | `string` | Session token fetched from the Solvimon API |
|
|
18
|
+
| `environment` | `"TEST"` \| `"LIVE"` | Target environment |
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
10
21
|
|
|
11
|
-
|
|
12
|
-
| ------------- | -------------------------------------------- |
|
|
13
|
-
| `token` | Fetched from our API |
|
|
14
|
-
| `environment` | Specifies the environment (`TEST` or `LIVE`) |
|
|
22
|
+
The SDK exports web components (Custom Elements). There are two ways to register them.
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
### Auto-register via define function
|
|
17
25
|
|
|
18
|
-
|
|
26
|
+
Call the `define` function once — it registers the custom element globally.
|
|
19
27
|
|
|
20
28
|
```tsx
|
|
21
|
-
import {
|
|
29
|
+
import { defineSolvimonCheckout } from '@solvimon/solvimon-web/screens/checkout';
|
|
22
30
|
|
|
23
|
-
|
|
31
|
+
defineSolvimonCheckout();
|
|
24
32
|
|
|
25
|
-
export default function
|
|
26
|
-
return
|
|
27
|
-
<solvimon-add-payment-method-form
|
|
28
|
-
token="<my-token-retrieved-from-solvimon-api>"
|
|
29
|
-
environment="LIVE"
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
33
|
+
export default function Page() {
|
|
34
|
+
return <solvimon-checkout token="<token>" environment="LIVE" />;
|
|
32
35
|
}
|
|
33
36
|
```
|
|
34
37
|
|
|
35
|
-
###
|
|
38
|
+
### Manual registration (recommended for Vue — enables typed components)
|
|
36
39
|
|
|
37
40
|
```vue
|
|
38
41
|
<script setup lang="ts">
|
|
39
|
-
import {
|
|
42
|
+
import { SolvimonCheckout } from '@solvimon/solvimon-web/screens/checkout';
|
|
40
43
|
|
|
41
|
-
if (customElements.get('solvimon-
|
|
42
|
-
customElements.define('solvimon-
|
|
44
|
+
if (!customElements.get('solvimon-checkout')) {
|
|
45
|
+
customElements.define('solvimon-checkout', SolvimonCheckout);
|
|
43
46
|
}
|
|
44
47
|
</script>
|
|
45
48
|
|
|
46
49
|
<template>
|
|
47
|
-
<solvimon-
|
|
48
|
-
token="<my-token-retrieved-from-solvimon-api>"
|
|
49
|
-
environment="LIVE"
|
|
50
|
-
/>
|
|
50
|
+
<solvimon-checkout token="<token>" environment="LIVE" />
|
|
51
51
|
</template>
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
###
|
|
54
|
+
### Server-side rendering (SSR / isomorphic)
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
The define functions access browser APIs and must only run client-side. Lazy-import them inside a client-only lifecycle hook:
|
|
57
57
|
|
|
58
58
|
```tsx
|
|
59
59
|
import { useEffect } from 'react';
|
|
60
60
|
|
|
61
|
-
export default function
|
|
61
|
+
export default function Page() {
|
|
62
62
|
useEffect(() => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
);
|
|
67
|
-
defineSolvimonAddPaymentMethodForm();
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
loadSolvimonSdkComponent();
|
|
63
|
+
import('@solvimon/solvimon-web/screens/checkout').then(({ defineSolvimonCheckout }) =>
|
|
64
|
+
defineSolvimonCheckout(),
|
|
65
|
+
);
|
|
71
66
|
}, []);
|
|
72
67
|
|
|
73
|
-
return
|
|
74
|
-
<solvimon-add-payment-method-form
|
|
75
|
-
token="<my-token-retrieved-from-solvimon-api>"
|
|
76
|
-
environment="LIVE"
|
|
77
|
-
/>
|
|
78
|
-
);
|
|
68
|
+
return <solvimon-checkout token="<token>" environment="LIVE" />;
|
|
79
69
|
}
|
|
80
70
|
```
|
|
71
|
+
|
|
72
|
+
## Available components
|
|
73
|
+
|
|
74
|
+
### Screens
|
|
75
|
+
|
|
76
|
+
Full-page experiences.
|
|
77
|
+
|
|
78
|
+
| Export path | Custom element |
|
|
79
|
+
| ----------------------------------------------------- | --------------------------------- |
|
|
80
|
+
| `@solvimon/solvimon-web/screens/checkout` | `<solvimon-checkout>` |
|
|
81
|
+
| `@solvimon/solvimon-web/screens/customer-overview` | `<solvimon-customer-overview>` |
|
|
82
|
+
| `@solvimon/solvimon-web/screens/upgrade-subscription` | `<solvimon-upgrade-subscription>` |
|
|
83
|
+
|
|
84
|
+
### Components
|
|
85
|
+
|
|
86
|
+
Embeddable building blocks.
|
|
87
|
+
|
|
88
|
+
| Export path | Custom element |
|
|
89
|
+
| ------------------------------------------------------------ | ------------------------------------- |
|
|
90
|
+
| `@solvimon/solvimon-web/components/billing-information` | `<solvimon-billing-information>` |
|
|
91
|
+
| `@solvimon/solvimon-web/components/billing-information-form` | `<solvimon-billing-information-form>` |
|
|
92
|
+
| `@solvimon/solvimon-web/components/customer-payment-methods` | `<solvimon-customer-payment-methods>` |
|
|
93
|
+
| `@solvimon/solvimon-web/components/invoice` | `<solvimon-invoice>` |
|
|
94
|
+
| `@solvimon/solvimon-web/components/invoice-details` | `<solvimon-invoice-details>` |
|
|
95
|
+
| `@solvimon/solvimon-web/components/invoices-list` | `<solvimon-invoices-list>` |
|
|
96
|
+
| `@solvimon/solvimon-web/components/payment-history` | `<solvimon-payment-history>` |
|
|
97
|
+
| `@solvimon/solvimon-web/components/payment-method-form` | `<solvimon-payment-method-form>` |
|
|
98
|
+
| `@solvimon/solvimon-web/components/subscription-schedules` | `<solvimon-subscription-schedules>` |
|
|
99
|
+
| `@solvimon/solvimon-web/components/subscriptions-list` | `<solvimon-subscriptions-list>` |
|
|
100
|
+
| `@solvimon/solvimon-web/components/wallet-balances` | `<solvimon-wallet-balances>` |
|
|
101
|
+
|
|
102
|
+
## Release pipeline
|
|
103
|
+
|
|
104
|
+
Releases are published to [npm](https://www.npmjs.com/package/@solvimon/solvimon-web)
|
|
105
|
+
automatically via GitHub Actions. See the
|
|
106
|
+
[publishing documentation](./docs/development/publish.md) for the release flow.
|
|
107
|
+
|
|
108
|
+
Want to contribute? Check the [developer documentation](./docs/development/readme.md).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./component-
|
|
1
|
+
const e=require("vue"),t=require("./component-BeqkeC9h.js"),i=require("./useActionDispatchProvider-D4OtXsNA.js"),o=e.defineComponent({__name:"BillingInformation",props:{customer:{type:Object},isLoading:{type:Boolean},configuration:{default:()=>({showEditButton:!0}),type:Object}},emits:["edit-billing-information"],setup(o){const{$t:n}=t.useIntl(),{dispatchAction:r}=i.useActionDispatchProvider();return(i,a)=>o.isLoading?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$14),{key:0,variant:"section",class:"min-h-[100px]","data-testid":"billing-information-skeleton"})):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$z),{key:1,customer:o.customer,"fallback-to-reference":!1},e.createSlots({_:2},[o.configuration.showEditButton?{name:"settings",fn:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$2H),{size:"sm",variant:"ghost",color:"gray","icon-prefix":"edit",onClick:a[0]||(a[0]=t=>e.unref(r)({action:"edit-billing-information"}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Edit",id:"customer_overview.billing_information_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer billing information"})),1)]),_:1})]),key:"0"}:void 0]),1032,["customer"]))}});exports._sfc_main=o;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { b as useIntl, k as _sfc_main$14, l as _sfc_main$z, m as _sfc_main$2H } from "./component-
|
|
3
|
-
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-
|
|
2
|
+
import { b as useIntl, k as _sfc_main$14, l as _sfc_main$z, m as _sfc_main$2H } from "./component-B0RYS5uK.mjs";
|
|
3
|
+
import { u as useActionDispatchProvider } from "./useActionDispatchProvider-B_SkyymZ.mjs";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "BillingInformation",
|
|
6
6
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),o=require("./component-
|
|
1
|
+
const e=require("vue"),o=require("./component-BeqkeC9h.js");const t={class:"grid w-full grid-cols-1 gap-4"},r={key:0},s={class:"flex flex-col items-start gap-6 md:flex-row"},l={class:"grid w-full grow grid-cols-1 gap-4 md:w-auto"},n={class:"grid w-full grid-cols-1 gap-4 md:w-80 md:shrink-0"};const c=((e,o)=>{const t=e.__vccOpts||e;for(const[r,s]of o)t[r]=s;return t})({},[["render",function(o,c){return e.openBlock(),e.createElementBlock("div",t,[o.$slots.header?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(o.$slots,"header")])):e.createCommentVNode("",!0),e.createElementVNode("div",s,[e.createElementVNode("div",l,[e.renderSlot(o.$slots,"content")]),e.createElementVNode("aside",n,[e.renderSlot(o.$slots,"aside")])])])}]]);exports.ContentWithAsideLayout=c,exports.usePortal=function(){const t=e.inject(o.PORTAL_INJECTION_KEY);if(!t)throw new Error("PortalProvider is not provided");return t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject, openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode } from "vue";
|
|
2
|
-
import { P as PORTAL_INJECTION_KEY } from "./component-
|
|
2
|
+
import { P as PORTAL_INJECTION_KEY } from "./component-B0RYS5uK.mjs";
|
|
3
3
|
function usePortal() {
|
|
4
4
|
const portal = inject(PORTAL_INJECTION_KEY);
|
|
5
5
|
if (!portal) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, withCtx, createElementBlock, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import { b as useIntl, d as _sfc_main$1g, _ as _sfc_main$2 } from "./component-
|
|
2
|
+
import { b as useIntl, d as _sfc_main$1g, _ as _sfc_main$2 } from "./component-B0RYS5uK.mjs";
|
|
3
3
|
const _hoisted_1 = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex flex-col gap-2"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./component-
|
|
1
|
+
const e=require("vue"),t=require("./component-BeqkeC9h.js"),i={key:0,class:"flex flex-col gap-2"},o=e.defineComponent({__name:"InvoiceDetailsBlock",props:{invoice:{type:Object}},setup(o){const{$t:n,formatDate:a}=t.useIntl();return(c,d)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{title:e.unref(n)({defaultMessage:"Invoice details",description:"Title for the invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.title"})},{default:e.withCtx(()=>[o.invoice?(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",null,[e.createVNode(e.unref(t._sfc_main$2),{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Invoice date",description:"Title for the invoice date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.invoice_date"})),1)]),_:1}),o.invoice.invoice_date?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:0,variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:o.invoice.invoice_date,format:"date",timezone:o.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.createVNode(e.unref(t._sfc_main$2),{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Due date",description:"Title for the due date in invoice details block on the invoice overview page",id:"sdk.invoice_details.invoice_details_block.due_date"})),1)]),_:1}),o.invoice.due_date?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$2),{key:0,variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({date:o.invoice.due_date,format:"date",timezone:o.invoice.customer.timezone,offsetType:"offsetted"})),1)]),_:1})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});exports._sfc_main=o;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
2
|
-
import { b as useIntl, _ as _sfc_main$2, d as _sfc_main$1g, e as _sfc_main$3, f as formatEnum, g as _sfc_main$1 } from "./component-
|
|
2
|
+
import { b as useIntl, _ as _sfc_main$2, d as _sfc_main$1g, e as _sfc_main$3, f as formatEnum, g as _sfc_main$1 } from "./component-B0RYS5uK.mjs";
|
|
3
3
|
const _hoisted_1 = { class: "flex flex-col-reverse gap-1" };
|
|
4
4
|
const _hoisted_2 = { class: "flex justify-between items-center mb-2" };
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),t=require("./component-
|
|
1
|
+
const e=require("vue"),t=require("./component-BeqkeC9h.js"),a={class:"flex flex-col-reverse gap-1"},n={class:"flex justify-between items-center mb-2"},o=e.defineComponent({__name:"PaymentHistoryBlock",props:{paymentAttempts:{type:Array},customer:{type:Object}},setup(o){const{$t:r,formatDate:i}=t.useIntl(),s={AUTHORIZED:"green",CANCELLED:"red",ERROR:"red",PENDING:"orange",PENDING_REFUND:"orange",REFUNDED:"orange",CHARGED_BACK:"orange",REFUSED:"red"};return(m,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(t._sfc_main$2),{tag:"h2",variant:"heading-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Payment history",description:"Title for the payment history block on the invoice details page",id:"sdk.invoice_details.payment_history.title"})),1)]),_:1}),e.createElementVNode("div",a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.paymentAttempts,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1g),{key:a.id,class:"mt-1 md:mt-2"},{default:e.withCtx(()=>[e.createElementVNode("div",n,[e.createVNode(e.unref(t._sfc_main$2),{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Payment attempt",description:"Title for the payment attempt block",id:"sdk.invoice_details.payment_history.payment_attempt"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main$3),{color:s[a.result]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatEnum)(a.result)),1)]),_:2},1032,["color"])]),a.payment_method_details?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,"payment-method":a.payment_method_details},{description:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({date:a.created_at,format:"dateTime",offsetType:"offsetted",timezone:o.customer.timezone})),1)]),_:2},1032,["payment-method"])):e.createCommentVNode("",!0)]),_:2},1024))),128))])]))}});exports._sfc_main=o;
|