@bunnyapp/components 1.0.16 → 1.0.17
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 +3 -8824
- package/dist/esm/index.js +3 -3
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import React__default, { createContext as createContext$1, useContext as useCont
|
|
|
4
4
|
import { Markup } from 'interweave';
|
|
5
5
|
import { ConfigProvider, Button as Button$1, Typography, Tag, Divider, Popconfirm, Input, Checkbox, Collapse, Modal, Form, Drawer, Card as Card$1, Select, Image, Dropdown, Skeleton } from 'antd';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
|
-
import { DEFAULT_ACCENT_COLOR, DEFAULT_BRAND_COLOR, DEFAULT_SECONDARY_COLOR, DEFAULT_TOP_NAV_IMAGE_URL, gqlRequest as gqlRequest$1, QueryKeyFactory, useIsMobile, isColorTooDark, MARK_PRO, INPUT_BORDER_COLOR, SLATE_50, SLATE_400, SLATE_200, getPlugins, DEFAULT_CONFIG, useErrorNotification, formatCurrency, invokePlugin, GRAY_500, GRAY_200, useSuccessNotification,
|
|
7
|
+
import { DEFAULT_ACCENT_COLOR, DEFAULT_BRAND_COLOR, DEFAULT_SECONDARY_COLOR, DEFAULT_TOP_NAV_IMAGE_URL, gqlRequest as gqlRequest$1, QueryKeyFactory, useIsMobile, isColorTooDark, MARK_PRO, INPUT_BORDER_COLOR, SLATE_50, SLATE_400, SLATE_200, getPlugins, DEFAULT_CONFIG, useErrorNotification, formatCurrency, invokePlugin, GRAY_500, GRAY_200, useSuccessNotification, useAllErrorFormats, getFormattedInvoice, PAYABLE_INVOICE_STATES, BreakpointNumbers, DOCUMENT_NAME as DOCUMENT_NAME$1, useGraphQLmutation, formatDate, FrontendTransaction, SLATE_600, WHITE, TransactionKind, Lists, getAccount as getAccount$1, SubscriptionState as SubscriptionState$2, MODAL_MAX_HEIGHT, SLATE_500, StringUtils, DataInterval, TAG_COLORS, ChargeType } from '@bunnyapp/common';
|
|
8
8
|
import { QueryClient, QueryClientProvider, useQuery, useQueryClient, keepPreviousData, useMutation, onlineManager } from '@tanstack/react-query';
|
|
9
9
|
import theme from 'antd/lib/theme';
|
|
10
10
|
import { RecoilRoot } from 'recoil';
|
|
@@ -2823,8 +2823,6 @@ function ActualInvoice() {
|
|
|
2823
2823
|
entityId = _a.entityId, className = _a.className;
|
|
2824
2824
|
var _b = useContext$1(BunnyContext), apiHost = _b.apiHost, onTokenExpired = _b.onTokenExpired, graphQLClient = _b.graphQLClient;
|
|
2825
2825
|
var token = useToken();
|
|
2826
|
-
// Local state
|
|
2827
|
-
var isMobile = useIsMobile(BreakpointNumbers.lg);
|
|
2828
2826
|
// Hooks
|
|
2829
2827
|
var showSuccessNotification = useSuccessNotification();
|
|
2830
2828
|
var handleAllErrorFormats = useAllErrorFormats(onTokenExpired);
|
|
@@ -2835,6 +2833,8 @@ function ActualInvoice() {
|
|
|
2835
2833
|
}), formattedInvoice = _c.data, error = _c.error;
|
|
2836
2834
|
// Derived state
|
|
2837
2835
|
var isInvoicePayable = PAYABLE_INVOICE_STATES.includes((formattedInvoice === null || formattedInvoice === void 0 ? void 0 : formattedInvoice.state) || "");
|
|
2836
|
+
// Local state
|
|
2837
|
+
var isMobile = useIsMobile(isInvoicePayable ? BreakpointNumbers.lg : undefined);
|
|
2838
2838
|
if (error) {
|
|
2839
2839
|
return jsxs("div", { children: ["Error loading invoice: ", error.message] });
|
|
2840
2840
|
}
|
package/package.json
CHANGED