@bunnyapp/components 1.8.0-beta.20 → 1.8.0-beta.21

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
@@ -1291,7 +1291,7 @@ const DEFAULT_CONFIG = {
1291
1291
  };
1292
1292
 
1293
1293
  // This will be replaced at build time by rollup-plugin-replace
1294
- const PACKAGE_VERSION = '1.8.0-beta.19';
1294
+ const PACKAGE_VERSION = '1.8.0-beta.20';
1295
1295
  const createRequestHeaders = (token) => {
1296
1296
  const headers = createClientDevHeaders({ token });
1297
1297
  // Add the components version header
@@ -21777,11 +21777,13 @@ const DocumentTemplatePreview = ({ targetUrl, onFullscreenApiChange, }) => {
21777
21777
  return (jsxRuntime.jsx("div", { className: isMobile ? PREVIEW_ROOT_MOBILE : PREVIEW_ROOT_DESKTOP, style: isMobile ? { height: '50vh' } : undefined, children: jsxRuntime.jsx(react$1.RPConfig, { licenseKey: LISENSE_KEY, children: jsxRuntime.jsxs(react$1.RPProvider, { src: pdfUrl, children: [jsxRuntime.jsx(FullScreenBridge, { onFullscreenApiChange: onFullscreenApiChange }), jsxRuntime.jsx("div", { className: isMobile ? PAGES_HOST_MOBILE : FILL, children: jsxRuntime.jsx(react$1.RPPages, {}) })] }) }) }));
21778
21778
  };
21779
21779
 
21780
+ const { useToken: useAntdToken } = antd.theme;
21780
21781
  const InvoiceQuoteView = ({ html, targetUrl, onDocumentPreviewFullscreenApiChange, }) => {
21782
+ const { token: antdToken } = useAntdToken();
21781
21783
  if (targetUrl) {
21782
- return (jsxRuntime.jsx(DocumentTemplatePreview, { targetUrl: targetUrl, onFullscreenApiChange: onDocumentPreviewFullscreenApiChange }));
21784
+ return (jsxRuntime.jsx("div", { className: "bunny-flex bunny-h-full bunny-w-full", style: { fontFamily: antdToken.fontFamily }, children: jsxRuntime.jsx(DocumentTemplatePreview, { targetUrl: targetUrl, onFullscreenApiChange: onDocumentPreviewFullscreenApiChange }) }));
21783
21785
  }
21784
- return jsxRuntime.jsx(interweave.Markup, { content: html });
21786
+ return (jsxRuntime.jsx("div", { style: { fontFamily: antdToken.fontFamily }, children: jsxRuntime.jsx(interweave.Markup, { content: html }) }));
21785
21787
  };
21786
21788
 
21787
21789
  const MarkupContainer = defaultStyled.div `
@@ -21789,18 +21791,16 @@ const MarkupContainer = defaultStyled.div `
21789
21791
  width: 100%;
21790
21792
  }
21791
21793
  `;
21792
- const { useToken: useAntdToken } = antd.theme;
21793
21794
  const InvoiceQuoteViewWithButtons = ({ children, formattedInvoice, html, backButtonName, onBackButtonClick, onDownloadError, targetUrl, onDocumentPreviewFullscreenApiChange, }) => {
21794
21795
  const downloadFile = useDownloadFile(formattedInvoice === null || formattedInvoice === void 0 ? void 0 : formattedInvoice.id, onDownloadError);
21795
21796
  const { apiHost } = react.useContext(BunnyContext);
21796
21797
  const token = useToken();
21797
21798
  const { shadow, hideDownloadButton } = react.useContext(InvoiceQuoteContext);
21798
21799
  const isMobile = useIsMobile();
21799
- const { token: antdToken } = useAntdToken();
21800
21800
  const buttonsVisible = formattedInvoice && (!hideDownloadButton || onBackButtonClick);
21801
21801
  return (jsxRuntime.jsxs("div", { className: `bunny-flex bunny-min-h-0 bunny-w-full bunny-flex-1 bunny-flex-col ${isMobile ? 'bunny-overflow-hidden' : ''}`, children: [buttonsVisible ? (jsxRuntime.jsxs("div", { className: `bunny-flex bunny-justify-between bunny-items-center bunny-pb-4 ${isMobile ? 'bunny-shadow-padding-x' : ''}`, id: "acceptance", children: [jsxRuntime.jsx("div", { children: onBackButtonClick ? (jsxRuntime.jsx(BackButton, { onClick: onBackButtonClick, title: backButtonName })) : null }), !hideDownloadButton ? (jsxRuntime.jsx(antd.Button, { icon: jsxRuntime.jsx(icons.DownloadOutlined, {}), onClick: () => downloadFile(apiHost + '/api/pdf/invoice/' + formattedInvoice.id, token), children: "Download" })) : null] })) : null, jsxRuntime.jsxs(MarkupContainer, { className: `bunny-flex bunny-min-h-0 bunny-w-full bunny-flex-1 bunny-flex-col bunny-gap-4 ${isMobile
21802
21802
  ? 'bunny-overflow-auto'
21803
- : `bunny-py-4 bunny-bg-white ${shadow ? shadow : 'shadow-md'} bunny-rounded-md`}`, style: { fontFamily: antdToken.fontFamily }, children: [jsxRuntime.jsx(InvoiceQuoteView, { html: html, targetUrl: targetUrl, onDocumentPreviewFullscreenApiChange: onDocumentPreviewFullscreenApiChange }), children] })] }));
21803
+ : `bunny-py-4 bunny-bg-white ${shadow ? shadow : 'shadow-md'} bunny-rounded-md`}`, children: [jsxRuntime.jsx(InvoiceQuoteView, { html: html, targetUrl: targetUrl, onDocumentPreviewFullscreenApiChange: onDocumentPreviewFullscreenApiChange }), children] })] }));
21804
21804
  };
21805
21805
 
21806
21806
  function Invoice({ id, invoiceQuoteViewComponent, backButtonName, onBackButtonClick, onInvoiceDownloadError, onPaymentSuccess, shadow = 'shadow-md', className, hideDownloadButton = false, hidePaymentForm = false, onInvoiceLoaded, onPaymentMethodSaved, onPaymentMethodRemoved, }) {
package/dist/esm/index.js CHANGED
@@ -1289,7 +1289,7 @@ const DEFAULT_CONFIG = {
1289
1289
  };
1290
1290
 
1291
1291
  // This will be replaced at build time by rollup-plugin-replace
1292
- const PACKAGE_VERSION = '1.8.0-beta.19';
1292
+ const PACKAGE_VERSION = '1.8.0-beta.20';
1293
1293
  const createRequestHeaders = (token) => {
1294
1294
  const headers = createClientDevHeaders({ token });
1295
1295
  // Add the components version header
@@ -21775,11 +21775,13 @@ const DocumentTemplatePreview = ({ targetUrl, onFullscreenApiChange, }) => {
21775
21775
  return (jsx("div", { className: isMobile ? PREVIEW_ROOT_MOBILE : PREVIEW_ROOT_DESKTOP, style: isMobile ? { height: '50vh' } : undefined, children: jsx(RPConfig, { licenseKey: LISENSE_KEY, children: jsxs(RPProvider, { src: pdfUrl, children: [jsx(FullScreenBridge, { onFullscreenApiChange: onFullscreenApiChange }), jsx("div", { className: isMobile ? PAGES_HOST_MOBILE : FILL, children: jsx(RPPages, {}) })] }) }) }));
21776
21776
  };
21777
21777
 
21778
+ const { useToken: useAntdToken } = theme;
21778
21779
  const InvoiceQuoteView = ({ html, targetUrl, onDocumentPreviewFullscreenApiChange, }) => {
21780
+ const { token: antdToken } = useAntdToken();
21779
21781
  if (targetUrl) {
21780
- return (jsx(DocumentTemplatePreview, { targetUrl: targetUrl, onFullscreenApiChange: onDocumentPreviewFullscreenApiChange }));
21782
+ return (jsx("div", { className: "bunny-flex bunny-h-full bunny-w-full", style: { fontFamily: antdToken.fontFamily }, children: jsx(DocumentTemplatePreview, { targetUrl: targetUrl, onFullscreenApiChange: onDocumentPreviewFullscreenApiChange }) }));
21781
21783
  }
21782
- return jsx(Markup, { content: html });
21784
+ return (jsx("div", { style: { fontFamily: antdToken.fontFamily }, children: jsx(Markup, { content: html }) }));
21783
21785
  };
21784
21786
 
21785
21787
  const MarkupContainer = defaultStyled.div `
@@ -21787,18 +21789,16 @@ const MarkupContainer = defaultStyled.div `
21787
21789
  width: 100%;
21788
21790
  }
21789
21791
  `;
21790
- const { useToken: useAntdToken } = theme;
21791
21792
  const InvoiceQuoteViewWithButtons = ({ children, formattedInvoice, html, backButtonName, onBackButtonClick, onDownloadError, targetUrl, onDocumentPreviewFullscreenApiChange, }) => {
21792
21793
  const downloadFile = useDownloadFile(formattedInvoice === null || formattedInvoice === void 0 ? void 0 : formattedInvoice.id, onDownloadError);
21793
21794
  const { apiHost } = useContext(BunnyContext);
21794
21795
  const token = useToken();
21795
21796
  const { shadow, hideDownloadButton } = useContext(InvoiceQuoteContext);
21796
21797
  const isMobile = useIsMobile();
21797
- const { token: antdToken } = useAntdToken();
21798
21798
  const buttonsVisible = formattedInvoice && (!hideDownloadButton || onBackButtonClick);
21799
21799
  return (jsxs("div", { className: `bunny-flex bunny-min-h-0 bunny-w-full bunny-flex-1 bunny-flex-col ${isMobile ? 'bunny-overflow-hidden' : ''}`, children: [buttonsVisible ? (jsxs("div", { className: `bunny-flex bunny-justify-between bunny-items-center bunny-pb-4 ${isMobile ? 'bunny-shadow-padding-x' : ''}`, id: "acceptance", children: [jsx("div", { children: onBackButtonClick ? (jsx(BackButton, { onClick: onBackButtonClick, title: backButtonName })) : null }), !hideDownloadButton ? (jsx(Button, { icon: jsx(DownloadOutlined, {}), onClick: () => downloadFile(apiHost + '/api/pdf/invoice/' + formattedInvoice.id, token), children: "Download" })) : null] })) : null, jsxs(MarkupContainer, { className: `bunny-flex bunny-min-h-0 bunny-w-full bunny-flex-1 bunny-flex-col bunny-gap-4 ${isMobile
21800
21800
  ? 'bunny-overflow-auto'
21801
- : `bunny-py-4 bunny-bg-white ${shadow ? shadow : 'shadow-md'} bunny-rounded-md`}`, style: { fontFamily: antdToken.fontFamily }, children: [jsx(InvoiceQuoteView, { html: html, targetUrl: targetUrl, onDocumentPreviewFullscreenApiChange: onDocumentPreviewFullscreenApiChange }), children] })] }));
21801
+ : `bunny-py-4 bunny-bg-white ${shadow ? shadow : 'shadow-md'} bunny-rounded-md`}`, children: [jsx(InvoiceQuoteView, { html: html, targetUrl: targetUrl, onDocumentPreviewFullscreenApiChange: onDocumentPreviewFullscreenApiChange }), children] })] }));
21802
21802
  };
21803
21803
 
21804
21804
  function Invoice({ id, invoiceQuoteViewComponent, backButtonName, onBackButtonClick, onInvoiceDownloadError, onPaymentSuccess, shadow = 'shadow-md', className, hideDownloadButton = false, hidePaymentForm = false, onInvoiceLoaded, onPaymentMethodSaved, onPaymentMethodRemoved, }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.8.0-beta.20",
3
+ "version": "1.8.0-beta.21",
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",