@bunnyapp/components 1.0.72 → 1.0.73
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/cjs/index.js +252 -150
- package/dist/cjs/src/components/Checkout/QuoteCheckout.d.ts +2 -1
- package/dist/cjs/src/components/PaymentForm/CouponEditor.d.ts +3 -1
- package/dist/cjs/src/components/PaymentForm/DemoPay/CreditCard/CreditCard.d.ts +0 -6
- package/dist/cjs/src/components/Signup/CheckoutSummary.d.ts +4 -1
- package/dist/cjs/src/graphql/queries/getCoupons.d.ts +6 -0
- package/dist/cjs/src/hooks/useUpdateCoupons.d.ts +14 -0
- package/dist/esm/index.js +252 -150
- package/dist/esm/src/components/Checkout/QuoteCheckout.d.ts +2 -1
- package/dist/esm/src/components/PaymentForm/CouponEditor.d.ts +3 -1
- package/dist/esm/src/components/PaymentForm/DemoPay/CreditCard/CreditCard.d.ts +0 -6
- package/dist/esm/src/components/Signup/CheckoutSummary.d.ts +4 -1
- package/dist/esm/src/graphql/queries/getCoupons.d.ts +6 -0
- package/dist/esm/src/hooks/useUpdateCoupons.d.ts +14 -0
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ interface QuoteCheckoutProps extends InvoiceQuoteParentProps {
|
|
|
6
6
|
taxationRequiredAccountFields?: TaxationRequiredAccountFields | null;
|
|
7
7
|
token?: string;
|
|
8
8
|
storedPaymentMethod?: PaymentMethod;
|
|
9
|
+
onRecalculateTaxes: () => void;
|
|
9
10
|
}
|
|
10
|
-
declare const QuoteCheckout: ({ account, onSuccess, onFail, quote, taxationRequiredAccountFields, }: QuoteCheckoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const QuoteCheckout: ({ account, onSuccess, onFail, quote, taxationRequiredAccountFields, onRecalculateTaxes, }: QuoteCheckoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default QuoteCheckout;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Quote } from '@bunnyapp/common';
|
|
2
|
-
declare function CouponEditor({ className, onAddCoupon, isAddingCoupon, }: {
|
|
2
|
+
declare function CouponEditor({ className, onAddCoupon, isAddingCoupon, couponCode, setCouponCode, }: {
|
|
3
3
|
className?: string;
|
|
4
4
|
quote: Quote;
|
|
5
5
|
onAddCoupon: (couponCode: string) => void;
|
|
6
6
|
isAddingCoupon: boolean;
|
|
7
|
+
couponCode: string;
|
|
8
|
+
setCouponCode: (couponCode: string) => void;
|
|
7
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export default CouponEditor;
|
|
@@ -18,10 +18,4 @@ export declare const MiniCreditCard: ({ className, buttons, hideDropdownMenu, hi
|
|
|
18
18
|
onClickSetDefault?: (() => void) | undefined;
|
|
19
19
|
id?: string | undefined;
|
|
20
20
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
declare const EmptyCard: ({ onClick, shadow, cardEnabled, }: {
|
|
22
|
-
onClick: () => void;
|
|
23
|
-
shadow?: ShadowType | undefined;
|
|
24
|
-
cardEnabled?: boolean | undefined;
|
|
25
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export { EmptyCard };
|
|
27
21
|
export default CreditCard;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../styles/index.less';
|
|
2
2
|
import { PriceList, Quote } from '@bunnyapp/common';
|
|
3
|
-
export default function CheckoutSummary({ quote, className, onAddCoupon, onRemoveCoupon, isRemovingCoupon, priceListData, isAddingCoupon, }: {
|
|
3
|
+
export default function CheckoutSummary({ quote, className, onAddCoupon, onRemoveCoupon, isRemovingCoupon, priceListData, isAddingCoupon, couponCode, setCouponCode, activeCouponsExist, }: {
|
|
4
4
|
quote: Quote;
|
|
5
5
|
className?: string;
|
|
6
6
|
onAddCoupon: (couponCode: string) => void;
|
|
@@ -8,4 +8,7 @@ export default function CheckoutSummary({ quote, className, onAddCoupon, onRemov
|
|
|
8
8
|
isRemovingCoupon: boolean;
|
|
9
9
|
priceListData?: PriceList;
|
|
10
10
|
isAddingCoupon: boolean;
|
|
11
|
+
couponCode: string;
|
|
12
|
+
setCouponCode: (couponCode: string) => void;
|
|
13
|
+
activeCouponsExist: boolean;
|
|
11
14
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const useUpdateCoupons: ({ apiHost, token, quoteChangeId, onCouponAdded, onCouponRemoved, }: {
|
|
2
|
+
apiHost: string;
|
|
3
|
+
token?: string | undefined;
|
|
4
|
+
quoteChangeId?: string | undefined;
|
|
5
|
+
onCouponAdded?: (() => void) | undefined;
|
|
6
|
+
onCouponRemoved?: (() => void) | undefined;
|
|
7
|
+
}) => {
|
|
8
|
+
addCoupon: import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import("@bunnyapp/common").Quote, any, string, unknown>;
|
|
9
|
+
removeCoupon: import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import("@bunnyapp/common").Quote, any, string, unknown>;
|
|
10
|
+
isAddingCoupon: boolean;
|
|
11
|
+
isRemovingCoupon: boolean;
|
|
12
|
+
activeCouponsExist: boolean;
|
|
13
|
+
};
|
|
14
|
+
export default useUpdateCoupons;
|