@bunnyapp/components 1.8.2 → 1.8.4
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 +51 -0
- package/dist/cjs/index.js +151 -30957
- package/dist/cjs/types/src/components/BillingDetails/BillingDetails.d.ts +2 -5
- package/dist/cjs/types/src/components/BillingDetails/BillingDetails.stories.d.ts +2 -4
- package/dist/cjs/types/src/components/BunnyProvider/BunnyProvider.d.ts +2 -1
- package/dist/cjs/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +2 -0
- package/dist/cjs/types/src/components/Invoice/Invoice.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +4 -6
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Collapsible.d.ts +7 -0
- package/dist/cjs/types/src/components/PaymentForm/constants.d.ts +1 -0
- package/dist/cjs/types/src/components/PaymentForm/context/CallbacksContext.d.ts +1 -1
- package/dist/cjs/types/src/components/Quote/Quote.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Quote/components/QuoteButtons.d.ts +5 -0
- package/dist/cjs/types/src/components/Quotes/Quotes.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Signup/Signup.d.ts +4 -9
- package/dist/cjs/types/src/components/Signup/Signup.stories.d.ts +1 -2
- package/dist/cjs/types/src/components/Signup/SignupContent.d.ts +1 -1
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +0 -2
- package/dist/cjs/types/src/components/Signup/components/LoadingOverlay.d.ts +4 -0
- package/dist/cjs/types/src/components/Signup/components/PriceListDisplay.d.ts +11 -1
- package/dist/cjs/types/src/components/Signup/components/QuoteCreateButton.d.ts +1 -4
- package/dist/cjs/types/src/components/Signup/consts.d.ts +1 -0
- package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +0 -1
- package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +3 -2
- package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +1 -10
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +1 -4
- package/dist/cjs/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +8 -1
- package/dist/cjs/types/src/components/Signup/queries/getSignupQuote.d.ts +10 -0
- package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuote.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Subscriptions.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/GridTemplateColumnsWrapper.d.ts +2 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/PlanFeatures.d.ts +8 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureGroup.d.ts +9 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureTitle.d.ts +6 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/Upgrade.stories.d.ts +12 -0
- package/dist/cjs/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +0 -2
- package/dist/cjs/types/src/components/Subscriptions/queries/getSubscriptionChargeHistograms.d.ts +16 -0
- package/dist/cjs/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +0 -184
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +3 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionListSkeleton.d.ts +4 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +2 -10
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/UsageCell.d.ts +8 -0
- package/dist/cjs/types/src/components/Transactions/Transactions.stories.d.ts +1 -1
- package/dist/cjs/types/src/hooks/useAllErrorFormats.d.ts +2 -1
- package/dist/cjs/types/src/hooks/useIsExpired.d.ts +2 -1
- package/dist/cjs/types/src/hooks/useIsVisible.d.ts +4 -0
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +9 -1
- package/dist/esm/index.js +151 -30944
- package/dist/esm/types/src/components/BillingDetails/BillingDetails.d.ts +2 -5
- package/dist/esm/types/src/components/BillingDetails/BillingDetails.stories.d.ts +2 -4
- package/dist/esm/types/src/components/BunnyProvider/BunnyProvider.d.ts +2 -1
- package/dist/esm/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +2 -0
- package/dist/esm/types/src/components/Invoice/Invoice.stories.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +4 -6
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Collapsible.d.ts +7 -0
- package/dist/esm/types/src/components/PaymentForm/constants.d.ts +1 -0
- package/dist/esm/types/src/components/PaymentForm/context/CallbacksContext.d.ts +1 -1
- package/dist/esm/types/src/components/Quote/Quote.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Quote/components/QuoteButtons.d.ts +5 -0
- package/dist/esm/types/src/components/Quotes/Quotes.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Signup/Signup.d.ts +4 -9
- package/dist/esm/types/src/components/Signup/Signup.stories.d.ts +1 -2
- package/dist/esm/types/src/components/Signup/SignupContent.d.ts +1 -1
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +0 -2
- package/dist/esm/types/src/components/Signup/components/LoadingOverlay.d.ts +4 -0
- package/dist/esm/types/src/components/Signup/components/PriceListDisplay.d.ts +11 -1
- package/dist/esm/types/src/components/Signup/components/QuoteCreateButton.d.ts +1 -4
- package/dist/esm/types/src/components/Signup/consts.d.ts +1 -0
- package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +0 -1
- package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +3 -2
- package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +1 -10
- package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +1 -4
- package/dist/esm/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +8 -1
- package/dist/esm/types/src/components/Signup/queries/getSignupQuote.d.ts +10 -0
- package/dist/esm/types/src/components/Signup/signup-quote/SignupQuote.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Subscriptions.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/GridTemplateColumnsWrapper.d.ts +2 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/PlanFeatures.d.ts +8 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureGroup.d.ts +9 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureTitle.d.ts +6 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/Upgrade.stories.d.ts +12 -0
- package/dist/esm/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +0 -2
- package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptionChargeHistograms.d.ts +16 -0
- package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +0 -184
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +3 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionListSkeleton.d.ts +4 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +2 -10
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/UsageCell.d.ts +8 -0
- package/dist/esm/types/src/components/Transactions/Transactions.stories.d.ts +1 -1
- package/dist/esm/types/src/hooks/useAllErrorFormats.d.ts +2 -1
- package/dist/esm/types/src/hooks/useIsExpired.d.ts +2 -1
- package/dist/esm/types/src/hooks/useIsVisible.d.ts +4 -0
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +9 -1
- package/dist/index.d.ts +12 -19
- package/package.json +19 -15
- package/dist/cjs/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +0 -46
- package/dist/esm/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +0 -46
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { FragmentOf } from 'gql.tada';
|
|
2
2
|
export declare const SubscriptionChargeUnitPrice_SubscriptionChargeFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
3
|
trial: boolean;
|
|
4
|
+
price: string | null;
|
|
4
5
|
discountedPrice: string | null;
|
|
5
6
|
priceDecimals: number | null;
|
|
6
7
|
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
8
|
+
chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
|
|
7
9
|
pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
|
|
10
|
+
isAmendment: boolean;
|
|
8
11
|
priceTiers: {
|
|
9
12
|
starts: number | null;
|
|
10
13
|
price: number | null;
|
|
@@ -10,15 +10,6 @@ export declare const SubscriptionCardDesktopRow_SubscriptionChargeFragment: impo
|
|
|
10
10
|
quantity: number | null;
|
|
11
11
|
name: string | null;
|
|
12
12
|
isAmendment: boolean;
|
|
13
|
-
histogram: {
|
|
14
|
-
feature: {
|
|
15
|
-
id: string;
|
|
16
|
-
name: string;
|
|
17
|
-
};
|
|
18
|
-
[$tada.fragmentRefs]: {
|
|
19
|
-
FeatureUsageGraph_HistogramFragment: "Histogram";
|
|
20
|
-
};
|
|
21
|
-
} | null;
|
|
22
13
|
[$tada.fragmentRefs]: {
|
|
23
14
|
SubscriptionChargeTotal_SubscriptionChargeFragment: "SubscriptionCharge";
|
|
24
15
|
} & {
|
|
@@ -31,9 +22,10 @@ export declare const SubscriptionCardDesktopRow_SubscriptionChargeFragment: impo
|
|
|
31
22
|
on: "SubscriptionCharge";
|
|
32
23
|
masked: true;
|
|
33
24
|
}>;
|
|
34
|
-
export declare const SubscriptionCardDesktopRow: ({ charge: maskedCharge, chargeIndex, charges: maskedCharges, currencyId, }: {
|
|
25
|
+
export declare const SubscriptionCardDesktopRow: ({ charge: maskedCharge, chargeIndex, charges: maskedCharges, currencyId, subscriptionId, }: {
|
|
35
26
|
charge: FragmentOf<typeof SubscriptionCardDesktopRow_SubscriptionChargeFragment>;
|
|
36
27
|
chargeIndex: number;
|
|
37
28
|
charges: FragmentOf<typeof SubscriptionCardDesktopRow_SubscriptionChargeFragment>[];
|
|
38
29
|
currencyId: string;
|
|
30
|
+
subscriptionId: string;
|
|
39
31
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FeatureUsageGraph_SubscriptionChargeFragment } from '@/components/FeatureUsageGraph';
|
|
2
|
+
import { FragmentOf } from 'gql.tada';
|
|
3
|
+
declare const UsageCell: ({ subscriptionId, priceListChargeId, charge, }: {
|
|
4
|
+
subscriptionId: string;
|
|
5
|
+
priceListChargeId: string;
|
|
6
|
+
charge: FragmentOf<typeof FeatureUsageGraph_SubscriptionChargeFragment>;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export default UsageCell;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export declare const useAllErrorFormats: ({ onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification }?: {
|
|
1
|
+
export declare const useAllErrorFormats: ({ onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, disableErrorNotifications }?: {
|
|
2
2
|
onUserUnavailable?: () => void;
|
|
3
3
|
onInvalidOrMissingAuthorization?: () => void;
|
|
4
4
|
suppressUserUnavailableErrorNotification?: boolean;
|
|
5
|
+
disableErrorNotifications?: boolean;
|
|
5
6
|
}) => (error: any, mutationName?: string) => any;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
export declare const isExpired: (expiresAt?: string | null, timezone?: string | null) => boolean;
|
|
2
|
+
declare const useIsExpired: (expiresAt?: string, timezone?: string | null) => boolean;
|
|
2
3
|
export default useIsExpired;
|
|
@@ -106,6 +106,14 @@ declare const QueryKeyFactory: {
|
|
|
106
106
|
token?: string;
|
|
107
107
|
}) => string[];
|
|
108
108
|
paymentPluginsKey: (token?: string) => string[];
|
|
109
|
-
|
|
109
|
+
subscriptionChargeHistogramsKey: ({ subscriptionId, token, }: {
|
|
110
|
+
subscriptionId: string;
|
|
111
|
+
token?: string;
|
|
112
|
+
}) => string[];
|
|
113
|
+
signupAccount: (token?: string) => string[];
|
|
114
|
+
signupPriceList: (code?: string, token?: string) => string[];
|
|
110
115
|
};
|
|
111
116
|
export default QueryKeyFactory;
|
|
117
|
+
export declare const MutationKeyFactory: {
|
|
118
|
+
quoteAccountSignup: readonly ["quoteAccountSignup"];
|
|
119
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -173,7 +173,7 @@ declare const PaymentForm_InvoiceFragment: gql_tada.TadaDocumentNode<{
|
|
|
173
173
|
on: "Invoice";
|
|
174
174
|
masked: true;
|
|
175
175
|
}>;
|
|
176
|
-
declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess,
|
|
176
|
+
declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, checkoutPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, customCheckoutFunction, children, }: {
|
|
177
177
|
currencyId?: string;
|
|
178
178
|
invoice?: FragmentOf<typeof PaymentForm_InvoiceFragment>;
|
|
179
179
|
quote?: FragmentOf<typeof PaymentForm_QuoteFragment>;
|
|
@@ -183,17 +183,15 @@ declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maske
|
|
|
183
183
|
};
|
|
184
184
|
onPaymentSuccess?: (response: any) => void;
|
|
185
185
|
onPaymentHoldSuccess?: (response: any) => void;
|
|
186
|
-
/**
|
|
187
|
-
|
|
188
|
-
*/
|
|
189
|
-
paymentHoldPrecondition?: () => boolean | Promise<boolean>;
|
|
186
|
+
/** Precondition that must pass before checking out free/trial/paid/payment-hold quotes. */
|
|
187
|
+
checkoutPrecondition?: () => boolean | Promise<boolean>;
|
|
190
188
|
onSavePaymentMethod?: (response: any) => void;
|
|
191
189
|
onPaymentMethodRemoved?: (paymentMethod: PaymentMethodFragment) => void;
|
|
192
190
|
onSetDefaultPaymentMethod?: () => void;
|
|
193
191
|
accountId?: string;
|
|
194
192
|
customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
|
|
195
193
|
children?: ReactNode | ((state: PaymentFormRenderState) => ReactNode);
|
|
196
|
-
}): react_jsx_runtime.JSX.Element;
|
|
194
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
197
195
|
type PaymentFormProps = ComponentProps<typeof PaymentFormRoot>;
|
|
198
196
|
type PaymentFormRenderState = {
|
|
199
197
|
hasPaymentMethods: boolean;
|
|
@@ -238,12 +236,6 @@ type SignupProps = {
|
|
|
238
236
|
priceListCode: string;
|
|
239
237
|
/** If trial is allowed on priceList, enableTrial will enable the trial for the signup */
|
|
240
238
|
enableTrial?: boolean;
|
|
241
|
-
/** The URL to redirect to after the signup is complete */
|
|
242
|
-
returnUrl?: string;
|
|
243
|
-
/** A custom class name to apply to the component */
|
|
244
|
-
className?: string;
|
|
245
|
-
/** The shadow level to apply to the component */
|
|
246
|
-
shadow?: ShadowType;
|
|
247
239
|
/** A custom style to apply to the component */
|
|
248
240
|
style?: React.CSSProperties;
|
|
249
241
|
/** The default form values to use for the signup */
|
|
@@ -252,12 +244,14 @@ type SignupProps = {
|
|
|
252
244
|
paymentRequiredToAcceptQuote?: boolean;
|
|
253
245
|
/** The document template ID to apply to the quote for the signup */
|
|
254
246
|
documentTemplateId?: string;
|
|
255
|
-
/** Which account billing fields to show and require
|
|
247
|
+
/** Which account billing fields to show and require */
|
|
256
248
|
requiredBillingDetails?: RequiredBillingDetailsFlags;
|
|
249
|
+
/** A default coupon code to pre-apply to the checkout */
|
|
250
|
+
defaultCouponCode?: string;
|
|
257
251
|
};
|
|
258
|
-
declare function Signup({ priceListCode, enableTrial,
|
|
252
|
+
declare function Signup({ priceListCode, enableTrial, style, defaultFormValues, paymentRequiredToAcceptQuote, documentTemplateId, requiredBillingDetails, defaultCouponCode, }: SignupProps): react_jsx_runtime.JSX.Element;
|
|
259
253
|
|
|
260
|
-
declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, configProviderProps, }: {
|
|
254
|
+
declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, disableErrorNotifications, configProviderProps, }: {
|
|
261
255
|
children: React.ReactNode;
|
|
262
256
|
darkMode?: boolean;
|
|
263
257
|
queryClient?: QueryClient;
|
|
@@ -267,6 +261,7 @@ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token
|
|
|
267
261
|
onUserUnavailable?: () => void;
|
|
268
262
|
onInvalidOrMissingAuthorization?: () => void;
|
|
269
263
|
suppressUserUnavailableErrorNotification?: boolean;
|
|
264
|
+
disableErrorNotifications?: boolean;
|
|
270
265
|
configProviderProps?: ThemeConfig | undefined;
|
|
271
266
|
}): react_jsx_runtime.JSX.Element;
|
|
272
267
|
|
|
@@ -353,17 +348,15 @@ declare const UpgradeWrapper: ({ onChangePlanCancel, handlePortalErrors, onPayme
|
|
|
353
348
|
defaultBillingPeriod?: "ONCE" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL";
|
|
354
349
|
}) => react_jsx_runtime.JSX.Element | null;
|
|
355
350
|
|
|
356
|
-
declare const BillingDetails: ({
|
|
357
|
-
className?: string;
|
|
351
|
+
declare const BillingDetails: ({ countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isUpgradeFromTrial, style, onSavePaymentMethod, onPaymentMethodRemoved, }: {
|
|
358
352
|
countryListFilter?: (country: {
|
|
359
353
|
value: string;
|
|
360
354
|
label: string;
|
|
361
355
|
}) => boolean;
|
|
362
356
|
hideBillingDetailsForm?: boolean;
|
|
363
357
|
hidePaymentMethodForm?: boolean;
|
|
364
|
-
isCardEnabled?: boolean;
|
|
365
358
|
isUpgradeFromTrial?: boolean;
|
|
366
|
-
|
|
359
|
+
style?: React.CSSProperties;
|
|
367
360
|
onSavePaymentMethod?: (paymentMethodId: string) => void;
|
|
368
361
|
onPaymentMethodRemoved?: (paymentMethodId: string) => void;
|
|
369
362
|
}) => react_jsx_runtime.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bunnyapp/components",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.4",
|
|
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",
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"types": "dist/index.d.ts",
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "npm run clean && rollup -c",
|
|
13
|
+
"build": "npm run clean && NODE_ENV=production rollup -c",
|
|
14
14
|
"build-dev": "npm run clean && rollup -c -w",
|
|
15
|
+
"analyze": "npm run clean && NODE_ENV=production ANALYZE=true rollup -c",
|
|
16
|
+
"analyze-storybook": "ANALYZE=true storybook build",
|
|
15
17
|
"build-storybook": "storybook build",
|
|
16
18
|
"clean": "rimraf dist",
|
|
17
19
|
"storybook": "storybook dev -p 6006",
|
|
@@ -27,7 +29,7 @@
|
|
|
27
29
|
"author": "Bunny",
|
|
28
30
|
"license": "ISC",
|
|
29
31
|
"devDependencies": {
|
|
30
|
-
"@chromatic-com/storybook": "^
|
|
32
|
+
"@chromatic-com/storybook": "^5.2.1",
|
|
31
33
|
"@fontsource-variable/inter": "^5.2.8",
|
|
32
34
|
"@parcel/watcher": "^2.5.1",
|
|
33
35
|
"@rollup/plugin-commonjs": "^28.0.8",
|
|
@@ -36,15 +38,12 @@
|
|
|
36
38
|
"@rollup/plugin-replace": "^6.0.2",
|
|
37
39
|
"@rollup/plugin-terser": "^1.0.0",
|
|
38
40
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
39
|
-
"@storybook/addon-
|
|
40
|
-
"@storybook/addon-
|
|
41
|
-
"@storybook/
|
|
42
|
-
"@storybook/
|
|
43
|
-
"@storybook/react": "^8.6.14",
|
|
44
|
-
"@storybook/react-vite": "^8.6.14",
|
|
45
|
-
"@storybook/test": "^8.6.14",
|
|
41
|
+
"@storybook/addon-docs": "^10.4.0",
|
|
42
|
+
"@storybook/addon-onboarding": "^10.4.0",
|
|
43
|
+
"@storybook/react": "^10.4.0",
|
|
44
|
+
"@storybook/react-vite": "^10.4.0",
|
|
46
45
|
"@tanstack/eslint-plugin-query": "^5.91.2",
|
|
47
|
-
"@tanstack/react-query-devtools": "
|
|
46
|
+
"@tanstack/react-query-devtools": "5.75.4",
|
|
48
47
|
"@types/lodash": "^4.17.20",
|
|
49
48
|
"@types/lodash-es": "^4.17.12",
|
|
50
49
|
"@types/node": "^24.10.0",
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
"@vitejs/plugin-react": "^4.7.0",
|
|
55
54
|
"autoprefixer": "^10.4.21",
|
|
56
55
|
"dependency-cruiser": "^16.10.4",
|
|
57
|
-
"eslint-plugin-storybook": "^
|
|
56
|
+
"eslint-plugin-storybook": "^10.4.0",
|
|
58
57
|
"glob": "^11.0.3",
|
|
59
58
|
"gql.tada": "^1.9.0",
|
|
60
59
|
"less": "^4.4.2",
|
|
@@ -62,13 +61,14 @@
|
|
|
62
61
|
"patch-package": "^8.0.1",
|
|
63
62
|
"postcss-import": "^16.1.1",
|
|
64
63
|
"postcss-less": "^6.0.0",
|
|
65
|
-
"postcss-url": "^
|
|
64
|
+
"postcss-url": "^10.1.3",
|
|
66
65
|
"rimraf": "^6.1.2",
|
|
67
66
|
"rollup": "^3.29.5",
|
|
68
67
|
"rollup-plugin-dts": "^6.2.3",
|
|
69
68
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
70
69
|
"rollup-plugin-postcss": "^4.0.2",
|
|
71
|
-
"
|
|
70
|
+
"rollup-plugin-visualizer": "^7.0.1",
|
|
71
|
+
"storybook": "^10.4.0",
|
|
72
72
|
"tailwindcss": "^3.4.18",
|
|
73
73
|
"typescript": "^5.9.3",
|
|
74
74
|
"vite": "^6.4.1"
|
|
@@ -81,9 +81,10 @@
|
|
|
81
81
|
"@fortawesome/free-solid-svg-icons": "^7.0.0",
|
|
82
82
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
83
83
|
"@pdf-viewer/react": "^1.8.0",
|
|
84
|
+
"@sentry/react": "^10.53.1",
|
|
84
85
|
"@stripe/react-stripe-js": "^3.8.1",
|
|
85
86
|
"@stripe/stripe-js": "^7.7.0",
|
|
86
|
-
"@tanstack/react-query": "
|
|
87
|
+
"@tanstack/react-query": "5.75.4",
|
|
87
88
|
"antd": "^5.28.0",
|
|
88
89
|
"graphql": "^16.11.0",
|
|
89
90
|
"graphql-request": "^6.1.0",
|
|
@@ -104,5 +105,8 @@
|
|
|
104
105
|
},
|
|
105
106
|
"dependencies": {
|
|
106
107
|
"msw-storybook-addon": "^2.0.6"
|
|
108
|
+
},
|
|
109
|
+
"overrides": {
|
|
110
|
+
"minimatch": "^9.0.0"
|
|
107
111
|
}
|
|
108
112
|
}
|
package/dist/cjs/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const useApplyDefaultCoupon_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
-
[$tada.fragmentRefs]: {
|
|
3
|
-
canApplyCoupons_QuoteFragment: "Quote";
|
|
4
|
-
};
|
|
5
|
-
}, {}, {
|
|
6
|
-
fragment: "useApplyDefaultCoupon_QuoteFragment";
|
|
7
|
-
on: "Quote";
|
|
8
|
-
masked: true;
|
|
9
|
-
}>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { FormInstance } from 'antd';
|
|
2
|
-
import type { InitialSignupFormData } from '../components/InitialSignupFormFields';
|
|
3
|
-
import { FragmentOf } from 'gql.tada';
|
|
4
|
-
import { Signup_QuoteFragment } from '../fragments/Signup_QuoteFragment';
|
|
5
|
-
type UseQuoteAccountSignupOnExitParams = {
|
|
6
|
-
form: FormInstance<InitialSignupFormData>;
|
|
7
|
-
priceListCode: string;
|
|
8
|
-
enableTrial: boolean;
|
|
9
|
-
priceList: {
|
|
10
|
-
trialAllowed?: boolean;
|
|
11
|
-
plan?: {
|
|
12
|
-
selfServiceBuy?: boolean;
|
|
13
|
-
};
|
|
14
|
-
} | null | undefined;
|
|
15
|
-
paymentRequiredToAcceptQuote?: boolean;
|
|
16
|
-
documentTemplateId?: string | undefined;
|
|
17
|
-
/** When set, account + quote already exist — do not run signup again. */
|
|
18
|
-
quoteAccountId: string | null | undefined;
|
|
19
|
-
onQuoteAccountSignupSuccess: (portalSessionToken: string, accountId: string, quote: FragmentOf<typeof Signup_QuoteFragment> | null) => void;
|
|
20
|
-
handleShowSelfServiceBuyWarning: () => void;
|
|
21
|
-
};
|
|
22
|
-
/** Runs `quoteAccountSignup` when the account form is exited (focus leaves the wrapper) or on page hide / tab switch. */
|
|
23
|
-
export declare function useQuoteAccountSignupOnExit({ form, priceListCode, enableTrial, priceList, paymentRequiredToAcceptQuote, documentTemplateId, quoteAccountId, onQuoteAccountSignupSuccess, handleShowSelfServiceBuyWarning, }: UseQuoteAccountSignupOnExitParams): {
|
|
24
|
-
onSignupFormBlur: () => Promise<void>;
|
|
25
|
-
quoteAccountSignupMutate: import("@tanstack/react-query").UseMutateFunction<{
|
|
26
|
-
account: {
|
|
27
|
-
id: string;
|
|
28
|
-
} | null;
|
|
29
|
-
quote: {
|
|
30
|
-
[$tada.fragmentRefs]: {
|
|
31
|
-
Signup_QuoteFragment: "Quote";
|
|
32
|
-
};
|
|
33
|
-
id: string | null;
|
|
34
|
-
} | null;
|
|
35
|
-
tenant: {
|
|
36
|
-
code: string | null;
|
|
37
|
-
} | null;
|
|
38
|
-
portalSessionToken: string | null;
|
|
39
|
-
errors: string[] | null;
|
|
40
|
-
} | null, Error, {
|
|
41
|
-
formData?: InitialSignupFormData;
|
|
42
|
-
accountCode?: string;
|
|
43
|
-
}, unknown>;
|
|
44
|
-
isSigningUp: boolean;
|
|
45
|
-
};
|
|
46
|
-
export {};
|
package/dist/esm/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const useApplyDefaultCoupon_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
-
[$tada.fragmentRefs]: {
|
|
3
|
-
canApplyCoupons_QuoteFragment: "Quote";
|
|
4
|
-
};
|
|
5
|
-
}, {}, {
|
|
6
|
-
fragment: "useApplyDefaultCoupon_QuoteFragment";
|
|
7
|
-
on: "Quote";
|
|
8
|
-
masked: true;
|
|
9
|
-
}>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { FormInstance } from 'antd';
|
|
2
|
-
import type { InitialSignupFormData } from '../components/InitialSignupFormFields';
|
|
3
|
-
import { FragmentOf } from 'gql.tada';
|
|
4
|
-
import { Signup_QuoteFragment } from '../fragments/Signup_QuoteFragment';
|
|
5
|
-
type UseQuoteAccountSignupOnExitParams = {
|
|
6
|
-
form: FormInstance<InitialSignupFormData>;
|
|
7
|
-
priceListCode: string;
|
|
8
|
-
enableTrial: boolean;
|
|
9
|
-
priceList: {
|
|
10
|
-
trialAllowed?: boolean;
|
|
11
|
-
plan?: {
|
|
12
|
-
selfServiceBuy?: boolean;
|
|
13
|
-
};
|
|
14
|
-
} | null | undefined;
|
|
15
|
-
paymentRequiredToAcceptQuote?: boolean;
|
|
16
|
-
documentTemplateId?: string | undefined;
|
|
17
|
-
/** When set, account + quote already exist — do not run signup again. */
|
|
18
|
-
quoteAccountId: string | null | undefined;
|
|
19
|
-
onQuoteAccountSignupSuccess: (portalSessionToken: string, accountId: string, quote: FragmentOf<typeof Signup_QuoteFragment> | null) => void;
|
|
20
|
-
handleShowSelfServiceBuyWarning: () => void;
|
|
21
|
-
};
|
|
22
|
-
/** Runs `quoteAccountSignup` when the account form is exited (focus leaves the wrapper) or on page hide / tab switch. */
|
|
23
|
-
export declare function useQuoteAccountSignupOnExit({ form, priceListCode, enableTrial, priceList, paymentRequiredToAcceptQuote, documentTemplateId, quoteAccountId, onQuoteAccountSignupSuccess, handleShowSelfServiceBuyWarning, }: UseQuoteAccountSignupOnExitParams): {
|
|
24
|
-
onSignupFormBlur: () => Promise<void>;
|
|
25
|
-
quoteAccountSignupMutate: import("@tanstack/react-query").UseMutateFunction<{
|
|
26
|
-
account: {
|
|
27
|
-
id: string;
|
|
28
|
-
} | null;
|
|
29
|
-
quote: {
|
|
30
|
-
[$tada.fragmentRefs]: {
|
|
31
|
-
Signup_QuoteFragment: "Quote";
|
|
32
|
-
};
|
|
33
|
-
id: string | null;
|
|
34
|
-
} | null;
|
|
35
|
-
tenant: {
|
|
36
|
-
code: string | null;
|
|
37
|
-
} | null;
|
|
38
|
-
portalSessionToken: string | null;
|
|
39
|
-
errors: string[] | null;
|
|
40
|
-
} | null, Error, {
|
|
41
|
-
formData?: InitialSignupFormData;
|
|
42
|
-
accountCode?: string;
|
|
43
|
-
}, unknown>;
|
|
44
|
-
isSigningUp: boolean;
|
|
45
|
-
};
|
|
46
|
-
export {};
|