fix(payment): compile shipped payment components

This commit is contained in:
Clintchiz committed 2026-08-28 09:42:00 +05:30
1 parent 10771f1a2b
commit c578bc0f92
7 files changed
+27 -7

No files matched your search

+1 -1
View File
@@ -532,7 +532,7 @@
},
"packages/payment": {
"name": "@wrnexus/payment",
"version": "0.8.2",
"version": "0.8.3",
"dependencies": {
"@wrnexus/db": "workspace:*",
"@wrnexus/plugin": "workspace:*",
+5 -1
View File
@@ -1,5 +1,9 @@
component PayNow {
props { checkoutUrl: string label?: string = "Pay now" disabled?: boolean = false }
props {
checkoutUrl: string
label?: string = "Pay now"
disabled?: boolean = false
}
view {
<a class="wrn-payment-button" href={checkoutUrl} aria-disabled={disabled}>
{label}
+4 -1
View File
@@ -1,4 +1,7 @@
component PaymentSheet {
props { checkoutUrl: string gateway: string }
props {
checkoutUrl: string
gateway: string
}
view { <section class="wrn-payment-sheet" data-gateway={gateway}><p>Secure payment is completed on the payment provider.</p><a href={checkoutUrl}>Continue securely</a></section> }
}
@@ -1,4 +1,7 @@
component PaymentStatus {
props { status: string label?: string = "Payment status" }
props {
status: string
label?: string = "Payment status"
}
view { <div class="wrn-payment-status" role="status"><strong>{label}</strong><span>{status}</span></div> }
}
@@ -1,4 +1,9 @@
component PaymentSummary {
props { captured: number = 0 refunded: number = 0 net: number = 0 currency: string }
props {
captured: number = 0
refunded: number = 0
net: number = 0
currency: string
}
view { <dl><dt>Captured</dt><dd>{currency} {captured}</dd><dt>Refunded</dt><dd>{currency} {refunded}</dd><dt>Net</dt><dd>{currency} {net}</dd></dl> }
}
+6 -1
View File
@@ -1,4 +1,9 @@
component RefundButton {
props { paymentId: string refundable: number partial?: boolean = false action?: string = "/api/payments/refund" }
props {
paymentId: string
refundable: number
partial?: boolean = false
action?: string = "/api/payments/refund"
}
view { <form method="post" action={action}><input type="hidden" name="paymentId" value={paymentId} /><label>Reason<input name="reason" required /></label>{#if partial}<label>Amount<input name="amount" type="number" min="1" max={refundable} /></label>{/if}<button type="submit">Refund</button></form> }
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@wrnexus/payment",
"version": "0.8.2",
"version": "0.8.3",
"private": true,
"type": "module",
"main": "src/index.ts",