@bunnyapp/components 1.0.73-beta.1 → 1.0.73-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 CHANGED
@@ -154,7 +154,7 @@ var BrandContext = react.createContext({
154
154
  });
155
155
 
156
156
  // This will be replaced at build time by rollup-plugin-replace
157
- var PACKAGE_VERSION = '1.0.73-beta.1';
157
+ var PACKAGE_VERSION = '1.0.73-beta.2';
158
158
  var createRequestHeaders = function (token) {
159
159
  var headers = common.createClientDevHeaders(token);
160
160
  // Add the components version header
@@ -234,15 +234,6 @@ var extraQueryClient = new reactQuery.QueryClient();
234
234
  function BunnyProvider(_a) {
235
235
  var children = _a.children, _b = _a.darkMode, darkMode = _b === void 0 ? false : _b, queryClient = _a.queryClient, apiHost = _a.apiHost, token = _a.token, onTokenExpired = _a.onTokenExpired, configProviderProps = _a.configProviderProps;
236
236
  var graphQLClient = createGraphQLClient(apiHost || '', token);
237
- react.useEffect(function () {
238
- var script = document.createElement('script');
239
- script.src = 'https://js.finix.com/v/1/0/6/finix.js';
240
- script.async = false;
241
- document.getElementsByTagName('head')[0].appendChild(script);
242
- return function () {
243
- document.getElementsByTagName('head')[0].removeChild(script);
244
- };
245
- }, []);
246
237
  return (jsxRuntime.jsx(BunnyContext.Provider, __assign({ value: {
247
238
  darkMode: darkMode,
248
239
  graphQLClient: graphQLClient,
@@ -945,7 +936,7 @@ function usePay(_a) {
945
936
  var handleAllErrorFormats = common.useAllErrorFormats();
946
937
  var showErrorNotification$3 = common.useErrorNotification();
947
938
  var ActualCheckoutFooter = function (_a) {
948
- var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, noPadding = _a.noPadding, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
939
+ var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
949
940
  var isMobile = common.useIsMobile();
950
941
  var _b = react.useState(false), isPaying = _b[0], setIsPaying = _b[1];
951
942
  var defaultPaymentMethod = react.useContext(PaymentContext).defaultPaymentMethod;
@@ -1067,20 +1058,20 @@ var ActualCheckoutFooter = function (_a) {
1067
1058
  });
1068
1059
  }); };
1069
1060
  if (paymentHoldOptions === null || paymentHoldOptions === void 0 ? void 0 : paymentHoldOptions.payToAccept) {
1070
- return (jsxRuntime.jsx("div", __assign({ className: "flex justify-end gap-2 ".concat(noPadding ? '' : '') }, { children: jsxRuntime.jsx(antd.Button, __assign({ className: "w-full", disabled: isPaying, onClick: function () {
1071
- handleApproveHold();
1072
- }, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Approving hold for' : 'Approve hold for', " ").concat(amountDue && currencyId ? common.formatCurrency(amountDue, currencyId) : '') })) })));
1061
+ return (jsxRuntime.jsx(antd.Button, __assign({ className: "bunny-w-full", disabled: isPaying, onClick: function () {
1062
+ handleApproveHold();
1063
+ }, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Approving hold for' : 'Approve hold for', " ").concat(amountDue && currencyId ? common.formatCurrency(amountDue, currencyId) : '') })));
1073
1064
  }
1074
- return (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-justify-end bunny-gap-2" }, { children: jsxRuntime.jsx(antd.Button, __assign({ className: "bunny-w-full", disabled: isPaying, onClick: function () {
1075
- setIsPaying(true);
1076
- handlePaymentSubmit();
1077
- }, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Paying' : 'Pay', " ").concat(amountDue && currencyId ? common.formatCurrency(amountDue, currencyId) : '') })) })));
1065
+ return (jsxRuntime.jsx(antd.Button, __assign({ className: "bunny-w-full", disabled: isPaying, onClick: function () {
1066
+ setIsPaying(true);
1067
+ handlePaymentSubmit();
1068
+ }, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Paying' : 'Pay', " ").concat(amountDue && currencyId ? common.formatCurrency(amountDue, currencyId) : '') })));
1078
1069
  };
1079
1070
  var CheckoutFooter = function (_a) {
1080
- var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, noPadding = _a.noPadding, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
1071
+ var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
1081
1072
  if (!plugin)
1082
1073
  return null;
1083
- return (jsxRuntime.jsx(ActualCheckoutFooter, { paymentHoldOptions: paymentHoldOptions, plugin: plugin, invoice: invoice, quote: quote, onPaymentSuccess: onPaymentSuccess, onPaymentHoldSuccess: onPaymentHoldSuccess, noPadding: noPadding }));
1074
+ return (jsxRuntime.jsx(ActualCheckoutFooter, { paymentHoldOptions: paymentHoldOptions, plugin: plugin, invoice: invoice, quote: quote, onPaymentSuccess: onPaymentSuccess, onPaymentHoldSuccess: onPaymentHoldSuccess }));
1084
1075
  };
1085
1076
 
1086
1077
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -18936,7 +18927,8 @@ var PaymentMethodDetails = function (_a) {
18936
18927
  case 'DemoPayPayment':
18937
18928
  return (jsxRuntime.jsx(DemoPayForm, { onFail: onFail, onSavePaymentMethod: onSavePaymentMethod, plugin: plugin }));
18938
18929
  default:
18939
- return jsxRuntime.jsx("p", { children: "Can not find form for plugin" });
18930
+ console.warn('Can not find form for plugin', plugin);
18931
+ return jsxRuntime.jsx(jsxRuntime.Fragment, {});
18940
18932
  }
18941
18933
  };
18942
18934
 
@@ -19100,7 +19092,7 @@ var PaymentForm = function (_a) {
19100
19092
  }, [paymentPlugins, defaultPaymentMethod]);
19101
19093
  // Derived state
19102
19094
  var defaultPaymentMethodPlugin = paymentPlugins === null || paymentPlugins === void 0 ? void 0 : paymentPlugins.find(function (plugin) { var _a, _b, _c; return ((_a = plugin.id) === null || _a === void 0 ? void 0 : _a.toString()) === ((_c = (_b = defaultPaymentMethod === null || defaultPaymentMethod === void 0 ? void 0 : defaultPaymentMethod.plugin) === null || _b === void 0 ? void 0 : _b.id) === null || _c === void 0 ? void 0 : _c.toString()); });
19103
- var paying = !!(quote || invoice);
19095
+ var paying = Boolean(quote || invoice);
19104
19096
  var currencyId = (_b = ((quote === null || quote === void 0 ? void 0 : quote.currencyId) ||
19105
19097
  (invoice === null || invoice === void 0 ? void 0 : invoice.currencyId) ||
19106
19098
  currencyIdFromProps)) === null || _b === void 0 ? void 0 : _b.toLowerCase();
@@ -19178,6 +19170,13 @@ var PaymentForm = function (_a) {
19178
19170
  if (isPaymentMethodLoading) {
19179
19171
  return jsxRuntime.jsx(antd.Skeleton, { active: true, className: "bunny-p-4" });
19180
19172
  }
19173
+ console.log('\n');
19174
+ console.log('paymentRequired', paymentRequired);
19175
+ console.log('paying', paying);
19176
+ console.log('defaultPaymentMethod', defaultPaymentMethod);
19177
+ console.log('selectedPaymentMethodPlugin', selectedPaymentMethodPlugin);
19178
+ console.log('storedPaymentMethods', storedPaymentMethods);
19179
+ console.log('paymentPlugins', paymentPlugins);
19181
19180
  return (jsxRuntime.jsx(PaymentContext.Provider, __assign({ value: {
19182
19181
  onClickCancel: function () { return setShowPaymentMethodForm(false); },
19183
19182
  accountId: accountId,
@@ -19192,7 +19191,7 @@ var PaymentForm = function (_a) {
19192
19191
  label: !showPaymentMethodForm ? (jsxRuntime.jsx("div", __assign({ className: "bunny-pt-2" }, { children: jsxRuntime.jsx(antd.Button, __assign({ onClick: handleClickAddPaymentMethod, type: "default", className: "bunny-w-full", id: "addPaymentMethod" }, { children: "Add payment method" })) }))) : null,
19193
19192
  children: (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2 bunny-mt-2" }, { children: [jsxRuntime.jsx(PaymentMethodSelector, { onSelect: setSelectorPaymentMethodPlugin, paymentMethodAllowedPlugins: paymentPlugins || [], value: selectorPaymentMethodPlugin }), selectorPaymentMethodPlugin && (jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-flex-col" }, { children: jsxRuntime.jsx(PaymentMethodDetails, { onFail: onFail, onSavePaymentMethod: handleSavePaymentMethod, plugin: selectorPaymentMethodPlugin }) })))] }))),
19194
19193
  },
19195
- ] }), paying ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: defaultPaymentMethod ? (jsxRuntime.jsx("div", __assign({ className: "bunny-px-4" }, { children: jsxRuntime.jsx(CheckoutFooter, { quote: quote, invoice: invoice, onPaymentSuccess: handlePaymentSuccess, plugin: selectedPaymentMethodPlugin, onPaymentHoldSuccess: onPaymentHoldSuccess, paymentHoldOptions: paymentHoldOptions }) }))) : null })) : null] })) : (jsxRuntime.jsx(antd.Button, __assign({ style: { margin: '0 16px' }, loading: isCheckingOutNoPayment, onClick: function () { return checkoutNoPayment(); }, type: "primary" }, { children: isCheckingOutNoPayment ? 'Processing...' : 'Complete Order' }))) }) })) })) })));
19194
+ ] }), paying && defaultPaymentMethod && (jsxRuntime.jsx("div", __assign({ className: "bunny-px-4" }, { children: jsxRuntime.jsx(CheckoutFooter, { quote: quote, invoice: invoice, onPaymentSuccess: handlePaymentSuccess, plugin: selectedPaymentMethodPlugin, onPaymentHoldSuccess: onPaymentHoldSuccess, paymentHoldOptions: paymentHoldOptions }) })))] })) : (jsxRuntime.jsx(antd.Button, __assign({ style: { margin: '0 16px' }, loading: isCheckingOutNoPayment, onClick: function () { return checkoutNoPayment(); }, type: "primary" }, { children: isCheckingOutNoPayment ? 'Processing...' : 'Complete Order' }))) }) })) })) })));
19196
19195
  };
19197
19196
  function StripeWrapper(_a) {
19198
19197
  var children = _a.children, plugin = _a.plugin, token = _a.token, apiHost = _a.apiHost, currencyId = _a.currencyId, accountId = _a.accountId;
@@ -1,8 +1,7 @@
1
- export { default as Invoice } from "./Invoice";
1
+ export { default as Invoice } from './Invoice';
2
2
  declare global {
3
3
  interface Window {
4
4
  heap: any;
5
5
  PayFields: any;
6
- Finix: any;
7
6
  }
8
7
  }
@@ -1,10 +1,9 @@
1
1
  import { FormattedInvoice, PluginData, Quote } from '@bunnyapp/common';
2
- declare const CheckoutFooter: ({ quote, invoice, onPaymentSuccess, onPaymentHoldSuccess, noPadding, plugin, paymentHoldOptions, }: {
2
+ declare const CheckoutFooter: ({ quote, invoice, onPaymentSuccess, onPaymentHoldSuccess, plugin, paymentHoldOptions, }: {
3
3
  quote?: Quote | undefined;
4
4
  invoice?: FormattedInvoice | undefined;
5
5
  onPaymentSuccess?: ((response: any) => void) | undefined;
6
6
  onPaymentHoldSuccess?: ((response: any) => void) | undefined;
7
- noPadding?: boolean | undefined;
8
7
  plugin: PluginData | undefined;
9
8
  paymentHoldOptions?: {
10
9
  payToAccept?: boolean | undefined;
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
- import { createContext, useEffect, useContext, useMemo, useState, useRef, useCallback } from 'react';
2
+ import { createContext, useContext, useMemo, useState, useEffect, useRef, useCallback } from 'react';
3
3
  import { Markup } from 'interweave';
4
4
  import { ConfigProvider, Spin, Button, Tag, Typography, Dropdown, Input, Checkbox, Skeleton, Collapse, Modal, Form, Tooltip, Drawer, Card as Card$1, Divider, Select, Image, Radio, Space, Popconfirm, Table } from 'antd';
5
5
  import { DownloadOutlined, CreditCardOutlined, EllipsisOutlined, BankOutlined, SearchOutlined, CheckCircleFilled, CloseOutlined, ArrowLeftOutlined } from '@ant-design/icons';
@@ -143,7 +143,7 @@ var BrandContext = createContext({
143
143
  });
144
144
 
145
145
  // This will be replaced at build time by rollup-plugin-replace
146
- var PACKAGE_VERSION = '1.0.73-beta.1';
146
+ var PACKAGE_VERSION = '1.0.73-beta.2';
147
147
  var createRequestHeaders = function (token) {
148
148
  var headers = createClientDevHeaders(token);
149
149
  // Add the components version header
@@ -223,15 +223,6 @@ var extraQueryClient = new QueryClient();
223
223
  function BunnyProvider(_a) {
224
224
  var children = _a.children, _b = _a.darkMode, darkMode = _b === void 0 ? false : _b, queryClient = _a.queryClient, apiHost = _a.apiHost, token = _a.token, onTokenExpired = _a.onTokenExpired, configProviderProps = _a.configProviderProps;
225
225
  var graphQLClient = createGraphQLClient(apiHost || '', token);
226
- useEffect(function () {
227
- var script = document.createElement('script');
228
- script.src = 'https://js.finix.com/v/1/0/6/finix.js';
229
- script.async = false;
230
- document.getElementsByTagName('head')[0].appendChild(script);
231
- return function () {
232
- document.getElementsByTagName('head')[0].removeChild(script);
233
- };
234
- }, []);
235
226
  return (jsx(BunnyContext.Provider, __assign({ value: {
236
227
  darkMode: darkMode,
237
228
  graphQLClient: graphQLClient,
@@ -934,7 +925,7 @@ function usePay(_a) {
934
925
  var handleAllErrorFormats = useAllErrorFormats();
935
926
  var showErrorNotification$3 = useErrorNotification();
936
927
  var ActualCheckoutFooter = function (_a) {
937
- var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, noPadding = _a.noPadding, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
928
+ var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
938
929
  var isMobile = useIsMobile();
939
930
  var _b = useState(false), isPaying = _b[0], setIsPaying = _b[1];
940
931
  var defaultPaymentMethod = useContext(PaymentContext).defaultPaymentMethod;
@@ -1056,20 +1047,20 @@ var ActualCheckoutFooter = function (_a) {
1056
1047
  });
1057
1048
  }); };
1058
1049
  if (paymentHoldOptions === null || paymentHoldOptions === void 0 ? void 0 : paymentHoldOptions.payToAccept) {
1059
- return (jsx("div", __assign({ className: "flex justify-end gap-2 ".concat(noPadding ? '' : '') }, { children: jsx(Button, __assign({ className: "w-full", disabled: isPaying, onClick: function () {
1060
- handleApproveHold();
1061
- }, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Approving hold for' : 'Approve hold for', " ").concat(amountDue && currencyId ? formatCurrency(amountDue, currencyId) : '') })) })));
1050
+ return (jsx(Button, __assign({ className: "bunny-w-full", disabled: isPaying, onClick: function () {
1051
+ handleApproveHold();
1052
+ }, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Approving hold for' : 'Approve hold for', " ").concat(amountDue && currencyId ? formatCurrency(amountDue, currencyId) : '') })));
1062
1053
  }
1063
- return (jsx("div", __assign({ className: "bunny-flex bunny-justify-end bunny-gap-2" }, { children: jsx(Button, __assign({ className: "bunny-w-full", disabled: isPaying, onClick: function () {
1064
- setIsPaying(true);
1065
- handlePaymentSubmit();
1066
- }, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Paying' : 'Pay', " ").concat(amountDue && currencyId ? formatCurrency(amountDue, currencyId) : '') })) })));
1054
+ return (jsx(Button, __assign({ className: "bunny-w-full", disabled: isPaying, onClick: function () {
1055
+ setIsPaying(true);
1056
+ handlePaymentSubmit();
1057
+ }, size: isMobile ? 'large' : 'middle', type: "primary" }, { children: "".concat(isPaying ? 'Paying' : 'Pay', " ").concat(amountDue && currencyId ? formatCurrency(amountDue, currencyId) : '') })));
1067
1058
  };
1068
1059
  var CheckoutFooter = function (_a) {
1069
- var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, noPadding = _a.noPadding, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
1060
+ var quote = _a.quote, invoice = _a.invoice, onPaymentSuccess = _a.onPaymentSuccess, onPaymentHoldSuccess = _a.onPaymentHoldSuccess, plugin = _a.plugin, paymentHoldOptions = _a.paymentHoldOptions;
1070
1061
  if (!plugin)
1071
1062
  return null;
1072
- return (jsx(ActualCheckoutFooter, { paymentHoldOptions: paymentHoldOptions, plugin: plugin, invoice: invoice, quote: quote, onPaymentSuccess: onPaymentSuccess, onPaymentHoldSuccess: onPaymentHoldSuccess, noPadding: noPadding }));
1063
+ return (jsx(ActualCheckoutFooter, { paymentHoldOptions: paymentHoldOptions, plugin: plugin, invoice: invoice, quote: quote, onPaymentSuccess: onPaymentSuccess, onPaymentHoldSuccess: onPaymentHoldSuccess }));
1073
1064
  };
1074
1065
 
1075
1066
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -18925,7 +18916,8 @@ var PaymentMethodDetails = function (_a) {
18925
18916
  case 'DemoPayPayment':
18926
18917
  return (jsx(DemoPayForm, { onFail: onFail, onSavePaymentMethod: onSavePaymentMethod, plugin: plugin }));
18927
18918
  default:
18928
- return jsx("p", { children: "Can not find form for plugin" });
18919
+ console.warn('Can not find form for plugin', plugin);
18920
+ return jsx(Fragment, {});
18929
18921
  }
18930
18922
  };
18931
18923
 
@@ -19089,7 +19081,7 @@ var PaymentForm = function (_a) {
19089
19081
  }, [paymentPlugins, defaultPaymentMethod]);
19090
19082
  // Derived state
19091
19083
  var defaultPaymentMethodPlugin = paymentPlugins === null || paymentPlugins === void 0 ? void 0 : paymentPlugins.find(function (plugin) { var _a, _b, _c; return ((_a = plugin.id) === null || _a === void 0 ? void 0 : _a.toString()) === ((_c = (_b = defaultPaymentMethod === null || defaultPaymentMethod === void 0 ? void 0 : defaultPaymentMethod.plugin) === null || _b === void 0 ? void 0 : _b.id) === null || _c === void 0 ? void 0 : _c.toString()); });
19092
- var paying = !!(quote || invoice);
19084
+ var paying = Boolean(quote || invoice);
19093
19085
  var currencyId = (_b = ((quote === null || quote === void 0 ? void 0 : quote.currencyId) ||
19094
19086
  (invoice === null || invoice === void 0 ? void 0 : invoice.currencyId) ||
19095
19087
  currencyIdFromProps)) === null || _b === void 0 ? void 0 : _b.toLowerCase();
@@ -19167,6 +19159,13 @@ var PaymentForm = function (_a) {
19167
19159
  if (isPaymentMethodLoading) {
19168
19160
  return jsx(Skeleton, { active: true, className: "bunny-p-4" });
19169
19161
  }
19162
+ console.log('\n');
19163
+ console.log('paymentRequired', paymentRequired);
19164
+ console.log('paying', paying);
19165
+ console.log('defaultPaymentMethod', defaultPaymentMethod);
19166
+ console.log('selectedPaymentMethodPlugin', selectedPaymentMethodPlugin);
19167
+ console.log('storedPaymentMethods', storedPaymentMethods);
19168
+ console.log('paymentPlugins', paymentPlugins);
19170
19169
  return (jsx(PaymentContext.Provider, __assign({ value: {
19171
19170
  onClickCancel: function () { return setShowPaymentMethodForm(false); },
19172
19171
  accountId: accountId,
@@ -19181,7 +19180,7 @@ var PaymentForm = function (_a) {
19181
19180
  label: !showPaymentMethodForm ? (jsx("div", __assign({ className: "bunny-pt-2" }, { children: jsx(Button, __assign({ onClick: handleClickAddPaymentMethod, type: "default", className: "bunny-w-full", id: "addPaymentMethod" }, { children: "Add payment method" })) }))) : null,
19182
19181
  children: (jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2 bunny-mt-2" }, { children: [jsx(PaymentMethodSelector, { onSelect: setSelectorPaymentMethodPlugin, paymentMethodAllowedPlugins: paymentPlugins || [], value: selectorPaymentMethodPlugin }), selectorPaymentMethodPlugin && (jsx("div", __assign({ className: "bunny-flex bunny-flex-col" }, { children: jsx(PaymentMethodDetails, { onFail: onFail, onSavePaymentMethod: handleSavePaymentMethod, plugin: selectorPaymentMethodPlugin }) })))] }))),
19183
19182
  },
19184
- ] }), paying ? (jsx(Fragment, { children: defaultPaymentMethod ? (jsx("div", __assign({ className: "bunny-px-4" }, { children: jsx(CheckoutFooter, { quote: quote, invoice: invoice, onPaymentSuccess: handlePaymentSuccess, plugin: selectedPaymentMethodPlugin, onPaymentHoldSuccess: onPaymentHoldSuccess, paymentHoldOptions: paymentHoldOptions }) }))) : null })) : null] })) : (jsx(Button, __assign({ style: { margin: '0 16px' }, loading: isCheckingOutNoPayment, onClick: function () { return checkoutNoPayment(); }, type: "primary" }, { children: isCheckingOutNoPayment ? 'Processing...' : 'Complete Order' }))) }) })) })) })));
19183
+ ] }), paying && defaultPaymentMethod && (jsx("div", __assign({ className: "bunny-px-4" }, { children: jsx(CheckoutFooter, { quote: quote, invoice: invoice, onPaymentSuccess: handlePaymentSuccess, plugin: selectedPaymentMethodPlugin, onPaymentHoldSuccess: onPaymentHoldSuccess, paymentHoldOptions: paymentHoldOptions }) })))] })) : (jsx(Button, __assign({ style: { margin: '0 16px' }, loading: isCheckingOutNoPayment, onClick: function () { return checkoutNoPayment(); }, type: "primary" }, { children: isCheckingOutNoPayment ? 'Processing...' : 'Complete Order' }))) }) })) })) })));
19185
19184
  };
19186
19185
  function StripeWrapper(_a) {
19187
19186
  var children = _a.children, plugin = _a.plugin, token = _a.token, apiHost = _a.apiHost, currencyId = _a.currencyId, accountId = _a.accountId;
@@ -1,8 +1,7 @@
1
- export { default as Invoice } from "./Invoice";
1
+ export { default as Invoice } from './Invoice';
2
2
  declare global {
3
3
  interface Window {
4
4
  heap: any;
5
5
  PayFields: any;
6
- Finix: any;
7
6
  }
8
7
  }
@@ -1,10 +1,9 @@
1
1
  import { FormattedInvoice, PluginData, Quote } from '@bunnyapp/common';
2
- declare const CheckoutFooter: ({ quote, invoice, onPaymentSuccess, onPaymentHoldSuccess, noPadding, plugin, paymentHoldOptions, }: {
2
+ declare const CheckoutFooter: ({ quote, invoice, onPaymentSuccess, onPaymentHoldSuccess, plugin, paymentHoldOptions, }: {
3
3
  quote?: Quote | undefined;
4
4
  invoice?: FormattedInvoice | undefined;
5
5
  onPaymentSuccess?: ((response: any) => void) | undefined;
6
6
  onPaymentHoldSuccess?: ((response: any) => void) | undefined;
7
- noPadding?: boolean | undefined;
8
7
  plugin: PluginData | undefined;
9
8
  paymentHoldOptions?: {
10
9
  payToAccept?: boolean | undefined;
package/dist/index.d.ts CHANGED
@@ -28,7 +28,6 @@ declare global {
28
28
  interface Window {
29
29
  heap: any;
30
30
  PayFields: any;
31
- Finix: any;
32
31
  }
33
32
  }
34
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.0.73-beta.1",
3
+ "version": "1.0.73-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",