@bunnyapp/components 1.4.0 → 1.5.0-beta.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/dist/cjs/index.js +1458 -1007
- package/dist/cjs/src/components/BunnyProvider.d.ts +0 -1
- package/dist/cjs/src/components/Checkout/Checkout.d.ts +12 -6
- package/dist/cjs/src/components/Invoice/Invoice.d.ts +5 -2
- package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +1 -2
- package/dist/cjs/src/components/PaymentForm/PaymentFormTypes.d.ts +1 -11
- package/dist/cjs/src/components/Quote/Quote.d.ts +1 -1
- package/dist/cjs/src/components/Quote/Quote.stories.d.ts +5 -0
- package/dist/cjs/src/components/QuoteProvider.d.ts +22 -0
- package/dist/cjs/src/components/Subscriptions/AddonIndentation.d.ts +8 -0
- package/dist/cjs/src/components/Subscriptions/AddonSubscriptionCards.d.ts +7 -0
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +4 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +3 -4
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +2 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutButton.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +5 -6
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +11 -0
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListCardDesktop.d.ts +5 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +4 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +2 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerMobile/PriceListGridMobile.d.ts +3 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCard.d.ts +4 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardButton.d.ts +2 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPrice.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardTitle.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +1 -2
- package/dist/{esm/src/components/Subscriptions/PlanManager/PlanPicker → cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListSelector}/PriceListSelector.d.ts +2 -4
- package/dist/cjs/src/components/Subscriptions/QuantityDrawerContainer.d.ts +14 -0
- package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +4 -2
- package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuantityInput.d.ts +4 -2
- package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +3 -1
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/ChangeQuantitiesButton.d.ts +2 -3
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +4 -3
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardHeader.d.ts +2 -3
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -3
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktop.d.ts +3 -3
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +1 -1
- package/dist/cjs/src/components/Transactions/Transactions.d.ts +5 -3
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +1 -1
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +1 -1
- package/dist/cjs/src/components/Transactions/transactionsList/utils.d.ts +1 -1
- package/dist/cjs/src/{components/Invoice → contexts}/InvoiceQuoteContext.d.ts +2 -2
- package/dist/{esm/src/components/Subscriptions → cjs/src/contexts}/SubscriptionsContext.d.ts +0 -4
- package/dist/{esm/src/components/Transactions → cjs/src/contexts}/TransactionsListContext.d.ts +3 -2
- package/dist/cjs/src/graphql/QuoteRequests.d.ts +17 -2
- package/dist/cjs/src/graphql/mutations/quoteAddonCreate.d.ts +7 -0
- package/dist/cjs/src/graphql/mutations/quoteChangeCreate.d.ts +8 -0
- package/dist/cjs/src/graphql/mutations/quoteChangeDelete.d.ts +6 -0
- package/dist/cjs/src/graphql/mutations/quoteChargeDelete.d.ts +2 -1
- package/dist/cjs/src/graphql/mutations/quoteChargeUpdate.d.ts +2 -1
- package/dist/cjs/src/graphql/mutations/quoteCompose.d.ts +0 -1
- package/dist/cjs/src/graphql/mutations/quoteCreate.d.ts +8 -0
- package/dist/cjs/src/graphql/mutations/quoteCreateWithDeal.d.ts +10 -0
- package/dist/cjs/src/graphql/queries/getAddonPlans.d.ts +7 -0
- package/dist/cjs/src/graphql/queries/getFormattedQuote.d.ts +2 -1
- package/dist/cjs/src/graphql/queries/getQuote.d.ts +3 -1
- package/dist/cjs/src/hooks/quotes/useQuoteCreate.d.ts +9 -0
- package/dist/cjs/src/hooks/quotes/useQuoteQuantities.d.ts +14 -0
- package/dist/cjs/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +2 -3
- package/dist/cjs/src/hooks/useCurrentUserData.d.ts +11 -8
- package/dist/cjs/src/hooks/usePaymentMethod.d.ts +2 -1
- package/dist/cjs/src/hooks/usePriceListChangeOptions.d.ts +6 -0
- package/dist/cjs/src/hooks/useToggleAddonQuoteChange.d.ts +7 -0
- package/dist/cjs/src/utils/addonPlanUtils.d.ts +6 -0
- package/dist/cjs/src/utils/chargeUtils.d.ts +2 -0
- package/dist/cjs/src/utils/featureAddonUtils.d.ts +5 -2
- package/dist/esm/index.js +1460 -1009
- package/dist/esm/src/components/BunnyProvider.d.ts +0 -1
- package/dist/esm/src/components/Checkout/Checkout.d.ts +12 -6
- package/dist/esm/src/components/Invoice/Invoice.d.ts +5 -2
- package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +1 -2
- package/dist/esm/src/components/PaymentForm/PaymentFormTypes.d.ts +1 -11
- package/dist/esm/src/components/Quote/Quote.d.ts +1 -1
- package/dist/esm/src/components/Quote/Quote.stories.d.ts +5 -0
- package/dist/esm/src/components/QuoteProvider.d.ts +22 -0
- package/dist/esm/src/components/Subscriptions/AddonIndentation.d.ts +8 -0
- package/dist/esm/src/components/Subscriptions/AddonSubscriptionCards.d.ts +7 -0
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +4 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +3 -4
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +2 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutButton.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +5 -6
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +11 -0
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListCardDesktop.d.ts +5 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +4 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +2 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerMobile/PriceListGridMobile.d.ts +3 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCard.d.ts +4 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardButton.d.ts +2 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPrice.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardTitle.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +1 -2
- package/dist/{cjs/src/components/Subscriptions/PlanManager/PlanPicker → esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListSelector}/PriceListSelector.d.ts +2 -4
- package/dist/esm/src/components/Subscriptions/QuantityDrawerContainer.d.ts +14 -0
- package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +4 -2
- package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuantityInput.d.ts +4 -2
- package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +3 -1
- package/dist/esm/src/components/Subscriptions/subscriptionsList/ChangeQuantitiesButton.d.ts +2 -3
- package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +4 -3
- package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardHeader.d.ts +2 -3
- package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -3
- package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktop.d.ts +3 -3
- package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +1 -1
- package/dist/esm/src/components/Transactions/Transactions.d.ts +5 -3
- package/dist/esm/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +1 -1
- package/dist/esm/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +1 -1
- package/dist/esm/src/components/Transactions/transactionsList/utils.d.ts +1 -1
- package/dist/esm/src/{components/Invoice → contexts}/InvoiceQuoteContext.d.ts +2 -2
- package/dist/{cjs/src/components/Subscriptions → esm/src/contexts}/SubscriptionsContext.d.ts +0 -4
- package/dist/{cjs/src/components/Transactions → esm/src/contexts}/TransactionsListContext.d.ts +3 -2
- package/dist/esm/src/graphql/QuoteRequests.d.ts +17 -2
- package/dist/esm/src/graphql/mutations/quoteAddonCreate.d.ts +7 -0
- package/dist/esm/src/graphql/mutations/quoteChangeCreate.d.ts +8 -0
- package/dist/esm/src/graphql/mutations/quoteChangeDelete.d.ts +6 -0
- package/dist/esm/src/graphql/mutations/quoteChargeDelete.d.ts +2 -1
- package/dist/esm/src/graphql/mutations/quoteChargeUpdate.d.ts +2 -1
- package/dist/esm/src/graphql/mutations/quoteCompose.d.ts +0 -1
- package/dist/esm/src/graphql/mutations/quoteCreate.d.ts +8 -0
- package/dist/esm/src/graphql/mutations/quoteCreateWithDeal.d.ts +10 -0
- package/dist/esm/src/graphql/queries/getAddonPlans.d.ts +7 -0
- package/dist/esm/src/graphql/queries/getFormattedQuote.d.ts +2 -1
- package/dist/esm/src/graphql/queries/getQuote.d.ts +3 -1
- package/dist/esm/src/hooks/quotes/useQuoteCreate.d.ts +9 -0
- package/dist/esm/src/hooks/quotes/useQuoteQuantities.d.ts +14 -0
- package/dist/esm/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +2 -3
- package/dist/esm/src/hooks/useCurrentUserData.d.ts +11 -8
- package/dist/esm/src/hooks/usePaymentMethod.d.ts +2 -1
- package/dist/esm/src/hooks/usePriceListChangeOptions.d.ts +6 -0
- package/dist/esm/src/hooks/useToggleAddonQuoteChange.d.ts +7 -0
- package/dist/esm/src/utils/addonPlanUtils.d.ts +6 -0
- package/dist/esm/src/utils/chargeUtils.d.ts +2 -0
- package/dist/esm/src/utils/featureAddonUtils.d.ts +5 -2
- package/dist/index.d.ts +8 -4
- package/package.json +2 -2
- package/dist/cjs/src/components/QuotePreviewProvider.d.ts +0 -17
- package/dist/esm/src/components/QuotePreviewProvider.d.ts +0 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ShadowType } from
|
|
3
|
-
import { FormattedInvoice, FormattedQuote } from
|
|
2
|
+
import { ShadowType } from '../types/shadowType';
|
|
3
|
+
import { FormattedInvoice, FormattedQuote } from '@bunnyapp/common';
|
|
4
4
|
export type InvoiceQuoteContextProps = {
|
|
5
5
|
id?: string;
|
|
6
6
|
invoiceQuoteViewComponent?: React.ReactNode;
|
package/dist/{cjs/src/components/Subscriptions → esm/src/contexts}/SubscriptionsContext.d.ts
RENAMED
|
@@ -11,9 +11,5 @@ export type SubscriptionsContextValues = {
|
|
|
11
11
|
hideExpired?: boolean;
|
|
12
12
|
upgradingSubscription?: Subscription;
|
|
13
13
|
setUpgradingSubscription: React.Dispatch<React.SetStateAction<Subscription | undefined>>;
|
|
14
|
-
updatingChargeQuantityId?: string;
|
|
15
|
-
setUpdatingChargeQuantityId: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
16
|
-
subscriptionUpgradeId: string | null;
|
|
17
|
-
setSubscriptionUpgradeId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
18
14
|
};
|
|
19
15
|
export declare const SubscriptionsContext: import("react").Context<SubscriptionsContextValues>;
|
package/dist/{cjs/src/components/Transactions → esm/src/contexts}/TransactionsListContext.d.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Transaction, TransactionKind } from '@bunnyapp/common';
|
|
3
|
-
import { ShadowType } from '
|
|
4
|
-
import { TransactionListColumnType } from '
|
|
3
|
+
import { ShadowType } from '../types/shadowType';
|
|
4
|
+
import { TransactionListColumnType } from '../components/Transactions/transactionsList/TransactionsListDesktop';
|
|
5
5
|
export type TransactionsContextValues = {
|
|
6
6
|
showSearchBar?: boolean;
|
|
7
7
|
showTitle?: boolean;
|
|
@@ -24,6 +24,7 @@ export type TransactionsContextValues = {
|
|
|
24
24
|
filterTransactions?: (transaction: Transaction) => boolean;
|
|
25
25
|
sortTransactions?: (transactionA: Transaction, transactionB: Transaction) => number;
|
|
26
26
|
transactionDateType: TransactionDateType;
|
|
27
|
+
hidePaymentForm?: boolean;
|
|
27
28
|
};
|
|
28
29
|
export type TransactionDateType = 'createdAt' | 'issuedAt' | 'dueAt';
|
|
29
30
|
export declare const TransactionsListContext: import("react").Context<TransactionsContextValues>;
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const quoteSubscriptionUpgrade: ({ subscriptionId, priceListId, apiHost, token, }: {
|
|
2
|
+
subscriptionId: string;
|
|
3
|
+
priceListId: string;
|
|
4
|
+
apiHost: string;
|
|
5
|
+
token?: string | undefined;
|
|
6
|
+
}) => Promise<unknown>;
|
|
2
7
|
export declare const useCreateSubscriptionQuote: () => (subscriptionIds: string[], apiHost: string, token?: string) => Promise<unknown>;
|
|
3
8
|
export declare const useQuoteChangeUpdate: () => (charges: {
|
|
4
9
|
id: string;
|
|
5
10
|
quantity: number;
|
|
6
11
|
}[], quoteChangeId: string, apiHost: string, token?: string) => Promise<unknown>;
|
|
7
12
|
export declare const useQuoteDelete: () => (quoteId: string, apiHost: string, token?: string) => Promise<unknown>;
|
|
8
|
-
export declare const
|
|
13
|
+
export declare const quoteSubscriptionAddon: ({ subscriptionId, priceListId, apiHost, token, }: {
|
|
14
|
+
subscriptionId: string;
|
|
15
|
+
priceListId?: string | undefined;
|
|
16
|
+
apiHost: string;
|
|
17
|
+
token?: string | undefined;
|
|
18
|
+
}) => Promise<unknown>;
|
|
19
|
+
export declare const quoteSubscriptionActivate: ({ subscriptionId, apiHost, token, }: {
|
|
20
|
+
subscriptionId: string;
|
|
21
|
+
apiHost: string;
|
|
22
|
+
token?: string | undefined;
|
|
23
|
+
}) => Promise<unknown>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const quoteChangeCreate: ({ parentQuoteChangeId, priceListId, apiHost, token, quoteId, }: {
|
|
2
|
+
parentQuoteChangeId: string | null;
|
|
3
|
+
priceListId: string | null;
|
|
4
|
+
apiHost: string;
|
|
5
|
+
token?: string | undefined;
|
|
6
|
+
quoteId: string;
|
|
7
|
+
}) => Promise<any>;
|
|
8
|
+
export default quoteChangeCreate;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { QuoteCharge } from '@bunnyapp/common';
|
|
1
2
|
type QuoteChargeDeleteProps = {
|
|
2
3
|
apiHost: string;
|
|
3
4
|
quoteChargeId: string;
|
|
4
5
|
token?: string;
|
|
5
6
|
};
|
|
6
|
-
declare const quoteChargeDelete: ({ quoteChargeId, token, apiHost }: QuoteChargeDeleteProps) => Promise<
|
|
7
|
+
declare const quoteChargeDelete: ({ quoteChargeId, token, apiHost }: QuoteChargeDeleteProps) => Promise<QuoteCharge>;
|
|
7
8
|
export default quoteChargeDelete;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { QuoteCharge } from '@bunnyapp/common';
|
|
1
2
|
declare const quoteChargeUpdate: ({ discount, name, price, quantity, quoteChargeId, startDate, subtotal, apiHost, token, }: {
|
|
2
3
|
discount?: number | undefined;
|
|
3
4
|
name?: string | undefined;
|
|
@@ -8,5 +9,5 @@ declare const quoteChargeUpdate: ({ discount, name, price, quantity, quoteCharge
|
|
|
8
9
|
subtotal?: number | undefined;
|
|
9
10
|
apiHost: string;
|
|
10
11
|
token: string;
|
|
11
|
-
}) => Promise<
|
|
12
|
+
}) => Promise<QuoteCharge>;
|
|
12
13
|
export default quoteChargeUpdate;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Quote } from '@bunnyapp/common';
|
|
2
|
-
export declare const QUOTE_FIELDS = "quote {\n formattedQuote {\n html\n }\n acceptedByName\n acceptedByTitle\n accountId\n amount\n amountDue\n applicationDate\n applied\n billingDay\n contactId\n createdAt\n credits\n currencyId\n dealId\n discount\n discountValue\n endDate\n evergreen\n expiresAt\n id\n invoiceUntil\n isPendingApprovalRequest\n kind\n message\n name\n netPaymentDays\n notes\n ownerId\n periodAmount\n poNumber\n requiresApproval\n startDate\n state\n subtotal\n taxAmount\n updatedAt\n uuid\n amountsByPeriod {\n amount\n id\n name\n }\n endDateOptions {\n endDate\n label\n }\n invoiceUntilOptions {\n endDate\n label\n }\n quoteChanges {\n currencyId\n id\n kind\n charges {\n amountsByPeriod {\n amount\n startDate\n }\n amount\n billingPeriod\n billingPeriodAmounts { id amount prorationRate }\n chargeType\n couponId\n createdAt\n currencyId\n discount\n endDate\n feature { id name code isUnit unitName }\n id\n name\n priceListCharge {\n id\n }\n priceList {\n id\n }\n couponId\n price\n priceDecimals\n priceTiers { starts price }\n pricingModel\n prorationRate\n quantity\n quantityMax\n quantityMin\n startDate\n tieredAveragePrice\n updatedAt\n kind\n }\n priceList {\n id\n plan {\n name\n }\n product {\n name\n }\n }\n }\n}";
|
|
3
2
|
type Options = {
|
|
4
3
|
quoteId?: string;
|
|
5
4
|
priceListId?: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Quote } from '@bunnyapp/common';
|
|
2
|
+
type Options = {
|
|
3
|
+
dealAttributes: any;
|
|
4
|
+
quoteAttributes: any;
|
|
5
|
+
token?: string;
|
|
6
|
+
apiHost: string;
|
|
7
|
+
accountId: string;
|
|
8
|
+
};
|
|
9
|
+
declare const quoteCreateWithDeal: ({ dealAttributes, quoteAttributes, accountId, token, apiHost, }: Options) => Promise<Quote>;
|
|
10
|
+
export default quoteCreateWithDeal;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Quote } from '@bunnyapp/common';
|
|
2
|
-
declare const
|
|
2
|
+
export declare const QUOTE_FIELDS: (removeFormattedQuoteField?: boolean) => string;
|
|
3
|
+
declare const getQuote: ({ id, token, apiHost, removeFormattedQuoteField, }: {
|
|
3
4
|
id: string;
|
|
4
5
|
token?: string | undefined;
|
|
5
6
|
apiHost: string;
|
|
7
|
+
removeFormattedQuoteField?: boolean | undefined;
|
|
6
8
|
}) => Promise<Quote>;
|
|
7
9
|
export default getQuote;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PriceList, Quote, Subscription } from '@bunnyapp/common';
|
|
2
|
+
export declare const useQuoteCreate: ({ upgradingSubscription, selectedPriceList, token, }: {
|
|
3
|
+
upgradingSubscription?: Subscription | undefined;
|
|
4
|
+
selectedPriceList?: PriceList | undefined;
|
|
5
|
+
token?: string | undefined;
|
|
6
|
+
}) => {
|
|
7
|
+
quote: Quote | undefined;
|
|
8
|
+
isQuotePending: boolean;
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PriceList, Quote } from '@bunnyapp/common';
|
|
2
|
+
export declare const useQuoteQuantities: ({ selectedPriceList, quote, }: {
|
|
3
|
+
selectedPriceList: PriceList;
|
|
4
|
+
quote?: Quote | undefined;
|
|
5
|
+
}) => {
|
|
6
|
+
onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
|
|
7
|
+
getFeatureQuantity: (featureId: string) => number | undefined;
|
|
8
|
+
isUpdatingCharges: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Hook to manage feature quantities using a dictionary keyed by feature ID
|
|
12
|
+
* This tracks quantities for each unique feature.
|
|
13
|
+
*/
|
|
14
|
+
export type FeatureQuantitiesDict = Record<string, number | undefined>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { PriceListCharge } from '@bunnyapp/common';
|
|
2
|
-
export declare const useQuoteUpdateFeatureAddon: (
|
|
1
|
+
import { PriceListCharge, Quote } from '@bunnyapp/common';
|
|
2
|
+
export declare const useQuoteUpdateFeatureAddon: (quote: Quote | undefined, featureAddon: PriceListCharge) => {
|
|
3
3
|
handleAddFeatureAddon: () => void;
|
|
4
4
|
handleRemoveFeatureAddon: () => void;
|
|
5
5
|
isPending: boolean;
|
|
6
6
|
isChecked: boolean;
|
|
7
|
-
editingQuoteLoaded: boolean;
|
|
8
7
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { currentUser as CurrentUser } from '@bunnyapp/common';
|
|
2
2
|
declare const useCurrentUserData: (token: string | undefined) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
currentUser: {
|
|
4
|
+
authObjectName: any;
|
|
5
|
+
account: any;
|
|
6
|
+
companyName: any;
|
|
7
|
+
returnUrl: any;
|
|
8
|
+
privacyUrl: any;
|
|
9
|
+
termsUrl: any;
|
|
10
|
+
entityId: any;
|
|
11
|
+
} | CurrentUser;
|
|
12
|
+
isCurrentUserDataLoading: boolean;
|
|
13
|
+
};
|
|
11
14
|
export default useCurrentUserData;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PaymentMethod } from '@bunnyapp/common';
|
|
2
|
-
export declare const usePaymentMethod: ({ accountId, token, apiHost, }: {
|
|
2
|
+
export declare const usePaymentMethod: ({ accountId, token, apiHost, enabled, }: {
|
|
3
3
|
accountId?: string | undefined;
|
|
4
4
|
token?: string | undefined;
|
|
5
5
|
apiHost: string;
|
|
6
|
+
enabled?: boolean | undefined;
|
|
6
7
|
}) => {
|
|
7
8
|
paymentMethods: PaymentMethod[];
|
|
8
9
|
defaultPaymentMethod: PaymentMethod | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Subscription } from '@bunnyapp/common';
|
|
2
|
+
declare const usePriceListChangeOptions: (onChangePlanClick?: ((subscription: Subscription) => void) | undefined) => {
|
|
3
|
+
priceListChangeOptions: any;
|
|
4
|
+
arePriceListChangeOptionsLoading: boolean;
|
|
5
|
+
};
|
|
6
|
+
export default usePriceListChangeOptions;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Plan, PriceList, Quote } from '@bunnyapp/common';
|
|
2
|
+
export declare const useToggleAddonPlan: (quote: Quote | undefined, plan: Plan, billingPeriod: number, selectedPriceList: PriceList, setIsAddonPlanLoading: React.Dispatch<React.SetStateAction<boolean>>) => {
|
|
3
|
+
isPending: boolean;
|
|
4
|
+
addedQuoteChange: boolean;
|
|
5
|
+
deleteQuoteChange: () => void;
|
|
6
|
+
addAddonQuoteChange: () => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Plan, PriceList, Subscription } from '@bunnyapp/common';
|
|
2
|
+
export declare const ADDON_INDENTATION = 64;
|
|
3
|
+
export declare function findNonAddonSubscriptions(subscriptions: Subscription[]): Subscription[];
|
|
4
|
+
export declare function findAddonSubscriptions(parentSubscription: Subscription, subscriptions: Subscription[]): Subscription[];
|
|
5
|
+
export declare function hasUnpurchasedAddonPlans(priceList: PriceList, currentSubscription: Subscription | undefined): boolean | undefined;
|
|
6
|
+
export declare function addonPlanSwitchTestId(addonPlan: Plan): string;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { PriceList, PriceListCharge, Subscription } from '@bunnyapp/common';
|
|
1
|
+
import { PriceList, PriceListCharge, Quote, Subscription } from '@bunnyapp/common';
|
|
2
2
|
export declare function isAddonPurchased(featureAddon: PriceListCharge, currentSubscription: Subscription | undefined): boolean;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function hasUnpurchasedFeatureAddons(priceList: PriceList, currentSubscription: Subscription | undefined): boolean;
|
|
4
|
+
export declare function findQuoteChangeForFeatureAddon(quote: Quote): import("@bunnyapp/common").QuoteChange | undefined;
|
|
5
|
+
export declare function featureAddonInQuote(selectedPriceList: PriceList, priceListCharge: PriceListCharge, quote?: Quote): boolean;
|
|
6
|
+
export declare function featureAddonSwitchTestId(featureAddon: PriceListCharge): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,10 @@ type InvoiceQuoteContextProps = {
|
|
|
22
22
|
onQuoteLoaded?: (formattedQuote: FormattedQuote) => void;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
type InvoiceProps = InvoiceQuoteContextProps & {
|
|
26
|
+
hidePaymentForm?: boolean;
|
|
27
|
+
};
|
|
28
|
+
declare function Invoice({ id, invoiceQuoteViewComponent, backButtonName, onBackButtonClick, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, hidePaymentForm, onInvoiceLoaded, }: InvoiceProps): react_jsx_runtime.JSX.Element;
|
|
26
29
|
|
|
27
30
|
declare global {
|
|
28
31
|
interface Window {
|
|
@@ -70,7 +73,7 @@ declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuot
|
|
|
70
73
|
noQuotesMessage?: string;
|
|
71
74
|
}): react_jsx_runtime.JSX.Element;
|
|
72
75
|
|
|
73
|
-
declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction,
|
|
76
|
+
declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, paymentHoldOptions, }: {
|
|
74
77
|
invoice?: FormattedInvoice | Invoice$1 | undefined;
|
|
75
78
|
quote?: Quote$1 | undefined;
|
|
76
79
|
onFail: (error: any) => void;
|
|
@@ -82,7 +85,6 @@ declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSu
|
|
|
82
85
|
accountId?: string | undefined;
|
|
83
86
|
overrideToken?: string | undefined;
|
|
84
87
|
customCheckoutFunction?: ((plugin: PluginData | undefined) => Promise<any>) | undefined;
|
|
85
|
-
currencyId?: string | undefined;
|
|
86
88
|
paymentHoldOptions?: {
|
|
87
89
|
payToAccept?: boolean | undefined;
|
|
88
90
|
amountToHold?: number | undefined;
|
|
@@ -128,7 +130,7 @@ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token
|
|
|
128
130
|
|
|
129
131
|
type TransactionDateType = 'createdAt' | 'issuedAt' | 'dueAt';
|
|
130
132
|
|
|
131
|
-
declare function Transactions({ transactionComponent, showSearchBar, showTitle, title, columns, className, shadow, searchBarClassName, useModal, onTransactionClick, suppressTransactionDisplay, kindsToShow, style, filter, noTransactionsMessage, filterTransactions, sortTransactions, transactionDateType, }: {
|
|
133
|
+
declare function Transactions({ transactionComponent, showSearchBar, showTitle, title, columns, className, shadow, searchBarClassName, useModal, onTransactionClick, suppressTransactionDisplay, kindsToShow, style, filter, noTransactionsMessage, filterTransactions, sortTransactions, transactionDateType, hidePaymentForm, }: {
|
|
132
134
|
/** A custom component to render instead of the default invoice component */
|
|
133
135
|
transactionComponent?: react__default.ReactNode;
|
|
134
136
|
/** Whether to show the search bar */
|
|
@@ -170,6 +172,8 @@ declare function Transactions({ transactionComponent, showSearchBar, showTitle,
|
|
|
170
172
|
sortTransactions?: (transactionA: Transaction, transactionB: Transaction) => number;
|
|
171
173
|
/** The type of date to display for transactions if applicable. Payments will always only show createdAt date. */
|
|
172
174
|
transactionDateType?: TransactionDateType;
|
|
175
|
+
/** Whether to hide the payment form on invoices */
|
|
176
|
+
hidePaymentForm?: boolean;
|
|
173
177
|
}): react_jsx_runtime.JSX.Element;
|
|
174
178
|
|
|
175
179
|
declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPreviewMode, productId, className, styles: userStyles, noSubscriptionsComponent, hideTitle, hideExpired, hideExpiredToggle, }: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bunnyapp/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0-beta.2",
|
|
4
4
|
"description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@ant-design/icons": "^5.6.1",
|
|
67
|
-
"@bunnyapp/common": "1.3.0-beta.
|
|
67
|
+
"@bunnyapp/common": "1.3.0-beta.11",
|
|
68
68
|
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
69
69
|
"@fortawesome/free-brands-svg-icons": "^6.7.2",
|
|
70
70
|
"@fortawesome/free-regular-svg-icons": "^6.7.2",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PriceList } from '@bunnyapp/common';
|
|
3
|
-
export type QuotePreviewData = {
|
|
4
|
-
priceList?: PriceList;
|
|
5
|
-
quantity?: number;
|
|
6
|
-
editingQuoteId?: string;
|
|
7
|
-
};
|
|
8
|
-
export type QuotePreviewContextValues = {
|
|
9
|
-
quotePreviewData?: QuotePreviewData;
|
|
10
|
-
setQuotePreviewData: React.Dispatch<React.SetStateAction<QuotePreviewData | undefined>>;
|
|
11
|
-
handleSetEditingQuote: (editingQuoteId: string) => void;
|
|
12
|
-
};
|
|
13
|
-
export declare const QuotePreviewContext: import("react").Context<QuotePreviewContextValues>;
|
|
14
|
-
declare function QuotePreviewProvider({ children }: {
|
|
15
|
-
children: React.ReactNode;
|
|
16
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export default QuotePreviewProvider;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PriceList } from '@bunnyapp/common';
|
|
3
|
-
export type QuotePreviewData = {
|
|
4
|
-
priceList?: PriceList;
|
|
5
|
-
quantity?: number;
|
|
6
|
-
editingQuoteId?: string;
|
|
7
|
-
};
|
|
8
|
-
export type QuotePreviewContextValues = {
|
|
9
|
-
quotePreviewData?: QuotePreviewData;
|
|
10
|
-
setQuotePreviewData: React.Dispatch<React.SetStateAction<QuotePreviewData | undefined>>;
|
|
11
|
-
handleSetEditingQuote: (editingQuoteId: string) => void;
|
|
12
|
-
};
|
|
13
|
-
export declare const QuotePreviewContext: import("react").Context<QuotePreviewContextValues>;
|
|
14
|
-
declare function QuotePreviewProvider({ children }: {
|
|
15
|
-
children: React.ReactNode;
|
|
16
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export default QuotePreviewProvider;
|