diff --git a/.eslintrc.js b/.eslintrc.js index 0c2caca16c2..9a4412f665e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -165,6 +165,7 @@ module.exports = { 'prefer-const': 'warn', 'prefer-spread': 'off', '@typescript-eslint/no-empty-function': 'off', + 'import/no-default-export': 'warn', }, overrides: [ { @@ -238,6 +239,15 @@ module.exports = { 'no-restricted-imports': ['off', { patterns: restrictedImportColors }], }, }, + { + files: [ + './packages/api/migrations/*', + './packages/loot-core/migrations/*', + ], + rules: { + 'import/no-default-export': 'off', + }, + }, ], settings: { 'import/resolver': { diff --git a/packages/api/app/query.js b/packages/api/app/query.js index dddb807de3e..f9f8079951e 100644 --- a/packages/api/app/query.js +++ b/packages/api/app/query.js @@ -99,6 +99,6 @@ class Query { } } -export default function q(table) { +export function q(table) { return new Query({ table }); } diff --git a/packages/api/methods.js b/packages/api/methods.js index 7d6ef8a29f2..9af541f2670 100644 --- a/packages/api/methods.js +++ b/packages/api/methods.js @@ -1,6 +1,6 @@ import * as injected from './injected'; -export { default as q } from './app/query'; +export { q } from './app/query'; function send(name, args) { return injected.send(name, args); diff --git a/packages/api/package.json b/packages/api/package.json index e3c71255ff5..0f4c7c5d413 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@actual-app/api", - "version": "6.3.0", + "version": "6.4.0", "license": "MIT", "description": "An API for Actual", "engines": { diff --git a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-and-cash-flow-reports-1-chromium-linux.png b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-and-cash-flow-reports-1-chromium-linux.png index cf8cc81acb3..6ad0736f6f5 100644 Binary files a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-and-cash-flow-reports-1-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-and-cash-flow-reports-1-chromium-linux.png differ diff --git a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-and-cash-flow-reports-2-chromium-linux.png b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-and-cash-flow-reports-2-chromium-linux.png index 855c0492000..4052e48c433 100644 Binary files a/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-and-cash-flow-reports-2-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.js-snapshots/Reports-loads-net-worth-and-cash-flow-reports-2-chromium-linux.png differ diff --git a/packages/desktop-client/package.json b/packages/desktop-client/package.json index 023432cc055..447235f3761 100644 --- a/packages/desktop-client/package.json +++ b/packages/desktop-client/package.json @@ -1,6 +1,6 @@ { "name": "@actual-app/web", - "version": "23.12.0", + "version": "24.1.0", "license": "MIT", "files": [ "build" @@ -74,7 +74,7 @@ "watch": "cross-env BROWSER=none yarn start", "build": "cross-env INLINE_RUNTIME_CHUNK=false craco build", "build:browser": "cross-env ./bin/build-browser", - "generate:icons": "rm src/icons/*/*.tsx; cd src/icons && svgr --typescript --expand-props start -d . .", + "generate:icons": "rm src/icons/*/*.tsx; cd src/icons && svgr --template template.ts --index-template index-template.ts --typescript --expand-props start -d . .", "test": "craco test", "e2e": "npx playwright test --browser=chromium", "vrt": "cross-env VRT=true npx playwright test --browser=chromium" diff --git a/packages/desktop-client/playwright.config.js b/packages/desktop-client/playwright.config.js index 91e007f8e64..c642b3ddca1 100644 --- a/packages/desktop-client/playwright.config.js +++ b/packages/desktop-client/playwright.config.js @@ -41,7 +41,7 @@ expect.extend({ }, }); -// eslint-disable-next-line import/no-unused-modules +// eslint-disable-next-line import/no-unused-modules, import/no-default-export export default defineConfig({ timeout: 20000, // 20 seconds retries: 1, diff --git a/packages/desktop-client/src/components/AnimatedRefresh.tsx b/packages/desktop-client/src/components/AnimatedRefresh.tsx index c6e613c956e..56dff953435 100644 --- a/packages/desktop-client/src/components/AnimatedRefresh.tsx +++ b/packages/desktop-client/src/components/AnimatedRefresh.tsx @@ -2,10 +2,10 @@ import React from 'react'; import { keyframes } from 'glamor'; -import Refresh from '../icons/v1/Refresh'; +import { SvgRefresh } from '../icons/v1'; import { type CSSProperties } from '../style'; -import View from './common/View'; +import { View } from './common/View'; const spin = keyframes({ '0%': { transform: 'rotateZ(0deg)' }, @@ -19,7 +19,7 @@ type AnimatedRefreshProps = { height?: number; }; -export default function AnimatedRefresh({ +export function AnimatedRefresh({ animating, iconStyle, width, @@ -29,7 +29,7 @@ export default function AnimatedRefresh({ - Promise; }; -function App({ +function AppInner({ budgetId, cloudFileId, loadingText, loadBudget, closeBudget, loadGlobalPrefs, -}: AppProps) { +}: AppInnerProps) { const [initializing, setInitializing] = useState(true); const { showBoundary: showErrorBoundary } = useErrorBoundary(); @@ -121,7 +121,7 @@ function ErrorFallback({ error }: FallbackProps) { ); } -function AppWrapper() { +export function App() { const budgetId = useSelector( state => state.prefs.local && state.prefs.local.id, ); @@ -178,7 +178,7 @@ function AppWrapper() { {process.env.REACT_APP_REVIEW_ID && !Platform.isPlaywright && ( )} - ); } - -export default AppWrapper; diff --git a/packages/desktop-client/src/components/AppBackground.tsx b/packages/desktop-client/src/components/AppBackground.tsx index b23e84af6ab..dd484ac60c0 100644 --- a/packages/desktop-client/src/components/AppBackground.tsx +++ b/packages/desktop-client/src/components/AppBackground.tsx @@ -2,19 +2,22 @@ import React from 'react'; import { css } from 'glamor'; -import AnimatedLoading from '../icons/AnimatedLoading'; +import { AnimatedLoading } from '../icons/AnimatedLoading'; import { theme } from '../style'; -import Background from './Background'; -import Block from './common/Block'; -import View from './common/View'; +import { Background } from './Background'; +import { Block } from './common/Block'; +import { View } from './common/View'; type AppBackgroundProps = { initializing?: boolean; loadingText?: string; }; -function AppBackground({ initializing, loadingText }: AppBackgroundProps) { +export function AppBackground({ + initializing, + loadingText, +}: AppBackgroundProps) { return ( <> @@ -41,5 +44,3 @@ function AppBackground({ initializing, loadingText }: AppBackgroundProps) { ); } - -export default AppBackground; diff --git a/packages/desktop-client/src/components/Background.tsx b/packages/desktop-client/src/components/Background.tsx index 3f2c687b50b..3aa8f367b33 100644 --- a/packages/desktop-client/src/components/Background.tsx +++ b/packages/desktop-client/src/components/Background.tsx @@ -4,7 +4,7 @@ import { theme } from '../style'; import { LoadComponent } from './util/LoadComponent'; -export default function Background() { +export function Background() { return (
state.account.accountsSyncing); const name = accountsSyncing diff --git a/packages/desktop-client/src/components/DevelopmentTopBar.tsx b/packages/desktop-client/src/components/DevelopmentTopBar.tsx index a98533e64c1..768422df111 100644 --- a/packages/desktop-client/src/components/DevelopmentTopBar.tsx +++ b/packages/desktop-client/src/components/DevelopmentTopBar.tsx @@ -1,9 +1,9 @@ import { theme } from '../style'; -import ExternalLink from './common/ExternalLink'; -import View from './common/View'; +import { ExternalLink } from './common/ExternalLink'; +import { View } from './common/View'; -export default function DevelopmentTopBar() { +export function DevelopmentTopBar() { return ( ); } - -export default FatalError; diff --git a/packages/desktop-client/src/components/FinancesApp.tsx b/packages/desktop-client/src/components/FinancesApp.tsx index 1d79cce61a5..823cfd7e7b3 100644 --- a/packages/desktop-client/src/components/FinancesApp.tsx +++ b/packages/desktop-client/src/components/FinancesApp.tsx @@ -16,7 +16,7 @@ import hotkeys from 'hotkeys-js'; import { AccountsProvider } from 'loot-core/src/client/data-hooks/accounts'; import { PayeesProvider } from 'loot-core/src/client/data-hooks/payees'; import { SpreadsheetProvider } from 'loot-core/src/client/SpreadsheetProvider'; -import checkForUpdateNotification from 'loot-core/src/client/update-notification'; +import { checkForUpdateNotification } from 'loot-core/src/client/update-notification'; import * as undo from 'loot-core/src/platform/client/undo'; import { useActions } from '../hooks/useActions'; @@ -25,21 +25,21 @@ import { theme } from '../style'; import { ExposeNavigate } from '../util/router-tools'; import { getIsOutdated, getLatestVersion } from '../util/versions'; -import BankSyncStatus from './BankSyncStatus'; +import { BankSyncStatus } from './BankSyncStatus'; import { BudgetMonthCountProvider } from './budget/BudgetMonthCountContext'; -import View from './common/View'; -import GlobalKeys from './GlobalKeys'; +import { View } from './common/View'; +import { GlobalKeys } from './GlobalKeys'; import { ManageRulesPage } from './ManageRulesPage'; -import MobileNavTabs from './mobile/MobileNavTabs'; -import Modals from './Modals'; -import Notifications from './Notifications'; +import { MobileNavTabs } from './mobile/MobileNavTabs'; +import { Modals } from './Modals'; +import { Notifications } from './Notifications'; import { ManagePayeesPage } from './payees/ManagePayeesPage'; -import Reports from './reports'; +import { Reports } from './reports'; import { NarrowAlternate, WideComponent } from './responsive'; -import ScrollProvider from './ScrollProvider'; -import Settings from './settings'; -import FloatableSidebar, { SidebarProvider } from './sidebar'; -import Titlebar, { TitlebarProvider } from './Titlebar'; +import { ScrollProvider } from './ScrollProvider'; +import { Settings } from './settings'; +import { FloatableSidebar, SidebarProvider } from './sidebar'; +import { Titlebar, TitlebarProvider } from './Titlebar'; import { TransactionEdit } from './transactions/MobileTransaction'; function NarrowNotSupported({ @@ -92,7 +92,7 @@ function RouterBehaviors({ getAccounts }) { return null; } -function FinancesApp() { +function FinancesAppWithoutContext() { const actions = useActions(); useEffect(() => { // The default key handler scope @@ -256,8 +256,8 @@ function FinancesApp() { ); } -export default function FinancesAppWithContext() { - const app = useMemo(() => , []); +export function FinancesApp() { + const app = useMemo(() => , []); return ( diff --git a/packages/desktop-client/src/components/FixedSizeList.tsx b/packages/desktop-client/src/components/FixedSizeList.tsx index f94bc890db0..ad8fcb6623b 100644 --- a/packages/desktop-client/src/components/FixedSizeList.tsx +++ b/packages/desktop-client/src/components/FixedSizeList.tsx @@ -10,10 +10,10 @@ import { import memoizeOne from 'memoize-one'; -import useResizeObserver from '../hooks/useResizeObserver'; +import { useResizeObserver } from '../hooks/useResizeObserver'; import { type CSSProperties } from '../style'; -import View from './common/View'; +import { View } from './common/View'; const IS_SCROLLING_DEBOUNCE_INTERVAL = 150; @@ -73,7 +73,7 @@ type FixedSizeListState = { scrollUpdateWasRequested: boolean; }; -export default class FixedSizeList extends PureComponent< +export class FixedSizeList extends PureComponent< FixedSizeListProps, FixedSizeListState > { diff --git a/packages/desktop-client/src/components/GlobalKeys.ts b/packages/desktop-client/src/components/GlobalKeys.ts index edcfe148aab..33e2e6bd846 100644 --- a/packages/desktop-client/src/components/GlobalKeys.ts +++ b/packages/desktop-client/src/components/GlobalKeys.ts @@ -2,9 +2,9 @@ import { useEffect } from 'react'; import * as Platform from 'loot-core/src/client/platform'; -import useNavigate from '../hooks/useNavigate'; +import { useNavigate } from '../hooks/useNavigate'; -export default function GlobalKeys() { +export function GlobalKeys() { const navigate = useNavigate(); useEffect(() => { const handleKeys = e => { diff --git a/packages/desktop-client/src/components/LoggedInUser.tsx b/packages/desktop-client/src/components/LoggedInUser.tsx index 91418dc0719..c4fa229c15f 100644 --- a/packages/desktop-client/src/components/LoggedInUser.tsx +++ b/packages/desktop-client/src/components/LoggedInUser.tsx @@ -4,10 +4,10 @@ import { useSelector } from 'react-redux'; import { useActions } from '../hooks/useActions'; import { theme, styles, type CSSProperties } from '../style'; -import Button from './common/Button'; -import Menu from './common/Menu'; -import Text from './common/Text'; -import View from './common/View'; +import { Button } from './common/Button'; +import { Menu } from './common/Menu'; +import { Text } from './common/Text'; +import { View } from './common/View'; import { useServerURL } from './ServerContext'; import { Tooltip } from './tooltips'; @@ -16,7 +16,7 @@ type LoggedInUserProps = { style?: CSSProperties; color?: string; }; -export default function LoggedInUser({ +export function LoggedInUser({ hideIfNoServer, style, color, diff --git a/packages/desktop-client/src/components/ManageRules.tsx b/packages/desktop-client/src/components/ManageRules.tsx index 36928d65520..7baac602806 100644 --- a/packages/desktop-client/src/components/ManageRules.tsx +++ b/packages/desktop-client/src/components/ManageRules.tsx @@ -16,20 +16,20 @@ import { mapField, friendlyOp } from 'loot-core/src/shared/rules'; import { describeSchedule } from 'loot-core/src/shared/schedules'; import { type RuleEntity } from 'loot-core/src/types/models'; -import useCategories from '../hooks/useCategories'; -import useSelected, { SelectedProvider } from '../hooks/useSelected'; +import { useCategories } from '../hooks/useCategories'; +import { useSelected, SelectedProvider } from '../hooks/useSelected'; import { theme } from '../style'; -import Button from './common/Button'; -import ExternalLink from './common/ExternalLink'; -import Search from './common/Search'; -import Stack from './common/Stack'; -import Text from './common/Text'; -import View from './common/View'; -import RulesHeader from './rules/RulesHeader'; -import RulesList from './rules/RulesList'; +import { Button } from './common/Button'; +import { ExternalLink } from './common/ExternalLink'; +import { Search } from './common/Search'; +import { Stack } from './common/Stack'; +import { Text } from './common/Text'; +import { View } from './common/View'; +import { RulesHeader } from './rules/RulesHeader'; +import { RulesList } from './rules/RulesList'; import { SchedulesQuery } from './rules/SchedulesQuery'; -import SimpleTable from './rules/SimpleTable'; +import { SimpleTable } from './rules/SimpleTable'; function mapValue(field, value, { payees, categories, accounts }) { if (!value) return ''; @@ -95,8 +95,8 @@ function ManageRulesContent({ payeeId, setLoading, }: ManageRulesContentProps) { - const [allRules, setAllRules] = useState(null); - const [rules, setRules] = useState(null); + const [allRules, setAllRules] = useState([]); + const [page, setPage] = useState(0); const [filter, setFilter] = useState(''); const dispatch = useDispatch(); @@ -117,18 +117,27 @@ function ManageRulesContent({ const filteredRules = useMemo( () => - filter === '' || !rules - ? rules - : rules.filter(rule => + (filter === '' + ? allRules + : allRules.filter(rule => ruleToString(rule, filterData) .toLowerCase() .includes(filter.toLowerCase()), - ), - [rules, filter, filterData], + ) + ).slice(0, 100 + page * 50), + [allRules, filter, filterData, page], ); const selectedInst = useSelected('manage-rules', allRules, []); const [hoveredRule, setHoveredRule] = useState(null); + const onSearchChange = useCallback( + (value: string) => { + setFilter(value); + setPage(0); + }, + [setFilter], + ); + async function loadRules() { setLoading(true); @@ -147,8 +156,7 @@ function ManageRulesContent({ useEffect(() => { async function loadData() { - const loadedRules = await loadRules(); - setRules(loadedRules.slice(0, 100)); + await loadRules(); setLoading(false); await dispatch(initiallyLoadPayees()); @@ -166,7 +174,7 @@ function ManageRulesContent({ }, []); function loadMore() { - setRules(rules.concat(allRules.slice(rules.length, rules.length + 50))); + setPage(page => page + 1); } async function onDeleteSelected() { @@ -179,10 +187,7 @@ function ManageRulesContent({ alert('Some rules were not deleted because they are linked to schedules'); } - const newRules = await loadRules(); - setRules(rules => { - return newRules.slice(0, rules.length); - }); + await loadRules(); selectedInst.dispatch({ type: 'select-none' }); setLoading(false); } @@ -191,19 +196,8 @@ function ManageRulesContent({ dispatch( pushModal('edit-rule', { rule, - onSave: async newRule => { - const newRules = await loadRules(); - - setRules(rules => { - const newIdx = newRules.findIndex(rule => rule.id === newRule.id); - - if (newIdx > rules.length) { - return newRules.slice(0, newIdx + 75); - } else { - return newRules.slice(0, rules.length); - } - }); - + onSave: async () => { + await loadRules(); setLoading(false); }, }), @@ -236,13 +230,7 @@ function ManageRulesContent({ pushModal('edit-rule', { rule, onSave: async newRule => { - const newRules = await loadRules(); - - setRules(rules => { - const newIdx = newRules.findIndex(rule => rule.id === newRule.id); - return newRules.slice(0, newIdx + 75); - }); - + await loadRules(); setLoading(false); }, }), @@ -253,7 +241,7 @@ function ManageRulesContent({ setHoveredRule(id); }, []); - if (rules === null) { + if (allRules.length === 0) { return null; } @@ -290,13 +278,12 @@ function ManageRulesContent({ >; }; -export default function ManageRules({ +export function ManageRules({ isModal, payeeId, setLoading = () => {}, diff --git a/packages/desktop-client/src/components/ManageRulesPage.tsx b/packages/desktop-client/src/components/ManageRulesPage.tsx index e64f57e8788..ad57e2bd2d9 100644 --- a/packages/desktop-client/src/components/ManageRulesPage.tsx +++ b/packages/desktop-client/src/components/ManageRulesPage.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import ManageRules from './ManageRules'; +import { ManageRules } from './ManageRules'; import { Page } from './Page'; export function ManageRulesPage() { diff --git a/packages/desktop-client/src/components/MobileBackButton.tsx b/packages/desktop-client/src/components/MobileBackButton.tsx index 6ea749fdbbd..d13b504dc72 100644 --- a/packages/desktop-client/src/components/MobileBackButton.tsx +++ b/packages/desktop-client/src/components/MobileBackButton.tsx @@ -1,17 +1,17 @@ import React from 'react'; -import useNavigate from '../hooks/useNavigate'; -import CheveronLeft from '../icons/v1/CheveronLeft'; +import { useNavigate } from '../hooks/useNavigate'; +import { SvgCheveronLeft } from '../icons/v1'; import { type CSSProperties, styles, theme } from '../style'; -import Button from './common/Button'; -import Text from './common/Text'; +import { Button } from './common/Button'; +import { Text } from './common/Text'; type MobileBackButtonProps = { style?: CSSProperties; }; -export default function MobileBackButton({ style }: MobileBackButtonProps) { +export function MobileBackButton({ style }: MobileBackButtonProps) { const navigate = useNavigate(); return ( {tooltipOpen && ( - + )} @@ -235,7 +235,7 @@ function Notification({ ); } -export default function Notifications({ style }: { style?: CSSProperties }) { +export function Notifications({ style }: { style?: CSSProperties }) { const { removeNotification } = useActions(); const notifications = useSelector(state => state.notifications.notifications); return ( diff --git a/packages/desktop-client/src/components/Page.tsx b/packages/desktop-client/src/components/Page.tsx index d9bd447f9c2..3c3f0179204 100644 --- a/packages/desktop-client/src/components/Page.tsx +++ b/packages/desktop-client/src/components/Page.tsx @@ -3,8 +3,8 @@ import React, { type ComponentPropsWithoutRef, type ReactNode } from 'react'; import { useResponsive } from '../ResponsiveProvider'; import { theme, styles, type CSSProperties } from '../style'; -import Text from './common/Text'; -import View from './common/View'; +import { Text } from './common/Text'; +import { View } from './common/View'; type PageHeaderProps = { title: ReactNode; diff --git a/packages/desktop-client/src/components/PrivacyFilter.tsx b/packages/desktop-client/src/components/PrivacyFilter.tsx index 5e5d9d0edec..3f55382c66d 100644 --- a/packages/desktop-client/src/components/PrivacyFilter.tsx +++ b/packages/desktop-client/src/components/PrivacyFilter.tsx @@ -6,13 +6,13 @@ import React, { type ReactNode, } from 'react'; -import usePrivacyMode from 'loot-core/src/client/privacy'; +import { usePrivacyMode } from 'loot-core/src/client/privacy'; import { useResponsive } from '../ResponsiveProvider'; -import View from './common/View'; +import { View } from './common/View'; -export type ConditionalPrivacyFilterProps = { +type ConditionalPrivacyFilterProps = { children: ReactNode; privacyFilter?: boolean | PrivacyFilterProps; defaultPrivacyFilterProps?: PrivacyFilterProps; @@ -46,7 +46,7 @@ type PrivacyFilterProps = ComponentPropsWithRef & { activationFilters?: (boolean | (() => boolean))[]; blurIntensity?: number; }; -export default function PrivacyFilter({ +export function PrivacyFilter({ activationFilters, blurIntensity, children, diff --git a/packages/desktop-client/src/components/ScrollProvider.tsx b/packages/desktop-client/src/components/ScrollProvider.tsx index b959fbc40b8..8cbe68c8cb9 100644 --- a/packages/desktop-client/src/components/ScrollProvider.tsx +++ b/packages/desktop-client/src/components/ScrollProvider.tsx @@ -19,7 +19,7 @@ type ScrollProviderProps = { children?: ReactNode; }; -export default function ScrollProvider({ children }: ScrollProviderProps) { +export function ScrollProvider({ children }: ScrollProviderProps) { const [scrollY, setScrollY] = useState(undefined); const [isBottomReached, setIsBottomReached] = useState(false); diff --git a/packages/desktop-client/src/components/SyncRefresh.ts b/packages/desktop-client/src/components/SyncRefresh.tsx similarity index 63% rename from packages/desktop-client/src/components/SyncRefresh.ts rename to packages/desktop-client/src/components/SyncRefresh.tsx index 714ba0f6fee..adfcd8f4b72 100644 --- a/packages/desktop-client/src/components/SyncRefresh.ts +++ b/packages/desktop-client/src/components/SyncRefresh.tsx @@ -1,4 +1,4 @@ -import { type ReactNode, useState } from 'react'; +import React, { type ReactNode, useState } from 'react'; type ChildrenProps = { refreshing: boolean; @@ -8,7 +8,7 @@ type SyncRefreshProps = { onSync: () => Promise; children: (props: ChildrenProps) => ReactNode; }; -export default function SyncRefresh({ onSync, children }: SyncRefreshProps) { +export function SyncRefresh({ onSync, children }: SyncRefreshProps) { const [syncing, setSyncing] = useState(false); async function onSync_() { @@ -17,5 +17,5 @@ export default function SyncRefresh({ onSync, children }: SyncRefreshProps) { setSyncing(false); } - return children({ refreshing: syncing, onRefresh: onSync_ }); + return <>{children({ refreshing: syncing, onRefresh: onSync_ })}; } diff --git a/packages/desktop-client/src/components/ThemeSelector.tsx b/packages/desktop-client/src/components/ThemeSelector.tsx index be05f21d69f..41629ad87cc 100644 --- a/packages/desktop-client/src/components/ThemeSelector.tsx +++ b/packages/desktop-client/src/components/ThemeSelector.tsx @@ -3,14 +3,12 @@ import React, { useState } from 'react'; import type { Theme } from 'loot-core/src/types/prefs'; import { useActions } from '../hooks/useActions'; -import MoonStars from '../icons/v2/MoonStars'; -import Sun from '../icons/v2/Sun'; -import System from '../icons/v2/System'; +import { SvgMoonStars, SvgSun, SvgSystem } from '../icons/v2'; import { useResponsive } from '../ResponsiveProvider'; import { type CSSProperties, themeOptions, useTheme } from '../style'; -import Button from './common/Button'; -import Menu from './common/Menu'; +import { Button } from './common/Button'; +import { Menu } from './common/Menu'; import { Tooltip } from './tooltips'; type ThemeSelectorProps = { @@ -24,7 +22,11 @@ export function ThemeSelector({ style }: ThemeSelectorProps) { const { isNarrowWidth } = useResponsive(); - const themeIcons = { light: Sun, dark: MoonStars, auto: System } as const; + const themeIcons = { + light: SvgSun, + dark: SvgMoonStars, + auto: SvgSystem, + } as const; async function onMenuSelect(newTheme: string) { setMenuOpen(false); @@ -34,7 +36,7 @@ export function ThemeSelector({ style }: ThemeSelectorProps) { }); } - const Icon = themeIcons?.[theme] || Sun; + const Icon = themeIcons?.[theme] || SvgSun; return isNarrowWidth ? null : ( ); @@ -247,12 +249,12 @@ function SyncButton({ style, isMobile = false }: SyncButtonProps) { > {isMobile ? ( syncState === 'error' ? ( - + ) : ( ) ) : syncState === 'error' ? ( - + ) : ( )} @@ -363,7 +365,7 @@ function BudgetTitlebar() { ); } -export default function Titlebar({ style }) { +export function Titlebar({ style }) { const navigate = useNavigate(); const location = useLocation(); const sidebar = useSidebar(); @@ -410,7 +412,7 @@ export default function Titlebar({ style }) { } }} > - @@ -423,7 +425,7 @@ export default function Titlebar({ style }) { element={ location.state?.goBack ? ( diff --git a/packages/desktop-client/src/components/accounts/Account.jsx b/packages/desktop-client/src/components/accounts/Account.jsx index 37871916290..a91ad99ee55 100644 --- a/packages/desktop-client/src/components/accounts/Account.jsx +++ b/packages/desktop-client/src/components/accounts/Account.jsx @@ -12,9 +12,10 @@ import { useCachedSchedules, } from 'loot-core/src/client/data-hooks/schedules'; import * as queries from 'loot-core/src/client/queries'; -import q, { runQuery, pagedQuery } from 'loot-core/src/client/query-helpers'; +import { runQuery, pagedQuery } from 'loot-core/src/client/query-helpers'; import { send, listen } from 'loot-core/src/platform/client/fetch'; import { currentDay } from 'loot-core/src/shared/months'; +import { q } from 'loot-core/src/shared/query'; import { getScheduledAmount } from 'loot-core/src/shared/schedules'; import { deleteTransaction, @@ -26,13 +27,13 @@ import { import { applyChanges, groupById } from 'loot-core/src/shared/util'; import { authorizeBank } from '../../gocardless'; -import useCategories from '../../hooks/useCategories'; +import { useCategories } from '../../hooks/useCategories'; import { SelectedProviderWithItems } from '../../hooks/useSelected'; import { styles, theme } from '../../style'; -import Button from '../common/Button'; -import Text from '../common/Text'; -import View from '../common/View'; -import TransactionList from '../transactions/TransactionList'; +import { Button } from '../common/Button'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; +import { TransactionList } from '../transactions/TransactionList'; import { SplitsExpandedProvider, useSplitsExpanded, @@ -864,7 +865,12 @@ class AccountInternal extends PureComponent { } }; - if (name === 'amount' || name === 'payee' || name === 'account') { + if ( + name === 'amount' || + name === 'payee' || + name === 'account' || + name === 'date' + ) { const { data } = await runQuery( q('transactions') .filter({ id: { $oneof: ids }, reconciled: true }) @@ -1473,7 +1479,7 @@ function AccountHack(props) { ); } -export default function Account() { +export function Account() { const params = useParams(); const location = useLocation(); diff --git a/packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx b/packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx index d7d3597b71d..423c99b7c73 100644 --- a/packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx +++ b/packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx @@ -4,11 +4,11 @@ import { useParams } from 'react-router-dom'; import { authorizeBank } from '../../gocardless'; import { useActions } from '../../hooks/useActions'; -import ExclamationOutline from '../../icons/v1/ExclamationOutline'; +import { SvgExclamationOutline } from '../../icons/v1'; import { theme } from '../../style'; -import Button from '../common/Button'; -import ExternalLink from '../common/ExternalLink'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { ExternalLink } from '../common/ExternalLink'; +import { View } from '../common/View'; import { Tooltip } from '../tooltips'; function getErrorMessage(type, code) { @@ -48,7 +48,7 @@ function getErrorMessage(type, code) { ); } -export default function AccountSyncCheck() { +export function AccountSyncCheck() { const accounts = useSelector(state => state.queries.accounts); const failedAccounts = useSelector(state => state.account.failedAccounts); const { unlinkAccount, pushModal } = useActions(); @@ -95,7 +95,9 @@ export default function AccountSyncCheck() { }} onClick={() => setOpen(true)} > - {' '} + {' '} This account is experiencing connection problems. Let’s fix it. diff --git a/packages/desktop-client/src/components/accounts/Balance.jsx b/packages/desktop-client/src/components/accounts/Balance.jsx index 8383b055c39..f2cb12c752f 100644 --- a/packages/desktop-client/src/components/accounts/Balance.jsx +++ b/packages/desktop-client/src/components/accounts/Balance.jsx @@ -1,19 +1,19 @@ import React from 'react'; import { useCachedSchedules } from 'loot-core/src/client/data-hooks/schedules'; -import q from 'loot-core/src/client/query-helpers'; +import { q } from 'loot-core/src/shared/query'; import { getScheduledAmount } from 'loot-core/src/shared/schedules'; import { useSelectedItems } from '../../hooks/useSelected'; -import ArrowButtonRight1 from '../../icons/v2/ArrowButtonRight1'; +import { SvgArrowButtonRight1 } from '../../icons/v2'; import { theme } from '../../style'; -import Button from '../common/Button'; -import Text from '../common/Text'; -import View from '../common/View'; -import PrivacyFilter from '../PrivacyFilter'; -import CellValue from '../spreadsheet/CellValue'; -import useFormat from '../spreadsheet/useFormat'; -import useSheetValue from '../spreadsheet/useSheetValue'; +import { Button } from '../common/Button'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; +import { PrivacyFilter } from '../PrivacyFilter'; +import { CellValue } from '../spreadsheet/CellValue'; +import { useFormat } from '../spreadsheet/useFormat'; +import { useSheetValue } from '../spreadsheet/useSheetValue'; import { isPreviewId } from '../transactions/TransactionsTable'; function DetailedBalance({ name, balance, isExactBalance = true }) { @@ -167,7 +167,7 @@ export function Balances({ }} /> - onExposeName(true)} > - ) : ( <> - - Add New + Add + New )} @@ -278,9 +281,9 @@ export function AccountHeader({ } > {splitsExpanded.state.mode === 'collapse' ? ( - + ) : ( - + )} {account ? ( diff --git a/packages/desktop-client/src/components/accounts/MobileAccount.jsx b/packages/desktop-client/src/components/accounts/MobileAccount.jsx index 837764310ba..f0a1f4ae5e0 100644 --- a/packages/desktop-client/src/components/accounts/MobileAccount.jsx +++ b/packages/desktop-client/src/components/accounts/MobileAccount.jsx @@ -19,12 +19,12 @@ import { ungroupTransactions, } from 'loot-core/src/shared/transactions'; -import useCategories from '../../hooks/useCategories'; -import useNavigate from '../../hooks/useNavigate'; +import { useCategories } from '../../hooks/useCategories'; +import { useNavigate } from '../../hooks/useNavigate'; import { useSetThemeColor } from '../../hooks/useSetThemeColor'; import { theme } from '../../style'; -import AccountDetails from './MobileAccountDetails'; +import { AccountDetails } from './MobileAccountDetails'; const getSchedulesTransform = memoizeOne((id, hasSearch) => { let filter = queries.getAccountFilter(id, '_account'); @@ -68,7 +68,7 @@ function PreviewTransactions({ accountId, children }) { let paged; -export default function Account(props) { +export function Account(props) { const accounts = useSelector(state => state.queries.accounts); const navigate = useNavigate(); diff --git a/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx b/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx index c2a250d2b12..7cea68bbd5d 100644 --- a/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx +++ b/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx @@ -1,17 +1,17 @@ import React, { useState, useMemo } from 'react'; import { useActions } from '../../hooks/useActions'; -import Add from '../../icons/v1/Add'; -import SearchAlternate from '../../icons/v2/SearchAlternate'; +import { SvgAdd } from '../../icons/v1'; +import { SvgSearchAlternate } from '../../icons/v2'; import { theme } from '../../style'; -import ButtonLink from '../common/ButtonLink'; -import InputWithContent from '../common/InputWithContent'; -import Label from '../common/Label'; -import View from '../common/View'; -import MobileBackButton from '../MobileBackButton'; +import { ButtonLink } from '../common/ButtonLink'; +import { InputWithContent } from '../common/InputWithContent'; +import { Label } from '../common/Label'; +import { View } from '../common/View'; +import { MobileBackButton } from '../MobileBackButton'; import { Page } from '../Page'; -import PullToRefresh from '../responsive/PullToRefresh'; -import CellValue from '../spreadsheet/CellValue'; +import { PullToRefresh } from '../responsive/PullToRefresh'; +import { CellValue } from '../spreadsheet/CellValue'; import { TransactionList } from '../transactions/MobileTransaction'; function TransactionSearchInput({ accountName, onSearch }) { @@ -30,7 +30,7 @@ function TransactionSearchInput({ accountName, onSearch }) { > - + } padding={0} diff --git a/packages/desktop-client/src/components/accounts/MobileAccounts.jsx b/packages/desktop-client/src/components/accounts/MobileAccounts.jsx index ac71f9231e0..158dbec52fa 100644 --- a/packages/desktop-client/src/components/accounts/MobileAccounts.jsx +++ b/packages/desktop-client/src/components/accounts/MobileAccounts.jsx @@ -4,18 +4,18 @@ import { useSelector } from 'react-redux'; import * as queries from 'loot-core/src/client/queries'; import { useActions } from '../../hooks/useActions'; -import useCategories from '../../hooks/useCategories'; -import useNavigate from '../../hooks/useNavigate'; +import { useCategories } from '../../hooks/useCategories'; +import { useNavigate } from '../../hooks/useNavigate'; import { useSetThemeColor } from '../../hooks/useSetThemeColor'; -import Add from '../../icons/v1/Add'; +import { SvgAdd } from '../../icons/v1'; import { theme, styles } from '../../style'; -import Button from '../common/Button'; -import Text from '../common/Text'; -import TextOneLine from '../common/TextOneLine'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Text } from '../common/Text'; +import { TextOneLine } from '../common/TextOneLine'; +import { View } from '../common/View'; import { Page } from '../Page'; -import PullToRefresh from '../responsive/PullToRefresh'; -import CellValue from '../spreadsheet/CellValue'; +import { PullToRefresh } from '../responsive/PullToRefresh'; +import { CellValue } from '../spreadsheet/CellValue'; function AccountHeader({ name, amount, style = {} }) { return ( @@ -171,7 +171,7 @@ function AccountList({ hoveredStyle={noBackgroundColorStyle} onClick={onAddAccount} > - + } padding={0} @@ -215,7 +215,7 @@ function AccountList({ ); } -export default function Accounts() { +export function Accounts() { const accounts = useSelector(state => state.queries.accounts); const newTransactions = useSelector(state => state.queries.newTransactions); const updatedAccounts = useSelector(state => state.queries.updatedAccounts); diff --git a/packages/desktop-client/src/components/accounts/Reconcile.jsx b/packages/desktop-client/src/components/accounts/Reconcile.jsx index d01ad8ef3f2..76fc01da3e9 100644 --- a/packages/desktop-client/src/components/accounts/Reconcile.jsx +++ b/packages/desktop-client/src/components/accounts/Reconcile.jsx @@ -3,15 +3,15 @@ import React from 'react'; import * as queries from 'loot-core/src/client/queries'; import { currencyToInteger } from 'loot-core/src/shared/util'; -import CheckCircle1 from '../../icons/v2/CheckCircle1'; +import { SvgCheckCircle1 } from '../../icons/v2'; import { styles, theme } from '../../style'; -import Button from '../common/Button'; -import InitialFocus from '../common/InitialFocus'; -import Input from '../common/Input'; -import Text from '../common/Text'; -import View from '../common/View'; -import useFormat from '../spreadsheet/useFormat'; -import useSheetValue from '../spreadsheet/useSheetValue'; +import { Button } from '../common/Button'; +import { InitialFocus } from '../common/InitialFocus'; +import { Input } from '../common/Input'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; +import { useFormat } from '../spreadsheet/useFormat'; +import { useSheetValue } from '../spreadsheet/useSheetValue'; import { Tooltip } from '../tooltips'; export function ReconcilingMessage({ @@ -52,7 +52,7 @@ export function ReconcilingMessage({ justifyContent: 'center', }} > - ; @@ -62,7 +61,7 @@ type ScopedAlertProps = { export const Information = ({ style, children }: ScopedAlertProps) => { return ( { export const Warning = ({ style, children }: ScopedAlertProps) => { return ( { export const Error = ({ style, children }: ScopedAlertProps) => { return ( ; -export default function AccountAutocomplete({ +export function AccountAutocomplete({ embedded, includeClosedAccounts = true, renderAccountItemGroupHeader, diff --git a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx index afe50adb4d2..aa10a321826 100644 --- a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx @@ -13,11 +13,11 @@ import React, { import Downshift, { type StateChangeTypes } from 'downshift'; import { css } from 'glamor'; -import Remove from '../../icons/v2/Remove'; +import { SvgRemove } from '../../icons/v2'; import { theme, type CSSProperties } from '../../style'; -import Button from '../common/Button'; -import Input from '../common/Input'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Input } from '../common/Input'; +import { View } from '../common/View'; import { Tooltip } from '../tooltips'; type Item = { @@ -575,7 +575,7 @@ function MultiItem({ name, onRemove }: MultiItemProps) { > {name} ); @@ -728,7 +728,7 @@ function isMultiAutocomplete( return multi; } -export default function Autocomplete({ +export function Autocomplete({ multi, ...props }: AutocompleteProps & { multi?: boolean }) { diff --git a/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx b/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx index b8c07ba36db..2ac5fa7b6f1 100644 --- a/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx @@ -14,13 +14,13 @@ import { type CategoryGroupEntity, } from 'loot-core/src/types/models'; -import Split from '../../icons/v0/Split'; +import { SvgSplit } from '../../icons/v0'; import { useResponsive } from '../../ResponsiveProvider'; import { type CSSProperties, theme } from '../../style'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; -import Autocomplete, { defaultFilterSuggestion } from './Autocomplete'; +import { Autocomplete, defaultFilterSuggestion } from './Autocomplete'; export type CategoryListProps = { items: Array; @@ -107,7 +107,7 @@ type CategoryAutocompleteProps = ComponentProps & { renderCategoryItem?: (props: CategoryItemProps) => ReactNode; }; -export default function CategoryAutocomplete({ +export function CategoryAutocomplete({ categoryGroups, showSplitOption, embedded, @@ -272,7 +272,7 @@ export function SplitTransactionButton({ {Icon ? ( ) : ( - + )} Split Transaction diff --git a/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx b/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx index 1c908d0be68..0df6e3bc109 100644 --- a/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx @@ -20,13 +20,14 @@ import { type PayeeEntity, } from 'loot-core/src/types/models'; -import Add from '../../icons/v1/Add'; +import { SvgAdd } from '../../icons/v1'; import { useResponsive } from '../../ResponsiveProvider'; import { type CSSProperties, theme } from '../../style'; -import Button from '../common/Button'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { View } from '../common/View'; -import Autocomplete, { +import { + Autocomplete, defaultFilterSuggestion, AutocompleteFooter, } from './Autocomplete'; @@ -167,7 +168,7 @@ type PayeeAutocompleteProps = { payees?: PayeeEntity[]; }; -export default function PayeeAutocomplete({ +export function PayeeAutocomplete({ value, inputProps, showMakeTransfer = true, @@ -403,7 +404,7 @@ export function CreatePayeeButton({ {Icon ? ( ) : ( - = { items: T[]; @@ -60,7 +60,7 @@ type SavedFilterAutocompleteProps = { embedded?: boolean; } & ComponentProps>; -export default function SavedFilterAutocomplete({ +export function SavedFilterAutocomplete({ embedded, ...props }: SavedFilterAutocompleteProps) { @@ -74,7 +74,6 @@ export default function SavedFilterAutocomplete({ suggestions={filters} renderItems={(items, getItemProps, highlightedIndex) => ( - ['monthBounds']; }; -const BudgetPageHeader = memo( +export const BudgetPageHeader = memo( ({ startMonth, onMonthSelect, numMonths, monthBounds }) => { function getValidMonth(month) { const start = monthBounds.start; @@ -43,5 +43,3 @@ const BudgetPageHeader = memo( ); }, ); - -export default BudgetPageHeader; diff --git a/packages/desktop-client/src/components/budget/BudgetSummaries.tsx b/packages/desktop-client/src/components/budget/BudgetSummaries.tsx index 1367005cc11..759d51aed2c 100644 --- a/packages/desktop-client/src/components/budget/BudgetSummaries.tsx +++ b/packages/desktop-client/src/components/budget/BudgetSummaries.tsx @@ -11,20 +11,18 @@ import { css } from 'glamor'; import { addMonths, subMonths } from 'loot-core/src/shared/months'; -import useResizeObserver from '../../hooks/useResizeObserver'; -import View from '../common/View'; +import { useResizeObserver } from '../../hooks/useResizeObserver'; +import { View } from '../common/View'; import { MonthsContext } from './MonthsContext'; -import type ReportBudgetSummary from './report/budgetsummary/BudgetSummary'; -import type RolloverBudgetSummary from './rollover/budgetsummary/BudgetSummary'; +import { type BudgetSummary as ReportBudgetSummary } from './report/budgetsummary/BudgetSummary'; +import { type BudgetSummary as RolloverBudgetSummary } from './rollover/budgetsummary/BudgetSummary'; type BudgetSummariesProps = { SummaryComponent: typeof ReportBudgetSummary | typeof RolloverBudgetSummary; }; -export default function BudgetSummaries({ - SummaryComponent, -}: BudgetSummariesProps) { +export function BudgetSummaries({ SummaryComponent }: BudgetSummariesProps) { const { months } = useContext(MonthsContext); const [widthState, setWidthState] = useState(0); diff --git a/packages/desktop-client/src/components/budget/BudgetTable.jsx b/packages/desktop-client/src/components/budget/BudgetTable.jsx index 1059c0633fd..3000ebb1af4 100644 --- a/packages/desktop-client/src/components/budget/BudgetTable.jsx +++ b/packages/desktop-client/src/components/budget/BudgetTable.jsx @@ -3,16 +3,16 @@ import React, { createRef, Component } from 'react'; import * as monthUtils from 'loot-core/src/shared/months'; import { theme, styles } from '../../style'; -import View from '../common/View'; +import { View } from '../common/View'; import { IntersectionBoundary } from '../tooltips'; -import BudgetCategories from './BudgetCategories'; -import BudgetSummaries from './BudgetSummaries'; -import BudgetTotals from './BudgetTotals'; +import { BudgetCategories } from './BudgetCategories'; +import { BudgetSummaries } from './BudgetSummaries'; +import { BudgetTotals } from './BudgetTotals'; import { MonthsProvider } from './MonthsContext'; import { findSortDown, findSortUp, getScrollbarWidth } from './util'; -class BudgetTable extends Component { +export class BudgetTable extends Component { constructor(props) { super(props); this.budgetCategoriesRef = createRef(); @@ -285,5 +285,3 @@ class BudgetTable extends Component { ); } } - -export default BudgetTable; diff --git a/packages/desktop-client/src/components/budget/BudgetTotals.tsx b/packages/desktop-client/src/components/budget/BudgetTotals.tsx index 52fb650727d..005e2afa939 100644 --- a/packages/desktop-client/src/components/budget/BudgetTotals.tsx +++ b/packages/desktop-client/src/components/budget/BudgetTotals.tsx @@ -1,13 +1,13 @@ import React, { type ComponentProps, memo, useState } from 'react'; -import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple'; +import { SvgDotsHorizontalTriple } from '../../icons/v1'; import { theme, styles } from '../../style'; -import Button from '../common/Button'; -import Menu from '../common/Menu'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Menu } from '../common/Menu'; +import { View } from '../common/View'; import { Tooltip } from '../tooltips'; -import RenderMonths from './RenderMonths'; +import { RenderMonths } from './RenderMonths'; import { getScrollbarWidth } from './util'; type BudgetTotalsProps = { @@ -17,7 +17,7 @@ type BudgetTotalsProps = { collapseAllCategories: () => void; }; -const BudgetTotals = memo(function BudgetTotals({ +export const BudgetTotals = memo(function BudgetTotals({ MonthComponent, toggleHiddenCategories, expandAllCategories, @@ -61,7 +61,7 @@ const BudgetTotals = memo(function BudgetTotals({ }} style={{ color: 'currentColor', padding: 3 }} > - ); }); - -export default BudgetTotals; diff --git a/packages/desktop-client/src/components/budget/DynamicBudgetTable.tsx b/packages/desktop-client/src/components/budget/DynamicBudgetTable.tsx index 961f2ee146b..a8655a5e4b0 100644 --- a/packages/desktop-client/src/components/budget/DynamicBudgetTable.tsx +++ b/packages/desktop-client/src/components/budget/DynamicBudgetTable.tsx @@ -3,11 +3,11 @@ import { useSelector } from 'react-redux'; import AutoSizer from 'react-virtualized-auto-sizer'; import { useActions } from '../../hooks/useActions'; -import View from '../common/View'; +import { View } from '../common/View'; import { useBudgetMonthCount } from './BudgetMonthCountContext'; -import BudgetPageHeader from './BudgetPageHeader'; -import BudgetTable from './BudgetTable'; +import { BudgetPageHeader } from './BudgetPageHeader'; +import { BudgetTable } from './BudgetTable'; function getNumPossibleMonths(width: number) { const estimatedTableWidth = width - 200; @@ -100,19 +100,20 @@ const DynamicBudgetTableInner = forwardRef< }, ); -export default forwardRef( - (props, ref) => { - return ( - - {({ width, height }) => ( - - )} - - ); - }, -); +export const DynamicBudgetTable = forwardRef< + BudgetTable, + DynamicBudgetTableInnerProps +>((props, ref) => { + return ( + + {({ width, height }) => ( + + )} + + ); +}); diff --git a/packages/desktop-client/src/components/budget/ExpenseCategory.tsx b/packages/desktop-client/src/components/budget/ExpenseCategory.tsx index cc131396687..462fb7d88ec 100644 --- a/packages/desktop-client/src/components/budget/ExpenseCategory.tsx +++ b/packages/desktop-client/src/components/budget/ExpenseCategory.tsx @@ -3,7 +3,7 @@ import React, { type ComponentProps } from 'react'; import { type CategoryEntity } from 'loot-core/src/types/models'; import { theme } from '../../style'; -import View from '../common/View'; +import { View } from '../common/View'; import { useDraggable, useDroppable, @@ -14,8 +14,8 @@ import { } from '../sort'; import { Row } from '../table'; -import RenderMonths from './RenderMonths'; -import SidebarCategory from './SidebarCategory'; +import { RenderMonths } from './RenderMonths'; +import { SidebarCategory } from './SidebarCategory'; type ExpenseCategoryProps = { cat: CategoryEntity; @@ -32,7 +32,7 @@ type ExpenseCategoryProps = { onReorder: OnDropCallback; }; -function ExpenseCategory({ +export function ExpenseCategory({ cat, editingCell, dragState, @@ -108,5 +108,3 @@ function ExpenseCategory({ ); } - -export default ExpenseCategory; diff --git a/packages/desktop-client/src/components/budget/ExpenseGroup.tsx b/packages/desktop-client/src/components/budget/ExpenseGroup.tsx index 7c1bfd8983f..049a46032c6 100644 --- a/packages/desktop-client/src/components/budget/ExpenseGroup.tsx +++ b/packages/desktop-client/src/components/budget/ExpenseGroup.tsx @@ -1,7 +1,7 @@ import React, { type ComponentProps } from 'react'; import { theme } from '../../style'; -import View from '../common/View'; +import { View } from '../common/View'; import { useDraggable, useDroppable, @@ -12,8 +12,8 @@ import { } from '../sort'; import { Row, ROW_HEIGHT } from '../table'; -import RenderMonths from './RenderMonths'; -import SidebarGroup from './SidebarGroup'; +import { RenderMonths } from './RenderMonths'; +import { SidebarGroup } from './SidebarGroup'; type ExpenseGroupProps = { group: ComponentProps['group']; @@ -33,7 +33,7 @@ type ExpenseGroupProps = { onShowNewCategory?: ComponentProps['onShowNewCategory']; }; -function ExpenseGroup({ +export function ExpenseGroup({ group, collapsed, editingCell, @@ -131,5 +131,3 @@ function ExpenseGroup({ ); } - -export default ExpenseGroup; diff --git a/packages/desktop-client/src/components/budget/IncomeCategory.tsx b/packages/desktop-client/src/components/budget/IncomeCategory.tsx index 0d5625186da..d03e0b1307e 100644 --- a/packages/desktop-client/src/components/budget/IncomeCategory.tsx +++ b/packages/desktop-client/src/components/budget/IncomeCategory.tsx @@ -11,8 +11,8 @@ import { } from '../sort'; import { Row } from '../table'; -import RenderMonths from './RenderMonths'; -import SidebarCategory from './SidebarCategory'; +import { RenderMonths } from './RenderMonths'; +import { SidebarCategory } from './SidebarCategory'; type IncomeCategoryProps = { cat: CategoryEntity; @@ -29,7 +29,7 @@ type IncomeCategoryProps = { onShowActivity: (name: string, id: string, idx: number) => void; }; -function IncomeCategory({ +export function IncomeCategory({ cat, isLast, editingCell, @@ -89,5 +89,3 @@ function IncomeCategory({ ); } - -export default IncomeCategory; diff --git a/packages/desktop-client/src/components/budget/IncomeGroup.tsx b/packages/desktop-client/src/components/budget/IncomeGroup.tsx index e3bd787f83e..5ae414ec64b 100644 --- a/packages/desktop-client/src/components/budget/IncomeGroup.tsx +++ b/packages/desktop-client/src/components/budget/IncomeGroup.tsx @@ -3,8 +3,8 @@ import React from 'react'; import { theme } from '../../style'; import { Row } from '../table'; -import RenderMonths from './RenderMonths'; -import SidebarGroup from './SidebarGroup'; +import { RenderMonths } from './RenderMonths'; +import { SidebarGroup } from './SidebarGroup'; type IncomeGroupProps = { group: { @@ -25,7 +25,7 @@ type IncomeGroupProps = { onShowNewCategory: (groupId: string) => void; }; -function IncomeGroup({ +export function IncomeGroup({ group, editingCell, collapsed, @@ -60,5 +60,3 @@ function IncomeGroup({ ); } - -export default IncomeGroup; diff --git a/packages/desktop-client/src/components/budget/IncomeHeader.tsx b/packages/desktop-client/src/components/budget/IncomeHeader.tsx index a797ceacc2b..344a3f9d9d8 100644 --- a/packages/desktop-client/src/components/budget/IncomeHeader.tsx +++ b/packages/desktop-client/src/components/budget/IncomeHeader.tsx @@ -1,16 +1,19 @@ import React from 'react'; -import Button from '../common/Button'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { View } from '../common/View'; -import RenderMonths from './RenderMonths'; +import { RenderMonths } from './RenderMonths'; type IncomeHeaderProps = { MonthComponent?: () => JSX.Element; onShowNewGroup: () => void; }; -function IncomeHeader({ MonthComponent, onShowNewGroup }: IncomeHeaderProps) { +export function IncomeHeader({ + MonthComponent, + onShowNewGroup, +}: IncomeHeaderProps) { return ( ); } - -export default IncomeHeader; diff --git a/packages/desktop-client/src/components/budget/MobileBudget.jsx b/packages/desktop-client/src/components/budget/MobileBudget.jsx deleted file mode 100644 index 0408a57560d..00000000000 --- a/packages/desktop-client/src/components/budget/MobileBudget.jsx +++ /dev/null @@ -1,479 +0,0 @@ -import React, { Component } from 'react'; -import { useSelector } from 'react-redux'; - -import { useSpreadsheet } from 'loot-core/src/client/SpreadsheetProvider'; -import { send, listen } from 'loot-core/src/platform/client/fetch'; -import * as monthUtils from 'loot-core/src/shared/months'; - -import { useActions } from '../../hooks/useActions'; -import useCategories from '../../hooks/useCategories'; -import { useSetThemeColor } from '../../hooks/useSetThemeColor'; -import AnimatedLoading from '../../icons/AnimatedLoading'; -import { theme } from '../../style'; -import View from '../common/View'; -import SyncRefresh from '../SyncRefresh'; - -import { BudgetTable } from './MobileBudgetTable'; -import { prewarmMonth, switchBudgetType } from './util'; - -const CATEGORY_BUDGET_EDIT_ACTION = 'category-budget'; -const BALANCE_MENU_OPEN_ACTION = 'balance-menu'; - -class Budget extends Component { - constructor(props) { - super(props); - - const currentMonth = monthUtils.currentMonth(); - this.state = { - bounds: { start: currentMonth, end: currentMonth }, - currentMonth, - initialized: false, - editMode: false, - editingBudgetCategoryId: null, - openBalanceActionMenuId: null, - }; - } - - async loadCategories() { - await this.props.getCategories(); - } - - async componentDidMount() { - // let removeBlur = this.props.navigation.addListener('didBlur', () => { - // this.setState({ editMode: false }); - // }); - - const { start, end } = await send('get-budget-bounds'); - await prewarmMonth( - this.props.budgetType, - this.props.spreadsheet, - this.state.currentMonth, - ); - - this.setState({ - bounds: { start, end }, - initialized: true, - }); - - const unlisten = listen('sync-event', ({ type, tables }) => { - if ( - type === 'success' && - (tables.includes('categories') || - tables.includes('category_mapping') || - tables.includes('category_groups')) - ) { - // TODO: is this loading every time? - this.loadCategories(); - } - }); - - this.cleanup = () => { - // removeBlur(); - unlisten(); - }; - } - - componentWillUnmount() { - this.cleanup?.(); - } - - onShowBudgetSummary = () => { - if (this.props.budgetType === 'report') { - this.props.pushModal('report-budget-summary', { - month: this.state.currentMonth, - }); - } else { - this.props.pushModal('rollover-budget-summary', { - month: this.state.currentMonth, - onBudgetAction: this.props.applyBudgetAction, - }); - } - }; - - onBudgetAction = type => { - const { currentMonth } = this.state; - this.props.applyBudgetAction(currentMonth, type, this.state.bounds); - }; - - onAddGroup = () => { - this.props.pushModal('new-category-group', { - onValidate: name => (!name ? 'Name is required.' : null), - onSubmit: async name => { - await this.props.createGroup(name); - }, - }); - }; - - onAddCategory = (groupId, isIncome) => { - this.props.pushModal('new-category', { - onValidate: name => (!name ? 'Name is required.' : null), - onSubmit: async name => { - this.props.collapseModals('category-group-menu'); - await this.props.createCategory(name, groupId, isIncome); - }, - }); - }; - - onSaveGroup = group => { - this.props.updateGroup(group); - }; - - onDeleteGroup = async groupId => { - const { categoryGroups } = this.props; - const group = categoryGroups?.find(g => g.id === groupId); - - if (!group) { - return; - } - - let mustTransfer = false; - for (const category of group.categories) { - if (await send('must-category-transfer', { id: category.id })) { - mustTransfer = true; - break; - } - } - - if (mustTransfer) { - this.props.pushModal('confirm-category-delete', { - group: groupId, - onDelete: transferCategory => { - this.props.collapseModals('category-group-menu'); - this.props.deleteGroup(groupId, transferCategory); - }, - }); - } else { - this.props.collapseModals('category-group-menu'); - this.props.deleteGroup(groupId); - } - }; - - onSaveCategory = category => { - this.props.updateCategory(category); - }; - - onDeleteCategory = async categoryId => { - const mustTransfer = await send('must-category-transfer', { - id: categoryId, - }); - - if (mustTransfer) { - this.props.pushModal('confirm-category-delete', { - category: categoryId, - onDelete: transferCategory => { - if (categoryId !== transferCategory) { - this.props.collapseModals('category-menu'); - this.props.deleteCategory(categoryId, transferCategory); - } - }, - }); - } else { - this.props.collapseModals('category-menu'); - this.props.deleteCategory(categoryId); - } - }; - - onReorderCategory = (id, { inGroup, aroundCategory }) => { - const { categoryGroups } = this.props; - let groupId, targetId; - - if (inGroup) { - groupId = inGroup; - } else if (aroundCategory) { - const { id: originalCatId, position } = aroundCategory; - - let catId = originalCatId; - const group = categoryGroups.find(group => - group.categories.find(cat => cat.id === catId), - ); - - if (position === 'bottom') { - const { categories } = group; - const idx = categories.findIndex(cat => cat.id === catId); - catId = idx < categories.length - 1 ? categories[idx + 1].id : null; - } - - groupId = group.id; - targetId = catId; - } - - this.props.moveCategory(id, groupId, targetId); - }; - - onReorderGroup = (id, targetId, position) => { - const { categoryGroups } = this.props; - - if (position === 'bottom') { - const idx = categoryGroups.findIndex(group => group.id === targetId); - targetId = - idx < categoryGroups.length - 1 ? categoryGroups[idx + 1].id : null; - } - - this.props.moveCategoryGroup(id, targetId); - }; - - sync = async () => { - const { updated, error } = await this.props.sync(); - if (error) { - return 'error'; - } else if (updated) { - return 'updated'; - } - return null; - }; - - onPrevMonth = async () => { - const { spreadsheet, budgetType } = this.props; - const month = monthUtils.subMonths(this.state.currentMonth, 1); - await prewarmMonth(budgetType, spreadsheet, month); - this.setState({ currentMonth: month, initialized: true }); - }; - - onNextMonth = async () => { - const { spreadsheet, budgetType } = this.props; - const month = monthUtils.addMonths(this.state.currentMonth, 1); - await prewarmMonth(budgetType, spreadsheet, month); - this.setState({ currentMonth: month, initialized: true }); - }; - - onOpenMonthActionMenu = () => { - const { budgetType } = this.props; - - const options = [ - 'Copy last month’s budget', - 'Set budgets to zero', - 'Set budgets to 3 month average', - budgetType === 'report' && 'Apply to all future budgets', - ].filter(Boolean); - - this.props.showActionSheetWithOptions( - { - options, - cancelButtonIndex: options.length - 1, - title: 'Actions', - }, - idx => { - switch (idx) { - case 0: - this.setState({ editMode: true }); - break; - case 1: - this.onBudgetAction('copy-last'); - break; - case 2: - this.onBudgetAction('set-zero'); - break; - case 3: - this.onBudgetAction('set-3-avg'); - break; - case 4: - if (budgetType === 'report') { - this.onBudgetAction('set-all-future'); - } - break; - default: - } - }, - ); - }; - - onSwitchBudgetType = async () => { - const { spreadsheet, budgetType, loadPrefs } = this.props; - const { bounds, currentMonth } = this.state; - - this.setState({ initialized: false }); - - const newBudgetType = budgetType === 'rollover' ? 'report' : 'rollover'; - await switchBudgetType( - newBudgetType, - spreadsheet, - bounds, - currentMonth, - () => loadPrefs(), - ); - - this.setState({ initialized: true }); - }; - - onSaveNotes = async (id, notes) => { - await send('notes-save', { id, note: notes }); - }; - - onEditGroupNotes = id => { - const { categoryGroups } = this.props; - const group = categoryGroups.find(g => g.id === id); - this.props.pushModal('notes', { - id, - name: group.name, - onSave: this.onSaveNotes, - }); - }; - - onEditCategoryNotes = id => { - const { categories } = this.props; - const category = categories.find(c => c.id === id); - this.props.pushModal('notes', { - id, - name: category.name, - onSave: this.onSaveNotes, - }); - }; - - onEditGroup = id => { - const { categoryGroups } = this.props; - const group = categoryGroups.find(g => g.id === id); - this.props.pushModal('category-group-menu', { - groupId: group.id, - onSave: this.onSaveGroup, - onAddCategory: this.onAddCategory, - onEditNotes: this.onEditGroupNotes, - onDelete: this.onDeleteGroup, - }); - }; - - onEditCategory = id => { - const { categories } = this.props; - const category = categories.find(c => c.id === id); - this.props.pushModal('category-menu', { - categoryId: category.id, - onSave: this.onSaveCategory, - onEditNotes: this.onEditCategoryNotes, - onDelete: this.onDeleteCategory, - }); - }; - - onEditCategoryBudget = id => { - this.onEdit(CATEGORY_BUDGET_EDIT_ACTION, id); - }; - - onOpenBalanceActionMenu = id => { - this.onEdit(BALANCE_MENU_OPEN_ACTION, id); - }; - - onEdit = (action, id) => { - const { editingBudgetCategoryId, openBalanceActionMenuId } = this.state; - - // Do not allow editing if another field is currently being edited. - // Cancel the currently editing field in that case. - const currentlyEditing = editingBudgetCategoryId || openBalanceActionMenuId; - - this.setState({ - editingBudgetCategoryId: - action === CATEGORY_BUDGET_EDIT_ACTION && !currentlyEditing ? id : null, - openBalanceActionMenuId: - action === BALANCE_MENU_OPEN_ACTION && !currentlyEditing ? id : null, - }); - - return { action, editingId: !currentlyEditing ? id : null }; - }; - - render() { - const { - currentMonth, - bounds, - editMode, - initialized, - editingBudgetCategoryId, - openBalanceActionMenuId, - } = this.state; - const { - categoryGroups, - categories, - prefs, - savePrefs, - budgetType, - navigation, - applyBudgetAction, - pushModal, - } = this.props; - const numberFormat = prefs.numberFormat || 'comma-dot'; - const hideFraction = prefs.hideFraction || false; - - if (!categoryGroups || !initialized) { - return ( - - - - ); - } - - return ( - - {({ refreshing, onRefresh }) => ( - - // } - editMode={editMode} - onEditMode={flag => this.setState({ editMode: flag })} - onShowBudgetSummary={this.onShowBudgetSummary} - onPrevMonth={this.onPrevMonth} - onNextMonth={this.onNextMonth} - onSaveGroup={this.onSaveGroup} - onDeleteGroup={this.onDeleteGroup} - onAddGroup={this.onAddGroup} - onAddCategory={this.onAddCategory} - onSaveCategory={this.onSaveCategory} - onDeleteCategory={this.onDeleteCategory} - onReorderCategory={this.onReorderCategory} - onReorderGroup={this.onReorderGroup} - onOpenMonthActionMenu={this.onOpenMonthActionMenu} - onBudgetAction={applyBudgetAction} - onRefresh={onRefresh} - onSwitchBudgetType={this.onSwitchBudgetType} - onSaveNotes={this.onSaveNotes} - onEditGroupNotes={this.onEditGroupNotes} - onEditCategoryNotes={this.onEditCategoryNotes} - savePrefs={savePrefs} - pushModal={pushModal} - onEditGroup={this.onEditGroup} - onEditCategory={this.onEditCategory} - editingBudgetCategoryId={editingBudgetCategoryId} - onEditCategoryBudget={this.onEditCategoryBudget} - openBalanceActionMenuId={openBalanceActionMenuId} - onOpenBalanceActionMenu={this.onOpenBalanceActionMenu} - /> - )} - - ); - } -} - -export default function BudgetWrapper() { - const { list: categories, grouped: categoryGroups } = useCategories(); - const budgetType = useSelector( - state => state.prefs.local.budgetType || 'rollover', - ); - const prefs = useSelector(state => state.prefs.local); - - const actions = useActions(); - const spreadsheet = useSpreadsheet(); - useSetThemeColor(theme.mobileViewTheme); - return ( - - ); -} diff --git a/packages/desktop-client/src/components/budget/MobileBudget.tsx b/packages/desktop-client/src/components/budget/MobileBudget.tsx new file mode 100644 index 00000000000..415652629b7 --- /dev/null +++ b/packages/desktop-client/src/components/budget/MobileBudget.tsx @@ -0,0 +1,477 @@ +import React, { useEffect, useState } from 'react'; +import { useSelector } from 'react-redux'; + +import { useSpreadsheet } from 'loot-core/src/client/SpreadsheetProvider'; +import { type PrefsState } from 'loot-core/src/client/state-types/prefs'; +import { send, listen } from 'loot-core/src/platform/client/fetch'; +import * as monthUtils from 'loot-core/src/shared/months'; +import { + type CategoryEntity, + type CategoryGroupEntity, +} from 'loot-core/src/types/models'; + +import { type BoundActions, useActions } from '../../hooks/useActions'; +import { useCategories } from '../../hooks/useCategories'; +import { useSetThemeColor } from '../../hooks/useSetThemeColor'; +import { AnimatedLoading } from '../../icons/AnimatedLoading'; +import { theme } from '../../style'; +import { View } from '../common/View'; +import { SyncRefresh } from '../SyncRefresh'; + +import { BudgetTable } from './MobileBudgetTable'; +import { prewarmMonth, switchBudgetType } from './util'; + +const CATEGORY_BUDGET_EDIT_ACTION = 'category-budget'; +const BALANCE_MENU_OPEN_ACTION = 'balance-menu'; + +type BudgetInnerProps = { + categories: CategoryEntity[]; + categoryGroups: CategoryGroupEntity[]; + prefs: PrefsState['local']; + loadPrefs: BoundActions['loadPrefs']; + savePrefs: BoundActions['savePrefs']; + budgetType: 'rollover' | 'report'; + spreadsheet: ReturnType; + applyBudgetAction: BoundActions['applyBudgetAction']; + collapseModals: BoundActions['collapseModals']; + pushModal: BoundActions['pushModal']; + getCategories: BoundActions['getCategories']; + createCategory: BoundActions['createCategory']; + updateCategory: BoundActions['updateCategory']; + deleteCategory: BoundActions['deleteCategory']; + moveCategory: BoundActions['moveCategory']; + createGroup: BoundActions['createGroup']; + updateGroup: BoundActions['updateGroup']; + deleteGroup: BoundActions['deleteGroup']; + moveCategoryGroup: BoundActions['moveCategoryGroup']; + sync: BoundActions['sync']; +}; + +function BudgetInner(props: BudgetInnerProps) { + const { + categoryGroups, + categories, + prefs, + loadPrefs, + savePrefs, + budgetType, + spreadsheet, + applyBudgetAction, + collapseModals, + pushModal, + createGroup, + updateGroup, + deleteGroup, + moveCategoryGroup, + createCategory, + updateCategory, + deleteCategory, + moveCategory, + } = props; + + const currMonth = monthUtils.currentMonth(); + + const [bounds, setBounds] = useState({ start: currMonth, end: currMonth }); + const [currentMonth, setCurrentMonth] = useState(currMonth); + const [initialized, setInitialized] = useState(false); + const [editMode, setEditMode] = useState(false); + const [editingBudgetCategoryId, setEditingBudgetCategoryId] = useState(null); + const [openBalanceActionMenuId, setOpenBalanceActionMenuId] = useState(null); + + useEffect(() => { + async function init() { + const { start, end } = await send('get-budget-bounds'); + setBounds({ start, end }); + + await prewarmMonth(props.budgetType, props.spreadsheet, currentMonth); + + setInitialized(true); + } + + init(); + + const unlisten = listen('sync-event', ({ type, tables }) => { + if ( + type === 'success' && + (tables.includes('categories') || + tables.includes('category_mapping') || + tables.includes('category_groups')) + ) { + // TODO: is this loading every time? + props.getCategories(); + } + }); + + return () => unlisten(); + }, []); + + const onShowBudgetSummary = () => { + if (budgetType === 'report') { + pushModal('report-budget-summary', { + month: currentMonth, + }); + } else { + pushModal('rollover-budget-summary', { + month: currentMonth, + onBudgetAction: applyBudgetAction, + }); + } + }; + + // const onBudgetAction = type => { + // applyBudgetAction(currentMonth, type, bounds); + // }; + + const onAddGroup = () => { + pushModal('new-category-group', { + onValidate: name => (!name ? 'Name is required.' : null), + onSubmit: async name => { + await createGroup(name); + }, + }); + }; + + const onAddCategory = (groupId, isIncome) => { + pushModal('new-category', { + onValidate: name => (!name ? 'Name is required.' : null), + onSubmit: async name => { + collapseModals('category-group-menu'); + await createCategory(name, groupId, isIncome, false); + }, + }); + }; + + const onSaveGroup = group => { + updateGroup(group); + }; + + const onDeleteGroup = async groupId => { + const group = categoryGroups?.find(g => g.id === groupId); + + if (!group) { + return; + } + + let mustTransfer = false; + for (const category of group.categories ?? []) { + if (await send('must-category-transfer', { id: category.id })) { + mustTransfer = true; + break; + } + } + + if (mustTransfer) { + pushModal('confirm-category-delete', { + group: groupId, + onDelete: transferCategory => { + collapseModals('category-group-menu'); + deleteGroup(groupId, transferCategory); + }, + }); + } else { + collapseModals('category-group-menu'); + deleteGroup(groupId); + } + }; + + const onSaveCategory = category => { + updateCategory(category); + }; + + const onDeleteCategory = async categoryId => { + const mustTransfer = await send('must-category-transfer', { + id: categoryId, + }); + + if (mustTransfer) { + pushModal('confirm-category-delete', { + category: categoryId, + onDelete: transferCategory => { + if (categoryId !== transferCategory) { + collapseModals('category-menu'); + deleteCategory(categoryId, transferCategory); + } + }, + }); + } else { + collapseModals('category-menu'); + deleteCategory(categoryId); + } + }; + + const onReorderCategory = (id, { inGroup, aroundCategory }) => { + let groupId, targetId; + + if (inGroup) { + groupId = inGroup; + } else if (aroundCategory) { + const { id: originalCatId, position } = aroundCategory; + + let catId = originalCatId; + const group = categoryGroups.find(group => + group.categories?.find(cat => cat.id === catId), + ); + + if (position === 'bottom') { + const idx = group?.categories?.findIndex(cat => cat.id === catId) ?? -1; + catId = group?.categories + ? idx < group.categories.length - 1 + ? group.categories[idx + 1].id + : null + : null; + } + + groupId = group?.id; + targetId = catId; + } + + moveCategory(id, groupId, targetId); + }; + + const onReorderGroup = (id, targetId, position) => { + if (position === 'bottom') { + const idx = categoryGroups.findIndex(group => group.id === targetId); + targetId = + idx < categoryGroups.length - 1 ? categoryGroups[idx + 1].id : null; + } + + moveCategoryGroup(id, targetId); + }; + + const sync = async () => { + const result = await props.sync(); + if (result?.error) { + return 'error'; + } else if (result) { + return 'updated'; + } + return null; + }; + + const onPrevMonth = async () => { + const month = monthUtils.subMonths(currentMonth, 1); + await prewarmMonth(budgetType, spreadsheet, month); + setCurrentMonth(month); + setInitialized(true); + }; + + const onNextMonth = async () => { + const month = monthUtils.addMonths(currentMonth, 1); + await prewarmMonth(budgetType, spreadsheet, month); + setCurrentMonth(month); + setInitialized(true); + }; + + // const onOpenMonthActionMenu = () => { + // const options = [ + // 'Copy last month’s budget', + // 'Set budgets to zero', + // 'Set budgets to 3 month average', + // budgetType === 'report' && 'Apply to all future budgets', + // ].filter(Boolean); + + // props.showActionSheetWithOptions( + // { + // options, + // cancelButtonIndex: options.length - 1, + // title: 'Actions', + // }, + // idx => { + // switch (idx) { + // case 0: + // setEditMode(true); + // break; + // case 1: + // onBudgetAction('copy-last'); + // break; + // case 2: + // onBudgetAction('set-zero'); + // break; + // case 3: + // onBudgetAction('set-3-avg'); + // break; + // case 4: + // if (budgetType === 'report') { + // onBudgetAction('set-all-future'); + // } + // break; + // default: + // } + // }, + // ); + // }; + + const onSwitchBudgetType = async () => { + setInitialized(false); + + const newBudgetType = budgetType === 'rollover' ? 'report' : 'rollover'; + await switchBudgetType( + newBudgetType, + spreadsheet, + bounds, + currentMonth, + () => loadPrefs(), + ); + + setInitialized(true); + }; + + const onSaveNotes = async (id, notes) => { + await send('notes-save', { id, note: notes }); + }; + + const onEditGroupNotes = id => { + const group = categoryGroups.find(g => g.id === id); + pushModal('notes', { + id, + name: group.name, + onSave: onSaveNotes, + }); + }; + + const onEditCategoryNotes = id => { + const category = categories.find(c => c.id === id); + pushModal('notes', { + id, + name: category.name, + onSave: onSaveNotes, + }); + }; + + const onEditGroup = id => { + const group = categoryGroups.find(g => g.id === id); + pushModal('category-group-menu', { + groupId: group.id, + onSave: onSaveGroup, + onAddCategory, + onEditNotes: onEditGroupNotes, + onDelete: onDeleteGroup, + }); + }; + + const onEditCategory = id => { + const category = categories.find(c => c.id === id); + pushModal('category-menu', { + categoryId: category.id, + onSave: onSaveCategory, + onEditNotes: onEditCategoryNotes, + onDelete: onDeleteCategory, + }); + }; + + const onEditCategoryBudget = id => { + onEdit(CATEGORY_BUDGET_EDIT_ACTION, id); + }; + + const onOpenBalanceActionMenu = id => { + onEdit(BALANCE_MENU_OPEN_ACTION, id); + }; + + const onEdit = (action, id) => { + // Do not allow editing if another field is currently being edited. + // Cancel the currently editing field in that case. + const currentlyEditing = editingBudgetCategoryId || openBalanceActionMenuId; + + setEditingBudgetCategoryId( + action === CATEGORY_BUDGET_EDIT_ACTION && !currentlyEditing ? id : null, + ); + setOpenBalanceActionMenuId( + action === BALANCE_MENU_OPEN_ACTION && !currentlyEditing ? id : null, + ); + + return { action, editingId: !currentlyEditing ? id : null }; + }; + + const numberFormat = prefs?.numberFormat || 'comma-dot'; + const hideFraction = prefs?.hideFraction || false; + + if (!categoryGroups || !initialized) { + return ( + + + + ); + } + + return ( + { + await sync(); + }} + > + {({ refreshing, onRefresh }) => ( + + // } + editMode={editMode} + onEditMode={flag => setEditMode(flag)} + onShowBudgetSummary={onShowBudgetSummary} + onPrevMonth={onPrevMonth} + onNextMonth={onNextMonth} + onSaveGroup={onSaveGroup} + onDeleteGroup={onDeleteGroup} + onAddGroup={onAddGroup} + onAddCategory={onAddCategory} + onSaveCategory={onSaveCategory} + onDeleteCategory={onDeleteCategory} + onReorderCategory={onReorderCategory} + onReorderGroup={onReorderGroup} + onOpenMonthActionMenu={() => {}} //onOpenMonthActionMenu} + onBudgetAction={applyBudgetAction} + onRefresh={onRefresh} + onSwitchBudgetType={onSwitchBudgetType} + onSaveNotes={onSaveNotes} + onEditGroupNotes={onEditGroupNotes} + onEditCategoryNotes={onEditCategoryNotes} + savePrefs={savePrefs} + pushModal={pushModal} + onEditGroup={onEditGroup} + onEditCategory={onEditCategory} + editingBudgetCategoryId={editingBudgetCategoryId} + onEditCategoryBudget={onEditCategoryBudget} + openBalanceActionMenuId={openBalanceActionMenuId} + onOpenBalanceActionMenu={onOpenBalanceActionMenu} + /> + )} + + ); +} + +export function Budget() { + const { list: categories, grouped: categoryGroups } = useCategories(); + const budgetType = useSelector( + state => state.prefs.local?.budgetType || 'rollover', + ); + const prefs = useSelector(state => state.prefs.local); + + const actions = useActions(); + const spreadsheet = useSpreadsheet(); + useSetThemeColor(theme.mobileViewTheme); + return ( + + ); +} diff --git a/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx b/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx index d326e87ce3a..fb5b9d5c24d 100644 --- a/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx +++ b/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx @@ -6,24 +6,26 @@ import memoizeOne from 'memoize-one'; import { rolloverBudget, reportBudget } from 'loot-core/src/client/queries'; import * as monthUtils from 'loot-core/src/shared/months'; -import useFeatureFlag from '../../hooks/useFeatureFlag'; -import ArrowThinLeft from '../../icons/v1/ArrowThinLeft'; -import ArrowThinRight from '../../icons/v1/ArrowThinRight'; -import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple'; +import { useFeatureFlag } from '../../hooks/useFeatureFlag'; +import { + SvgArrowThinLeft, + SvgArrowThinRight, + SvgDotsHorizontalTriple, +} from '../../icons/v1'; import { useResponsive } from '../../ResponsiveProvider'; import { theme, styles } from '../../style'; -import Button from '../common/Button'; -import Card from '../common/Card'; -import Label from '../common/Label'; -import Menu from '../common/Menu'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Card } from '../common/Card'; +import { Label } from '../common/Label'; +import { Menu } from '../common/Menu'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { Page } from '../Page'; -import PullToRefresh from '../responsive/PullToRefresh'; -import CellValue from '../spreadsheet/CellValue'; -import NamespaceContext from '../spreadsheet/NamespaceContext'; -import useFormat from '../spreadsheet/useFormat'; -import useSheetValue from '../spreadsheet/useSheetValue'; +import { PullToRefresh } from '../responsive/PullToRefresh'; +import { CellValue } from '../spreadsheet/CellValue'; +import { NamespaceContext } from '../spreadsheet/NamespaceContext'; +import { useFormat } from '../spreadsheet/useFormat'; +import { useSheetValue } from '../spreadsheet/useSheetValue'; import { Tooltip, useTooltip } from '../tooltips'; import { AmountInput } from '../util/AmountInput'; // import { @@ -32,10 +34,10 @@ import { AmountInput } from '../util/AmountInput'; // } from '../mobile/AmountInput'; // import { DragDrop, Draggable, Droppable, DragDropHighlight } from './dragdrop'; -import BalanceWithCarryover from './BalanceWithCarryover'; +import { BalanceWithCarryover } from './BalanceWithCarryover'; import { ListItem, ROW_HEIGHT } from './MobileTable'; -import ReportBudgetBalanceTooltip from './report/BalanceTooltip'; -import RolloverBudgetBalanceTooltip from './rollover/BalanceTooltip'; +import { BalanceTooltip as ReportBudgetBalanceTooltip } from './report/BalanceTooltip'; +import { BalanceTooltip as RolloverBudgetBalanceTooltip } from './rollover/BalanceTooltip'; import { makeAmountGrey } from './util'; function ToBudget({ toBudget, onClick }) { @@ -1494,7 +1496,7 @@ function BudgetPageMenu({ }} {...tooltip.getOpenEvents()} > - - + - + ); diff --git a/packages/desktop-client/src/components/budget/MobileTable.tsx b/packages/desktop-client/src/components/budget/MobileTable.tsx index a63df9db403..1b1ad6c88c5 100644 --- a/packages/desktop-client/src/components/budget/MobileTable.tsx +++ b/packages/desktop-client/src/components/budget/MobileTable.tsx @@ -1,7 +1,7 @@ import React, { type ComponentProps, type ReactNode } from 'react'; import { type CSSProperties, theme } from '../../style'; -import View from '../common/View'; +import { View } from '../common/View'; export const ROW_HEIGHT = 50; diff --git a/packages/desktop-client/src/components/budget/MonthCountSelector.tsx b/packages/desktop-client/src/components/budget/MonthCountSelector.tsx index c3509bc20bc..737dcdc6937 100644 --- a/packages/desktop-client/src/components/budget/MonthCountSelector.tsx +++ b/packages/desktop-client/src/components/budget/MonthCountSelector.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import CalendarIcon from '../../icons/v2/Calendar'; +import { SvgCalendar } from '../../icons/v2'; import { theme } from '../../style'; -import View from '../common/View'; +import { View } from '../common/View'; import { useBudgetMonthCount } from './BudgetMonthCountContext'; @@ -13,7 +13,7 @@ type CalendarProps = { function Calendar({ color, onClick }: CalendarProps) { return ( - diff --git a/packages/desktop-client/src/components/budget/MonthPicker.tsx b/packages/desktop-client/src/components/budget/MonthPicker.tsx index b80e8e740ee..d42a99b6584 100644 --- a/packages/desktop-client/src/components/budget/MonthPicker.tsx +++ b/packages/desktop-client/src/components/budget/MonthPicker.tsx @@ -2,9 +2,9 @@ import { type CSSProperties, useState } from 'react'; import * as monthUtils from 'loot-core/src/shared/months'; -import useResizeObserver from '../../hooks/useResizeObserver'; +import { useResizeObserver } from '../../hooks/useResizeObserver'; import { styles, theme } from '../../style'; -import View from '../common/View'; +import { View } from '../common/View'; import { type BoundsProps } from './MonthsContext'; diff --git a/packages/desktop-client/src/components/budget/RenderMonths.tsx b/packages/desktop-client/src/components/budget/RenderMonths.tsx index 649734d9755..1960f7ccb0b 100644 --- a/packages/desktop-client/src/components/budget/RenderMonths.tsx +++ b/packages/desktop-client/src/components/budget/RenderMonths.tsx @@ -7,8 +7,8 @@ import React, { import * as monthUtils from 'loot-core/src/shared/months'; import { theme } from '../../style'; -import View from '../common/View'; -import NamespaceContext from '../spreadsheet/NamespaceContext'; +import { View } from '../common/View'; +import { NamespaceContext } from '../spreadsheet/NamespaceContext'; import { MonthsContext } from './MonthsContext'; @@ -19,7 +19,7 @@ type RenderMonthsProps = { style?: CSSProperties; }; -function RenderMonths({ +export function RenderMonths({ component: Component, editingIndex, args, @@ -48,5 +48,3 @@ function RenderMonths({ ); }) as unknown as JSX.Element; } - -export default RenderMonths; diff --git a/packages/desktop-client/src/components/budget/SidebarCategory.tsx b/packages/desktop-client/src/components/budget/SidebarCategory.tsx index 622b9869b67..1beef2ca4f6 100644 --- a/packages/desktop-client/src/components/budget/SidebarCategory.tsx +++ b/packages/desktop-client/src/components/budget/SidebarCategory.tsx @@ -2,12 +2,12 @@ import React, { type CSSProperties, type Ref, useState } from 'react'; import { type CategoryEntity } from 'loot-core/src/types/models'; -import CheveronDown from '../../icons/v1/CheveronDown'; +import { SvgCheveronDown } from '../../icons/v1'; import { theme } from '../../style'; -import Button from '../common/Button'; -import Menu from '../common/Menu'; -import View from '../common/View'; -import NotesButton from '../NotesButton'; +import { Button } from '../common/Button'; +import { Menu } from '../common/Menu'; +import { View } from '../common/View'; +import { NotesButton } from '../NotesButton'; import { InputCell } from '../table'; import { Tooltip } from '../tooltips'; @@ -26,7 +26,7 @@ type SidebarCategoryProps = { onHideNewCategory?: () => void; }; -function SidebarCategory({ +export function SidebarCategory({ innerRef, category, dragPreview, @@ -73,7 +73,7 @@ function SidebarCategory({ }} style={{ color: 'currentColor', padding: 3 }} > - ); } - -export default SidebarCategory; diff --git a/packages/desktop-client/src/components/budget/SidebarGroup.tsx b/packages/desktop-client/src/components/budget/SidebarGroup.tsx index a7a9a8ed120..c574e1e787f 100644 --- a/packages/desktop-client/src/components/budget/SidebarGroup.tsx +++ b/packages/desktop-client/src/components/budget/SidebarGroup.tsx @@ -1,14 +1,14 @@ import React, { type CSSProperties, useState } from 'react'; import { type ConnectDragSource } from 'react-dnd'; -import ExpandArrow from '../../icons/v0/ExpandArrow'; -import CheveronDown from '../../icons/v1/CheveronDown'; +import { SvgExpandArrow } from '../../icons/v0'; +import { SvgCheveronDown } from '../../icons/v1'; import { theme } from '../../style'; -import Button from '../common/Button'; -import Menu from '../common/Menu'; -import Text from '../common/Text'; -import View from '../common/View'; -import NotesButton from '../NotesButton'; +import { Button } from '../common/Button'; +import { Menu } from '../common/Menu'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; +import { NotesButton } from '../NotesButton'; import { InputCell } from '../table'; import { Tooltip } from '../tooltips'; @@ -36,7 +36,7 @@ type SidebarGroupProps = { onToggleCollapse?: (id: string) => void; }; -function SidebarGroup({ +export function SidebarGroup({ group, editing, collapsed, @@ -67,7 +67,7 @@ function SidebarGroup({ }} > {!dragPreview && ( - - + {menuOpen && ( ); } - -export default SidebarGroup; diff --git a/packages/desktop-client/src/components/budget/index.tsx b/packages/desktop-client/src/components/budget/index.tsx index f32d592150c..959f63bc3c7 100644 --- a/packages/desktop-client/src/components/budget/index.tsx +++ b/packages/desktop-client/src/components/budget/index.tsx @@ -31,11 +31,11 @@ import * as monthUtils from 'loot-core/src/shared/months'; import { type GlobalPrefs, type LocalPrefs } from 'loot-core/src/types/prefs'; import { type BoundActions, useActions } from '../../hooks/useActions'; -import useCategories from '../../hooks/useCategories'; -import useFeatureFlag from '../../hooks/useFeatureFlag'; -import useNavigate from '../../hooks/useNavigate'; +import { useCategories } from '../../hooks/useCategories'; +import { useFeatureFlag } from '../../hooks/useFeatureFlag'; +import { useNavigate } from '../../hooks/useNavigate'; import { styles } from '../../style'; -import View from '../common/View'; +import { View } from '../common/View'; import { SWITCH_BUDGET_MESSAGE_TYPE, TitlebarContext, @@ -43,7 +43,7 @@ import { type TitlebarMessage, } from '../Titlebar'; -import DynamicBudgetTable from './DynamicBudgetTable'; +import { DynamicBudgetTable } from './DynamicBudgetTable'; import * as report from './report/ReportComponents'; import { ReportProvider } from './report/ReportContext'; import * as rollover from './rollover/RolloverComponents'; @@ -100,7 +100,7 @@ type BudgetProps = { addNotification: BoundActions['addNotification']; }; -function Budget(props: BudgetProps) { +function BudgetInner(props: BudgetProps) { const currentMonth = monthUtils.currentMonth(); const tableRef = useRef(null); @@ -532,7 +532,7 @@ const RolloverBudgetSummary = memo<{ month: string }>(props => { ); }); -export default function BudgetWrapper(props) { +export function Budget(props) { const startMonth = useSelector( state => state.prefs.local['budget.startMonth'], ); @@ -594,7 +594,7 @@ export default function BudgetWrapper(props) { overflow: 'hidden', }} > - void; }; -export default function BalanceTooltip({ +export function BalanceTooltip({ categoryId, tooltip, monthIndex, diff --git a/packages/desktop-client/src/components/budget/report/ReportComponents.tsx b/packages/desktop-client/src/components/budget/report/ReportComponents.tsx index ed38d3bab9d..b50cb9171a0 100644 --- a/packages/desktop-client/src/components/budget/report/ReportComponents.tsx +++ b/packages/desktop-client/src/components/budget/report/ReportComponents.tsx @@ -1,24 +1,24 @@ import React, { memo, useState } from 'react'; import { reportBudget } from 'loot-core/src/client/queries'; -import evalArithmetic from 'loot-core/src/shared/arithmetic'; +import { evalArithmetic } from 'loot-core/src/shared/arithmetic'; import { integerToCurrency, amountToInteger } from 'loot-core/src/shared/util'; -import useFeatureFlag from '../../../hooks/useFeatureFlag'; -import CheveronDown from '../../../icons/v1/CheveronDown'; +import { useFeatureFlag } from '../../../hooks/useFeatureFlag'; +import { SvgCheveronDown } from '../../../icons/v1'; import { styles, theme, type CSSProperties } from '../../../style'; -import Button from '../../common/Button'; -import Menu from '../../common/Menu'; -import Text from '../../common/Text'; -import View from '../../common/View'; -import CellValue from '../../spreadsheet/CellValue'; -import useFormat from '../../spreadsheet/useFormat'; +import { Button } from '../../common/Button'; +import { Menu } from '../../common/Menu'; +import { Text } from '../../common/Text'; +import { View } from '../../common/View'; +import { CellValue } from '../../spreadsheet/CellValue'; +import { useFormat } from '../../spreadsheet/useFormat'; import { Field, SheetCell } from '../../table'; import { Tooltip, useTooltip } from '../../tooltips'; -import BalanceWithCarryover from '../BalanceWithCarryover'; +import { BalanceWithCarryover } from '../BalanceWithCarryover'; import { makeAmountGrey } from '../util'; -import BalanceTooltip from './BalanceTooltip'; +import { BalanceTooltip } from './BalanceTooltip'; const headerLabelStyle: CSSProperties = { flex: 1, @@ -204,7 +204,7 @@ export const CategoryMonth = memo(function CategoryMonth({ padding: 3, }} > - ); }); - -export default Button; diff --git a/packages/desktop-client/src/components/common/ButtonLink.tsx b/packages/desktop-client/src/components/common/ButtonLink.tsx index 1ab6215b61d..fde95935d1e 100644 --- a/packages/desktop-client/src/components/common/ButtonLink.tsx +++ b/packages/desktop-client/src/components/common/ButtonLink.tsx @@ -1,16 +1,16 @@ import React, { type ComponentProps } from 'react'; import { useMatch } from 'react-router-dom'; -import useNavigate from '../../hooks/useNavigate'; +import { useNavigate } from '../../hooks/useNavigate'; import { type CSSProperties } from '../../style'; -import Button from './Button'; +import { Button } from './Button'; type ButtonLinkProps = ComponentProps & { to: string; activeStyle?: CSSProperties; }; -export default function ButtonLink({ +export function ButtonLink({ to, style, activeStyle, diff --git a/packages/desktop-client/src/components/common/Card.tsx b/packages/desktop-client/src/components/common/Card.tsx index 5f143cd3553..49b6a400cd4 100644 --- a/packages/desktop-client/src/components/common/Card.tsx +++ b/packages/desktop-client/src/components/common/Card.tsx @@ -2,11 +2,11 @@ import { type ComponentProps, forwardRef } from 'react'; import { theme } from '../../style'; -import View from './View'; +import { View } from './View'; type CardProps = ComponentProps; -const Card = forwardRef( +export const Card = forwardRef( ({ children, ...props }, ref) => { return ( ( ); }, ); - -export default Card; diff --git a/packages/desktop-client/src/components/common/ExternalLink.tsx b/packages/desktop-client/src/components/common/ExternalLink.tsx index f31d240c9b5..979a62a9021 100644 --- a/packages/desktop-client/src/components/common/ExternalLink.tsx +++ b/packages/desktop-client/src/components/common/ExternalLink.tsx @@ -13,7 +13,7 @@ type ExternalLinkProps = { linkColor?: keyof typeof externalLinkColors; }; -const ExternalLink = forwardRef( +export const ExternalLink = forwardRef( ({ children, to, linkColor = 'blue' }, ref) => ( // we can’t use here for obvious reasons // eslint-disable-next-line no-restricted-syntax @@ -28,5 +28,3 @@ const ExternalLink = forwardRef( ), ); - -export default ExternalLink; diff --git a/packages/desktop-client/src/components/common/FormError.tsx b/packages/desktop-client/src/components/common/FormError.tsx index 505388caf4a..5828b503959 100644 --- a/packages/desktop-client/src/components/common/FormError.tsx +++ b/packages/desktop-client/src/components/common/FormError.tsx @@ -2,14 +2,14 @@ import { type ReactNode } from 'react'; import { type CSSProperties } from '../../style'; -import View from './View'; +import { View } from './View'; type FormErrorProps = { style?: CSSProperties; children?: ReactNode; }; -export default function FormError({ style, children }: FormErrorProps) { +export function FormError({ style, children }: FormErrorProps) { return ( {children} ); diff --git a/packages/desktop-client/src/components/common/HoverTarget.tsx b/packages/desktop-client/src/components/common/HoverTarget.tsx index 097ad9c013d..ec3d4e015be 100644 --- a/packages/desktop-client/src/components/common/HoverTarget.tsx +++ b/packages/desktop-client/src/components/common/HoverTarget.tsx @@ -2,7 +2,7 @@ import { useCallback, useEffect, useState, type ReactNode } from 'react'; import { type CSSProperties } from '../../style'; -import View from './View'; +import { View } from './View'; type HoverTargetProps = { style?: CSSProperties; @@ -12,7 +12,7 @@ type HoverTargetProps = { disabled?: boolean; }; -export default function HoverTarget({ +export function HoverTarget({ style, contentStyle, children, diff --git a/packages/desktop-client/src/components/common/InitialFocus.ts b/packages/desktop-client/src/components/common/InitialFocus.ts index 6f88cbb60f0..1e8a0cb7062 100644 --- a/packages/desktop-client/src/components/common/InitialFocus.ts +++ b/packages/desktop-client/src/components/common/InitialFocus.ts @@ -10,7 +10,7 @@ type InitialFocusProps = { children?: ReactElement | ((node: Ref) => ReactElement); }; -export default function InitialFocus({ children }: InitialFocusProps) { +export function InitialFocus({ children }: InitialFocusProps) { const node = useRef(null); useEffect(() => { diff --git a/packages/desktop-client/src/components/common/InlineField.tsx b/packages/desktop-client/src/components/common/InlineField.tsx index 0a31f198651..9328f674fdf 100644 --- a/packages/desktop-client/src/components/common/InlineField.tsx +++ b/packages/desktop-client/src/components/common/InlineField.tsx @@ -12,7 +12,7 @@ type InlineFieldProps = { style?: CSSProperties; }; -export default function InlineField({ +export function InlineField({ label, labelWidth, children, diff --git a/packages/desktop-client/src/components/common/Input.tsx b/packages/desktop-client/src/components/common/Input.tsx index 6a4e6eaf965..aab2993a3d2 100644 --- a/packages/desktop-client/src/components/common/Input.tsx +++ b/packages/desktop-client/src/components/common/Input.tsx @@ -29,7 +29,7 @@ export type InputProps = InputHTMLAttributes & { focused?: boolean; }; -export default function Input({ +export function Input({ style, inputRef, onEnter, diff --git a/packages/desktop-client/src/components/common/InputWithContent.tsx b/packages/desktop-client/src/components/common/InputWithContent.tsx index 24b357342a8..0853c290a64 100644 --- a/packages/desktop-client/src/components/common/InputWithContent.tsx +++ b/packages/desktop-client/src/components/common/InputWithContent.tsx @@ -2,8 +2,8 @@ import { useState, type ComponentProps, type ReactNode } from 'react'; import { type CSSProperties, theme } from '../../style'; -import Input, { defaultInputStyle } from './Input'; -import View from './View'; +import { Input, defaultInputStyle } from './Input'; +import { View } from './View'; type InputWithContentProps = ComponentProps & { leftContent?: ReactNode; @@ -13,7 +13,7 @@ type InputWithContentProps = ComponentProps & { style?: CSSProperties; getStyle?: (focused: boolean) => CSSProperties; }; -export default function InputWithContent({ +export function InputWithContent({ leftContent, rightContent, inputStyle, diff --git a/packages/desktop-client/src/components/common/Label.tsx b/packages/desktop-client/src/components/common/Label.tsx index a540214a53e..393461cdff7 100644 --- a/packages/desktop-client/src/components/common/Label.tsx +++ b/packages/desktop-client/src/components/common/Label.tsx @@ -2,14 +2,14 @@ import { type ReactNode } from 'react'; import { type CSSProperties, theme, styles } from '../../style'; -import Text from './Text'; +import { Text } from './Text'; type LabelProps = { title: ReactNode; style?: CSSProperties; }; -export default function Label({ title, style }: LabelProps) { +export function Label({ title, style }: LabelProps) { return ( & { to: string; @@ -71,7 +71,7 @@ type LinkProps = } & ButtonLinkProps) | ({ variant?: 'anchor' } & AnchorLinkProps); -export default function Link({ variant = 'anchor', ...props }: LinkProps) { +export function Link({ variant = 'anchor', ...props }: LinkProps) { switch (variant) { case 'anchor': return ; diff --git a/packages/desktop-client/src/components/common/LinkButton.tsx b/packages/desktop-client/src/components/common/LinkButton.tsx index e5f1ba8a1aa..daec85d6843 100644 --- a/packages/desktop-client/src/components/common/LinkButton.tsx +++ b/packages/desktop-client/src/components/common/LinkButton.tsx @@ -6,11 +6,7 @@ import { styles, theme } from '../../style'; type LinkProps = HTMLAttributes; -export default function LinkButton({ - style, - children, - ...nativeProps -}: LinkProps) { +export function LinkButton({ style, children, ...nativeProps }: LinkProps) { return ( )} @@ -427,5 +427,3 @@ export const ModalButtons = ({ ); }; - -export default Modal; diff --git a/packages/desktop-client/src/components/common/Paragraph.tsx b/packages/desktop-client/src/components/common/Paragraph.tsx index ebbe8b37a75..256982e8041 100644 --- a/packages/desktop-client/src/components/common/Paragraph.tsx +++ b/packages/desktop-client/src/components/common/Paragraph.tsx @@ -9,7 +9,7 @@ type ParagraphProps = HTMLProps & { isLast?: boolean; }; -export default function Paragraph({ +export function Paragraph({ style, isLast, children, diff --git a/packages/desktop-client/src/components/common/Search.tsx b/packages/desktop-client/src/components/common/Search.tsx index 9281d75d57d..f0a9667d5a1 100644 --- a/packages/desktop-client/src/components/common/Search.tsx +++ b/packages/desktop-client/src/components/common/Search.tsx @@ -1,11 +1,10 @@ import { type ChangeEvent, type Ref } from 'react'; -import SvgRemove from '../../icons/v2/Remove'; -import SearchAlternate from '../../icons/v2/SearchAlternate'; +import { SvgRemove, SvgSearchAlternate } from '../../icons/v2'; import { theme } from '../../style'; -import Button from './Button'; -import InputWithContent from './InputWithContent'; +import { Button } from './Button'; +import { InputWithContent } from './InputWithContent'; type SearchProps = { inputRef?: Ref; @@ -16,7 +15,7 @@ type SearchProps = { width?: number; }; -export default function Search({ +export function Search({ inputRef, value, onChange, @@ -42,7 +41,7 @@ export default function Search({ } } leftContent={ - = { @@ -38,7 +38,7 @@ type SelectProps = { * // onChangeText(e.target.value)} + onFocus={onFocus} onBlur={onBlur} onKeyUp={onKeyPress} data-testid="amount-input" @@ -131,6 +136,7 @@ export const FocusableAmountInput = memo(function FocusableAmountInput({ focusedStyle, buttonProps, onFocus, + onBlur, ...props }) { const [isNegative, setIsNegative] = useState(true); @@ -166,6 +172,8 @@ export const FocusableAmountInput = memo(function FocusableAmountInput({ ); diff --git a/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx b/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx index 55eb435c1d3..21f91d18ecb 100644 --- a/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx +++ b/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx @@ -1,23 +1,19 @@ import React, { type ComponentProps, useState } from 'react'; import { useLiveQuery } from 'loot-core/src/client/query-hooks'; -import q from 'loot-core/src/shared/query'; +import { q } from 'loot-core/src/shared/query'; import { type CategoryGroupEntity } from 'loot-core/src/types/models'; -import useCategories from '../../hooks/useCategories'; -import { DotsHorizontalTriple } from '../../icons/v1'; -import Add from '../../icons/v1/Add'; -import Trash from '../../icons/v1/Trash'; -import NotesPaper from '../../icons/v2/NotesPaper'; -import ViewHide from '../../icons/v2/ViewHide'; -import ViewShow from '../../icons/v2/ViewShow'; +import { useCategories } from '../../hooks/useCategories'; +import { SvgDotsHorizontalTriple, SvgAdd, SvgTrash } from '../../icons/v1'; +import { SvgNotesPaper, SvgViewHide, SvgViewShow } from '../../icons/v2'; import { type CSSProperties, styles, theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import Button from '../common/Button'; -import Menu from '../common/Menu'; -import Modal from '../common/Modal'; -import View from '../common/View'; -import Notes from '../Notes'; +import { Button } from '../common/Button'; +import { Menu } from '../common/Menu'; +import { Modal } from '../common/Modal'; +import { View } from '../common/View'; +import { Notes } from '../Notes'; import { Tooltip } from '../tooltips'; const BUTTON_HEIGHT = 40; @@ -33,7 +29,7 @@ type CategoryGroupMenuProps = { onClose?: () => void; }; -export default function CategoryGroupMenu({ +export function CategoryGroupMenu({ modalProps, groupId, onSave, @@ -169,7 +165,7 @@ export default function CategoryGroupMenu({ }} onClick={_onAddCategory} > - + Add category @@ -205,7 +205,7 @@ function AdditionalCategoryGroupMenu({ group, onDelete, onToggleVisibility }) { setMenuOpen(true); }} > - void; }; -export default function CategoryMenu({ +export function CategoryMenu({ modalProps, categoryId, onSave, @@ -156,7 +153,11 @@ export default function CategoryMenu({ }} onClick={_onEditNotes} > - + Edit notes @@ -182,7 +183,7 @@ function AdditionalCategoryMenu({ category, onDelete, onToggleVisibility }) { setMenuOpen(true); }} > - ); } - -export default CloseAccount; diff --git a/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.tsx b/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.tsx index 6b8c9bde2c5..cf758fa251d 100644 --- a/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.tsx +++ b/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.tsx @@ -4,12 +4,12 @@ import { type CategoryGroupEntity } from 'loot-core/src/types/models'; import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import CategoryAutocomplete from '../autocomplete/CategoryAutocomplete'; -import Block from '../common/Block'; -import Button from '../common/Button'; -import Modal from '../common/Modal'; -import Text from '../common/Text'; -import View from '../common/View'; +import { CategoryAutocomplete } from '../autocomplete/CategoryAutocomplete'; +import { Block } from '../common/Block'; +import { Button } from '../common/Button'; +import { Modal } from '../common/Modal'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; type ConfirmCategoryDeleteProps = { modalProps: CommonModalProps; @@ -19,7 +19,7 @@ type ConfirmCategoryDeleteProps = { onDelete: (categoryId: string) => void; }; -export default function ConfirmCategoryDelete({ +export function ConfirmCategoryDelete({ modalProps, category, group, diff --git a/packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx b/packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx index a15de63e2ad..d28cf895db3 100644 --- a/packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx +++ b/packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { type CommonModalProps } from '../../types/modals'; -import Block from '../common/Block'; -import Button from '../common/Button'; -import Modal from '../common/Modal'; -import View from '../common/View'; +import { Block } from '../common/Block'; +import { Button } from '../common/Button'; +import { Modal } from '../common/Modal'; +import { View } from '../common/View'; type ConfirmTransactionEditProps = { modalProps: Partial; @@ -12,7 +12,7 @@ type ConfirmTransactionEditProps = { confirmReason: string; }; -function ConfirmTransactionEdit({ +export function ConfirmTransactionEdit({ modalProps, onConfirm, confirmReason, @@ -83,5 +83,3 @@ function ConfirmTransactionEdit({ ); } - -export default ConfirmTransactionEdit; diff --git a/packages/desktop-client/src/components/modals/CreateAccount.tsx b/packages/desktop-client/src/components/modals/CreateAccount.tsx index dde2f32c854..167c2bce9ba 100644 --- a/packages/desktop-client/src/components/modals/CreateAccount.tsx +++ b/packages/desktop-client/src/components/modals/CreateAccount.tsx @@ -2,23 +2,23 @@ import React, { useEffect, useState } from 'react'; import { authorizeBank } from '../../gocardless'; import { useActions } from '../../hooks/useActions'; -import useGoCardlessStatus from '../../hooks/useGoCardlessStatus'; +import { useGoCardlessStatus } from '../../hooks/useGoCardlessStatus'; import { type SyncServerStatus } from '../../hooks/useSyncServerStatus'; import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import Button, { ButtonWithLoading } from '../common/Button'; -import ExternalLink from '../common/ExternalLink'; -import Modal from '../common/Modal'; -import Paragraph from '../common/Paragraph'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Button, ButtonWithLoading } from '../common/Button'; +import { ExternalLink } from '../common/ExternalLink'; +import { Modal } from '../common/Modal'; +import { Paragraph } from '../common/Paragraph'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; type CreateAccountProps = { modalProps: CommonModalProps; syncServerStatus: SyncServerStatus; }; -export default function CreateAccount({ +export function CreateAccount({ modalProps, syncServerStatus, }: CreateAccountProps) { diff --git a/packages/desktop-client/src/components/modals/CreateEncryptionKey.tsx b/packages/desktop-client/src/components/modals/CreateEncryptionKey.tsx index 8a18eff5f7a..76672c99532 100644 --- a/packages/desktop-client/src/components/modals/CreateEncryptionKey.tsx +++ b/packages/desktop-client/src/components/modals/CreateEncryptionKey.tsx @@ -9,13 +9,13 @@ import { type BoundActions } from '../../hooks/useActions'; import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; import { ButtonWithLoading } from '../common/Button'; -import ExternalLink from '../common/ExternalLink'; -import InitialFocus from '../common/InitialFocus'; -import Input from '../common/Input'; -import Modal, { ModalButtons } from '../common/Modal'; -import Paragraph from '../common/Paragraph'; -import Text from '../common/Text'; -import View from '../common/View'; +import { ExternalLink } from '../common/ExternalLink'; +import { InitialFocus } from '../common/InitialFocus'; +import { Input } from '../common/Input'; +import { Modal, ModalButtons } from '../common/Modal'; +import { Paragraph } from '../common/Paragraph'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; type CreateEncryptionKeyProps = { modalProps: CommonModalProps; @@ -25,7 +25,7 @@ type CreateEncryptionKeyProps = { }; }; -export default function CreateEncryptionKey({ +export function CreateEncryptionKey({ modalProps, actions, options = {}, diff --git a/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx b/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx index 5f5cc59e6ff..837a77b8956 100644 --- a/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx +++ b/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx @@ -3,18 +3,18 @@ import React, { useState } from 'react'; import { toRelaxedNumber } from 'loot-core/src/shared/util'; import { type BoundActions } from '../../hooks/useActions'; -import useNavigate from '../../hooks/useNavigate'; +import { useNavigate } from '../../hooks/useNavigate'; import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import Button from '../common/Button'; -import ExternalLink from '../common/ExternalLink'; -import FormError from '../common/FormError'; -import InitialFocus from '../common/InitialFocus'; -import InlineField from '../common/InlineField'; -import Input from '../common/Input'; -import Modal, { ModalButtons } from '../common/Modal'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { ExternalLink } from '../common/ExternalLink'; +import { FormError } from '../common/FormError'; +import { InitialFocus } from '../common/InitialFocus'; +import { InlineField } from '../common/InlineField'; +import { Input } from '../common/Input'; +import { Modal, ModalButtons } from '../common/Modal'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { Checkbox } from '../forms'; type CreateLocalAccountProps = { @@ -22,7 +22,10 @@ type CreateLocalAccountProps = { actions: BoundActions; }; -function CreateLocalAccount({ modalProps, actions }: CreateLocalAccountProps) { +export function CreateLocalAccount({ + modalProps, + actions, +}: CreateLocalAccountProps) { const navigate = useNavigate(); const [name, setName] = useState(''); const [offbudget, setOffbudget] = useState(false); @@ -166,5 +169,3 @@ function CreateLocalAccount({ modalProps, actions }: CreateLocalAccountProps) { ); } - -export default CreateLocalAccount; diff --git a/packages/desktop-client/src/components/modals/EditField.jsx b/packages/desktop-client/src/components/modals/EditField.jsx index abd07d79fea..fa2b492c4c8 100644 --- a/packages/desktop-client/src/components/modals/EditField.jsx +++ b/packages/desktop-client/src/components/modals/EditField.jsx @@ -7,34 +7,37 @@ import { currentDay, dayFromDate } from 'loot-core/src/shared/months'; import { amountToInteger } from 'loot-core/src/shared/util'; import { useActions } from '../../hooks/useActions'; -import useCategories from '../../hooks/useCategories'; -import { Add } from '../../icons/v1'; +import { useCategories } from '../../hooks/useCategories'; +import { SvgAdd } from '../../icons/v1'; import { useResponsive } from '../../ResponsiveProvider'; import { styles, theme } from '../../style'; -import AccountAutocomplete, { +import { + AccountAutocomplete, AccountItemGroupHeader, AccountItem, } from '../autocomplete/AccountAutocomplete'; -import CategoryAutocomplete, { +import { + CategoryAutocomplete, CategoryItemGroupHeader, CategoryItem, } from '../autocomplete/CategoryAutocomplete'; -import PayeeAutocomplete, { +import { + PayeeAutocomplete, CreatePayeeButton, PayeeItemGroupHeader, PayeeItem, } from '../autocomplete/PayeeAutocomplete'; -import Input from '../common/Input'; -import Modal from '../common/Modal'; -import View from '../common/View'; +import { Input } from '../common/Input'; +import { Modal } from '../common/Modal'; +import { View } from '../common/View'; import { SectionLabel } from '../forms'; -import DateSelect from '../select/DateSelect'; +import { DateSelect } from '../select/DateSelect'; function CreatePayeeIcon(props) { - return ; + return ; } -export default function EditField({ modalProps, name, onSubmit, onClose }) { +export function EditField({ modalProps, name, onSubmit, onClose }) { const dateFormat = useSelector( state => state.prefs.local.dateFormat || 'MM/dd/yyyy', ); diff --git a/packages/desktop-client/src/components/modals/EditRule.jsx b/packages/desktop-client/src/components/modals/EditRule.jsx index ee0707bad80..661cc799e8c 100644 --- a/packages/desktop-client/src/components/modals/EditRule.jsx +++ b/packages/desktop-client/src/components/modals/EditRule.jsx @@ -6,9 +6,10 @@ import { setUndoEnabled, } from 'loot-core/src/client/actions/queries'; import { useSchedules } from 'loot-core/src/client/data-hooks/schedules'; -import q, { runQuery } from 'loot-core/src/client/query-helpers'; +import { runQuery } from 'loot-core/src/client/query-helpers'; import { send } from 'loot-core/src/platform/client/fetch'; import * as monthUtils from 'loot-core/src/shared/months'; +import { q } from 'loot-core/src/shared/query'; import { mapField, friendlyOp, @@ -25,23 +26,22 @@ import { amountToInteger, } from 'loot-core/src/shared/util'; -import useSelected, { SelectedProvider } from '../../hooks/useSelected'; -import AddIcon from '../../icons/v0/Add'; -import SubtractIcon from '../../icons/v0/Subtract'; -import InformationOutline from '../../icons/v1/InformationOutline'; +import { useSelected, SelectedProvider } from '../../hooks/useSelected'; +import { SvgAdd, SvgSubtract } from '../../icons/v0'; +import { SvgInformationOutline } from '../../icons/v1'; import { theme } from '../../style'; -import Button from '../common/Button'; -import Modal from '../common/Modal'; -import Select from '../common/Select'; -import Stack from '../common/Stack'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Modal } from '../common/Modal'; +import { Select } from '../common/Select'; +import { Stack } from '../common/Stack'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { StatusBadge } from '../schedules/StatusBadge'; import { Tooltip } from '../tooltips'; -import SimpleTransactionsTable from '../transactions/SimpleTransactionsTable'; +import { SimpleTransactionsTable } from '../transactions/SimpleTransactionsTable'; import { BetweenAmountInput } from '../util/AmountInput'; -import DisplayId from '../util/DisplayId'; -import GenericInput from '../util/GenericInput'; +import { DisplayId } from '../util/DisplayId'; +import { GenericInput } from '../util/GenericInput'; function updateValue(array, value, update) { return array.map(v => (v === value ? update() : v)); @@ -132,7 +132,7 @@ function EditorButtons({ onAdd, onDelete, style }) { style={{ padding: 7 }} aria-label="Delete entry" > - + )} {onAdd && ( @@ -142,7 +142,7 @@ function EditorButtons({ onAdd, onDelete, style }) { style={{ padding: 7 }} aria-label="Add entry" > - + )} @@ -373,7 +373,7 @@ function StageInfo() { onMouseEnter={() => setOpen(true)} onMouseLeave={() => setOpen(false)} > - @@ -605,11 +605,7 @@ const conditionFields = [ ['amount-outflow', mapField('amount', { outflow: true })], ]); -export default function EditRule({ - modalProps, - defaultRule, - onSave: originalOnSave, -}) { +export function EditRule({ modalProps, defaultRule, onSave: originalOnSave }) { const [conditions, setConditions] = useState( defaultRule.conditions.map(parse), ); diff --git a/packages/desktop-client/src/components/modals/FixEncryptionKey.tsx b/packages/desktop-client/src/components/modals/FixEncryptionKey.tsx index c7e0d96365a..b006ca1561a 100644 --- a/packages/desktop-client/src/components/modals/FixEncryptionKey.tsx +++ b/packages/desktop-client/src/components/modals/FixEncryptionKey.tsx @@ -7,14 +7,14 @@ import { getTestKeyError } from 'loot-core/src/shared/errors'; import { type BoundActions } from '../../hooks/useActions'; import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import Button, { ButtonWithLoading } from '../common/Button'; -import ExternalLink from '../common/ExternalLink'; -import InitialFocus from '../common/InitialFocus'; -import Input from '../common/Input'; -import Modal, { ModalButtons } from '../common/Modal'; -import Paragraph from '../common/Paragraph'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Button, ButtonWithLoading } from '../common/Button'; +import { ExternalLink } from '../common/ExternalLink'; +import { InitialFocus } from '../common/InitialFocus'; +import { Input } from '../common/Input'; +import { Modal, ModalButtons } from '../common/Modal'; +import { Paragraph } from '../common/Paragraph'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; type FixEncryptionKeyProps = { modalProps: CommonModalProps; @@ -22,7 +22,7 @@ type FixEncryptionKeyProps = { options: FinanceModals['fix-encryption-key']; }; -export default function FixEncryptionKey({ +export function FixEncryptionKey({ modalProps, actions, options = {}, diff --git a/packages/desktop-client/src/components/modals/GoCardlessExternalMsg.tsx b/packages/desktop-client/src/components/modals/GoCardlessExternalMsg.tsx index ccdcad5a0a5..f42877a04a8 100644 --- a/packages/desktop-client/src/components/modals/GoCardlessExternalMsg.tsx +++ b/packages/desktop-client/src/components/modals/GoCardlessExternalMsg.tsx @@ -8,20 +8,20 @@ import { type GoCardlessToken, } from 'loot-core/src/types/models'; -import useGoCardlessStatus from '../../hooks/useGoCardlessStatus'; -import AnimatedLoading from '../../icons/AnimatedLoading'; -import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple'; +import { useGoCardlessStatus } from '../../hooks/useGoCardlessStatus'; +import { AnimatedLoading } from '../../icons/AnimatedLoading'; +import { SvgDotsHorizontalTriple } from '../../icons/v1'; import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; import { Error, Warning } from '../alerts'; -import Autocomplete from '../autocomplete/Autocomplete'; -import Button from '../common/Button'; -import ExternalLink from '../common/ExternalLink'; -import LinkButton from '../common/LinkButton'; -import Menu from '../common/Menu'; -import Modal from '../common/Modal'; -import Paragraph from '../common/Paragraph'; -import View from '../common/View'; +import { Autocomplete } from '../autocomplete/Autocomplete'; +import { Button } from '../common/Button'; +import { ExternalLink } from '../common/ExternalLink'; +import { LinkButton } from '../common/LinkButton'; +import { Menu } from '../common/Menu'; +import { Modal } from '../common/Modal'; +import { Paragraph } from '../common/Paragraph'; +import { View } from '../common/View'; import { FormField, FormLabel } from '../forms'; import { Tooltip } from '../tooltips'; @@ -85,7 +85,7 @@ type GoCardlessExternalMsgProps = { onClose: () => void; }; -export default function GoCardlessExternalMsg({ +export function GoCardlessExternalMsg({ modalProps, onMoveExternal, onSuccess, @@ -227,7 +227,7 @@ export default function GoCardlessExternalMsg({ onClick={() => setMenuOpen(true)} aria-label="Menu" > - void; }; -const GoCardlessInitialise = ({ +export const GoCardlessInitialise = ({ modalProps, onSuccess, }: GoCardlessInitialiseProps) => { @@ -104,5 +104,3 @@ const GoCardlessInitialise = ({ ); }; - -export default GoCardlessInitialise; diff --git a/packages/desktop-client/src/components/modals/ImportTransactions.jsx b/packages/desktop-client/src/components/modals/ImportTransactions.jsx index b66597e1125..8c55e3b322e 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactions.jsx +++ b/packages/desktop-client/src/components/modals/ImportTransactions.jsx @@ -11,15 +11,15 @@ import { } from 'loot-core/src/shared/util'; import { useActions } from '../../hooks/useActions'; -import useFeatureFlag from '../../hooks/useFeatureFlag'; +import { useFeatureFlag } from '../../hooks/useFeatureFlag'; import { theme, styles } from '../../style'; -import Button, { ButtonWithLoading } from '../common/Button'; -import Input from '../common/Input'; -import Modal from '../common/Modal'; -import Select from '../common/Select'; -import Stack from '../common/Stack'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Button, ButtonWithLoading } from '../common/Button'; +import { Input } from '../common/Input'; +import { Modal } from '../common/Modal'; +import { Select } from '../common/Select'; +import { Stack } from '../common/Stack'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { Checkbox, SectionLabel } from '../forms'; import { TableHeader, TableWithNavigator, Row, Field } from '../table'; @@ -656,7 +656,7 @@ function FieldMappings({ ); } -export default function ImportTransactions({ modalProps, options }) { +export function ImportTransactions({ modalProps, options }) { const dateFormat = useSelector( state => state.prefs.local.dateFormat || 'MM/dd/yyyy', ); diff --git a/packages/desktop-client/src/components/modals/LoadBackup.jsx b/packages/desktop-client/src/components/modals/LoadBackup.jsx index 64786e72407..d430346b223 100644 --- a/packages/desktop-client/src/components/modals/LoadBackup.jsx +++ b/packages/desktop-client/src/components/modals/LoadBackup.jsx @@ -3,11 +3,11 @@ import React, { Component, useState, useEffect } from 'react'; import { send, listen, unlisten } from 'loot-core/src/platform/client/fetch'; import { theme } from '../../style'; -import Block from '../common/Block'; -import Button from '../common/Button'; -import Modal from '../common/Modal'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Block } from '../common/Block'; +import { Button } from '../common/Button'; +import { Modal } from '../common/Modal'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { Row, Cell } from '../table'; class BackupTable extends Component { @@ -47,7 +47,7 @@ class BackupTable extends Component { } } -function LoadBackup({ +export function LoadBackup({ budgetId, watchUpdates, backupDisabled, @@ -133,5 +133,3 @@ function LoadBackup({ ); } - -export default LoadBackup; diff --git a/packages/desktop-client/src/components/modals/ManageRulesModal.tsx b/packages/desktop-client/src/components/modals/ManageRulesModal.tsx index cea802135cb..0242122d87d 100644 --- a/packages/desktop-client/src/components/modals/ManageRulesModal.tsx +++ b/packages/desktop-client/src/components/modals/ManageRulesModal.tsx @@ -4,15 +4,15 @@ import { useLocation } from 'react-router-dom'; import { isNonProductionEnvironment } from 'loot-core/src/shared/environment'; import { type CommonModalProps } from '../../types/modals'; -import Modal from '../common/Modal'; -import ManageRules from '../ManageRules'; +import { Modal } from '../common/Modal'; +import { ManageRules } from '../ManageRules'; type ManageRulesModalProps = { modalProps: CommonModalProps; payeeId?: string; }; -export default function ManageRulesModal({ +export function ManageRulesModal({ modalProps, payeeId, }: ManageRulesModalProps) { diff --git a/packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx b/packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx index d857cdd6a90..1fde89e701b 100644 --- a/packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx +++ b/packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx @@ -6,15 +6,15 @@ import { send } from 'loot-core/src/platform/client/fetch'; import { theme } from '../../style'; import { Information } from '../alerts'; -import Button from '../common/Button'; -import Modal, { ModalButtons } from '../common/Modal'; -import Paragraph from '../common/Paragraph'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Modal, ModalButtons } from '../common/Modal'; +import { Paragraph } from '../common/Paragraph'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; const highlightStyle = { color: theme.pageTextPositive }; -export default function MergeUnusedPayees({ +export function MergeUnusedPayees({ modalProps, payeeIds, targetPayeeId, diff --git a/packages/desktop-client/src/components/modals/Notes.tsx b/packages/desktop-client/src/components/modals/Notes.tsx index 3ae4cd95cd4..a2d128a52de 100644 --- a/packages/desktop-client/src/components/modals/Notes.tsx +++ b/packages/desktop-client/src/components/modals/Notes.tsx @@ -1,14 +1,14 @@ import React, { useEffect, useState } from 'react'; import { useLiveQuery } from 'loot-core/src/client/query-hooks'; -import q from 'loot-core/src/shared/query'; +import { q } from 'loot-core/src/shared/query'; -import Check from '../../icons/v2/Check'; +import { SvgCheck } from '../../icons/v2'; import { type CommonModalProps } from '../../types/modals'; -import Button from '../common/Button'; -import Modal from '../common/Modal'; -import View from '../common/View'; -import NotesComponent from '../Notes'; +import { Button } from '../common/Button'; +import { Modal } from '../common/Modal'; +import { View } from '../common/View'; +import { Notes as NotesComponent } from '../Notes'; type NotesProps = { modalProps: CommonModalProps; @@ -17,7 +17,7 @@ type NotesProps = { onSave: (id: string, notes: string) => void; }; -export default function Notes({ modalProps, id, name, onSave }: NotesProps) { +export function Notes({ modalProps, id, name, onSave }: NotesProps) { const data = useLiveQuery(() => q('notes').filter({ id }).select('*'), [id]); const originalNotes = data && data.length > 0 ? data[0].note : null; @@ -88,7 +88,7 @@ export default function Notes({ modalProps, id, name, onSave }: NotesProps) { }} onClick={_onSave} > - + Save notes diff --git a/packages/desktop-client/src/components/modals/PlaidExternalMsg.tsx b/packages/desktop-client/src/components/modals/PlaidExternalMsg.tsx index e9146a7e039..bc1dd416eed 100644 --- a/packages/desktop-client/src/components/modals/PlaidExternalMsg.tsx +++ b/packages/desktop-client/src/components/modals/PlaidExternalMsg.tsx @@ -1,14 +1,14 @@ import React, { useState, useRef } from 'react'; -import AnimatedLoading from '../../icons/AnimatedLoading'; +import { AnimatedLoading } from '../../icons/AnimatedLoading'; import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; import { Error } from '../alerts'; -import Button from '../common/Button'; -import Modal, { ModalButtons } from '../common/Modal'; -import Paragraph from '../common/Paragraph'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Modal, ModalButtons } from '../common/Modal'; +import { Paragraph } from '../common/Paragraph'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; function renderError(error) { return ( @@ -27,7 +27,7 @@ type PlainExternalMsgProps = { onClose?: () => void; }; -export default function PlaidExternalMsg({ +export function PlaidExternalMsg({ modalProps, onMoveExternal, onSuccess, diff --git a/packages/desktop-client/src/components/modals/ReportBudgetSummary.tsx b/packages/desktop-client/src/components/modals/ReportBudgetSummary.tsx index f895ecb3ee0..c03ecd5c2a1 100644 --- a/packages/desktop-client/src/components/modals/ReportBudgetSummary.tsx +++ b/packages/desktop-client/src/components/modals/ReportBudgetSummary.tsx @@ -5,19 +5,19 @@ import * as monthUtils from 'loot-core/src/shared/months'; import { styles } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import ExpenseTotal from '../budget/report/budgetsummary/ExpenseTotal'; -import IncomeTotal from '../budget/report/budgetsummary/IncomeTotal'; -import Saved from '../budget/report/budgetsummary/Saved'; -import Modal from '../common/Modal'; -import Stack from '../common/Stack'; -import NamespaceContext from '../spreadsheet/NamespaceContext'; +import { ExpenseTotal } from '../budget/report/budgetsummary/ExpenseTotal'; +import { IncomeTotal } from '../budget/report/budgetsummary/IncomeTotal'; +import { Saved } from '../budget/report/budgetsummary/Saved'; +import { Modal } from '../common/Modal'; +import { Stack } from '../common/Stack'; +import { NamespaceContext } from '../spreadsheet/NamespaceContext'; type ReportBudgetSummaryProps = { modalProps: CommonModalProps; month: string; }; -export default function ReportBudgetSummary({ +export function ReportBudgetSummary({ month, modalProps, }: ReportBudgetSummaryProps) { diff --git a/packages/desktop-client/src/components/modals/RolloverBudgetSummary.tsx b/packages/desktop-client/src/components/modals/RolloverBudgetSummary.tsx index a942d30f35f..2c8bcd0b589 100644 --- a/packages/desktop-client/src/components/modals/RolloverBudgetSummary.tsx +++ b/packages/desktop-client/src/components/modals/RolloverBudgetSummary.tsx @@ -4,10 +4,10 @@ import { format, sheetForMonth, prevMonth } from 'loot-core/src/shared/months'; import { styles } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import ToBudget from '../budget/rollover/budgetsummary/ToBudget'; -import TotalsList from '../budget/rollover/budgetsummary/TotalsList'; -import Modal from '../common/Modal'; -import NamespaceContext from '../spreadsheet/NamespaceContext'; +import { ToBudget } from '../budget/rollover/budgetsummary/ToBudget'; +import { TotalsList } from '../budget/rollover/budgetsummary/TotalsList'; +import { Modal } from '../common/Modal'; +import { NamespaceContext } from '../spreadsheet/NamespaceContext'; type RolloverBudgetSummaryProps = { modalProps: CommonModalProps; @@ -15,7 +15,7 @@ type RolloverBudgetSummaryProps = { month: string; }; -export default function RolloverBudgetSummary({ +export function RolloverBudgetSummary({ month, onBudgetAction, modalProps, diff --git a/packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx b/packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx index 132f346688c..a5a2aadcd1e 100644 --- a/packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx +++ b/packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx @@ -1,16 +1,16 @@ import React, { useState } from 'react'; import { theme } from '../../style'; -import Autocomplete from '../autocomplete/Autocomplete'; -import Button from '../common/Button'; -import Modal from '../common/Modal'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Autocomplete } from '../autocomplete/Autocomplete'; +import { Button } from '../common/Button'; +import { Modal } from '../common/Modal'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { TableHeader, Table, Row, Field } from '../table'; const addAccountOption = { id: 'new', name: 'Create new account' }; -export default function SelectLinkedAccounts({ +export function SelectLinkedAccounts({ modalProps, requisitionId, externalAccounts, diff --git a/packages/desktop-client/src/components/modals/SingleInput.tsx b/packages/desktop-client/src/components/modals/SingleInput.tsx index db2ed81a088..71e2943f5df 100644 --- a/packages/desktop-client/src/components/modals/SingleInput.tsx +++ b/packages/desktop-client/src/components/modals/SingleInput.tsx @@ -2,12 +2,12 @@ import React, { useState } from 'react'; import { styles } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import Button from '../common/Button'; -import FormError from '../common/FormError'; -import InitialFocus from '../common/InitialFocus'; -import Input from '../common/Input'; -import Modal from '../common/Modal'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { FormError } from '../common/FormError'; +import { InitialFocus } from '../common/InitialFocus'; +import { Input } from '../common/Input'; +import { Modal } from '../common/Modal'; +import { View } from '../common/View'; type SingleInputProps = { modalProps: Partial; @@ -18,7 +18,7 @@ type SingleInputProps = { inputPlaceholder?: string; }; -function SingleInput({ +export function SingleInput({ modalProps, title, buttonText, @@ -90,5 +90,3 @@ function SingleInput({ ); } - -export default SingleInput; diff --git a/packages/desktop-client/src/components/modals/SwitchBudgetType.tsx b/packages/desktop-client/src/components/modals/SwitchBudgetType.tsx index 814d8c75573..f2b11a8fa13 100644 --- a/packages/desktop-client/src/components/modals/SwitchBudgetType.tsx +++ b/packages/desktop-client/src/components/modals/SwitchBudgetType.tsx @@ -2,18 +2,18 @@ import React from 'react'; import { useSelector } from 'react-redux'; import { type CommonModalProps } from '../../types/modals'; -import Button from '../common/Button'; -import ExternalLink from '../common/ExternalLink'; -import Modal from '../common/Modal'; -import Paragraph from '../common/Paragraph'; -import Text from '../common/Text'; +import { Button } from '../common/Button'; +import { ExternalLink } from '../common/ExternalLink'; +import { Modal } from '../common/Modal'; +import { Paragraph } from '../common/Paragraph'; +import { Text } from '../common/Text'; type SwitchBudgetTypeProps = { modalProps: CommonModalProps; onSwitch: () => void; }; -export default function SwitchBudgetType({ +export function SwitchBudgetType({ modalProps, onSwitch, }: SwitchBudgetTypeProps) { diff --git a/packages/desktop-client/src/components/payees/ManagePayees.jsx b/packages/desktop-client/src/components/payees/ManagePayees.jsx index 3e60c6a7508..70afd912bbf 100644 --- a/packages/desktop-client/src/components/payees/ManagePayees.jsx +++ b/packages/desktop-client/src/components/payees/ManagePayees.jsx @@ -13,21 +13,22 @@ import memoizeOne from 'memoize-one'; import { groupById } from 'loot-core/src/shared/util'; -import useSelected, { +import { + useSelected, SelectedProvider, useSelectedDispatch, useSelectedItems, } from '../../hooks/useSelected'; -import useStableCallback from '../../hooks/useStableCallback'; -import ExpandArrow from '../../icons/v0/ExpandArrow'; +import { useStableCallback } from '../../hooks/useStableCallback'; +import { SvgExpandArrow } from '../../icons/v0'; import { theme } from '../../style'; -import Button from '../common/Button'; -import Search from '../common/Search'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Search } from '../common/Search'; +import { View } from '../common/View'; import { TableHeader, Cell, SelectCell, useTableNavigator } from '../table'; -import PayeeMenu from './PayeeMenu'; -import PayeeTable from './PayeeTable'; +import { PayeeMenu } from './PayeeMenu'; +import { PayeeTable } from './PayeeTable'; const getPayeesById = memoizeOne(payees => groupById(payees)); @@ -242,7 +243,7 @@ export const ManagePayees = forwardRef( : selected.items.size + ' ' + plural(selected.items.size, 'payee', 'payees')} - + {menuOpen && ( state.queries.payees); const lastUndoState = useSelector(state => state.app.lastUndoState); const { grouped: categoryGroups } = useCategories(); diff --git a/packages/desktop-client/src/components/payees/PayeeMenu.tsx b/packages/desktop-client/src/components/payees/PayeeMenu.tsx index 479ee0242ca..2a4867a669a 100644 --- a/packages/desktop-client/src/components/payees/PayeeMenu.tsx +++ b/packages/desktop-client/src/components/payees/PayeeMenu.tsx @@ -1,10 +1,9 @@ import { type PayeeEntity } from 'loot-core/src/types/models'; -import Delete from '../../icons/v0/Delete'; -import Merge from '../../icons/v0/Merge'; +import { SvgDelete, SvgMerge } from '../../icons/v0'; import { theme } from '../../style'; -import Menu from '../common/Menu'; -import View from '../common/View'; +import { Menu } from '../common/Menu'; +import { View } from '../common/View'; import { Tooltip } from '../tooltips'; type PayeeMenuProps = { @@ -15,7 +14,7 @@ type PayeeMenuProps = { onClose: () => void; }; -export default function PayeeMenu({ +export function PayeeMenu({ payeesById, selectedPayees, onDelete, @@ -64,13 +63,13 @@ export default function PayeeMenu({ } items={[ { - icon: Delete, + icon: SvgDelete, name: 'delete', text: 'Delete', disabled: isDisabled, }, { - icon: Merge, + icon: SvgMerge, iconSize: 9, name: 'merge', text: 'Merge', diff --git a/packages/desktop-client/src/components/payees/PayeeTable.tsx b/packages/desktop-client/src/components/payees/PayeeTable.tsx index b376752ae30..048db5c066e 100644 --- a/packages/desktop-client/src/components/payees/PayeeTable.tsx +++ b/packages/desktop-client/src/components/payees/PayeeTable.tsx @@ -10,10 +10,10 @@ import { import { type PayeeEntity } from 'loot-core/src/types/models'; import { useSelectedItems } from '../../hooks/useSelected'; -import View from '../common/View'; +import { View } from '../common/View'; import { Table, type TableNavigator } from '../table'; -import PayeeTableRow from './PayeeTableRow'; +import { PayeeTableRow } from './PayeeTableRow'; // Table items require an ID to work, it's optional in the loot-core // model so would need to verify accuracy of that before changing there @@ -28,7 +28,7 @@ type PayeeTableProps = { 'onUpdate' | 'onViewRules' | 'onCreateRule' >; -const PayeeTable = forwardRef< +export const PayeeTable = forwardRef< ComponentRef>, PayeeTableProps >( @@ -53,7 +53,7 @@ const PayeeTable = forwardRef< return ( setHovered(null)}> - + Create rule )} - + ); @@ -72,7 +72,7 @@ type PayeeTableRowProps = { style?: CSSProperties; }; -const PayeeTableRow = memo( +export const PayeeTableRow = memo( ({ payee, ruleCount, @@ -150,5 +150,3 @@ const PayeeTableRow = memo( ); }, ); - -export default PayeeTableRow; diff --git a/packages/desktop-client/src/components/reports/CategorySelector.tsx b/packages/desktop-client/src/components/reports/CategorySelector.tsx index d83825eedb4..43a5d2c2ef5 100644 --- a/packages/desktop-client/src/components/reports/CategorySelector.tsx +++ b/packages/desktop-client/src/components/reports/CategorySelector.tsx @@ -5,16 +5,19 @@ import { type CategoryGroupEntity, } from 'loot-core/src/types/models'; -import { CheckAll, UncheckAll } from '../../icons/v2'; -import ViewHide from '../../icons/v2/ViewHide'; -import ViewShow from '../../icons/v2/ViewShow'; +import { + SvgCheckAll, + SvgUncheckAll, + SvgViewHide, + SvgViewShow, +} from '../../icons/v2'; import { type CategoryListProps } from '../autocomplete/CategoryAutocomplete'; -import Button from '../common/Button'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { Checkbox } from '../forms'; -import GraphButton from './GraphButton'; +import { GraphButton } from './GraphButton'; type CategorySelectorProps = { categoryGroups: Array; @@ -23,7 +26,7 @@ type CategorySelectorProps = { setSelectedCategories: (selectedCategories: CategoryEntity[]) => null; }; -export default function CategorySelector({ +export function CategorySelector({ categoryGroups, categories, selectedCategories, @@ -66,12 +69,20 @@ export default function CategorySelector({ {uncheckedHidden ? ( - + Show unchecked ) : ( - + Hide unchecked )} @@ -87,7 +98,7 @@ export default function CategorySelector({ }} style={{ marginRight: 5, padding: 8 }} > - + - + diff --git a/packages/desktop-client/src/components/reports/Change.jsx b/packages/desktop-client/src/components/reports/Change.jsx index a135f0aeb8f..5267b2c77c7 100644 --- a/packages/desktop-client/src/components/reports/Change.jsx +++ b/packages/desktop-client/src/components/reports/Change.jsx @@ -3,9 +3,9 @@ import React from 'react'; import { integerToCurrency } from 'loot-core/src/shared/util'; import { theme, styles } from '../../style'; -import Block from '../common/Block'; +import { Block } from '../common/Block'; -function Change({ amount }) { +export function Change({ amount }) { return ( ); } - -export default Change; diff --git a/packages/desktop-client/src/components/reports/ChooseGraph.tsx b/packages/desktop-client/src/components/reports/ChooseGraph.tsx index 66574f564d7..c7baea09b9b 100644 --- a/packages/desktop-client/src/components/reports/ChooseGraph.tsx +++ b/packages/desktop-client/src/components/reports/ChooseGraph.tsx @@ -1,19 +1,19 @@ import React, { useRef } from 'react'; -import View from '../common/View'; +import { View } from '../common/View'; import { type DataEntity, type Month } from './entities'; -import AreaGraph from './graphs/AreaGraph'; -import BarGraph from './graphs/BarGraph'; -import BarLineGraph from './graphs/BarLineGraph'; -import DonutGraph from './graphs/DonutGraph'; -import LineGraph from './graphs/LineGraph'; -import StackedBarGraph from './graphs/StackedBarGraph'; +import { AreaGraph } from './graphs/AreaGraph'; +import { BarGraph } from './graphs/BarGraph'; +import { BarLineGraph } from './graphs/BarLineGraph'; +import { DonutGraph } from './graphs/DonutGraph'; +import { LineGraph } from './graphs/LineGraph'; +import { StackedBarGraph } from './graphs/StackedBarGraph'; import { ReportOptions } from './ReportOptions'; -import ReportTable from './ReportTable'; -import ReportTableHeader from './ReportTableHeader'; -import ReportTableList from './ReportTableList'; -import ReportTableTotals from './ReportTableTotals'; +import { ReportTable } from './ReportTable'; +import { ReportTableHeader } from './ReportTableHeader'; +import { ReportTableList } from './ReportTableList'; +import { ReportTableTotals } from './ReportTableTotals'; type ChooseGraphProps = { data: DataEntity; @@ -27,7 +27,7 @@ type ChooseGraphProps = { months: Month[]; }; -function ChooseGraph({ +export function ChooseGraph({ data, mode, graphType, @@ -139,5 +139,3 @@ function ChooseGraph({ ); } } - -export default ChooseGraph; diff --git a/packages/desktop-client/src/components/reports/Container.tsx b/packages/desktop-client/src/components/reports/Container.tsx index 34b9c0d7c8c..f1108c72b4c 100644 --- a/packages/desktop-client/src/components/reports/Container.tsx +++ b/packages/desktop-client/src/components/reports/Container.tsx @@ -2,13 +2,13 @@ import React, { useRef, type ReactNode } from 'react'; import AutoSizer from 'react-virtualized-auto-sizer'; import { type CSSProperties } from '../../style'; -import View from '../common/View'; +import { View } from '../common/View'; type ContainerProps = { style?: CSSProperties; children: (width: number, height: number, host: HTMLDivElement) => ReactNode; }; -export default function Container({ style, children }: ContainerProps) { +export function Container({ style, children }: ContainerProps) { const portalHost = useRef(null); return ( diff --git a/packages/desktop-client/src/components/reports/DateRange.tsx b/packages/desktop-client/src/components/reports/DateRange.tsx index df3d6eb50ec..878cd6398e4 100644 --- a/packages/desktop-client/src/components/reports/DateRange.tsx +++ b/packages/desktop-client/src/components/reports/DateRange.tsx @@ -3,14 +3,14 @@ import React, { type ReactElement } from 'react'; import * as d from 'date-fns'; import { theme } from '../../style'; -import Block from '../common/Block'; +import { Block } from '../common/Block'; type DateRangeProps = { start: string; end: string; }; -function DateRange({ +export function DateRange({ start: startProp, end: endProp, }: DateRangeProps): ReactElement { @@ -36,5 +36,3 @@ function DateRange({ return {content}; } - -export default DateRange; diff --git a/packages/desktop-client/src/components/reports/GraphButton.tsx b/packages/desktop-client/src/components/reports/GraphButton.tsx index 50c50297dd6..9d14e37783c 100644 --- a/packages/desktop-client/src/components/reports/GraphButton.tsx +++ b/packages/desktop-client/src/components/reports/GraphButton.tsx @@ -1,9 +1,9 @@ import React, { type HTMLProps } from 'react'; import { type CSSProperties, theme } from '../../style'; -import Button from '../common/Button'; -import HoverTarget from '../common/HoverTarget'; -import Text from '../common/Text'; +import { Button } from '../common/Button'; +import { HoverTarget } from '../common/HoverTarget'; +import { Text } from '../common/Text'; import { Tooltip } from '../tooltips'; type GraphButtonProps = HTMLProps & { @@ -14,7 +14,7 @@ type GraphButtonProps = HTMLProps & { disabled?: boolean; }; -const GraphButton = ({ +export const GraphButton = ({ selected, children, onSelect, @@ -55,5 +55,3 @@ const GraphButton = ({ ); }; - -export default GraphButton; diff --git a/packages/desktop-client/src/components/reports/Header.jsx b/packages/desktop-client/src/components/reports/Header.jsx index dffee4321ca..34188780b6a 100644 --- a/packages/desktop-client/src/components/reports/Header.jsx +++ b/packages/desktop-client/src/components/reports/Header.jsx @@ -2,12 +2,12 @@ import { useLocation } from 'react-router-dom'; import * as monthUtils from 'loot-core/src/shared/months'; -import ArrowLeft from '../../icons/v1/ArrowLeft'; +import { SvgArrowLeft } from '../../icons/v1'; import { styles } from '../../style'; -import Button from '../common/Button'; -import ButtonLink from '../common/ButtonLink'; -import Select from '../common/Select'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { ButtonLink } from '../common/ButtonLink'; +import { Select } from '../common/Select'; +import { View } from '../common/View'; import { FilterButton, AppliedFilters } from '../filters/FiltersMenu'; export function validateStart(allMonths, start, end) { @@ -61,7 +61,7 @@ export function getFullRange(allMonths) { return [start, end]; } -function Header({ +export function Header({ title, start, end, @@ -93,7 +93,7 @@ function Header({ to="/reports" style={{ marginBottom: '15', alignSelf: 'flex-start' }} > - Back + Back {title} @@ -190,5 +190,3 @@ function Header({ ); } - -export default Header; diff --git a/packages/desktop-client/src/components/reports/LoadingIndicator.tsx b/packages/desktop-client/src/components/reports/LoadingIndicator.tsx index 8e71593df3c..e70bc0d7505 100644 --- a/packages/desktop-client/src/components/reports/LoadingIndicator.tsx +++ b/packages/desktop-client/src/components/reports/LoadingIndicator.tsx @@ -1,15 +1,15 @@ import React from 'react'; -import AnimatedLoading from '../../icons/AnimatedLoading'; +import { AnimatedLoading } from '../../icons/AnimatedLoading'; import { theme, styles } from '../../style'; -import Block from '../common/Block'; -import View from '../common/View'; +import { Block } from '../common/Block'; +import { View } from '../common/View'; type LoadingIndicatorProps = { message?: string; }; -const LoadingIndicator = ({ message }: LoadingIndicatorProps) => { +export const LoadingIndicator = ({ message }: LoadingIndicatorProps) => { return ( { ); }; - -export default LoadingIndicator; diff --git a/packages/desktop-client/src/components/reports/ModeButton.tsx b/packages/desktop-client/src/components/reports/ModeButton.tsx index e0f216d84fa..70b00bef7f1 100644 --- a/packages/desktop-client/src/components/reports/ModeButton.tsx +++ b/packages/desktop-client/src/components/reports/ModeButton.tsx @@ -1,7 +1,7 @@ import React, { type MouseEventHandler, type ReactNode } from 'react'; import { type CSSProperties, theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; type ModeButtonProps = { selected: boolean; @@ -10,7 +10,12 @@ type ModeButtonProps = { onSelect: MouseEventHandler; }; -function ModeButton({ selected, children, style, onSelect }: ModeButtonProps) { +export function ModeButton({ + selected, + children, + style, + onSelect, +}: ModeButtonProps) { return ( {menuOpen && } diff --git a/packages/desktop-client/src/components/reports/Tooltip.jsx b/packages/desktop-client/src/components/reports/Tooltip.jsx index 1f1a481708f..0ec50a81fd2 100644 --- a/packages/desktop-client/src/components/reports/Tooltip.jsx +++ b/packages/desktop-client/src/components/reports/Tooltip.jsx @@ -6,7 +6,7 @@ import { VictoryTooltip } from 'victory'; import { theme } from '../../style'; -class Tooltip extends Component { +export class Tooltip extends Component { static defaultEvents = VictoryTooltip.defaultEvents; render() { @@ -84,5 +84,3 @@ class Tooltip extends Component { ); } } - -export default Tooltip; diff --git a/packages/desktop-client/src/components/reports/getCustomTick.ts b/packages/desktop-client/src/components/reports/getCustomTick.ts index 07ab8f777b6..448d3301af9 100644 --- a/packages/desktop-client/src/components/reports/getCustomTick.ts +++ b/packages/desktop-client/src/components/reports/getCustomTick.ts @@ -1,9 +1,7 @@ -const getCustomTick = (value: string, isPrivacyModeEnabled: boolean) => { +export const getCustomTick = (value: string, isPrivacyModeEnabled: boolean) => { if (isPrivacyModeEnabled) { return '...'; } else { return value; } }; - -export default getCustomTick; diff --git a/packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx b/packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx index 3c349f9d47c..995d13d1105 100644 --- a/packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx @@ -11,16 +11,16 @@ import { ResponsiveContainer, } from 'recharts'; -import usePrivacyMode from 'loot-core/src/client/privacy'; +import { usePrivacyMode } from 'loot-core/src/client/privacy'; import { amountToCurrency } from 'loot-core/src/shared/util'; import { theme } from '../../../style'; import { type CSSProperties } from '../../../style'; -import AlignedText from '../../common/AlignedText'; -import PrivacyFilter from '../../PrivacyFilter'; -import Container from '../Container'; +import { AlignedText } from '../../common/AlignedText'; +import { PrivacyFilter } from '../../PrivacyFilter'; +import { Container } from '../Container'; import { type DataEntity } from '../entities'; -import numberFormatterTooltip from '../numberFormatter'; +import { numberFormatterTooltip } from '../numberFormatter'; type PayloadItem = { payload: { @@ -98,7 +98,12 @@ type AreaGraphProps = { compact?: boolean; }; -function AreaGraph({ style, data, balanceTypeOp, compact }: AreaGraphProps) { +export function AreaGraph({ + style, + data, + balanceTypeOp, + compact, +}: AreaGraphProps) { const privacyMode = usePrivacyMode(); const tickFormatter = tick => { @@ -197,5 +202,3 @@ function AreaGraph({ style, data, balanceTypeOp, compact }: AreaGraphProps) { ); } - -export default AreaGraph; diff --git a/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx b/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx index f4c49c25f18..40d8f2dfc7d 100644 --- a/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx @@ -13,17 +13,17 @@ import { ResponsiveContainer, } from 'recharts'; -import usePrivacyMode from 'loot-core/src/client/privacy'; +import { usePrivacyMode } from 'loot-core/src/client/privacy'; import { amountToCurrency } from 'loot-core/src/shared/util'; import { theme } from '../../../style'; import { type CSSProperties } from '../../../style'; -import AlignedText from '../../common/AlignedText'; -import PrivacyFilter from '../../PrivacyFilter'; -import Container from '../Container'; +import { AlignedText } from '../../common/AlignedText'; +import { PrivacyFilter } from '../../PrivacyFilter'; +import { Container } from '../Container'; import { type DataEntity } from '../entities'; -import getCustomTick from '../getCustomTick'; -import numberFormatterTooltip from '../numberFormatter'; +import { getCustomTick } from '../getCustomTick'; +import { numberFormatterTooltip } from '../numberFormatter'; type PayloadChild = { props: { @@ -114,7 +114,7 @@ type BarGraphProps = { compact?: boolean; }; -function BarGraph({ +export function BarGraph({ style, data, groupBy, @@ -216,5 +216,3 @@ function BarGraph({ ); } - -export default BarGraph; diff --git a/packages/desktop-client/src/components/reports/graphs/BarLineGraph.tsx b/packages/desktop-client/src/components/reports/graphs/BarLineGraph.tsx index 6378969ef99..08927d7ea50 100644 --- a/packages/desktop-client/src/components/reports/graphs/BarLineGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/BarLineGraph.tsx @@ -14,10 +14,10 @@ import { import { theme } from '../../../style'; import { type CSSProperties } from '../../../style'; -import AlignedText from '../../common/AlignedText'; -import PrivacyFilter from '../../PrivacyFilter'; -import Container from '../Container'; -import numberFormatterTooltip from '../numberFormatter'; +import { AlignedText } from '../../common/AlignedText'; +import { PrivacyFilter } from '../../PrivacyFilter'; +import { Container } from '../Container'; +import { numberFormatterTooltip } from '../numberFormatter'; type PayloadItem = { payload: { @@ -75,7 +75,7 @@ type BarLineGraphProps = { compact?: boolean; }; -function BarLineGraph({ style, graphData, compact }: BarLineGraphProps) { +export function BarLineGraph({ style, graphData, compact }: BarLineGraphProps) { const tickFormatter = tick => { return `${Math.round(tick).toLocaleString()}`; // Formats the tick values as strings with commas }; @@ -116,5 +116,3 @@ function BarLineGraph({ style, graphData, compact }: BarLineGraphProps) { ); } - -export default BarLineGraph; diff --git a/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx b/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx index f5739966f4e..c3abe65d93d 100644 --- a/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx @@ -12,14 +12,14 @@ import { import { theme } from '../../../style'; import { chartTheme } from '../chart-theme'; -import Container from '../Container'; -import Tooltip from '../Tooltip'; +import { Container } from '../Container'; +import { Tooltip } from '../Tooltip'; type CashFlowGraphProps = { graphData: { expenses; income; balances }; isConcise: boolean; }; -function CashFlowGraph({ graphData, isConcise }: CashFlowGraphProps) { +export function CashFlowGraph({ graphData, isConcise }: CashFlowGraphProps) { return ( {(width, height, portalHost) => @@ -63,5 +63,3 @@ function CashFlowGraph({ graphData, isConcise }: CashFlowGraphProps) { ); } - -export default CashFlowGraph; diff --git a/packages/desktop-client/src/components/reports/graphs/CategorySpendingGraph.tsx b/packages/desktop-client/src/components/reports/graphs/CategorySpendingGraph.tsx index 671101561e0..d4a221097a8 100644 --- a/packages/desktop-client/src/components/reports/graphs/CategorySpendingGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/CategorySpendingGraph.tsx @@ -4,9 +4,9 @@ import * as d from 'date-fns'; import { VictoryAxis, VictoryBar, VictoryChart, VictoryStack } from 'victory'; import { chartTheme } from '../chart-theme'; -import Container from '../Container'; +import { Container } from '../Container'; import { type CategorySpendingGraphData } from '../spreadsheets/category-spending-spreadsheet'; -import Tooltip from '../Tooltip'; +import { Tooltip } from '../Tooltip'; import { Area } from './common'; @@ -17,7 +17,7 @@ type CategorySpendingGraphProps = { compact?: boolean; style?: CSSProperties; }; -function CategorySpendingGraph({ +export function CategorySpendingGraph({ style, start, end, @@ -83,5 +83,3 @@ function CategorySpendingGraph({ ); } - -export default CategorySpendingGraph; diff --git a/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx b/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx index 5599fb5c733..b815e4259c6 100644 --- a/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx @@ -3,7 +3,7 @@ import React, { useState } from 'react'; import { PieChart, Pie, Cell, Sector, ResponsiveContainer } from 'recharts'; import { type CSSProperties } from '../../../style'; -import Container from '../Container'; +import { Container } from '../Container'; import { type DataEntity } from '../entities'; const RADIAN = Math.PI / 180; @@ -92,7 +92,7 @@ type DonutGraphProps = { compact?: boolean; }; -function DonutGraph({ +export function DonutGraph({ style, data, groupBy, @@ -153,5 +153,3 @@ function DonutGraph({ ); } - -export default DonutGraph; diff --git a/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx b/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx index 419e0a2e612..1eaa2b9aa8a 100644 --- a/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx @@ -13,10 +13,10 @@ import { import { theme } from '../../../style'; import { type CSSProperties } from '../../../style'; -import AlignedText from '../../common/AlignedText'; -import PrivacyFilter from '../../PrivacyFilter'; -import Container from '../Container'; -import numberFormatterTooltip from '../numberFormatter'; +import { AlignedText } from '../../common/AlignedText'; +import { PrivacyFilter } from '../../PrivacyFilter'; +import { Container } from '../Container'; +import { numberFormatterTooltip } from '../numberFormatter'; type PayloadItem = { payload: { @@ -74,7 +74,7 @@ type LineGraphProps = { compact?: boolean; }; -function LineGraph({ style, graphData, compact }: LineGraphProps) { +export function LineGraph({ style, graphData, compact }: LineGraphProps) { const tickFormatter = tick => { return `${Math.round(tick).toLocaleString()}`; // Formats the tick values as strings with commas }; @@ -114,5 +114,3 @@ function LineGraph({ style, graphData, compact }: LineGraphProps) { ); } - -export default LineGraph; diff --git a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx index d17e37ac1a2..4de8d311b3f 100644 --- a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx @@ -13,9 +13,9 @@ import { import { theme } from '../../../style'; import { type CSSProperties } from '../../../style'; -import AlignedText from '../../common/AlignedText'; -import Container from '../Container'; -import numberFormatterTooltip from '../numberFormatter'; +import { AlignedText } from '../../common/AlignedText'; +import { Container } from '../Container'; +import { numberFormatterTooltip } from '../numberFormatter'; type NetWorthGraphProps = { style?: CSSProperties; @@ -26,7 +26,7 @@ type NetWorthGraphProps = { }; }; -function NetWorthGraph({ +export function NetWorthGraph({ style, graphData, compact, @@ -126,22 +126,20 @@ function NetWorthGraph({ {compact ? null : ( )} - {compact ? null : ( - - )} - {compact ? null : ( - - )} + + } formatter={numberFormatterTooltip} @@ -180,5 +178,3 @@ function NetWorthGraph({ ); } - -export default NetWorthGraph; diff --git a/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx b/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx index 753009a029f..a41a90fe47d 100644 --- a/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx @@ -8,8 +8,8 @@ import { ResponsiveContainer, } from 'recharts'; -import Container from '../Container'; -import numberFormatterTooltip from '../numberFormatter'; +import { Container } from '../Container'; +import { numberFormatterTooltip } from '../numberFormatter'; type SankeyProps = { style; @@ -78,7 +78,7 @@ function convertToCondensed(data) { }; } -function SankeyGraph({ style, data, compact }: SankeyProps) { +export function SankeyGraph({ style, data, compact }: SankeyProps) { const sankeyData = compact ? convertToCondensed(data) : data; if (!data.links || data.links.length === 0) return null; @@ -134,5 +134,3 @@ function SankeyGraph({ style, data, compact }: SankeyProps) { ); } - -export default SankeyGraph; diff --git a/packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx b/packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx index 7a5421a4253..faf0a8e49bd 100644 --- a/packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx @@ -11,17 +11,17 @@ import { ResponsiveContainer, } from 'recharts'; -import usePrivacyMode from 'loot-core/src/client/privacy'; +import { usePrivacyMode } from 'loot-core/src/client/privacy'; import { amountToCurrency } from 'loot-core/src/shared/util'; import { theme } from '../../../style'; import { type CSSProperties } from '../../../style'; -import AlignedText from '../../common/AlignedText'; -import PrivacyFilter from '../../PrivacyFilter'; -import Container from '../Container'; +import { AlignedText } from '../../common/AlignedText'; +import { PrivacyFilter } from '../../PrivacyFilter'; +import { Container } from '../Container'; import { type DataEntity } from '../entities'; -import getCustomTick from '../getCustomTick'; -import numberFormatterTooltip from '../numberFormatter'; +import { getCustomTick } from '../getCustomTick'; +import { numberFormatterTooltip } from '../numberFormatter'; type PayloadItem = { name: string; @@ -97,7 +97,11 @@ type StackedBarGraphProps = { compact?: boolean; }; -function StackedBarGraph({ style, data, compact }: StackedBarGraphProps) { +export function StackedBarGraph({ + style, + data, + compact, +}: StackedBarGraphProps) { const privacyMode = usePrivacyMode(); return ( @@ -155,5 +159,3 @@ function StackedBarGraph({ style, data, compact }: StackedBarGraphProps) { ); } - -export default StackedBarGraph; diff --git a/packages/desktop-client/src/components/reports/index.tsx b/packages/desktop-client/src/components/reports/index.tsx index b57d418548d..ad7812ae2c6 100644 --- a/packages/desktop-client/src/components/reports/index.tsx +++ b/packages/desktop-client/src/components/reports/index.tsx @@ -1,7 +1,7 @@ -import View from '../common/View'; +import { View } from '../common/View'; import { LoadComponent } from '../util/LoadComponent'; -export default function Reports() { +export function Reports() { return ( { +export const numberFormatterTooltip = ( + value: PotentialNumber, +): number | null => { if (typeof value === 'number') { return Math.round(value); } return null; // or some default value for other cases }; - -export default numberFormatterTooltip; diff --git a/packages/desktop-client/src/components/reports/reports/CashFlow.tsx b/packages/desktop-client/src/components/reports/reports/CashFlow.tsx index 7c782c0e8d0..17ccfef4eaf 100644 --- a/packages/desktop-client/src/components/reports/reports/CashFlow.tsx +++ b/packages/desktop-client/src/components/reports/reports/CashFlow.tsx @@ -6,21 +6,21 @@ import { send } from 'loot-core/src/platform/client/fetch'; import * as monthUtils from 'loot-core/src/shared/months'; import { integerToCurrency } from 'loot-core/src/shared/util'; -import useFilters from '../../../hooks/useFilters'; +import { useFilters } from '../../../hooks/useFilters'; import { theme, styles } from '../../../style'; -import AlignedText from '../../common/AlignedText'; -import Block from '../../common/Block'; -import Paragraph from '../../common/Paragraph'; -import Text from '../../common/Text'; -import View from '../../common/View'; -import PrivacyFilter from '../../PrivacyFilter'; -import Change from '../Change'; -import CashFlowGraph from '../graphs/CashFlowGraph'; -import Header from '../Header'; +import { AlignedText } from '../../common/AlignedText'; +import { Block } from '../../common/Block'; +import { Paragraph } from '../../common/Paragraph'; +import { Text } from '../../common/Text'; +import { View } from '../../common/View'; +import { PrivacyFilter } from '../../PrivacyFilter'; +import { Change } from '../Change'; +import { CashFlowGraph } from '../graphs/CashFlowGraph'; +import { Header } from '../Header'; import { cashFlowByDate } from '../spreadsheets/cash-flow-spreadsheet'; -import useReport from '../useReport'; +import { useReport } from '../useReport'; -export default function CashFlow(): JSX.Element { +export function CashFlow(): JSX.Element { const { filters, conditionsOp, diff --git a/packages/desktop-client/src/components/reports/reports/CashFlowCard.jsx b/packages/desktop-client/src/components/reports/reports/CashFlowCard.jsx index bc752f4bbf4..30df9368c5f 100644 --- a/packages/desktop-client/src/components/reports/reports/CashFlowCard.jsx +++ b/packages/desktop-client/src/components/reports/reports/CashFlowCard.jsx @@ -6,20 +6,20 @@ import * as monthUtils from 'loot-core/src/shared/months'; import { integerToCurrency } from 'loot-core/src/shared/util'; import { theme, styles } from '../../../style'; -import Block from '../../common/Block'; -import View from '../../common/View'; -import PrivacyFilter from '../../PrivacyFilter'; -import Change from '../Change'; +import { Block } from '../../common/Block'; +import { View } from '../../common/View'; +import { PrivacyFilter } from '../../PrivacyFilter'; +import { Change } from '../Change'; import { chartTheme } from '../chart-theme'; -import Container from '../Container'; -import DateRange from '../DateRange'; -import LoadingIndicator from '../LoadingIndicator'; -import ReportCard from '../ReportCard'; +import { Container } from '../Container'; +import { DateRange } from '../DateRange'; +import { LoadingIndicator } from '../LoadingIndicator'; +import { ReportCard } from '../ReportCard'; import { simpleCashFlow } from '../spreadsheets/cash-flow-spreadsheet'; -import Tooltip from '../Tooltip'; -import useReport from '../useReport'; +import { Tooltip } from '../Tooltip'; +import { useReport } from '../useReport'; -function CashFlowCard() { +export function CashFlowCard() { const end = monthUtils.currentDay(); const start = monthUtils.currentMonth() + '-01'; @@ -149,5 +149,3 @@ function CashFlowCard() { ); } - -export default CashFlowCard; diff --git a/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx b/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx index 2d8a2c82ea4..a8e7cf79a25 100644 --- a/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx +++ b/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx @@ -5,18 +5,18 @@ import * as d from 'date-fns'; import { send } from 'loot-core/src/platform/client/fetch'; import * as monthUtils from 'loot-core/src/shared/months'; -import useCategories from '../../../hooks/useCategories'; +import { useCategories } from '../../../hooks/useCategories'; import { styles } from '../../../style'; -import Select from '../../common/Select'; -import View from '../../common/View'; -import CategorySelector from '../CategorySelector'; -import CategorySpendingGraph from '../graphs/CategorySpendingGraph'; -import Header from '../Header'; -import categorySpendingSpreadsheet from '../spreadsheets/category-spending-spreadsheet'; -import useReport from '../useReport'; +import { Select } from '../../common/Select'; +import { View } from '../../common/View'; +import { CategorySelector } from '../CategorySelector'; +import { CategorySpendingGraph } from '../graphs/CategorySpendingGraph'; +import { Header } from '../Header'; +import { createSpreadsheet as categorySpendingSpreadsheet } from '../spreadsheets/category-spending-spreadsheet'; +import { useReport } from '../useReport'; import { fromDateRepr } from '../util'; -function CategorySpending() { +export function CategorySpending() { const categories = useCategories(); const [selectedCategories, setSelectedCategories] = useState(null); @@ -173,5 +173,3 @@ function CategorySpending() { ); } - -export default CategorySpending; diff --git a/packages/desktop-client/src/components/reports/reports/CategorySpendingCard.jsx b/packages/desktop-client/src/components/reports/reports/CategorySpendingCard.jsx index 2a705305d9f..c6b86eac0d9 100644 --- a/packages/desktop-client/src/components/reports/reports/CategorySpendingCard.jsx +++ b/packages/desktop-client/src/components/reports/reports/CategorySpendingCard.jsx @@ -2,18 +2,18 @@ import React, { useMemo } from 'react'; import * as monthUtils from 'loot-core/src/shared/months'; -import useCategories from '../../../hooks/useCategories'; +import { useCategories } from '../../../hooks/useCategories'; import { styles } from '../../../style'; -import Block from '../../common/Block'; -import View from '../../common/View'; -import DateRange from '../DateRange'; -import CategorySpendingGraph from '../graphs/CategorySpendingGraph'; -import LoadingIndicator from '../LoadingIndicator'; -import ReportCard from '../ReportCard'; -import categorySpendingSpreadsheet from '../spreadsheets/category-spending-spreadsheet'; -import useReport from '../useReport'; - -function CategorySpendingCard() { +import { Block } from '../../common/Block'; +import { View } from '../../common/View'; +import { DateRange } from '../DateRange'; +import { CategorySpendingGraph } from '../graphs/CategorySpendingGraph'; +import { LoadingIndicator } from '../LoadingIndicator'; +import { ReportCard } from '../ReportCard'; +import { createSpreadsheet as categorySpendingSpreadsheet } from '../spreadsheets/category-spending-spreadsheet'; +import { useReport } from '../useReport'; + +export function CategorySpendingCard() { const { list: categories = [] } = useCategories(); const end = monthUtils.currentDay(); @@ -59,5 +59,3 @@ function CategorySpendingCard() { ); } - -export default CategorySpendingCard; diff --git a/packages/desktop-client/src/components/reports/reports/CustomReport.jsx b/packages/desktop-client/src/components/reports/reports/CustomReport.jsx index 307b630033f..b2080b0daeb 100644 --- a/packages/desktop-client/src/components/reports/reports/CustomReport.jsx +++ b/packages/desktop-client/src/components/reports/reports/CustomReport.jsx @@ -10,29 +10,29 @@ import * as monthUtils from 'loot-core/src/shared/months'; import { amountToCurrency } from 'loot-core/src/shared/util'; import { useActions } from '../../../hooks/useActions'; -import useCategories from '../../../hooks/useCategories'; -import useFilters from '../../../hooks/useFilters'; +import { useCategories } from '../../../hooks/useCategories'; +import { useFilters } from '../../../hooks/useFilters'; import { theme, styles } from '../../../style'; -import AlignedText from '../../common/AlignedText'; -import Block from '../../common/Block'; -import Text from '../../common/Text'; -import View from '../../common/View'; +import { AlignedText } from '../../common/AlignedText'; +import { Block } from '../../common/Block'; +import { Text } from '../../common/Text'; +import { View } from '../../common/View'; import { AppliedFilters } from '../../filters/FiltersMenu'; -import PrivacyFilter from '../../PrivacyFilter'; -import ChooseGraph from '../ChooseGraph'; -import Header from '../Header'; -import LoadingIndicator from '../LoadingIndicator'; -import ReportLegend from '../ReportLegend'; +import { PrivacyFilter } from '../../PrivacyFilter'; +import { ChooseGraph } from '../ChooseGraph'; +import { Header } from '../Header'; +import { LoadingIndicator } from '../LoadingIndicator'; +import { ReportLegend } from '../ReportLegend'; import { ReportOptions } from '../ReportOptions'; import { ReportSidebar } from '../ReportSidebar'; -import ReportSummary from '../ReportSummary'; +import { ReportSummary } from '../ReportSummary'; import { ReportTopbar } from '../ReportTopbar'; -import defaultSpreadsheet from '../spreadsheets/default-spreadsheet'; -import groupedSpreadsheet from '../spreadsheets/grouped-spreadsheet'; -import useReport from '../useReport'; +import { createSpreadsheet as defaultSpreadsheet } from '../spreadsheets/default-spreadsheet'; +import { createGroupedSpreadsheet as groupedSpreadsheet } from '../spreadsheets/grouped-spreadsheet'; +import { useReport } from '../useReport'; import { fromDateRepr } from '../util'; -export default function CustomReport() { +export function CustomReport() { const categories = useCategories(); const viewLegend = diff --git a/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx b/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx index ba99695416d..7fc0b66bc1c 100644 --- a/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx +++ b/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx @@ -2,18 +2,18 @@ import React, { useMemo } from 'react'; import * as monthUtils from 'loot-core/src/shared/months'; -import useCategories from '../../../hooks/useCategories'; +import { useCategories } from '../../../hooks/useCategories'; import { styles } from '../../../style'; -import Block from '../../common/Block'; -import View from '../../common/View'; -import DateRange from '../DateRange'; -import BarGraph from '../graphs/BarGraph'; -import LoadingIndicator from '../LoadingIndicator'; -import ReportCard from '../ReportCard'; -import defaultSpreadsheet from '../spreadsheets/default-spreadsheet'; -import useReport from '../useReport'; - -function CustomReportCard() { +import { Block } from '../../common/Block'; +import { View } from '../../common/View'; +import { DateRange } from '../DateRange'; +import { BarGraph } from '../graphs/BarGraph'; +import { LoadingIndicator } from '../LoadingIndicator'; +import { ReportCard } from '../ReportCard'; +import { createSpreadsheet as defaultSpreadsheet } from '../spreadsheets/default-spreadsheet'; +import { useReport } from '../useReport'; + +export function CustomReportCard() { const categories = useCategories(); const endDate = monthUtils.currentMonth(); @@ -61,5 +61,3 @@ function CustomReportCard() { ); } - -export default CustomReportCard; diff --git a/packages/desktop-client/src/components/reports/reports/NetWorth.jsx b/packages/desktop-client/src/components/reports/reports/NetWorth.jsx index 8d9be68073d..5bdd779b24f 100644 --- a/packages/desktop-client/src/components/reports/reports/NetWorth.jsx +++ b/packages/desktop-client/src/components/reports/reports/NetWorth.jsx @@ -7,19 +7,19 @@ import { send } from 'loot-core/src/platform/client/fetch'; import * as monthUtils from 'loot-core/src/shared/months'; import { integerToCurrency } from 'loot-core/src/shared/util'; -import useFilters from '../../../hooks/useFilters'; +import { useFilters } from '../../../hooks/useFilters'; import { theme, styles } from '../../../style'; -import Paragraph from '../../common/Paragraph'; -import View from '../../common/View'; -import PrivacyFilter from '../../PrivacyFilter'; -import Change from '../Change'; -import NetWorthGraph from '../graphs/NetWorthGraph'; -import Header from '../Header'; -import netWorthSpreadsheet from '../spreadsheets/net-worth-spreadsheet'; -import useReport from '../useReport'; +import { Paragraph } from '../../common/Paragraph'; +import { View } from '../../common/View'; +import { PrivacyFilter } from '../../PrivacyFilter'; +import { Change } from '../Change'; +import { NetWorthGraph } from '../graphs/NetWorthGraph'; +import { Header } from '../Header'; +import { createSpreadsheet as netWorthSpreadsheet } from '../spreadsheets/net-worth-spreadsheet'; +import { useReport } from '../useReport'; import { fromDateRepr } from '../util'; -function NetWorth() { +export function NetWorth() { const accounts = useSelector(state => state.queries.accounts); const { filters, @@ -152,5 +152,3 @@ function NetWorth() { ); } - -export default NetWorth; diff --git a/packages/desktop-client/src/components/reports/reports/NetWorthCard.jsx b/packages/desktop-client/src/components/reports/reports/NetWorthCard.jsx index 1c1f74ee6b2..3b2963bd4a4 100644 --- a/packages/desktop-client/src/components/reports/reports/NetWorthCard.jsx +++ b/packages/desktop-client/src/components/reports/reports/NetWorthCard.jsx @@ -4,18 +4,18 @@ import * as monthUtils from 'loot-core/src/shared/months'; import { integerToCurrency } from 'loot-core/src/shared/util'; import { theme, styles } from '../../../style'; -import Block from '../../common/Block'; -import View from '../../common/View'; -import PrivacyFilter from '../../PrivacyFilter'; -import Change from '../Change'; -import DateRange from '../DateRange'; -import NetWorthGraph from '../graphs/NetWorthGraph'; -import LoadingIndicator from '../LoadingIndicator'; -import ReportCard from '../ReportCard'; -import netWorthSpreadsheet from '../spreadsheets/net-worth-spreadsheet'; -import useReport from '../useReport'; +import { Block } from '../../common/Block'; +import { View } from '../../common/View'; +import { PrivacyFilter } from '../../PrivacyFilter'; +import { Change } from '../Change'; +import { DateRange } from '../DateRange'; +import { NetWorthGraph } from '../graphs/NetWorthGraph'; +import { LoadingIndicator } from '../LoadingIndicator'; +import { ReportCard } from '../ReportCard'; +import { createSpreadsheet as netWorthSpreadsheet } from '../spreadsheets/net-worth-spreadsheet'; +import { useReport } from '../useReport'; -function NetWorthCard({ accounts }) { +export function NetWorthCard({ accounts }) { const end = monthUtils.currentMonth(); const start = monthUtils.subMonths(end, 5); const [isCardHovered, setIsCardHovered] = useState(false); @@ -83,5 +83,3 @@ function NetWorthCard({ accounts }) { ); } - -export default NetWorthCard; diff --git a/packages/desktop-client/src/components/reports/reports/Sankey.jsx b/packages/desktop-client/src/components/reports/reports/Sankey.jsx index b2b11548681..fad99a01c68 100644 --- a/packages/desktop-client/src/components/reports/reports/Sankey.jsx +++ b/packages/desktop-client/src/components/reports/reports/Sankey.jsx @@ -5,18 +5,18 @@ import * as d from 'date-fns'; import { send } from 'loot-core/src/platform/client/fetch'; import * as monthUtils from 'loot-core/src/shared/months'; -import useCategories from '../../../hooks/useCategories'; -import useFilters from '../../../hooks/useFilters'; +import { useCategories } from '../../../hooks/useCategories'; +import { useFilters } from '../../../hooks/useFilters'; import { theme, styles } from '../../../style'; -import Paragraph from '../../common/Paragraph'; -import View from '../../common/View'; -import SankeyGraph from '../graphs/SankeyGraph'; -import Header from '../Header'; -import sankeySpreadsheet from '../spreadsheets/sankey-spreadsheet'; -import useReport from '../useReport'; +import { Paragraph } from '../../common/Paragraph'; +import { View } from '../../common/View'; +import { SankeyGraph } from '../graphs/SankeyGraph'; +import { Header } from '../Header'; +import { createSpreadsheet as sankeySpreadsheet } from '../spreadsheets/sankey-spreadsheet'; +import { useReport } from '../useReport'; import { fromDateRepr } from '../util'; -export default function Sankey() { +export function Sankey() { const { grouped: categoryGroups } = useCategories(); const { filters, diff --git a/packages/desktop-client/src/components/reports/reports/SankeyCard.jsx b/packages/desktop-client/src/components/reports/reports/SankeyCard.jsx index f79ec227260..492962c23c2 100644 --- a/packages/desktop-client/src/components/reports/reports/SankeyCard.jsx +++ b/packages/desktop-client/src/components/reports/reports/SankeyCard.jsx @@ -2,18 +2,18 @@ import React, { useMemo } from 'react'; import * as monthUtils from 'loot-core/src/shared/months'; -import useCategories from '../../../hooks/useCategories'; +import { useCategories } from '../../../hooks/useCategories'; import { styles } from '../../../style'; -import Block from '../../common/Block'; -import View from '../../common/View'; -import DateRange from '../DateRange'; -import SankeyGraph from '../graphs/SankeyGraph'; -import LoadingIndicator from '../LoadingIndicator'; -import ReportCard from '../ReportCard'; -import sankeySpreadsheet from '../spreadsheets/sankey-spreadsheet'; -import useReport from '../useReport'; +import { Block } from '../../common/Block'; +import { View } from '../../common/View'; +import { DateRange } from '../DateRange'; +import { SankeyGraph } from '../graphs/SankeyGraph'; +import { LoadingIndicator } from '../LoadingIndicator'; +import { ReportCard } from '../ReportCard'; +import { createSpreadsheet as sankeySpreadsheet } from '../spreadsheets/sankey-spreadsheet'; +import { useReport } from '../useReport'; -function SankeyCard() { +export function SankeyCard() { const { grouped: categoryGroups } = useCategories(); const end = monthUtils.currentMonth(); const start = monthUtils.subMonths(end, 5); @@ -47,5 +47,3 @@ function SankeyCard() { ); } - -export default SankeyCard; diff --git a/packages/desktop-client/src/components/reports/spreadsheets/calculateLegend.ts b/packages/desktop-client/src/components/reports/spreadsheets/calculateLegend.ts index 7ff756f4fcb..db55ead21b4 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/calculateLegend.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/calculateLegend.ts @@ -2,7 +2,7 @@ import { theme } from '../../../style'; import { getColorScale } from '../chart-theme'; import { type ItemEntity, type MonthData } from '../entities'; -function calculateLegend( +export function calculateLegend( monthData: MonthData[], calcDataFiltered: ItemEntity[], groupBy: string, @@ -27,5 +27,3 @@ function calculateLegend( }; }); } - -export default calculateLegend; diff --git a/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx b/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx index 5d874cb821a..70a736ea2bf 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx +++ b/packages/desktop-client/src/components/reports/spreadsheets/cash-flow-spreadsheet.tsx @@ -2,12 +2,12 @@ import React from 'react'; import * as d from 'date-fns'; -import q from 'loot-core/src/client/query-helpers'; import { send } from 'loot-core/src/platform/client/fetch'; import * as monthUtils from 'loot-core/src/shared/months'; +import { q } from 'loot-core/src/shared/query'; import { integerToCurrency, integerToAmount } from 'loot-core/src/shared/util'; -import AlignedText from '../../common/AlignedText'; +import { AlignedText } from '../../common/AlignedText'; import { runAll, indexCashFlow } from '../util'; export function simpleCashFlow(start, end) { diff --git a/packages/desktop-client/src/components/reports/spreadsheets/category-spending-spreadsheet.tsx b/packages/desktop-client/src/components/reports/spreadsheets/category-spending-spreadsheet.tsx index d4bb392eddf..8f45940b4cd 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/category-spending-spreadsheet.tsx +++ b/packages/desktop-client/src/components/reports/spreadsheets/category-spending-spreadsheet.tsx @@ -3,11 +3,12 @@ import React from 'react'; import * as d from 'date-fns'; import { rolloverBudget } from 'loot-core/src/client/queries'; -import q, { runQuery } from 'loot-core/src/client/query-helpers'; +import { runQuery } from 'loot-core/src/client/query-helpers'; import * as monthUtils from 'loot-core/src/shared/months'; +import { q } from 'loot-core/src/shared/query'; import { integerToAmount, integerToCurrency } from 'loot-core/src/shared/util'; -import AlignedText from '../../common/AlignedText'; +import { AlignedText } from '../../common/AlignedText'; type CategoryGraphDataForMonth = { x: number; @@ -39,7 +40,7 @@ type CategoryBudgetPerMonth = { [month: string]: CategoryBudgetForMonth; }; -export default function createSpreadsheet( +export function createSpreadsheet( start: string | null, end: string | null, numberOfMonthsAverage: number, diff --git a/packages/desktop-client/src/components/reports/spreadsheets/default-spreadsheet.ts b/packages/desktop-client/src/components/reports/spreadsheets/default-spreadsheet.ts index e26e1736090..0fde5493c09 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/default-spreadsheet.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/default-spreadsheet.ts @@ -14,10 +14,10 @@ import { import { categoryLists, groupBySelections } from '../ReportOptions'; -import calculateLegend from './calculateLegend'; -import filterHiddenItems from './filterHiddenItems'; -import makeQuery from './makeQuery'; -import recalculate from './recalculate'; +import { calculateLegend } from './calculateLegend'; +import { filterHiddenItems } from './filterHiddenItems'; +import { makeQuery } from './makeQuery'; +import { recalculate } from './recalculate'; export type createSpreadsheetProps = { startDate: string; @@ -37,7 +37,7 @@ export type createSpreadsheetProps = { graphType: string; }; -export default function createSpreadsheet({ +export function createSpreadsheet({ startDate, endDate, categories, diff --git a/packages/desktop-client/src/components/reports/spreadsheets/filterHiddenItems.ts b/packages/desktop-client/src/components/reports/spreadsheets/filterHiddenItems.ts index 0498ad09357..3b7d2dee3d8 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/filterHiddenItems.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/filterHiddenItems.ts @@ -3,7 +3,10 @@ import { type UncategorizedEntity, } from '../ReportOptions'; -function filterHiddenItems(item: UncategorizedEntity, data: QueryDataEntity[]) { +export function filterHiddenItems( + item: UncategorizedEntity, + data: QueryDataEntity[], +) { return data.filter(asset => { if (!item.uncategorized_id) { return true; @@ -20,5 +23,3 @@ function filterHiddenItems(item: UncategorizedEntity, data: QueryDataEntity[]) { return isTransfer && isHidden && isOffBudget; }); } - -export default filterHiddenItems; diff --git a/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts b/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts index 49e7bd82e53..968e6d5c338 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts @@ -6,11 +6,11 @@ import { integerToAmount } from 'loot-core/src/shared/util'; import { categoryLists } from '../ReportOptions'; import { type createSpreadsheetProps } from './default-spreadsheet'; -import filterHiddenItems from './filterHiddenItems'; -import makeQuery from './makeQuery'; -import recalculate from './recalculate'; +import { filterHiddenItems } from './filterHiddenItems'; +import { makeQuery } from './makeQuery'; +import { recalculate } from './recalculate'; -function createGroupedSpreadsheet({ +export function createGroupedSpreadsheet({ startDate, endDate, categories, @@ -85,7 +85,7 @@ function createGroupedSpreadsheet({ let groupedAssets = 0; let groupedDebts = 0; - group.categories.map(item => { + group.categories.forEach(item => { const monthAssets = filterHiddenItems(item, assets) .filter( asset => asset.date === month && asset.category === item.id, @@ -99,8 +99,6 @@ function createGroupedSpreadsheet({ ) .reduce((a, v) => (a = a + v.amount), 0); groupedDebts += monthDebts; - - return null; }); totalAssets += groupedAssets; @@ -146,5 +144,3 @@ function createGroupedSpreadsheet({ ); }; } - -export default createGroupedSpreadsheet; diff --git a/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts b/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts index 6d6ee2ca349..02e748f6d28 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts @@ -1,7 +1,7 @@ -import q from 'loot-core/src/client/query-helpers'; +import { q } from 'loot-core/src/shared/query'; import { type CategoryEntity } from 'loot-core/src/types/models'; -function makeQuery( +export function makeQuery( name: string, startDate: string, endDate: string, @@ -82,5 +82,3 @@ function makeQuery( { amount: { $sum: '$amount' } }, ]); } - -export default makeQuery; diff --git a/packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.ts b/packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.ts index 328f8354f03..bd5f9c3599e 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.ts @@ -1,8 +1,9 @@ import * as d from 'date-fns'; -import q, { runQuery } from 'loot-core/src/client/query-helpers'; +import { runQuery } from 'loot-core/src/client/query-helpers'; import { send } from 'loot-core/src/platform/client/fetch'; import * as monthUtils from 'loot-core/src/shared/months'; +import { q } from 'loot-core/src/shared/query'; import { integerToCurrency, integerToAmount, @@ -11,7 +12,7 @@ import { import { index } from '../util'; -export default function createSpreadsheet( +export function createSpreadsheet( start, end, accounts, diff --git a/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts b/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts index e6b516dfaef..1baf9d72c29 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts @@ -4,7 +4,7 @@ import { amountToInteger, integerToAmount } from 'loot-core/src/shared/util'; import { type QueryDataEntity } from '../ReportOptions'; -import filterHiddenItems from './filterHiddenItems'; +import { filterHiddenItems } from './filterHiddenItems'; type recalculateProps = { item; @@ -14,7 +14,7 @@ type recalculateProps = { groupByLabel: string; }; -function recalculate({ +export function recalculate({ item, months, assets, @@ -65,5 +65,3 @@ function recalculate({ monthData, }; } - -export default recalculate; diff --git a/packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts b/packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts index cafb5ae568f..88c929e7510 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts @@ -1,8 +1,9 @@ -import q, { runQuery } from 'loot-core/src/client/query-helpers'; +import { runQuery } from 'loot-core/src/client/query-helpers'; import { send } from 'loot-core/src/platform/client/fetch'; +import { q } from 'loot-core/src/shared/query'; import { integerToAmount } from 'loot-core/src/shared/util'; -export default function createSpreadsheet( +export function createSpreadsheet( start, end, categories, diff --git a/packages/desktop-client/src/components/reports/useReport.ts b/packages/desktop-client/src/components/reports/useReport.ts index 0e010d13517..f83f28e1237 100644 --- a/packages/desktop-client/src/components/reports/useReport.ts +++ b/packages/desktop-client/src/components/reports/useReport.ts @@ -2,7 +2,7 @@ import { useState, useEffect, type SetStateAction } from 'react'; import { useSpreadsheet } from 'loot-core/src/client/SpreadsheetProvider'; -function useReport( +export function useReport( sheetName: string, getData: ( spreadsheet: ReturnType, @@ -23,5 +23,3 @@ function useReport( }, [getData]); return results; } - -export default useReport; diff --git a/packages/desktop-client/src/components/responsive/PullToRefresh.tsx b/packages/desktop-client/src/components/responsive/PullToRefresh.tsx index 5dba845680d..20f4df91a65 100644 --- a/packages/desktop-client/src/components/responsive/PullToRefresh.tsx +++ b/packages/desktop-client/src/components/responsive/PullToRefresh.tsx @@ -5,7 +5,7 @@ import { css } from 'glamor'; type PullToRefreshProps = ComponentProps; -export default function PullToRefresh(props: PullToRefreshProps) { +export function PullToRefresh(props: PullToRefreshProps) { return (
void; }; -const RuleRow = memo( +export const RuleRow = memo( ({ rule, hovered, selected, onHover, onEditRule }: RuleRowProps) => { const dispatchSelected = useSelectedDispatch(); const borderColor = selected ? theme.tableBorderSelected : 'none'; @@ -93,7 +93,7 @@ const RuleRow = memo( - @@ -123,5 +123,3 @@ const RuleRow = memo( ); }, ); - -export default RuleRow; diff --git a/packages/desktop-client/src/components/rules/RulesHeader.tsx b/packages/desktop-client/src/components/rules/RulesHeader.tsx index a576c997ac3..c4dbfacf790 100644 --- a/packages/desktop-client/src/components/rules/RulesHeader.tsx +++ b/packages/desktop-client/src/components/rules/RulesHeader.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { useSelectedItems, useSelectedDispatch } from '../../hooks/useSelected'; import { SelectCell, Cell, TableHeader } from '../table'; -export default function RulesHeader() { +export function RulesHeader() { const selectedItems = useSelectedItems(); const dispatchSelected = useSelectedDispatch(); diff --git a/packages/desktop-client/src/components/rules/RulesList.tsx b/packages/desktop-client/src/components/rules/RulesList.tsx index c56b58cbf8f..2fab1d2fba7 100644 --- a/packages/desktop-client/src/components/rules/RulesList.tsx +++ b/packages/desktop-client/src/components/rules/RulesList.tsx @@ -2,9 +2,9 @@ import React from 'react'; import { type RuleEntity } from 'loot-core/src/types/models'; -import View from '../common/View'; +import { View } from '../common/View'; -import RuleRow from './RuleRow'; +import { RuleRow } from './RuleRow'; type RulesListProps = { rules: RuleEntity[]; @@ -14,7 +14,7 @@ type RulesListProps = { onEditRule?: (rule: RuleEntity) => void; }; -export default function RulesList({ +export function RulesList({ rules, selectedItems, hoveredRule, diff --git a/packages/desktop-client/src/components/rules/ScheduleValue.tsx b/packages/desktop-client/src/components/rules/ScheduleValue.tsx index dd256a563d2..b547adad834 100644 --- a/packages/desktop-client/src/components/rules/ScheduleValue.tsx +++ b/packages/desktop-client/src/components/rules/ScheduleValue.tsx @@ -6,13 +6,13 @@ import { describeSchedule } from 'loot-core/src/shared/schedules'; import { type ScheduleEntity } from 'loot-core/src/types/models'; import { SchedulesQuery } from './SchedulesQuery'; -import Value from './Value'; +import { Value } from './Value'; type ScheduleValueProps = { value: ScheduleEntity; }; -export default function ScheduleValue({ value }: ScheduleValueProps) { +export function ScheduleValue({ value }: ScheduleValueProps) { const payees = useSelector(state => state.queries.payees); const byId = getPayeesById(payees); const { data: schedules } = SchedulesQuery.useQuery(); diff --git a/packages/desktop-client/src/components/rules/SchedulesQuery.ts b/packages/desktop-client/src/components/rules/SchedulesQuery.ts index ff3b196b0c7..fef486a7919 100644 --- a/packages/desktop-client/src/components/rules/SchedulesQuery.ts +++ b/packages/desktop-client/src/components/rules/SchedulesQuery.ts @@ -1,4 +1,4 @@ -import q from 'loot-core/src/client/query-helpers'; import { liveQueryContext } from 'loot-core/src/client/query-hooks'; +import { q } from 'loot-core/src/shared/query'; export const SchedulesQuery = liveQueryContext(q('schedules').select('*')); diff --git a/packages/desktop-client/src/components/rules/SimpleTable.tsx b/packages/desktop-client/src/components/rules/SimpleTable.tsx index 836a9ef8523..688afeec118 100644 --- a/packages/desktop-client/src/components/rules/SimpleTable.tsx +++ b/packages/desktop-client/src/components/rules/SimpleTable.tsx @@ -1,43 +1,37 @@ -import React, { type ReactNode, useEffect, useRef } from 'react'; +import React, { type ReactNode, type UIEvent, useRef } from 'react'; import { type CSSProperties } from '../../style'; -import View from '../common/View'; +import { View } from '../common/View'; type SimpleTableProps = { - data: unknown; loadMore?: () => void; style?: CSSProperties; onHoverLeave?: () => void; children: ReactNode; }; -export default function SimpleTable({ - data, +export function SimpleTable({ loadMore, style, onHoverLeave, children, }: SimpleTableProps) { const contentRef = useRef(); - const contentHeight = useRef(); const scrollRef = useRef(); - function onScroll(e) { - if (contentHeight.current != null) { - if (loadMore && e.target.scrollTop > contentHeight.current - 750) { - loadMore(); - } + function onScroll(e: UIEvent) { + if ( + loadMore && + Math.abs( + e.currentTarget.scrollHeight - + e.currentTarget.clientHeight - + e.currentTarget.scrollTop, + ) < 1 + ) { + loadMore(); } } - useEffect(() => { - if (contentRef.current) { - contentHeight.current = contentRef.current.getBoundingClientRect().height; - } else { - contentHeight.current = null; - } - }, [contentRef.current, data]); - return ( = { value: T; @@ -22,7 +22,7 @@ type ValueProps = { style?: CSSProperties; }; -export default function Value({ +export function Value({ value, field, valueIsRaw, diff --git a/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsx b/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsx index 713397ed29b..8352dc20867 100644 --- a/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsx +++ b/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsx @@ -1,27 +1,29 @@ import React, { useState } from 'react'; import { useSelector } from 'react-redux'; -import q, { runQuery } from 'loot-core/src/client/query-helpers'; +import { runQuery } from 'loot-core/src/client/query-helpers'; import { send } from 'loot-core/src/platform/client/fetch'; +import { q } from 'loot-core/src/shared/query'; import { getRecurringDescription } from 'loot-core/src/shared/schedules'; import type { DiscoverScheduleEntity } from 'loot-core/src/types/models'; import type { BoundActions } from '../../hooks/useActions'; -import useSelected, { +import { + useSelected, useSelectedDispatch, useSelectedItems, SelectedProvider, } from '../../hooks/useSelected'; -import useSendPlatformRequest from '../../hooks/useSendPlatformRequest'; +import { useSendPlatformRequest } from '../../hooks/useSendPlatformRequest'; import { theme } from '../../style'; import type { CommonModalProps } from '../../types/modals'; import { ButtonWithLoading } from '../common/Button'; -import Modal from '../common/Modal'; -import Paragraph from '../common/Paragraph'; -import Stack from '../common/Stack'; -import View from '../common/View'; +import { Modal } from '../common/Modal'; +import { Paragraph } from '../common/Paragraph'; +import { Stack } from '../common/Stack'; +import { View } from '../common/View'; import { Table, TableHeader, Row, Field, SelectCell } from '../table'; -import DisplayId from '../util/DisplayId'; +import { DisplayId } from '../util/DisplayId'; import { ScheduleAmountCell } from './SchedulesTable'; @@ -123,7 +125,7 @@ function DiscoverSchedulesTable({ ); } -export default function DiscoverSchedules({ +export function DiscoverSchedules({ modalProps, actions, }: { diff --git a/packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx b/packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx index 48c5c2d2edd..e4114113d06 100644 --- a/packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx +++ b/packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx @@ -4,14 +4,14 @@ import { useLocation } from 'react-router-dom'; import { send } from 'loot-core/src/platform/client/fetch'; import { theme } from '../../style'; -import Button from '../common/Button'; -import Modal from '../common/Modal'; -import Paragraph from '../common/Paragraph'; -import Stack from '../common/Stack'; -import Text from '../common/Text'; -import DisplayId from '../util/DisplayId'; +import { Button } from '../common/Button'; +import { Modal } from '../common/Modal'; +import { Paragraph } from '../common/Paragraph'; +import { Stack } from '../common/Stack'; +import { Text } from '../common/Text'; +import { DisplayId } from '../util/DisplayId'; -export default function PostsOfflineNotification({ modalProps, actions }) { +export function PostsOfflineNotification({ modalProps, actions }) { const location = useLocation(); const payees = (location.state && location.state.payees) || []; diff --git a/packages/desktop-client/src/components/schedules/EditSchedule.jsx b/packages/desktop-client/src/components/schedules/ScheduleDetails.jsx similarity index 96% rename from packages/desktop-client/src/components/schedules/EditSchedule.jsx rename to packages/desktop-client/src/components/schedules/ScheduleDetails.jsx index 5beaa5968c8..8459e937c03 100644 --- a/packages/desktop-client/src/components/schedules/EditSchedule.jsx +++ b/packages/desktop-client/src/components/schedules/ScheduleDetails.jsx @@ -3,28 +3,29 @@ import { useDispatch, useSelector } from 'react-redux'; import { pushModal } from 'loot-core/src/client/actions/modals'; import { useCachedPayees } from 'loot-core/src/client/data-hooks/payees'; -import q, { runQuery, liveQuery } from 'loot-core/src/client/query-helpers'; +import { runQuery, liveQuery } from 'loot-core/src/client/query-helpers'; import { send, sendCatch } from 'loot-core/src/platform/client/fetch'; import * as monthUtils from 'loot-core/src/shared/months'; +import { q } from 'loot-core/src/shared/query'; import { extractScheduleConds } from 'loot-core/src/shared/schedules'; -import useSelected, { SelectedProvider } from '../../hooks/useSelected'; +import { useSelected, SelectedProvider } from '../../hooks/useSelected'; import { theme } from '../../style'; -import AccountAutocomplete from '../autocomplete/AccountAutocomplete'; -import PayeeAutocomplete from '../autocomplete/PayeeAutocomplete'; -import Button from '../common/Button'; -import Modal from '../common/Modal'; -import Stack from '../common/Stack'; -import Text from '../common/Text'; -import View from '../common/View'; +import { AccountAutocomplete } from '../autocomplete/AccountAutocomplete'; +import { PayeeAutocomplete } from '../autocomplete/PayeeAutocomplete'; +import { Button } from '../common/Button'; +import { Modal } from '../common/Modal'; +import { Stack } from '../common/Stack'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { FormField, FormLabel, Checkbox } from '../forms'; import { OpSelect } from '../modals/EditRule'; -import DateSelect from '../select/DateSelect'; -import RecurringSchedulePicker from '../select/RecurringSchedulePicker'; +import { DateSelect } from '../select/DateSelect'; +import { RecurringSchedulePicker } from '../select/RecurringSchedulePicker'; import { SelectedItemsButton } from '../table'; -import SimpleTransactionsTable from '../transactions/SimpleTransactionsTable'; +import { SimpleTransactionsTable } from '../transactions/SimpleTransactionsTable'; import { AmountInput, BetweenAmountInput } from '../util/AmountInput'; -import GenericInput from '../util/GenericInput'; +import { GenericInput } from '../util/GenericInput'; function updateScheduleConditions(schedule, fields) { const conds = extractScheduleConds(schedule._conditions); @@ -66,7 +67,7 @@ function updateScheduleConditions(schedule, fields) { }; } -export default function ScheduleDetails({ modalProps, actions, id }) { +export function ScheduleDetails({ modalProps, actions, id }) { const adding = id == null; const payees = useCachedPayees({ idKey: true }); const globalDispatch = useDispatch(); diff --git a/packages/desktop-client/src/components/schedules/LinkSchedule.tsx b/packages/desktop-client/src/components/schedules/ScheduleLink.tsx similarity index 92% rename from packages/desktop-client/src/components/schedules/LinkSchedule.tsx rename to packages/desktop-client/src/components/schedules/ScheduleLink.tsx index dc83aa1103a..3c3964508ad 100644 --- a/packages/desktop-client/src/components/schedules/LinkSchedule.tsx +++ b/packages/desktop-client/src/components/schedules/ScheduleLink.tsx @@ -6,14 +6,14 @@ import { type Query } from 'loot-core/src/shared/query'; import { type BoundActions } from '../../hooks/useActions'; import { type CommonModalProps } from '../../types/modals'; -import Modal from '../common/Modal'; -import Search from '../common/Search'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Modal } from '../common/Modal'; +import { Search } from '../common/Search'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { ROW_HEIGHT, SchedulesTable } from './SchedulesTable'; -export default function ScheduleLink({ +export function ScheduleLink({ modalProps, actions, transactionIds: ids, diff --git a/packages/desktop-client/src/components/schedules/SchedulesTable.tsx b/packages/desktop-client/src/components/schedules/SchedulesTable.tsx index 149cb6fd188..e6559bed99b 100644 --- a/packages/desktop-client/src/components/schedules/SchedulesTable.tsx +++ b/packages/desktop-client/src/components/schedules/SchedulesTable.tsx @@ -12,17 +12,17 @@ import { getScheduledAmount } from 'loot-core/src/shared/schedules'; import { integerToCurrency } from 'loot-core/src/shared/util'; import { type ScheduleEntity } from 'loot-core/src/types/models'; -import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple'; -import Check from '../../icons/v2/Check'; +import { SvgDotsHorizontalTriple } from '../../icons/v1'; +import { SvgCheck } from '../../icons/v2'; import { theme } from '../../style'; -import Button from '../common/Button'; -import Menu from '../common/Menu'; -import Text from '../common/Text'; -import View from '../common/View'; -import PrivacyFilter from '../PrivacyFilter'; +import { Button } from '../common/Button'; +import { Menu } from '../common/Menu'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; +import { PrivacyFilter } from '../PrivacyFilter'; import { Table, TableHeader, Row, Field, Cell } from '../table'; import { Tooltip } from '../tooltips'; -import DisplayId from '../util/DisplayId'; +import { DisplayId } from '../util/DisplayId'; import { StatusBadge } from './StatusBadge'; @@ -104,7 +104,7 @@ function OverflowMenu({ setOpen(true); }} > - setOpen(false)} > { + onMenuSelect={name => { onAction(name, schedule.id); setOpen(false); }} @@ -297,7 +297,7 @@ export function SchedulesTable({ {!minimal && ( {schedule._date && schedule._date.frequency && ( - + )} )} diff --git a/packages/desktop-client/src/components/schedules/StatusBadge.tsx b/packages/desktop-client/src/components/schedules/StatusBadge.tsx index 1b018e48361..ef95897853c 100644 --- a/packages/desktop-client/src/components/schedules/StatusBadge.tsx +++ b/packages/desktop-client/src/components/schedules/StatusBadge.tsx @@ -3,17 +3,19 @@ import React from 'react'; import { type ScheduleStatusType } from 'loot-core/src/client/data-hooks/schedules'; import { titleFirst } from 'loot-core/src/shared/util'; -import AlertTriangle from '../../icons/v2/AlertTriangle'; -import CalendarIcon from '../../icons/v2/Calendar'; -import CheckCircle1 from '../../icons/v2/CheckCircle1'; -import CheckCircleHollow from '../../icons/v2/CheckCircleHollow'; -import EditSkull1 from '../../icons/v2/EditSkull1'; -import FavoriteStar from '../../icons/v2/FavoriteStar'; -import Lock from '../../icons/v2/LockClosed'; -import ValidationCheck from '../../icons/v2/ValidationCheck'; +import { + SvgAlertTriangle, + SvgCalendar, + SvgCheckCircle1, + SvgCheckCircleHollow, + SvgEditSkull1, + SvgFavoriteStar, + SvgLockClosed, + SvgValidationCheck, +} from '../../icons/v2'; import { theme } from '../../style'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; // Consists of Schedule Statuses + Transaction statuses type StatusTypes = ScheduleStatusType | 'cleared' | 'pending' | 'reconciled'; @@ -23,61 +25,61 @@ export function getStatusProps(status: StatusTypes) { return { color: theme.errorTextDarker, backgroundColor: theme.errorBackground, - Icon: EditSkull1, + Icon: SvgEditSkull1, }; case 'due': return { color: theme.warningTextDark, backgroundColor: theme.warningBackground, - Icon: AlertTriangle, + Icon: SvgAlertTriangle, }; case 'upcoming': return { color: theme.upcomingText, backgroundColor: theme.upcomingBackground, - Icon: CalendarIcon, + Icon: SvgCalendar, }; case 'paid': return { color: theme.noticeText, backgroundColor: theme.noticeBackgroundLight, - Icon: ValidationCheck, + Icon: SvgValidationCheck, }; case 'completed': return { color: theme.tableHeaderText, backgroundColor: theme.tableRowHeaderBackground, - Icon: FavoriteStar, + Icon: SvgFavoriteStar, }; case 'pending': return { color: theme.noticeTextLight, backgroundColor: theme.noticeBackgroundLight, - Icon: CalendarIcon, + Icon: SvgCalendar, }; case 'scheduled': return { color: theme.tableRowHeaderText, backgroundColor: theme.tableRowHeaderBackground, - Icon: CalendarIcon, + Icon: SvgCalendar, }; case 'cleared': return { color: theme.noticeTextLight, backgroundColor: theme.tableRowHeaderBackground, - Icon: CheckCircle1, + Icon: SvgCheckCircle1, }; case 'reconciled': return { color: theme.noticeTextLight, backgroundColor: theme.tableRowHeaderBackground, - Icon: Lock, + Icon: SvgLockClosed, }; default: return { color: theme.buttonNormalDisabledText, backgroundColor: theme.tableRowHeaderBackground, - Icon: CheckCircleHollow, + Icon: SvgCheckCircleHollow, }; } } diff --git a/packages/desktop-client/src/components/schedules/index.tsx b/packages/desktop-client/src/components/schedules/index.tsx index a4fb235e77d..d04809cbd04 100644 --- a/packages/desktop-client/src/components/schedules/index.tsx +++ b/packages/desktop-client/src/components/schedules/index.tsx @@ -6,14 +6,14 @@ import { type ScheduleEntity } from 'loot-core/src/types/models'; import { useActions } from '../../hooks/useActions'; import { theme } from '../../style'; -import Button from '../common/Button'; -import Search from '../common/Search'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Search } from '../common/Search'; +import { View } from '../common/View'; import { Page } from '../Page'; import { SchedulesTable, type ScheduleItemAction } from './SchedulesTable'; -export default function Schedules() { +export function Schedules() { const { pushModal } = useActions(); const [filter, setFilter] = useState(''); diff --git a/packages/desktop-client/src/components/select/DateSelect.tsx b/packages/desktop-client/src/components/select/DateSelect.tsx index 0e3754bf2cc..d1438bf09c0 100644 --- a/packages/desktop-client/src/components/select/DateSelect.tsx +++ b/packages/desktop-client/src/components/select/DateSelect.tsx @@ -26,8 +26,8 @@ import { import { stringToInteger } from 'loot-core/src/shared/util'; import { type CSSProperties, theme } from '../../style'; -import Input, { type InputProps } from '../common/Input'; -import View, { type ViewProps } from '../common/View'; +import { Input, type InputProps } from '../common/Input'; +import { View, type ViewProps } from '../common/View'; import { Tooltip } from '../tooltips'; import DateSelectLeft from './DateSelect.left.png'; @@ -184,7 +184,7 @@ type DateSelectProps = { onSelect: (selectedDate: string) => void; }; -export default function DateSelect({ +export function DateSelect({ containerProps, inputProps, tooltipStyle, diff --git a/packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx b/packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx index 0bfd696308d..8db4a940ae6 100644 --- a/packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx +++ b/packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx @@ -5,19 +5,18 @@ import { sendCatch } from 'loot-core/src/platform/client/fetch'; import * as monthUtils from 'loot-core/src/shared/months'; import { getRecurringDescription } from 'loot-core/src/shared/schedules'; -import AddIcon from '../../icons/v0/Add'; -import SubtractIcon from '../../icons/v0/Subtract'; +import { SvgAdd, SvgSubtract } from '../../icons/v0'; import { theme } from '../../style'; -import Button from '../common/Button'; -import Input from '../common/Input'; -import Select from '../common/Select'; -import Stack from '../common/Stack'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Input } from '../common/Input'; +import { Select } from '../common/Select'; +import { Stack } from '../common/Stack'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { Checkbox } from '../forms'; import { useTooltip, Tooltip } from '../tooltips'; -import DateSelect from './DateSelect'; +import { DateSelect } from './DateSelect'; // ex: There is no 6th Friday of the Month const MAX_DAY_OF_WEEK_INTERVAL = 5; @@ -256,7 +255,7 @@ function MonthlyPatterns({ config, dispatch }) { }) } > - + ))} @@ -479,11 +478,7 @@ function RecurringScheduleTooltip({ config: currentConfig, onClose, onSave }) { ); } -export default function RecurringSchedulePicker({ - value, - buttonStyle, - onChange, -}) { +export function RecurringSchedulePicker({ value, buttonStyle, onChange }) { const { isOpen, close, getOpenEvents } = useTooltip(); const dateFormat = useSelector( state => state.prefs.local.dateFormat || 'MM/dd/yyyy', diff --git a/packages/desktop-client/src/components/settings/Encryption.tsx b/packages/desktop-client/src/components/settings/Encryption.tsx index 9c5636793b6..4ed788ede6c 100644 --- a/packages/desktop-client/src/components/settings/Encryption.tsx +++ b/packages/desktop-client/src/components/settings/Encryption.tsx @@ -3,14 +3,14 @@ import { useSelector } from 'react-redux'; import { useActions } from '../../hooks/useActions'; import { theme } from '../../style'; -import Button from '../common/Button'; -import ExternalLink from '../common/ExternalLink'; -import Text from '../common/Text'; +import { Button } from '../common/Button'; +import { ExternalLink } from '../common/ExternalLink'; +import { Text } from '../common/Text'; import { useServerURL } from '../ServerContext'; import { Setting } from './UI'; -export default function EncryptionSettings() { +export function EncryptionSettings() { const { pushModal } = useActions(); const serverURL = useServerURL(); const encryptKeyId = useSelector(state => state.prefs.local.encryptKeyId); diff --git a/packages/desktop-client/src/components/settings/Experimental.tsx b/packages/desktop-client/src/components/settings/Experimental.tsx index e82840a4a77..273c1c21671 100644 --- a/packages/desktop-client/src/components/settings/Experimental.tsx +++ b/packages/desktop-client/src/components/settings/Experimental.tsx @@ -4,11 +4,11 @@ import { useSelector } from 'react-redux'; import type { FeatureFlag } from 'loot-core/src/types/prefs'; import { useActions } from '../../hooks/useActions'; -import useFeatureFlag from '../../hooks/useFeatureFlag'; +import { useFeatureFlag } from '../../hooks/useFeatureFlag'; import { theme } from '../../style'; -import LinkButton from '../common/LinkButton'; -import Text from '../common/Text'; -import View from '../common/View'; +import { LinkButton } from '../common/LinkButton'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { Checkbox } from '../forms'; import { Setting } from './UI'; @@ -75,7 +75,7 @@ function ReportBudgetFeature() { ); } -export default function ExperimentalFeatures() { +export function ExperimentalFeatures() { const [expanded, setExpanded] = useState(false); return ( diff --git a/packages/desktop-client/src/components/settings/Export.tsx b/packages/desktop-client/src/components/settings/Export.tsx index ee3f8864f05..c3e46493b7a 100644 --- a/packages/desktop-client/src/components/settings/Export.tsx +++ b/packages/desktop-client/src/components/settings/Export.tsx @@ -6,13 +6,13 @@ import { format } from 'date-fns'; import { send } from 'loot-core/src/platform/client/fetch'; import { theme } from '../../style'; -import Block from '../common/Block'; +import { Block } from '../common/Block'; import { ButtonWithLoading } from '../common/Button'; -import Text from '../common/Text'; +import { Text } from '../common/Text'; import { Setting } from './UI'; -export default function ExportBudget() { +export function ExportBudget() { const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(null); const budgetId = useSelector(state => state.prefs.local.id); diff --git a/packages/desktop-client/src/components/settings/FixSplits.tsx b/packages/desktop-client/src/components/settings/FixSplits.tsx index 85c71fd3522..3352f0c5d9a 100644 --- a/packages/desktop-client/src/components/settings/FixSplits.tsx +++ b/packages/desktop-client/src/components/settings/FixSplits.tsx @@ -5,9 +5,9 @@ import { type Handlers } from 'loot-core/src/types/handlers'; import { theme } from '../../style'; import { ButtonWithLoading } from '../common/Button'; -import Paragraph from '../common/Paragraph'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Paragraph } from '../common/Paragraph'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { Setting } from './UI'; @@ -51,7 +51,7 @@ function renderResults(results: Results) { ); } -export default function FixSplitsTool() { +export function FixSplits() { const [loading, setLoading] = useState(false); const [results, setResults] = useState(null); diff --git a/packages/desktop-client/src/components/settings/Format.tsx b/packages/desktop-client/src/components/settings/Format.tsx index 995d2af3fa8..43ea10cfc6e 100644 --- a/packages/desktop-client/src/components/settings/Format.tsx +++ b/packages/desktop-client/src/components/settings/Format.tsx @@ -5,11 +5,11 @@ import { numberFormats } from 'loot-core/src/shared/util'; import { type LocalPrefs } from 'loot-core/src/types/prefs'; import { useActions } from '../../hooks/useActions'; -import tokens from '../../tokens'; -import Button from '../common/Button'; -import Select from '../common/Select'; -import Text from '../common/Text'; -import View from '../common/View'; +import { tokens } from '../../tokens'; +import { Button } from '../common/Button'; +import { Select } from '../common/Select'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { Checkbox } from '../forms'; import { useSidebar } from '../sidebar'; @@ -52,7 +52,7 @@ function Column({ title, children }: { title: string; children: ReactNode }) { ); } -export default function FormatSettings() { +export function FormatSettings() { const { savePrefs } = useActions(); const sidebar = useSidebar(); diff --git a/packages/desktop-client/src/components/settings/Global.tsx b/packages/desktop-client/src/components/settings/Global.tsx index 0a28d43d1c9..96a8c4090bc 100644 --- a/packages/desktop-client/src/components/settings/Global.tsx +++ b/packages/desktop-client/src/components/settings/Global.tsx @@ -4,13 +4,13 @@ import { useSelector } from 'react-redux'; import { useActions } from '../../hooks/useActions'; import { theme } from '../../style'; import { Information } from '../alerts'; -import Button from '../common/Button'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { Setting } from './UI'; -export default function GlobalSettings() { +export function GlobalSettings() { const documentDir = useSelector(state => state.prefs.global.documentDir); const { saveGlobalPrefs } = useActions(); diff --git a/packages/desktop-client/src/components/settings/Reset.tsx b/packages/desktop-client/src/components/settings/Reset.tsx index 189e5a11973..fd8875a844f 100644 --- a/packages/desktop-client/src/components/settings/Reset.tsx +++ b/packages/desktop-client/src/components/settings/Reset.tsx @@ -5,7 +5,7 @@ import { send } from 'loot-core/src/platform/client/fetch'; import { useActions } from '../../hooks/useActions'; import { ButtonWithLoading } from '../common/Button'; -import Text from '../common/Text'; +import { Text } from '../common/Text'; import { Setting } from './UI'; diff --git a/packages/desktop-client/src/components/settings/Themes.tsx b/packages/desktop-client/src/components/settings/Themes.tsx index c43a1447e2c..775ef525340 100644 --- a/packages/desktop-client/src/components/settings/Themes.tsx +++ b/packages/desktop-client/src/components/settings/Themes.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { useActions } from '../../hooks/useActions'; import { themeOptions, useTheme } from '../../style'; -import Button from '../common/Button'; -import Select from '../common/Select'; -import Text from '../common/Text'; +import { Button } from '../common/Button'; +import { Select } from '../common/Select'; +import { Text } from '../common/Text'; import { Setting } from './UI'; -export default function ThemeSettings() { +export function ThemeSettings() { const theme = useTheme(); const { saveGlobalPrefs } = useActions(); diff --git a/packages/desktop-client/src/components/settings/UI.tsx b/packages/desktop-client/src/components/settings/UI.tsx index 60adc092c40..ab09721b633 100644 --- a/packages/desktop-client/src/components/settings/UI.tsx +++ b/packages/desktop-client/src/components/settings/UI.tsx @@ -4,9 +4,9 @@ import { useLocation } from 'react-router-dom'; import { css, media } from 'glamor'; import { type CSSProperties, theme } from '../../style'; -import tokens from '../../tokens'; -import Button from '../common/Button'; -import View from '../common/View'; +import { tokens } from '../../tokens'; +import { Button } from '../common/Button'; +import { View } from '../common/View'; type SettingProps = { primaryAction?: ReactNode; diff --git a/packages/desktop-client/src/components/settings/index.tsx b/packages/desktop-client/src/components/settings/index.tsx index eb8cefd0a9c..73afbec5ba0 100644 --- a/packages/desktop-client/src/components/settings/index.tsx +++ b/packages/desktop-client/src/components/settings/index.tsx @@ -7,28 +7,28 @@ import * as Platform from 'loot-core/src/client/platform'; import { listen } from 'loot-core/src/platform/client/fetch'; import { useActions } from '../../hooks/useActions'; -import useLatestVersion, { useIsOutdated } from '../../hooks/useLatestVersion'; +import { useLatestVersion, useIsOutdated } from '../../hooks/useLatestVersion'; import { useSetThemeColor } from '../../hooks/useSetThemeColor'; import { useResponsive } from '../../ResponsiveProvider'; import { theme } from '../../style'; -import tokens from '../../tokens'; -import Button from '../common/Button'; -import ExternalLink from '../common/ExternalLink'; -import Input from '../common/Input'; -import Text from '../common/Text'; -import View from '../common/View'; +import { tokens } from '../../tokens'; +import { Button } from '../common/Button'; +import { ExternalLink } from '../common/ExternalLink'; +import { Input } from '../common/Input'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { FormField, FormLabel } from '../forms'; import { Page } from '../Page'; import { useServerVersion } from '../ServerContext'; -import EncryptionSettings from './Encryption'; -import ExperimentalFeatures from './Experimental'; -import ExportBudget from './Export'; -import FixSplitsTool from './FixSplits'; -import FormatSettings from './Format'; -import GlobalSettings from './Global'; +import { EncryptionSettings } from './Encryption'; +import { ExperimentalFeatures } from './Experimental'; +import { ExportBudget } from './Export'; +import { FixSplits } from './FixSplits'; +import { FormatSettings } from './Format'; +import { GlobalSettings } from './Global'; import { ResetCache, ResetSync } from './Reset'; -import ThemeSettings from './Themes'; +import { ThemeSettings } from './Themes'; import { AdvancedToggle, Setting } from './UI'; function About() { @@ -116,7 +116,7 @@ function AdvancedAbout() { ); } -export default function Settings() { +export function Settings() { const floatingSidebar = useSelector( state => state.prefs.global.floatingSidebar, ); @@ -175,7 +175,7 @@ export default function Settings() { - + diff --git a/packages/desktop-client/src/components/sidebar/Account.tsx b/packages/desktop-client/src/components/sidebar/Account.tsx index d0f7ef70105..d079d6d6287 100644 --- a/packages/desktop-client/src/components/sidebar/Account.tsx +++ b/packages/desktop-client/src/components/sidebar/Account.tsx @@ -5,9 +5,9 @@ import { css } from 'glamor'; import { type AccountEntity } from 'loot-core/src/types/models'; import { styles, theme, type CSSProperties } from '../../style'; -import AlignedText from '../common/AlignedText'; -import AnchorLink from '../common/AnchorLink'; -import View from '../common/View'; +import { AlignedText } from '../common/AlignedText'; +import { AnchorLink } from '../common/AnchorLink'; +import { View } from '../common/View'; import { useDraggable, useDroppable, @@ -16,7 +16,7 @@ import { type OnDropCallback, } from '../sort'; import { type Binding } from '../spreadsheet'; -import CellValue from '../spreadsheet/CellValue'; +import { CellValue } from '../spreadsheet/CellValue'; export const accountNameStyle: CSSProperties = { marginTop: -2, @@ -45,7 +45,7 @@ type AccountProps = { onDrop?: OnDropCallback; }; -function Account({ +export function Account({ name, account, connected, @@ -144,5 +144,3 @@ function Account({ ); } - -export default Account; diff --git a/packages/desktop-client/src/components/sidebar/Accounts.tsx b/packages/desktop-client/src/components/sidebar/Accounts.tsx index e15559709b2..245f6212fc7 100644 --- a/packages/desktop-client/src/components/sidebar/Accounts.tsx +++ b/packages/desktop-client/src/components/sidebar/Accounts.tsx @@ -2,13 +2,13 @@ import React, { useState, useMemo } from 'react'; import { type AccountEntity } from 'loot-core/src/types/models'; -import Add from '../../icons/v1/Add'; -import View from '../common/View'; +import { SvgAdd } from '../../icons/v1'; +import { View } from '../common/View'; import { type OnDropCallback } from '../sort'; import { type Binding } from '../spreadsheet'; -import Account from './Account'; -import SecondaryItem from './SecondaryItem'; +import { Account } from './Account'; +import { SecondaryItem } from './SecondaryItem'; const fontWeight = 600; @@ -36,7 +36,7 @@ type AccountsProps = { onReorder: OnDropCallback; }; -function Accounts({ +export function Accounts({ accounts, failedAccounts, updatedAccounts, @@ -174,11 +174,9 @@ function Accounts({ marginBottom: 9, }} onClick={onAddAccount} - Icon={Add} + Icon={SvgAdd} title="Add account" /> ); } - -export default Accounts; diff --git a/packages/desktop-client/src/components/sidebar/Item.tsx b/packages/desktop-client/src/components/sidebar/Item.tsx index 043e44d4123..3c6a1c4f0f6 100644 --- a/packages/desktop-client/src/components/sidebar/Item.tsx +++ b/packages/desktop-client/src/components/sidebar/Item.tsx @@ -6,10 +6,10 @@ import React, { } from 'react'; import { styles, theme, type CSSProperties } from '../../style'; -import Block from '../common/Block'; -import View from '../common/View'; +import { Block } from '../common/Block'; +import { View } from '../common/View'; -import ItemContent from './ItemContent'; +import { ItemContent } from './ItemContent'; type ItemProps = { title: string; @@ -25,7 +25,7 @@ type ItemProps = { forceActive?: boolean; }; -function Item({ +export function Item({ children, Icon, title, @@ -83,5 +83,3 @@ function Item({ ); } - -export default Item; diff --git a/packages/desktop-client/src/components/sidebar/ItemContent.tsx b/packages/desktop-client/src/components/sidebar/ItemContent.tsx index 3724a0a22e5..6a4a50423bc 100644 --- a/packages/desktop-client/src/components/sidebar/ItemContent.tsx +++ b/packages/desktop-client/src/components/sidebar/ItemContent.tsx @@ -1,8 +1,8 @@ import React, { type MouseEventHandler, type ReactNode } from 'react'; import { type CSSProperties } from '../../style'; -import AnchorLink from '../common/AnchorLink'; -import View from '../common/View'; +import { AnchorLink } from '../common/AnchorLink'; +import { View } from '../common/View'; type ItemContentProps = { style: CSSProperties; @@ -13,7 +13,7 @@ type ItemContentProps = { forceActive?: boolean; }; -function ItemContent({ +export function ItemContent({ style, to, onClick, @@ -43,5 +43,3 @@ function ItemContent({ ); } - -export default ItemContent; diff --git a/packages/desktop-client/src/components/sidebar/SecondaryItem.tsx b/packages/desktop-client/src/components/sidebar/SecondaryItem.tsx index 0780acbfb4e..0203532e68f 100644 --- a/packages/desktop-client/src/components/sidebar/SecondaryItem.tsx +++ b/packages/desktop-client/src/components/sidebar/SecondaryItem.tsx @@ -5,11 +5,11 @@ import React, { } from 'react'; import { theme, type CSSProperties } from '../../style'; -import Block from '../common/Block'; -import View from '../common/View'; +import { Block } from '../common/Block'; +import { View } from '../common/View'; import { accountNameStyle } from './Account'; -import ItemContent from './ItemContent'; +import { ItemContent } from './ItemContent'; const fontWeight = 600; @@ -25,7 +25,7 @@ type SecondaryItemProps = { indent?: number; }; -function SecondaryItem({ +export function SecondaryItem({ Icon, title, style, @@ -73,5 +73,3 @@ function SecondaryItem({ ); } - -export default SecondaryItem; diff --git a/packages/desktop-client/src/components/sidebar/Sidebar.tsx b/packages/desktop-client/src/components/sidebar/Sidebar.tsx index c6aa9435979..dadd3ba95fc 100644 --- a/packages/desktop-client/src/components/sidebar/Sidebar.tsx +++ b/packages/desktop-client/src/components/sidebar/Sidebar.tsx @@ -3,18 +3,17 @@ import React, { type ReactNode } from 'react'; import * as Platform from 'loot-core/src/client/platform'; import { type AccountEntity } from 'loot-core/src/types/models'; -import Reports from '../../icons/v1/Reports'; -import Wallet from '../../icons/v1/Wallet'; -import CalendarIcon from '../../icons/v2/Calendar'; +import { SvgReports, SvgWallet } from '../../icons/v1'; +import { SvgCalendar } from '../../icons/v2'; import { type CSSProperties, theme } from '../../style'; -import View from '../common/View'; +import { View } from '../common/View'; import { type OnDropCallback } from '../sort'; import { type Binding } from '../spreadsheet'; -import Accounts from './Accounts'; -import Item from './Item'; -import ToggleButton from './ToggleButton'; -import Tools from './Tools'; +import { Accounts } from './Accounts'; +import { Item } from './Item'; +import { ToggleButton } from './ToggleButton'; +import { Tools } from './Tools'; import { useSidebar } from '.'; @@ -44,7 +43,7 @@ type SidebarProps = { onReorder: OnDropCallback; }; -function Sidebar({ +export function Sidebar({ style, budgetName, accounts, @@ -107,10 +106,10 @@ function Sidebar({ - - + + - + @@ -144,5 +143,3 @@ function Sidebar({ ); } - -export default Sidebar; diff --git a/packages/desktop-client/src/components/sidebar/SidebarWithData.tsx b/packages/desktop-client/src/components/sidebar/SidebarWithData.tsx index 3ea71ba13f9..34886999c92 100644 --- a/packages/desktop-client/src/components/sidebar/SidebarWithData.tsx +++ b/packages/desktop-client/src/components/sidebar/SidebarWithData.tsx @@ -8,17 +8,17 @@ import { send } from 'loot-core/src/platform/client/fetch'; import { type LocalPrefs } from 'loot-core/src/types/prefs'; import { useActions } from '../../hooks/useActions'; -import useNavigate from '../../hooks/useNavigate'; -import ExpandArrow from '../../icons/v0/ExpandArrow'; +import { useNavigate } from '../../hooks/useNavigate'; +import { SvgExpandArrow } from '../../icons/v0'; import { styles, theme } from '../../style'; -import Button from '../common/Button'; -import InitialFocus from '../common/InitialFocus'; -import Input from '../common/Input'; -import Menu from '../common/Menu'; -import Text from '../common/Text'; +import { Button } from '../common/Button'; +import { InitialFocus } from '../common/InitialFocus'; +import { Input } from '../common/Input'; +import { Menu } from '../common/Menu'; +import { Text } from '../common/Text'; import { Tooltip } from '../tooltips'; -import Sidebar from './Sidebar'; +import { Sidebar } from './Sidebar'; type EditableBudgetNameProps = { prefs: LocalPrefs; @@ -98,7 +98,7 @@ function EditableBudgetName({ prefs, savePrefs }: EditableBudgetNameProps) { {prefs.budgetName || 'A budget has no name'} - + {menuOpen && ( state.queries.accounts); const failedAccounts = useSelector(state => state.account.failedAccounts); const updatedAccounts = useSelector(state => state.queries.updatedAccounts); @@ -164,5 +164,3 @@ function SidebarWithData() { /> ); } - -export default SidebarWithData; diff --git a/packages/desktop-client/src/components/sidebar/ToggleButton.tsx b/packages/desktop-client/src/components/sidebar/ToggleButton.tsx index 69c7dfe4486..68375191e5d 100644 --- a/packages/desktop-client/src/components/sidebar/ToggleButton.tsx +++ b/packages/desktop-client/src/components/sidebar/ToggleButton.tsx @@ -1,10 +1,10 @@ import React, { type MouseEventHandler } from 'react'; -import Pin from '../../icons/v1/Pin'; -import ArrowButtonLeft1 from '../../icons/v2/ArrowButtonLeft1'; +import { SvgPin } from '../../icons/v1'; +import { SvgArrowButtonLeft1 } from '../../icons/v2'; import { type CSSProperties, theme } from '../../style'; -import Button from '../common/Button'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { View } from '../common/View'; type ToggleButtonProps = { isFloating: boolean; @@ -12,7 +12,11 @@ type ToggleButtonProps = { style?: CSSProperties; }; -function ToggleButton({ style, isFloating, onFloat }: ToggleButtonProps) { +export function ToggleButton({ + style, + isFloating, + onFloat, +}: ToggleButtonProps) { return ( ); } - -export default ToggleButton; diff --git a/packages/desktop-client/src/components/sidebar/Tools.tsx b/packages/desktop-client/src/components/sidebar/Tools.tsx index e8bad134a41..1b6b2c2399d 100644 --- a/packages/desktop-client/src/components/sidebar/Tools.tsx +++ b/packages/desktop-client/src/components/sidebar/Tools.tsx @@ -1,17 +1,19 @@ import React, { useState, useCallback, useEffect } from 'react'; import { useLocation } from 'react-router-dom'; -import CheveronDown from '../../icons/v1/CheveronDown'; -import CheveronRight from '../../icons/v1/CheveronRight'; -import Cog from '../../icons/v1/Cog'; -import StoreFrontIcon from '../../icons/v1/StoreFront'; -import TuningIcon from '../../icons/v1/Tuning'; -import View from '../common/View'; +import { + SvgCheveronDown, + SvgCheveronRight, + SvgCog, + SvgStoreFront, + SvgTuning, +} from '../../icons/v1'; +import { View } from '../common/View'; -import Item from './Item'; -import SecondaryItem from './SecondaryItem'; +import { Item } from './Item'; +import { SecondaryItem } from './SecondaryItem'; -function Tools() { +export function Tools() { const [isOpen, setOpen] = useState(false); const onToggle = useCallback(() => setOpen(open => !open), []); const location = useLocation(); @@ -30,7 +32,7 @@ function Tools() { @@ -60,5 +62,3 @@ function Tools() { ); } - -export default Tools; diff --git a/packages/desktop-client/src/components/sidebar/index.tsx b/packages/desktop-client/src/components/sidebar/index.tsx index 1ed74fb329e..f922f2b7156 100644 --- a/packages/desktop-client/src/components/sidebar/index.tsx +++ b/packages/desktop-client/src/components/sidebar/index.tsx @@ -10,10 +10,10 @@ import React, { import { useSelector } from 'react-redux'; import { useResponsive } from '../../ResponsiveProvider'; -import View from '../common/View'; +import { View } from '../common/View'; import { SIDEBAR_WIDTH } from './Sidebar'; -import SidebarWithData from './SidebarWithData'; +import { SidebarWithData } from './SidebarWithData'; type SidebarContextValue = { hidden: boolean; @@ -28,7 +28,7 @@ type SidebarProviderProps = { children: ReactNode; }; -function SidebarProvider({ children }: SidebarProviderProps) { +export function SidebarProvider({ children }: SidebarProviderProps) { const floatingSidebar = useSelector( state => state.prefs.global.floatingSidebar, ); @@ -46,7 +46,7 @@ function SidebarProvider({ children }: SidebarProviderProps) { ); } -function useSidebar() { +export function useSidebar() { const { hidden, setHidden, floating, alwaysFloats } = useContext(SidebarContext); @@ -56,7 +56,7 @@ function useSidebar() { ); } -function FloatableSidebar() { +export function FloatableSidebar() { const floatingSidebar = useSelector( state => state.prefs.global.floatingSidebar, ); @@ -103,6 +103,3 @@ function FloatableSidebar() { ); } - -export { SidebarProvider, useSidebar }; -export default FloatableSidebar; diff --git a/packages/desktop-client/src/components/sort.tsx b/packages/desktop-client/src/components/sort.tsx index a3ce6cb883c..6a0a84c97f2 100644 --- a/packages/desktop-client/src/components/sort.tsx +++ b/packages/desktop-client/src/components/sort.tsx @@ -12,7 +12,7 @@ import { useDrag, useDrop } from 'react-dnd'; import { useMergedRefs } from '../hooks/useMergedRefs'; import { theme } from '../style'; -import View from './common/View'; +import { View } from './common/View'; export type DragState = { state: 'start-preview' | 'start' | 'end'; diff --git a/packages/desktop-client/src/components/spreadsheet/CellValue.tsx b/packages/desktop-client/src/components/spreadsheet/CellValue.tsx index 02bee9c23db..34686b18221 100644 --- a/packages/desktop-client/src/components/spreadsheet/CellValue.tsx +++ b/packages/desktop-client/src/components/spreadsheet/CellValue.tsx @@ -1,15 +1,12 @@ -import React, { type ReactNode } from 'react'; +import React, { type ComponentProps, type ReactNode } from 'react'; import { type CSSProperties, styles } from '../../style'; -import Text from '../common/Text'; -import { - ConditionalPrivacyFilter, - type ConditionalPrivacyFilterProps, -} from '../PrivacyFilter'; +import { Text } from '../common/Text'; +import { ConditionalPrivacyFilter } from '../PrivacyFilter'; -import useFormat from './useFormat'; -import useSheetName from './useSheetName'; -import useSheetValue from './useSheetValue'; +import { useFormat } from './useFormat'; +import { useSheetName } from './useSheetName'; +import { useSheetValue } from './useSheetValue'; import { type Binding } from '.'; @@ -19,11 +16,13 @@ type CellValueProps = { formatter?: (value) => ReactNode; style?: CSSProperties; getStyle?: (value) => CSSProperties; - privacyFilter?: ConditionalPrivacyFilterProps['privacyFilter']; + privacyFilter?: ComponentProps< + typeof ConditionalPrivacyFilter + >['privacyFilter']; ['data-testid']?: string; }; -function CellValue({ +export function CellValue({ binding, type, formatter, @@ -62,5 +61,3 @@ function CellValue({ ); } - -export default CellValue; diff --git a/packages/desktop-client/src/components/spreadsheet/NamespaceContext.ts b/packages/desktop-client/src/components/spreadsheet/NamespaceContext.ts index f9241513802..9de034c71c9 100644 --- a/packages/desktop-client/src/components/spreadsheet/NamespaceContext.ts +++ b/packages/desktop-client/src/components/spreadsheet/NamespaceContext.ts @@ -1,3 +1,3 @@ import { createContext } from 'react'; -export default createContext(undefined); +export const NamespaceContext = createContext(undefined); diff --git a/packages/desktop-client/src/components/spreadsheet/useFormat.ts b/packages/desktop-client/src/components/spreadsheet/useFormat.ts index 2b9a1eb74ab..28d0c1f0bd1 100644 --- a/packages/desktop-client/src/components/spreadsheet/useFormat.ts +++ b/packages/desktop-client/src/components/spreadsheet/useFormat.ts @@ -45,7 +45,7 @@ function format( } } -export default function useFormat() { +export function useFormat() { const numberFormat = useSelector(selectNumberFormat); return useCallback( diff --git a/packages/desktop-client/src/components/spreadsheet/useSheetName.ts b/packages/desktop-client/src/components/spreadsheet/useSheetName.ts index 8b80e5ac28c..49a187a7c56 100644 --- a/packages/desktop-client/src/components/spreadsheet/useSheetName.ts +++ b/packages/desktop-client/src/components/spreadsheet/useSheetName.ts @@ -1,6 +1,6 @@ import { useContext } from 'react'; -import NamespaceContext from './NamespaceContext'; +import { NamespaceContext } from './NamespaceContext'; import { type Binding } from '.'; @@ -15,7 +15,7 @@ function unresolveName(name) { return { sheet: null, name }; } -export default function useSheetName(binding: Binding) { +export function useSheetName(binding: Binding) { if (!binding) { throw new Error('Sheet binding is required'); } diff --git a/packages/desktop-client/src/components/spreadsheet/useSheetValue.ts b/packages/desktop-client/src/components/spreadsheet/useSheetValue.ts index faac71e234c..845b543a4c9 100644 --- a/packages/desktop-client/src/components/spreadsheet/useSheetValue.ts +++ b/packages/desktop-client/src/components/spreadsheet/useSheetValue.ts @@ -2,14 +2,11 @@ import { useState, useRef, useLayoutEffect } from 'react'; import { useSpreadsheet } from 'loot-core/src/client/SpreadsheetProvider'; -import useSheetName from './useSheetName'; +import { useSheetName } from './useSheetName'; import { type Binding } from '.'; -export default function useSheetValue( - binding: Binding, - onChange?: (result) => void, -) { +export function useSheetValue(binding: Binding, onChange?: (result) => void) { const { sheetName, fullSheetName } = useSheetName(binding); const bindingObj = diff --git a/packages/desktop-client/src/components/table.tsx b/packages/desktop-client/src/components/table.tsx index 92e2e833a47..a2e72a7c9a8 100644 --- a/packages/desktop-client/src/components/table.tsx +++ b/packages/desktop-client/src/components/table.tsx @@ -22,27 +22,25 @@ import { useProperFocus, } from '../hooks/useProperFocus'; import { useSelectedItems } from '../hooks/useSelected'; -import AnimatedLoading from '../icons/AnimatedLoading'; -import DeleteIcon from '../icons/v0/Delete'; -import ExpandArrow from '../icons/v0/ExpandArrow'; -import Checkmark from '../icons/v1/Checkmark'; +import { AnimatedLoading } from '../icons/AnimatedLoading'; +import { SvgDelete, SvgExpandArrow } from '../icons/v0'; +import { SvgCheckmark } from '../icons/v1'; import { type CSSProperties, styles, theme } from '../style'; -import Button from './common/Button'; -import Input from './common/Input'; -import Menu from './common/Menu'; -import Text from './common/Text'; -import View from './common/View'; -import FixedSizeList from './FixedSizeList'; +import { Button } from './common/Button'; +import { Input } from './common/Input'; +import { Menu } from './common/Menu'; +import { Text } from './common/Text'; +import { View } from './common/View'; +import { FixedSizeList } from './FixedSizeList'; import { KeyHandlers } from './KeyHandlers'; import { ConditionalPrivacyFilter, mergeConditionalPrivacyFilterProps, - type ConditionalPrivacyFilterProps, } from './PrivacyFilter'; import { type Binding } from './spreadsheet'; -import useFormat from './spreadsheet/useFormat'; -import useSheetValue from './spreadsheet/useSheetValue'; +import { useFormat } from './spreadsheet/useFormat'; +import { useSheetValue } from './spreadsheet/useSheetValue'; import { Tooltip, IntersectionBoundary } from './tooltips'; export const ROW_HEIGHT = 32; @@ -142,7 +140,9 @@ type CellProps = Omit, 'children' | 'value'> & { value?: string; valueStyle?: CSSProperties; onExpose?: (name: string) => void; - privacyFilter?: ConditionalPrivacyFilterProps['privacyFilter']; + privacyFilter?: ComponentProps< + typeof ConditionalPrivacyFilter + >['privacyFilter']; }; export function Cell({ width, @@ -486,7 +486,7 @@ export function DeleteCell({ onDelete, style, ...props }: DeleteCellProps) { onDelete?.(); }} > - {() => } + {() => } ); } @@ -650,7 +650,7 @@ export function SelectCell({ clickBehavior="none" {...buttonProps} > - {selected && } + {selected && } )} @@ -663,7 +663,9 @@ type SheetCellValueProps = { getValueStyle?: (value: string | number) => CSSProperties; formatExpr?: (value) => string; unformatExpr?: (value: string) => unknown; - privacyFilter?: ConditionalPrivacyFilterProps['privacyFilter']; + privacyFilter?: ComponentProps< + typeof ConditionalPrivacyFilter + >['privacyFilter']; }; type SheetCellProps = ComponentProps & { @@ -799,7 +801,7 @@ export function SelectedItemsButton({ name, keyHandlers, items, onSelect }) { style={{ color: theme.pageTextPositive }} onClick={() => setMenuOpen(true)} > - = { saveScrollWidth?: (parent, child) => void; }; -export const Table: ( - props: TableProps & { ref?: Ref> }, -) => ReactElement = forwardRef( +export const Table = forwardRef( ( { items, @@ -1161,7 +1161,9 @@ export const Table: ( ); }, -); +) as ( + props: TableProps & { ref?: Ref> }, +) => ReactElement; export type TableNavigator = { onEdit: (id: T['id'], field?: string) => void; diff --git a/packages/desktop-client/src/components/transactions/MobileTransaction.jsx b/packages/desktop-client/src/components/transactions/MobileTransaction.jsx index 7763f1bf639..e3b9deb81c7 100644 --- a/packages/desktop-client/src/components/transactions/MobileTransaction.jsx +++ b/packages/desktop-client/src/components/transactions/MobileTransaction.jsx @@ -22,9 +22,10 @@ import { } from 'date-fns'; import { css } from 'glamor'; -import q, { runQuery } from 'loot-core/src/client/query-helpers'; +import { runQuery } from 'loot-core/src/client/query-helpers'; import { send } from 'loot-core/src/platform/client/fetch'; import * as monthUtils from 'loot-core/src/shared/months'; +import { q } from 'loot-core/src/shared/query'; import { getScheduledAmount } from 'loot-core/src/shared/schedules'; import { isPreviewId, @@ -46,25 +47,26 @@ import { } from 'loot-core/src/shared/util'; import { useActions } from '../../hooks/useActions'; -import useCategories from '../../hooks/useCategories'; -import useNavigate from '../../hooks/useNavigate'; +import { useCategories } from '../../hooks/useCategories'; +import { useNavigate } from '../../hooks/useNavigate'; import { useSetThemeColor } from '../../hooks/useSetThemeColor'; import { SingleActiveEditFormProvider, useSingleActiveEditForm, } from '../../hooks/useSingleActiveEditForm'; -import Split from '../../icons/v0/Split'; -import Add from '../../icons/v1/Add'; -import Trash from '../../icons/v1/Trash'; -import ArrowsSynchronize from '../../icons/v2/ArrowsSynchronize'; -import CheckCircle1 from '../../icons/v2/CheckCircle1'; -import Lock from '../../icons/v2/LockClosed'; -import PencilWriteAlternate from '../../icons/v2/PencilWriteAlternate'; +import { SvgSplit } from '../../icons/v0'; +import { SvgAdd, SvgTrash } from '../../icons/v1'; +import { + SvgArrowsSynchronize, + SvgCheckCircle1, + SvgLockClosed, + SvgPencilWriteAlternate, +} from '../../icons/v2'; import { styles, theme } from '../../style'; -import Button from '../common/Button'; -import Text from '../common/Text'; -import TextOneLine from '../common/TextOneLine'; -import View from '../common/View'; +import { Button } from '../common/Button'; +import { Text } from '../common/Text'; +import { TextOneLine } from '../common/TextOneLine'; +import { View } from '../common/View'; import { FocusableAmountInput } from '../mobile/MobileAmountInput'; import { FieldLabel, @@ -72,7 +74,7 @@ import { InputField, BooleanField, } from '../mobile/MobileForms'; -import MobileBackButton from '../MobileBackButton'; +import { MobileBackButton } from '../MobileBackButton'; import { Page } from '../Page'; import { AmountInput } from '../util/AmountInput'; @@ -218,7 +220,7 @@ function Footer({ onClick={onClickRemainingSplit} onPointerDown={e => e.preventDefault()} > - + e.preventDefault()} > - + e.preventDefault()} > - - + onSplit(transaction.id)} type="bare" > - - {schedule && ( - {isReconciled ? ( - ) : ( - ( <> {transaction.schedule && ( - {icon === 'asc' && ( - + )} {icon === 'desc' && ( - + )} } @@ -655,9 +654,9 @@ function PayeeIcons({ }} > {recurring ? ( - + ) : ( - + )} )} @@ -674,9 +673,9 @@ function PayeeIcons({ }} > {(transaction._inverse ? -1 : 1) * transaction.amount > 0 ? ( - + ) : ( - + )} )} @@ -754,7 +753,8 @@ const Transaction = memo(function Transaction(props) { (name === 'credit' || name === 'debit' || name === 'payee' || - name === 'account') + name === 'account' || + name === 'date') ) { if (showReconciliationWarning === false) { setShowReconciliationWarning(true); @@ -943,7 +943,9 @@ const Transaction = memo(function Transaction(props) { style={{ ...(isChild && { borderLeftWidth: 1 }) }} value={ matched && ( - + ) } /> @@ -1143,7 +1145,7 @@ const Transaction = memo(function Transaction(props) { }} > {isParent && ( - { afterSave(() => { const transactions = latestState.current.transactions; const idx = transactions.findIndex(t => t.id === id); - const parent = transactionMap.get(transactions[idx]?.parent_id); + const parent = transactions.find( + t => t.id === transactions[idx]?.parent_id, + ); if ( isLastChild(transactions, idx) && diff --git a/packages/desktop-client/src/components/util/AmountInput.tsx b/packages/desktop-client/src/components/util/AmountInput.tsx index 9adec5f3adb..3325431733d 100644 --- a/packages/desktop-client/src/components/util/AmountInput.tsx +++ b/packages/desktop-client/src/components/util/AmountInput.tsx @@ -6,17 +6,16 @@ import React, { type FocusEventHandler, } from 'react'; -import evalArithmetic from 'loot-core/src/shared/arithmetic'; +import { evalArithmetic } from 'loot-core/src/shared/arithmetic'; import { amountToInteger } from 'loot-core/src/shared/util'; import { useMergedRefs } from '../../hooks/useMergedRefs'; -import Add from '../../icons/v1/Add'; -import Subtract from '../../icons/v1/Subtract'; +import { SvgAdd, SvgSubtract } from '../../icons/v1'; import { type CSSProperties, theme } from '../../style'; -import Button from '../common/Button'; -import InputWithContent from '../common/InputWithContent'; -import View from '../common/View'; -import useFormat from '../spreadsheet/useFormat'; +import { Button } from '../common/Button'; +import { InputWithContent } from '../common/InputWithContent'; +import { View } from '../common/View'; +import { useFormat } from '../spreadsheet/useFormat'; type AmountInputProps = { id?: string; @@ -108,9 +107,9 @@ export function AmountInput({ ref={buttonRef} > {negative ? ( - + ) : ( - + )} } diff --git a/packages/desktop-client/src/components/util/DisplayId.tsx b/packages/desktop-client/src/components/util/DisplayId.tsx index ecc14437543..45eed93d3a3 100644 --- a/packages/desktop-client/src/components/util/DisplayId.tsx +++ b/packages/desktop-client/src/components/util/DisplayId.tsx @@ -4,7 +4,7 @@ import { CachedAccounts } from 'loot-core/src/client/data-hooks/accounts'; import { CachedPayees } from 'loot-core/src/client/data-hooks/payees'; import { theme } from '../../style'; -import Text from '../common/Text'; +import { Text } from '../common/Text'; type DisplayIdProps = { type: 'accounts' | 'payees'; @@ -12,7 +12,7 @@ type DisplayIdProps = { noneColor?: string; }; -export default function DisplayId({ +export function DisplayId({ type, id, noneColor = theme.pageTextSubdued, diff --git a/packages/desktop-client/src/components/util/GenericInput.jsx b/packages/desktop-client/src/components/util/GenericInput.jsx index dfa2d95ddcb..b42826e01ba 100644 --- a/packages/desktop-client/src/components/util/GenericInput.jsx +++ b/packages/desktop-client/src/components/util/GenericInput.jsx @@ -3,19 +3,19 @@ import { useSelector } from 'react-redux'; import { getMonthYearFormat } from 'loot-core/src/shared/months'; -import useCategories from '../../hooks/useCategories'; -import AccountAutocomplete from '../autocomplete/AccountAutocomplete'; -import Autocomplete from '../autocomplete/Autocomplete'; -import CategoryAutocomplete from '../autocomplete/CategoryAutocomplete'; -import PayeeAutocomplete from '../autocomplete/PayeeAutocomplete'; -import SavedFilterAutocomplete from '../autocomplete/SavedFilterAutocomplete'; -import Input from '../common/Input'; -import View from '../common/View'; +import { useCategories } from '../../hooks/useCategories'; +import { AccountAutocomplete } from '../autocomplete/AccountAutocomplete'; +import { Autocomplete } from '../autocomplete/Autocomplete'; +import { CategoryAutocomplete } from '../autocomplete/CategoryAutocomplete'; +import { PayeeAutocomplete } from '../autocomplete/PayeeAutocomplete'; +import { SavedFilterAutocomplete } from '../autocomplete/SavedFilterAutocomplete'; +import { Input } from '../common/Input'; +import { View } from '../common/View'; import { Checkbox } from '../forms'; -import DateSelect from '../select/DateSelect'; -import RecurringSchedulePicker from '../select/RecurringSchedulePicker'; +import { DateSelect } from '../select/DateSelect'; +import { RecurringSchedulePicker } from '../select/RecurringSchedulePicker'; -export default function GenericInput({ +export function GenericInput({ field, subfield, type, diff --git a/packages/desktop-client/src/components/util/LoadComponent.tsx b/packages/desktop-client/src/components/util/LoadComponent.tsx index 74a97f62d4c..a0769656e1b 100644 --- a/packages/desktop-client/src/components/util/LoadComponent.tsx +++ b/packages/desktop-client/src/components/util/LoadComponent.tsx @@ -1,9 +1,9 @@ import { type ComponentType, useEffect, useState } from 'react'; -import AnimatedLoading from '../../icons/AnimatedLoading'; +import { AnimatedLoading } from '../../icons/AnimatedLoading'; import { theme, styles } from '../../style'; -import Block from '../common/Block'; -import View from '../common/View'; +import { Block } from '../common/Block'; +import { View } from '../common/View'; type ProplessComponent = ComponentType>; type LoadComponentProps = { diff --git a/packages/desktop-client/src/hooks/useActions.ts b/packages/desktop-client/src/hooks/useActions.ts index 07db4684f03..2952eaf8a0d 100644 --- a/packages/desktop-client/src/hooks/useActions.ts +++ b/packages/desktop-client/src/hooks/useActions.ts @@ -15,10 +15,15 @@ type ActionReturnType unknown> = export type BoundActions = { [Key in keyof typeof actions]: ( ...args: Parameters<(typeof actions)[Key]> - ) => ActionReturnType<(typeof actions)[Key]>; + ) => // @ts-expect-error temporarily disabling this TS error; eventually the `useActions` hook should be removed + ActionReturnType<(typeof actions)[Key]>; }; // https://react-redux.js.org/api/hooks#recipe-useactions +/** + * @deprecated please use actions directly with `useDispatch` + * @see https://github.com/reduxjs/react-redux/issues/1252#issuecomment-488160930 + **/ export function useActions() { const dispatch = useDispatch(); return useMemo(() => { diff --git a/packages/desktop-client/src/hooks/useCategories.ts b/packages/desktop-client/src/hooks/useCategories.ts index 548180acf3e..c515e7e3777 100644 --- a/packages/desktop-client/src/hooks/useCategories.ts +++ b/packages/desktop-client/src/hooks/useCategories.ts @@ -3,7 +3,7 @@ import { useSelector } from 'react-redux'; import { useActions } from './useActions'; -export default function useCategories() { +export function useCategories() { const { getCategories } = useActions(); const categories = useSelector(state => state.queries.categories.list); diff --git a/packages/desktop-client/src/hooks/useFeatureFlag.ts b/packages/desktop-client/src/hooks/useFeatureFlag.ts index 5950eaf0d1b..289e9b7c77a 100644 --- a/packages/desktop-client/src/hooks/useFeatureFlag.ts +++ b/packages/desktop-client/src/hooks/useFeatureFlag.ts @@ -11,7 +11,7 @@ const DEFAULT_FEATURE_FLAG_STATE: Record = { experimentalOfxParser: true, }; -export default function useFeatureFlag(name: FeatureFlag): boolean { +export function useFeatureFlag(name: FeatureFlag): boolean { return useSelector(state => { const value = state.prefs.local[`flags.${name}`]; diff --git a/packages/desktop-client/src/hooks/useFilters.ts b/packages/desktop-client/src/hooks/useFilters.ts index 617146a615b..c23003c3980 100644 --- a/packages/desktop-client/src/hooks/useFilters.ts +++ b/packages/desktop-client/src/hooks/useFilters.ts @@ -1,6 +1,6 @@ import { useCallback, useMemo, useState } from 'react'; -export default function useFilters(initialFilters: T[] = []) { +export function useFilters(initialFilters: T[] = []) { const [filters, setFilters] = useState(initialFilters); const [conditionsOp, setConditionsOp] = useState('and'); const [saved, setSaved] = useState(null); diff --git a/packages/desktop-client/src/hooks/useGoCardlessStatus.ts b/packages/desktop-client/src/hooks/useGoCardlessStatus.ts index bfacf126f02..22927722e2a 100644 --- a/packages/desktop-client/src/hooks/useGoCardlessStatus.ts +++ b/packages/desktop-client/src/hooks/useGoCardlessStatus.ts @@ -2,9 +2,9 @@ import { useEffect, useState } from 'react'; import { send } from 'loot-core/src/platform/client/fetch'; -import useSyncServerStatus from './useSyncServerStatus'; +import { useSyncServerStatus } from './useSyncServerStatus'; -export default function useGoCardlessStatus() { +export function useGoCardlessStatus() { const [configured, setConfigured] = useState(null); const [isLoading, setIsLoading] = useState(false); const status = useSyncServerStatus(); diff --git a/packages/desktop-client/src/hooks/useLatestVersion.ts b/packages/desktop-client/src/hooks/useLatestVersion.ts index b2bb46ab271..c796264e278 100644 --- a/packages/desktop-client/src/hooks/useLatestVersion.ts +++ b/packages/desktop-client/src/hooks/useLatestVersion.ts @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'; import { getIsOutdated, getLatestVersion } from '../util/versions'; -function useIsOutdated(): boolean { +export function useIsOutdated(): boolean { const [isOutdated, setIsOutdated] = useState(false); const latestVersion = useLatestVersion(); @@ -15,7 +15,7 @@ function useIsOutdated(): boolean { return isOutdated; } -function useLatestVersion(): string { +export function useLatestVersion(): string { const [latestVersion, setLatestVersion] = useState(''); useEffect(() => { (async () => { @@ -25,6 +25,3 @@ function useLatestVersion(): string { return latestVersion; } - -export default useLatestVersion; -export { useIsOutdated }; diff --git a/packages/desktop-client/src/hooks/useNavigate.ts b/packages/desktop-client/src/hooks/useNavigate.ts index 05e993ff812..5f05bb2b1e6 100644 --- a/packages/desktop-client/src/hooks/useNavigate.ts +++ b/packages/desktop-client/src/hooks/useNavigate.ts @@ -8,7 +8,7 @@ import { useNavigate as useNavigateReactRouter, } from 'react-router-dom'; -export default function useNavigate(): NavigateFunction { +export function useNavigate(): NavigateFunction { const location = useLocation(); const navigate = useNavigateReactRouter(); return useCallback( diff --git a/packages/desktop-client/src/hooks/usePrevious.ts b/packages/desktop-client/src/hooks/usePrevious.ts index 8d5f2dc5543..8fd44448b8d 100644 --- a/packages/desktop-client/src/hooks/usePrevious.ts +++ b/packages/desktop-client/src/hooks/usePrevious.ts @@ -1,6 +1,6 @@ import { useEffect, useRef } from 'react'; -export default function usePrevious(value: T): T | undefined { +export function usePrevious(value: T): T | undefined { const ref = useRef(); useEffect(() => { diff --git a/packages/desktop-client/src/hooks/useResizeObserver.ts b/packages/desktop-client/src/hooks/useResizeObserver.ts index 73c1a4521d2..45f37e24b66 100644 --- a/packages/desktop-client/src/hooks/useResizeObserver.ts +++ b/packages/desktop-client/src/hooks/useResizeObserver.ts @@ -1,6 +1,6 @@ import { useRef, useCallback } from 'react'; -export default function useResizeObserver( +export function useResizeObserver( func: (contentRect: DOMRectReadOnly) => void, ): (el: unknown) => void { const observer = useRef(null); diff --git a/packages/desktop-client/src/hooks/useSelected.tsx b/packages/desktop-client/src/hooks/useSelected.tsx index 934318e3661..3c3976c2bcd 100644 --- a/packages/desktop-client/src/hooks/useSelected.tsx +++ b/packages/desktop-client/src/hooks/useSelected.tsx @@ -50,7 +50,7 @@ type SelectAllAction = { type Actions = SelectAction | SelectNoneAction | SelectAllAction; -export default function useSelected( +export function useSelected( name: string, items: T[], initialSelectedIds: string[], diff --git a/packages/desktop-client/src/hooks/useSendPlatformRequest.ts b/packages/desktop-client/src/hooks/useSendPlatformRequest.ts index d4967f58a10..29585532ea6 100644 --- a/packages/desktop-client/src/hooks/useSendPlatformRequest.ts +++ b/packages/desktop-client/src/hooks/useSendPlatformRequest.ts @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react'; import { send } from 'loot-core/src/platform/client/fetch'; import type { Handlers } from 'loot-core/src/types/handlers'; -export default function useSendPlatformRequest( +export function useSendPlatformRequest( name: K, args?: Parameters[0], options?: { catchErrors?: boolean }, diff --git a/packages/desktop-client/src/hooks/useSingleActiveEditForm.tsx b/packages/desktop-client/src/hooks/useSingleActiveEditForm.tsx index 662c3c3fcbb..5dabcf9dc8a 100644 --- a/packages/desktop-client/src/hooks/useSingleActiveEditForm.tsx +++ b/packages/desktop-client/src/hooks/useSingleActiveEditForm.tsx @@ -4,12 +4,8 @@ import React, { useContext, useState, useRef, - useEffect, } from 'react'; -import usePrevious from './usePrevious'; -import useStableCallback from './useStableCallback'; - type ActiveEditCleanup = () => void; type ActiveEditAction = () => void | ActiveEditCleanup; @@ -19,7 +15,9 @@ type SingleActiveEditFormContextValue = { onRequestActiveEdit: ( field: string, action?: ActiveEditAction, - clearActiveEditDelayMs?: number, + options?: { + clearActiveEditDelayMs?: number; + }, ) => void; onClearActiveEdit: (delayMs?: number) => void; }; @@ -38,22 +36,8 @@ export function SingleActiveEditFormProvider({ children, }: SingleActiveEditFormProviderProps) { const [editingField, setEditingField] = useState(null); - const prevEditingField = usePrevious(editingField); - const actionRef = useRef(null); const cleanupRef = useRef(null); - useEffect(() => { - if (prevEditingField != null && prevEditingField !== editingField) { - runCleanup(); - } else if (prevEditingField == null && editingField !== null) { - runAction(); - } - }, [editingField]); - - const runAction = () => { - cleanupRef.current = actionRef.current?.(); - }; - const runCleanup = () => { const editCleanup = cleanupRef.current; if (typeof editCleanup === 'function') { @@ -62,31 +46,40 @@ export function SingleActiveEditFormProvider({ cleanupRef.current = null; }; + const runAction = (action: ActiveEditAction) => { + cleanupRef.current = action?.(); + }; + const onClearActiveEdit = (delayMs?: number) => { - setTimeout(() => setEditingField(null), delayMs); + setTimeout(() => { + runCleanup(); + setEditingField(null); + }, delayMs); + }; + + const onActiveEdit = (field: string, action: ActiveEditAction) => { + runAction(action); + setEditingField(field); }; - const onRequestActiveEdit = useStableCallback( - ( - field: string, - action: ActiveEditAction, - options: { - clearActiveEditDelayMs?: number; - }, - ) => { - if (editingField === field) { - // Already active. - return; - } - - if (editingField) { - onClearActiveEdit(options?.clearActiveEditDelayMs); - } else { - actionRef.current = action; - setEditingField(field); - } + const onRequestActiveEdit = ( + field: string, + action: ActiveEditAction, + options: { + clearActiveEditDelayMs?: number; }, - ); + ) => { + if (editingField === field) { + // Already active. + return; + } + + if (editingField) { + onClearActiveEdit(options?.clearActiveEditDelayMs); + } else { + onActiveEdit(field, action); + } + }; return ( unknown; -export default function useStableCallback(callback: UseStableCallbackArg) { +export function useStableCallback(callback: UseStableCallbackArg) { const callbackRef = useRef(); const memoCallback = useCallback( (...args) => callbackRef.current && callbackRef.current(...args), diff --git a/packages/desktop-client/src/hooks/useSyncServerStatus.ts b/packages/desktop-client/src/hooks/useSyncServerStatus.ts index 492c2bd8709..59096146c6a 100644 --- a/packages/desktop-client/src/hooks/useSyncServerStatus.ts +++ b/packages/desktop-client/src/hooks/useSyncServerStatus.ts @@ -4,7 +4,7 @@ import { useServerURL } from '../components/ServerContext'; export type SyncServerStatus = 'offline' | 'no-server' | 'online'; -export default function useSyncServerStatus(): SyncServerStatus { +export function useSyncServerStatus(): SyncServerStatus { const serverUrl = useServerURL(); const userData = useSelector(state => state.user.data); diff --git a/packages/desktop-client/src/icons/AnimatedLoading.tsx b/packages/desktop-client/src/icons/AnimatedLoading.tsx index a153265a405..82476f66ce6 100644 --- a/packages/desktop-client/src/icons/AnimatedLoading.tsx +++ b/packages/desktop-client/src/icons/AnimatedLoading.tsx @@ -2,14 +2,14 @@ import React, { type SVGProps } from 'react'; import { css, keyframes } from 'glamor'; -import Loading from './Loading'; +import { SvgLoading } from './Loading'; const rotation = keyframes({ '0%': { transform: 'rotate(-90deg)' }, '100%': { transform: 'rotate(666deg)' }, }); -function AnimatedLoading(props: SVGProps) { +export function AnimatedLoading(props: SVGProps) { return ( ) { lineHeight: 0, })}`} > - + ); } - -export default AnimatedLoading; diff --git a/packages/desktop-client/src/icons/Loading.tsx b/packages/desktop-client/src/icons/Loading.tsx index c8101941c3f..6012c53db38 100644 --- a/packages/desktop-client/src/icons/Loading.tsx +++ b/packages/desktop-client/src/icons/Loading.tsx @@ -1,6 +1,6 @@ import React, { type SVGProps, useState } from 'react'; -const SvgLoading = (props: SVGProps) => { +export const SvgLoading = (props: SVGProps) => { const { color = 'currentColor' } = props; const [gradientId] = useState('gradient-' + Math.random()); @@ -31,5 +31,3 @@ const SvgLoading = (props: SVGProps) => { ); }; - -export default SvgLoading; diff --git a/packages/desktop-client/src/icons/index-template.ts b/packages/desktop-client/src/icons/index-template.ts new file mode 100644 index 00000000000..679f5ce7b85 --- /dev/null +++ b/packages/desktop-client/src/icons/index-template.ts @@ -0,0 +1,12 @@ +import path from 'path'; + +function indexTemplate(filePaths) { + const exportEntries = filePaths.map(({ path: filePath }) => { + const basename = path.basename(filePath, path.extname(filePath)); + const exportName = `Svg${basename}`; + return `export { ${exportName} } from './${basename}'`; + }) + return exportEntries.join('\n'); +} + +module.exports = indexTemplate \ No newline at end of file diff --git a/packages/desktop-client/src/icons/logo/Logo.tsx b/packages/desktop-client/src/icons/logo/Logo.tsx index 60c4d53af4d..199a7a2aa66 100644 --- a/packages/desktop-client/src/icons/logo/Logo.tsx +++ b/packages/desktop-client/src/icons/logo/Logo.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLogo = (props: SVGProps) => ( +export const SvgLogo = (props: SVGProps) => ( ) => ( /> ); -export default SvgLogo; diff --git a/packages/desktop-client/src/icons/logo/index.ts b/packages/desktop-client/src/icons/logo/index.ts index c6444c91fb9..c7d7d8ea715 100644 --- a/packages/desktop-client/src/icons/logo/index.ts +++ b/packages/desktop-client/src/icons/logo/index.ts @@ -1 +1 @@ -export { default as Logo } from './Logo'; +export { SvgLogo } from './Logo'; diff --git a/packages/desktop-client/src/icons/template.ts b/packages/desktop-client/src/icons/template.ts new file mode 100644 index 00000000000..8cb1e0507f5 --- /dev/null +++ b/packages/desktop-client/src/icons/template.ts @@ -0,0 +1,13 @@ +const template = ({ imports, interfaces, componentName, props, jsx }, { tpl }) => { + return tpl` +${imports}; + +${interfaces}; + +export const ${componentName} = (${props}) => ( + ${jsx} +); +` +} + +module.exports = template \ No newline at end of file diff --git a/packages/desktop-client/src/icons/v0/Add.tsx b/packages/desktop-client/src/icons/v0/Add.tsx index 306a115dd65..e3c3a9e9289 100644 --- a/packages/desktop-client/src/icons/v0/Add.tsx +++ b/packages/desktop-client/src/icons/v0/Add.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAdd = (props: SVGProps) => ( +export const SvgAdd = (props: SVGProps) => ( ) => ( /> ); -export default SvgAdd; diff --git a/packages/desktop-client/src/icons/v0/Delete.tsx b/packages/desktop-client/src/icons/v0/Delete.tsx index 232864866ad..311e818354c 100644 --- a/packages/desktop-client/src/icons/v0/Delete.tsx +++ b/packages/desktop-client/src/icons/v0/Delete.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDelete = (props: SVGProps) => ( +export const SvgDelete = (props: SVGProps) => ( ) => ( /> ); -export default SvgDelete; diff --git a/packages/desktop-client/src/icons/v0/ExpandArrow.tsx b/packages/desktop-client/src/icons/v0/ExpandArrow.tsx index 35e12043d07..a7ac84f8cc3 100644 --- a/packages/desktop-client/src/icons/v0/ExpandArrow.tsx +++ b/packages/desktop-client/src/icons/v0/ExpandArrow.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgExpandArrow = (props: SVGProps) => ( +export const SvgExpandArrow = (props: SVGProps) => ( ) => ( /> ); -export default SvgExpandArrow; diff --git a/packages/desktop-client/src/icons/v0/LeftArrow2.tsx b/packages/desktop-client/src/icons/v0/LeftArrow2.tsx index b1c0b091cf2..15a8cc460d6 100644 --- a/packages/desktop-client/src/icons/v0/LeftArrow2.tsx +++ b/packages/desktop-client/src/icons/v0/LeftArrow2.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLeftArrow2 = (props: SVGProps) => ( +export const SvgLeftArrow2 = (props: SVGProps) => ( ) => ( /> ); -export default SvgLeftArrow2; diff --git a/packages/desktop-client/src/icons/v0/Math.tsx b/packages/desktop-client/src/icons/v0/Math.tsx index db3629fabb3..41aff6c20f7 100644 --- a/packages/desktop-client/src/icons/v0/Math.tsx +++ b/packages/desktop-client/src/icons/v0/Math.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMath = (props: SVGProps) => ( +export const SvgMath = (props: SVGProps) => ( ) => ( /> ); -export default SvgMath; diff --git a/packages/desktop-client/src/icons/v0/Merge.tsx b/packages/desktop-client/src/icons/v0/Merge.tsx index 453fe8d369b..b310ecc25cf 100644 --- a/packages/desktop-client/src/icons/v0/Merge.tsx +++ b/packages/desktop-client/src/icons/v0/Merge.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMerge = (props: SVGProps) => ( +export const SvgMerge = (props: SVGProps) => ( ) => ( /> ); -export default SvgMerge; diff --git a/packages/desktop-client/src/icons/v0/RightArrow2.tsx b/packages/desktop-client/src/icons/v0/RightArrow2.tsx index 3652862b3aa..fb1708540ec 100644 --- a/packages/desktop-client/src/icons/v0/RightArrow2.tsx +++ b/packages/desktop-client/src/icons/v0/RightArrow2.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgRightArrow2 = (props: SVGProps) => ( +export const SvgRightArrow2 = (props: SVGProps) => ( ) => ( /> ); -export default SvgRightArrow2; diff --git a/packages/desktop-client/src/icons/v0/Split.tsx b/packages/desktop-client/src/icons/v0/Split.tsx index 4e22aa9a82d..415196f6380 100644 --- a/packages/desktop-client/src/icons/v0/Split.tsx +++ b/packages/desktop-client/src/icons/v0/Split.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSplit = (props: SVGProps) => ( +export const SvgSplit = (props: SVGProps) => ( ) => ( /> ); -export default SvgSplit; diff --git a/packages/desktop-client/src/icons/v0/Subtract.tsx b/packages/desktop-client/src/icons/v0/Subtract.tsx index 3d06098172f..698a94f3d72 100644 --- a/packages/desktop-client/src/icons/v0/Subtract.tsx +++ b/packages/desktop-client/src/icons/v0/Subtract.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSubtract = (props: SVGProps) => ( +export const SvgSubtract = (props: SVGProps) => ( ) => ( /> ); -export default SvgSubtract; diff --git a/packages/desktop-client/src/icons/v0/index.ts b/packages/desktop-client/src/icons/v0/index.ts index 077a6c4d9d3..893da4c0eb4 100644 --- a/packages/desktop-client/src/icons/v0/index.ts +++ b/packages/desktop-client/src/icons/v0/index.ts @@ -1,9 +1,9 @@ -export { default as Add } from './Add'; -export { default as Delete } from './Delete'; -export { default as ExpandArrow } from './ExpandArrow'; -export { default as LeftArrow2 } from './LeftArrow2'; -export { default as Math } from './Math'; -export { default as RightArrow2 } from './RightArrow2'; -export { default as Subtract } from './Subtract'; -export { default as Merge } from './Merge'; -export { default as Split } from './Split'; +export { SvgAdd } from './Add'; +export { SvgDelete } from './Delete'; +export { SvgExpandArrow } from './ExpandArrow'; +export { SvgLeftArrow2 } from './LeftArrow2'; +export { SvgMath } from './Math'; +export { SvgRightArrow2 } from './RightArrow2'; +export { SvgSubtract } from './Subtract'; +export { SvgMerge } from './Merge'; +export { SvgSplit } from './Split'; diff --git a/packages/desktop-client/src/icons/v1/Add.tsx b/packages/desktop-client/src/icons/v1/Add.tsx index 17ca39f5c12..0ca4c9e8e4c 100644 --- a/packages/desktop-client/src/icons/v1/Add.tsx +++ b/packages/desktop-client/src/icons/v1/Add.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAdd = (props: SVGProps) => ( +export const SvgAdd = (props: SVGProps) => ( ) => ( /> ); -export default SvgAdd; diff --git a/packages/desktop-client/src/icons/v1/AddOutline.tsx b/packages/desktop-client/src/icons/v1/AddOutline.tsx index 0258ef0612a..bd125139d5b 100644 --- a/packages/desktop-client/src/icons/v1/AddOutline.tsx +++ b/packages/desktop-client/src/icons/v1/AddOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAddOutline = (props: SVGProps) => ( +export const SvgAddOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgAddOutline; diff --git a/packages/desktop-client/src/icons/v1/AddSolid.tsx b/packages/desktop-client/src/icons/v1/AddSolid.tsx index 085c19a85f2..0590557a58c 100644 --- a/packages/desktop-client/src/icons/v1/AddSolid.tsx +++ b/packages/desktop-client/src/icons/v1/AddSolid.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAddSolid = (props: SVGProps) => ( +export const SvgAddSolid = (props: SVGProps) => ( ) => ( /> ); -export default SvgAddSolid; diff --git a/packages/desktop-client/src/icons/v1/Adjust.tsx b/packages/desktop-client/src/icons/v1/Adjust.tsx index 5a63200656c..a904a3ef9bb 100644 --- a/packages/desktop-client/src/icons/v1/Adjust.tsx +++ b/packages/desktop-client/src/icons/v1/Adjust.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAdjust = (props: SVGProps) => ( +export const SvgAdjust = (props: SVGProps) => ( ) => ( /> ); -export default SvgAdjust; diff --git a/packages/desktop-client/src/icons/v1/Airplane.tsx b/packages/desktop-client/src/icons/v1/Airplane.tsx index 542dc23e5c7..28299f392f5 100644 --- a/packages/desktop-client/src/icons/v1/Airplane.tsx +++ b/packages/desktop-client/src/icons/v1/Airplane.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAirplane = (props: SVGProps) => ( +export const SvgAirplane = (props: SVGProps) => ( ) => ( /> ); -export default SvgAirplane; diff --git a/packages/desktop-client/src/icons/v1/Album.tsx b/packages/desktop-client/src/icons/v1/Album.tsx index b9f7848daca..85f4bf9d621 100644 --- a/packages/desktop-client/src/icons/v1/Album.tsx +++ b/packages/desktop-client/src/icons/v1/Album.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAlbum = (props: SVGProps) => ( +export const SvgAlbum = (props: SVGProps) => ( ) => ( /> ); -export default SvgAlbum; diff --git a/packages/desktop-client/src/icons/v1/AlignCenter.tsx b/packages/desktop-client/src/icons/v1/AlignCenter.tsx index 193dd57a719..4ca468a0dc5 100644 --- a/packages/desktop-client/src/icons/v1/AlignCenter.tsx +++ b/packages/desktop-client/src/icons/v1/AlignCenter.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAlignCenter = (props: SVGProps) => ( +export const SvgAlignCenter = (props: SVGProps) => ( ) => ( /> ); -export default SvgAlignCenter; diff --git a/packages/desktop-client/src/icons/v1/AlignJustified.tsx b/packages/desktop-client/src/icons/v1/AlignJustified.tsx index 7c3ba26d66f..06cfaabc036 100644 --- a/packages/desktop-client/src/icons/v1/AlignJustified.tsx +++ b/packages/desktop-client/src/icons/v1/AlignJustified.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAlignJustified = (props: SVGProps) => ( +export const SvgAlignJustified = (props: SVGProps) => ( ) => ( /> ); -export default SvgAlignJustified; diff --git a/packages/desktop-client/src/icons/v1/AlignLeft.tsx b/packages/desktop-client/src/icons/v1/AlignLeft.tsx index 86a138c3820..d8d5c7980c4 100644 --- a/packages/desktop-client/src/icons/v1/AlignLeft.tsx +++ b/packages/desktop-client/src/icons/v1/AlignLeft.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAlignLeft = (props: SVGProps) => ( +export const SvgAlignLeft = (props: SVGProps) => ( ) => ( /> ); -export default SvgAlignLeft; diff --git a/packages/desktop-client/src/icons/v1/AlignRight.tsx b/packages/desktop-client/src/icons/v1/AlignRight.tsx index a4371208ebe..91b93a34fc6 100644 --- a/packages/desktop-client/src/icons/v1/AlignRight.tsx +++ b/packages/desktop-client/src/icons/v1/AlignRight.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAlignRight = (props: SVGProps) => ( +export const SvgAlignRight = (props: SVGProps) => ( ) => ( /> ); -export default SvgAlignRight; diff --git a/packages/desktop-client/src/icons/v1/Anchor.tsx b/packages/desktop-client/src/icons/v1/Anchor.tsx index 3916aca810e..45686885ec2 100644 --- a/packages/desktop-client/src/icons/v1/Anchor.tsx +++ b/packages/desktop-client/src/icons/v1/Anchor.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAnchor = (props: SVGProps) => ( +export const SvgAnchor = (props: SVGProps) => ( ) => ( /> ); -export default SvgAnchor; diff --git a/packages/desktop-client/src/icons/v1/Announcement.tsx b/packages/desktop-client/src/icons/v1/Announcement.tsx index df1e1ec9890..f478a36bf46 100644 --- a/packages/desktop-client/src/icons/v1/Announcement.tsx +++ b/packages/desktop-client/src/icons/v1/Announcement.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAnnouncement = (props: SVGProps) => ( +export const SvgAnnouncement = (props: SVGProps) => ( ) => ( /> ); -export default SvgAnnouncement; diff --git a/packages/desktop-client/src/icons/v1/Apparel.tsx b/packages/desktop-client/src/icons/v1/Apparel.tsx index 2be049f337a..d48ff3fe538 100644 --- a/packages/desktop-client/src/icons/v1/Apparel.tsx +++ b/packages/desktop-client/src/icons/v1/Apparel.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgApparel = (props: SVGProps) => ( +export const SvgApparel = (props: SVGProps) => ( ) => ( /> ); -export default SvgApparel; diff --git a/packages/desktop-client/src/icons/v1/ArrowDown.tsx b/packages/desktop-client/src/icons/v1/ArrowDown.tsx index 89589b78906..cc200ce85a9 100644 --- a/packages/desktop-client/src/icons/v1/ArrowDown.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowDown.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowDown = (props: SVGProps) => ( +export const SvgArrowDown = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowDown; diff --git a/packages/desktop-client/src/icons/v1/ArrowLeft.tsx b/packages/desktop-client/src/icons/v1/ArrowLeft.tsx index 39b57af26ba..7a510ccc4b5 100644 --- a/packages/desktop-client/src/icons/v1/ArrowLeft.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowLeft.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowLeft = (props: SVGProps) => ( +export const SvgArrowLeft = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowLeft; diff --git a/packages/desktop-client/src/icons/v1/ArrowOutlineDown.tsx b/packages/desktop-client/src/icons/v1/ArrowOutlineDown.tsx index 6ebc0e9b4e6..4e4d38810f6 100644 --- a/packages/desktop-client/src/icons/v1/ArrowOutlineDown.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowOutlineDown.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowOutlineDown = (props: SVGProps) => ( +export const SvgArrowOutlineDown = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowOutlineDown; diff --git a/packages/desktop-client/src/icons/v1/ArrowOutlineLeft.tsx b/packages/desktop-client/src/icons/v1/ArrowOutlineLeft.tsx index 32f56ce12ec..9a3e8890467 100644 --- a/packages/desktop-client/src/icons/v1/ArrowOutlineLeft.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowOutlineLeft.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowOutlineLeft = (props: SVGProps) => ( +export const SvgArrowOutlineLeft = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowOutlineLeft; diff --git a/packages/desktop-client/src/icons/v1/ArrowOutlineRight.tsx b/packages/desktop-client/src/icons/v1/ArrowOutlineRight.tsx index f75c6c63704..f09a9762c97 100644 --- a/packages/desktop-client/src/icons/v1/ArrowOutlineRight.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowOutlineRight.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowOutlineRight = (props: SVGProps) => ( +export const SvgArrowOutlineRight = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowOutlineRight; diff --git a/packages/desktop-client/src/icons/v1/ArrowOutlineUp.tsx b/packages/desktop-client/src/icons/v1/ArrowOutlineUp.tsx index 452f680eeda..6050ab8f840 100644 --- a/packages/desktop-client/src/icons/v1/ArrowOutlineUp.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowOutlineUp.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowOutlineUp = (props: SVGProps) => ( +export const SvgArrowOutlineUp = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowOutlineUp; diff --git a/packages/desktop-client/src/icons/v1/ArrowRight.tsx b/packages/desktop-client/src/icons/v1/ArrowRight.tsx index 167eee2d4c8..6475516cc78 100644 --- a/packages/desktop-client/src/icons/v1/ArrowRight.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowRight.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowRight = (props: SVGProps) => ( +export const SvgArrowRight = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowRight; diff --git a/packages/desktop-client/src/icons/v1/ArrowThickDown.tsx b/packages/desktop-client/src/icons/v1/ArrowThickDown.tsx index 892886f4ad0..cb0d3593057 100644 --- a/packages/desktop-client/src/icons/v1/ArrowThickDown.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowThickDown.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowThickDown = (props: SVGProps) => ( +export const SvgArrowThickDown = (props: SVGProps) => ( ) => ( ); -export default SvgArrowThickDown; diff --git a/packages/desktop-client/src/icons/v1/ArrowThickLeft.tsx b/packages/desktop-client/src/icons/v1/ArrowThickLeft.tsx index 2cea251e435..2836bfc4d5f 100644 --- a/packages/desktop-client/src/icons/v1/ArrowThickLeft.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowThickLeft.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowThickLeft = (props: SVGProps) => ( +export const SvgArrowThickLeft = (props: SVGProps) => ( ) => ( ); -export default SvgArrowThickLeft; diff --git a/packages/desktop-client/src/icons/v1/ArrowThickRight.tsx b/packages/desktop-client/src/icons/v1/ArrowThickRight.tsx index cc92ba8a787..741a9fe13e6 100644 --- a/packages/desktop-client/src/icons/v1/ArrowThickRight.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowThickRight.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowThickRight = (props: SVGProps) => ( +export const SvgArrowThickRight = (props: SVGProps) => ( ) => ( ); -export default SvgArrowThickRight; diff --git a/packages/desktop-client/src/icons/v1/ArrowThickUp.tsx b/packages/desktop-client/src/icons/v1/ArrowThickUp.tsx index ca6c0adde5e..92356686e04 100644 --- a/packages/desktop-client/src/icons/v1/ArrowThickUp.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowThickUp.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowThickUp = (props: SVGProps) => ( +export const SvgArrowThickUp = (props: SVGProps) => ( ) => ( ); -export default SvgArrowThickUp; diff --git a/packages/desktop-client/src/icons/v1/ArrowThinDown.tsx b/packages/desktop-client/src/icons/v1/ArrowThinDown.tsx index af09ad7a1d7..fecdc46eac1 100644 --- a/packages/desktop-client/src/icons/v1/ArrowThinDown.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowThinDown.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowThinDown = (props: SVGProps) => ( +export const SvgArrowThinDown = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowThinDown; diff --git a/packages/desktop-client/src/icons/v1/ArrowThinLeft.tsx b/packages/desktop-client/src/icons/v1/ArrowThinLeft.tsx index 63cb5f5d4f7..7dfc39f9cce 100644 --- a/packages/desktop-client/src/icons/v1/ArrowThinLeft.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowThinLeft.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowThinLeft = (props: SVGProps) => ( +export const SvgArrowThinLeft = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowThinLeft; diff --git a/packages/desktop-client/src/icons/v1/ArrowThinRight.tsx b/packages/desktop-client/src/icons/v1/ArrowThinRight.tsx index 99cf0c1b11e..ec453bd2a1c 100644 --- a/packages/desktop-client/src/icons/v1/ArrowThinRight.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowThinRight.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowThinRight = (props: SVGProps) => ( +export const SvgArrowThinRight = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowThinRight; diff --git a/packages/desktop-client/src/icons/v1/ArrowThinUp.tsx b/packages/desktop-client/src/icons/v1/ArrowThinUp.tsx index a89d92e475e..06269f4d681 100644 --- a/packages/desktop-client/src/icons/v1/ArrowThinUp.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowThinUp.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowThinUp = (props: SVGProps) => ( +export const SvgArrowThinUp = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowThinUp; diff --git a/packages/desktop-client/src/icons/v1/ArrowUp.tsx b/packages/desktop-client/src/icons/v1/ArrowUp.tsx index 4f251e2aee8..5af2d7005f5 100644 --- a/packages/desktop-client/src/icons/v1/ArrowUp.tsx +++ b/packages/desktop-client/src/icons/v1/ArrowUp.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowUp = (props: SVGProps) => ( +export const SvgArrowUp = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowUp; diff --git a/packages/desktop-client/src/icons/v1/Artist.tsx b/packages/desktop-client/src/icons/v1/Artist.tsx index 620bbeee0f1..c5e3e4f2324 100644 --- a/packages/desktop-client/src/icons/v1/Artist.tsx +++ b/packages/desktop-client/src/icons/v1/Artist.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArtist = (props: SVGProps) => ( +export const SvgArtist = (props: SVGProps) => ( ) => ( /> ); -export default SvgArtist; diff --git a/packages/desktop-client/src/icons/v1/AtSymbol.tsx b/packages/desktop-client/src/icons/v1/AtSymbol.tsx index b8d672bef14..18a3406e096 100644 --- a/packages/desktop-client/src/icons/v1/AtSymbol.tsx +++ b/packages/desktop-client/src/icons/v1/AtSymbol.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAtSymbol = (props: SVGProps) => ( +export const SvgAtSymbol = (props: SVGProps) => ( ) => ( /> ); -export default SvgAtSymbol; diff --git a/packages/desktop-client/src/icons/v1/Attachment.tsx b/packages/desktop-client/src/icons/v1/Attachment.tsx index ba7adc90093..dfb2f9a2847 100644 --- a/packages/desktop-client/src/icons/v1/Attachment.tsx +++ b/packages/desktop-client/src/icons/v1/Attachment.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAttachment = (props: SVGProps) => ( +export const SvgAttachment = (props: SVGProps) => ( ) => ( /> ); -export default SvgAttachment; diff --git a/packages/desktop-client/src/icons/v1/Backspace.tsx b/packages/desktop-client/src/icons/v1/Backspace.tsx index 0921df4ec6a..603050b0145 100644 --- a/packages/desktop-client/src/icons/v1/Backspace.tsx +++ b/packages/desktop-client/src/icons/v1/Backspace.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBackspace = (props: SVGProps) => ( +export const SvgBackspace = (props: SVGProps) => ( ) => ( /> ); -export default SvgBackspace; diff --git a/packages/desktop-client/src/icons/v1/Backward.tsx b/packages/desktop-client/src/icons/v1/Backward.tsx index 407f1c6e918..bf0990ba117 100644 --- a/packages/desktop-client/src/icons/v1/Backward.tsx +++ b/packages/desktop-client/src/icons/v1/Backward.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBackward = (props: SVGProps) => ( +export const SvgBackward = (props: SVGProps) => ( ) => ( ); -export default SvgBackward; diff --git a/packages/desktop-client/src/icons/v1/BackwardStep.tsx b/packages/desktop-client/src/icons/v1/BackwardStep.tsx index a0b4a97de97..92744f47688 100644 --- a/packages/desktop-client/src/icons/v1/BackwardStep.tsx +++ b/packages/desktop-client/src/icons/v1/BackwardStep.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBackwardStep = (props: SVGProps) => ( +export const SvgBackwardStep = (props: SVGProps) => ( ) => ( ); -export default SvgBackwardStep; diff --git a/packages/desktop-client/src/icons/v1/Badge.tsx b/packages/desktop-client/src/icons/v1/Badge.tsx index 43afec767d4..94f9fba0f20 100644 --- a/packages/desktop-client/src/icons/v1/Badge.tsx +++ b/packages/desktop-client/src/icons/v1/Badge.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBadge = (props: SVGProps) => ( +export const SvgBadge = (props: SVGProps) => ( ) => ( /> ); -export default SvgBadge; diff --git a/packages/desktop-client/src/icons/v1/BatteryFull.tsx b/packages/desktop-client/src/icons/v1/BatteryFull.tsx index 5f67d1ae018..5cfe1f5e889 100644 --- a/packages/desktop-client/src/icons/v1/BatteryFull.tsx +++ b/packages/desktop-client/src/icons/v1/BatteryFull.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBatteryFull = (props: SVGProps) => ( +export const SvgBatteryFull = (props: SVGProps) => ( ) => ( /> ); -export default SvgBatteryFull; diff --git a/packages/desktop-client/src/icons/v1/BatteryHalf.tsx b/packages/desktop-client/src/icons/v1/BatteryHalf.tsx index 5c72fc8dcf1..eca3eb53d8f 100644 --- a/packages/desktop-client/src/icons/v1/BatteryHalf.tsx +++ b/packages/desktop-client/src/icons/v1/BatteryHalf.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBatteryHalf = (props: SVGProps) => ( +export const SvgBatteryHalf = (props: SVGProps) => ( ) => ( /> ); -export default SvgBatteryHalf; diff --git a/packages/desktop-client/src/icons/v1/BatteryLow.tsx b/packages/desktop-client/src/icons/v1/BatteryLow.tsx index 04cd28afbab..9f657194a82 100644 --- a/packages/desktop-client/src/icons/v1/BatteryLow.tsx +++ b/packages/desktop-client/src/icons/v1/BatteryLow.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBatteryLow = (props: SVGProps) => ( +export const SvgBatteryLow = (props: SVGProps) => ( ) => ( /> ); -export default SvgBatteryLow; diff --git a/packages/desktop-client/src/icons/v1/Beverage.tsx b/packages/desktop-client/src/icons/v1/Beverage.tsx index c70b8eea090..84c44b2dde1 100644 --- a/packages/desktop-client/src/icons/v1/Beverage.tsx +++ b/packages/desktop-client/src/icons/v1/Beverage.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBeverage = (props: SVGProps) => ( +export const SvgBeverage = (props: SVGProps) => ( ) => ( /> ); -export default SvgBeverage; diff --git a/packages/desktop-client/src/icons/v1/Block.tsx b/packages/desktop-client/src/icons/v1/Block.tsx index 9acee929a8f..d70f7135773 100644 --- a/packages/desktop-client/src/icons/v1/Block.tsx +++ b/packages/desktop-client/src/icons/v1/Block.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBlock = (props: SVGProps) => ( +export const SvgBlock = (props: SVGProps) => ( ) => ( /> ); -export default SvgBlock; diff --git a/packages/desktop-client/src/icons/v1/Bluetooth.tsx b/packages/desktop-client/src/icons/v1/Bluetooth.tsx index ac69c42ff29..9203cce1ebf 100644 --- a/packages/desktop-client/src/icons/v1/Bluetooth.tsx +++ b/packages/desktop-client/src/icons/v1/Bluetooth.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBluetooth = (props: SVGProps) => ( +export const SvgBluetooth = (props: SVGProps) => ( ) => ( /> ); -export default SvgBluetooth; diff --git a/packages/desktop-client/src/icons/v1/Bolt.tsx b/packages/desktop-client/src/icons/v1/Bolt.tsx index dc1736b2450..6aa0f8bbb19 100644 --- a/packages/desktop-client/src/icons/v1/Bolt.tsx +++ b/packages/desktop-client/src/icons/v1/Bolt.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBolt = (props: SVGProps) => ( +export const SvgBolt = (props: SVGProps) => ( ) => ( ); -export default SvgBolt; diff --git a/packages/desktop-client/src/icons/v1/BookReference.tsx b/packages/desktop-client/src/icons/v1/BookReference.tsx index 91987db343f..0531931056c 100644 --- a/packages/desktop-client/src/icons/v1/BookReference.tsx +++ b/packages/desktop-client/src/icons/v1/BookReference.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBookReference = (props: SVGProps) => ( +export const SvgBookReference = (props: SVGProps) => ( ) => ( /> ); -export default SvgBookReference; diff --git a/packages/desktop-client/src/icons/v1/Bookmark.tsx b/packages/desktop-client/src/icons/v1/Bookmark.tsx index 5d005382bfb..718314f79e7 100644 --- a/packages/desktop-client/src/icons/v1/Bookmark.tsx +++ b/packages/desktop-client/src/icons/v1/Bookmark.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBookmark = (props: SVGProps) => ( +export const SvgBookmark = (props: SVGProps) => ( ) => ( /> ); -export default SvgBookmark; diff --git a/packages/desktop-client/src/icons/v1/BookmarkCopy2.tsx b/packages/desktop-client/src/icons/v1/BookmarkCopy2.tsx index 3c6771dcfec..ca6693e2ec5 100644 --- a/packages/desktop-client/src/icons/v1/BookmarkCopy2.tsx +++ b/packages/desktop-client/src/icons/v1/BookmarkCopy2.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBookmarkCopy2 = (props: SVGProps) => ( +export const SvgBookmarkCopy2 = (props: SVGProps) => ( ) => ( ); -export default SvgBookmarkCopy2; diff --git a/packages/desktop-client/src/icons/v1/BookmarkCopy3.tsx b/packages/desktop-client/src/icons/v1/BookmarkCopy3.tsx index b1481a27a87..795a59658f3 100644 --- a/packages/desktop-client/src/icons/v1/BookmarkCopy3.tsx +++ b/packages/desktop-client/src/icons/v1/BookmarkCopy3.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBookmarkCopy3 = (props: SVGProps) => ( +export const SvgBookmarkCopy3 = (props: SVGProps) => ( ) => ( ); -export default SvgBookmarkCopy3; diff --git a/packages/desktop-client/src/icons/v1/BookmarkOutline.tsx b/packages/desktop-client/src/icons/v1/BookmarkOutline.tsx index f3318c8ae4e..709539ab9ee 100644 --- a/packages/desktop-client/src/icons/v1/BookmarkOutline.tsx +++ b/packages/desktop-client/src/icons/v1/BookmarkOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBookmarkOutline = (props: SVGProps) => ( +export const SvgBookmarkOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgBookmarkOutline; diff --git a/packages/desktop-client/src/icons/v1/BookmarkOutlineAdd.tsx b/packages/desktop-client/src/icons/v1/BookmarkOutlineAdd.tsx index 7454370f08e..0dde71518e3 100644 --- a/packages/desktop-client/src/icons/v1/BookmarkOutlineAdd.tsx +++ b/packages/desktop-client/src/icons/v1/BookmarkOutlineAdd.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBookmarkOutlineAdd = (props: SVGProps) => ( +export const SvgBookmarkOutlineAdd = (props: SVGProps) => ( ) => ( /> ); -export default SvgBookmarkOutlineAdd; diff --git a/packages/desktop-client/src/icons/v1/BorderAll.tsx b/packages/desktop-client/src/icons/v1/BorderAll.tsx index e605c187271..98878143965 100644 --- a/packages/desktop-client/src/icons/v1/BorderAll.tsx +++ b/packages/desktop-client/src/icons/v1/BorderAll.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBorderAll = (props: SVGProps) => ( +export const SvgBorderAll = (props: SVGProps) => ( ) => ( /> ); -export default SvgBorderAll; diff --git a/packages/desktop-client/src/icons/v1/BorderBottom.tsx b/packages/desktop-client/src/icons/v1/BorderBottom.tsx index b68a05bb050..02be541d333 100644 --- a/packages/desktop-client/src/icons/v1/BorderBottom.tsx +++ b/packages/desktop-client/src/icons/v1/BorderBottom.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBorderBottom = (props: SVGProps) => ( +export const SvgBorderBottom = (props: SVGProps) => ( ) => ( /> ); -export default SvgBorderBottom; diff --git a/packages/desktop-client/src/icons/v1/BorderHorizontal.tsx b/packages/desktop-client/src/icons/v1/BorderHorizontal.tsx index 00495f1ddfa..a7845bd1ee3 100644 --- a/packages/desktop-client/src/icons/v1/BorderHorizontal.tsx +++ b/packages/desktop-client/src/icons/v1/BorderHorizontal.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBorderHorizontal = (props: SVGProps) => ( +export const SvgBorderHorizontal = (props: SVGProps) => ( ) => ( /> ); -export default SvgBorderHorizontal; diff --git a/packages/desktop-client/src/icons/v1/BorderInner.tsx b/packages/desktop-client/src/icons/v1/BorderInner.tsx index d29a994de70..50e1f9578aa 100644 --- a/packages/desktop-client/src/icons/v1/BorderInner.tsx +++ b/packages/desktop-client/src/icons/v1/BorderInner.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBorderInner = (props: SVGProps) => ( +export const SvgBorderInner = (props: SVGProps) => ( ) => ( /> ); -export default SvgBorderInner; diff --git a/packages/desktop-client/src/icons/v1/BorderLeft.tsx b/packages/desktop-client/src/icons/v1/BorderLeft.tsx index be056c8507d..ef4af27a826 100644 --- a/packages/desktop-client/src/icons/v1/BorderLeft.tsx +++ b/packages/desktop-client/src/icons/v1/BorderLeft.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBorderLeft = (props: SVGProps) => ( +export const SvgBorderLeft = (props: SVGProps) => ( ) => ( /> ); -export default SvgBorderLeft; diff --git a/packages/desktop-client/src/icons/v1/BorderNone.tsx b/packages/desktop-client/src/icons/v1/BorderNone.tsx index 5d8b22530f4..a1dd526d894 100644 --- a/packages/desktop-client/src/icons/v1/BorderNone.tsx +++ b/packages/desktop-client/src/icons/v1/BorderNone.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBorderNone = (props: SVGProps) => ( +export const SvgBorderNone = (props: SVGProps) => ( ) => ( /> ); -export default SvgBorderNone; diff --git a/packages/desktop-client/src/icons/v1/BorderOuter.tsx b/packages/desktop-client/src/icons/v1/BorderOuter.tsx index c4227c22f99..65562f17988 100644 --- a/packages/desktop-client/src/icons/v1/BorderOuter.tsx +++ b/packages/desktop-client/src/icons/v1/BorderOuter.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBorderOuter = (props: SVGProps) => ( +export const SvgBorderOuter = (props: SVGProps) => ( ) => ( /> ); -export default SvgBorderOuter; diff --git a/packages/desktop-client/src/icons/v1/BorderRight.tsx b/packages/desktop-client/src/icons/v1/BorderRight.tsx index 5ca488833b3..af299c231ec 100644 --- a/packages/desktop-client/src/icons/v1/BorderRight.tsx +++ b/packages/desktop-client/src/icons/v1/BorderRight.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBorderRight = (props: SVGProps) => ( +export const SvgBorderRight = (props: SVGProps) => ( ) => ( /> ); -export default SvgBorderRight; diff --git a/packages/desktop-client/src/icons/v1/BorderTop.tsx b/packages/desktop-client/src/icons/v1/BorderTop.tsx index 33f8b022981..2c2b89cf957 100644 --- a/packages/desktop-client/src/icons/v1/BorderTop.tsx +++ b/packages/desktop-client/src/icons/v1/BorderTop.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBorderTop = (props: SVGProps) => ( +export const SvgBorderTop = (props: SVGProps) => ( ) => ( /> ); -export default SvgBorderTop; diff --git a/packages/desktop-client/src/icons/v1/BorderVertical.tsx b/packages/desktop-client/src/icons/v1/BorderVertical.tsx index 34321d2171e..66934668021 100644 --- a/packages/desktop-client/src/icons/v1/BorderVertical.tsx +++ b/packages/desktop-client/src/icons/v1/BorderVertical.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBorderVertical = (props: SVGProps) => ( +export const SvgBorderVertical = (props: SVGProps) => ( ) => ( /> ); -export default SvgBorderVertical; diff --git a/packages/desktop-client/src/icons/v1/Box.tsx b/packages/desktop-client/src/icons/v1/Box.tsx index e783b16c9b5..60393b4c8be 100644 --- a/packages/desktop-client/src/icons/v1/Box.tsx +++ b/packages/desktop-client/src/icons/v1/Box.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBox = (props: SVGProps) => ( +export const SvgBox = (props: SVGProps) => ( ) => ( /> ); -export default SvgBox; diff --git a/packages/desktop-client/src/icons/v1/BrightnessDown.tsx b/packages/desktop-client/src/icons/v1/BrightnessDown.tsx index c15a10854de..65052a75314 100644 --- a/packages/desktop-client/src/icons/v1/BrightnessDown.tsx +++ b/packages/desktop-client/src/icons/v1/BrightnessDown.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBrightnessDown = (props: SVGProps) => ( +export const SvgBrightnessDown = (props: SVGProps) => ( ) => ( /> ); -export default SvgBrightnessDown; diff --git a/packages/desktop-client/src/icons/v1/BrightnessUp.tsx b/packages/desktop-client/src/icons/v1/BrightnessUp.tsx index a4b55f99593..2eb92b30525 100644 --- a/packages/desktop-client/src/icons/v1/BrightnessUp.tsx +++ b/packages/desktop-client/src/icons/v1/BrightnessUp.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBrightnessUp = (props: SVGProps) => ( +export const SvgBrightnessUp = (props: SVGProps) => ( ) => ( /> ); -export default SvgBrightnessUp; diff --git a/packages/desktop-client/src/icons/v1/BrowserWindow.tsx b/packages/desktop-client/src/icons/v1/BrowserWindow.tsx index 703cc025471..9a2bb5af319 100644 --- a/packages/desktop-client/src/icons/v1/BrowserWindow.tsx +++ b/packages/desktop-client/src/icons/v1/BrowserWindow.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBrowserWindow = (props: SVGProps) => ( +export const SvgBrowserWindow = (props: SVGProps) => ( ) => ( /> ); -export default SvgBrowserWindow; diff --git a/packages/desktop-client/src/icons/v1/BrowserWindowNew.tsx b/packages/desktop-client/src/icons/v1/BrowserWindowNew.tsx index 8e8ec8af3d0..3545689cf60 100644 --- a/packages/desktop-client/src/icons/v1/BrowserWindowNew.tsx +++ b/packages/desktop-client/src/icons/v1/BrowserWindowNew.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBrowserWindowNew = (props: SVGProps) => ( +export const SvgBrowserWindowNew = (props: SVGProps) => ( ) => ( /> ); -export default SvgBrowserWindowNew; diff --git a/packages/desktop-client/src/icons/v1/BrowserWindowOpen.tsx b/packages/desktop-client/src/icons/v1/BrowserWindowOpen.tsx index a38058e1af3..d27685ae9fb 100644 --- a/packages/desktop-client/src/icons/v1/BrowserWindowOpen.tsx +++ b/packages/desktop-client/src/icons/v1/BrowserWindowOpen.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBrowserWindowOpen = (props: SVGProps) => ( +export const SvgBrowserWindowOpen = (props: SVGProps) => ( ) => ( /> ); -export default SvgBrowserWindowOpen; diff --git a/packages/desktop-client/src/icons/v1/Bug.tsx b/packages/desktop-client/src/icons/v1/Bug.tsx index e0a8ed5f715..7676a36280d 100644 --- a/packages/desktop-client/src/icons/v1/Bug.tsx +++ b/packages/desktop-client/src/icons/v1/Bug.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBug = (props: SVGProps) => ( +export const SvgBug = (props: SVGProps) => ( ) => ( /> ); -export default SvgBug; diff --git a/packages/desktop-client/src/icons/v1/Buoy.tsx b/packages/desktop-client/src/icons/v1/Buoy.tsx index 1f3c1df7a90..05fff9ff800 100644 --- a/packages/desktop-client/src/icons/v1/Buoy.tsx +++ b/packages/desktop-client/src/icons/v1/Buoy.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgBuoy = (props: SVGProps) => ( +export const SvgBuoy = (props: SVGProps) => ( ) => ( /> ); -export default SvgBuoy; diff --git a/packages/desktop-client/src/icons/v1/Calculator.tsx b/packages/desktop-client/src/icons/v1/Calculator.tsx index 7400394b84e..264858a763a 100644 --- a/packages/desktop-client/src/icons/v1/Calculator.tsx +++ b/packages/desktop-client/src/icons/v1/Calculator.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCalculator = (props: SVGProps) => ( +export const SvgCalculator = (props: SVGProps) => ( ) => ( /> ); -export default SvgCalculator; diff --git a/packages/desktop-client/src/icons/v1/Calendar.tsx b/packages/desktop-client/src/icons/v1/Calendar.tsx index e6680cbde64..9f8d9dcf426 100644 --- a/packages/desktop-client/src/icons/v1/Calendar.tsx +++ b/packages/desktop-client/src/icons/v1/Calendar.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCalendar = (props: SVGProps) => ( +export const SvgCalendar = (props: SVGProps) => ( ) => ( /> ); -export default SvgCalendar; diff --git a/packages/desktop-client/src/icons/v1/Camera.tsx b/packages/desktop-client/src/icons/v1/Camera.tsx index 43d14b76cbb..17d32a37fe1 100644 --- a/packages/desktop-client/src/icons/v1/Camera.tsx +++ b/packages/desktop-client/src/icons/v1/Camera.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCamera = (props: SVGProps) => ( +export const SvgCamera = (props: SVGProps) => ( ) => ( /> ); -export default SvgCamera; diff --git a/packages/desktop-client/src/icons/v1/Chart.tsx b/packages/desktop-client/src/icons/v1/Chart.tsx index 935b066ab85..a42e6bae45a 100644 --- a/packages/desktop-client/src/icons/v1/Chart.tsx +++ b/packages/desktop-client/src/icons/v1/Chart.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgChart = (props: SVGProps) => ( +export const SvgChart = (props: SVGProps) => ( ) => ( /> ); -export default SvgChart; diff --git a/packages/desktop-client/src/icons/v1/ChartBar.tsx b/packages/desktop-client/src/icons/v1/ChartBar.tsx index 1732ca13ec8..35af1613dfb 100644 --- a/packages/desktop-client/src/icons/v1/ChartBar.tsx +++ b/packages/desktop-client/src/icons/v1/ChartBar.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgChartBar = (props: SVGProps) => ( +export const SvgChartBar = (props: SVGProps) => ( ) => ( /> ); -export default SvgChartBar; diff --git a/packages/desktop-client/src/icons/v1/ChartPie.tsx b/packages/desktop-client/src/icons/v1/ChartPie.tsx index 47755340db1..977969359f8 100644 --- a/packages/desktop-client/src/icons/v1/ChartPie.tsx +++ b/packages/desktop-client/src/icons/v1/ChartPie.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgChartPie = (props: SVGProps) => ( +export const SvgChartPie = (props: SVGProps) => ( ) => ( /> ); -export default SvgChartPie; diff --git a/packages/desktop-client/src/icons/v1/ChatBubbleDots.tsx b/packages/desktop-client/src/icons/v1/ChatBubbleDots.tsx index 8d2a3ea6537..df5feb25418 100644 --- a/packages/desktop-client/src/icons/v1/ChatBubbleDots.tsx +++ b/packages/desktop-client/src/icons/v1/ChatBubbleDots.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgChatBubbleDots = (props: SVGProps) => ( +export const SvgChatBubbleDots = (props: SVGProps) => ( ) => ( /> ); -export default SvgChatBubbleDots; diff --git a/packages/desktop-client/src/icons/v1/CheckAlternative.tsx b/packages/desktop-client/src/icons/v1/CheckAlternative.tsx index d5f846cfa98..5ac5e075038 100644 --- a/packages/desktop-client/src/icons/v1/CheckAlternative.tsx +++ b/packages/desktop-client/src/icons/v1/CheckAlternative.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheckAlternative = (props: SVGProps) => ( +export const SvgCheckAlternative = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheckAlternative; diff --git a/packages/desktop-client/src/icons/v1/Checkmark.tsx b/packages/desktop-client/src/icons/v1/Checkmark.tsx index d361b8f9b6b..5e98954c330 100644 --- a/packages/desktop-client/src/icons/v1/Checkmark.tsx +++ b/packages/desktop-client/src/icons/v1/Checkmark.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheckmark = (props: SVGProps) => ( +export const SvgCheckmark = (props: SVGProps) => ( ) => ( ); -export default SvgCheckmark; diff --git a/packages/desktop-client/src/icons/v1/CheckmarkOutline.tsx b/packages/desktop-client/src/icons/v1/CheckmarkOutline.tsx index 94439524698..2ab4f804a85 100644 --- a/packages/desktop-client/src/icons/v1/CheckmarkOutline.tsx +++ b/packages/desktop-client/src/icons/v1/CheckmarkOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheckmarkOutline = (props: SVGProps) => ( +export const SvgCheckmarkOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheckmarkOutline; diff --git a/packages/desktop-client/src/icons/v1/CheveronDown.tsx b/packages/desktop-client/src/icons/v1/CheveronDown.tsx index 66d27527f9d..72428d81660 100644 --- a/packages/desktop-client/src/icons/v1/CheveronDown.tsx +++ b/packages/desktop-client/src/icons/v1/CheveronDown.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheveronDown = (props: SVGProps) => ( +export const SvgCheveronDown = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheveronDown; diff --git a/packages/desktop-client/src/icons/v1/CheveronLeft.tsx b/packages/desktop-client/src/icons/v1/CheveronLeft.tsx index d512ee8f1d2..fa9dabb5064 100644 --- a/packages/desktop-client/src/icons/v1/CheveronLeft.tsx +++ b/packages/desktop-client/src/icons/v1/CheveronLeft.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheveronLeft = (props: SVGProps) => ( +export const SvgCheveronLeft = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheveronLeft; diff --git a/packages/desktop-client/src/icons/v1/CheveronOutlineDown.tsx b/packages/desktop-client/src/icons/v1/CheveronOutlineDown.tsx index 69817f72ad1..693b9ae2191 100644 --- a/packages/desktop-client/src/icons/v1/CheveronOutlineDown.tsx +++ b/packages/desktop-client/src/icons/v1/CheveronOutlineDown.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheveronOutlineDown = (props: SVGProps) => ( +export const SvgCheveronOutlineDown = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheveronOutlineDown; diff --git a/packages/desktop-client/src/icons/v1/CheveronOutlineLeft.tsx b/packages/desktop-client/src/icons/v1/CheveronOutlineLeft.tsx index bfc37d9ac87..6320d3ccd45 100644 --- a/packages/desktop-client/src/icons/v1/CheveronOutlineLeft.tsx +++ b/packages/desktop-client/src/icons/v1/CheveronOutlineLeft.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheveronOutlineLeft = (props: SVGProps) => ( +export const SvgCheveronOutlineLeft = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheveronOutlineLeft; diff --git a/packages/desktop-client/src/icons/v1/CheveronOutlineRight.tsx b/packages/desktop-client/src/icons/v1/CheveronOutlineRight.tsx index abd1748bfa2..577417f769c 100644 --- a/packages/desktop-client/src/icons/v1/CheveronOutlineRight.tsx +++ b/packages/desktop-client/src/icons/v1/CheveronOutlineRight.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheveronOutlineRight = (props: SVGProps) => ( +export const SvgCheveronOutlineRight = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheveronOutlineRight; diff --git a/packages/desktop-client/src/icons/v1/CheveronOutlineUp.tsx b/packages/desktop-client/src/icons/v1/CheveronOutlineUp.tsx index 1d8500a47bb..b6efe1b7f0a 100644 --- a/packages/desktop-client/src/icons/v1/CheveronOutlineUp.tsx +++ b/packages/desktop-client/src/icons/v1/CheveronOutlineUp.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheveronOutlineUp = (props: SVGProps) => ( +export const SvgCheveronOutlineUp = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheveronOutlineUp; diff --git a/packages/desktop-client/src/icons/v1/CheveronRight.tsx b/packages/desktop-client/src/icons/v1/CheveronRight.tsx index 516aef5511a..3e41b601f1c 100644 --- a/packages/desktop-client/src/icons/v1/CheveronRight.tsx +++ b/packages/desktop-client/src/icons/v1/CheveronRight.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheveronRight = (props: SVGProps) => ( +export const SvgCheveronRight = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheveronRight; diff --git a/packages/desktop-client/src/icons/v1/CheveronUp.tsx b/packages/desktop-client/src/icons/v1/CheveronUp.tsx index 4fc983ecc82..a533dc8798b 100644 --- a/packages/desktop-client/src/icons/v1/CheveronUp.tsx +++ b/packages/desktop-client/src/icons/v1/CheveronUp.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheveronUp = (props: SVGProps) => ( +export const SvgCheveronUp = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheveronUp; diff --git a/packages/desktop-client/src/icons/v1/Clipboard.tsx b/packages/desktop-client/src/icons/v1/Clipboard.tsx index 987eed3852d..c1e56ba8c7a 100644 --- a/packages/desktop-client/src/icons/v1/Clipboard.tsx +++ b/packages/desktop-client/src/icons/v1/Clipboard.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgClipboard = (props: SVGProps) => ( +export const SvgClipboard = (props: SVGProps) => ( ) => ( /> ); -export default SvgClipboard; diff --git a/packages/desktop-client/src/icons/v1/Close.tsx b/packages/desktop-client/src/icons/v1/Close.tsx index a4a065e25e1..b2868a4920e 100644 --- a/packages/desktop-client/src/icons/v1/Close.tsx +++ b/packages/desktop-client/src/icons/v1/Close.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgClose = (props: SVGProps) => ( +export const SvgClose = (props: SVGProps) => ( ) => ( /> ); -export default SvgClose; diff --git a/packages/desktop-client/src/icons/v1/CloseOutline.tsx b/packages/desktop-client/src/icons/v1/CloseOutline.tsx index 5faaf9dda91..d15c3a9b20a 100644 --- a/packages/desktop-client/src/icons/v1/CloseOutline.tsx +++ b/packages/desktop-client/src/icons/v1/CloseOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCloseOutline = (props: SVGProps) => ( +export const SvgCloseOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgCloseOutline; diff --git a/packages/desktop-client/src/icons/v1/CloseSolid.tsx b/packages/desktop-client/src/icons/v1/CloseSolid.tsx index 4384d5df6a8..dcbdeae268f 100644 --- a/packages/desktop-client/src/icons/v1/CloseSolid.tsx +++ b/packages/desktop-client/src/icons/v1/CloseSolid.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCloseSolid = (props: SVGProps) => ( +export const SvgCloseSolid = (props: SVGProps) => ( ) => ( /> ); -export default SvgCloseSolid; diff --git a/packages/desktop-client/src/icons/v1/Cloud.tsx b/packages/desktop-client/src/icons/v1/Cloud.tsx index 43e05923047..7a3eed160c9 100644 --- a/packages/desktop-client/src/icons/v1/Cloud.tsx +++ b/packages/desktop-client/src/icons/v1/Cloud.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCloud = (props: SVGProps) => ( +export const SvgCloud = (props: SVGProps) => ( ) => ( /> ); -export default SvgCloud; diff --git a/packages/desktop-client/src/icons/v1/CloudCheck.tsx b/packages/desktop-client/src/icons/v1/CloudCheck.tsx index 52b5e14d1a8..ce93bebb3a4 100644 --- a/packages/desktop-client/src/icons/v1/CloudCheck.tsx +++ b/packages/desktop-client/src/icons/v1/CloudCheck.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCloudCheck = (props: SVGProps) => ( +export const SvgCloudCheck = (props: SVGProps) => ( ) => ( /> ); -export default SvgCloudCheck; diff --git a/packages/desktop-client/src/icons/v1/CloudDownload.tsx b/packages/desktop-client/src/icons/v1/CloudDownload.tsx index 1b82d56d423..02c2dfd0f89 100644 --- a/packages/desktop-client/src/icons/v1/CloudDownload.tsx +++ b/packages/desktop-client/src/icons/v1/CloudDownload.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCloudDownload = (props: SVGProps) => ( +export const SvgCloudDownload = (props: SVGProps) => ( ) => ( /> ); -export default SvgCloudDownload; diff --git a/packages/desktop-client/src/icons/v1/CloudUpload.tsx b/packages/desktop-client/src/icons/v1/CloudUpload.tsx index a8fe45685ff..44fe9eb4bbe 100644 --- a/packages/desktop-client/src/icons/v1/CloudUpload.tsx +++ b/packages/desktop-client/src/icons/v1/CloudUpload.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCloudUpload = (props: SVGProps) => ( +export const SvgCloudUpload = (props: SVGProps) => ( ) => ( /> ); -export default SvgCloudUpload; diff --git a/packages/desktop-client/src/icons/v1/CloudWarning.tsx b/packages/desktop-client/src/icons/v1/CloudWarning.tsx index 5fa1206e77c..67f59cd2075 100644 --- a/packages/desktop-client/src/icons/v1/CloudWarning.tsx +++ b/packages/desktop-client/src/icons/v1/CloudWarning.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCloudWarning = (props: SVGProps) => ( +export const SvgCloudWarning = (props: SVGProps) => ( ) => ( /> ); -export default SvgCloudWarning; diff --git a/packages/desktop-client/src/icons/v1/Code.tsx b/packages/desktop-client/src/icons/v1/Code.tsx index 244d70aee1c..e8bf2219684 100644 --- a/packages/desktop-client/src/icons/v1/Code.tsx +++ b/packages/desktop-client/src/icons/v1/Code.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCode = (props: SVGProps) => ( +export const SvgCode = (props: SVGProps) => ( ) => ( /> ); -export default SvgCode; diff --git a/packages/desktop-client/src/icons/v1/Coffee.tsx b/packages/desktop-client/src/icons/v1/Coffee.tsx index b23aac1aeda..203a8589d46 100644 --- a/packages/desktop-client/src/icons/v1/Coffee.tsx +++ b/packages/desktop-client/src/icons/v1/Coffee.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCoffee = (props: SVGProps) => ( +export const SvgCoffee = (props: SVGProps) => ( ) => ( /> ); -export default SvgCoffee; diff --git a/packages/desktop-client/src/icons/v1/Cog.tsx b/packages/desktop-client/src/icons/v1/Cog.tsx index 98f9ba244f1..33c2ff3d85f 100644 --- a/packages/desktop-client/src/icons/v1/Cog.tsx +++ b/packages/desktop-client/src/icons/v1/Cog.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCog = (props: SVGProps) => ( +export const SvgCog = (props: SVGProps) => ( ) => ( /> ); -export default SvgCog; diff --git a/packages/desktop-client/src/icons/v1/ColorPalette.tsx b/packages/desktop-client/src/icons/v1/ColorPalette.tsx index db2e267d43e..c8274609ff5 100644 --- a/packages/desktop-client/src/icons/v1/ColorPalette.tsx +++ b/packages/desktop-client/src/icons/v1/ColorPalette.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgColorPalette = (props: SVGProps) => ( +export const SvgColorPalette = (props: SVGProps) => ( ) => ( /> ); -export default SvgColorPalette; diff --git a/packages/desktop-client/src/icons/v1/Compose.tsx b/packages/desktop-client/src/icons/v1/Compose.tsx index 8504943d989..2838d0ab9ce 100644 --- a/packages/desktop-client/src/icons/v1/Compose.tsx +++ b/packages/desktop-client/src/icons/v1/Compose.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCompose = (props: SVGProps) => ( +export const SvgCompose = (props: SVGProps) => ( ) => ( /> ); -export default SvgCompose; diff --git a/packages/desktop-client/src/icons/v1/ComputerDesktop.tsx b/packages/desktop-client/src/icons/v1/ComputerDesktop.tsx index 89b0c9cac4c..5dbf61fadfa 100644 --- a/packages/desktop-client/src/icons/v1/ComputerDesktop.tsx +++ b/packages/desktop-client/src/icons/v1/ComputerDesktop.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgComputerDesktop = (props: SVGProps) => ( +export const SvgComputerDesktop = (props: SVGProps) => ( ) => ( /> ); -export default SvgComputerDesktop; diff --git a/packages/desktop-client/src/icons/v1/ComputerLaptop.tsx b/packages/desktop-client/src/icons/v1/ComputerLaptop.tsx index b0e14e4ab65..caf62cfca98 100644 --- a/packages/desktop-client/src/icons/v1/ComputerLaptop.tsx +++ b/packages/desktop-client/src/icons/v1/ComputerLaptop.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgComputerLaptop = (props: SVGProps) => ( +export const SvgComputerLaptop = (props: SVGProps) => ( ) => ( /> ); -export default SvgComputerLaptop; diff --git a/packages/desktop-client/src/icons/v1/Conversation.tsx b/packages/desktop-client/src/icons/v1/Conversation.tsx index 0aace943735..8ac9f5108ed 100644 --- a/packages/desktop-client/src/icons/v1/Conversation.tsx +++ b/packages/desktop-client/src/icons/v1/Conversation.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgConversation = (props: SVGProps) => ( +export const SvgConversation = (props: SVGProps) => ( ) => ( /> ); -export default SvgConversation; diff --git a/packages/desktop-client/src/icons/v1/Copy.tsx b/packages/desktop-client/src/icons/v1/Copy.tsx index 03b02f47295..2541c9bbf16 100644 --- a/packages/desktop-client/src/icons/v1/Copy.tsx +++ b/packages/desktop-client/src/icons/v1/Copy.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCopy = (props: SVGProps) => ( +export const SvgCopy = (props: SVGProps) => ( ) => ( /> ); -export default SvgCopy; diff --git a/packages/desktop-client/src/icons/v1/CreditCard.tsx b/packages/desktop-client/src/icons/v1/CreditCard.tsx index 57c6757eead..0a5b03317d1 100644 --- a/packages/desktop-client/src/icons/v1/CreditCard.tsx +++ b/packages/desktop-client/src/icons/v1/CreditCard.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCreditCard = (props: SVGProps) => ( +export const SvgCreditCard = (props: SVGProps) => ( ) => ( /> ); -export default SvgCreditCard; diff --git a/packages/desktop-client/src/icons/v1/CurrencyDollar.tsx b/packages/desktop-client/src/icons/v1/CurrencyDollar.tsx index da4a1bd2bff..bc2dca52335 100644 --- a/packages/desktop-client/src/icons/v1/CurrencyDollar.tsx +++ b/packages/desktop-client/src/icons/v1/CurrencyDollar.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCurrencyDollar = (props: SVGProps) => ( +export const SvgCurrencyDollar = (props: SVGProps) => ( ) => ( /> ); -export default SvgCurrencyDollar; diff --git a/packages/desktop-client/src/icons/v1/Dashboard.tsx b/packages/desktop-client/src/icons/v1/Dashboard.tsx index ef1f3b6ac51..64924a430e7 100644 --- a/packages/desktop-client/src/icons/v1/Dashboard.tsx +++ b/packages/desktop-client/src/icons/v1/Dashboard.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDashboard = (props: SVGProps) => ( +export const SvgDashboard = (props: SVGProps) => ( ) => ( /> ); -export default SvgDashboard; diff --git a/packages/desktop-client/src/icons/v1/DateAdd.tsx b/packages/desktop-client/src/icons/v1/DateAdd.tsx index b35468fe6de..d25439a736f 100644 --- a/packages/desktop-client/src/icons/v1/DateAdd.tsx +++ b/packages/desktop-client/src/icons/v1/DateAdd.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDateAdd = (props: SVGProps) => ( +export const SvgDateAdd = (props: SVGProps) => ( ) => ( /> ); -export default SvgDateAdd; diff --git a/packages/desktop-client/src/icons/v1/DialPad.tsx b/packages/desktop-client/src/icons/v1/DialPad.tsx index 3dd91049c9d..76a1cc645b1 100644 --- a/packages/desktop-client/src/icons/v1/DialPad.tsx +++ b/packages/desktop-client/src/icons/v1/DialPad.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDialPad = (props: SVGProps) => ( +export const SvgDialPad = (props: SVGProps) => ( ) => ( /> ); -export default SvgDialPad; diff --git a/packages/desktop-client/src/icons/v1/Directions.tsx b/packages/desktop-client/src/icons/v1/Directions.tsx index 8db4bfe8135..fe5b152eea4 100644 --- a/packages/desktop-client/src/icons/v1/Directions.tsx +++ b/packages/desktop-client/src/icons/v1/Directions.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDirections = (props: SVGProps) => ( +export const SvgDirections = (props: SVGProps) => ( ) => ( /> ); -export default SvgDirections; diff --git a/packages/desktop-client/src/icons/v1/Document.tsx b/packages/desktop-client/src/icons/v1/Document.tsx index 0c726ba21f2..18083de8d4c 100644 --- a/packages/desktop-client/src/icons/v1/Document.tsx +++ b/packages/desktop-client/src/icons/v1/Document.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDocument = (props: SVGProps) => ( +export const SvgDocument = (props: SVGProps) => ( ) => ( /> ); -export default SvgDocument; diff --git a/packages/desktop-client/src/icons/v1/DocumentAdd.tsx b/packages/desktop-client/src/icons/v1/DocumentAdd.tsx index f9d4c3ae79e..1f087d8c802 100644 --- a/packages/desktop-client/src/icons/v1/DocumentAdd.tsx +++ b/packages/desktop-client/src/icons/v1/DocumentAdd.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDocumentAdd = (props: SVGProps) => ( +export const SvgDocumentAdd = (props: SVGProps) => ( ) => ( /> ); -export default SvgDocumentAdd; diff --git a/packages/desktop-client/src/icons/v1/DotsHorizontalDouble.tsx b/packages/desktop-client/src/icons/v1/DotsHorizontalDouble.tsx index 1638afd37d1..38b703f9e7e 100644 --- a/packages/desktop-client/src/icons/v1/DotsHorizontalDouble.tsx +++ b/packages/desktop-client/src/icons/v1/DotsHorizontalDouble.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDotsHorizontalDouble = (props: SVGProps) => ( +export const SvgDotsHorizontalDouble = (props: SVGProps) => ( ) => ( /> ); -export default SvgDotsHorizontalDouble; diff --git a/packages/desktop-client/src/icons/v1/DotsHorizontalTriple.tsx b/packages/desktop-client/src/icons/v1/DotsHorizontalTriple.tsx index 34c1bb5c9f3..bb61f490d0a 100644 --- a/packages/desktop-client/src/icons/v1/DotsHorizontalTriple.tsx +++ b/packages/desktop-client/src/icons/v1/DotsHorizontalTriple.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDotsHorizontalTriple = (props: SVGProps) => ( +export const SvgDotsHorizontalTriple = (props: SVGProps) => ( ) => ( /> ); -export default SvgDotsHorizontalTriple; diff --git a/packages/desktop-client/src/icons/v1/Download.tsx b/packages/desktop-client/src/icons/v1/Download.tsx index c699949d87f..9f0db316058 100644 --- a/packages/desktop-client/src/icons/v1/Download.tsx +++ b/packages/desktop-client/src/icons/v1/Download.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDownload = (props: SVGProps) => ( +export const SvgDownload = (props: SVGProps) => ( ) => ( ); -export default SvgDownload; diff --git a/packages/desktop-client/src/icons/v1/Duplicate.tsx b/packages/desktop-client/src/icons/v1/Duplicate.tsx index 9ac4806adf8..f2282355f26 100644 --- a/packages/desktop-client/src/icons/v1/Duplicate.tsx +++ b/packages/desktop-client/src/icons/v1/Duplicate.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDuplicate = (props: SVGProps) => ( +export const SvgDuplicate = (props: SVGProps) => ( ) => ( /> ); -export default SvgDuplicate; diff --git a/packages/desktop-client/src/icons/v1/EditCopy.tsx b/packages/desktop-client/src/icons/v1/EditCopy.tsx index c254099510b..b5c92cc613a 100644 --- a/packages/desktop-client/src/icons/v1/EditCopy.tsx +++ b/packages/desktop-client/src/icons/v1/EditCopy.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgEditCopy = (props: SVGProps) => ( +export const SvgEditCopy = (props: SVGProps) => ( ) => ( /> ); -export default SvgEditCopy; diff --git a/packages/desktop-client/src/icons/v1/EditCrop.tsx b/packages/desktop-client/src/icons/v1/EditCrop.tsx index f130943cc54..8f3149bef31 100644 --- a/packages/desktop-client/src/icons/v1/EditCrop.tsx +++ b/packages/desktop-client/src/icons/v1/EditCrop.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgEditCrop = (props: SVGProps) => ( +export const SvgEditCrop = (props: SVGProps) => ( ) => ( /> ); -export default SvgEditCrop; diff --git a/packages/desktop-client/src/icons/v1/EditCut.tsx b/packages/desktop-client/src/icons/v1/EditCut.tsx index 4bc1dc9edc8..42df1eb31c0 100644 --- a/packages/desktop-client/src/icons/v1/EditCut.tsx +++ b/packages/desktop-client/src/icons/v1/EditCut.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgEditCut = (props: SVGProps) => ( +export const SvgEditCut = (props: SVGProps) => ( ) => ( /> ); -export default SvgEditCut; diff --git a/packages/desktop-client/src/icons/v1/EditPencil.tsx b/packages/desktop-client/src/icons/v1/EditPencil.tsx index a4b00abe1ab..2d40d7d24c9 100644 --- a/packages/desktop-client/src/icons/v1/EditPencil.tsx +++ b/packages/desktop-client/src/icons/v1/EditPencil.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgEditPencil = (props: SVGProps) => ( +export const SvgEditPencil = (props: SVGProps) => ( ) => ( /> ); -export default SvgEditPencil; diff --git a/packages/desktop-client/src/icons/v1/Education.tsx b/packages/desktop-client/src/icons/v1/Education.tsx index 0b7f35f72e0..aecce59a921 100644 --- a/packages/desktop-client/src/icons/v1/Education.tsx +++ b/packages/desktop-client/src/icons/v1/Education.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgEducation = (props: SVGProps) => ( +export const SvgEducation = (props: SVGProps) => ( ) => ( /> ); -export default SvgEducation; diff --git a/packages/desktop-client/src/icons/v1/Envelope.tsx b/packages/desktop-client/src/icons/v1/Envelope.tsx index df5110c6008..725e6ed9b52 100644 --- a/packages/desktop-client/src/icons/v1/Envelope.tsx +++ b/packages/desktop-client/src/icons/v1/Envelope.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgEnvelope = (props: SVGProps) => ( +export const SvgEnvelope = (props: SVGProps) => ( ) => ( /> ); -export default SvgEnvelope; diff --git a/packages/desktop-client/src/icons/v1/Equals.tsx b/packages/desktop-client/src/icons/v1/Equals.tsx index 706480b2eb8..2d5a12f872e 100644 --- a/packages/desktop-client/src/icons/v1/Equals.tsx +++ b/packages/desktop-client/src/icons/v1/Equals.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgEquals = (props: SVGProps) => ( +export const SvgEquals = (props: SVGProps) => ( ) => ( /> ); -export default SvgEquals; diff --git a/packages/desktop-client/src/icons/v1/ExclamationOutline.tsx b/packages/desktop-client/src/icons/v1/ExclamationOutline.tsx index 8127276b4a1..6e924e94421 100644 --- a/packages/desktop-client/src/icons/v1/ExclamationOutline.tsx +++ b/packages/desktop-client/src/icons/v1/ExclamationOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgExclamationOutline = (props: SVGProps) => ( +export const SvgExclamationOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgExclamationOutline; diff --git a/packages/desktop-client/src/icons/v1/ExclamationSolid.tsx b/packages/desktop-client/src/icons/v1/ExclamationSolid.tsx index c07d177b31d..4a89f5c35ac 100644 --- a/packages/desktop-client/src/icons/v1/ExclamationSolid.tsx +++ b/packages/desktop-client/src/icons/v1/ExclamationSolid.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgExclamationSolid = (props: SVGProps) => ( +export const SvgExclamationSolid = (props: SVGProps) => ( ) => ( /> ); -export default SvgExclamationSolid; diff --git a/packages/desktop-client/src/icons/v1/Explore.tsx b/packages/desktop-client/src/icons/v1/Explore.tsx index 164024d3524..6ac2ac201c9 100644 --- a/packages/desktop-client/src/icons/v1/Explore.tsx +++ b/packages/desktop-client/src/icons/v1/Explore.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgExplore = (props: SVGProps) => ( +export const SvgExplore = (props: SVGProps) => ( ) => ( /> ); -export default SvgExplore; diff --git a/packages/desktop-client/src/icons/v1/Factory.tsx b/packages/desktop-client/src/icons/v1/Factory.tsx index 33674d39660..3f84d4e7bc7 100644 --- a/packages/desktop-client/src/icons/v1/Factory.tsx +++ b/packages/desktop-client/src/icons/v1/Factory.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFactory = (props: SVGProps) => ( +export const SvgFactory = (props: SVGProps) => ( ) => ( /> ); -export default SvgFactory; diff --git a/packages/desktop-client/src/icons/v1/FastForward.tsx b/packages/desktop-client/src/icons/v1/FastForward.tsx index 8059bbb40dd..799d09d870b 100644 --- a/packages/desktop-client/src/icons/v1/FastForward.tsx +++ b/packages/desktop-client/src/icons/v1/FastForward.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFastForward = (props: SVGProps) => ( +export const SvgFastForward = (props: SVGProps) => ( ) => ( ); -export default SvgFastForward; diff --git a/packages/desktop-client/src/icons/v1/FastRewind.tsx b/packages/desktop-client/src/icons/v1/FastRewind.tsx index 1cb9ea7737e..acb8d85039d 100644 --- a/packages/desktop-client/src/icons/v1/FastRewind.tsx +++ b/packages/desktop-client/src/icons/v1/FastRewind.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFastRewind = (props: SVGProps) => ( +export const SvgFastRewind = (props: SVGProps) => ( ) => ( ); -export default SvgFastRewind; diff --git a/packages/desktop-client/src/icons/v1/FileDouble.tsx b/packages/desktop-client/src/icons/v1/FileDouble.tsx index 3c31ac4d365..c97c12fae4c 100644 --- a/packages/desktop-client/src/icons/v1/FileDouble.tsx +++ b/packages/desktop-client/src/icons/v1/FileDouble.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFileDouble = (props: SVGProps) => ( +export const SvgFileDouble = (props: SVGProps) => ( ) => ( /> ); -export default SvgFileDouble; diff --git a/packages/desktop-client/src/icons/v1/Film.tsx b/packages/desktop-client/src/icons/v1/Film.tsx index ea5b80ced04..e7f4bce5698 100644 --- a/packages/desktop-client/src/icons/v1/Film.tsx +++ b/packages/desktop-client/src/icons/v1/Film.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFilm = (props: SVGProps) => ( +export const SvgFilm = (props: SVGProps) => ( ) => ( /> ); -export default SvgFilm; diff --git a/packages/desktop-client/src/icons/v1/Filter.tsx b/packages/desktop-client/src/icons/v1/Filter.tsx index 97e2011437b..5715c58a2c1 100644 --- a/packages/desktop-client/src/icons/v1/Filter.tsx +++ b/packages/desktop-client/src/icons/v1/Filter.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFilter = (props: SVGProps) => ( +export const SvgFilter = (props: SVGProps) => ( ) => ( ); -export default SvgFilter; diff --git a/packages/desktop-client/src/icons/v1/Flag.tsx b/packages/desktop-client/src/icons/v1/Flag.tsx index a2bf27ae2e3..5f8a0bd945e 100644 --- a/packages/desktop-client/src/icons/v1/Flag.tsx +++ b/packages/desktop-client/src/icons/v1/Flag.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFlag = (props: SVGProps) => ( +export const SvgFlag = (props: SVGProps) => ( ) => ( /> ); -export default SvgFlag; diff --git a/packages/desktop-client/src/icons/v1/Flashlight.tsx b/packages/desktop-client/src/icons/v1/Flashlight.tsx index 3480f3a60d1..4b0ae1ab605 100644 --- a/packages/desktop-client/src/icons/v1/Flashlight.tsx +++ b/packages/desktop-client/src/icons/v1/Flashlight.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFlashlight = (props: SVGProps) => ( +export const SvgFlashlight = (props: SVGProps) => ( ) => ( /> ); -export default SvgFlashlight; diff --git a/packages/desktop-client/src/icons/v1/Folder.tsx b/packages/desktop-client/src/icons/v1/Folder.tsx index e996cd0fdc5..93c88b62e45 100644 --- a/packages/desktop-client/src/icons/v1/Folder.tsx +++ b/packages/desktop-client/src/icons/v1/Folder.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFolder = (props: SVGProps) => ( +export const SvgFolder = (props: SVGProps) => ( ) => ( /> ); -export default SvgFolder; diff --git a/packages/desktop-client/src/icons/v1/FolderOutline.tsx b/packages/desktop-client/src/icons/v1/FolderOutline.tsx index 216e4dd02d2..7965f1eb1d7 100644 --- a/packages/desktop-client/src/icons/v1/FolderOutline.tsx +++ b/packages/desktop-client/src/icons/v1/FolderOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFolderOutline = (props: SVGProps) => ( +export const SvgFolderOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgFolderOutline; diff --git a/packages/desktop-client/src/icons/v1/FolderOutlineAdd.tsx b/packages/desktop-client/src/icons/v1/FolderOutlineAdd.tsx index 3c3ea264faf..a332c0b36c4 100644 --- a/packages/desktop-client/src/icons/v1/FolderOutlineAdd.tsx +++ b/packages/desktop-client/src/icons/v1/FolderOutlineAdd.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFolderOutlineAdd = (props: SVGProps) => ( +export const SvgFolderOutlineAdd = (props: SVGProps) => ( ) => ( /> ); -export default SvgFolderOutlineAdd; diff --git a/packages/desktop-client/src/icons/v1/FormatBold.tsx b/packages/desktop-client/src/icons/v1/FormatBold.tsx index df8d699b3eb..dea84ecad5c 100644 --- a/packages/desktop-client/src/icons/v1/FormatBold.tsx +++ b/packages/desktop-client/src/icons/v1/FormatBold.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFormatBold = (props: SVGProps) => ( +export const SvgFormatBold = (props: SVGProps) => ( ) => ( /> ); -export default SvgFormatBold; diff --git a/packages/desktop-client/src/icons/v1/FormatFontSize.tsx b/packages/desktop-client/src/icons/v1/FormatFontSize.tsx index b2fb0e94451..79d3f4510fb 100644 --- a/packages/desktop-client/src/icons/v1/FormatFontSize.tsx +++ b/packages/desktop-client/src/icons/v1/FormatFontSize.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFormatFontSize = (props: SVGProps) => ( +export const SvgFormatFontSize = (props: SVGProps) => ( ) => ( /> ); -export default SvgFormatFontSize; diff --git a/packages/desktop-client/src/icons/v1/FormatItalic.tsx b/packages/desktop-client/src/icons/v1/FormatItalic.tsx index 1e14728026c..7537bccfaf7 100644 --- a/packages/desktop-client/src/icons/v1/FormatItalic.tsx +++ b/packages/desktop-client/src/icons/v1/FormatItalic.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFormatItalic = (props: SVGProps) => ( +export const SvgFormatItalic = (props: SVGProps) => ( ) => ( /> ); -export default SvgFormatItalic; diff --git a/packages/desktop-client/src/icons/v1/FormatTextSize.tsx b/packages/desktop-client/src/icons/v1/FormatTextSize.tsx index 07a773cbdff..443a2c3d791 100644 --- a/packages/desktop-client/src/icons/v1/FormatTextSize.tsx +++ b/packages/desktop-client/src/icons/v1/FormatTextSize.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFormatTextSize = (props: SVGProps) => ( +export const SvgFormatTextSize = (props: SVGProps) => ( ) => ( /> ); -export default SvgFormatTextSize; diff --git a/packages/desktop-client/src/icons/v1/FormatUnderline.tsx b/packages/desktop-client/src/icons/v1/FormatUnderline.tsx index 404c4879550..5e5fd6ca5ab 100644 --- a/packages/desktop-client/src/icons/v1/FormatUnderline.tsx +++ b/packages/desktop-client/src/icons/v1/FormatUnderline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFormatUnderline = (props: SVGProps) => ( +export const SvgFormatUnderline = (props: SVGProps) => ( ) => ( /> ); -export default SvgFormatUnderline; diff --git a/packages/desktop-client/src/icons/v1/Forward.tsx b/packages/desktop-client/src/icons/v1/Forward.tsx index 0da201b6542..397008fbb21 100644 --- a/packages/desktop-client/src/icons/v1/Forward.tsx +++ b/packages/desktop-client/src/icons/v1/Forward.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgForward = (props: SVGProps) => ( +export const SvgForward = (props: SVGProps) => ( ) => ( ); -export default SvgForward; diff --git a/packages/desktop-client/src/icons/v1/ForwardStep.tsx b/packages/desktop-client/src/icons/v1/ForwardStep.tsx index 30b048a98c3..15a51c02779 100644 --- a/packages/desktop-client/src/icons/v1/ForwardStep.tsx +++ b/packages/desktop-client/src/icons/v1/ForwardStep.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgForwardStep = (props: SVGProps) => ( +export const SvgForwardStep = (props: SVGProps) => ( ) => ( ); -export default SvgForwardStep; diff --git a/packages/desktop-client/src/icons/v1/Gift.tsx b/packages/desktop-client/src/icons/v1/Gift.tsx index d192283960b..fc0add14fcd 100644 --- a/packages/desktop-client/src/icons/v1/Gift.tsx +++ b/packages/desktop-client/src/icons/v1/Gift.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgGift = (props: SVGProps) => ( +export const SvgGift = (props: SVGProps) => ( ) => ( /> ); -export default SvgGift; diff --git a/packages/desktop-client/src/icons/v1/Globe.tsx b/packages/desktop-client/src/icons/v1/Globe.tsx index 03d391364f1..63b63fcf417 100644 --- a/packages/desktop-client/src/icons/v1/Globe.tsx +++ b/packages/desktop-client/src/icons/v1/Globe.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgGlobe = (props: SVGProps) => ( +export const SvgGlobe = (props: SVGProps) => ( ) => ( /> ); -export default SvgGlobe; diff --git a/packages/desktop-client/src/icons/v1/HandStop.tsx b/packages/desktop-client/src/icons/v1/HandStop.tsx index 47f3a3fbc19..9f56edaef34 100644 --- a/packages/desktop-client/src/icons/v1/HandStop.tsx +++ b/packages/desktop-client/src/icons/v1/HandStop.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgHandStop = (props: SVGProps) => ( +export const SvgHandStop = (props: SVGProps) => ( ) => ( /> ); -export default SvgHandStop; diff --git a/packages/desktop-client/src/icons/v1/HardDrive.tsx b/packages/desktop-client/src/icons/v1/HardDrive.tsx index c7d363ad942..aa48cd0776f 100644 --- a/packages/desktop-client/src/icons/v1/HardDrive.tsx +++ b/packages/desktop-client/src/icons/v1/HardDrive.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgHardDrive = (props: SVGProps) => ( +export const SvgHardDrive = (props: SVGProps) => ( ) => ( /> ); -export default SvgHardDrive; diff --git a/packages/desktop-client/src/icons/v1/Headphones.tsx b/packages/desktop-client/src/icons/v1/Headphones.tsx index 53b5b37bb02..2c898ee9686 100644 --- a/packages/desktop-client/src/icons/v1/Headphones.tsx +++ b/packages/desktop-client/src/icons/v1/Headphones.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgHeadphones = (props: SVGProps) => ( +export const SvgHeadphones = (props: SVGProps) => ( ) => ( /> ); -export default SvgHeadphones; diff --git a/packages/desktop-client/src/icons/v1/Heart.tsx b/packages/desktop-client/src/icons/v1/Heart.tsx index 004474ca80b..d43f614a8ca 100644 --- a/packages/desktop-client/src/icons/v1/Heart.tsx +++ b/packages/desktop-client/src/icons/v1/Heart.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgHeart = (props: SVGProps) => ( +export const SvgHeart = (props: SVGProps) => ( ) => ( /> ); -export default SvgHeart; diff --git a/packages/desktop-client/src/icons/v1/Home.tsx b/packages/desktop-client/src/icons/v1/Home.tsx index b792f75b861..48efef67d99 100644 --- a/packages/desktop-client/src/icons/v1/Home.tsx +++ b/packages/desktop-client/src/icons/v1/Home.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgHome = (props: SVGProps) => ( +export const SvgHome = (props: SVGProps) => ( ) => ( ); -export default SvgHome; diff --git a/packages/desktop-client/src/icons/v1/Hot.tsx b/packages/desktop-client/src/icons/v1/Hot.tsx index 4d4cf93dc49..d96b7e1220c 100644 --- a/packages/desktop-client/src/icons/v1/Hot.tsx +++ b/packages/desktop-client/src/icons/v1/Hot.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgHot = (props: SVGProps) => ( +export const SvgHot = (props: SVGProps) => ( ) => ( /> ); -export default SvgHot; diff --git a/packages/desktop-client/src/icons/v1/HourGlass.tsx b/packages/desktop-client/src/icons/v1/HourGlass.tsx index 900f37bab56..917130b6ce1 100644 --- a/packages/desktop-client/src/icons/v1/HourGlass.tsx +++ b/packages/desktop-client/src/icons/v1/HourGlass.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgHourGlass = (props: SVGProps) => ( +export const SvgHourGlass = (props: SVGProps) => ( ) => ( /> ); -export default SvgHourGlass; diff --git a/packages/desktop-client/src/icons/v1/Inbox.tsx b/packages/desktop-client/src/icons/v1/Inbox.tsx index 0aa6b60d064..e069ebb453a 100644 --- a/packages/desktop-client/src/icons/v1/Inbox.tsx +++ b/packages/desktop-client/src/icons/v1/Inbox.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgInbox = (props: SVGProps) => ( +export const SvgInbox = (props: SVGProps) => ( ) => ( /> ); -export default SvgInbox; diff --git a/packages/desktop-client/src/icons/v1/InboxCheck.tsx b/packages/desktop-client/src/icons/v1/InboxCheck.tsx index 21fa2983d5e..e98d52d6db5 100644 --- a/packages/desktop-client/src/icons/v1/InboxCheck.tsx +++ b/packages/desktop-client/src/icons/v1/InboxCheck.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgInboxCheck = (props: SVGProps) => ( +export const SvgInboxCheck = (props: SVGProps) => ( ) => ( /> ); -export default SvgInboxCheck; diff --git a/packages/desktop-client/src/icons/v1/InboxDownload.tsx b/packages/desktop-client/src/icons/v1/InboxDownload.tsx index 6e1715e6b0f..334e41ad400 100644 --- a/packages/desktop-client/src/icons/v1/InboxDownload.tsx +++ b/packages/desktop-client/src/icons/v1/InboxDownload.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgInboxDownload = (props: SVGProps) => ( +export const SvgInboxDownload = (props: SVGProps) => ( ) => ( /> ); -export default SvgInboxDownload; diff --git a/packages/desktop-client/src/icons/v1/InboxFull.tsx b/packages/desktop-client/src/icons/v1/InboxFull.tsx index 71a10b53a1e..b9aed457453 100644 --- a/packages/desktop-client/src/icons/v1/InboxFull.tsx +++ b/packages/desktop-client/src/icons/v1/InboxFull.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgInboxFull = (props: SVGProps) => ( +export const SvgInboxFull = (props: SVGProps) => ( ) => ( /> ); -export default SvgInboxFull; diff --git a/packages/desktop-client/src/icons/v1/IndentDecrease.tsx b/packages/desktop-client/src/icons/v1/IndentDecrease.tsx index 9d5c5c29001..6194bb00b9f 100644 --- a/packages/desktop-client/src/icons/v1/IndentDecrease.tsx +++ b/packages/desktop-client/src/icons/v1/IndentDecrease.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgIndentDecrease = (props: SVGProps) => ( +export const SvgIndentDecrease = (props: SVGProps) => ( ) => ( /> ); -export default SvgIndentDecrease; diff --git a/packages/desktop-client/src/icons/v1/IndentIncrease.tsx b/packages/desktop-client/src/icons/v1/IndentIncrease.tsx index 58114f21274..60a2aaf8534 100644 --- a/packages/desktop-client/src/icons/v1/IndentIncrease.tsx +++ b/packages/desktop-client/src/icons/v1/IndentIncrease.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgIndentIncrease = (props: SVGProps) => ( +export const SvgIndentIncrease = (props: SVGProps) => ( ) => ( /> ); -export default SvgIndentIncrease; diff --git a/packages/desktop-client/src/icons/v1/InformationOutline.tsx b/packages/desktop-client/src/icons/v1/InformationOutline.tsx index e9824e83517..b64bbe9f8ca 100644 --- a/packages/desktop-client/src/icons/v1/InformationOutline.tsx +++ b/packages/desktop-client/src/icons/v1/InformationOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgInformationOutline = (props: SVGProps) => ( +export const SvgInformationOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgInformationOutline; diff --git a/packages/desktop-client/src/icons/v1/InformationSolid.tsx b/packages/desktop-client/src/icons/v1/InformationSolid.tsx index 8de816ac6cf..6f3390b91fc 100644 --- a/packages/desktop-client/src/icons/v1/InformationSolid.tsx +++ b/packages/desktop-client/src/icons/v1/InformationSolid.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgInformationSolid = (props: SVGProps) => ( +export const SvgInformationSolid = (props: SVGProps) => ( ) => ( /> ); -export default SvgInformationSolid; diff --git a/packages/desktop-client/src/icons/v1/Key.tsx b/packages/desktop-client/src/icons/v1/Key.tsx index 1ddd7e6dcc5..f07d07e3b60 100644 --- a/packages/desktop-client/src/icons/v1/Key.tsx +++ b/packages/desktop-client/src/icons/v1/Key.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgKey = (props: SVGProps) => ( +export const SvgKey = (props: SVGProps) => ( ) => ( /> ); -export default SvgKey; diff --git a/packages/desktop-client/src/icons/v1/Keyboard.tsx b/packages/desktop-client/src/icons/v1/Keyboard.tsx index 4486a905063..38a87f45b76 100644 --- a/packages/desktop-client/src/icons/v1/Keyboard.tsx +++ b/packages/desktop-client/src/icons/v1/Keyboard.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgKeyboard = (props: SVGProps) => ( +export const SvgKeyboard = (props: SVGProps) => ( ) => ( /> ); -export default SvgKeyboard; diff --git a/packages/desktop-client/src/icons/v1/Layers.tsx b/packages/desktop-client/src/icons/v1/Layers.tsx index 410395c65d3..c599e541ec7 100644 --- a/packages/desktop-client/src/icons/v1/Layers.tsx +++ b/packages/desktop-client/src/icons/v1/Layers.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLayers = (props: SVGProps) => ( +export const SvgLayers = (props: SVGProps) => ( ) => ( /> ); -export default SvgLayers; diff --git a/packages/desktop-client/src/icons/v1/Library.tsx b/packages/desktop-client/src/icons/v1/Library.tsx index abbf87bf421..011736e6dc1 100644 --- a/packages/desktop-client/src/icons/v1/Library.tsx +++ b/packages/desktop-client/src/icons/v1/Library.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLibrary = (props: SVGProps) => ( +export const SvgLibrary = (props: SVGProps) => ( ) => ( /> ); -export default SvgLibrary; diff --git a/packages/desktop-client/src/icons/v1/LightBulb.tsx b/packages/desktop-client/src/icons/v1/LightBulb.tsx index 5f1d03396d2..b92734929f1 100644 --- a/packages/desktop-client/src/icons/v1/LightBulb.tsx +++ b/packages/desktop-client/src/icons/v1/LightBulb.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLightBulb = (props: SVGProps) => ( +export const SvgLightBulb = (props: SVGProps) => ( ) => ( /> ); -export default SvgLightBulb; diff --git a/packages/desktop-client/src/icons/v1/Link.tsx b/packages/desktop-client/src/icons/v1/Link.tsx index a8cd780944f..ea69e5fab3c 100644 --- a/packages/desktop-client/src/icons/v1/Link.tsx +++ b/packages/desktop-client/src/icons/v1/Link.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLink = (props: SVGProps) => ( +export const SvgLink = (props: SVGProps) => ( ) => ( /> ); -export default SvgLink; diff --git a/packages/desktop-client/src/icons/v1/List.tsx b/packages/desktop-client/src/icons/v1/List.tsx index 09ef596955c..92d6a37ff57 100644 --- a/packages/desktop-client/src/icons/v1/List.tsx +++ b/packages/desktop-client/src/icons/v1/List.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgList = (props: SVGProps) => ( +export const SvgList = (props: SVGProps) => ( ) => ( /> ); -export default SvgList; diff --git a/packages/desktop-client/src/icons/v1/ListAdd.tsx b/packages/desktop-client/src/icons/v1/ListAdd.tsx index 564151df2ab..b38890b915a 100644 --- a/packages/desktop-client/src/icons/v1/ListAdd.tsx +++ b/packages/desktop-client/src/icons/v1/ListAdd.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgListAdd = (props: SVGProps) => ( +export const SvgListAdd = (props: SVGProps) => ( ) => ( /> ); -export default SvgListAdd; diff --git a/packages/desktop-client/src/icons/v1/ListBullet.tsx b/packages/desktop-client/src/icons/v1/ListBullet.tsx index e3035df728d..b1dab39b8a2 100644 --- a/packages/desktop-client/src/icons/v1/ListBullet.tsx +++ b/packages/desktop-client/src/icons/v1/ListBullet.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgListBullet = (props: SVGProps) => ( +export const SvgListBullet = (props: SVGProps) => ( ) => ( /> ); -export default SvgListBullet; diff --git a/packages/desktop-client/src/icons/v1/LoadBalancer.tsx b/packages/desktop-client/src/icons/v1/LoadBalancer.tsx index dfc6e1c567a..115d5abab5b 100644 --- a/packages/desktop-client/src/icons/v1/LoadBalancer.tsx +++ b/packages/desktop-client/src/icons/v1/LoadBalancer.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLoadBalancer = (props: SVGProps) => ( +export const SvgLoadBalancer = (props: SVGProps) => ( ) => ( /> ); -export default SvgLoadBalancer; diff --git a/packages/desktop-client/src/icons/v1/Location.tsx b/packages/desktop-client/src/icons/v1/Location.tsx index 7039c2035a0..f232e336be7 100644 --- a/packages/desktop-client/src/icons/v1/Location.tsx +++ b/packages/desktop-client/src/icons/v1/Location.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLocation = (props: SVGProps) => ( +export const SvgLocation = (props: SVGProps) => ( ) => ( /> ); -export default SvgLocation; diff --git a/packages/desktop-client/src/icons/v1/LocationCurrent.tsx b/packages/desktop-client/src/icons/v1/LocationCurrent.tsx index eed3759cf45..183542f6c6c 100644 --- a/packages/desktop-client/src/icons/v1/LocationCurrent.tsx +++ b/packages/desktop-client/src/icons/v1/LocationCurrent.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLocationCurrent = (props: SVGProps) => ( +export const SvgLocationCurrent = (props: SVGProps) => ( ) => ( ); -export default SvgLocationCurrent; diff --git a/packages/desktop-client/src/icons/v1/LocationFood.tsx b/packages/desktop-client/src/icons/v1/LocationFood.tsx index 9e68ba19b11..7e648b2f4bf 100644 --- a/packages/desktop-client/src/icons/v1/LocationFood.tsx +++ b/packages/desktop-client/src/icons/v1/LocationFood.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLocationFood = (props: SVGProps) => ( +export const SvgLocationFood = (props: SVGProps) => ( ) => ( /> ); -export default SvgLocationFood; diff --git a/packages/desktop-client/src/icons/v1/LocationGasStation.tsx b/packages/desktop-client/src/icons/v1/LocationGasStation.tsx index 04b1fbcadb2..f60a60d7c20 100644 --- a/packages/desktop-client/src/icons/v1/LocationGasStation.tsx +++ b/packages/desktop-client/src/icons/v1/LocationGasStation.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLocationGasStation = (props: SVGProps) => ( +export const SvgLocationGasStation = (props: SVGProps) => ( ) => ( /> ); -export default SvgLocationGasStation; diff --git a/packages/desktop-client/src/icons/v1/LocationHotel.tsx b/packages/desktop-client/src/icons/v1/LocationHotel.tsx index c78589412a7..874deb0e18c 100644 --- a/packages/desktop-client/src/icons/v1/LocationHotel.tsx +++ b/packages/desktop-client/src/icons/v1/LocationHotel.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLocationHotel = (props: SVGProps) => ( +export const SvgLocationHotel = (props: SVGProps) => ( ) => ( /> ); -export default SvgLocationHotel; diff --git a/packages/desktop-client/src/icons/v1/LocationMarina.tsx b/packages/desktop-client/src/icons/v1/LocationMarina.tsx index 8b43249810f..2d1ff43f881 100644 --- a/packages/desktop-client/src/icons/v1/LocationMarina.tsx +++ b/packages/desktop-client/src/icons/v1/LocationMarina.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLocationMarina = (props: SVGProps) => ( +export const SvgLocationMarina = (props: SVGProps) => ( ) => ( /> ); -export default SvgLocationMarina; diff --git a/packages/desktop-client/src/icons/v1/LocationPark.tsx b/packages/desktop-client/src/icons/v1/LocationPark.tsx index 4cc85093ac7..7f4f9b70b6b 100644 --- a/packages/desktop-client/src/icons/v1/LocationPark.tsx +++ b/packages/desktop-client/src/icons/v1/LocationPark.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLocationPark = (props: SVGProps) => ( +export const SvgLocationPark = (props: SVGProps) => ( ) => ( /> ); -export default SvgLocationPark; diff --git a/packages/desktop-client/src/icons/v1/LocationRestroom.tsx b/packages/desktop-client/src/icons/v1/LocationRestroom.tsx index 88a34dc9b86..7a1ce2ebdab 100644 --- a/packages/desktop-client/src/icons/v1/LocationRestroom.tsx +++ b/packages/desktop-client/src/icons/v1/LocationRestroom.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLocationRestroom = (props: SVGProps) => ( +export const SvgLocationRestroom = (props: SVGProps) => ( ) => ( /> ); -export default SvgLocationRestroom; diff --git a/packages/desktop-client/src/icons/v1/LocationShopping.tsx b/packages/desktop-client/src/icons/v1/LocationShopping.tsx index 8eaac9dc69d..d1fa57032e9 100644 --- a/packages/desktop-client/src/icons/v1/LocationShopping.tsx +++ b/packages/desktop-client/src/icons/v1/LocationShopping.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLocationShopping = (props: SVGProps) => ( +export const SvgLocationShopping = (props: SVGProps) => ( ) => ( /> ); -export default SvgLocationShopping; diff --git a/packages/desktop-client/src/icons/v1/LockClosed.tsx b/packages/desktop-client/src/icons/v1/LockClosed.tsx index fea05ad94df..5dd6d49a7c3 100644 --- a/packages/desktop-client/src/icons/v1/LockClosed.tsx +++ b/packages/desktop-client/src/icons/v1/LockClosed.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLockClosed = (props: SVGProps) => ( +export const SvgLockClosed = (props: SVGProps) => ( ) => ( /> ); -export default SvgLockClosed; diff --git a/packages/desktop-client/src/icons/v1/LockOpen.tsx b/packages/desktop-client/src/icons/v1/LockOpen.tsx index c07e4ba47db..b3d581731e6 100644 --- a/packages/desktop-client/src/icons/v1/LockOpen.tsx +++ b/packages/desktop-client/src/icons/v1/LockOpen.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLockOpen = (props: SVGProps) => ( +export const SvgLockOpen = (props: SVGProps) => ( ) => ( /> ); -export default SvgLockOpen; diff --git a/packages/desktop-client/src/icons/v1/Map.tsx b/packages/desktop-client/src/icons/v1/Map.tsx index 7501cf8f0f9..1b9d75a0ced 100644 --- a/packages/desktop-client/src/icons/v1/Map.tsx +++ b/packages/desktop-client/src/icons/v1/Map.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMap = (props: SVGProps) => ( +export const SvgMap = (props: SVGProps) => ( ) => ( /> ); -export default SvgMap; diff --git a/packages/desktop-client/src/icons/v1/Menu.tsx b/packages/desktop-client/src/icons/v1/Menu.tsx index 6ba1e34ca3e..eed6e865250 100644 --- a/packages/desktop-client/src/icons/v1/Menu.tsx +++ b/packages/desktop-client/src/icons/v1/Menu.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMenu = (props: SVGProps) => ( +export const SvgMenu = (props: SVGProps) => ( ) => ( ); -export default SvgMenu; diff --git a/packages/desktop-client/src/icons/v1/Mic.tsx b/packages/desktop-client/src/icons/v1/Mic.tsx index d10d6bdc57c..0cea16928e9 100644 --- a/packages/desktop-client/src/icons/v1/Mic.tsx +++ b/packages/desktop-client/src/icons/v1/Mic.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMic = (props: SVGProps) => ( +export const SvgMic = (props: SVGProps) => ( ) => ( /> ); -export default SvgMic; diff --git a/packages/desktop-client/src/icons/v1/MinusOutline.tsx b/packages/desktop-client/src/icons/v1/MinusOutline.tsx index c6b2e3db1b0..b1de3454671 100644 --- a/packages/desktop-client/src/icons/v1/MinusOutline.tsx +++ b/packages/desktop-client/src/icons/v1/MinusOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMinusOutline = (props: SVGProps) => ( +export const SvgMinusOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgMinusOutline; diff --git a/packages/desktop-client/src/icons/v1/MinusSolid.tsx b/packages/desktop-client/src/icons/v1/MinusSolid.tsx index 74cfb602c29..e0217a6f97b 100644 --- a/packages/desktop-client/src/icons/v1/MinusSolid.tsx +++ b/packages/desktop-client/src/icons/v1/MinusSolid.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMinusSolid = (props: SVGProps) => ( +export const SvgMinusSolid = (props: SVGProps) => ( ) => ( /> ); -export default SvgMinusSolid; diff --git a/packages/desktop-client/src/icons/v1/MobileDevices.tsx b/packages/desktop-client/src/icons/v1/MobileDevices.tsx index 6b54c8d0112..47152af5e8d 100644 --- a/packages/desktop-client/src/icons/v1/MobileDevices.tsx +++ b/packages/desktop-client/src/icons/v1/MobileDevices.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMobileDevices = (props: SVGProps) => ( +export const SvgMobileDevices = (props: SVGProps) => ( ) => ( /> ); -export default SvgMobileDevices; diff --git a/packages/desktop-client/src/icons/v1/MoneyBag.tsx b/packages/desktop-client/src/icons/v1/MoneyBag.tsx index 80c7019c25c..b7b3e1b00ec 100644 --- a/packages/desktop-client/src/icons/v1/MoneyBag.tsx +++ b/packages/desktop-client/src/icons/v1/MoneyBag.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMoneyBag = (props: SVGProps) => ( +export const SvgMoneyBag = (props: SVGProps) => ( ) => ( /> ); -export default SvgMoneyBag; diff --git a/packages/desktop-client/src/icons/v1/MoodHappyOutline.tsx b/packages/desktop-client/src/icons/v1/MoodHappyOutline.tsx index f332843b8a9..cada958e18d 100644 --- a/packages/desktop-client/src/icons/v1/MoodHappyOutline.tsx +++ b/packages/desktop-client/src/icons/v1/MoodHappyOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMoodHappyOutline = (props: SVGProps) => ( +export const SvgMoodHappyOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgMoodHappyOutline; diff --git a/packages/desktop-client/src/icons/v1/MoodHappySolid.tsx b/packages/desktop-client/src/icons/v1/MoodHappySolid.tsx index b57d7f8a29b..4c5d9277e98 100644 --- a/packages/desktop-client/src/icons/v1/MoodHappySolid.tsx +++ b/packages/desktop-client/src/icons/v1/MoodHappySolid.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMoodHappySolid = (props: SVGProps) => ( +export const SvgMoodHappySolid = (props: SVGProps) => ( ) => ( /> ); -export default SvgMoodHappySolid; diff --git a/packages/desktop-client/src/icons/v1/MoodNeutralOutline.tsx b/packages/desktop-client/src/icons/v1/MoodNeutralOutline.tsx index e04803ee08a..652c593f7c4 100644 --- a/packages/desktop-client/src/icons/v1/MoodNeutralOutline.tsx +++ b/packages/desktop-client/src/icons/v1/MoodNeutralOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMoodNeutralOutline = (props: SVGProps) => ( +export const SvgMoodNeutralOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgMoodNeutralOutline; diff --git a/packages/desktop-client/src/icons/v1/MoodNeutralSolid.tsx b/packages/desktop-client/src/icons/v1/MoodNeutralSolid.tsx index c6864fbafda..90137eee10f 100644 --- a/packages/desktop-client/src/icons/v1/MoodNeutralSolid.tsx +++ b/packages/desktop-client/src/icons/v1/MoodNeutralSolid.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMoodNeutralSolid = (props: SVGProps) => ( +export const SvgMoodNeutralSolid = (props: SVGProps) => ( ) => ( /> ); -export default SvgMoodNeutralSolid; diff --git a/packages/desktop-client/src/icons/v1/MoodSadOutline.tsx b/packages/desktop-client/src/icons/v1/MoodSadOutline.tsx index 9c9049399cb..fa807080c54 100644 --- a/packages/desktop-client/src/icons/v1/MoodSadOutline.tsx +++ b/packages/desktop-client/src/icons/v1/MoodSadOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMoodSadOutline = (props: SVGProps) => ( +export const SvgMoodSadOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgMoodSadOutline; diff --git a/packages/desktop-client/src/icons/v1/MoodSadSolid.tsx b/packages/desktop-client/src/icons/v1/MoodSadSolid.tsx index 9003e490a09..728532c0cf4 100644 --- a/packages/desktop-client/src/icons/v1/MoodSadSolid.tsx +++ b/packages/desktop-client/src/icons/v1/MoodSadSolid.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMoodSadSolid = (props: SVGProps) => ( +export const SvgMoodSadSolid = (props: SVGProps) => ( ) => ( /> ); -export default SvgMoodSadSolid; diff --git a/packages/desktop-client/src/icons/v1/Mouse.tsx b/packages/desktop-client/src/icons/v1/Mouse.tsx index 23d03463961..237c49d4e28 100644 --- a/packages/desktop-client/src/icons/v1/Mouse.tsx +++ b/packages/desktop-client/src/icons/v1/Mouse.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMouse = (props: SVGProps) => ( +export const SvgMouse = (props: SVGProps) => ( ) => ( /> ); -export default SvgMouse; diff --git a/packages/desktop-client/src/icons/v1/MoveBack.tsx b/packages/desktop-client/src/icons/v1/MoveBack.tsx index a70f37231b9..37d5944dfc3 100644 --- a/packages/desktop-client/src/icons/v1/MoveBack.tsx +++ b/packages/desktop-client/src/icons/v1/MoveBack.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMoveBack = (props: SVGProps) => ( +export const SvgMoveBack = (props: SVGProps) => ( ) => ( /> ); -export default SvgMoveBack; diff --git a/packages/desktop-client/src/icons/v1/MusicAlbum.tsx b/packages/desktop-client/src/icons/v1/MusicAlbum.tsx index 1a2c0ec857c..e83b158e581 100644 --- a/packages/desktop-client/src/icons/v1/MusicAlbum.tsx +++ b/packages/desktop-client/src/icons/v1/MusicAlbum.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMusicAlbum = (props: SVGProps) => ( +export const SvgMusicAlbum = (props: SVGProps) => ( ) => ( /> ); -export default SvgMusicAlbum; diff --git a/packages/desktop-client/src/icons/v1/MusicArtist.tsx b/packages/desktop-client/src/icons/v1/MusicArtist.tsx index 817dfdbaf35..a3d49fd8ce2 100644 --- a/packages/desktop-client/src/icons/v1/MusicArtist.tsx +++ b/packages/desktop-client/src/icons/v1/MusicArtist.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMusicArtist = (props: SVGProps) => ( +export const SvgMusicArtist = (props: SVGProps) => ( ) => ( /> ); -export default SvgMusicArtist; diff --git a/packages/desktop-client/src/icons/v1/MusicNotes.tsx b/packages/desktop-client/src/icons/v1/MusicNotes.tsx index 7fb51a9b065..14beff22e8b 100644 --- a/packages/desktop-client/src/icons/v1/MusicNotes.tsx +++ b/packages/desktop-client/src/icons/v1/MusicNotes.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMusicNotes = (props: SVGProps) => ( +export const SvgMusicNotes = (props: SVGProps) => ( ) => ( /> ); -export default SvgMusicNotes; diff --git a/packages/desktop-client/src/icons/v1/MusicPlaylist.tsx b/packages/desktop-client/src/icons/v1/MusicPlaylist.tsx index c8428d404b2..6890d50eac8 100644 --- a/packages/desktop-client/src/icons/v1/MusicPlaylist.tsx +++ b/packages/desktop-client/src/icons/v1/MusicPlaylist.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMusicPlaylist = (props: SVGProps) => ( +export const SvgMusicPlaylist = (props: SVGProps) => ( ) => ( /> ); -export default SvgMusicPlaylist; diff --git a/packages/desktop-client/src/icons/v1/NavigationMore.tsx b/packages/desktop-client/src/icons/v1/NavigationMore.tsx index 46635c19d6d..6f46689bbd2 100644 --- a/packages/desktop-client/src/icons/v1/NavigationMore.tsx +++ b/packages/desktop-client/src/icons/v1/NavigationMore.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgNavigationMore = (props: SVGProps) => ( +export const SvgNavigationMore = (props: SVGProps) => ( ) => ( /> ); -export default SvgNavigationMore; diff --git a/packages/desktop-client/src/icons/v1/Network.tsx b/packages/desktop-client/src/icons/v1/Network.tsx index df8b11c2754..51ca5c1164b 100644 --- a/packages/desktop-client/src/icons/v1/Network.tsx +++ b/packages/desktop-client/src/icons/v1/Network.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgNetwork = (props: SVGProps) => ( +export const SvgNetwork = (props: SVGProps) => ( ) => ( /> ); -export default SvgNetwork; diff --git a/packages/desktop-client/src/icons/v1/NewsPaper.tsx b/packages/desktop-client/src/icons/v1/NewsPaper.tsx index 2a9cf29648a..240fe007bb6 100644 --- a/packages/desktop-client/src/icons/v1/NewsPaper.tsx +++ b/packages/desktop-client/src/icons/v1/NewsPaper.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgNewsPaper = (props: SVGProps) => ( +export const SvgNewsPaper = (props: SVGProps) => ( ) => ( /> ); -export default SvgNewsPaper; diff --git a/packages/desktop-client/src/icons/v1/Notification.tsx b/packages/desktop-client/src/icons/v1/Notification.tsx index d3bd27f0469..72921548544 100644 --- a/packages/desktop-client/src/icons/v1/Notification.tsx +++ b/packages/desktop-client/src/icons/v1/Notification.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgNotification = (props: SVGProps) => ( +export const SvgNotification = (props: SVGProps) => ( ) => ( /> ); -export default SvgNotification; diff --git a/packages/desktop-client/src/icons/v1/Notifications.tsx b/packages/desktop-client/src/icons/v1/Notifications.tsx index f856652c5eb..d258258ae79 100644 --- a/packages/desktop-client/src/icons/v1/Notifications.tsx +++ b/packages/desktop-client/src/icons/v1/Notifications.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgNotifications = (props: SVGProps) => ( +export const SvgNotifications = (props: SVGProps) => ( ) => ( /> ); -export default SvgNotifications; diff --git a/packages/desktop-client/src/icons/v1/NotificationsOutline.tsx b/packages/desktop-client/src/icons/v1/NotificationsOutline.tsx index a1ba6e2feda..472bab2c1b5 100644 --- a/packages/desktop-client/src/icons/v1/NotificationsOutline.tsx +++ b/packages/desktop-client/src/icons/v1/NotificationsOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgNotificationsOutline = (props: SVGProps) => ( +export const SvgNotificationsOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgNotificationsOutline; diff --git a/packages/desktop-client/src/icons/v1/Paste.tsx b/packages/desktop-client/src/icons/v1/Paste.tsx index 6377df6beb8..4ad98f000f7 100644 --- a/packages/desktop-client/src/icons/v1/Paste.tsx +++ b/packages/desktop-client/src/icons/v1/Paste.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPaste = (props: SVGProps) => ( +export const SvgPaste = (props: SVGProps) => ( ) => ( /> ); -export default SvgPaste; diff --git a/packages/desktop-client/src/icons/v1/Pause.tsx b/packages/desktop-client/src/icons/v1/Pause.tsx index 57dd774f64e..20a0f4af18b 100644 --- a/packages/desktop-client/src/icons/v1/Pause.tsx +++ b/packages/desktop-client/src/icons/v1/Pause.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPause = (props: SVGProps) => ( +export const SvgPause = (props: SVGProps) => ( ) => ( ); -export default SvgPause; diff --git a/packages/desktop-client/src/icons/v1/PauseOutline.tsx b/packages/desktop-client/src/icons/v1/PauseOutline.tsx index e0e051b35d2..958c768441d 100644 --- a/packages/desktop-client/src/icons/v1/PauseOutline.tsx +++ b/packages/desktop-client/src/icons/v1/PauseOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPauseOutline = (props: SVGProps) => ( +export const SvgPauseOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgPauseOutline; diff --git a/packages/desktop-client/src/icons/v1/PauseSolid.tsx b/packages/desktop-client/src/icons/v1/PauseSolid.tsx index 54ba7dd6498..6c5b6151374 100644 --- a/packages/desktop-client/src/icons/v1/PauseSolid.tsx +++ b/packages/desktop-client/src/icons/v1/PauseSolid.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPauseSolid = (props: SVGProps) => ( +export const SvgPauseSolid = (props: SVGProps) => ( ) => ( /> ); -export default SvgPauseSolid; diff --git a/packages/desktop-client/src/icons/v1/PenTool.tsx b/packages/desktop-client/src/icons/v1/PenTool.tsx index 8e48b44635a..b4325c58b57 100644 --- a/packages/desktop-client/src/icons/v1/PenTool.tsx +++ b/packages/desktop-client/src/icons/v1/PenTool.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPenTool = (props: SVGProps) => ( +export const SvgPenTool = (props: SVGProps) => ( ) => ( /> ); -export default SvgPenTool; diff --git a/packages/desktop-client/src/icons/v1/PencilWrite.tsx b/packages/desktop-client/src/icons/v1/PencilWrite.tsx index ffbe72c73a5..eab70866fdc 100644 --- a/packages/desktop-client/src/icons/v1/PencilWrite.tsx +++ b/packages/desktop-client/src/icons/v1/PencilWrite.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPencilWrite = (props: SVGProps) => ( +export const SvgPencilWrite = (props: SVGProps) => ( ) => ( /> ); -export default SvgPencilWrite; diff --git a/packages/desktop-client/src/icons/v1/Phone.tsx b/packages/desktop-client/src/icons/v1/Phone.tsx index 9fac2d71c08..0cc3308f665 100644 --- a/packages/desktop-client/src/icons/v1/Phone.tsx +++ b/packages/desktop-client/src/icons/v1/Phone.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPhone = (props: SVGProps) => ( +export const SvgPhone = (props: SVGProps) => ( ) => ( /> ); -export default SvgPhone; diff --git a/packages/desktop-client/src/icons/v1/Photo.tsx b/packages/desktop-client/src/icons/v1/Photo.tsx index c987f75883c..7d5290a8a03 100644 --- a/packages/desktop-client/src/icons/v1/Photo.tsx +++ b/packages/desktop-client/src/icons/v1/Photo.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPhoto = (props: SVGProps) => ( +export const SvgPhoto = (props: SVGProps) => ( ) => ( /> ); -export default SvgPhoto; diff --git a/packages/desktop-client/src/icons/v1/PhpElephant.tsx b/packages/desktop-client/src/icons/v1/PhpElephant.tsx index 9b280e0ec7a..d804daaecfb 100644 --- a/packages/desktop-client/src/icons/v1/PhpElephant.tsx +++ b/packages/desktop-client/src/icons/v1/PhpElephant.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPhpElephant = (props: SVGProps) => ( +export const SvgPhpElephant = (props: SVGProps) => ( ) => ( /> ); -export default SvgPhpElephant; diff --git a/packages/desktop-client/src/icons/v1/PiggyBank.tsx b/packages/desktop-client/src/icons/v1/PiggyBank.tsx index 705572350cb..4a412d1d4ab 100644 --- a/packages/desktop-client/src/icons/v1/PiggyBank.tsx +++ b/packages/desktop-client/src/icons/v1/PiggyBank.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPiggyBank = (props: SVGProps) => ( +export const SvgPiggyBank = (props: SVGProps) => ( ) => ( ); -export default SvgPiggyBank; diff --git a/packages/desktop-client/src/icons/v1/Pin.tsx b/packages/desktop-client/src/icons/v1/Pin.tsx index 00c1890ca02..b516774475b 100644 --- a/packages/desktop-client/src/icons/v1/Pin.tsx +++ b/packages/desktop-client/src/icons/v1/Pin.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPin = (props: SVGProps) => ( +export const SvgPin = (props: SVGProps) => ( ) => ( /> ); -export default SvgPin; diff --git a/packages/desktop-client/src/icons/v1/Play.tsx b/packages/desktop-client/src/icons/v1/Play.tsx index 4aac8de82ad..630c73cb532 100644 --- a/packages/desktop-client/src/icons/v1/Play.tsx +++ b/packages/desktop-client/src/icons/v1/Play.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPlay = (props: SVGProps) => ( +export const SvgPlay = (props: SVGProps) => ( ) => ( ); -export default SvgPlay; diff --git a/packages/desktop-client/src/icons/v1/PlayOutline.tsx b/packages/desktop-client/src/icons/v1/PlayOutline.tsx index 7644e7d94de..44c49408652 100644 --- a/packages/desktop-client/src/icons/v1/PlayOutline.tsx +++ b/packages/desktop-client/src/icons/v1/PlayOutline.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPlayOutline = (props: SVGProps) => ( +export const SvgPlayOutline = (props: SVGProps) => ( ) => ( /> ); -export default SvgPlayOutline; diff --git a/packages/desktop-client/src/icons/v1/Playlist.tsx b/packages/desktop-client/src/icons/v1/Playlist.tsx index acd09777da8..ef87494715b 100644 --- a/packages/desktop-client/src/icons/v1/Playlist.tsx +++ b/packages/desktop-client/src/icons/v1/Playlist.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPlaylist = (props: SVGProps) => ( +export const SvgPlaylist = (props: SVGProps) => ( ) => ( /> ); -export default SvgPlaylist; diff --git a/packages/desktop-client/src/icons/v1/Plugin.tsx b/packages/desktop-client/src/icons/v1/Plugin.tsx index b0e52b6f784..a050af99670 100644 --- a/packages/desktop-client/src/icons/v1/Plugin.tsx +++ b/packages/desktop-client/src/icons/v1/Plugin.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPlugin = (props: SVGProps) => ( +export const SvgPlugin = (props: SVGProps) => ( ) => ( /> ); -export default SvgPlugin; diff --git a/packages/desktop-client/src/icons/v1/Portfolio.tsx b/packages/desktop-client/src/icons/v1/Portfolio.tsx index c5f2ca76bae..d7322a8ef7f 100644 --- a/packages/desktop-client/src/icons/v1/Portfolio.tsx +++ b/packages/desktop-client/src/icons/v1/Portfolio.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPortfolio = (props: SVGProps) => ( +export const SvgPortfolio = (props: SVGProps) => ( ) => ( /> ); -export default SvgPortfolio; diff --git a/packages/desktop-client/src/icons/v1/Printer.tsx b/packages/desktop-client/src/icons/v1/Printer.tsx index de566b32d13..d186723690b 100644 --- a/packages/desktop-client/src/icons/v1/Printer.tsx +++ b/packages/desktop-client/src/icons/v1/Printer.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPrinter = (props: SVGProps) => ( +export const SvgPrinter = (props: SVGProps) => ( ) => ( /> ); -export default SvgPrinter; diff --git a/packages/desktop-client/src/icons/v1/Pylon.tsx b/packages/desktop-client/src/icons/v1/Pylon.tsx index 498c5033085..8ec767039f6 100644 --- a/packages/desktop-client/src/icons/v1/Pylon.tsx +++ b/packages/desktop-client/src/icons/v1/Pylon.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPylon = (props: SVGProps) => ( +export const SvgPylon = (props: SVGProps) => ( ) => ( /> ); -export default SvgPylon; diff --git a/packages/desktop-client/src/icons/v1/Question.tsx b/packages/desktop-client/src/icons/v1/Question.tsx index 116f1529daf..341e82e4986 100644 --- a/packages/desktop-client/src/icons/v1/Question.tsx +++ b/packages/desktop-client/src/icons/v1/Question.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgQuestion = (props: SVGProps) => ( +export const SvgQuestion = (props: SVGProps) => ( ) => ( /> ); -export default SvgQuestion; diff --git a/packages/desktop-client/src/icons/v1/Queue.tsx b/packages/desktop-client/src/icons/v1/Queue.tsx index bbcc286c370..9efeb6606b0 100644 --- a/packages/desktop-client/src/icons/v1/Queue.tsx +++ b/packages/desktop-client/src/icons/v1/Queue.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgQueue = (props: SVGProps) => ( +export const SvgQueue = (props: SVGProps) => ( ) => ( /> ); -export default SvgQueue; diff --git a/packages/desktop-client/src/icons/v1/Radar.tsx b/packages/desktop-client/src/icons/v1/Radar.tsx index 6f2042d364f..bdb15be6826 100644 --- a/packages/desktop-client/src/icons/v1/Radar.tsx +++ b/packages/desktop-client/src/icons/v1/Radar.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgRadar = (props: SVGProps) => ( +export const SvgRadar = (props: SVGProps) => ( ) => ( /> ); -export default SvgRadar; diff --git a/packages/desktop-client/src/icons/v1/RadarCopy2.tsx b/packages/desktop-client/src/icons/v1/RadarCopy2.tsx index c2a59b2ba0a..d3d21357153 100644 --- a/packages/desktop-client/src/icons/v1/RadarCopy2.tsx +++ b/packages/desktop-client/src/icons/v1/RadarCopy2.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgRadarCopy2 = (props: SVGProps) => ( +export const SvgRadarCopy2 = (props: SVGProps) => ( ) => ( /> ); -export default SvgRadarCopy2; diff --git a/packages/desktop-client/src/icons/v1/Radio.tsx b/packages/desktop-client/src/icons/v1/Radio.tsx index c2cf7830938..62029c276e7 100644 --- a/packages/desktop-client/src/icons/v1/Radio.tsx +++ b/packages/desktop-client/src/icons/v1/Radio.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgRadio = (props: SVGProps) => ( +export const SvgRadio = (props: SVGProps) => ( ) => ( /> ); -export default SvgRadio; diff --git a/packages/desktop-client/src/icons/v1/Refresh.tsx b/packages/desktop-client/src/icons/v1/Refresh.tsx index 3489fd2c123..15695db9111 100644 --- a/packages/desktop-client/src/icons/v1/Refresh.tsx +++ b/packages/desktop-client/src/icons/v1/Refresh.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgRefresh = (props: SVGProps) => ( +export const SvgRefresh = (props: SVGProps) => ( ) => ( /> ); -export default SvgRefresh; diff --git a/packages/desktop-client/src/icons/v1/Reload.tsx b/packages/desktop-client/src/icons/v1/Reload.tsx index b8b8af9c120..913bdaa2647 100644 --- a/packages/desktop-client/src/icons/v1/Reload.tsx +++ b/packages/desktop-client/src/icons/v1/Reload.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgReload = (props: SVGProps) => ( +export const SvgReload = (props: SVGProps) => ( ) => ( /> ); -export default SvgReload; diff --git a/packages/desktop-client/src/icons/v1/Reply.tsx b/packages/desktop-client/src/icons/v1/Reply.tsx index 2b332faece8..bafffcd0c79 100644 --- a/packages/desktop-client/src/icons/v1/Reply.tsx +++ b/packages/desktop-client/src/icons/v1/Reply.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgReply = (props: SVGProps) => ( +export const SvgReply = (props: SVGProps) => ( ) => ( /> ); -export default SvgReply; diff --git a/packages/desktop-client/src/icons/v1/ReplyAll.tsx b/packages/desktop-client/src/icons/v1/ReplyAll.tsx index 1678b68101f..932969f97f9 100644 --- a/packages/desktop-client/src/icons/v1/ReplyAll.tsx +++ b/packages/desktop-client/src/icons/v1/ReplyAll.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgReplyAll = (props: SVGProps) => ( +export const SvgReplyAll = (props: SVGProps) => ( ) => ( /> ); -export default SvgReplyAll; diff --git a/packages/desktop-client/src/icons/v1/Reports.tsx b/packages/desktop-client/src/icons/v1/Reports.tsx index 5326876d1e9..21aca11b5dd 100644 --- a/packages/desktop-client/src/icons/v1/Reports.tsx +++ b/packages/desktop-client/src/icons/v1/Reports.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgReports = (props: SVGProps) => ( +export const SvgReports = (props: SVGProps) => ( ) => ( /> ); -export default SvgReports; diff --git a/packages/desktop-client/src/icons/v1/Repost.tsx b/packages/desktop-client/src/icons/v1/Repost.tsx index 5d0206349b7..364645e0a8f 100644 --- a/packages/desktop-client/src/icons/v1/Repost.tsx +++ b/packages/desktop-client/src/icons/v1/Repost.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgRepost = (props: SVGProps) => ( +export const SvgRepost = (props: SVGProps) => ( ) => ( /> ); -export default SvgRepost; diff --git a/packages/desktop-client/src/icons/v1/SaveDisk.tsx b/packages/desktop-client/src/icons/v1/SaveDisk.tsx index a8c2cbfa41e..f428740d83c 100644 --- a/packages/desktop-client/src/icons/v1/SaveDisk.tsx +++ b/packages/desktop-client/src/icons/v1/SaveDisk.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSaveDisk = (props: SVGProps) => ( +export const SvgSaveDisk = (props: SVGProps) => ( ) => ( /> ); -export default SvgSaveDisk; diff --git a/packages/desktop-client/src/icons/v1/ScreenFull.tsx b/packages/desktop-client/src/icons/v1/ScreenFull.tsx index dd42e338ce7..6a3073590d3 100644 --- a/packages/desktop-client/src/icons/v1/ScreenFull.tsx +++ b/packages/desktop-client/src/icons/v1/ScreenFull.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgScreenFull = (props: SVGProps) => ( +export const SvgScreenFull = (props: SVGProps) => ( ) => ( /> ); -export default SvgScreenFull; diff --git a/packages/desktop-client/src/icons/v1/Search.tsx b/packages/desktop-client/src/icons/v1/Search.tsx index bedfdede6cb..7ebe873f7c3 100644 --- a/packages/desktop-client/src/icons/v1/Search.tsx +++ b/packages/desktop-client/src/icons/v1/Search.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSearch = (props: SVGProps) => ( +export const SvgSearch = (props: SVGProps) => ( ) => ( /> ); -export default SvgSearch; diff --git a/packages/desktop-client/src/icons/v1/Send.tsx b/packages/desktop-client/src/icons/v1/Send.tsx index cbce2995157..d98b0e1d15f 100644 --- a/packages/desktop-client/src/icons/v1/Send.tsx +++ b/packages/desktop-client/src/icons/v1/Send.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSend = (props: SVGProps) => ( +export const SvgSend = (props: SVGProps) => ( ) => ( ); -export default SvgSend; diff --git a/packages/desktop-client/src/icons/v1/Servers.tsx b/packages/desktop-client/src/icons/v1/Servers.tsx index 1a76e555661..3c855a8c9ab 100644 --- a/packages/desktop-client/src/icons/v1/Servers.tsx +++ b/packages/desktop-client/src/icons/v1/Servers.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgServers = (props: SVGProps) => ( +export const SvgServers = (props: SVGProps) => ( ) => ( /> ); -export default SvgServers; diff --git a/packages/desktop-client/src/icons/v1/Share.tsx b/packages/desktop-client/src/icons/v1/Share.tsx index 02f3bea3f00..d4ec0747eee 100644 --- a/packages/desktop-client/src/icons/v1/Share.tsx +++ b/packages/desktop-client/src/icons/v1/Share.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgShare = (props: SVGProps) => ( +export const SvgShare = (props: SVGProps) => ( ) => ( /> ); -export default SvgShare; diff --git a/packages/desktop-client/src/icons/v1/Share01.tsx b/packages/desktop-client/src/icons/v1/Share01.tsx index 62479ccebf0..4d523ed04f7 100644 --- a/packages/desktop-client/src/icons/v1/Share01.tsx +++ b/packages/desktop-client/src/icons/v1/Share01.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgShare01 = (props: SVGProps) => ( +export const SvgShare01 = (props: SVGProps) => ( ) => ( /> ); -export default SvgShare01; diff --git a/packages/desktop-client/src/icons/v1/ShareAlt.tsx b/packages/desktop-client/src/icons/v1/ShareAlt.tsx index a7c9bfb480d..fe76a6d0d93 100644 --- a/packages/desktop-client/src/icons/v1/ShareAlt.tsx +++ b/packages/desktop-client/src/icons/v1/ShareAlt.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgShareAlt = (props: SVGProps) => ( +export const SvgShareAlt = (props: SVGProps) => ( ) => ( /> ); -export default SvgShareAlt; diff --git a/packages/desktop-client/src/icons/v1/Shield.tsx b/packages/desktop-client/src/icons/v1/Shield.tsx index ce518e33b22..7954b714631 100644 --- a/packages/desktop-client/src/icons/v1/Shield.tsx +++ b/packages/desktop-client/src/icons/v1/Shield.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgShield = (props: SVGProps) => ( +export const SvgShield = (props: SVGProps) => ( ) => ( /> ); -export default SvgShield; diff --git a/packages/desktop-client/src/icons/v1/ShoppingCart.tsx b/packages/desktop-client/src/icons/v1/ShoppingCart.tsx index 0c7d41ae7d2..360719fdb47 100644 --- a/packages/desktop-client/src/icons/v1/ShoppingCart.tsx +++ b/packages/desktop-client/src/icons/v1/ShoppingCart.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgShoppingCart = (props: SVGProps) => ( +export const SvgShoppingCart = (props: SVGProps) => ( ) => ( /> ); -export default SvgShoppingCart; diff --git a/packages/desktop-client/src/icons/v1/ShowSidebar.tsx b/packages/desktop-client/src/icons/v1/ShowSidebar.tsx index 2427603f196..470a37a1ea2 100644 --- a/packages/desktop-client/src/icons/v1/ShowSidebar.tsx +++ b/packages/desktop-client/src/icons/v1/ShowSidebar.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgShowSidebar = (props: SVGProps) => ( +export const SvgShowSidebar = (props: SVGProps) => ( ) => ( /> ); -export default SvgShowSidebar; diff --git a/packages/desktop-client/src/icons/v1/Shuffle.tsx b/packages/desktop-client/src/icons/v1/Shuffle.tsx index a3de449f50d..1b8388c067c 100644 --- a/packages/desktop-client/src/icons/v1/Shuffle.tsx +++ b/packages/desktop-client/src/icons/v1/Shuffle.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgShuffle = (props: SVGProps) => ( +export const SvgShuffle = (props: SVGProps) => ( ) => ( /> ); -export default SvgShuffle; diff --git a/packages/desktop-client/src/icons/v1/StandBy.tsx b/packages/desktop-client/src/icons/v1/StandBy.tsx index 4711552153e..7ed3f259d2f 100644 --- a/packages/desktop-client/src/icons/v1/StandBy.tsx +++ b/packages/desktop-client/src/icons/v1/StandBy.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgStandBy = (props: SVGProps) => ( +export const SvgStandBy = (props: SVGProps) => ( ) => ( /> ); -export default SvgStandBy; diff --git a/packages/desktop-client/src/icons/v1/StarFull.tsx b/packages/desktop-client/src/icons/v1/StarFull.tsx index 27e67e1093d..780667cd157 100644 --- a/packages/desktop-client/src/icons/v1/StarFull.tsx +++ b/packages/desktop-client/src/icons/v1/StarFull.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgStarFull = (props: SVGProps) => ( +export const SvgStarFull = (props: SVGProps) => ( ) => ( /> ); -export default SvgStarFull; diff --git a/packages/desktop-client/src/icons/v1/Station.tsx b/packages/desktop-client/src/icons/v1/Station.tsx index e86d75def21..a2691ca46de 100644 --- a/packages/desktop-client/src/icons/v1/Station.tsx +++ b/packages/desktop-client/src/icons/v1/Station.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgStation = (props: SVGProps) => ( +export const SvgStation = (props: SVGProps) => ( ) => ( /> ); -export default SvgStation; diff --git a/packages/desktop-client/src/icons/v1/StepBackward.tsx b/packages/desktop-client/src/icons/v1/StepBackward.tsx index 386a5e0b1f8..c29a3b45f25 100644 --- a/packages/desktop-client/src/icons/v1/StepBackward.tsx +++ b/packages/desktop-client/src/icons/v1/StepBackward.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgStepBackward = (props: SVGProps) => ( +export const SvgStepBackward = (props: SVGProps) => ( ) => ( ); -export default SvgStepBackward; diff --git a/packages/desktop-client/src/icons/v1/StepForward.tsx b/packages/desktop-client/src/icons/v1/StepForward.tsx index fa85a2a1c7e..6d58520f96c 100644 --- a/packages/desktop-client/src/icons/v1/StepForward.tsx +++ b/packages/desktop-client/src/icons/v1/StepForward.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgStepForward = (props: SVGProps) => ( +export const SvgStepForward = (props: SVGProps) => ( ) => ( ); -export default SvgStepForward; diff --git a/packages/desktop-client/src/icons/v1/Stethoscope.tsx b/packages/desktop-client/src/icons/v1/Stethoscope.tsx index a541425051e..9ea4a1e2975 100644 --- a/packages/desktop-client/src/icons/v1/Stethoscope.tsx +++ b/packages/desktop-client/src/icons/v1/Stethoscope.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgStethoscope = (props: SVGProps) => ( +export const SvgStethoscope = (props: SVGProps) => ( ) => ( /> ); -export default SvgStethoscope; diff --git a/packages/desktop-client/src/icons/v1/StoreFront.tsx b/packages/desktop-client/src/icons/v1/StoreFront.tsx index 11f69111658..ca7a4afea45 100644 --- a/packages/desktop-client/src/icons/v1/StoreFront.tsx +++ b/packages/desktop-client/src/icons/v1/StoreFront.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgStoreFront = (props: SVGProps) => ( +export const SvgStoreFront = (props: SVGProps) => ( ) => ( /> ); -export default SvgStoreFront; diff --git a/packages/desktop-client/src/icons/v1/StrokeWidth.tsx b/packages/desktop-client/src/icons/v1/StrokeWidth.tsx index d19fc8f8331..2ccd7217936 100644 --- a/packages/desktop-client/src/icons/v1/StrokeWidth.tsx +++ b/packages/desktop-client/src/icons/v1/StrokeWidth.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgStrokeWidth = (props: SVGProps) => ( +export const SvgStrokeWidth = (props: SVGProps) => ( ) => ( /> ); -export default SvgStrokeWidth; diff --git a/packages/desktop-client/src/icons/v1/SubdirectoryLeft.tsx b/packages/desktop-client/src/icons/v1/SubdirectoryLeft.tsx index b9ca9cbc12b..fa0a9c134f1 100644 --- a/packages/desktop-client/src/icons/v1/SubdirectoryLeft.tsx +++ b/packages/desktop-client/src/icons/v1/SubdirectoryLeft.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSubdirectoryLeft = (props: SVGProps) => ( +export const SvgSubdirectoryLeft = (props: SVGProps) => ( ) => ( ); -export default SvgSubdirectoryLeft; diff --git a/packages/desktop-client/src/icons/v1/SubdirectoryRight.tsx b/packages/desktop-client/src/icons/v1/SubdirectoryRight.tsx index 8699d614ade..fed67dc731b 100644 --- a/packages/desktop-client/src/icons/v1/SubdirectoryRight.tsx +++ b/packages/desktop-client/src/icons/v1/SubdirectoryRight.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSubdirectoryRight = (props: SVGProps) => ( +export const SvgSubdirectoryRight = (props: SVGProps) => ( ) => ( ); -export default SvgSubdirectoryRight; diff --git a/packages/desktop-client/src/icons/v1/Subtract.tsx b/packages/desktop-client/src/icons/v1/Subtract.tsx index fd03ddc4858..af6c118cf71 100644 --- a/packages/desktop-client/src/icons/v1/Subtract.tsx +++ b/packages/desktop-client/src/icons/v1/Subtract.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSubtract = (props: SVGProps) => ( +export const SvgSubtract = (props: SVGProps) => ( ) => ( /> ); -export default SvgSubtract; diff --git a/packages/desktop-client/src/icons/v1/Swap.tsx b/packages/desktop-client/src/icons/v1/Swap.tsx index 13b572d96da..ec861d7bbec 100644 --- a/packages/desktop-client/src/icons/v1/Swap.tsx +++ b/packages/desktop-client/src/icons/v1/Swap.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSwap = (props: SVGProps) => ( +export const SvgSwap = (props: SVGProps) => ( ) => ( /> ); -export default SvgSwap; diff --git a/packages/desktop-client/src/icons/v1/Tablet.tsx b/packages/desktop-client/src/icons/v1/Tablet.tsx index 6e35fe13069..5cff2d5a91d 100644 --- a/packages/desktop-client/src/icons/v1/Tablet.tsx +++ b/packages/desktop-client/src/icons/v1/Tablet.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTablet = (props: SVGProps) => ( +export const SvgTablet = (props: SVGProps) => ( ) => ( /> ); -export default SvgTablet; diff --git a/packages/desktop-client/src/icons/v1/Tag.tsx b/packages/desktop-client/src/icons/v1/Tag.tsx index 08342d04240..28e70f7d17a 100644 --- a/packages/desktop-client/src/icons/v1/Tag.tsx +++ b/packages/desktop-client/src/icons/v1/Tag.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTag = (props: SVGProps) => ( +export const SvgTag = (props: SVGProps) => ( ) => ( /> ); -export default SvgTag; diff --git a/packages/desktop-client/src/icons/v1/Target.tsx b/packages/desktop-client/src/icons/v1/Target.tsx index 570e8070ba7..e7d3f0921d4 100644 --- a/packages/desktop-client/src/icons/v1/Target.tsx +++ b/packages/desktop-client/src/icons/v1/Target.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTarget = (props: SVGProps) => ( +export const SvgTarget = (props: SVGProps) => ( ) => ( /> ); -export default SvgTarget; diff --git a/packages/desktop-client/src/icons/v1/TextBox.tsx b/packages/desktop-client/src/icons/v1/TextBox.tsx index 7e4b5d485e0..bc556ea486b 100644 --- a/packages/desktop-client/src/icons/v1/TextBox.tsx +++ b/packages/desktop-client/src/icons/v1/TextBox.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTextBox = (props: SVGProps) => ( +export const SvgTextBox = (props: SVGProps) => ( ) => ( /> ); -export default SvgTextBox; diff --git a/packages/desktop-client/src/icons/v1/TextDecoration.tsx b/packages/desktop-client/src/icons/v1/TextDecoration.tsx index e185d177a01..b92fc28cfea 100644 --- a/packages/desktop-client/src/icons/v1/TextDecoration.tsx +++ b/packages/desktop-client/src/icons/v1/TextDecoration.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTextDecoration = (props: SVGProps) => ( +export const SvgTextDecoration = (props: SVGProps) => ( ) => ( /> ); -export default SvgTextDecoration; diff --git a/packages/desktop-client/src/icons/v1/Thermometer.tsx b/packages/desktop-client/src/icons/v1/Thermometer.tsx index b6587b1a375..2cf34f4d5fe 100644 --- a/packages/desktop-client/src/icons/v1/Thermometer.tsx +++ b/packages/desktop-client/src/icons/v1/Thermometer.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgThermometer = (props: SVGProps) => ( +export const SvgThermometer = (props: SVGProps) => ( ) => ( /> ); -export default SvgThermometer; diff --git a/packages/desktop-client/src/icons/v1/ThumbsDown.tsx b/packages/desktop-client/src/icons/v1/ThumbsDown.tsx index f5f51795da6..5a182dac61f 100644 --- a/packages/desktop-client/src/icons/v1/ThumbsDown.tsx +++ b/packages/desktop-client/src/icons/v1/ThumbsDown.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgThumbsDown = (props: SVGProps) => ( +export const SvgThumbsDown = (props: SVGProps) => ( ) => ( /> ); -export default SvgThumbsDown; diff --git a/packages/desktop-client/src/icons/v1/ThumbsUp.tsx b/packages/desktop-client/src/icons/v1/ThumbsUp.tsx index 1d8e610b73f..b7f4eb0e118 100644 --- a/packages/desktop-client/src/icons/v1/ThumbsUp.tsx +++ b/packages/desktop-client/src/icons/v1/ThumbsUp.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgThumbsUp = (props: SVGProps) => ( +export const SvgThumbsUp = (props: SVGProps) => ( ) => ( /> ); -export default SvgThumbsUp; diff --git a/packages/desktop-client/src/icons/v1/Ticket.tsx b/packages/desktop-client/src/icons/v1/Ticket.tsx index c5e2faf70c0..c73c3600823 100644 --- a/packages/desktop-client/src/icons/v1/Ticket.tsx +++ b/packages/desktop-client/src/icons/v1/Ticket.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTicket = (props: SVGProps) => ( +export const SvgTicket = (props: SVGProps) => ( ) => ( /> ); -export default SvgTicket; diff --git a/packages/desktop-client/src/icons/v1/Time.tsx b/packages/desktop-client/src/icons/v1/Time.tsx index 8aeac8294ba..98e29e13d1f 100644 --- a/packages/desktop-client/src/icons/v1/Time.tsx +++ b/packages/desktop-client/src/icons/v1/Time.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTime = (props: SVGProps) => ( +export const SvgTime = (props: SVGProps) => ( ) => ( /> ); -export default SvgTime; diff --git a/packages/desktop-client/src/icons/v1/Timer.tsx b/packages/desktop-client/src/icons/v1/Timer.tsx index f6aaeb50ade..d8928ef2377 100644 --- a/packages/desktop-client/src/icons/v1/Timer.tsx +++ b/packages/desktop-client/src/icons/v1/Timer.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTimer = (props: SVGProps) => ( +export const SvgTimer = (props: SVGProps) => ( ) => ( /> ); -export default SvgTimer; diff --git a/packages/desktop-client/src/icons/v1/ToolsCopy.tsx b/packages/desktop-client/src/icons/v1/ToolsCopy.tsx index 3c3f26dbc1d..67e5b91c05a 100644 --- a/packages/desktop-client/src/icons/v1/ToolsCopy.tsx +++ b/packages/desktop-client/src/icons/v1/ToolsCopy.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgToolsCopy = (props: SVGProps) => ( +export const SvgToolsCopy = (props: SVGProps) => ( ) => ( /> ); -export default SvgToolsCopy; diff --git a/packages/desktop-client/src/icons/v1/Translate.tsx b/packages/desktop-client/src/icons/v1/Translate.tsx index d2c474565db..93f5b582575 100644 --- a/packages/desktop-client/src/icons/v1/Translate.tsx +++ b/packages/desktop-client/src/icons/v1/Translate.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTranslate = (props: SVGProps) => ( +export const SvgTranslate = (props: SVGProps) => ( ) => ( /> ); -export default SvgTranslate; diff --git a/packages/desktop-client/src/icons/v1/Trash.tsx b/packages/desktop-client/src/icons/v1/Trash.tsx index 45a0d62ee9e..29616a8885a 100644 --- a/packages/desktop-client/src/icons/v1/Trash.tsx +++ b/packages/desktop-client/src/icons/v1/Trash.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTrash = (props: SVGProps) => ( +export const SvgTrash = (props: SVGProps) => ( ) => ( /> ); -export default SvgTrash; diff --git a/packages/desktop-client/src/icons/v1/Travel.tsx b/packages/desktop-client/src/icons/v1/Travel.tsx index f245cdadf8a..64d136915af 100644 --- a/packages/desktop-client/src/icons/v1/Travel.tsx +++ b/packages/desktop-client/src/icons/v1/Travel.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTravel = (props: SVGProps) => ( +export const SvgTravel = (props: SVGProps) => ( ) => ( /> ); -export default SvgTravel; diff --git a/packages/desktop-client/src/icons/v1/TravelBus.tsx b/packages/desktop-client/src/icons/v1/TravelBus.tsx index 0d2f36641f0..357dae1e599 100644 --- a/packages/desktop-client/src/icons/v1/TravelBus.tsx +++ b/packages/desktop-client/src/icons/v1/TravelBus.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTravelBus = (props: SVGProps) => ( +export const SvgTravelBus = (props: SVGProps) => ( ) => ( /> ); -export default SvgTravelBus; diff --git a/packages/desktop-client/src/icons/v1/TravelCar.tsx b/packages/desktop-client/src/icons/v1/TravelCar.tsx index 6fc2b04090d..7b2fca6892d 100644 --- a/packages/desktop-client/src/icons/v1/TravelCar.tsx +++ b/packages/desktop-client/src/icons/v1/TravelCar.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTravelCar = (props: SVGProps) => ( +export const SvgTravelCar = (props: SVGProps) => ( ) => ( /> ); -export default SvgTravelCar; diff --git a/packages/desktop-client/src/icons/v1/TravelCase.tsx b/packages/desktop-client/src/icons/v1/TravelCase.tsx index 91ebddcf763..fdcd406f136 100644 --- a/packages/desktop-client/src/icons/v1/TravelCase.tsx +++ b/packages/desktop-client/src/icons/v1/TravelCase.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTravelCase = (props: SVGProps) => ( +export const SvgTravelCase = (props: SVGProps) => ( ) => ( /> ); -export default SvgTravelCase; diff --git a/packages/desktop-client/src/icons/v1/TravelTaxiCab.tsx b/packages/desktop-client/src/icons/v1/TravelTaxiCab.tsx index 3073c11fdce..e5ef8aa1517 100644 --- a/packages/desktop-client/src/icons/v1/TravelTaxiCab.tsx +++ b/packages/desktop-client/src/icons/v1/TravelTaxiCab.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTravelTaxiCab = (props: SVGProps) => ( +export const SvgTravelTaxiCab = (props: SVGProps) => ( ) => ( /> ); -export default SvgTravelTaxiCab; diff --git a/packages/desktop-client/src/icons/v1/TravelTrain.tsx b/packages/desktop-client/src/icons/v1/TravelTrain.tsx index 2101bf628a1..5fde9f87f8f 100644 --- a/packages/desktop-client/src/icons/v1/TravelTrain.tsx +++ b/packages/desktop-client/src/icons/v1/TravelTrain.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTravelTrain = (props: SVGProps) => ( +export const SvgTravelTrain = (props: SVGProps) => ( ) => ( /> ); -export default SvgTravelTrain; diff --git a/packages/desktop-client/src/icons/v1/TravelWalk.tsx b/packages/desktop-client/src/icons/v1/TravelWalk.tsx index 494aacdf4c2..6b8abc95902 100644 --- a/packages/desktop-client/src/icons/v1/TravelWalk.tsx +++ b/packages/desktop-client/src/icons/v1/TravelWalk.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTravelWalk = (props: SVGProps) => ( +export const SvgTravelWalk = (props: SVGProps) => ( ) => ( /> ); -export default SvgTravelWalk; diff --git a/packages/desktop-client/src/icons/v1/Trophy.tsx b/packages/desktop-client/src/icons/v1/Trophy.tsx index 13176226221..9589e2800d2 100644 --- a/packages/desktop-client/src/icons/v1/Trophy.tsx +++ b/packages/desktop-client/src/icons/v1/Trophy.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTrophy = (props: SVGProps) => ( +export const SvgTrophy = (props: SVGProps) => ( ) => ( /> ); -export default SvgTrophy; diff --git a/packages/desktop-client/src/icons/v1/Tuning.tsx b/packages/desktop-client/src/icons/v1/Tuning.tsx index 4f470d52304..02c06c22e18 100644 --- a/packages/desktop-client/src/icons/v1/Tuning.tsx +++ b/packages/desktop-client/src/icons/v1/Tuning.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgTuning = (props: SVGProps) => ( +export const SvgTuning = (props: SVGProps) => ( ) => ( /> ); -export default SvgTuning; diff --git a/packages/desktop-client/src/icons/v1/Upload.tsx b/packages/desktop-client/src/icons/v1/Upload.tsx index fbee62a8d3f..5f013fc900d 100644 --- a/packages/desktop-client/src/icons/v1/Upload.tsx +++ b/packages/desktop-client/src/icons/v1/Upload.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgUpload = (props: SVGProps) => ( +export const SvgUpload = (props: SVGProps) => ( ) => ( ); -export default SvgUpload; diff --git a/packages/desktop-client/src/icons/v1/Usb.tsx b/packages/desktop-client/src/icons/v1/Usb.tsx index 8fbccf30467..0a6337425f3 100644 --- a/packages/desktop-client/src/icons/v1/Usb.tsx +++ b/packages/desktop-client/src/icons/v1/Usb.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgUsb = (props: SVGProps) => ( +export const SvgUsb = (props: SVGProps) => ( ) => ( /> ); -export default SvgUsb; diff --git a/packages/desktop-client/src/icons/v1/User.tsx b/packages/desktop-client/src/icons/v1/User.tsx index 41891e45142..ceb613ee19b 100644 --- a/packages/desktop-client/src/icons/v1/User.tsx +++ b/packages/desktop-client/src/icons/v1/User.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgUser = (props: SVGProps) => ( +export const SvgUser = (props: SVGProps) => ( ) => ( /> ); -export default SvgUser; diff --git a/packages/desktop-client/src/icons/v1/UserAdd.tsx b/packages/desktop-client/src/icons/v1/UserAdd.tsx index 62d9a2ef3e3..0d270739776 100644 --- a/packages/desktop-client/src/icons/v1/UserAdd.tsx +++ b/packages/desktop-client/src/icons/v1/UserAdd.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgUserAdd = (props: SVGProps) => ( +export const SvgUserAdd = (props: SVGProps) => ( ) => ( /> ); -export default SvgUserAdd; diff --git a/packages/desktop-client/src/icons/v1/UserGroup.tsx b/packages/desktop-client/src/icons/v1/UserGroup.tsx index a7ff6159d2f..2f3a84fe98d 100644 --- a/packages/desktop-client/src/icons/v1/UserGroup.tsx +++ b/packages/desktop-client/src/icons/v1/UserGroup.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgUserGroup = (props: SVGProps) => ( +export const SvgUserGroup = (props: SVGProps) => ( ) => ( /> ); -export default SvgUserGroup; diff --git a/packages/desktop-client/src/icons/v1/UserSolidCircle.tsx b/packages/desktop-client/src/icons/v1/UserSolidCircle.tsx index e7583fe8415..763194302f7 100644 --- a/packages/desktop-client/src/icons/v1/UserSolidCircle.tsx +++ b/packages/desktop-client/src/icons/v1/UserSolidCircle.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgUserSolidCircle = (props: SVGProps) => ( +export const SvgUserSolidCircle = (props: SVGProps) => ( ) => ( /> ); -export default SvgUserSolidCircle; diff --git a/packages/desktop-client/src/icons/v1/UserSolidSquare.tsx b/packages/desktop-client/src/icons/v1/UserSolidSquare.tsx index a75cd367c13..b2e5db7874c 100644 --- a/packages/desktop-client/src/icons/v1/UserSolidSquare.tsx +++ b/packages/desktop-client/src/icons/v1/UserSolidSquare.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgUserSolidSquare = (props: SVGProps) => ( +export const SvgUserSolidSquare = (props: SVGProps) => ( ) => ( /> ); -export default SvgUserSolidSquare; diff --git a/packages/desktop-client/src/icons/v1/Vector.tsx b/packages/desktop-client/src/icons/v1/Vector.tsx index f911c85e0e5..6ce48a33ddc 100644 --- a/packages/desktop-client/src/icons/v1/Vector.tsx +++ b/packages/desktop-client/src/icons/v1/Vector.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgVector = (props: SVGProps) => ( +export const SvgVector = (props: SVGProps) => ( ) => ( /> ); -export default SvgVector; diff --git a/packages/desktop-client/src/icons/v1/VideoCamera.tsx b/packages/desktop-client/src/icons/v1/VideoCamera.tsx index 75295a5aeae..7e1e745afdd 100644 --- a/packages/desktop-client/src/icons/v1/VideoCamera.tsx +++ b/packages/desktop-client/src/icons/v1/VideoCamera.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgVideoCamera = (props: SVGProps) => ( +export const SvgVideoCamera = (props: SVGProps) => ( ) => ( /> ); -export default SvgVideoCamera; diff --git a/packages/desktop-client/src/icons/v1/ViewCarousel.tsx b/packages/desktop-client/src/icons/v1/ViewCarousel.tsx index b6bdc0db2d8..77417c37f80 100644 --- a/packages/desktop-client/src/icons/v1/ViewCarousel.tsx +++ b/packages/desktop-client/src/icons/v1/ViewCarousel.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgViewCarousel = (props: SVGProps) => ( +export const SvgViewCarousel = (props: SVGProps) => ( ) => ( /> ); -export default SvgViewCarousel; diff --git a/packages/desktop-client/src/icons/v1/ViewColumn.tsx b/packages/desktop-client/src/icons/v1/ViewColumn.tsx index 5d1f3c92900..01dd7d0e993 100644 --- a/packages/desktop-client/src/icons/v1/ViewColumn.tsx +++ b/packages/desktop-client/src/icons/v1/ViewColumn.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgViewColumn = (props: SVGProps) => ( +export const SvgViewColumn = (props: SVGProps) => ( ) => ( /> ); -export default SvgViewColumn; diff --git a/packages/desktop-client/src/icons/v1/ViewHide.tsx b/packages/desktop-client/src/icons/v1/ViewHide.tsx index c37a91e62ce..01f688f1da1 100644 --- a/packages/desktop-client/src/icons/v1/ViewHide.tsx +++ b/packages/desktop-client/src/icons/v1/ViewHide.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgViewHide = (props: SVGProps) => ( +export const SvgViewHide = (props: SVGProps) => ( ) => ( /> ); -export default SvgViewHide; diff --git a/packages/desktop-client/src/icons/v1/ViewList.tsx b/packages/desktop-client/src/icons/v1/ViewList.tsx index 32d7a28d283..19b25a63727 100644 --- a/packages/desktop-client/src/icons/v1/ViewList.tsx +++ b/packages/desktop-client/src/icons/v1/ViewList.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgViewList = (props: SVGProps) => ( +export const SvgViewList = (props: SVGProps) => ( ) => ( /> ); -export default SvgViewList; diff --git a/packages/desktop-client/src/icons/v1/ViewShow.tsx b/packages/desktop-client/src/icons/v1/ViewShow.tsx index 13b76d9a63d..2772b5c6c74 100644 --- a/packages/desktop-client/src/icons/v1/ViewShow.tsx +++ b/packages/desktop-client/src/icons/v1/ViewShow.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgViewShow = (props: SVGProps) => ( +export const SvgViewShow = (props: SVGProps) => ( ) => ( /> ); -export default SvgViewShow; diff --git a/packages/desktop-client/src/icons/v1/ViewTile.tsx b/packages/desktop-client/src/icons/v1/ViewTile.tsx index 2c978d4ef31..6389f96bd6d 100644 --- a/packages/desktop-client/src/icons/v1/ViewTile.tsx +++ b/packages/desktop-client/src/icons/v1/ViewTile.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgViewTile = (props: SVGProps) => ( +export const SvgViewTile = (props: SVGProps) => ( ) => ( /> ); -export default SvgViewTile; diff --git a/packages/desktop-client/src/icons/v1/VolumeDown.tsx b/packages/desktop-client/src/icons/v1/VolumeDown.tsx index 222032882a7..26b449710b1 100644 --- a/packages/desktop-client/src/icons/v1/VolumeDown.tsx +++ b/packages/desktop-client/src/icons/v1/VolumeDown.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgVolumeDown = (props: SVGProps) => ( +export const SvgVolumeDown = (props: SVGProps) => ( ) => ( /> ); -export default SvgVolumeDown; diff --git a/packages/desktop-client/src/icons/v1/VolumeMute.tsx b/packages/desktop-client/src/icons/v1/VolumeMute.tsx index 9a0f518d365..b880910cfa8 100644 --- a/packages/desktop-client/src/icons/v1/VolumeMute.tsx +++ b/packages/desktop-client/src/icons/v1/VolumeMute.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgVolumeMute = (props: SVGProps) => ( +export const SvgVolumeMute = (props: SVGProps) => ( ) => ( ); -export default SvgVolumeMute; diff --git a/packages/desktop-client/src/icons/v1/VolumeOff.tsx b/packages/desktop-client/src/icons/v1/VolumeOff.tsx index 1e1e2e6883d..ec801a41a3d 100644 --- a/packages/desktop-client/src/icons/v1/VolumeOff.tsx +++ b/packages/desktop-client/src/icons/v1/VolumeOff.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgVolumeOff = (props: SVGProps) => ( +export const SvgVolumeOff = (props: SVGProps) => ( ) => ( /> ); -export default SvgVolumeOff; diff --git a/packages/desktop-client/src/icons/v1/VolumeUp.tsx b/packages/desktop-client/src/icons/v1/VolumeUp.tsx index bd6a5a1cd96..7dbad9790fc 100644 --- a/packages/desktop-client/src/icons/v1/VolumeUp.tsx +++ b/packages/desktop-client/src/icons/v1/VolumeUp.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgVolumeUp = (props: SVGProps) => ( +export const SvgVolumeUp = (props: SVGProps) => ( ) => ( /> ); -export default SvgVolumeUp; diff --git a/packages/desktop-client/src/icons/v1/Wallet.tsx b/packages/desktop-client/src/icons/v1/Wallet.tsx index 1f913720f3a..b34d7dcd0cc 100644 --- a/packages/desktop-client/src/icons/v1/Wallet.tsx +++ b/packages/desktop-client/src/icons/v1/Wallet.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgWallet = (props: SVGProps) => ( +export const SvgWallet = (props: SVGProps) => ( ) => ( /> ); -export default SvgWallet; diff --git a/packages/desktop-client/src/icons/v1/Watch.tsx b/packages/desktop-client/src/icons/v1/Watch.tsx index 484609ddc42..bbcd09eb191 100644 --- a/packages/desktop-client/src/icons/v1/Watch.tsx +++ b/packages/desktop-client/src/icons/v1/Watch.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgWatch = (props: SVGProps) => ( +export const SvgWatch = (props: SVGProps) => ( ) => ( /> ); -export default SvgWatch; diff --git a/packages/desktop-client/src/icons/v1/Window.tsx b/packages/desktop-client/src/icons/v1/Window.tsx index 08adb45abfd..364a85dcc7f 100644 --- a/packages/desktop-client/src/icons/v1/Window.tsx +++ b/packages/desktop-client/src/icons/v1/Window.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgWindow = (props: SVGProps) => ( +export const SvgWindow = (props: SVGProps) => ( ) => ( /> ); -export default SvgWindow; diff --git a/packages/desktop-client/src/icons/v1/WindowNew.tsx b/packages/desktop-client/src/icons/v1/WindowNew.tsx index 2f2f526e730..d43dfe150bf 100644 --- a/packages/desktop-client/src/icons/v1/WindowNew.tsx +++ b/packages/desktop-client/src/icons/v1/WindowNew.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgWindowNew = (props: SVGProps) => ( +export const SvgWindowNew = (props: SVGProps) => ( ) => ( /> ); -export default SvgWindowNew; diff --git a/packages/desktop-client/src/icons/v1/WindowOpen.tsx b/packages/desktop-client/src/icons/v1/WindowOpen.tsx index d88ef017032..ebd05db9585 100644 --- a/packages/desktop-client/src/icons/v1/WindowOpen.tsx +++ b/packages/desktop-client/src/icons/v1/WindowOpen.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgWindowOpen = (props: SVGProps) => ( +export const SvgWindowOpen = (props: SVGProps) => ( ) => ( /> ); -export default SvgWindowOpen; diff --git a/packages/desktop-client/src/icons/v1/Wrench.tsx b/packages/desktop-client/src/icons/v1/Wrench.tsx index cab5a44e3af..18cf5da6971 100644 --- a/packages/desktop-client/src/icons/v1/Wrench.tsx +++ b/packages/desktop-client/src/icons/v1/Wrench.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgWrench = (props: SVGProps) => ( +export const SvgWrench = (props: SVGProps) => ( ) => ( /> ); -export default SvgWrench; diff --git a/packages/desktop-client/src/icons/v1/YinYang.tsx b/packages/desktop-client/src/icons/v1/YinYang.tsx index cae79efe1c2..2c8a05e462d 100644 --- a/packages/desktop-client/src/icons/v1/YinYang.tsx +++ b/packages/desktop-client/src/icons/v1/YinYang.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgYinYang = (props: SVGProps) => ( +export const SvgYinYang = (props: SVGProps) => ( ) => ( /> ); -export default SvgYinYang; diff --git a/packages/desktop-client/src/icons/v1/ZoomIn.tsx b/packages/desktop-client/src/icons/v1/ZoomIn.tsx index a4ddf8d8430..c54337b4054 100644 --- a/packages/desktop-client/src/icons/v1/ZoomIn.tsx +++ b/packages/desktop-client/src/icons/v1/ZoomIn.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgZoomIn = (props: SVGProps) => ( +export const SvgZoomIn = (props: SVGProps) => ( ) => ( /> ); -export default SvgZoomIn; diff --git a/packages/desktop-client/src/icons/v1/ZoomOut.tsx b/packages/desktop-client/src/icons/v1/ZoomOut.tsx index b78dcc47d70..82c2f98acf1 100644 --- a/packages/desktop-client/src/icons/v1/ZoomOut.tsx +++ b/packages/desktop-client/src/icons/v1/ZoomOut.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgZoomOut = (props: SVGProps) => ( +export const SvgZoomOut = (props: SVGProps) => ( ) => ( /> ); -export default SvgZoomOut; diff --git a/packages/desktop-client/src/icons/v1/index.ts b/packages/desktop-client/src/icons/v1/index.ts index 4cf716cf43d..af80dcca3a5 100644 --- a/packages/desktop-client/src/icons/v1/index.ts +++ b/packages/desktop-client/src/icons/v1/index.ts @@ -1,310 +1,310 @@ -export { default as AddOutline } from './AddOutline'; -export { default as AddSolid } from './AddSolid'; -export { default as Add } from './Add'; -export { default as Adjust } from './Adjust'; -export { default as Airplane } from './Airplane'; -export { default as Album } from './Album'; -export { default as AlignCenter } from './AlignCenter'; -export { default as AlignJustified } from './AlignJustified'; -export { default as AlignLeft } from './AlignLeft'; -export { default as AlignRight } from './AlignRight'; -export { default as Anchor } from './Anchor'; -export { default as Announcement } from './Announcement'; -export { default as Apparel } from './Apparel'; -export { default as ArrowDown } from './ArrowDown'; -export { default as ArrowLeft } from './ArrowLeft'; -export { default as ArrowOutlineDown } from './ArrowOutlineDown'; -export { default as ArrowOutlineLeft } from './ArrowOutlineLeft'; -export { default as ArrowOutlineRight } from './ArrowOutlineRight'; -export { default as ArrowOutlineUp } from './ArrowOutlineUp'; -export { default as ArrowRight } from './ArrowRight'; -export { default as ArrowThickDown } from './ArrowThickDown'; -export { default as ArrowThickLeft } from './ArrowThickLeft'; -export { default as ArrowThickRight } from './ArrowThickRight'; -export { default as ArrowThickUp } from './ArrowThickUp'; -export { default as ArrowThinDown } from './ArrowThinDown'; -export { default as ArrowThinLeft } from './ArrowThinLeft'; -export { default as ArrowThinRight } from './ArrowThinRight'; -export { default as ArrowThinUp } from './ArrowThinUp'; -export { default as ArrowUp } from './ArrowUp'; -export { default as Artist } from './Artist'; -export { default as AtSymbol } from './AtSymbol'; -export { default as Attachment } from './Attachment'; -export { default as Backspace } from './Backspace'; -export { default as BackwardStep } from './BackwardStep'; -export { default as Backward } from './Backward'; -export { default as Badge } from './Badge'; -export { default as BatteryFull } from './BatteryFull'; -export { default as BatteryHalf } from './BatteryHalf'; -export { default as BatteryLow } from './BatteryLow'; -export { default as Beverage } from './Beverage'; -export { default as Block } from './Block'; -export { default as Bluetooth } from './Bluetooth'; -export { default as Bolt } from './Bolt'; -export { default as BookReference } from './BookReference'; -export { default as BookmarkCopy2 } from './BookmarkCopy2'; -export { default as BookmarkCopy3 } from './BookmarkCopy3'; -export { default as BookmarkOutlineAdd } from './BookmarkOutlineAdd'; -export { default as BookmarkOutline } from './BookmarkOutline'; -export { default as Bookmark } from './Bookmark'; -export { default as BorderAll } from './BorderAll'; -export { default as BorderBottom } from './BorderBottom'; -export { default as BorderHorizontal } from './BorderHorizontal'; -export { default as BorderInner } from './BorderInner'; -export { default as BorderLeft } from './BorderLeft'; -export { default as BorderNone } from './BorderNone'; -export { default as BorderOuter } from './BorderOuter'; -export { default as BorderRight } from './BorderRight'; -export { default as BorderTop } from './BorderTop'; -export { default as BorderVertical } from './BorderVertical'; -export { default as Box } from './Box'; -export { default as BrightnessDown } from './BrightnessDown'; -export { default as BrightnessUp } from './BrightnessUp'; -export { default as BrowserWindowNew } from './BrowserWindowNew'; -export { default as BrowserWindowOpen } from './BrowserWindowOpen'; -export { default as BrowserWindow } from './BrowserWindow'; -export { default as Bug } from './Bug'; -export { default as Buoy } from './Buoy'; -export { default as Calculator } from './Calculator'; -export { default as Calendar } from './Calendar'; -export { default as Camera } from './Camera'; -export { default as ChartBar } from './ChartBar'; -export { default as ChartPie } from './ChartPie'; -export { default as Chart } from './Chart'; -export { default as ChatBubbleDots } from './ChatBubbleDots'; -export { default as CheckAlternative } from './CheckAlternative'; -export { default as CheckmarkOutline } from './CheckmarkOutline'; -export { default as Checkmark } from './Checkmark'; -export { default as CheveronDown } from './CheveronDown'; -export { default as CheveronLeft } from './CheveronLeft'; -export { default as CheveronOutlineDown } from './CheveronOutlineDown'; -export { default as CheveronOutlineLeft } from './CheveronOutlineLeft'; -export { default as CheveronOutlineRight } from './CheveronOutlineRight'; -export { default as CheveronOutlineUp } from './CheveronOutlineUp'; -export { default as CheveronRight } from './CheveronRight'; -export { default as CheveronUp } from './CheveronUp'; -export { default as Clipboard } from './Clipboard'; -export { default as CloseOutline } from './CloseOutline'; -export { default as CloseSolid } from './CloseSolid'; -export { default as Close } from './Close'; -export { default as CloudCheck } from './CloudCheck'; -export { default as CloudDownload } from './CloudDownload'; -export { default as CloudUpload } from './CloudUpload'; -export { default as CloudWarning } from './CloudWarning'; -export { default as Cloud } from './Cloud'; -export { default as Code } from './Code'; -export { default as Coffee } from './Coffee'; -export { default as Cog } from './Cog'; -export { default as ColorPalette } from './ColorPalette'; -export { default as Compose } from './Compose'; -export { default as ComputerDesktop } from './ComputerDesktop'; -export { default as ComputerLaptop } from './ComputerLaptop'; -export { default as Conversation } from './Conversation'; -export { default as Copy } from './Copy'; -export { default as CreditCard } from './CreditCard'; -export { default as CurrencyDollar } from './CurrencyDollar'; -export { default as Dashboard } from './Dashboard'; -export { default as DateAdd } from './DateAdd'; -export { default as DialPad } from './DialPad'; -export { default as Directions } from './Directions'; -export { default as DocumentAdd } from './DocumentAdd'; -export { default as Document } from './Document'; -export { default as DotsHorizontalDouble } from './DotsHorizontalDouble'; -export { default as DotsHorizontalTriple } from './DotsHorizontalTriple'; -export { default as Download } from './Download'; -export { default as Duplicate } from './Duplicate'; -export { default as EditCopy } from './EditCopy'; -export { default as EditCrop } from './EditCrop'; -export { default as EditCut } from './EditCut'; -export { default as EditPencil } from './EditPencil'; -export { default as Education } from './Education'; -export { default as Envelope } from './Envelope'; -export { default as Equals } from './Equals'; -export { default as ExclamationOutline } from './ExclamationOutline'; -export { default as ExclamationSolid } from './ExclamationSolid'; -export { default as Explore } from './Explore'; -export { default as Factory } from './Factory'; -export { default as FastForward } from './FastForward'; -export { default as FastRewind } from './FastRewind'; -export { default as FileDouble } from './FileDouble'; -export { default as Film } from './Film'; -export { default as Filter } from './Filter'; -export { default as Flag } from './Flag'; -export { default as Flashlight } from './Flashlight'; -export { default as FolderOutlineAdd } from './FolderOutlineAdd'; -export { default as FolderOutline } from './FolderOutline'; -export { default as Folder } from './Folder'; -export { default as FormatBold } from './FormatBold'; -export { default as FormatFontSize } from './FormatFontSize'; -export { default as FormatItalic } from './FormatItalic'; -export { default as FormatTextSize } from './FormatTextSize'; -export { default as FormatUnderline } from './FormatUnderline'; -export { default as ForwardStep } from './ForwardStep'; -export { default as Forward } from './Forward'; -export { default as Gift } from './Gift'; -export { default as Globe } from './Globe'; -export { default as HandStop } from './HandStop'; -export { default as HardDrive } from './HardDrive'; -export { default as Headphones } from './Headphones'; -export { default as Heart } from './Heart'; -export { default as Home } from './Home'; -export { default as Hot } from './Hot'; -export { default as HourGlass } from './HourGlass'; -export { default as InboxCheck } from './InboxCheck'; -export { default as InboxDownload } from './InboxDownload'; -export { default as InboxFull } from './InboxFull'; -export { default as Inbox } from './Inbox'; -export { default as IndentDecrease } from './IndentDecrease'; -export { default as IndentIncrease } from './IndentIncrease'; -export { default as InformationOutline } from './InformationOutline'; -export { default as InformationSolid } from './InformationSolid'; -export { default as Key } from './Key'; -export { default as Keyboard } from './Keyboard'; -export { default as Layers } from './Layers'; -export { default as Library } from './Library'; -export { default as LightBulb } from './LightBulb'; -export { default as Link } from './Link'; -export { default as ListAdd } from './ListAdd'; -export { default as ListBullet } from './ListBullet'; -export { default as List } from './List'; -export { default as LoadBalancer } from './LoadBalancer'; -export { default as LocationCurrent } from './LocationCurrent'; -export { default as LocationFood } from './LocationFood'; -export { default as LocationGasStation } from './LocationGasStation'; -export { default as LocationHotel } from './LocationHotel'; -export { default as LocationMarina } from './LocationMarina'; -export { default as LocationPark } from './LocationPark'; -export { default as LocationRestroom } from './LocationRestroom'; -export { default as LocationShopping } from './LocationShopping'; -export { default as Location } from './Location'; -export { default as LockClosed } from './LockClosed'; -export { default as LockOpen } from './LockOpen'; -export { default as Map } from './Map'; -export { default as Menu } from './Menu'; -export { default as Mic } from './Mic'; -export { default as MinusOutline } from './MinusOutline'; -export { default as MinusSolid } from './MinusSolid'; -export { default as MobileDevices } from './MobileDevices'; -export { default as MoneyBag } from './MoneyBag'; -export { default as MoodHappyOutline } from './MoodHappyOutline'; -export { default as MoodHappySolid } from './MoodHappySolid'; -export { default as MoodNeutralOutline } from './MoodNeutralOutline'; -export { default as MoodNeutralSolid } from './MoodNeutralSolid'; -export { default as MoodSadOutline } from './MoodSadOutline'; -export { default as MoodSadSolid } from './MoodSadSolid'; -export { default as Mouse } from './Mouse'; -export { default as MoveBack } from './MoveBack'; -export { default as MusicAlbum } from './MusicAlbum'; -export { default as MusicArtist } from './MusicArtist'; -export { default as MusicNotes } from './MusicNotes'; -export { default as MusicPlaylist } from './MusicPlaylist'; -export { default as NavigationMore } from './NavigationMore'; -export { default as Network } from './Network'; -export { default as NewsPaper } from './NewsPaper'; -export { default as Notification } from './Notification'; -export { default as NotificationsOutline } from './NotificationsOutline'; -export { default as Notifications } from './Notifications'; -export { default as Paste } from './Paste'; -export { default as PauseOutline } from './PauseOutline'; -export { default as PauseSolid } from './PauseSolid'; -export { default as Pause } from './Pause'; -export { default as PenTool } from './PenTool'; -export { default as PencilWrite } from './PencilWrite'; -export { default as Phone } from './Phone'; -export { default as Photo } from './Photo'; -export { default as PhpElephant } from './PhpElephant'; -export { default as PiggyBank } from './PiggyBank'; -export { default as Pin } from './Pin'; -export { default as PlayOutline } from './PlayOutline'; -export { default as Play } from './Play'; -export { default as Playlist } from './Playlist'; -export { default as Plugin } from './Plugin'; -export { default as Portfolio } from './Portfolio'; -export { default as Printer } from './Printer'; -export { default as Pylon } from './Pylon'; -export { default as Question } from './Question'; -export { default as Queue } from './Queue'; -export { default as RadarCopy2 } from './RadarCopy2'; -export { default as Radar } from './Radar'; -export { default as Radio } from './Radio'; -export { default as Refresh } from './Refresh'; -export { default as Reload } from './Reload'; -export { default as ReplyAll } from './ReplyAll'; -export { default as Reply } from './Reply'; -export { default as Reports } from './Reports'; -export { default as Repost } from './Repost'; -export { default as SaveDisk } from './SaveDisk'; -export { default as ScreenFull } from './ScreenFull'; -export { default as Search } from './Search'; -export { default as Send } from './Send'; -export { default as Servers } from './Servers'; -export { default as Share01 } from './Share01'; -export { default as ShareAlt } from './ShareAlt'; -export { default as Share } from './Share'; -export { default as Shield } from './Shield'; -export { default as ShoppingCart } from './ShoppingCart'; -export { default as ShowSidebar } from './ShowSidebar'; -export { default as Shuffle } from './Shuffle'; -export { default as StandBy } from './StandBy'; -export { default as StarFull } from './StarFull'; -export { default as Station } from './Station'; -export { default as StepBackward } from './StepBackward'; -export { default as StepForward } from './StepForward'; -export { default as Stethoscope } from './Stethoscope'; -export { default as StoreFront } from './StoreFront'; -export { default as StrokeWidth } from './StrokeWidth'; -export { default as SubdirectoryLeft } from './SubdirectoryLeft'; -export { default as SubdirectoryRight } from './SubdirectoryRight'; -export { default as Subtract } from './Subtract'; -export { default as Swap } from './Swap'; -export { default as Tablet } from './Tablet'; -export { default as Tag } from './Tag'; -export { default as Target } from './Target'; -export { default as TextBox } from './TextBox'; -export { default as TextDecoration } from './TextDecoration'; -export { default as Thermometer } from './Thermometer'; -export { default as ThumbsDown } from './ThumbsDown'; -export { default as ThumbsUp } from './ThumbsUp'; -export { default as Ticket } from './Ticket'; -export { default as Time } from './Time'; -export { default as Timer } from './Timer'; -export { default as ToolsCopy } from './ToolsCopy'; -export { default as Translate } from './Translate'; -export { default as Trash } from './Trash'; -export { default as TravelBus } from './TravelBus'; -export { default as TravelCar } from './TravelCar'; -export { default as TravelCase } from './TravelCase'; -export { default as TravelTaxiCab } from './TravelTaxiCab'; -export { default as TravelTrain } from './TravelTrain'; -export { default as TravelWalk } from './TravelWalk'; -export { default as Travel } from './Travel'; -export { default as Trophy } from './Trophy'; -export { default as Tuning } from './Tuning'; -export { default as Upload } from './Upload'; -export { default as Usb } from './Usb'; -export { default as UserAdd } from './UserAdd'; -export { default as UserGroup } from './UserGroup'; -export { default as UserSolidCircle } from './UserSolidCircle'; -export { default as UserSolidSquare } from './UserSolidSquare'; -export { default as User } from './User'; -export { default as Vector } from './Vector'; -export { default as VideoCamera } from './VideoCamera'; -export { default as ViewCarousel } from './ViewCarousel'; -export { default as ViewColumn } from './ViewColumn'; -export { default as ViewHide } from './ViewHide'; -export { default as ViewList } from './ViewList'; -export { default as ViewShow } from './ViewShow'; -export { default as ViewTile } from './ViewTile'; -export { default as VolumeDown } from './VolumeDown'; -export { default as VolumeMute } from './VolumeMute'; -export { default as VolumeOff } from './VolumeOff'; -export { default as VolumeUp } from './VolumeUp'; -export { default as Wallet } from './Wallet'; -export { default as Watch } from './Watch'; -export { default as WindowNew } from './WindowNew'; -export { default as WindowOpen } from './WindowOpen'; -export { default as Window } from './Window'; -export { default as Wrench } from './Wrench'; -export { default as YinYang } from './YinYang'; -export { default as ZoomIn } from './ZoomIn'; -export { default as ZoomOut } from './ZoomOut'; +export { SvgAddOutline } from './AddOutline'; +export { SvgAddSolid } from './AddSolid'; +export { SvgAdd } from './Add'; +export { SvgAdjust } from './Adjust'; +export { SvgAirplane } from './Airplane'; +export { SvgAlbum } from './Album'; +export { SvgAlignCenter } from './AlignCenter'; +export { SvgAlignJustified } from './AlignJustified'; +export { SvgAlignLeft } from './AlignLeft'; +export { SvgAlignRight } from './AlignRight'; +export { SvgAnchor } from './Anchor'; +export { SvgAnnouncement } from './Announcement'; +export { SvgApparel } from './Apparel'; +export { SvgArrowDown } from './ArrowDown'; +export { SvgArrowLeft } from './ArrowLeft'; +export { SvgArrowOutlineDown } from './ArrowOutlineDown'; +export { SvgArrowOutlineLeft } from './ArrowOutlineLeft'; +export { SvgArrowOutlineRight } from './ArrowOutlineRight'; +export { SvgArrowOutlineUp } from './ArrowOutlineUp'; +export { SvgArrowRight } from './ArrowRight'; +export { SvgArrowThickDown } from './ArrowThickDown'; +export { SvgArrowThickLeft } from './ArrowThickLeft'; +export { SvgArrowThickRight } from './ArrowThickRight'; +export { SvgArrowThickUp } from './ArrowThickUp'; +export { SvgArrowThinDown } from './ArrowThinDown'; +export { SvgArrowThinLeft } from './ArrowThinLeft'; +export { SvgArrowThinRight } from './ArrowThinRight'; +export { SvgArrowThinUp } from './ArrowThinUp'; +export { SvgArrowUp } from './ArrowUp'; +export { SvgArtist } from './Artist'; +export { SvgAtSymbol } from './AtSymbol'; +export { SvgAttachment } from './Attachment'; +export { SvgBackspace } from './Backspace'; +export { SvgBackwardStep } from './BackwardStep'; +export { SvgBackward } from './Backward'; +export { SvgBadge } from './Badge'; +export { SvgBatteryFull } from './BatteryFull'; +export { SvgBatteryHalf } from './BatteryHalf'; +export { SvgBatteryLow } from './BatteryLow'; +export { SvgBeverage } from './Beverage'; +export { SvgBlock } from './Block'; +export { SvgBluetooth } from './Bluetooth'; +export { SvgBolt } from './Bolt'; +export { SvgBookReference } from './BookReference'; +export { SvgBookmarkCopy2 } from './BookmarkCopy2'; +export { SvgBookmarkCopy3 } from './BookmarkCopy3'; +export { SvgBookmarkOutlineAdd } from './BookmarkOutlineAdd'; +export { SvgBookmarkOutline } from './BookmarkOutline'; +export { SvgBookmark } from './Bookmark'; +export { SvgBorderAll } from './BorderAll'; +export { SvgBorderBottom } from './BorderBottom'; +export { SvgBorderHorizontal } from './BorderHorizontal'; +export { SvgBorderInner } from './BorderInner'; +export { SvgBorderLeft } from './BorderLeft'; +export { SvgBorderNone } from './BorderNone'; +export { SvgBorderOuter } from './BorderOuter'; +export { SvgBorderRight } from './BorderRight'; +export { SvgBorderTop } from './BorderTop'; +export { SvgBorderVertical } from './BorderVertical'; +export { SvgBox } from './Box'; +export { SvgBrightnessDown } from './BrightnessDown'; +export { SvgBrightnessUp } from './BrightnessUp'; +export { SvgBrowserWindowNew } from './BrowserWindowNew'; +export { SvgBrowserWindowOpen } from './BrowserWindowOpen'; +export { SvgBrowserWindow } from './BrowserWindow'; +export { SvgBug } from './Bug'; +export { SvgBuoy } from './Buoy'; +export { SvgCalculator } from './Calculator'; +export { SvgCalendar } from './Calendar'; +export { SvgCamera } from './Camera'; +export { SvgChartBar } from './ChartBar'; +export { SvgChartPie } from './ChartPie'; +export { SvgChart } from './Chart'; +export { SvgChatBubbleDots } from './ChatBubbleDots'; +export { SvgCheckAlternative } from './CheckAlternative'; +export { SvgCheckmarkOutline } from './CheckmarkOutline'; +export { SvgCheckmark } from './Checkmark'; +export { SvgCheveronDown } from './CheveronDown'; +export { SvgCheveronLeft } from './CheveronLeft'; +export { SvgCheveronOutlineDown } from './CheveronOutlineDown'; +export { SvgCheveronOutlineLeft } from './CheveronOutlineLeft'; +export { SvgCheveronOutlineRight } from './CheveronOutlineRight'; +export { SvgCheveronOutlineUp } from './CheveronOutlineUp'; +export { SvgCheveronRight } from './CheveronRight'; +export { SvgCheveronUp } from './CheveronUp'; +export { SvgClipboard } from './Clipboard'; +export { SvgCloseOutline } from './CloseOutline'; +export { SvgCloseSolid } from './CloseSolid'; +export { SvgClose } from './Close'; +export { SvgCloudCheck } from './CloudCheck'; +export { SvgCloudDownload } from './CloudDownload'; +export { SvgCloudUpload } from './CloudUpload'; +export { SvgCloudWarning } from './CloudWarning'; +export { SvgCloud } from './Cloud'; +export { SvgCode } from './Code'; +export { SvgCoffee } from './Coffee'; +export { SvgCog } from './Cog'; +export { SvgColorPalette } from './ColorPalette'; +export { SvgCompose } from './Compose'; +export { SvgComputerDesktop } from './ComputerDesktop'; +export { SvgComputerLaptop } from './ComputerLaptop'; +export { SvgConversation } from './Conversation'; +export { SvgCopy } from './Copy'; +export { SvgCreditCard } from './CreditCard'; +export { SvgCurrencyDollar } from './CurrencyDollar'; +export { SvgDashboard } from './Dashboard'; +export { SvgDateAdd } from './DateAdd'; +export { SvgDialPad } from './DialPad'; +export { SvgDirections } from './Directions'; +export { SvgDocumentAdd } from './DocumentAdd'; +export { SvgDocument } from './Document'; +export { SvgDotsHorizontalDouble } from './DotsHorizontalDouble'; +export { SvgDotsHorizontalTriple } from './DotsHorizontalTriple'; +export { SvgDownload } from './Download'; +export { SvgDuplicate } from './Duplicate'; +export { SvgEditCopy } from './EditCopy'; +export { SvgEditCrop } from './EditCrop'; +export { SvgEditCut } from './EditCut'; +export { SvgEditPencil } from './EditPencil'; +export { SvgEducation } from './Education'; +export { SvgEnvelope } from './Envelope'; +export { SvgEquals } from './Equals'; +export { SvgExclamationOutline } from './ExclamationOutline'; +export { SvgExclamationSolid } from './ExclamationSolid'; +export { SvgExplore } from './Explore'; +export { SvgFactory } from './Factory'; +export { SvgFastForward } from './FastForward'; +export { SvgFastRewind } from './FastRewind'; +export { SvgFileDouble } from './FileDouble'; +export { SvgFilm } from './Film'; +export { SvgFilter } from './Filter'; +export { SvgFlag } from './Flag'; +export { SvgFlashlight } from './Flashlight'; +export { SvgFolderOutlineAdd } from './FolderOutlineAdd'; +export { SvgFolderOutline } from './FolderOutline'; +export { SvgFolder } from './Folder'; +export { SvgFormatBold } from './FormatBold'; +export { SvgFormatFontSize } from './FormatFontSize'; +export { SvgFormatItalic } from './FormatItalic'; +export { SvgFormatTextSize } from './FormatTextSize'; +export { SvgFormatUnderline } from './FormatUnderline'; +export { SvgForwardStep } from './ForwardStep'; +export { SvgForward } from './Forward'; +export { SvgGift } from './Gift'; +export { SvgGlobe } from './Globe'; +export { SvgHandStop } from './HandStop'; +export { SvgHardDrive } from './HardDrive'; +export { SvgHeadphones } from './Headphones'; +export { SvgHeart } from './Heart'; +export { SvgHome } from './Home'; +export { SvgHot } from './Hot'; +export { SvgHourGlass } from './HourGlass'; +export { SvgInboxCheck } from './InboxCheck'; +export { SvgInboxDownload } from './InboxDownload'; +export { SvgInboxFull } from './InboxFull'; +export { SvgInbox } from './Inbox'; +export { SvgIndentDecrease } from './IndentDecrease'; +export { SvgIndentIncrease } from './IndentIncrease'; +export { SvgInformationOutline } from './InformationOutline'; +export { SvgInformationSolid } from './InformationSolid'; +export { SvgKey } from './Key'; +export { SvgKeyboard } from './Keyboard'; +export { SvgLayers } from './Layers'; +export { SvgLibrary } from './Library'; +export { SvgLightBulb } from './LightBulb'; +export { SvgLink } from './Link'; +export { SvgListAdd } from './ListAdd'; +export { SvgListBullet } from './ListBullet'; +export { SvgList } from './List'; +export { SvgLoadBalancer } from './LoadBalancer'; +export { SvgLocationCurrent } from './LocationCurrent'; +export { SvgLocationFood } from './LocationFood'; +export { SvgLocationGasStation } from './LocationGasStation'; +export { SvgLocationHotel } from './LocationHotel'; +export { SvgLocationMarina } from './LocationMarina'; +export { SvgLocationPark } from './LocationPark'; +export { SvgLocationRestroom } from './LocationRestroom'; +export { SvgLocationShopping } from './LocationShopping'; +export { SvgLocation } from './Location'; +export { SvgLockClosed } from './LockClosed'; +export { SvgLockOpen } from './LockOpen'; +export { SvgMap } from './Map'; +export { SvgMenu } from './Menu'; +export { SvgMic } from './Mic'; +export { SvgMinusOutline } from './MinusOutline'; +export { SvgMinusSolid } from './MinusSolid'; +export { SvgMobileDevices } from './MobileDevices'; +export { SvgMoneyBag } from './MoneyBag'; +export { SvgMoodHappyOutline } from './MoodHappyOutline'; +export { SvgMoodHappySolid } from './MoodHappySolid'; +export { SvgMoodNeutralOutline } from './MoodNeutralOutline'; +export { SvgMoodNeutralSolid } from './MoodNeutralSolid'; +export { SvgMoodSadOutline } from './MoodSadOutline'; +export { SvgMoodSadSolid } from './MoodSadSolid'; +export { SvgMouse } from './Mouse'; +export { SvgMoveBack } from './MoveBack'; +export { SvgMusicAlbum } from './MusicAlbum'; +export { SvgMusicArtist } from './MusicArtist'; +export { SvgMusicNotes } from './MusicNotes'; +export { SvgMusicPlaylist } from './MusicPlaylist'; +export { SvgNavigationMore } from './NavigationMore'; +export { SvgNetwork } from './Network'; +export { SvgNewsPaper } from './NewsPaper'; +export { SvgNotification } from './Notification'; +export { SvgNotificationsOutline } from './NotificationsOutline'; +export { SvgNotifications } from './Notifications'; +export { SvgPaste } from './Paste'; +export { SvgPauseOutline } from './PauseOutline'; +export { SvgPauseSolid } from './PauseSolid'; +export { SvgPause } from './Pause'; +export { SvgPenTool } from './PenTool'; +export { SvgPencilWrite } from './PencilWrite'; +export { SvgPhone } from './Phone'; +export { SvgPhoto } from './Photo'; +export { SvgPhpElephant } from './PhpElephant'; +export { SvgPiggyBank } from './PiggyBank'; +export { SvgPin } from './Pin'; +export { SvgPlayOutline } from './PlayOutline'; +export { SvgPlay } from './Play'; +export { SvgPlaylist } from './Playlist'; +export { SvgPlugin } from './Plugin'; +export { SvgPortfolio } from './Portfolio'; +export { SvgPrinter } from './Printer'; +export { SvgPylon } from './Pylon'; +export { SvgQuestion } from './Question'; +export { SvgQueue } from './Queue'; +export { SvgRadarCopy2 } from './RadarCopy2'; +export { SvgRadar } from './Radar'; +export { SvgRadio } from './Radio'; +export { SvgRefresh } from './Refresh'; +export { SvgReload } from './Reload'; +export { SvgReplyAll } from './ReplyAll'; +export { SvgReply } from './Reply'; +export { SvgReports } from './Reports'; +export { SvgRepost } from './Repost'; +export { SvgSaveDisk } from './SaveDisk'; +export { SvgScreenFull } from './ScreenFull'; +export { SvgSearch } from './Search'; +export { SvgSend } from './Send'; +export { SvgServers } from './Servers'; +export { SvgShare01 } from './Share01'; +export { SvgShareAlt } from './ShareAlt'; +export { SvgShare } from './Share'; +export { SvgShield } from './Shield'; +export { SvgShoppingCart } from './ShoppingCart'; +export { SvgShowSidebar } from './ShowSidebar'; +export { SvgShuffle } from './Shuffle'; +export { SvgStandBy } from './StandBy'; +export { SvgStarFull } from './StarFull'; +export { SvgStation } from './Station'; +export { SvgStepBackward } from './StepBackward'; +export { SvgStepForward } from './StepForward'; +export { SvgStethoscope } from './Stethoscope'; +export { SvgStoreFront } from './StoreFront'; +export { SvgStrokeWidth } from './StrokeWidth'; +export { SvgSubdirectoryLeft } from './SubdirectoryLeft'; +export { SvgSubdirectoryRight } from './SubdirectoryRight'; +export { SvgSubtract } from './Subtract'; +export { SvgSwap } from './Swap'; +export { SvgTablet } from './Tablet'; +export { SvgTag } from './Tag'; +export { SvgTarget } from './Target'; +export { SvgTextBox } from './TextBox'; +export { SvgTextDecoration } from './TextDecoration'; +export { SvgThermometer } from './Thermometer'; +export { SvgThumbsDown } from './ThumbsDown'; +export { SvgThumbsUp } from './ThumbsUp'; +export { SvgTicket } from './Ticket'; +export { SvgTime } from './Time'; +export { SvgTimer } from './Timer'; +export { SvgToolsCopy } from './ToolsCopy'; +export { SvgTranslate } from './Translate'; +export { SvgTrash } from './Trash'; +export { SvgTravelBus } from './TravelBus'; +export { SvgTravelCar } from './TravelCar'; +export { SvgTravelCase } from './TravelCase'; +export { SvgTravelTaxiCab } from './TravelTaxiCab'; +export { SvgTravelTrain } from './TravelTrain'; +export { SvgTravelWalk } from './TravelWalk'; +export { SvgTravel } from './Travel'; +export { SvgTrophy } from './Trophy'; +export { SvgTuning } from './Tuning'; +export { SvgUpload } from './Upload'; +export { SvgUsb } from './Usb'; +export { SvgUserAdd } from './UserAdd'; +export { SvgUserGroup } from './UserGroup'; +export { SvgUserSolidCircle } from './UserSolidCircle'; +export { SvgUserSolidSquare } from './UserSolidSquare'; +export { SvgUser } from './User'; +export { SvgVector } from './Vector'; +export { SvgVideoCamera } from './VideoCamera'; +export { SvgViewCarousel } from './ViewCarousel'; +export { SvgViewColumn } from './ViewColumn'; +export { SvgViewHide } from './ViewHide'; +export { SvgViewList } from './ViewList'; +export { SvgViewShow } from './ViewShow'; +export { SvgViewTile } from './ViewTile'; +export { SvgVolumeDown } from './VolumeDown'; +export { SvgVolumeMute } from './VolumeMute'; +export { SvgVolumeOff } from './VolumeOff'; +export { SvgVolumeUp } from './VolumeUp'; +export { SvgWallet } from './Wallet'; +export { SvgWatch } from './Watch'; +export { SvgWindowNew } from './WindowNew'; +export { SvgWindowOpen } from './WindowOpen'; +export { SvgWindow } from './Window'; +export { SvgWrench } from './Wrench'; +export { SvgYinYang } from './YinYang'; +export { SvgZoomIn } from './ZoomIn'; +export { SvgZoomOut } from './ZoomOut'; diff --git a/packages/desktop-client/src/icons/v2/AlertTriangle.tsx b/packages/desktop-client/src/icons/v2/AlertTriangle.tsx index 4d4138e79ec..b019795c79a 100644 --- a/packages/desktop-client/src/icons/v2/AlertTriangle.tsx +++ b/packages/desktop-client/src/icons/v2/AlertTriangle.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgAlertTriangle = (props: SVGProps) => ( +export const SvgAlertTriangle = (props: SVGProps) => ( ) => ( /> ); -export default SvgAlertTriangle; diff --git a/packages/desktop-client/src/icons/v2/ArrowButtonDown1.tsx b/packages/desktop-client/src/icons/v2/ArrowButtonDown1.tsx index 2e8dabbabd3..1ca31cf617b 100644 --- a/packages/desktop-client/src/icons/v2/ArrowButtonDown1.tsx +++ b/packages/desktop-client/src/icons/v2/ArrowButtonDown1.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowButtonDown1 = (props: SVGProps) => ( +export const SvgArrowButtonDown1 = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowButtonDown1; diff --git a/packages/desktop-client/src/icons/v2/ArrowButtonLeft1.tsx b/packages/desktop-client/src/icons/v2/ArrowButtonLeft1.tsx index f9cdf4f45ac..beeae0f6425 100644 --- a/packages/desktop-client/src/icons/v2/ArrowButtonLeft1.tsx +++ b/packages/desktop-client/src/icons/v2/ArrowButtonLeft1.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowButtonLeft1 = (props: SVGProps) => ( +export const SvgArrowButtonLeft1 = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowButtonLeft1; diff --git a/packages/desktop-client/src/icons/v2/ArrowButtonRight1.tsx b/packages/desktop-client/src/icons/v2/ArrowButtonRight1.tsx index 83437d666da..da19165ad08 100644 --- a/packages/desktop-client/src/icons/v2/ArrowButtonRight1.tsx +++ b/packages/desktop-client/src/icons/v2/ArrowButtonRight1.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowButtonRight1 = (props: SVGProps) => ( +export const SvgArrowButtonRight1 = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowButtonRight1; diff --git a/packages/desktop-client/src/icons/v2/ArrowButtonUp1.tsx b/packages/desktop-client/src/icons/v2/ArrowButtonUp1.tsx index a9fb1677ac1..757bbb0ec7f 100644 --- a/packages/desktop-client/src/icons/v2/ArrowButtonUp1.tsx +++ b/packages/desktop-client/src/icons/v2/ArrowButtonUp1.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowButtonUp1 = (props: SVGProps) => ( +export const SvgArrowButtonUp1 = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowButtonUp1; diff --git a/packages/desktop-client/src/icons/v2/ArrowsExpand3.tsx b/packages/desktop-client/src/icons/v2/ArrowsExpand3.tsx index fbc9bb643a5..fd98a941b9b 100644 --- a/packages/desktop-client/src/icons/v2/ArrowsExpand3.tsx +++ b/packages/desktop-client/src/icons/v2/ArrowsExpand3.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowsExpand3 = (props: SVGProps) => ( +export const SvgArrowsExpand3 = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowsExpand3; diff --git a/packages/desktop-client/src/icons/v2/ArrowsShrink3.tsx b/packages/desktop-client/src/icons/v2/ArrowsShrink3.tsx index 8c3e7b24734..1a9905625f2 100644 --- a/packages/desktop-client/src/icons/v2/ArrowsShrink3.tsx +++ b/packages/desktop-client/src/icons/v2/ArrowsShrink3.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowsShrink3 = (props: SVGProps) => ( +export const SvgArrowsShrink3 = (props: SVGProps) => ( ) => ( /> ); -export default SvgArrowsShrink3; diff --git a/packages/desktop-client/src/icons/v2/ArrowsSynchronize.tsx b/packages/desktop-client/src/icons/v2/ArrowsSynchronize.tsx index bfd8b2bf636..06e15afc5c9 100644 --- a/packages/desktop-client/src/icons/v2/ArrowsSynchronize.tsx +++ b/packages/desktop-client/src/icons/v2/ArrowsSynchronize.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgArrowsSynchronize = (props: SVGProps) => ( +export const SvgArrowsSynchronize = (props: SVGProps) => ( ) => ( ); -export default SvgArrowsSynchronize; diff --git a/packages/desktop-client/src/icons/v2/Calendar.tsx b/packages/desktop-client/src/icons/v2/Calendar.tsx index 73d0d69346f..14b6e818395 100644 --- a/packages/desktop-client/src/icons/v2/Calendar.tsx +++ b/packages/desktop-client/src/icons/v2/Calendar.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCalendar = (props: SVGProps) => ( +export const SvgCalendar = (props: SVGProps) => ( ) => ( /> ); -export default SvgCalendar; diff --git a/packages/desktop-client/src/icons/v2/Calendar3.tsx b/packages/desktop-client/src/icons/v2/Calendar3.tsx index 837497ee673..3fa28089d69 100644 --- a/packages/desktop-client/src/icons/v2/Calendar3.tsx +++ b/packages/desktop-client/src/icons/v2/Calendar3.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCalendar3 = (props: SVGProps) => ( +export const SvgCalendar3 = (props: SVGProps) => ( ) => ( /> ); -export default SvgCalendar3; diff --git a/packages/desktop-client/src/icons/v2/Check.tsx b/packages/desktop-client/src/icons/v2/Check.tsx index ecdbc9d03ed..170941f3193 100644 --- a/packages/desktop-client/src/icons/v2/Check.tsx +++ b/packages/desktop-client/src/icons/v2/Check.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheck = (props: SVGProps) => ( +export const SvgCheck = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheck; diff --git a/packages/desktop-client/src/icons/v2/CheckAll.tsx b/packages/desktop-client/src/icons/v2/CheckAll.tsx index 69d0dc07965..83394d77cb6 100644 --- a/packages/desktop-client/src/icons/v2/CheckAll.tsx +++ b/packages/desktop-client/src/icons/v2/CheckAll.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheckAll = (props: SVGProps) => ( +export const SvgCheckAll = (props: SVGProps) => ( ) => ( }} > ); -export default SvgCheckAll; diff --git a/packages/desktop-client/src/icons/v2/CheckCircle1.tsx b/packages/desktop-client/src/icons/v2/CheckCircle1.tsx index ab740bda34e..1c853500f07 100644 --- a/packages/desktop-client/src/icons/v2/CheckCircle1.tsx +++ b/packages/desktop-client/src/icons/v2/CheckCircle1.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheckCircle1 = (props: SVGProps) => ( +export const SvgCheckCircle1 = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheckCircle1; diff --git a/packages/desktop-client/src/icons/v2/CheckCircleHollow.tsx b/packages/desktop-client/src/icons/v2/CheckCircleHollow.tsx index 7d7743fecce..034e34e185e 100644 --- a/packages/desktop-client/src/icons/v2/CheckCircleHollow.tsx +++ b/packages/desktop-client/src/icons/v2/CheckCircleHollow.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCheckCircleHollow = (props: SVGProps) => ( +export const SvgCheckCircleHollow = (props: SVGProps) => ( ) => ( /> ); -export default SvgCheckCircleHollow; diff --git a/packages/desktop-client/src/icons/v2/CloudUnknown.tsx b/packages/desktop-client/src/icons/v2/CloudUnknown.tsx index 5be3692abbe..248867e95e2 100644 --- a/packages/desktop-client/src/icons/v2/CloudUnknown.tsx +++ b/packages/desktop-client/src/icons/v2/CloudUnknown.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCloudUnknown = (props: SVGProps) => ( +export const SvgCloudUnknown = (props: SVGProps) => ( ) => ( /> ); -export default SvgCloudUnknown; diff --git a/packages/desktop-client/src/icons/v2/CloudUpload.tsx b/packages/desktop-client/src/icons/v2/CloudUpload.tsx index 3498694e3e8..ddf6fa91d21 100644 --- a/packages/desktop-client/src/icons/v2/CloudUpload.tsx +++ b/packages/desktop-client/src/icons/v2/CloudUpload.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCloudUpload = (props: SVGProps) => ( +export const SvgCloudUpload = (props: SVGProps) => ( ) => ( /> ); -export default SvgCloudUpload; diff --git a/packages/desktop-client/src/icons/v2/CustomNotesPaper.tsx b/packages/desktop-client/src/icons/v2/CustomNotesPaper.tsx index 088f9ff0d69..bb9f6eb795d 100644 --- a/packages/desktop-client/src/icons/v2/CustomNotesPaper.tsx +++ b/packages/desktop-client/src/icons/v2/CustomNotesPaper.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgCustomNotesPaper = (props: SVGProps) => ( +export const SvgCustomNotesPaper = (props: SVGProps) => ( ) => ( /> ); -export default SvgCustomNotesPaper; diff --git a/packages/desktop-client/src/icons/v2/DownloadThickBottom.tsx b/packages/desktop-client/src/icons/v2/DownloadThickBottom.tsx index 5bc8061e4b8..116c67bda78 100644 --- a/packages/desktop-client/src/icons/v2/DownloadThickBottom.tsx +++ b/packages/desktop-client/src/icons/v2/DownloadThickBottom.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgDownloadThickBottom = (props: SVGProps) => ( +export const SvgDownloadThickBottom = (props: SVGProps) => ( ) => ( /> ); -export default SvgDownloadThickBottom; diff --git a/packages/desktop-client/src/icons/v2/EditSkull1.tsx b/packages/desktop-client/src/icons/v2/EditSkull1.tsx index 2017696c222..58997a5d549 100644 --- a/packages/desktop-client/src/icons/v2/EditSkull1.tsx +++ b/packages/desktop-client/src/icons/v2/EditSkull1.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgEditSkull1 = (props: SVGProps) => ( +export const SvgEditSkull1 = (props: SVGProps) => ( ) => ( /> ); -export default SvgEditSkull1; diff --git a/packages/desktop-client/src/icons/v2/FavoriteStar.tsx b/packages/desktop-client/src/icons/v2/FavoriteStar.tsx index 8b1ef5be086..847c8ea7cc8 100644 --- a/packages/desktop-client/src/icons/v2/FavoriteStar.tsx +++ b/packages/desktop-client/src/icons/v2/FavoriteStar.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFavoriteStar = (props: SVGProps) => ( +export const SvgFavoriteStar = (props: SVGProps) => ( ) => ( /> ); -export default SvgFavoriteStar; diff --git a/packages/desktop-client/src/icons/v2/Filter2.tsx b/packages/desktop-client/src/icons/v2/Filter2.tsx index 1cd1f0ab6b7..06c8fc411bc 100644 --- a/packages/desktop-client/src/icons/v2/Filter2.tsx +++ b/packages/desktop-client/src/icons/v2/Filter2.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgFilter2 = (props: SVGProps) => ( +export const SvgFilter2 = (props: SVGProps) => ( ) => ( /> ); -export default SvgFilter2; diff --git a/packages/desktop-client/src/icons/v2/Hyperlink2.tsx b/packages/desktop-client/src/icons/v2/Hyperlink2.tsx index 9a233c5220b..374a52373bd 100644 --- a/packages/desktop-client/src/icons/v2/Hyperlink2.tsx +++ b/packages/desktop-client/src/icons/v2/Hyperlink2.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgHyperlink2 = (props: SVGProps) => ( +export const SvgHyperlink2 = (props: SVGProps) => ( ) => ( /> ); -export default SvgHyperlink2; diff --git a/packages/desktop-client/src/icons/v2/Hyperlink3.tsx b/packages/desktop-client/src/icons/v2/Hyperlink3.tsx index fd40647cc46..ab723dbc9a8 100644 --- a/packages/desktop-client/src/icons/v2/Hyperlink3.tsx +++ b/packages/desktop-client/src/icons/v2/Hyperlink3.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgHyperlink3 = (props: SVGProps) => ( +export const SvgHyperlink3 = (props: SVGProps) => ( ) => ( /> ); -export default SvgHyperlink3; diff --git a/packages/desktop-client/src/icons/v2/InformationCircle.tsx b/packages/desktop-client/src/icons/v2/InformationCircle.tsx index 1a0537f29c3..cd027e9e593 100644 --- a/packages/desktop-client/src/icons/v2/InformationCircle.tsx +++ b/packages/desktop-client/src/icons/v2/InformationCircle.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgInformationCircle = (props: SVGProps) => ( +export const SvgInformationCircle = (props: SVGProps) => ( ) => ( /> ); -export default SvgInformationCircle; diff --git a/packages/desktop-client/src/icons/v2/Key.tsx b/packages/desktop-client/src/icons/v2/Key.tsx index 4e9fbb3f318..8a76c155209 100644 --- a/packages/desktop-client/src/icons/v2/Key.tsx +++ b/packages/desktop-client/src/icons/v2/Key.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgKey = (props: SVGProps) => ( +export const SvgKey = (props: SVGProps) => ( ) => ( /> ); -export default SvgKey; diff --git a/packages/desktop-client/src/icons/v2/LockClosed.tsx b/packages/desktop-client/src/icons/v2/LockClosed.tsx index fea05ad94df..5dd6d49a7c3 100644 --- a/packages/desktop-client/src/icons/v2/LockClosed.tsx +++ b/packages/desktop-client/src/icons/v2/LockClosed.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgLockClosed = (props: SVGProps) => ( +export const SvgLockClosed = (props: SVGProps) => ( ) => ( /> ); -export default SvgLockClosed; diff --git a/packages/desktop-client/src/icons/v2/MoonStars.tsx b/packages/desktop-client/src/icons/v2/MoonStars.tsx index c4a45b26cf2..db7d7a84946 100644 --- a/packages/desktop-client/src/icons/v2/MoonStars.tsx +++ b/packages/desktop-client/src/icons/v2/MoonStars.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgMoonStars = (props: SVGProps) => ( +export const SvgMoonStars = (props: SVGProps) => ( ) => ( /> ); -export default SvgMoonStars; diff --git a/packages/desktop-client/src/icons/v2/NavigationMenu.tsx b/packages/desktop-client/src/icons/v2/NavigationMenu.tsx index 0c5a0d949b5..bad2566f33b 100644 --- a/packages/desktop-client/src/icons/v2/NavigationMenu.tsx +++ b/packages/desktop-client/src/icons/v2/NavigationMenu.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgNavigationMenu = (props: SVGProps) => ( +export const SvgNavigationMenu = (props: SVGProps) => ( ) => ( /> ); -export default SvgNavigationMenu; diff --git a/packages/desktop-client/src/icons/v2/NotesPaper.tsx b/packages/desktop-client/src/icons/v2/NotesPaper.tsx index 6988369afd8..7384ceb3659 100644 --- a/packages/desktop-client/src/icons/v2/NotesPaper.tsx +++ b/packages/desktop-client/src/icons/v2/NotesPaper.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgNotesPaper = (props: SVGProps) => ( +export const SvgNotesPaper = (props: SVGProps) => ( ) => ( /> ); -export default SvgNotesPaper; diff --git a/packages/desktop-client/src/icons/v2/NotesPaperText.tsx b/packages/desktop-client/src/icons/v2/NotesPaperText.tsx index d16e3c32c45..4d26a88df69 100644 --- a/packages/desktop-client/src/icons/v2/NotesPaperText.tsx +++ b/packages/desktop-client/src/icons/v2/NotesPaperText.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgNotesPaperText = (props: SVGProps) => ( +export const SvgNotesPaperText = (props: SVGProps) => ( ) => ( /> ); -export default SvgNotesPaperText; diff --git a/packages/desktop-client/src/icons/v2/Pencil1.tsx b/packages/desktop-client/src/icons/v2/Pencil1.tsx index 0e4f9ff6b5a..2d080515dc5 100644 --- a/packages/desktop-client/src/icons/v2/Pencil1.tsx +++ b/packages/desktop-client/src/icons/v2/Pencil1.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPencil1 = (props: SVGProps) => ( +export const SvgPencil1 = (props: SVGProps) => ( ) => ( /> ); -export default SvgPencil1; diff --git a/packages/desktop-client/src/icons/v2/PencilWriteAlternate.tsx b/packages/desktop-client/src/icons/v2/PencilWriteAlternate.tsx index 398c66e352e..a7c21a98a4e 100644 --- a/packages/desktop-client/src/icons/v2/PencilWriteAlternate.tsx +++ b/packages/desktop-client/src/icons/v2/PencilWriteAlternate.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgPencilWriteAlternate = (props: SVGProps) => ( +export const SvgPencilWriteAlternate = (props: SVGProps) => ( ) => ( /> ); -export default SvgPencilWriteAlternate; diff --git a/packages/desktop-client/src/icons/v2/RefreshArrow.tsx b/packages/desktop-client/src/icons/v2/RefreshArrow.tsx index 6bbbb5a41f7..e95fb8ad349 100644 --- a/packages/desktop-client/src/icons/v2/RefreshArrow.tsx +++ b/packages/desktop-client/src/icons/v2/RefreshArrow.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgRefreshArrow = (props: SVGProps) => ( +export const SvgRefreshArrow = (props: SVGProps) => ( ) => ( /> ); -export default SvgRefreshArrow; diff --git a/packages/desktop-client/src/icons/v2/Remove.tsx b/packages/desktop-client/src/icons/v2/Remove.tsx index 0919a3fb1d0..21e4d841905 100644 --- a/packages/desktop-client/src/icons/v2/Remove.tsx +++ b/packages/desktop-client/src/icons/v2/Remove.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgRemove = (props: SVGProps) => ( +export const SvgRemove = (props: SVGProps) => ( ) => ( /> ); -export default SvgRemove; diff --git a/packages/desktop-client/src/icons/v2/RemoveAlternate.tsx b/packages/desktop-client/src/icons/v2/RemoveAlternate.tsx index c1d51ce1f00..562cfd85ca9 100644 --- a/packages/desktop-client/src/icons/v2/RemoveAlternate.tsx +++ b/packages/desktop-client/src/icons/v2/RemoveAlternate.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgRemoveAlternate = (props: SVGProps) => ( +export const SvgRemoveAlternate = (props: SVGProps) => ( ) => ( /> ); -export default SvgRemoveAlternate; diff --git a/packages/desktop-client/src/icons/v2/Search1.tsx b/packages/desktop-client/src/icons/v2/Search1.tsx index 1798250003a..e46245cc233 100644 --- a/packages/desktop-client/src/icons/v2/Search1.tsx +++ b/packages/desktop-client/src/icons/v2/Search1.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSearch1 = (props: SVGProps) => ( +export const SvgSearch1 = (props: SVGProps) => ( ) => ( /> ); -export default SvgSearch1; diff --git a/packages/desktop-client/src/icons/v2/SearchAlternate.tsx b/packages/desktop-client/src/icons/v2/SearchAlternate.tsx index d8434c107f8..78d87b643a0 100644 --- a/packages/desktop-client/src/icons/v2/SearchAlternate.tsx +++ b/packages/desktop-client/src/icons/v2/SearchAlternate.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSearchAlternate = (props: SVGProps) => ( +export const SvgSearchAlternate = (props: SVGProps) => ( ) => ( /> ); -export default SvgSearchAlternate; diff --git a/packages/desktop-client/src/icons/v2/SettingsSliderAlternate.tsx b/packages/desktop-client/src/icons/v2/SettingsSliderAlternate.tsx index a2656ab256f..8eff9c55d10 100644 --- a/packages/desktop-client/src/icons/v2/SettingsSliderAlternate.tsx +++ b/packages/desktop-client/src/icons/v2/SettingsSliderAlternate.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSettingsSliderAlternate = (props: SVGProps) => ( +export const SvgSettingsSliderAlternate = (props: SVGProps) => ( ) => ( /> ); -export default SvgSettingsSliderAlternate; diff --git a/packages/desktop-client/src/icons/v2/Subtract.tsx b/packages/desktop-client/src/icons/v2/Subtract.tsx index 1be91fbd61a..28e0b81ebe6 100644 --- a/packages/desktop-client/src/icons/v2/Subtract.tsx +++ b/packages/desktop-client/src/icons/v2/Subtract.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSubtract = (props: SVGProps) => ( +export const SvgSubtract = (props: SVGProps) => ( ) => ( /> ); -export default SvgSubtract; diff --git a/packages/desktop-client/src/icons/v2/Sun.tsx b/packages/desktop-client/src/icons/v2/Sun.tsx index c248837506f..3330412057d 100644 --- a/packages/desktop-client/src/icons/v2/Sun.tsx +++ b/packages/desktop-client/src/icons/v2/Sun.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSun = (props: SVGProps) => ( +export const SvgSun = (props: SVGProps) => ( ) => ( /> ); -export default SvgSun; diff --git a/packages/desktop-client/src/icons/v2/System.tsx b/packages/desktop-client/src/icons/v2/System.tsx index 65c038837c8..771520f8ba8 100644 --- a/packages/desktop-client/src/icons/v2/System.tsx +++ b/packages/desktop-client/src/icons/v2/System.tsx @@ -1,11 +1,9 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgSystem = (props: SVGProps) => ( +export const SvgSystem = (props: SVGProps) => ( ) => ( }} > ); -export default SvgSystem; diff --git a/packages/desktop-client/src/icons/v2/UncheckAll.tsx b/packages/desktop-client/src/icons/v2/UncheckAll.tsx index 13698bbea4d..02bd60adcae 100644 --- a/packages/desktop-client/src/icons/v2/UncheckAll.tsx +++ b/packages/desktop-client/src/icons/v2/UncheckAll.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgUncheckAll = (props: SVGProps) => ( +export const SvgUncheckAll = (props: SVGProps) => ( ) => ( }} > ); -export default SvgUncheckAll; diff --git a/packages/desktop-client/src/icons/v2/UploadThickBottom.tsx b/packages/desktop-client/src/icons/v2/UploadThickBottom.tsx index 26f45dcda44..4bfedf10b4c 100644 --- a/packages/desktop-client/src/icons/v2/UploadThickBottom.tsx +++ b/packages/desktop-client/src/icons/v2/UploadThickBottom.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgUploadThickBottom = (props: SVGProps) => ( +export const SvgUploadThickBottom = (props: SVGProps) => ( ) => ( /> ); -export default SvgUploadThickBottom; diff --git a/packages/desktop-client/src/icons/v2/ValidationCheck.tsx b/packages/desktop-client/src/icons/v2/ValidationCheck.tsx index a4e004c3179..e20ebe9829d 100644 --- a/packages/desktop-client/src/icons/v2/ValidationCheck.tsx +++ b/packages/desktop-client/src/icons/v2/ValidationCheck.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgValidationCheck = (props: SVGProps) => ( +export const SvgValidationCheck = (props: SVGProps) => ( ) => ( /> ); -export default SvgValidationCheck; diff --git a/packages/desktop-client/src/icons/v2/ViewHide.tsx b/packages/desktop-client/src/icons/v2/ViewHide.tsx index c37a91e62ce..01f688f1da1 100644 --- a/packages/desktop-client/src/icons/v2/ViewHide.tsx +++ b/packages/desktop-client/src/icons/v2/ViewHide.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgViewHide = (props: SVGProps) => ( +export const SvgViewHide = (props: SVGProps) => ( ) => ( /> ); -export default SvgViewHide; diff --git a/packages/desktop-client/src/icons/v2/ViewShow.tsx b/packages/desktop-client/src/icons/v2/ViewShow.tsx index 13b76d9a63d..2772b5c6c74 100644 --- a/packages/desktop-client/src/icons/v2/ViewShow.tsx +++ b/packages/desktop-client/src/icons/v2/ViewShow.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { SVGProps } from 'react'; -const SvgViewShow = (props: SVGProps) => ( +export const SvgViewShow = (props: SVGProps) => ( ) => ( /> ); -export default SvgViewShow; diff --git a/packages/desktop-client/src/icons/v2/index.ts b/packages/desktop-client/src/icons/v2/index.ts index d4f3d592951..82e3d553087 100644 --- a/packages/desktop-client/src/icons/v2/index.ts +++ b/packages/desktop-client/src/icons/v2/index.ts @@ -1,46 +1,46 @@ -export { default as AlertTriangle } from './AlertTriangle'; -export { default as ArrowButtonDown1 } from './ArrowButtonDown1'; -export { default as ArrowButtonLeft1 } from './ArrowButtonLeft1'; -export { default as ArrowButtonRight1 } from './ArrowButtonRight1'; -export { default as ArrowButtonUp1 } from './ArrowButtonUp1'; -export { default as ArrowsExpand3 } from './ArrowsExpand3'; -export { default as ArrowsShrink3 } from './ArrowsShrink3'; -export { default as ArrowsSynchronize } from './ArrowsSynchronize'; -export { default as Calendar3 } from './Calendar3'; -export { default as Calendar } from './Calendar'; -export { default as CheckAll } from './CheckAll'; -export { default as CheckCircle1 } from './CheckCircle1'; -export { default as CheckCircleHollow } from './CheckCircleHollow'; -export { default as Check } from './Check'; -export { default as CloudUnknown } from './CloudUnknown'; -export { default as CloudUpload } from './CloudUpload'; -export { default as CustomNotesPaper } from './CustomNotesPaper'; -export { default as DownloadThickBottom } from './DownloadThickBottom'; -export { default as EditSkull1 } from './EditSkull1'; -export { default as FavoriteStar } from './FavoriteStar'; -export { default as Filter2 } from './Filter2'; -export { default as Hyperlink2 } from './Hyperlink2'; -export { default as Hyperlink3 } from './Hyperlink3'; -export { default as InformationCircle } from './InformationCircle'; -export { default as Key } from './Key'; -export { default as LockClosed } from './LockClosed'; -export { default as MoonStars } from './MoonStars'; -export { default as NavigationMenu } from './NavigationMenu'; -export { default as NotesPaperText } from './NotesPaperText'; -export { default as NotesPaper } from './NotesPaper'; -export { default as Pencil1 } from './Pencil1'; -export { default as PencilWriteAlternate } from './PencilWriteAlternate'; -export { default as RefreshArrow } from './RefreshArrow'; -export { default as RemoveAlternate } from './RemoveAlternate'; -export { default as Remove } from './Remove'; -export { default as Search1 } from './Search1'; -export { default as SearchAlternate } from './SearchAlternate'; -export { default as SettingsSliderAlternate } from './SettingsSliderAlternate'; -export { default as Subtract } from './Subtract'; -export { default as Sun } from './Sun'; -export { default as System } from './System'; -export { default as UncheckAll } from './UncheckAll'; -export { default as UploadThickBottom } from './UploadThickBottom'; -export { default as ValidationCheck } from './ValidationCheck'; -export { default as ViewHide } from './ViewHide'; -export { default as ViewShow } from './ViewShow'; +export { SvgSystem } from './System'; +export { SvgAlertTriangle } from './AlertTriangle'; +export { SvgArrowButtonDown1 } from './ArrowButtonDown1'; +export { SvgArrowButtonLeft1 } from './ArrowButtonLeft1'; +export { SvgArrowButtonRight1 } from './ArrowButtonRight1'; +export { SvgArrowButtonUp1 } from './ArrowButtonUp1'; +export { SvgArrowsExpand3 } from './ArrowsExpand3'; +export { SvgArrowsShrink3 } from './ArrowsShrink3'; +export { SvgArrowsSynchronize } from './ArrowsSynchronize'; +export { SvgCalendar3 } from './Calendar3'; +export { SvgCalendar } from './Calendar'; +export { SvgCheckAll } from './CheckAll'; +export { SvgCheckCircle1 } from './CheckCircle1'; +export { SvgCheckCircleHollow } from './CheckCircleHollow'; +export { SvgCheck } from './Check'; +export { SvgCloudUnknown } from './CloudUnknown'; +export { SvgCloudUpload } from './CloudUpload'; +export { SvgCustomNotesPaper } from './CustomNotesPaper'; +export { SvgDownloadThickBottom } from './DownloadThickBottom'; +export { SvgEditSkull1 } from './EditSkull1'; +export { SvgFavoriteStar } from './FavoriteStar'; +export { SvgFilter2 } from './Filter2'; +export { SvgHyperlink2 } from './Hyperlink2'; +export { SvgHyperlink3 } from './Hyperlink3'; +export { SvgInformationCircle } from './InformationCircle'; +export { SvgKey } from './Key'; +export { SvgLockClosed } from './LockClosed'; +export { SvgMoonStars } from './MoonStars'; +export { SvgNavigationMenu } from './NavigationMenu'; +export { SvgNotesPaperText } from './NotesPaperText'; +export { SvgNotesPaper } from './NotesPaper'; +export { SvgPencil1 } from './Pencil1'; +export { SvgPencilWriteAlternate } from './PencilWriteAlternate'; +export { SvgRefreshArrow } from './RefreshArrow'; +export { SvgRemoveAlternate } from './RemoveAlternate'; +export { SvgRemove } from './Remove'; +export { SvgSearch1 } from './Search1'; +export { SvgSearchAlternate } from './SearchAlternate'; +export { SvgSettingsSliderAlternate } from './SettingsSliderAlternate'; +export { SvgSubtract } from './Subtract'; +export { SvgSun } from './Sun'; +export { SvgUncheckAll } from './UncheckAll'; +export { SvgUploadThickBottom } from './UploadThickBottom'; +export { SvgValidationCheck } from './ValidationCheck'; +export { SvgViewHide } from './ViewHide'; +export { SvgViewShow } from './ViewShow'; diff --git a/packages/desktop-client/src/index.tsx b/packages/desktop-client/src/index.tsx index 7a01a023e7c..d8b3fda9b5e 100644 --- a/packages/desktop-client/src/index.tsx +++ b/packages/desktop-client/src/index.tsx @@ -21,12 +21,13 @@ import thunk from 'redux-thunk'; import * as actions from 'loot-core/src/client/actions'; import * as constants from 'loot-core/src/client/constants'; -import q, { runQuery } from 'loot-core/src/client/query-helpers'; -import reducers from 'loot-core/src/client/reducers'; +import { runQuery } from 'loot-core/src/client/query-helpers'; +import { reducers } from 'loot-core/src/client/reducers'; import { initialState as initialAppState } from 'loot-core/src/client/reducers/app'; import { send } from 'loot-core/src/platform/client/fetch'; +import { q } from 'loot-core/src/shared/query'; -import App from './components/App'; +import { App } from './components/App'; import { ServerProvider } from './components/ServerContext'; import { handleGlobalEvents } from './global-events'; import { type BoundActions } from './hooks/useActions'; diff --git a/packages/desktop-client/src/polyfills.ts b/packages/desktop-client/src/polyfills.ts index e85c5815cce..fd1d3b84f56 100644 --- a/packages/desktop-client/src/polyfills.ts +++ b/packages/desktop-client/src/polyfills.ts @@ -1,4 +1,4 @@ -export default async function installPolyfills(): Promise { +export async function installPolyfills(): Promise { if ('ResizeObserver' in window === false) { const module = await import( /* webpackChunkName: 'resize-observer-polyfill' */ '@juggle/resize-observer' diff --git a/packages/desktop-client/src/setupTests.js b/packages/desktop-client/src/setupTests.js index 59b095c1e01..17956232208 100644 --- a/packages/desktop-client/src/setupTests.js +++ b/packages/desktop-client/src/setupTests.js @@ -1,6 +1,6 @@ import { resetStore } from 'loot-core/src/mocks/redux'; -import installPolyfills from './polyfills'; +import { installPolyfills } from './polyfills'; installPolyfills(); diff --git a/packages/desktop-client/src/style/styles.ts b/packages/desktop-client/src/style/styles.ts index 7cd0bb73f2c..b21ff1a4665 100644 --- a/packages/desktop-client/src/style/styles.ts +++ b/packages/desktop-client/src/style/styles.ts @@ -2,7 +2,7 @@ import { keyframes } from 'glamor'; import * as Platform from 'loot-core/src/client/platform'; -import tokens from '../tokens'; +import { tokens } from '../tokens'; import { theme } from './theme'; import { type CSSProperties } from './types'; diff --git a/packages/desktop-client/src/tokens.ts b/packages/desktop-client/src/tokens.ts index 280dc7f9eb7..e5eabe1ad1d 100644 --- a/packages/desktop-client/src/tokens.ts +++ b/packages/desktop-client/src/tokens.ts @@ -24,11 +24,9 @@ type BreakpointsPx = { // breakpoint_medium: '740px', // breakpoint_wide: '1100px', // } -const breakpointsInPx: BreakpointsPx = Object.entries( +export const tokens: BreakpointsPx = Object.entries( breakpoints, ).reduce((acc, [key, val]) => { acc[`breakpoint_${key}`] = `${val}px`; return acc; }, {} as BreakpointsPx); - -export default breakpointsInPx; diff --git a/packages/desktop-client/src/util/router-tools.ts b/packages/desktop-client/src/util/router-tools.ts index f35a33560fc..1bba51ee678 100644 --- a/packages/desktop-client/src/util/router-tools.ts +++ b/packages/desktop-client/src/util/router-tools.ts @@ -1,6 +1,6 @@ import { useLayoutEffect } from 'react'; -import useNavigate from '../hooks/useNavigate'; +import { useNavigate } from '../hooks/useNavigate'; export function ExposeNavigate() { const navigate = useNavigate(); diff --git a/packages/desktop-electron/package.json b/packages/desktop-electron/package.json index 641bd974df3..6e3e93b8968 100644 --- a/packages/desktop-electron/package.json +++ b/packages/desktop-electron/package.json @@ -2,7 +2,7 @@ "name": "desktop-electron", "productName": "Actual", "description": "A simple and powerful personal finance system", - "version": "23.12.0", + "version": "24.1.0", "scripts": { "clean": "rm -rf dist", "update-client": "bin/update-client", diff --git a/packages/loot-core/src/client/data-hooks/accounts.tsx b/packages/loot-core/src/client/data-hooks/accounts.tsx index 7bcde4b7bfc..0d5de6c534f 100644 --- a/packages/loot-core/src/client/data-hooks/accounts.tsx +++ b/packages/loot-core/src/client/data-hooks/accounts.tsx @@ -1,7 +1,7 @@ import React, { createContext, useContext } from 'react'; +import { q } from '../../shared/query'; import { type AccountEntity } from '../../types/models'; -import q from '../query-helpers'; import { useLiveQuery } from '../query-hooks'; import { getAccountsById } from '../reducers/queries'; diff --git a/packages/loot-core/src/client/data-hooks/filters.ts b/packages/loot-core/src/client/data-hooks/filters.ts index f9b4a1188a3..6854928d97a 100644 --- a/packages/loot-core/src/client/data-hooks/filters.ts +++ b/packages/loot-core/src/client/data-hooks/filters.ts @@ -1,7 +1,7 @@ import { useMemo } from 'react'; +import { q } from '../../shared/query'; import { type TransactionFilterEntity } from '../../types/models'; -import q from '../query-helpers'; import { useLiveQuery } from '../query-hooks'; function toJS(rows) { diff --git a/packages/loot-core/src/client/data-hooks/payees.tsx b/packages/loot-core/src/client/data-hooks/payees.tsx index 8197d50e7af..feb3cbb532c 100644 --- a/packages/loot-core/src/client/data-hooks/payees.tsx +++ b/packages/loot-core/src/client/data-hooks/payees.tsx @@ -1,7 +1,7 @@ import React, { createContext, useContext } from 'react'; +import { q } from '../../shared/query'; import { type PayeeEntity } from '../../types/models'; -import q from '../query-helpers'; import { useLiveQuery } from '../query-hooks'; import { getPayeesById } from '../reducers/queries'; diff --git a/packages/loot-core/src/client/data-hooks/schedules.tsx b/packages/loot-core/src/client/data-hooks/schedules.tsx index 0a46c38e96f..e2db2d1fbd8 100644 --- a/packages/loot-core/src/client/data-hooks/schedules.tsx +++ b/packages/loot-core/src/client/data-hooks/schedules.tsx @@ -1,9 +1,9 @@ import React, { createContext, useEffect, useState, useContext } from 'react'; -import { type Query } from '../../shared/query'; +import { q, type Query } from '../../shared/query'; import { getStatus, getHasTransactionsQuery } from '../../shared/schedules'; import { type ScheduleEntity } from '../../types/models'; -import q, { liveQuery } from '../query-helpers'; +import { liveQuery } from '../query-helpers'; export type ScheduleStatusType = ReturnType; export type ScheduleStatuses = Map; diff --git a/packages/loot-core/src/client/privacy.ts b/packages/loot-core/src/client/privacy.ts index 7490f2451c4..295bba5e510 100644 --- a/packages/loot-core/src/client/privacy.ts +++ b/packages/loot-core/src/client/privacy.ts @@ -1,5 +1,5 @@ import { useSelector } from 'react-redux'; -export default function usePrivacyMode() { +export function usePrivacyMode() { return useSelector(state => state.prefs?.local?.isPrivacyEnabled ?? false); } diff --git a/packages/loot-core/src/client/queries.ts b/packages/loot-core/src/client/queries.ts index 1ed3d615b25..d74dbf8b8a8 100644 --- a/packages/loot-core/src/client/queries.ts +++ b/packages/loot-core/src/client/queries.ts @@ -7,7 +7,7 @@ import { getShortYearRegex, getShortYearFormat, } from '../shared/months'; -import q from '../shared/query'; +import { q } from '../shared/query'; import { currencyToAmount, amountToInteger } from '../shared/util'; export function getAccountFilter(accountId, field = 'account') { diff --git a/packages/loot-core/src/client/query-helpers.test.ts b/packages/loot-core/src/client/query-helpers.test.ts index c42bbdbec51..c99b3426fbc 100644 --- a/packages/loot-core/src/client/query-helpers.test.ts +++ b/packages/loot-core/src/client/query-helpers.test.ts @@ -1,6 +1,6 @@ import { initServer, serverPush } from '../platform/client/fetch'; import { subDays } from '../shared/months'; -import q from '../shared/query'; +import { q } from '../shared/query'; import { tracer } from '../shared/test-helpers'; import { runQuery, liveQuery, pagedQuery } from './query-helpers'; diff --git a/packages/loot-core/src/client/query-helpers.ts b/packages/loot-core/src/client/query-helpers.ts index 72a7156e390..1883bfd534d 100644 --- a/packages/loot-core/src/client/query-helpers.ts +++ b/packages/loot-core/src/client/query-helpers.ts @@ -1,7 +1,6 @@ import { listen, send } from '../platform/client/fetch'; import { once } from '../shared/async'; -import q, { getPrimaryOrderBy } from '../shared/query'; -export default q; +import { getPrimaryOrderBy } from '../shared/query'; export async function runQuery(query) { return send('query', query.serialize()); diff --git a/packages/loot-core/src/client/reducers/account.ts b/packages/loot-core/src/client/reducers/account.ts index 5e713db7ef6..7c36ee5f73c 100644 --- a/packages/loot-core/src/client/reducers/account.ts +++ b/packages/loot-core/src/client/reducers/account.ts @@ -7,10 +7,7 @@ const initialState: AccountState = { accountsSyncing: null, }; -export default function update( - state = initialState, - action: Action, -): AccountState { +export function update(state = initialState, action: Action): AccountState { switch (action.type) { case constants.SET_ACCOUNTS_SYNCING: return { diff --git a/packages/loot-core/src/client/reducers/app.ts b/packages/loot-core/src/client/reducers/app.ts index b85e12022c3..19d4f73d6bd 100644 --- a/packages/loot-core/src/client/reducers/app.ts +++ b/packages/loot-core/src/client/reducers/app.ts @@ -11,7 +11,7 @@ export const initialState: AppState = { lastSplitState: { current: null }, }; -export default function update(state = initialState, action: Action): AppState { +export function update(state = initialState, action: Action): AppState { switch (action.type) { case constants.SET_APP_STATE: return { diff --git a/packages/loot-core/src/client/reducers/budgets.ts b/packages/loot-core/src/client/reducers/budgets.ts index d0868706cc0..8111f24e0c5 100644 --- a/packages/loot-core/src/client/reducers/budgets.ts +++ b/packages/loot-core/src/client/reducers/budgets.ts @@ -125,10 +125,7 @@ const initialState: BudgetsState = { allFiles: null, }; -export default function update( - state = initialState, - action: Action, -): BudgetsState { +export function update(state = initialState, action: Action): BudgetsState { switch (action.type) { case constants.SET_BUDGETS: return { diff --git a/packages/loot-core/src/client/reducers/index.ts b/packages/loot-core/src/client/reducers/index.ts index 77c5c76518f..98f44d189d1 100644 --- a/packages/loot-core/src/client/reducers/index.ts +++ b/packages/loot-core/src/client/reducers/index.ts @@ -1,13 +1,13 @@ -import account from './account'; -import app from './app'; -import budgets from './budgets'; -import modals from './modals'; -import notifications from './notifications'; -import prefs from './prefs'; -import queries from './queries'; -import user from './user'; +import { update as account } from './account'; +import { update as app } from './app'; +import { update as budgets } from './budgets'; +import { update as modals } from './modals'; +import { update as notifications } from './notifications'; +import { update as prefs } from './prefs'; +import { update as queries } from './queries'; +import { update as user } from './user'; -const reducers = { +export const reducers = { app, queries, account, @@ -17,4 +17,3 @@ const reducers = { budgets, user, }; -export default reducers; diff --git a/packages/loot-core/src/client/reducers/modals.ts b/packages/loot-core/src/client/reducers/modals.ts index 57d32784bce..a600b186708 100644 --- a/packages/loot-core/src/client/reducers/modals.ts +++ b/packages/loot-core/src/client/reducers/modals.ts @@ -7,7 +7,7 @@ const initialState: ModalsState = { isHidden: false, }; -function update(state = initialState, action: Action): ModalsState { +export function update(state = initialState, action: Action): ModalsState { switch (action.type) { case constants.PUSH_MODAL: return { @@ -49,5 +49,3 @@ function update(state = initialState, action: Action): ModalsState { return state; } - -export default update; diff --git a/packages/loot-core/src/client/reducers/notifications.ts b/packages/loot-core/src/client/reducers/notifications.ts index 7c722d14c36..942f47c0d04 100644 --- a/packages/loot-core/src/client/reducers/notifications.ts +++ b/packages/loot-core/src/client/reducers/notifications.ts @@ -6,7 +6,7 @@ const initialState = { notifications: [], }; -export default function update( +export function update( state = initialState, action: Action, ): NotificationsState { diff --git a/packages/loot-core/src/client/reducers/prefs.ts b/packages/loot-core/src/client/reducers/prefs.ts index 45f95090fe0..d87b4073e5b 100644 --- a/packages/loot-core/src/client/reducers/prefs.ts +++ b/packages/loot-core/src/client/reducers/prefs.ts @@ -8,10 +8,7 @@ const initialState: PrefsState = { global: null, }; -export default function update( - state = initialState, - action: Action, -): PrefsState { +export function update(state = initialState, action: Action): PrefsState { switch (action.type) { case constants.SET_PREFS: if (action.prefs) { diff --git a/packages/loot-core/src/client/reducers/queries.ts b/packages/loot-core/src/client/reducers/queries.ts index f44c6ca863f..3966e5e53da 100644 --- a/packages/loot-core/src/client/reducers/queries.ts +++ b/packages/loot-core/src/client/reducers/queries.ts @@ -19,10 +19,7 @@ const initialState: QueriesState = { earliestTransaction: null, }; -export default function update( - state = initialState, - action: Action, -): QueriesState { +export function update(state = initialState, action: Action): QueriesState { switch (action.type) { case constants.SET_NEW_TRANSACTIONS: return { diff --git a/packages/loot-core/src/client/reducers/user.ts b/packages/loot-core/src/client/reducers/user.ts index d9ec3de90f3..fe715884bec 100644 --- a/packages/loot-core/src/client/reducers/user.ts +++ b/packages/loot-core/src/client/reducers/user.ts @@ -5,10 +5,7 @@ const initialState: UserState = { data: null, }; -export default function update( - state = initialState, - action: UserActions, -): UserState { +export function update(state = initialState, action: UserActions): UserState { switch (action.type) { case constants.GET_USER_DATA: return { ...state, data: action.data }; diff --git a/packages/loot-core/src/client/state-types/modals.d.ts b/packages/loot-core/src/client/state-types/modals.d.ts index 36771e2e984..c1d3a9ee339 100644 --- a/packages/loot-core/src/client/state-types/modals.d.ts +++ b/packages/loot-core/src/client/state-types/modals.d.ts @@ -131,6 +131,23 @@ type FinanceModals = { name: string; onSave: (id: string, notes: string) => void; }; + 'report-budget-summary': { month: string }; + 'rollover-budget-summary': { + month: string; + onBudgetAction: ( + month: string, + type: string, + args: unknown, + ) => Promise; + }; + 'new-category-group': { + onValidate?: (value: string) => string; + onSubmit: (value: string) => Promise; + }; + 'new-category': { + onValidate?: (value: string) => string; + onSubmit: (value: string) => Promise; + }; }; export type PushModalAction = { diff --git a/packages/loot-core/src/client/update-notification.ts b/packages/loot-core/src/client/update-notification.ts index d66b8c1c0da..e698daefb1f 100644 --- a/packages/loot-core/src/client/update-notification.ts +++ b/packages/loot-core/src/client/update-notification.ts @@ -1,4 +1,4 @@ -export default async function checkForUpdateNotification( +export async function checkForUpdateNotification( addNotification, getIsOutdated, getLatestVersion, diff --git a/packages/loot-core/src/mocks/budget.ts b/packages/loot-core/src/mocks/budget.ts index 308b64f17ef..e4d9506030f 100644 --- a/packages/loot-core/src/mocks/budget.ts +++ b/packages/loot-core/src/mocks/budget.ts @@ -8,14 +8,14 @@ import * as prefs from '../server/prefs'; import * as sheet from '../server/sheet'; import { batchMessages, setSyncingMode } from '../server/sync'; import * as monthUtils from '../shared/months'; -import q from '../shared/query'; +import { q } from '../shared/query'; import type { CategoryGroupEntity, PayeeEntity, NewTransactionEntity, } from '../types/models'; -import random from './random'; +import { random } from './random'; type MockPayeeEntity = PayeeEntity & { bill?: boolean }; diff --git a/packages/loot-core/src/mocks/index.ts b/packages/loot-core/src/mocks/index.ts index 1b67795bcee..bc056442e83 100644 --- a/packages/loot-core/src/mocks/index.ts +++ b/packages/loot-core/src/mocks/index.ts @@ -3,7 +3,7 @@ import { v4 as uuidv4 } from 'uuid'; import * as monthUtils from '../shared/months'; import type { TransactionEntity } from '../types/models'; -import random from './random'; +import { random } from './random'; export function generateAccount(name, isConnected, offbudget) { return { diff --git a/packages/loot-core/src/mocks/random.ts b/packages/loot-core/src/mocks/random.ts index 2dbf5f67ccb..911ddf53ffe 100644 --- a/packages/loot-core/src/mocks/random.ts +++ b/packages/loot-core/src/mocks/random.ts @@ -13,6 +13,4 @@ function pseudoRandom(): number { return pseudoRandomIterator; } -const random = Platform.isPlaywright ? pseudoRandom : Math.random; - -export default random; +export const random = Platform.isPlaywright ? pseudoRandom : Math.random; diff --git a/packages/loot-core/src/mocks/redux.tsx b/packages/loot-core/src/mocks/redux.tsx index 569c6ae8286..bb32a0fd1ce 100644 --- a/packages/loot-core/src/mocks/redux.tsx +++ b/packages/loot-core/src/mocks/redux.tsx @@ -4,7 +4,7 @@ import { Provider } from 'react-redux'; import { createStore, combineReducers, applyMiddleware } from 'redux'; import thunk from 'redux-thunk'; -import reducers from '../client/reducers'; +import { reducers } from '../client/reducers'; const appReducer = combineReducers(reducers); let store = null; diff --git a/packages/loot-core/src/mocks/spreadsheet.ts b/packages/loot-core/src/mocks/spreadsheet.ts index 7a79ed62dea..e6f2fed78a6 100644 --- a/packages/loot-core/src/mocks/spreadsheet.ts +++ b/packages/loot-core/src/mocks/spreadsheet.ts @@ -1,4 +1,4 @@ -function makeSpreadsheet() { +export function makeSpreadsheet() { const cells = {}; return { observers: [], @@ -98,5 +98,3 @@ function makeSpreadsheet() { }, }; } - -export default makeSpreadsheet; diff --git a/packages/loot-core/src/platform/server/fs/index.d.ts b/packages/loot-core/src/platform/server/fs/index.d.ts index d9c1d8a60ea..d83079467f1 100644 --- a/packages/loot-core/src/platform/server/fs/index.d.ts +++ b/packages/loot-core/src/platform/server/fs/index.d.ts @@ -1,4 +1,4 @@ -export { default as join } from './path-join'; +export { join } from './path-join'; export function init(): void; export type Init = typeof init; diff --git a/packages/loot-core/src/platform/server/fs/index.web.ts b/packages/loot-core/src/platform/server/fs/index.web.ts index 45da2f6f69d..75df4de412e 100644 --- a/packages/loot-core/src/platform/server/fs/index.web.ts +++ b/packages/loot-core/src/platform/server/fs/index.web.ts @@ -5,7 +5,7 @@ import * as connection from '../connection'; import * as idb from '../indexeddb'; import { _getModule } from '../sqlite'; -import join from './path-join'; +import { join } from './path-join'; let FS = null; let BFS = null; diff --git a/packages/loot-core/src/platform/server/fs/path-join.d.ts b/packages/loot-core/src/platform/server/fs/path-join.d.ts index 305356b75d2..7954dc6831c 100644 --- a/packages/loot-core/src/platform/server/fs/path-join.d.ts +++ b/packages/loot-core/src/platform/server/fs/path-join.d.ts @@ -1,2 +1,2 @@ -export default function join(...args: string[]): string; +export function join(...args: string[]): string; export type Join = typeof join; diff --git a/packages/loot-core/src/platform/server/fs/path-join.electron.ts b/packages/loot-core/src/platform/server/fs/path-join.electron.ts index 8ec5406307c..911858b8d21 100644 --- a/packages/loot-core/src/platform/server/fs/path-join.electron.ts +++ b/packages/loot-core/src/platform/server/fs/path-join.electron.ts @@ -1,3 +1 @@ -import { join } from 'path'; - -export default join; +export { join } from 'path'; diff --git a/packages/loot-core/src/platform/server/fs/path-join.web.ts b/packages/loot-core/src/platform/server/fs/path-join.web.ts index 7c36099fb11..9620ba2b7f7 100644 --- a/packages/loot-core/src/platform/server/fs/path-join.web.ts +++ b/packages/loot-core/src/platform/server/fs/path-join.web.ts @@ -83,7 +83,7 @@ function normalizePath(path) { return path; } -const join: T.Join = (...args) => { +export const join: T.Join = (...args) => { if (args.length === 0) return '.'; let joined; for (let i = 0; i < args.length; ++i) { @@ -96,5 +96,3 @@ const join: T.Join = (...args) => { if (joined === undefined) return '.'; return normalizePath(joined); }; - -export default join; diff --git a/packages/loot-core/src/platform/server/fs/shared.ts b/packages/loot-core/src/platform/server/fs/shared.ts index bedc69b6c22..756bc578367 100644 --- a/packages/loot-core/src/platform/server/fs/shared.ts +++ b/packages/loot-core/src/platform/server/fs/shared.ts @@ -1,4 +1,4 @@ -import join from './path-join'; +import { join } from './path-join'; let documentDir; export const _setDocumentDir = dir => (documentDir = dir); diff --git a/packages/loot-core/src/platform/server/log/index.api.ts b/packages/loot-core/src/platform/server/log/index.api.ts index cd368c84532..a650c6323f8 100644 --- a/packages/loot-core/src/platform/server/log/index.api.ts +++ b/packages/loot-core/src/platform/server/log/index.api.ts @@ -1,6 +1,6 @@ import type * as T from '.'; -const logger: T.Logger = { +export const logger: T.Logger = { info: (...args) => { console.log(...args); }, @@ -8,4 +8,3 @@ const logger: T.Logger = { console.warn(...args); }, }; -export default logger; diff --git a/packages/loot-core/src/platform/server/log/index.d.ts b/packages/loot-core/src/platform/server/log/index.d.ts index 00b23ca4dbf..d8ca19d7a38 100644 --- a/packages/loot-core/src/platform/server/log/index.d.ts +++ b/packages/loot-core/src/platform/server/log/index.d.ts @@ -6,5 +6,4 @@ export interface Logger { transports?: Transports; } -const logger: Logger; -export default logger; +export const logger: Logger; diff --git a/packages/loot-core/src/platform/server/log/index.electron.ts b/packages/loot-core/src/platform/server/log/index.electron.ts index 9aba4ec63f5..24a3bebcf18 100644 --- a/packages/loot-core/src/platform/server/log/index.electron.ts +++ b/packages/loot-core/src/platform/server/log/index.electron.ts @@ -1,12 +1,12 @@ -import logger from 'electron-log'; +import electronLogger from 'electron-log'; import type * as T from '.'; -if (logger.transports) { - logger.transports.file.appName = 'Actual'; - logger.transports.file.level = 'info'; - logger.transports.file.maxSize = 7 * 1024 * 1024; - logger.transports.console.level = false; +if (electronLogger.transports) { + electronLogger.transports.file.appName = 'Actual'; + electronLogger.transports.file.level = 'info'; + electronLogger.transports.file.maxSize = 7 * 1024 * 1024; + electronLogger.transports.console.level = false; } -export default logger as T.Logger; +export const logger: T.Logger = electronLogger; diff --git a/packages/loot-core/src/platform/server/log/index.web.ts b/packages/loot-core/src/platform/server/log/index.web.ts index cd368c84532..a650c6323f8 100644 --- a/packages/loot-core/src/platform/server/log/index.web.ts +++ b/packages/loot-core/src/platform/server/log/index.web.ts @@ -1,6 +1,6 @@ import type * as T from '.'; -const logger: T.Logger = { +export const logger: T.Logger = { info: (...args) => { console.log(...args); }, @@ -8,4 +8,3 @@ const logger: T.Logger = { console.warn(...args); }, }; -export default logger; diff --git a/packages/loot-core/src/platform/server/sqlite/index.electron.ts b/packages/loot-core/src/platform/server/sqlite/index.electron.ts index 146e8ac192c..0374f34d8b5 100644 --- a/packages/loot-core/src/platform/server/sqlite/index.electron.ts +++ b/packages/loot-core/src/platform/server/sqlite/index.electron.ts @@ -98,9 +98,11 @@ export function openDatabase(pathOrBuffer: string | Buffer) { const db = new SQL(pathOrBuffer); // Define Unicode-aware LOWER and UPPER implementation. // This is necessary because better-sqlite3 uses SQLite build without ICU support. + // @ts-expect-error @types/better-sqlite3 does not support setting strict 3rd argument db.function('UNICODE_LOWER', { deterministic: true }, (arg: string | null) => arg?.toLowerCase(), ); + // @ts-expect-error @types/better-sqlite3 does not support setting strict 3rd argument db.function('UNICODE_UPPER', { deterministic: true }, (arg: string | null) => arg?.toUpperCase(), ); diff --git a/packages/loot-core/src/server/accounts/export-to-csv.ts b/packages/loot-core/src/server/accounts/export-to-csv.ts index da8aa17d621..838216cf209 100644 --- a/packages/loot-core/src/server/accounts/export-to-csv.ts +++ b/packages/loot-core/src/server/accounts/export-to-csv.ts @@ -31,13 +31,24 @@ export async function exportToCSV( }, {}); const transactionsForExport = transactions.map( - ({ account, date, payee, notes, category, amount }) => ({ + ({ + account, + date, + payee, + notes, + category, + amount, + cleared, + reconciled, + }) => ({ Account: accountNamesById[account], Date: date, Payee: payeeNamesById[payee], Notes: notes, Category: categoryNamesById[category], Amount: amount == null ? 0 : integerToAmount(amount), + Cleared: cleared, + Reconciled: reconciled, }), ); @@ -57,6 +68,8 @@ export async function exportQueryToCSV(query) { { Notes: 'notes' }, { Category: 'category.name' }, { Amount: 'amount' }, + { Cleared: 'cleared' }, + { Reconciled: 'reconciled' }, ]) .options({ splits: 'all' }), ); @@ -80,6 +93,12 @@ export async function exportQueryToCSV(query) { Notes: trans.Notes, Category: trans.Category, Amount: trans.Amount == null ? 0 : integerToAmount(trans.Amount), + Cleared: + trans.Reconciled === true + ? 'Reconciled' + : trans.Cleared === true + ? 'Cleared' + : 'Not cleared', }; }); diff --git a/packages/loot-core/src/server/accounts/ofx2json.ts b/packages/loot-core/src/server/accounts/ofx2json.ts index e009e76c97b..526c805f320 100644 --- a/packages/loot-core/src/server/accounts/ofx2json.ts +++ b/packages/loot-core/src/server/accounts/ofx2json.ts @@ -110,7 +110,7 @@ function mapOfxTransaction(stmtTrn): OFXTransaction { }; } -export default async function parse(ofx: string): Promise { +export async function ofx2json(ofx: string): Promise { // firstly, split into the header attributes and the footer sgml const contents = ofx.split('', 2); diff --git a/packages/loot-core/src/server/accounts/parse-file.ts b/packages/loot-core/src/server/accounts/parse-file.ts index f81e50b87b8..c47fce23270 100644 --- a/packages/loot-core/src/server/accounts/parse-file.ts +++ b/packages/loot-core/src/server/accounts/parse-file.ts @@ -4,8 +4,8 @@ import * as fs from '../../platform/server/fs'; import { dayFromDate } from '../../shared/months'; import { looselyParseAmount } from '../../shared/util'; -import ofx2json from './ofx2json'; -import qif2json from './qif2json'; +import { ofx2json } from './ofx2json'; +import { qif2json } from './qif2json'; type ParseError = { message: string; internal: string }; export type ParseFileResult = { diff --git a/packages/loot-core/src/server/accounts/qif2json.ts b/packages/loot-core/src/server/accounts/qif2json.ts index b3957c6cdef..17a91d51cc5 100644 --- a/packages/loot-core/src/server/accounts/qif2json.ts +++ b/packages/loot-core/src/server/accounts/qif2json.ts @@ -18,7 +18,7 @@ type QIFTransaction = { division?: Division[]; }; -export default function parse(qif, options: { dateFormat?: string } = {}) { +export function qif2json(qif, options: { dateFormat?: string } = {}) { const lines = qif.split('\n'); let line = lines.shift(); const type = /!Type:([^$]*)$/.exec(line.trim()); diff --git a/packages/loot-core/src/server/accounts/sync.ts b/packages/loot-core/src/server/accounts/sync.ts index 862648e4d9b..ac93d5d52eb 100644 --- a/packages/loot-core/src/server/accounts/sync.ts +++ b/packages/loot-core/src/server/accounts/sync.ts @@ -15,7 +15,7 @@ import { getServer } from '../server-config'; import { batchMessages } from '../sync'; import { getStartingBalancePayee } from './payees'; -import title from './title'; +import { title } from './title'; import { runRules } from './transaction-rules'; import { batchUpdateTransactions } from './transactions'; diff --git a/packages/loot-core/src/server/accounts/title/index.ts b/packages/loot-core/src/server/accounts/title/index.ts index 45ec9c58521..6330ef8b7bc 100644 --- a/packages/loot-core/src/server/accounts/title/index.ts +++ b/packages/loot-core/src/server/accounts/title/index.ts @@ -1,6 +1,6 @@ // Utilities -import lowerCase from './lower-case'; -import specials from './specials'; +import { lowerCaseSet } from './lower-case'; +import { specials } from './specials'; const character = '[0-9\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376-\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0523\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0621-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4-\u07F5\u07FA\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0972\u097B-\u097F\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58-\u0C59\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D3D\u0D60-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDD\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8B\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10D0-\u10FA\u10FC\u1100-\u1159\u115F-\u11A2\u11A8-\u11F9\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u1676\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19A9\u19C1-\u19C7\u1A00-\u1A16\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u2094\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2C6F\u2C71-\u2C7D\u2C80-\u2CE4\u2D00-\u2D25\u2D30-\u2D65\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31B7\u31F0-\u31FF\u3400\u4DB5\u4E00\u9FC3\uA000-\uA48C\uA500-\uA60C\uA610-\uA61F\uA62A-\uA62B\uA640-\uA65F\uA662-\uA66E\uA67F-\uA697\uA717-\uA71F\uA722-\uA788\uA78B-\uA78C\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA90A-\uA925\uA930-\uA946\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAC00\uD7A3\uF900-\uFA2D\uFA30-\uFA6A\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]'; @@ -28,7 +28,7 @@ function parseMatch(match) { return match; } -export default function title(str, options = { special: undefined }) { +export function title(str, options = { special: undefined }) { str = str .toLowerCase() .replace(regex, (m, lead = '', forced, lower, rest) => { @@ -39,7 +39,7 @@ export default function title(str, options = { special: undefined }) { if (!forced) { const fullLower = lower + rest; - if (lowerCase.has(fullLower)) { + if (lowerCaseSet.has(fullLower)) { return parsedMatch; } } diff --git a/packages/loot-core/src/server/accounts/title/lower-case.ts b/packages/loot-core/src/server/accounts/title/lower-case.ts index 8f669a4e49e..eaecf439e77 100644 --- a/packages/loot-core/src/server/accounts/title/lower-case.ts +++ b/packages/loot-core/src/server/accounts/title/lower-case.ts @@ -86,5 +86,8 @@ const prepositions = [ 'without', ]; -const dictionary = new Set([...conjunctions, ...articles, ...prepositions]); -export default dictionary; +export const lowerCaseSet = new Set([ + ...conjunctions, + ...articles, + ...prepositions, +]); diff --git a/packages/loot-core/src/server/accounts/title/specials.ts b/packages/loot-core/src/server/accounts/title/specials.ts index 1beb793640e..bf66c498c45 100644 --- a/packages/loot-core/src/server/accounts/title/specials.ts +++ b/packages/loot-core/src/server/accounts/title/specials.ts @@ -1,4 +1,4 @@ -const intended = [ +export const specials = [ 'CLI', 'API', 'HTTP', @@ -19,5 +19,3 @@ const intended = [ 'Next.js', 'Node.js', ]; - -export default intended; diff --git a/packages/loot-core/src/server/accounts/transaction-rules.test.ts b/packages/loot-core/src/server/accounts/transaction-rules.test.ts index bc09dc15f6c..2144740c7df 100644 --- a/packages/loot-core/src/server/accounts/transaction-rules.test.ts +++ b/packages/loot-core/src/server/accounts/transaction-rules.test.ts @@ -1,4 +1,4 @@ -import q from '../../shared/query'; +import { q } from '../../shared/query'; import { runQuery } from '../aql'; import * as db from '../db'; import { loadMappings } from '../db/mappings'; diff --git a/packages/loot-core/src/server/api.ts b/packages/loot-core/src/server/api.ts index b87d4b14bd2..5934d77ecc4 100644 --- a/packages/loot-core/src/server/api.ts +++ b/packages/loot-core/src/server/api.ts @@ -7,7 +7,7 @@ import { getTestKeyError, } from '../shared/errors'; import * as monthUtils from '../shared/months'; -import q from '../shared/query'; +import { q } from '../shared/query'; import { ungroupTransactions, updateTransaction, @@ -602,7 +602,7 @@ handlers['api/payee-delete'] = withMutation(async function ({ id }) { return handlers['payees-batch-change']({ deleted: [{ id }] }); }); -export default function installAPI(serverHandlers: ServerHandlers) { +export function installAPI(serverHandlers: ServerHandlers) { const merged = Object.assign({}, serverHandlers, handlers); handlers = merged as Handlers; return merged; diff --git a/packages/loot-core/src/server/aql/compiler.test.ts b/packages/loot-core/src/server/aql/compiler.test.ts index 42712cb9aca..53984efa656 100644 --- a/packages/loot-core/src/server/aql/compiler.test.ts +++ b/packages/loot-core/src/server/aql/compiler.test.ts @@ -1,4 +1,4 @@ -import query from '../../shared/query'; +import { q } from '../../shared/query'; import { generateSQLWithState } from './compiler'; @@ -61,7 +61,7 @@ const schemaWithTombstone = { describe('sheet language', () => { it('`select` should select fields', () => { let result = generateSQLWithState( - query('accounts') + q('accounts') .select(['trans1', 'trans2']) .withoutValidatedRefs() .serialize(), @@ -73,7 +73,7 @@ describe('sheet language', () => { // Allows renaming result = generateSQLWithState( - query('accounts') + q('accounts') .select(['trans1', 'trans1.id', { transId: 'trans1.id' }]) .withoutValidatedRefs() .serialize(), @@ -85,7 +85,7 @@ describe('sheet language', () => { // Joined fields should be named by path result = generateSQLWithState( - query('accounts') + q('accounts') .select(['trans1.payee.name']) .withoutValidatedRefs() .serialize(), @@ -97,7 +97,7 @@ describe('sheet language', () => { // Renaming works with joined fields result = generateSQLWithState( - query('accounts') + q('accounts') .select([{ payeeName: 'trans1.payee.name' }]) .withoutValidatedRefs() .serialize(), @@ -109,7 +109,7 @@ describe('sheet language', () => { // By default, it should do id ref validation result = generateSQLWithState( - query('accounts').select(['trans1', 'trans2']).serialize(), + q('accounts').select(['trans1', 'trans2']).serialize(), schemaWithRefs, ); expect(sqlLines(result.sql)).toEqual( @@ -124,7 +124,7 @@ describe('sheet language', () => { it('`select` allows nested functions', () => { const result = generateSQLWithState( - query('transactions') + q('transactions') .select([{ num: { $idiv: [{ $neg: '$amount' }, 2] } }]) .serialize(), schemaWithRefs, @@ -136,7 +136,7 @@ describe('sheet language', () => { it('`select` allows selecting all fields with *', () => { let result = generateSQLWithState( - query('accounts').select(['*']).serialize(), + q('accounts').select(['*']).serialize(), schemaWithRefs, ); expect(sqlLines(result.sql)).toEqual( @@ -151,7 +151,7 @@ describe('sheet language', () => { // Test selecting from joined tables result = generateSQLWithState( - query('accounts').select(['*', 'trans1.*']).serialize(), + q('accounts').select(['*', 'trans1.*']).serialize(), schemaWithRefs, ); expect(sqlLines(result.sql)).toEqual( @@ -170,14 +170,14 @@ describe('sheet language', () => { // The tombstone flag is not added if not necessary (the table // doesn't have it ) let result = generateSQLWithState( - query('accounts').select(['trans']).withoutValidatedRefs().serialize(), + q('accounts').select(['trans']).withoutValidatedRefs().serialize(), schemaWithTombstone, ); expect(result.sql).not.toMatch('tombstone'); // By default, the tombstone flag should be added if necessary result = generateSQLWithState( - query('transactions').select(['amount']).serialize(), + q('transactions').select(['amount']).serialize(), schemaWithTombstone, ); expect(sqlLines(result.sql)).toEqual( @@ -189,7 +189,7 @@ describe('sheet language', () => { // `withDead` should not add the tombstone flag result = generateSQLWithState( - query('transactions').select(['amount']).withDead().serialize(), + q('transactions').select(['amount']).withDead().serialize(), schemaWithTombstone, ); expect(sqlLines(result.sql)).toEqual( @@ -201,9 +201,7 @@ describe('sheet language', () => { // The tombstone flag should also be added if joining result = generateSQLWithState( - query('accounts') - .select(['trans.amount', 'trans.payee.name']) - .serialize(), + q('accounts').select(['trans.amount', 'trans.payee.name']).serialize(), schemaWithTombstone, ); expect(sqlLines(result.sql)).toEqual( @@ -221,13 +219,13 @@ describe('sheet language', () => { it('`select` always includes the id', () => { let result = generateSQLWithState( - query('payees').select('name').serialize(), + q('payees').select('name').serialize(), schemaWithRefs, ); expect(result.sql).toMatch('payees.id AS id'); result = generateSQLWithState( - query('payees').select(['name', 'id']).serialize(), + q('payees').select(['name', 'id']).serialize(), schemaWithRefs, ); // id is only included once, we manually selected it @@ -236,7 +234,7 @@ describe('sheet language', () => { ); result = generateSQLWithState( - query('payees').select('name').groupBy('account').serialize(), + q('payees').select('name').groupBy('account').serialize(), schemaWithRefs, ); // id should not automatically by selected if using `groupBy` @@ -246,7 +244,7 @@ describe('sheet language', () => { it('automatically joins tables if referenced by path', () => { // Join a simple table let result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ 'payee.name': 'kroger' }) .select(['amount']) .serialize(), @@ -262,7 +260,7 @@ describe('sheet language', () => { // Make sure it works in a `get` result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ amount: 123 }) .select(['payee.name']) .serialize(), @@ -279,7 +277,7 @@ describe('sheet language', () => { // Join tables deeply result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ 'payee.account.trans1.amount': 234 }) .select(['amount', 'payee.name']) .serialize(), @@ -303,7 +301,7 @@ describe('sheet language', () => { it('avoids unnecessary joins when deeply joining', () => { const { state, sql } = generateSQLWithState( - query('transactions') + q('transactions') .filter({ 'payee.account.trans1.amount': 1, 'payee.account.trans2.amount': 2, @@ -341,7 +339,7 @@ describe('sheet language', () => { it('groupBy should work', () => { let result = generateSQLWithState( - query('transactions').groupBy('payee.name').select('id').serialize(), + q('transactions').groupBy('payee.name').select('id').serialize(), schemaWithRefs, ); expect(sqlLines(result.sql)).toEqual( @@ -355,7 +353,7 @@ describe('sheet language', () => { // Allows functions result = generateSQLWithState( - query('transactions') + q('transactions') .groupBy({ $substr: ['$payee.name', 0, 4] }) .select('id') .serialize(), @@ -366,7 +364,7 @@ describe('sheet language', () => { it('orderBy should work', () => { let result = generateSQLWithState( - query('transactions').orderBy('payee.name').select('id').serialize(), + q('transactions').orderBy('payee.name').select('id').serialize(), schemaWithRefs, ); expect(sqlLines(result.sql)).toEqual( @@ -380,7 +378,7 @@ describe('sheet language', () => { // Allows complex ordering and specifying direction result = generateSQLWithState( - query('transactions') + q('transactions') .orderBy([ 'payee.id', { 'payee.name': 'desc' }, @@ -398,7 +396,7 @@ describe('sheet language', () => { it('allows functions in `select`', () => { let result = generateSQLWithState( - query('transactions') + q('transactions') .select(['id', { payeeName: { $substr: ['$payee.name', 0, 4] } }]) .serialize(), schemaWithRefs, @@ -408,7 +406,7 @@ describe('sheet language', () => { ); result = generateSQLWithState( - query('transactions') + q('transactions') .select([ 'id', { name: { $substr: [{ $substr: ['$payee.name', 1, 5] }, 3, 4] } }, @@ -423,7 +421,7 @@ describe('sheet language', () => { it('allows filtering with `filter`', () => { let result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ date: [{ $lt: '2020-01-01' }], $or: [{ 'payee.name': 'foo' }, { 'payee.name': 'bar' }], @@ -444,7 +442,7 @@ describe('sheet language', () => { // Combining `$or` and `$and` works result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ $or: [ { 'payee.name': 'foo' }, @@ -474,7 +472,7 @@ describe('sheet language', () => { // Giving a field an array implicitly ANDs the filters result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ date: [{ $lt: '2020-01-01' }, { $gt: '2019-12-01' }] }) .select(['id']) .serialize(), @@ -489,7 +487,7 @@ describe('sheet language', () => { // Allows referencing fields result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ amount: { $lt: '$amount2' } }) .select(['id']) .serialize(), @@ -505,7 +503,7 @@ describe('sheet language', () => { it('$and and $or allow the object form', () => { let result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ $and: { payee: 'payee1', amount: 12 }, }) @@ -519,7 +517,7 @@ describe('sheet language', () => { ); result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ $or: { payee: 'payee1', amount: 12 }, }) @@ -536,7 +534,7 @@ describe('sheet language', () => { it('allows functions in `filter`', () => { // Allows transforming the input let result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ 'payee.name': { $transform: { $substr: ['$', 0, 4] }, $lt: 'foo' }, }) @@ -555,7 +553,7 @@ describe('sheet language', () => { // Allows transforming left-hand side and calling a function on // right-hand side result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ date: { $transform: '$month', $lt: { $month: '$date' } }, }) @@ -569,7 +567,7 @@ describe('sheet language', () => { // Allows nesting functions result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ 'payee.name': { $lt: { $substr: [{ $substr: ['$payee.name', 1, 5] }, 3, 4] }, @@ -586,19 +584,19 @@ describe('sheet language', () => { it('allows limit and offset', () => { let result = generateSQLWithState( - query('transactions').select(['id']).limit(10).serialize(), + q('transactions').select(['id']).limit(10).serialize(), schemaWithRefs, ); expect(result.sql).toMatch(/\s+LIMIT 10\s*$/); result = generateSQLWithState( - query('transactions').select(['id']).offset(11).serialize(), + q('transactions').select(['id']).offset(11).serialize(), schemaWithRefs, ); expect(result.sql).toMatch(/\s+OFFSET 11\s*$/); result = generateSQLWithState( - query('transactions').select(['id']).limit(10).offset(11).serialize(), + q('transactions').select(['id']).limit(10).offset(11).serialize(), schemaWithRefs, ); expect(result.sql).toMatch(/\s+LIMIT 10\s*\n\s*OFFSET 11\s*$/); @@ -606,7 +604,7 @@ describe('sheet language', () => { it('allows named parameters', () => { let result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ amount: ':amount' }) .select(['id']) .serialize(), @@ -615,7 +613,7 @@ describe('sheet language', () => { expect(result.sql).toMatch('transactions.amount = ?'); result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ amount: { $lt: { $neg: ':amount' } } }) .select(['id']) .serialize(), @@ -625,7 +623,7 @@ describe('sheet language', () => { // Infers the right type result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ date: { $transform: '$month', $eq: { $month: ':month' } } }) .select() .serialize(), @@ -639,7 +637,7 @@ describe('sheet language', () => { it('allows customizing generated SQL', () => { let result = generateSQLWithState( - query('transactions').select(['amount']).serialize(), + q('transactions').select(['amount']).serialize(), schemaWithRefs, { tableViews: { transactions: 'v_transactions' }, @@ -656,7 +654,7 @@ describe('sheet language', () => { // Make sure the same customizations are applied when joining result = generateSQLWithState( - query('accounts').select(['trans1.amount']).serialize(), + q('accounts').select(['trans1.amount']).serialize(), schemaWithRefs, { tableViews: { transactions: 'v_transactions' }, @@ -681,7 +679,7 @@ describe('sheet language', () => { // Internal table filters can't use paths expect(() => generateSQLWithState( - query('accounts').select(['trans1.amount']).serialize(), + q('accounts').select(['trans1.amount']).serialize(), schemaWithRefs, { tableViews: { transactions: 'v_transactions' }, @@ -694,7 +692,7 @@ describe('sheet language', () => { it('raw mode avoids any internal filters', () => { const result = generateSQLWithState( - query('transactions').select(['amount']).raw().serialize(), + q('transactions').select(['amount']).raw().serialize(), schemaWithRefs, { tableViews: { transactions: 'v_transactions' }, @@ -714,7 +712,7 @@ describe('sheet language', () => { // select try { generateSQLWithState( - query('transactions') + q('transactions') .select({ month: { $month: '$payee.name2' } }) .serialize(), schemaWithRefs, @@ -730,7 +728,7 @@ describe('sheet language', () => { // filter try { generateSQLWithState( - query('transactions') + q('transactions') .filter({ date: { $transform: '$month', $eq: 10 } }) .select(['id']) .serialize(), @@ -748,7 +746,7 @@ describe('sheet language', () => { // group by try { generateSQLWithState( - query('transactions') + q('transactions') .groupBy({ $month: '$date2' }) .select({ amount: { $sum: '$amount' } }) .serialize(), @@ -765,7 +763,7 @@ describe('sheet language', () => { // order by try { generateSQLWithState( - query('transactions') + q('transactions') .orderBy({ $month: '$date2' }) .select({ amount: { $sum: '$amount' } }) .serialize(), @@ -782,7 +780,7 @@ describe('sheet language', () => { it('$oneof creates template for executor to run', () => { const result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ id: { $oneof: ['one', 'two', 'three'] } }) .select(['amount']) .serialize(), @@ -795,7 +793,7 @@ describe('sheet language', () => { describe('Type conversions', () => { it('date literals are converted to ints on input', () => { let result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ date: '2020-01-01' }) .select(['id']) .serialize(), @@ -804,7 +802,7 @@ describe('Type conversions', () => { expect(result.sql).toMatch('WHERE (transactions.date = 20200101)'); result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ date: { $transform: '$month', $eq: '2020-01' } }) .select(['id']) .serialize(), @@ -816,7 +814,7 @@ describe('Type conversions', () => { // You can also specify a full date that is auto-converted to month result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ date: { $transform: '$month', $eq: '2020-01-01' } }) .select(['id']) .serialize(), @@ -828,7 +826,7 @@ describe('Type conversions', () => { // You can also specify a full date that is auto-converted to month result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ date: { $transform: '$year', $eq: '2020-01-01' } }) .select(['id']) .serialize(), @@ -841,7 +839,7 @@ describe('Type conversions', () => { it('date fields are converted to months and years', () => { let result = generateSQLWithState( - query('accounts') + q('accounts') .filter({ 'trans1.date': { $transform: '$month', $eq: '$trans2.date' }, }) @@ -855,7 +853,7 @@ describe('Type conversions', () => { // You can also specify a full date that is auto-converted to month result = generateSQLWithState( - query('accounts') + q('accounts') .filter({ 'trans1.date': { $transform: '$year', $eq: '$trans2.date' } }) .select(['id']) .serialize(), @@ -869,17 +867,14 @@ describe('Type conversions', () => { it('allows conversions from string to id', () => { expect(() => { generateSQLWithState( - query('transactions').filter({ id: 'foo' }).select(['id']).serialize(), + q('transactions').filter({ id: 'foo' }).select(['id']).serialize(), schemaWithRefs, ); }).not.toThrow(); expect(() => { generateSQLWithState( - query('accounts') - .filter({ id: '$trans1.id' }) - .select(['id']) - .serialize(), + q('accounts').filter({ id: '$trans1.id' }).select(['id']).serialize(), schemaWithRefs, ); }).not.toThrow(); @@ -887,7 +882,7 @@ describe('Type conversions', () => { // Numbers cannot be converted to ids expect(() => { generateSQLWithState( - query('transactions').filter({ id: 5 }).select(['id']).serialize(), + q('transactions').filter({ id: 5 }).select(['id']).serialize(), schemaWithRefs, ); }).toThrow(/Can’t convert/); @@ -896,10 +891,7 @@ describe('Type conversions', () => { it('allows conversions from integers to floats', () => { expect(() => { generateSQLWithState( - query('transactions') - .filter({ amount3: 45 }) - .select(['id']) - .serialize(), + q('transactions').filter({ amount3: 45 }).select(['id']).serialize(), basicSchema, ); }).not.toThrow(); @@ -907,10 +899,7 @@ describe('Type conversions', () => { // Floats cannot be converted to ints expect(() => { generateSQLWithState( - query('transactions') - .filter({ amount: 45.5 }) - .select(['id']) - .serialize(), + q('transactions').filter({ amount: 45.5 }).select(['id']).serialize(), basicSchema, ); }).toThrow(/Can’t convert/); @@ -919,14 +908,14 @@ describe('Type conversions', () => { it('allows fields to be nullable', () => { // With validated refs let result = generateSQLWithState( - query('transactions').filter({ payee: null }).select().serialize(), + q('transactions').filter({ payee: null }).select().serialize(), schemaWithRefs, ); expect(result.sql).toMatch('WHERE (payees1.id IS NULL)'); // Without validated refs result = generateSQLWithState( - query('transactions') + q('transactions') .filter({ payee: null }) .select() .withoutValidatedRefs() diff --git a/packages/loot-core/src/server/aql/compiler.ts b/packages/loot-core/src/server/aql/compiler.ts index ade3d1d0200..29b437ec38b 100644 --- a/packages/loot-core/src/server/aql/compiler.ts +++ b/packages/loot-core/src/server/aql/compiler.ts @@ -989,10 +989,21 @@ export function isAggregateQuery(queryState) { }); } -type SchemaConfig = { - tableViews?: Record | ((...args: unknown[]) => unknown); +export type SchemaConfig = { + tableViews?: + | Record + | ((name: string, config: { withDead; isJoin; tableOptions }) => unknown); tableFilters?: (name: string) => unknown[]; - customizeQuery?: (queryString: T) => T; + customizeQuery?: ( + queryString: T, + ) => T; + views?: Record< + string, + { + fields?: Record; + [key: `v_${string}`]: string | ((internalFields, publicFields) => string); + } + >; }; export function compileQuery( queryState, diff --git a/packages/loot-core/src/server/aql/exec.test.ts b/packages/loot-core/src/server/aql/exec.test.ts index 309f5d8af14..2dbee559e15 100644 --- a/packages/loot-core/src/server/aql/exec.test.ts +++ b/packages/loot-core/src/server/aql/exec.test.ts @@ -1,6 +1,6 @@ import { v4 as uuidv4 } from 'uuid'; -import query from '../../shared/query'; +import { q } from '../../shared/query'; import { makeChild } from '../../shared/transactions'; import * as db from '../db'; @@ -75,15 +75,13 @@ describe('runQuery', () => { await insertTransactions(); // date - let { data } = await runQuery( - query('transactions').select('date').serialize(), - ); + let { data } = await runQuery(q('transactions').select('date').serialize()); expect(data[0].date).toBe('2020-01-04'); // date-month data = ( await runQuery( - query('transactions') + q('transactions') .select({ month: { $month: '$date' } }) .serialize(), ) @@ -93,7 +91,7 @@ describe('runQuery', () => { // date-year data = ( await runQuery( - query('transactions') + q('transactions') .select({ year: { $year: '$date' } }) .serialize(), ) @@ -103,10 +101,7 @@ describe('runQuery', () => { // boolean data = ( await runQuery( - query('transactions') - .select(['is_child', 'is_parent']) - .raw() - .serialize(), + q('transactions').select(['is_child', 'is_parent']).raw().serialize(), ) ).data; expect(data[0].is_child).toBe(false); @@ -126,7 +121,7 @@ describe('runQuery', () => { }); let { data } = await runQuery( - query('transactions') + q('transactions') .filter({ amount: { $lt: { $neg: ':amount' } } }) .select() .serialize(), @@ -136,7 +131,7 @@ describe('runQuery', () => { data = ( await runQuery( - query('transactions') + q('transactions') .filter({ date: { $transform: '$month', $eq: { $month: ':month' } } }) .select('date') .serialize(), @@ -147,7 +142,7 @@ describe('runQuery', () => { data = ( await runQuery( - query('transactions') + q('transactions') .filter({ date: { $transform: '$year', $eq: { $year: ':month' } } }) .select('date') .serialize(), @@ -158,7 +153,7 @@ describe('runQuery', () => { data = ( await runQuery( - query('transactions') + q('transactions') .filter({ cleared: ':cleared' }) .select('date') .serialize(), @@ -184,7 +179,7 @@ describe('runQuery', () => { category: 'cat', }); - const queryState = query('transactions') + const queryState = q('transactions') .filter({ category: ':category' }) .select() .serialize(); @@ -206,7 +201,7 @@ describe('runQuery', () => { }); const { data } = await runQuery( - query('transactions') + q('transactions') .filter({ amount: { $lt: { $neg: ':amount' } }, date: [{ $lte: ':date' }, { $gte: ':date' }], @@ -226,7 +221,7 @@ describe('runQuery', () => { ids.sort(); const { data } = await runQuery( - query('transactions') + q('transactions') .filter({ id: { $oneof: repeat(ids, 1000) }, amount: { $lt: 50 } }) .select('id') .raw() diff --git a/packages/loot-core/src/server/aql/schema/executors.test.ts b/packages/loot-core/src/server/aql/schema/executors.test.ts index 3e588144f54..825ae8c94b2 100644 --- a/packages/loot-core/src/server/aql/schema/executors.test.ts +++ b/packages/loot-core/src/server/aql/schema/executors.test.ts @@ -2,7 +2,7 @@ import { setClock } from '@actual-app/crdt'; import fc from 'fast-check'; import * as arbs from '../../../mocks/arbitrary-schema'; -import query from '../../../shared/query'; +import { q } from '../../../shared/query'; import { groupById } from '../../../shared/util'; import * as db from '../../db'; import { batchMessages, setSyncingMode } from '../../sync/index'; @@ -139,7 +139,7 @@ describe('transaction executors', () => { await insertTransactions(arr); const { data } = await runQuery( - query('transactions') + q('transactions') .filter({ amount: { $lt: 0 } }) .select('*') .options({ splits: 'inline' }) @@ -150,7 +150,7 @@ describe('transaction executors', () => { expect(data.filter(t => t.tombstone).length).toBe(0); const { data: defaultData } = await runQuery( - query('transactions') + q('transactions') .filter({ amount: { $lt: 0 } }) .select('*') .serialize(), @@ -176,7 +176,7 @@ describe('transaction executors', () => { await insertTransactions(arr); const { data } = await runQuery( - query('transactions') + q('transactions') .filter({ amount: { $lt: 0 } }) .select('*') .options({ splits: 'none' }) @@ -200,7 +200,7 @@ describe('transaction executors', () => { async arr => { await insertTransactions(arr, payeeIds); - const aggQuery = query('transactions') + const aggQuery = q('transactions') .filter({ $or: [{ amount: { $lt: -5 } }, { amount: { $gt: -2 } }], 'payee.name': { $gt: '' }, @@ -346,7 +346,7 @@ describe('transaction executors', () => { // Even though we're applying some filters, these are always // guaranteed to return the full split transaction so they // should take the optimized path - const happyQuery = query('transactions') + const happyQuery = q('transactions') .filter({ date: { $gt: '2017-01-01' }, }) @@ -395,7 +395,7 @@ describe('transaction executors', () => { // Because why not? It should deduplicate them ids = repeat(ids, 100); - const unhappyQuery = query('transactions') + const unhappyQuery = q('transactions') .filter({ id: [{ $oneof: ids }], payee: { $gt: '' }, diff --git a/packages/loot-core/src/server/aql/schema/index.ts b/packages/loot-core/src/server/aql/schema/index.ts index 26af5205b07..1af6735bdc4 100644 --- a/packages/loot-core/src/server/aql/schema/index.ts +++ b/packages/loot-core/src/server/aql/schema/index.ts @@ -1,3 +1,5 @@ +import { SchemaConfig } from '../compiler'; + function f(type: string, opts?: Record) { return { type, ...opts }; } @@ -140,7 +142,7 @@ export const schema = { }, }; -export const schemaConfig = { +export const schemaConfig: SchemaConfig = { // Note: these views *must* represent the underlying table that we // are mapping here. The compiler makes optimizations with this // assumption diff --git a/packages/loot-core/src/server/budget/app.ts b/packages/loot-core/src/server/budget/app.ts index a7b5b23fc3e..7cca22aa5a5 100644 --- a/packages/loot-core/src/server/budget/app.ts +++ b/packages/loot-core/src/server/budget/app.ts @@ -7,7 +7,7 @@ import * as cleanupActions from './cleanup-template'; import * as goalActions from './goaltemplates'; import { BudgetHandlers } from './types/handlers'; -const app = createApp(); +export const app = createApp(); app.method('budget/budget-amount', mutator(undoable(actions.setBudget))); app.method( @@ -62,5 +62,3 @@ app.method( 'budget/set-carryover', mutator(undoable(actions.setCategoryCarryover)), ); - -export default app; diff --git a/packages/loot-core/src/server/filters/app.ts b/packages/loot-core/src/server/filters/app.ts index 3e3b5f62b77..6c528090de3 100644 --- a/packages/loot-core/src/server/filters/app.ts +++ b/packages/loot-core/src/server/filters/app.ts @@ -170,10 +170,8 @@ async function deleteFilter(id) { await db.delete_('transaction_filters', id); } -const app = createApp(); +export const app = createApp(); app.method('filter-create', mutator(createFilter)); app.method('filter-update', mutator(updateFilter)); app.method('filter-delete', mutator(undoable(deleteFilter))); - -export default app; diff --git a/packages/loot-core/src/server/importers/actual.ts b/packages/loot-core/src/server/importers/actual.ts index 69e5d178dd6..5f1d3041321 100644 --- a/packages/loot-core/src/server/importers/actual.ts +++ b/packages/loot-core/src/server/importers/actual.ts @@ -4,7 +4,7 @@ import * as cloudStorage from '../cloud-storage'; import { handlers } from '../main'; import { waitOnSpreadsheet } from '../sheet'; -export default async function importActual(_filepath: string, buffer: Buffer) { +export async function importActual(_filepath: string, buffer: Buffer) { // Importing Actual files is a special case because we can directly // write down the files, but because it doesn't go through the API // layer we need to duplicate some of the workflow diff --git a/packages/loot-core/src/server/importers/index.ts b/packages/loot-core/src/server/importers/index.ts index 41d5248ef56..a872e3e8d08 100644 --- a/packages/loot-core/src/server/importers/index.ts +++ b/packages/loot-core/src/server/importers/index.ts @@ -1,6 +1,6 @@ import { handlers } from '../main'; -import importActual from './actual'; +import { importActual } from './actual'; import * as YNAB4 from './ynab4'; import * as YNAB5 from './ynab5'; diff --git a/packages/loot-core/src/server/main-app.ts b/packages/loot-core/src/server/main-app.ts index e884b2332de..65c194a8220 100644 --- a/packages/loot-core/src/server/main-app.ts +++ b/packages/loot-core/src/server/main-app.ts @@ -4,10 +4,8 @@ import { Handlers } from '../types/handlers'; import { createApp } from './app'; // Main app -const app = createApp(); +export const app = createApp(); app.events.on('sync', info => { connection.send('sync-event', info); }); - -export default app; diff --git a/packages/loot-core/src/server/main.ts b/packages/loot-core/src/server/main.ts index 431023d76b4..d16ec1093da 100644 --- a/packages/loot-core/src/server/main.ts +++ b/packages/loot-core/src/server/main.ts @@ -8,11 +8,11 @@ import { captureException, captureBreadcrumb } from '../platform/exceptions'; import * as asyncStorage from '../platform/server/asyncStorage'; import * as connection from '../platform/server/connection'; import * as fs from '../platform/server/fs'; -import logger from '../platform/server/log'; +import { logger } from '../platform/server/log'; import * as sqlite from '../platform/server/sqlite'; import { isNonProductionEnvironment } from '../shared/environment'; import * as monthUtils from '../shared/months'; -import q, { Query } from '../shared/query'; +import { q, Query } from '../shared/query'; import { amountToInteger, stringToInteger } from '../shared/util'; import { Handlers } from '../types/handlers'; @@ -23,7 +23,7 @@ import { getStartingBalancePayee } from './accounts/payees'; import * as bankSync from './accounts/sync'; import * as rules from './accounts/transaction-rules'; import { batchUpdateTransactions } from './accounts/transactions'; -import installAPI from './api'; +import { installAPI } from './api'; import { runQuery as aqlQuery } from './aql'; import { getAvailableBackups, @@ -32,23 +32,23 @@ import { startBackupService, stopBackupService, } from './backups'; -import budgetApp from './budget/app'; +import { app as budgetApp } from './budget/app'; import * as budget from './budget/base'; import * as cloudStorage from './cloud-storage'; import * as db from './db'; import * as mappings from './db/mappings'; import * as encryption from './encryption'; import { APIError, TransactionError, PostError } from './errors'; -import filtersApp from './filters/app'; +import { app as filtersApp } from './filters/app'; import { handleBudgetImport } from './importers'; -import app from './main-app'; +import { app } from './main-app'; import { mutator, runHandler } from './mutators'; -import notesApp from './notes/app'; +import { app as notesApp } from './notes/app'; import * as Platform from './platform'; import { get, post } from './post'; import * as prefs from './prefs'; -import rulesApp from './rules/app'; -import schedulesApp from './schedules/app'; +import { app as rulesApp } from './rules/app'; +import { app as schedulesApp } from './schedules/app'; import { getServer, setServer } from './server-config'; import * as sheet from './sheet'; import { resolveName, unresolveName } from './spreadsheet/util'; @@ -63,7 +63,7 @@ import { repairSync, } from './sync'; import * as syncMigrations from './sync/migrate'; -import toolsApp from './tools/app'; +import { app as toolsApp } from './tools/app'; import { withUndo, clearUndo, undo, redo } from './undo'; import { updateVersion } from './update'; import { uniqueFileName, idFromFileName } from './util/budget-name'; diff --git a/packages/loot-core/src/server/notes/app.ts b/packages/loot-core/src/server/notes/app.ts index e410ab7f377..466ac86e1db 100644 --- a/packages/loot-core/src/server/notes/app.ts +++ b/packages/loot-core/src/server/notes/app.ts @@ -3,10 +3,8 @@ import * as db from '../db'; import { NotesHandlers } from './types/handlers'; -const app = createApp(); +export const app = createApp(); app.method('notes-save', async ({ id, note }) => { await db.update('notes', { id, note }); }); - -export default app; diff --git a/packages/loot-core/src/server/rules/app.ts b/packages/loot-core/src/server/rules/app.ts index a1de1d821d5..29675666da3 100644 --- a/packages/loot-core/src/server/rules/app.ts +++ b/packages/loot-core/src/server/rules/app.ts @@ -67,7 +67,7 @@ function validateRule(rule: Partial) { } // Expose functions to the client -const app = createApp(); +export const app = createApp(); app.method('rule-validate', async function (rule) { const error = validateRule(rule); @@ -153,5 +153,3 @@ app.method('rule-get', async function ({ id }) { app.method('rules-run', async function ({ transaction }) { return rules.runRules(transaction); }); - -export default app; diff --git a/packages/loot-core/src/server/schedules/app.test.ts b/packages/loot-core/src/server/schedules/app.test.ts index cee8b965711..1472633bcf8 100644 --- a/packages/loot-core/src/server/schedules/app.test.ts +++ b/packages/loot-core/src/server/schedules/app.test.ts @@ -1,6 +1,6 @@ import MockDate from 'mockdate'; -import q from '../../shared/query'; +import { q } from '../../shared/query'; import { loadRules, updateRule } from '../accounts/transaction-rules'; import { runQuery as aqlQuery } from '../aql'; import { loadMappings } from '../db/mappings'; diff --git a/packages/loot-core/src/server/schedules/app.ts b/packages/loot-core/src/server/schedules/app.ts index 6c4db056138..8b3cca93b5b 100644 --- a/packages/loot-core/src/server/schedules/app.ts +++ b/packages/loot-core/src/server/schedules/app.ts @@ -5,7 +5,7 @@ import { v4 as uuidv4 } from 'uuid'; import { captureBreadcrumb } from '../../platform/exceptions'; import * as connection from '../../platform/server/connection'; import { dayFromDate, currentDay, parseDate } from '../../shared/months'; -import q from '../../shared/query'; +import { q } from '../../shared/query'; import { extractScheduleConds, recurConfigToRSchedule, @@ -543,7 +543,7 @@ async function advanceSchedulesService(syncSuccess) { } // Expose functions to the client -const app = createApp(); +export const app = createApp(); app.method('schedule/create', mutator(undoable(createSchedule))); app.method('schedule/update', mutator(undoable(updateSchedule))); @@ -592,5 +592,3 @@ export function getDateWithSkippedWeekend( } return date; } - -export default app; diff --git a/packages/loot-core/src/server/schedules/find-schedules.ts b/packages/loot-core/src/server/schedules/find-schedules.ts index 6ac6e7999e7..9b7e76c3e31 100644 --- a/packages/loot-core/src/server/schedules/find-schedules.ts +++ b/packages/loot-core/src/server/schedules/find-schedules.ts @@ -2,7 +2,7 @@ import * as d from 'date-fns'; import { v4 as uuidv4 } from 'uuid'; import { dayFromDate, parseDate } from '../../shared/months'; -import q from '../../shared/query'; +import { q } from '../../shared/query'; import { getApproxNumberThreshold } from '../../shared/rules'; import { recurConfigToRSchedule } from '../../shared/schedules'; import { groupBy } from '../../shared/util'; diff --git a/packages/loot-core/src/server/sheet.ts b/packages/loot-core/src/server/sheet.ts index 792b176a431..ebb4f743d9d 100644 --- a/packages/loot-core/src/server/sheet.ts +++ b/packages/loot-core/src/server/sheet.ts @@ -6,7 +6,7 @@ import { sheetForMonth } from '../shared/months'; import * as Platform from './platform'; import * as prefs from './prefs'; -import Spreadsheet from './spreadsheet/spreadsheet'; +import { Spreadsheet } from './spreadsheet/spreadsheet'; import { resolveName } from './spreadsheet/util'; let globalSheet: Spreadsheet; diff --git a/packages/loot-core/src/server/spreadsheet/graph-data-structure.ts b/packages/loot-core/src/server/spreadsheet/graph-data-structure.ts index 1ef929fee70..501a1339521 100644 --- a/packages/loot-core/src/server/spreadsheet/graph-data-structure.ts +++ b/packages/loot-core/src/server/spreadsheet/graph-data-structure.ts @@ -1,4 +1,4 @@ -function Graph() { +export function Graph() { const graph = { addNode, removeNode, @@ -120,5 +120,3 @@ function Graph() { return graph; } - -export default Graph; diff --git a/packages/loot-core/src/server/spreadsheet/spreadsheet.test.ts b/packages/loot-core/src/server/spreadsheet/spreadsheet.test.ts index f9cf6c970d6..e73cfa425ba 100644 --- a/packages/loot-core/src/server/spreadsheet/spreadsheet.test.ts +++ b/packages/loot-core/src/server/spreadsheet/spreadsheet.test.ts @@ -1,7 +1,7 @@ import { generateTransaction } from '../../mocks'; import * as db from '../db'; -import Spreadsheet from './spreadsheet'; +import { Spreadsheet } from './spreadsheet'; beforeEach(global.emptyDatabase()); diff --git a/packages/loot-core/src/server/spreadsheet/spreadsheet.ts b/packages/loot-core/src/server/spreadsheet/spreadsheet.ts index bdb57348057..5088a03e902 100644 --- a/packages/loot-core/src/server/spreadsheet/spreadsheet.ts +++ b/packages/loot-core/src/server/spreadsheet/spreadsheet.ts @@ -2,7 +2,7 @@ import mitt from 'mitt'; import { compileQuery, runCompiledQuery, schema, schemaConfig } from '../aql'; -import Graph from './graph-data-structure'; +import { Graph } from './graph-data-structure'; import { unresolveName, resolveName } from './util'; export type Node = { @@ -17,7 +17,7 @@ export type Node = { _dependencies?: string[]; }; -export default class Spreadsheet { +export class Spreadsheet { _meta; cacheBarrier; computeQueue; diff --git a/packages/loot-core/src/server/sync/index.ts b/packages/loot-core/src/server/sync/index.ts index 344ecfec2d0..f73eb3adb7d 100644 --- a/packages/loot-core/src/server/sync/index.ts +++ b/packages/loot-core/src/server/sync/index.ts @@ -9,14 +9,14 @@ import { import { captureException } from '../../platform/exceptions'; import * as asyncStorage from '../../platform/server/asyncStorage'; import * as connection from '../../platform/server/connection'; -import logger from '../../platform/server/log'; +import { logger } from '../../platform/server/log'; import { sequential, once } from '../../shared/async'; import { setIn, getIn } from '../../shared/util'; import { LocalPrefs } from '../../types/prefs'; import { triggerBudgetChanges, setType as setBudgetType } from '../budget/base'; import * as db from '../db'; import { PostError, SyncError } from '../errors'; -import app from '../main-app'; +import { app } from '../main-app'; import { runMutator } from '../mutators'; import { postBinary } from '../post'; import * as prefs from '../prefs'; @@ -28,9 +28,9 @@ import * as encoder from './encoder'; import { rebuildMerkleHash } from './repair'; import { isError } from './utils'; -export { default as makeTestMessage } from './make-test-message'; -export { default as resetSync } from './reset'; -export { default as repairSync } from './repair'; +export { makeTestMessage } from './make-test-message'; +export { resetSync } from './reset'; +export { repairSync } from './repair'; const FULL_SYNC_DELAY = 1000; let SYNCING_MODE = 'enabled'; diff --git a/packages/loot-core/src/server/sync/make-test-message.ts b/packages/loot-core/src/server/sync/make-test-message.ts index 7c864775933..bbafe573c0f 100644 --- a/packages/loot-core/src/server/sync/make-test-message.ts +++ b/packages/loot-core/src/server/sync/make-test-message.ts @@ -6,7 +6,7 @@ async function randomString() { return (await encryption.randomBytes(12)).toString(); } -export default async function makeTestMessage(keyId) { +export async function makeTestMessage(keyId) { const messagePb = new SyncProtoBuf.Message(); messagePb.setDataset(await randomString()); messagePb.setRow(await randomString()); diff --git a/packages/loot-core/src/server/sync/repair.ts b/packages/loot-core/src/server/sync/repair.ts index 1ec8fba70b2..e6c1e28fc94 100644 --- a/packages/loot-core/src/server/sync/repair.ts +++ b/packages/loot-core/src/server/sync/repair.ts @@ -23,7 +23,7 @@ export function rebuildMerkleHash(): { }; } -export default async function repairSync(): Promise { +export async function repairSync(): Promise { const rebuilt = rebuildMerkleHash(); const clock = getClock(); diff --git a/packages/loot-core/src/server/sync/reset.ts b/packages/loot-core/src/server/sync/reset.ts index 8a88c2abcea..4ad32a3129e 100644 --- a/packages/loot-core/src/server/sync/reset.ts +++ b/packages/loot-core/src/server/sync/reset.ts @@ -6,7 +6,7 @@ import * as db from '../db'; import { runMutator } from '../mutators'; import * as prefs from '../prefs'; -export default async function resetSync( +export async function resetSync( keyState?, ): Promise<{ error?: { reason: string; meta?: unknown } }> { if (!keyState) { diff --git a/packages/loot-core/src/server/sync/sync.property.test.ts b/packages/loot-core/src/server/sync/sync.property.test.ts index 346eb3f16ce..cbe5cefe01f 100644 --- a/packages/loot-core/src/server/sync/sync.property.test.ts +++ b/packages/loot-core/src/server/sync/sync.property.test.ts @@ -93,7 +93,8 @@ const baseTime = 1565374471903; const clientId1 = '80dd7da215247293'; const clientId2 = '90xU1sd5124329ac'; -function makeGen>({ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function makeGen>({ table, row, field, @@ -111,7 +112,7 @@ function makeGen>({ value, timestamp: jsc.integer(1000, 10000).smap( x => { - let clientId; + let clientId: string; switch (jsc.random(0, 1)) { case 0: clientId = clientId1; diff --git a/packages/loot-core/src/server/tools/app.ts b/packages/loot-core/src/server/tools/app.ts index e10e605ee3e..4363275df78 100644 --- a/packages/loot-core/src/server/tools/app.ts +++ b/packages/loot-core/src/server/tools/app.ts @@ -5,7 +5,7 @@ import { runMutator } from '../mutators'; import { ToolsHandlers } from './types/handlers'; -const app = createApp(); +export const app = createApp(); app.method('tools/fix-split-transactions', async () => { // 1. Check for child transactions that have a blank payee, and set @@ -59,5 +59,3 @@ app.method('tools/fix-split-transactions', async () => { numDeleted: deletedRows.length, }; }); - -export default app; diff --git a/packages/loot-core/src/shared/arithmetic.test.ts b/packages/loot-core/src/shared/arithmetic.test.ts index c0f5afa46c5..0475689b8dc 100644 --- a/packages/loot-core/src/shared/arithmetic.test.ts +++ b/packages/loot-core/src/shared/arithmetic.test.ts @@ -1,4 +1,4 @@ -import evalArithmetic from './arithmetic'; +import { evalArithmetic } from './arithmetic'; describe('arithmetic', () => { test('handles negative numbers', () => { diff --git a/packages/loot-core/src/shared/arithmetic.ts b/packages/loot-core/src/shared/arithmetic.ts index 2bf0eaa88b2..243afa7ed63 100644 --- a/packages/loot-core/src/shared/arithmetic.ts +++ b/packages/loot-core/src/shared/arithmetic.ts @@ -123,7 +123,7 @@ function evaluate(ast) { } } -export default function evalArithmetic(expression, defaultValue = null) { +export function evalArithmetic(expression, defaultValue = null) { // An empty expression always evals to the default if (expression === '') { return defaultValue; diff --git a/packages/loot-core/src/shared/query.ts b/packages/loot-core/src/shared/query.ts index b54ab392f49..1bd35e101d2 100644 --- a/packages/loot-core/src/shared/query.ts +++ b/packages/loot-core/src/shared/query.ts @@ -132,6 +132,6 @@ export function getPrimaryOrderBy(query, defaultOrderBy) { return { field, order: firstOrder[field] }; } -export default function q(table) { +export function q(table) { return new Query({ table }); } diff --git a/packages/loot-core/src/shared/rules.ts b/packages/loot-core/src/shared/rules.ts index 0bab72945b7..aa0b855329c 100644 --- a/packages/loot-core/src/shared/rules.ts +++ b/packages/loot-core/src/shared/rules.ts @@ -41,6 +41,7 @@ export const FIELD_TYPES = new Map( category: 'id', account: 'id', cleared: 'boolean', + reconciled: 'boolean', saved: 'saved', }), ); diff --git a/packages/loot-core/src/shared/schedules.ts b/packages/loot-core/src/shared/schedules.ts index 213e25af9bd..52d2e0092dd 100644 --- a/packages/loot-core/src/shared/schedules.ts +++ b/packages/loot-core/src/shared/schedules.ts @@ -1,7 +1,7 @@ import type { IRuleOptions } from '@rschedule/core'; import * as monthUtils from './months'; -import q from './query'; +import { q } from './query'; export function getStatus(nextDate, completed, hasTrans) { const today = monthUtils.currentDay(); diff --git a/packages/loot-core/src/types/models/category-group.d.ts b/packages/loot-core/src/types/models/category-group.d.ts index 4225ad68387..19dfeab5693 100644 --- a/packages/loot-core/src/types/models/category-group.d.ts +++ b/packages/loot-core/src/types/models/category-group.d.ts @@ -1,3 +1,5 @@ +import { CategoryEntity } from './category'; + export interface CategoryGroupEntity { id?: string; name: string; diff --git a/packages/loot-core/src/types/server-handlers.d.ts b/packages/loot-core/src/types/server-handlers.d.ts index 1f0d276e496..5a6487b21ab 100644 --- a/packages/loot-core/src/types/server-handlers.d.ts +++ b/packages/loot-core/src/types/server-handlers.d.ts @@ -5,13 +5,16 @@ import { Backup } from '../server/backups'; import { RemoteFile } from '../server/cloud-storage'; import { Node as SpreadsheetNode } from '../server/spreadsheet/spreadsheet'; import { Message } from '../server/sync'; +import { QueryState } from '../shared/query'; +import { Budget } from './budget'; import { AccountEntity, CategoryEntity, CategoryGroupEntity, GoCardlessToken, GoCardlessInstitution, + PayeeEntity, } from './models'; import { EmptyObject } from './util'; @@ -31,8 +34,6 @@ export interface ServerHandlers { 'transaction-add': (transaction) => Promise; - 'transaction-add': (transaction) => Promise; - 'transaction-delete': (transaction) => Promise; 'transactions-parse-file': (arg: { @@ -47,7 +48,7 @@ export interface ServerHandlers { payees; }) => Promise; - 'transactions-export-query': (arg: { query: queryState }) => Promise; + 'transactions-export-query': (arg: { query: QueryState }) => Promise; 'get-categories': () => Promise<{ grouped: Array; @@ -252,10 +253,7 @@ export interface ServerHandlers { 'make-plaid-public-token': (arg: { bankId; - }) => Promise< - | { error: ''; code: data.error_code; type: data.error_type } - | { linkToken: data.link_token } - >; + }) => Promise<{ error: ''; code; type } | { linkToken }>; 'save-global-prefs': (prefs) => Promise<'ok'>; @@ -280,9 +278,9 @@ export interface ServerHandlers { 'get-did-bootstrap': () => Promise; - 'subscribe-needs-bootstrap': ( - args: { url } = {}, - ) => Promise< + 'subscribe-needs-bootstrap': (args: { + url; + }) => Promise< { error: string } | { bootstrapped: unknown; hasServer: boolean } >; @@ -318,7 +316,7 @@ export interface ServerHandlers { 'reset-budget-cache': () => Promise; - 'upload-budget': (arg: { id } = {}) => Promise<{ error?: string }>; + 'upload-budget': (arg: { id }) => Promise<{ error?: string }>; 'download-budget': (arg: { fileId; replace? }) => Promise<{ error; id }>; diff --git a/packages/node-libofx/ffi.js b/packages/node-libofx/ffi.js index d2d38a01baf..5c4cc705f9a 100644 --- a/packages/node-libofx/ffi.js +++ b/packages/node-libofx/ffi.js @@ -1,4 +1,4 @@ -function create(libofx) { +export function create(libofx) { return { init: libofx.cwrap('init', null, ['number']), debug: libofx.cwrap('debug', null, []), @@ -34,5 +34,3 @@ function create(libofx) { ]), }; } - -export default create; diff --git a/packages/node-libofx/index.js b/packages/node-libofx/index.js index 8c8939325bf..59cdf5424ef 100644 --- a/packages/node-libofx/index.js +++ b/packages/node-libofx/index.js @@ -1,4 +1,4 @@ -import createFFI from './ffi'; +import { create as createFFI } from './ffi'; import libofxWrapper from './libofx'; let _libofxPromise; diff --git a/tsconfig.json b/tsconfig.json index 844bcaf11c4..a426766d86a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,8 +15,7 @@ "downlevelIteration": true, // TODO: enable once every file is ts // "strict": true, - // TODO: enable once the violations are fixed - // "strictFunctionTypes": true, + "strictFunctionTypes": true, "noFallthroughCasesInSwitch": true, "skipLibCheck": true, "jsx": "preserve", diff --git a/upcoming-release-notes/1899.md b/upcoming-release-notes/1899.md deleted file mode 100644 index 107fbae012f..00000000000 --- a/upcoming-release-notes/1899.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Features -authors: [jfdoming] ---- - -Add end date/max occurrences field to schedules, useful for things like installments diff --git a/upcoming-release-notes/1906.md b/upcoming-release-notes/1906.md deleted file mode 100644 index 32868386f15..00000000000 --- a/upcoming-release-notes/1906.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [spezzino] ---- - -Add support for automatic theme switching based on system theme \ No newline at end of file diff --git a/upcoming-release-notes/1964.md b/upcoming-release-notes/1964.md deleted file mode 100644 index 16d45249fb9..00000000000 --- a/upcoming-release-notes/1964.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [joel-jeremy] ---- - -Category and group menu/modal in the mobile budget page to manage categories/groups and their notes. diff --git a/upcoming-release-notes/1988.md b/upcoming-release-notes/1988.md deleted file mode 100644 index 8943ac21619..00000000000 --- a/upcoming-release-notes/1988.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Data loading performance improvements for custom reports \ No newline at end of file diff --git a/upcoming-release-notes/1991.md b/upcoming-release-notes/1991.md deleted file mode 100644 index 5fa4b94bddd..00000000000 --- a/upcoming-release-notes/1991.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [twk3] ---- - -Add some initial api tests for budgets and accounts diff --git a/upcoming-release-notes/2002.md b/upcoming-release-notes/2002.md deleted file mode 100644 index de2fc7cba3d..00000000000 --- a/upcoming-release-notes/2002.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [kymckay] ---- - -Prevent deleted categories blocking creation of new categories with the same name. diff --git a/upcoming-release-notes/2004.md b/upcoming-release-notes/2004.md deleted file mode 100644 index 0ff9d19d9bf..00000000000 --- a/upcoming-release-notes/2004.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MikesGlitch] ---- - -Convert BudgetTotals, GoCardlessLink, Import, WelcomeScreen components to Typescript. diff --git a/upcoming-release-notes/2005.md b/upcoming-release-notes/2005.md deleted file mode 100644 index e3c96ee60e9..00000000000 --- a/upcoming-release-notes/2005.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [lucasboebel] ---- - -Maintenance: Update CashFlow.js to use typescript diff --git a/upcoming-release-notes/2007.md b/upcoming-release-notes/2007.md deleted file mode 100644 index cb0aa92f926..00000000000 --- a/upcoming-release-notes/2007.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [ameekSinghUniversityAcc] ---- - -Migrating the DateRange and UseReport files to typescript diff --git a/upcoming-release-notes/2008.md b/upcoming-release-notes/2008.md deleted file mode 100644 index 2d170fd6cc3..00000000000 --- a/upcoming-release-notes/2008.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [vishnukaushik] ---- - -Fix filter Amount formatting issue \ No newline at end of file diff --git a/upcoming-release-notes/2009.md b/upcoming-release-notes/2009.md deleted file mode 100644 index 43b60f981d9..00000000000 --- a/upcoming-release-notes/2009.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [ghosetuhin] ---- - -Migrating the util.js and chartTheme.js files to typescript \ No newline at end of file diff --git a/upcoming-release-notes/2022.md b/upcoming-release-notes/2022.md deleted file mode 100644 index 1f93be5403a..00000000000 --- a/upcoming-release-notes/2022.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Refactored `FixedSizeList` to TypeScript diff --git a/upcoming-release-notes/2023.md b/upcoming-release-notes/2023.md deleted file mode 100644 index d75b90fdac5..00000000000 --- a/upcoming-release-notes/2023.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Added more strict typings to `utils.ts` and some of its dependencies diff --git a/upcoming-release-notes/2025.md b/upcoming-release-notes/2025.md deleted file mode 100644 index 2571d0a9427..00000000000 --- a/upcoming-release-notes/2025.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MikesGlitch] ---- - -Adding aria-labels to some buttons for greater accessibility diff --git a/upcoming-release-notes/2029.md b/upcoming-release-notes/2029.md deleted file mode 100644 index 68c09ee2a46..00000000000 --- a/upcoming-release-notes/2029.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Enable `react/no-children-prop` rule and fix the issues diff --git a/upcoming-release-notes/2031.md b/upcoming-release-notes/2031.md deleted file mode 100644 index cd7fa53c60a..00000000000 --- a/upcoming-release-notes/2031.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [joel-jeremy] ---- - -Fix bulk edit field modal in desktop diff --git a/upcoming-release-notes/2032.md b/upcoming-release-notes/2032.md deleted file mode 100644 index 3d2ca382bba..00000000000 --- a/upcoming-release-notes/2032.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -Apply eslint prefer-const rule to loot-core server files. diff --git a/upcoming-release-notes/2036.md b/upcoming-release-notes/2036.md deleted file mode 100644 index 913201b7303..00000000000 --- a/upcoming-release-notes/2036.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [twk3] ---- - -Add api tests for categories and category groups diff --git a/upcoming-release-notes/2046.md b/upcoming-release-notes/2046.md deleted file mode 100644 index 8ac334a1eee..00000000000 --- a/upcoming-release-notes/2046.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Adding typescript to custom report files and small functional changes. \ No newline at end of file diff --git a/upcoming-release-notes/2048.md b/upcoming-release-notes/2048.md deleted file mode 100644 index fa8554f6096..00000000000 --- a/upcoming-release-notes/2048.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [carkom] ---- - -Fixes and updates to dark theme colors. diff --git a/upcoming-release-notes/2062.md b/upcoming-release-notes/2062.md deleted file mode 100644 index c8cb99f6039..00000000000 --- a/upcoming-release-notes/2062.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [iOSLife] ---- - -Adds a property to the returned items in the API for category and categoryGroup to inform if it is hidden. \ No newline at end of file diff --git a/upcoming-release-notes/2064.md b/upcoming-release-notes/2064.md deleted file mode 100644 index 058182970f6..00000000000 --- a/upcoming-release-notes/2064.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [twk3] ---- - -Cleanup older unused version of react-router diff --git a/upcoming-release-notes/2065.md b/upcoming-release-notes/2065.md deleted file mode 100644 index 873d58604ec..00000000000 --- a/upcoming-release-notes/2065.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Fixing TypeScript issues when enabling `strictFunctionTypes`. diff --git a/upcoming-release-notes/2067.md b/upcoming-release-notes/2067.md deleted file mode 100644 index 72b9a7d05f0..00000000000 --- a/upcoming-release-notes/2067.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Adding types for future typescript changes. diff --git a/upcoming-release-notes/2068.md b/upcoming-release-notes/2068.md deleted file mode 100644 index a4afd516438..00000000000 --- a/upcoming-release-notes/2068.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Features -authors: [joel-jeremy] ---- - -Mobile split transactions diff --git a/upcoming-release-notes/2069.md b/upcoming-release-notes/2069.md deleted file mode 100644 index e8b1f4db822..00000000000 --- a/upcoming-release-notes/2069.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Updating variable naming for custom reports page. \ No newline at end of file diff --git a/upcoming-release-notes/2066.md b/upcoming-release-notes/2072.md similarity index 95% rename from upcoming-release-notes/2066.md rename to upcoming-release-notes/2072.md index 6ff11102d47..edad616bb1f 100644 --- a/upcoming-release-notes/2066.md +++ b/upcoming-release-notes/2072.md @@ -3,4 +3,4 @@ category: Maintenance authors: [MatissJanis] --- -Fixing TypeScript issues when enabling `strictFunctionTypes` (pt.2). +Fixing TypeScript issues when enabling `strictFunctionTypes` (pt.5). diff --git a/upcoming-release-notes/2073.md b/upcoming-release-notes/2073.md deleted file mode 100644 index ec82b1108c5..00000000000 --- a/upcoming-release-notes/2073.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [IzStriker] ---- - -Migrate tooltips.js to typescript diff --git a/upcoming-release-notes/2074.md b/upcoming-release-notes/2074.md deleted file mode 100644 index 665f73d21bb..00000000000 --- a/upcoming-release-notes/2074.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -ci: add helpful bot comments if CI jobs fail. diff --git a/upcoming-release-notes/2078.md b/upcoming-release-notes/2078.md deleted file mode 100644 index 56a60e0b50b..00000000000 --- a/upcoming-release-notes/2078.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Enable Legend for custom reports. diff --git a/upcoming-release-notes/2080.md b/upcoming-release-notes/2080.md deleted file mode 100644 index c43aa923abc..00000000000 --- a/upcoming-release-notes/2080.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Add live/static choice for date filters. diff --git a/upcoming-release-notes/2034.md b/upcoming-release-notes/2081.md similarity index 50% rename from upcoming-release-notes/2034.md rename to upcoming-release-notes/2081.md index 82aadd8c442..7f85c275938 100644 --- a/upcoming-release-notes/2034.md +++ b/upcoming-release-notes/2081.md @@ -3,4 +3,4 @@ category: Maintenance authors: [joel-jeremy] --- -Apply ESLint prefer-const on components folder part 2 +Refactored MobileBudget component to TypeScript diff --git a/upcoming-release-notes/2082.md b/upcoming-release-notes/2082.md deleted file mode 100644 index e27bde08a46..00000000000 --- a/upcoming-release-notes/2082.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [joel-jeremy] ---- - -Add left and right margin to modals. diff --git a/upcoming-release-notes/2085.md b/upcoming-release-notes/2085.md deleted file mode 100644 index 5f3fefcdb98..00000000000 --- a/upcoming-release-notes/2085.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [carkom] ---- - -Realign and fix header/totals row for table graph in custom reports diff --git a/upcoming-release-notes/2092.md b/upcoming-release-notes/2092.md deleted file mode 100644 index a09e8c46a7b..00000000000 --- a/upcoming-release-notes/2092.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [HansiWursti] ---- - -Fix background color when pinning sidebar (Issue [#2089](https://github.com/actualbudget/actual/issues/2089)) diff --git a/upcoming-release-notes/2093.md b/upcoming-release-notes/2093.md deleted file mode 100644 index 995e6d68e92..00000000000 --- a/upcoming-release-notes/2093.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [HansiWursti] ---- - -Fix missing divider bar issue [#1878](https://github.com/actualbudget/actual/issues/1878) diff --git a/upcoming-release-notes/2094.md b/upcoming-release-notes/2094.md deleted file mode 100644 index 8b11d74b738..00000000000 --- a/upcoming-release-notes/2094.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Custom reports: Convert the view options (legend/summary/labels) to global preferences that apply to all graphs. \ No newline at end of file diff --git a/upcoming-release-notes/2096.md b/upcoming-release-notes/2096.md deleted file mode 100644 index ee37321c4a8..00000000000 --- a/upcoming-release-notes/2096.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [MatissJanis] ---- - -Fix category spending report (experimental) not loading [#1981](https://github.com/actualbudget/actual/issues/1981) diff --git a/upcoming-release-notes/2098.md b/upcoming-release-notes/2098.md deleted file mode 100644 index fcfa29d54d6..00000000000 --- a/upcoming-release-notes/2098.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Changing the view and functions for donut graph in custom reports. diff --git a/upcoming-release-notes/2099.md b/upcoming-release-notes/2099.md deleted file mode 100644 index 6482c922b5e..00000000000 --- a/upcoming-release-notes/2099.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [youngcw] ---- - -[Goals]: Fix over budget condition with using apply instead of overwrite diff --git a/upcoming-release-notes/2100.md b/upcoming-release-notes/2100.md deleted file mode 100644 index 228149363a8..00000000000 --- a/upcoming-release-notes/2100.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [youngcw] ---- - -Goals: Don't run templates on non-hidden categories inside of hidden groups diff --git a/upcoming-release-notes/2101.md b/upcoming-release-notes/2101.md deleted file mode 100644 index d7390fbc858..00000000000 --- a/upcoming-release-notes/2101.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [twk3] ---- - -Apply eslint filename extensions for jsx. \ No newline at end of file diff --git a/upcoming-release-notes/2108.md b/upcoming-release-notes/2108.md new file mode 100644 index 00000000000..6fbaec594be --- /dev/null +++ b/upcoming-release-notes/2108.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [davidkus] +--- + +Adding filter for reconciled transactions. diff --git a/upcoming-release-notes/2111.md b/upcoming-release-notes/2111.md deleted file mode 100644 index 3da51c67cb9..00000000000 --- a/upcoming-release-notes/2111.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -eslint: disallow unnecessary curly braces diff --git a/upcoming-release-notes/2112.md b/upcoming-release-notes/2112.md deleted file mode 100644 index ed16eda983c..00000000000 --- a/upcoming-release-notes/2112.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -TypeScript: moving `DeleteFile` component to TS diff --git a/upcoming-release-notes/1993.md b/upcoming-release-notes/2115.md similarity index 60% rename from upcoming-release-notes/1993.md rename to upcoming-release-notes/2115.md index ea16e7de6e4..6de51450c3c 100644 --- a/upcoming-release-notes/1993.md +++ b/upcoming-release-notes/2115.md @@ -3,4 +3,4 @@ category: Maintenance authors: [joel-jeremy] --- -Use Page component for mobile pages +eslint: no default exports diff --git a/upcoming-release-notes/2113.md b/upcoming-release-notes/2116.md similarity index 54% rename from upcoming-release-notes/2113.md rename to upcoming-release-notes/2116.md index b78ebabc777..56222efbc89 100644 --- a/upcoming-release-notes/2113.md +++ b/upcoming-release-notes/2116.md @@ -3,4 +3,4 @@ category: Maintenance authors: [joel-jeremy] --- -Enable prefer-const ESLint rule project-wide +eslint: no default exports - part 2 diff --git a/upcoming-release-notes/2033.md b/upcoming-release-notes/2117.md similarity index 50% rename from upcoming-release-notes/2033.md rename to upcoming-release-notes/2117.md index afd0770965a..d8ccbfa0d5c 100644 --- a/upcoming-release-notes/2033.md +++ b/upcoming-release-notes/2117.md @@ -3,4 +3,4 @@ category: Maintenance authors: [joel-jeremy] --- -Apply ESLint prefer-const on components folder part 1 +eslint: no default exports - part 3 diff --git a/upcoming-release-notes/2118.md b/upcoming-release-notes/2118.md new file mode 100644 index 00000000000..8a5ec768c03 --- /dev/null +++ b/upcoming-release-notes/2118.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [joel-jeremy] +--- + +eslint: no default exports - part 4 diff --git a/upcoming-release-notes/2119.md b/upcoming-release-notes/2119.md new file mode 100644 index 00000000000..ae00aaa06e5 --- /dev/null +++ b/upcoming-release-notes/2119.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [joel-jeremy] +--- + +eslint: no default exports - part 5 diff --git a/upcoming-release-notes/2120.md b/upcoming-release-notes/2120.md new file mode 100644 index 00000000000..c2ae64aecdc --- /dev/null +++ b/upcoming-release-notes/2120.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [joel-jeremy] +--- + +eslint: no default exports - part 6 diff --git a/upcoming-release-notes/2125.md b/upcoming-release-notes/2125.md deleted file mode 100644 index 0197a4b53a3..00000000000 --- a/upcoming-release-notes/2125.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [mk-french] ---- - -Goals: Negate schedule amount to budget if income diff --git a/upcoming-release-notes/2127.md b/upcoming-release-notes/2127.md deleted file mode 100644 index d217cfebb58..00000000000 --- a/upcoming-release-notes/2127.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [mk-french] ---- - -Fix update transaction API bug diff --git a/upcoming-release-notes/2132.md b/upcoming-release-notes/2132.md new file mode 100644 index 00000000000..78a90f225e0 --- /dev/null +++ b/upcoming-release-notes/2132.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [jasonmichalski] +--- + +Fix net worth graph to show more detail in compact card view diff --git a/upcoming-release-notes/2134.md b/upcoming-release-notes/2134.md new file mode 100644 index 00000000000..de428dbadd1 --- /dev/null +++ b/upcoming-release-notes/2134.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [Jackenmen] +--- + +Ask for confirmation when editing date of a locked transaction diff --git a/upcoming-release-notes/2138.md b/upcoming-release-notes/2138.md new file mode 100644 index 00000000000..9fd1d8b80bf --- /dev/null +++ b/upcoming-release-notes/2138.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [kstockk] +--- + +Add cleared column in csv export diff --git a/upcoming-release-notes/2140.md b/upcoming-release-notes/2140.md deleted file mode 100644 index 91b0355db3e..00000000000 --- a/upcoming-release-notes/2140.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [MatissJanis] ---- - -Fix imported transactions overriding reconciled (locked) transaction data diff --git a/upcoming-release-notes/2070.md b/upcoming-release-notes/2142.md similarity index 95% rename from upcoming-release-notes/2070.md rename to upcoming-release-notes/2142.md index f04d8bd7ac7..e443cc99adc 100644 --- a/upcoming-release-notes/2070.md +++ b/upcoming-release-notes/2142.md @@ -3,4 +3,4 @@ category: Maintenance authors: [MatissJanis] --- -Fixing TypeScript issues when enabling `strictFunctionTypes` (pt.3). +Fixing TypeScript issues when enabling `strictFunctionTypes` (pt.4). diff --git a/upcoming-release-notes/2144.md b/upcoming-release-notes/2144.md new file mode 100644 index 00000000000..d03b7b0ce7d --- /dev/null +++ b/upcoming-release-notes/2144.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [jasonmichalski] +--- + +Fix when pressing Enter adds an extra split transaction when no split remains diff --git a/upcoming-release-notes/2169.md b/upcoming-release-notes/2169.md new file mode 100644 index 00000000000..5a98cc427f9 --- /dev/null +++ b/upcoming-release-notes/2169.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [joel-jeremy] +--- + +eslint: no default exports - part 7 diff --git a/upcoming-release-notes/2170.md b/upcoming-release-notes/2170.md new file mode 100644 index 00000000000..c601b030498 --- /dev/null +++ b/upcoming-release-notes/2170.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [joel-jeremy] +--- + +eslint: no default exports - part 8 diff --git a/upcoming-release-notes/2171.md b/upcoming-release-notes/2171.md new file mode 100644 index 00000000000..68e4b45b2ee --- /dev/null +++ b/upcoming-release-notes/2171.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [joel-jeremy] +--- + +eslint: no default exports - part 9 diff --git a/upcoming-release-notes/2172.md b/upcoming-release-notes/2172.md new file mode 100644 index 00000000000..0214401ffd5 --- /dev/null +++ b/upcoming-release-notes/2172.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [joel-jeremy] +--- + +eslint: no default exports - part 10 diff --git a/upcoming-release-notes/2173.md b/upcoming-release-notes/2173.md new file mode 100644 index 00000000000..6a0d206b0bd --- /dev/null +++ b/upcoming-release-notes/2173.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [joel-jeremy] +--- + +eslint: no default exports - part 11 diff --git a/upcoming-release-notes/2184.md b/upcoming-release-notes/2184.md new file mode 100644 index 00000000000..446130490ac --- /dev/null +++ b/upcoming-release-notes/2184.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [joel-jeremy] +--- + +eslint: no default exports - part 12 diff --git a/upcoming-release-notes/2185.md b/upcoming-release-notes/2185.md new file mode 100644 index 00000000000..35bf6f7203a --- /dev/null +++ b/upcoming-release-notes/2185.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [joel-jeremy] +--- + +eslint: no default exports - part 13 diff --git a/upcoming-release-notes/2186.md b/upcoming-release-notes/2186.md new file mode 100644 index 00000000000..a9b4cdfea69 --- /dev/null +++ b/upcoming-release-notes/2186.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [twk3] +--- + +Revert to fix master: Add error Page for special accounts in Mobile