@bunnyapp/components 1.5.0-beta.10 → 1.5.0-beta.11.1

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.
Files changed (24) hide show
  1. package/dist/cjs/index.js +87 -79
  2. package/dist/cjs/src/components/PaymentForm/hooks/useHasActiveSubscription.d.ts +1 -1
  3. package/dist/cjs/src/components/Subscriptions/Subscriptions.d.ts +1 -1
  4. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +1 -1
  5. package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +2 -2
  6. package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuantityInput.d.ts +2 -2
  7. package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +2 -1
  8. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +1 -0
  9. package/dist/cjs/src/graphql/QuoteRequests.d.ts +1 -1
  10. package/dist/cjs/src/graphql/queries/getSubscriptions.d.ts +2 -1
  11. package/dist/cjs/src/hooks/usePriceListChangeOptions.d.ts +4 -1
  12. package/dist/esm/index.js +88 -80
  13. package/dist/esm/src/components/PaymentForm/hooks/useHasActiveSubscription.d.ts +1 -1
  14. package/dist/esm/src/components/Subscriptions/Subscriptions.d.ts +1 -1
  15. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +1 -1
  16. package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +2 -2
  17. package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuantityInput.d.ts +2 -2
  18. package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +2 -1
  19. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +1 -0
  20. package/dist/esm/src/graphql/QuoteRequests.d.ts +1 -1
  21. package/dist/esm/src/graphql/queries/getSubscriptions.d.ts +2 -1
  22. package/dist/esm/src/hooks/usePriceListChangeOptions.d.ts +4 -1
  23. package/dist/index.d.ts +1 -1
  24. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  declare function useHasActiveSubscription({ token, apiHost, }: {
2
2
  token: string;
3
3
  apiHost: string;
4
- }): any;
4
+ }): boolean | undefined;
5
5
  export default useHasActiveSubscription;
@@ -11,7 +11,7 @@ declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPrev
11
11
  className?: string | undefined;
12
12
  styles?: {
13
13
  gap?: number | undefined;
14
- shadow?: "none" | "lg" | "md" | "sm" | undefined;
14
+ shadow?: "none" | "sm" | "md" | "lg" | undefined;
15
15
  subscriptionProductNameStyle?: import("react").CSSProperties | undefined;
16
16
  } | undefined;
17
17
  noSubscriptionsComponent?: React.ReactNode;
@@ -43,7 +43,7 @@ export declare const filterUniqueFeatures: ({ availablePriceLists, }: {
43
43
  isVisible?: boolean | undefined;
44
44
  monthlyBasePrice: number;
45
45
  name: string;
46
- periodMonths: 0 | 1 | 3 | 6 | 12;
46
+ periodMonths: 0 | 1 | 6 | 3 | 12;
47
47
  planId: string;
48
48
  priceAdjustmentAction?: import("@bunnyapp/common").PriceAdjustmentAction | undefined;
49
49
  priceAdjustmentActionOptions?: string[] | undefined;
@@ -1,13 +1,13 @@
1
1
  import { Quote, Subscription, SubscriptionCharge } from '@bunnyapp/common';
2
- declare const QuantityChangeGridRow: ({ chargeIndex, editingQuote, subscriptions, subscriptionIndex, setEditingQuoteData, subscription, subscriptionCharge, setUpdatingChargeQuantityId, updatingChargeQuantityId, }: {
2
+ declare const QuantityChangeGridRow: ({ chargeIndex, editingQuote, subscriptionIndex, setEditingQuoteData, subscription, subscriptionCharge, setUpdatingChargeQuantityId, updatingChargeQuantityId, setErrorUpdatingQuantity, }: {
3
3
  chargeIndex: number;
4
4
  editingQuote?: Quote | undefined;
5
- subscriptions: Subscription[];
6
5
  subscriptionIndex: number;
7
6
  setEditingQuoteData: (value: any) => void;
8
7
  subscription: Subscription;
9
8
  subscriptionCharge: SubscriptionCharge;
10
9
  setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
11
10
  updatingChargeQuantityId: string | undefined;
11
+ setErrorUpdatingQuantity: (errorUpdatingQuantity: boolean) => void;
12
12
  }) => import("react/jsx-runtime").JSX.Element | null;
13
13
  export default QuantityChangeGridRow;
@@ -6,7 +6,7 @@ export type EditingSubscriptionType = {
6
6
  subscription: Subscription;
7
7
  subscriptionIndex: number;
8
8
  };
9
- declare const QuantityInput: ({ charge, chargeIndex, editingQuote, setEditingQuoteData, subscription, subscriptionIndex, subscriptions, setUpdatingChargeQuantityId, updatingChargeQuantityId, }: {
9
+ declare const QuantityInput: ({ charge, chargeIndex, editingQuote, setEditingQuoteData, subscription, subscriptionIndex, setUpdatingChargeQuantityId, updatingChargeQuantityId, setErrorUpdatingQuantity, }: {
10
10
  charge: SubscriptionCharge;
11
11
  chargeIndex: number;
12
12
  editingQuote?: Quote | undefined;
@@ -16,8 +16,8 @@ declare const QuantityInput: ({ charge, chargeIndex, editingQuote, setEditingQuo
16
16
  } | undefined) => void;
17
17
  subscription: Subscription;
18
18
  subscriptionIndex: number;
19
- subscriptions: Subscription[];
20
19
  setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
21
20
  updatingChargeQuantityId: string | undefined;
21
+ setErrorUpdatingQuantity: (errorUpdatingQuantity: boolean) => void;
22
22
  }) => import("react/jsx-runtime").JSX.Element;
23
23
  export default QuantityInput;
@@ -1,9 +1,10 @@
1
1
  import { Quote } from '@bunnyapp/common';
2
2
  import { EditingQuoteDataType } from '../SubscriptionsListContainer';
3
- declare const QuoteChangeSummarySection: ({ editingQuote, editingQuoteData, openCheckout, setEditingQuoteData, }: {
3
+ declare const QuoteChangeSummarySection: ({ editingQuote, editingQuoteData, openCheckout, setEditingQuoteData, errorUpdatingQuantity, }: {
4
4
  editingQuote?: Quote | undefined;
5
5
  editingQuoteData?: EditingQuoteDataType | undefined;
6
6
  openCheckout: () => void;
7
7
  setEditingQuoteData: (editingQuoteData: EditingQuoteDataType | undefined) => void;
8
+ errorUpdatingQuantity: boolean;
8
9
  }) => import("react/jsx-runtime").JSX.Element;
9
10
  export default QuoteChangeSummarySection;
@@ -25,3 +25,4 @@ export declare const isDiscount: (kind?: QuoteChangeKind) => boolean;
25
25
  export declare const hasPriceTiers: (charge: SubscriptionCharge) => boolean;
26
26
  export declare const hasMultiplePriceTiers: (charge: SubscriptionCharge) => boolean;
27
27
  export declare const getApplicablePriceTier: (charge: SubscriptionCharge, currencyId: string, priceDecimals: number) => string;
28
+ export declare const getUpdatingChargeQuantityId: (charge: SubscriptionCharge, subscription: Subscription) => string;
@@ -8,7 +8,7 @@ export declare const useCreateSubscriptionQuote: () => (subscriptionIds: string[
8
8
  export declare const useQuoteChangeUpdate: () => (charges: {
9
9
  id: string;
10
10
  quantity: number;
11
- }[], quoteChangeId: string, apiHost: string, token?: string) => Promise<unknown>;
11
+ }[], quoteChangeId: string, apiHost: string, token?: string) => Promise<any>;
12
12
  export declare const useQuoteDelete: () => (quoteId: string, apiHost: string, token?: string) => Promise<unknown>;
13
13
  export declare const quoteSubscriptionAddon: ({ subscriptionId, priceListId, apiHost, token, }: {
14
14
  subscriptionId: string;
@@ -1,6 +1,7 @@
1
+ import { Subscription } from '@bunnyapp/common';
1
2
  declare const getSubscriptions: ({ apiHost, isInPreviewMode, token, }: {
2
3
  apiHost: string;
3
4
  isInPreviewMode?: boolean | undefined;
4
5
  token?: string | undefined;
5
- }) => Promise<any>;
6
+ }) => Promise<Subscription[]>;
6
7
  export default getSubscriptions;
@@ -1,5 +1,8 @@
1
1
  import { Subscription } from '@bunnyapp/common';
2
- declare const usePriceListChangeOptions: (onChangePlanClick?: ((subscription: Subscription) => void) | undefined) => {
2
+ declare const usePriceListChangeOptions: ({ subscription, onChangePlanClick, }: {
3
+ subscription?: Subscription | undefined;
4
+ onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
5
+ }) => {
3
6
  priceListChangeOptions: import("@bunnyapp/common").PriceListChangeOptions | undefined;
4
7
  arePriceListChangeOptionsLoading: boolean;
5
8
  };
package/dist/index.d.ts CHANGED
@@ -184,7 +184,7 @@ declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPrev
184
184
  className?: string | undefined;
185
185
  styles?: {
186
186
  gap?: number | undefined;
187
- shadow?: "none" | "lg" | "md" | "sm" | undefined;
187
+ shadow?: "none" | "sm" | "md" | "lg" | undefined;
188
188
  subscriptionProductNameStyle?: react.CSSProperties | undefined;
189
189
  } | undefined;
190
190
  noSubscriptionsComponent?: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.5.0-beta.10",
3
+ "version": "1.5.0-beta.11.1",
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.5.0-beta.3",
67
+ "@bunnyapp/common": "1.5.0-beta.4",
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",