mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 03:32:54 -05:00
Compare commits
6 Commits
v25.7.1
...
tsconfig-c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f376f3d531 | ||
|
|
d426c15a26 | ||
|
|
7fb949e9b1 | ||
|
|
55bdb316f7 | ||
|
|
b9c4b1b7b9 | ||
|
|
a3c4b132fd |
@@ -2,7 +2,7 @@ import { exec } from 'node:child_process';
|
||||
import { existsSync, writeFile } from 'node:fs';
|
||||
import { exit } from 'node:process';
|
||||
|
||||
import prompts from 'prompts';
|
||||
import * as prompts from 'prompts';
|
||||
|
||||
async function run() {
|
||||
const username = await execAsync(
|
||||
@@ -18,7 +18,7 @@ async function run() {
|
||||
}
|
||||
const prNumber = activePr?.number ?? (await getNextPrNumber());
|
||||
|
||||
const result = await prompts([
|
||||
const result = await prompts.prompt([
|
||||
{
|
||||
name: 'githubUsername',
|
||||
message: 'Comma-separated GitHub username(s)',
|
||||
@@ -67,7 +67,7 @@ async function run() {
|
||||
|
||||
const filepath = `./upcoming-release-notes/${prNumber}.md`;
|
||||
if (existsSync(filepath)) {
|
||||
const { confirm } = await prompts({
|
||||
const { confirm } = await prompts.prompt({
|
||||
name: 'confirm',
|
||||
type: 'confirm',
|
||||
message: `This will overwrite the existing release note ${filepath} Are you sure?`,
|
||||
|
||||
@@ -85,7 +85,7 @@ const confusingBrowserGlobals = [
|
||||
];
|
||||
|
||||
/** @type {import('eslint').Linter.Config[]} */
|
||||
export default [
|
||||
export default pluginTypescript.config(
|
||||
{
|
||||
ignores: [
|
||||
'packages/api/app/bundle.api.js',
|
||||
@@ -158,6 +158,7 @@ export default [
|
||||
'import/resolver': {
|
||||
typescript: {
|
||||
alwaysTryTypes: true,
|
||||
project: path.join(__dirname, 'tsconfig.json'),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -547,7 +548,8 @@ export default [
|
||||
sourceType: 'module',
|
||||
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
project: ['tsconfig.root.json', 'packages/*/tsconfig.json'],
|
||||
tsconfigRootDir: __dirname,
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
@@ -572,7 +574,6 @@ export default [
|
||||
'import/namespace': 'off',
|
||||
'import/default': 'off',
|
||||
'import/no-named-as-default-member': 'off',
|
||||
'import/no-unresolved': 'off',
|
||||
|
||||
// Add TypeScript specific rules (and turn off ESLint equivalents)
|
||||
'@typescript-eslint/consistent-type-assertions': 'warn',
|
||||
@@ -766,7 +767,7 @@ export default [
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['packages/api/index.ts'],
|
||||
files: ['**/*.ts?(x)', '**/*.js?(x)'],
|
||||
rules: {
|
||||
'import/no-unresolved': 'off',
|
||||
},
|
||||
@@ -780,8 +781,6 @@ export default [
|
||||
'import/no-default-export': 'off',
|
||||
},
|
||||
},
|
||||
|
||||
{},
|
||||
{
|
||||
// TODO: fix the issues in these files
|
||||
files: [
|
||||
@@ -872,4 +871,4 @@ export default [
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
},
|
||||
},
|
||||
];
|
||||
);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"scripts": {
|
||||
"build:app": "yarn workspace loot-core build:api",
|
||||
"build:crdt": "yarn workspace @actual-app/crdt build",
|
||||
"build:node": "tsc --p tsconfig.dist.json && tsc-alias -p tsconfig.dist.json",
|
||||
"build:node": "tsc --p tsconfig.json && tsc-alias -p tsconfig.json",
|
||||
"build:migrations": "cp migrations/*.sql dist/migrations",
|
||||
"build:default-db": "cp default-db.sqlite dist/",
|
||||
"build": "yarn run clean && yarn run build:app && yarn run build:node && yarn run build:migrations && yarn run build:default-db",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"references": [{ "path": "../loot-core/tsconfig.json" }],
|
||||
"compilerOptions": {
|
||||
// Using ES2021 because that’s the newest version where
|
||||
// the latest Node 16.x release supports all of the features
|
||||
@@ -12,8 +13,8 @@
|
||||
"declarationDir": "@types",
|
||||
"paths": {
|
||||
"loot-core/*": ["./@types/loot-core/*"]
|
||||
}
|
||||
},
|
||||
"composite": true
|
||||
},
|
||||
"include": ["."],
|
||||
"exclude": ["**/node_modules/*", "dist", "@types", "*.test.ts"]
|
||||
"exclude": ["@types", "app", "dist", "migrations", "node_modules"]
|
||||
}
|
||||
6
packages/component-library/tsconfig.json
Normal file
6
packages/component-library/tsconfig.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build:node": "tsc --p tsconfig.dist.json",
|
||||
"build:node": "tsc --p tsconfig.json",
|
||||
"proto:generate": "./bin/generate-proto",
|
||||
"build": "rm -rf dist && yarn run build:node && cp src/proto/sync_pb.d.ts dist/src/proto/",
|
||||
"test": "vitest --globals"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
// Using ES2021 because that’s the newest version where
|
||||
// the latest Node 16.x release supports all of the features
|
||||
"target": "ES2021",
|
||||
@@ -10,7 +11,5 @@
|
||||
"declaration": true,
|
||||
"strict": true,
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["."],
|
||||
"exclude": ["dist"]
|
||||
}
|
||||
}
|
||||
1
packages/desktop-client/globals.d.ts
vendored
1
packages/desktop-client/globals.d.ts
vendored
@@ -1,4 +1,5 @@
|
||||
import { type CSSObject } from '@emotion/css/dist/declarations/src/create-instance';
|
||||
import 'loot-core/globals';
|
||||
|
||||
// Allow images to be imported
|
||||
declare module '*.png';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { useEffect, useState, type ReactElement } from 'react';
|
||||
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useMetadataPref } from '@desktop-client/hooks/useMetadataPref';
|
||||
|
||||
import { type RemoteFile, type SyncedLocalFile } from 'loot-core/types/file';
|
||||
|
||||
import { useMetadataPref } from '../hooks/useMetadataPref';
|
||||
import { useSelector } from '../redux';
|
||||
|
||||
import { useAuth } from './AuthProvider';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { initBackend as initSQLBackend } from 'absurd-sql/dist/indexeddb-main-thread';
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import { registerSW } from 'virtual:pwa-register';
|
||||
|
||||
import * as Platform from 'loot-core/client/platform';
|
||||
|
||||
@@ -13,6 +13,7 @@ import { BrowserRouter } from 'react-router-dom';
|
||||
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useMetadataPref } from '@desktop-client/hooks/useMetadataPref';
|
||||
|
||||
import { setAppState, sync } from 'loot-core/client/app/appSlice';
|
||||
import { closeBudget, loadBudget } from 'loot-core/client/budgets/budgetsSlice';
|
||||
@@ -24,7 +25,6 @@ import { signOut } from 'loot-core/client/users/usersSlice';
|
||||
import { init as initConnection, send } from 'loot-core/platform/client/fetch';
|
||||
|
||||
import { handleGlobalEvents } from '../global-events';
|
||||
import { useMetadataPref } from '../hooks/useMetadataPref';
|
||||
import { setI18NextLanguage } from '../i18n';
|
||||
import { installPolyfills } from '../polyfills';
|
||||
import { useDispatch, useSelector, useStore } from '../redux';
|
||||
|
||||
@@ -12,6 +12,10 @@ import {
|
||||
import { useResponsive } from '@actual-app/components/hooks/useResponsive';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useLocalPref } from '@desktop-client/hooks/useLocalPref';
|
||||
import { useMetaThemeColor } from '@desktop-client/hooks/useMetaThemeColor';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { sync } from 'loot-core/client/app/appSlice';
|
||||
import { addNotification } from 'loot-core/client/notifications/notificationsSlice';
|
||||
@@ -19,10 +23,6 @@ import * as undo from 'loot-core/platform/client/undo';
|
||||
|
||||
import { ProtectedRoute } from '../auth/ProtectedRoute';
|
||||
import { Permissions } from '../auth/types';
|
||||
import { useAccounts } from '../hooks/useAccounts';
|
||||
import { useLocalPref } from '../hooks/useLocalPref';
|
||||
import { useMetaThemeColor } from '../hooks/useMetaThemeColor';
|
||||
import { useNavigate } from '../hooks/useNavigate';
|
||||
import { useSelector, useDispatch } from '../redux';
|
||||
import { getIsOutdated, getLatestVersion } from '../util/versions';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import * as Platform from 'loot-core/client/platform';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { useNavigate } from '../hooks/useNavigate';
|
||||
import * as Platform from 'loot-core/client/platform';
|
||||
|
||||
export function GlobalKeys() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -8,11 +8,11 @@ import { SvgHelp } from '@actual-app/components/icons/v2';
|
||||
import { Menu } from '@actual-app/components/menu';
|
||||
import { Popover } from '@actual-app/components/popover';
|
||||
import { SpaceBetween } from '@actual-app/components/space-between';
|
||||
import { useFeatureFlag } from '@desktop-client/hooks/useFeatureFlag';
|
||||
import { useToggle } from 'usehooks-ts';
|
||||
|
||||
import { pushModal } from 'loot-core/client/modals/modalsSlice';
|
||||
|
||||
import { useFeatureFlag } from '../hooks/useFeatureFlag';
|
||||
import { useDispatch } from '../redux';
|
||||
|
||||
const getPageDocs = (page: string) => {
|
||||
|
||||
@@ -9,6 +9,8 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useMetadataPref } from '@desktop-client/hooks/useMetadataPref';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { closeBudget } from 'loot-core/client/budgets/budgetsSlice';
|
||||
import { getUserData, signOut } from 'loot-core/client/users/usersSlice';
|
||||
@@ -18,8 +20,6 @@ import { type TransObjectLiteral } from 'loot-core/types/util';
|
||||
|
||||
import { useAuth } from '../auth/AuthProvider';
|
||||
import { Permissions } from '../auth/types';
|
||||
import { useMetadataPref } from '../hooks/useMetadataPref';
|
||||
import { useNavigate } from '../hooks/useNavigate';
|
||||
import { useSelector, useDispatch } from '../redux';
|
||||
|
||||
import { PrivacyFilter } from './PrivacyFilter';
|
||||
|
||||
@@ -14,6 +14,13 @@ import { Stack } from '@actual-app/components/stack';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { usePayees } from '@desktop-client/hooks/usePayees';
|
||||
import {
|
||||
useSelected,
|
||||
SelectedProvider,
|
||||
} from '@desktop-client/hooks/useSelected';
|
||||
|
||||
import { useSchedules } from 'loot-core/client/data-hooks/schedules';
|
||||
import { pushModal } from 'loot-core/client/modals/modalsSlice';
|
||||
@@ -26,10 +33,6 @@ import { mapField, friendlyOp } from 'loot-core/shared/rules';
|
||||
import { describeSchedule } from 'loot-core/shared/schedules';
|
||||
import { type RuleEntity, type NewRuleEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useAccounts } from '../hooks/useAccounts';
|
||||
import { useCategories } from '../hooks/useCategories';
|
||||
import { usePayees } from '../hooks/usePayees';
|
||||
import { useSelected, SelectedProvider } from '../hooks/useSelected';
|
||||
import { useDispatch } from '../redux';
|
||||
|
||||
import { InfiniteScrollWrapper } from './common/InfiniteScrollWrapper';
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import { useMetadataPref } from '@desktop-client/hooks/useMetadataPref';
|
||||
import { useModalState } from '@desktop-client/hooks/useModalState';
|
||||
|
||||
import { closeModal } from 'loot-core/client/modals/modalsSlice';
|
||||
import { send } from 'loot-core/platform/client/fetch';
|
||||
import * as monthUtils from 'loot-core/shared/months';
|
||||
|
||||
import { useMetadataPref } from '../hooks/useMetadataPref';
|
||||
import { useModalState } from '../hooks/useModalState';
|
||||
import { useDispatch } from '../redux';
|
||||
|
||||
import { EditSyncAccount } from './banksync/EditSyncAccount';
|
||||
|
||||
@@ -13,11 +13,10 @@ import { Popover } from '@actual-app/components/popover';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { Tooltip } from '@actual-app/components/tooltip';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useNotes } from '@desktop-client/hooks/useNotes';
|
||||
|
||||
import { send } from 'loot-core/platform/client/fetch';
|
||||
|
||||
import { useNotes } from '../hooks/useNotes';
|
||||
|
||||
import { Notes } from './Notes';
|
||||
|
||||
type NotesButtonProps = {
|
||||
|
||||
@@ -7,10 +7,9 @@ import React, {
|
||||
|
||||
import { useResponsive } from '@actual-app/components/hooks/useResponsive';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { usePrivacyMode } from '@desktop-client/hooks/usePrivacyMode';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import { usePrivacyMode } from '../hooks/usePrivacyMode';
|
||||
|
||||
type ConditionalPrivacyFilterProps = {
|
||||
children: ReactNode;
|
||||
privacyFilter?: boolean | PrivacyFilterProps;
|
||||
|
||||
@@ -17,6 +17,10 @@ import { styles, type CSSProperties } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useGlobalPref } from '@desktop-client/hooks/useGlobalPref';
|
||||
import { useMetadataPref } from '@desktop-client/hooks/useMetadataPref';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import { sync } from 'loot-core/client/app/appSlice';
|
||||
@@ -28,10 +32,6 @@ import {
|
||||
isElectron,
|
||||
} from 'loot-core/shared/environment';
|
||||
|
||||
import { useGlobalPref } from '../hooks/useGlobalPref';
|
||||
import { useMetadataPref } from '../hooks/useMetadataPref';
|
||||
import { useNavigate } from '../hooks/useNavigate';
|
||||
import { useSyncedPref } from '../hooks/useSyncedPref';
|
||||
import { useDispatch } from '../redux';
|
||||
|
||||
import { AccountSyncCheck } from './accounts/AccountSyncCheck';
|
||||
|
||||
@@ -12,6 +12,23 @@ import { Navigate, useParams, useLocation } from 'react-router-dom';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccountPreviewTransactions } from '@desktop-client/hooks/useAccountPreviewTransactions';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { useDateFormat } from '@desktop-client/hooks/useDateFormat';
|
||||
import { useFailedAccounts } from '@desktop-client/hooks/useFailedAccounts';
|
||||
import { useLocalPref } from '@desktop-client/hooks/useLocalPref';
|
||||
import { usePayees } from '@desktop-client/hooks/usePayees';
|
||||
import {
|
||||
SelectedProviderWithItems,
|
||||
type Actions,
|
||||
} from '@desktop-client/hooks/useSelected';
|
||||
import {
|
||||
SplitsExpandedProvider,
|
||||
useSplitsExpanded,
|
||||
} from '@desktop-client/hooks/useSplitsExpanded';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
import { useTransactionBatchActions } from '@desktop-client/hooks/useTransactionBatchActions';
|
||||
import { debounce } from 'debounce';
|
||||
import { t } from 'i18next';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
@@ -67,23 +84,6 @@ import {
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { unlinkAccount } from '../../accounts/accountsSlice';
|
||||
import { useAccountPreviewTransactions } from '../../hooks/useAccountPreviewTransactions';
|
||||
import { useAccounts } from '../../hooks/useAccounts';
|
||||
import { useCategories } from '../../hooks/useCategories';
|
||||
import { useDateFormat } from '../../hooks/useDateFormat';
|
||||
import { useFailedAccounts } from '../../hooks/useFailedAccounts';
|
||||
import { useLocalPref } from '../../hooks/useLocalPref';
|
||||
import { usePayees } from '../../hooks/usePayees';
|
||||
import {
|
||||
SelectedProviderWithItems,
|
||||
type Actions,
|
||||
} from '../../hooks/useSelected';
|
||||
import {
|
||||
SplitsExpandedProvider,
|
||||
useSplitsExpanded,
|
||||
} from '../../hooks/useSplitsExpanded';
|
||||
import { useSyncedPref } from '../../hooks/useSyncedPref';
|
||||
import { useTransactionBatchActions } from '../../hooks/useTransactionBatchActions';
|
||||
import { useSelector, useDispatch } from '../../redux';
|
||||
import { type SavedFilter } from '../filters/SavedFilterMenuButton';
|
||||
import { TransactionList } from '../transactions/TransactionList';
|
||||
|
||||
@@ -7,13 +7,13 @@ import { SvgExclamationOutline } from '@actual-app/components/icons/v1';
|
||||
import { Popover } from '@actual-app/components/popover';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useFailedAccounts } from '@desktop-client/hooks/useFailedAccounts';
|
||||
|
||||
import { type AccountEntity } from 'loot-core/types/models';
|
||||
|
||||
import { unlinkAccount } from '../../accounts/accountsSlice';
|
||||
import { authorizeBank } from '../../gocardless';
|
||||
import { useAccounts } from '../../hooks/useAccounts';
|
||||
import { useFailedAccounts } from '../../hooks/useFailedAccounts';
|
||||
import { useDispatch } from '../../redux';
|
||||
import { Link } from '../common/Link';
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { SvgArrowButtonRight1 } from '@actual-app/components/icons/v2';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useSelectedItems } from '@desktop-client/hooks/useSelected';
|
||||
import { useHover } from 'usehooks-ts';
|
||||
|
||||
import { useCachedSchedules } from 'loot-core/client/data-hooks/schedules';
|
||||
@@ -14,7 +15,6 @@ import { getScheduledAmount } from 'loot-core/shared/schedules';
|
||||
import { isPreviewId } from 'loot-core/shared/transactions';
|
||||
import { type AccountEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useSelectedItems } from '../../hooks/useSelected';
|
||||
import { PrivacyFilter } from '../PrivacyFilter';
|
||||
import { type Binding } from '../spreadsheet';
|
||||
import { CellValue, CellValueText } from '../spreadsheet/CellValue';
|
||||
|
||||
@@ -31,6 +31,10 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { Tooltip } from '@actual-app/components/tooltip';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useLocale } from '@desktop-client/hooks/useLocale';
|
||||
import { useLocalPref } from '@desktop-client/hooks/useLocalPref';
|
||||
import { useSplitsExpanded } from '@desktop-client/hooks/useSplitsExpanded';
|
||||
import { useSyncServerStatus } from '@desktop-client/hooks/useSyncServerStatus';
|
||||
|
||||
import { tsToRelativeTime } from 'loot-core/shared/util';
|
||||
import {
|
||||
@@ -40,10 +44,6 @@ import {
|
||||
type TransactionFilterEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useLocale } from '../../hooks/useLocale';
|
||||
import { useLocalPref } from '../../hooks/useLocalPref';
|
||||
import { useSplitsExpanded } from '../../hooks/useSplitsExpanded';
|
||||
import { useSyncServerStatus } from '../../hooks/useSyncServerStatus';
|
||||
import { AnimatedRefresh } from '../AnimatedRefresh';
|
||||
import { Search } from '../common/Search';
|
||||
import { FilterButton } from '../filters/FiltersMenu';
|
||||
|
||||
@@ -16,6 +16,7 @@ import { SvgLockClosed } from '@actual-app/components/icons/v2';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useMetadataPref } from '@desktop-client/hooks/useMetadataPref';
|
||||
|
||||
import { pushModal } from 'loot-core/client/modals/modalsSlice';
|
||||
import { addNotification } from 'loot-core/client/notifications/notificationsSlice';
|
||||
@@ -27,7 +28,6 @@ import {
|
||||
type UserAccessEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useMetadataPref } from '../../../hooks/useMetadataPref';
|
||||
import { useDispatch } from '../../../redux';
|
||||
import { InfiniteScrollWrapper } from '../../common/InfiniteScrollWrapper';
|
||||
import { Link } from '../../common/Link';
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useMetadataPref } from '@desktop-client/hooks/useMetadataPref';
|
||||
|
||||
import { addNotification } from 'loot-core/client/notifications/notificationsSlice';
|
||||
import { signOut } from 'loot-core/client/users/usersSlice';
|
||||
@@ -11,7 +12,6 @@ import { send } from 'loot-core/platform/client/fetch';
|
||||
import { getUserAccessErrors } from 'loot-core/shared/errors';
|
||||
import { type UserAvailable } from 'loot-core/types/models';
|
||||
|
||||
import { useMetadataPref } from '../../../hooks/useMetadataPref';
|
||||
import { useDispatch } from '../../../redux';
|
||||
import { Checkbox } from '../../forms';
|
||||
import { Row, Cell } from '../../table';
|
||||
|
||||
@@ -15,6 +15,10 @@ import { Stack } from '@actual-app/components/stack';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import {
|
||||
SelectedProvider,
|
||||
useSelected,
|
||||
} from '@desktop-client/hooks/useSelected';
|
||||
|
||||
import { pushModal } from 'loot-core/client/modals/modalsSlice';
|
||||
import { addNotification } from 'loot-core/client/notifications/notificationsSlice';
|
||||
@@ -23,7 +27,6 @@ import { send } from 'loot-core/platform/client/fetch';
|
||||
import * as undo from 'loot-core/platform/client/undo';
|
||||
import { type NewUserEntity, type UserEntity } from 'loot-core/types/models';
|
||||
|
||||
import { SelectedProvider, useSelected } from '../../../hooks/useSelected';
|
||||
import { useDispatch } from '../../../redux';
|
||||
import { InfiniteScrollWrapper } from '../../common/InfiniteScrollWrapper';
|
||||
import { Link } from '../../common/Link';
|
||||
|
||||
@@ -4,7 +4,8 @@ import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
useSelectedItems,
|
||||
useSelectedDispatch,
|
||||
} from '../../../hooks/useSelected';
|
||||
} from '@desktop-client/hooks/useSelected';
|
||||
|
||||
import { SelectCell, Cell, TableHeader } from '../../table';
|
||||
|
||||
export function UserDirectoryHeader() {
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Trans, useTranslation } from 'react-i18next';
|
||||
|
||||
import { Button } from '@actual-app/components/button';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import { Page } from '../../Page';
|
||||
|
||||
import { UserDirectory } from './UserDirectory';
|
||||
|
||||
@@ -5,11 +5,11 @@ import { Trans } from 'react-i18next';
|
||||
import { Button } from '@actual-app/components/button';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useSelectedDispatch } from '@desktop-client/hooks/useSelected';
|
||||
|
||||
import { PossibleRoles } from 'loot-core/shared/user';
|
||||
import { type UserEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useSelectedDispatch } from '../../../hooks/useSelected';
|
||||
import { Checkbox } from '../../forms';
|
||||
import { SelectCell, Row, Cell } from '../../table';
|
||||
|
||||
|
||||
@@ -13,12 +13,11 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { TextOneLine } from '@actual-app/components/text-one-line';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { css, cx } from '@emotion/css';
|
||||
|
||||
import { type AccountEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useAccounts } from '../../hooks/useAccounts';
|
||||
|
||||
import { Autocomplete } from './Autocomplete';
|
||||
import { ItemHeader } from './ItemHeader';
|
||||
|
||||
|
||||
@@ -19,13 +19,12 @@ import { Popover } from '@actual-app/components/popover';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useProperFocus } from '@desktop-client/hooks/useProperFocus';
|
||||
import { css, cx } from '@emotion/css';
|
||||
import Downshift, { type StateChangeTypes } from 'downshift';
|
||||
|
||||
import { getNormalisedString } from 'loot-core/shared/normalisation';
|
||||
|
||||
import { useProperFocus } from '../../hooks/useProperFocus';
|
||||
|
||||
type CommonAutocompleteProps<T extends Item> = {
|
||||
focused?: boolean;
|
||||
embedded?: boolean;
|
||||
|
||||
@@ -19,6 +19,8 @@ import { Text } from '@actual-app/components/text';
|
||||
import { TextOneLine } from '@actual-app/components/text-one-line';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
import { css, cx } from '@emotion/css';
|
||||
|
||||
import { trackingBudget, envelopeBudget } from 'loot-core/client/queries';
|
||||
@@ -29,8 +31,6 @@ import {
|
||||
type CategoryGroupEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useCategories } from '../../hooks/useCategories';
|
||||
import { useSyncedPref } from '../../hooks/useSyncedPref';
|
||||
import { useEnvelopeSheetValue } from '../budget/envelope/EnvelopeBudgetComponents';
|
||||
import { makeAmountFullStyle } from '../budget/util';
|
||||
import { useSheetValue } from '../spreadsheet/useSheetValue';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useCommonPayees } from '@desktop-client/hooks/usePayees';
|
||||
import { render, type Screen, screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { vi } from 'vitest';
|
||||
@@ -6,7 +7,6 @@ import { generateAccount } from 'loot-core/mocks';
|
||||
import type { AccountEntity, PayeeEntity } from 'loot-core/types/models';
|
||||
|
||||
import { AuthProvider } from '../../auth/AuthProvider';
|
||||
import { useCommonPayees } from '../../hooks/usePayees';
|
||||
import { TestProvider } from '../../redux/mock';
|
||||
|
||||
import {
|
||||
|
||||
@@ -20,6 +20,8 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { TextOneLine } from '@actual-app/components/text-one-line';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useCommonPayees, usePayees } from '@desktop-client/hooks/usePayees';
|
||||
import { css, cx } from '@emotion/css';
|
||||
|
||||
import {
|
||||
@@ -29,8 +31,6 @@ import {
|
||||
import { getNormalisedString } from 'loot-core/shared/normalisation';
|
||||
import { type AccountEntity, type PayeeEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useAccounts } from '../../hooks/useAccounts';
|
||||
import { useCommonPayees, usePayees } from '../../hooks/usePayees';
|
||||
import { useDispatch } from '../../redux';
|
||||
|
||||
import {
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import React from 'react';
|
||||
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useLocale } from '@desktop-client/hooks/useLocale';
|
||||
|
||||
import { type AccountEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useLocale } from '../../hooks/useLocale';
|
||||
|
||||
import { AccountRow } from './AccountRow';
|
||||
|
||||
type AccountsListProps = {
|
||||
|
||||
@@ -8,6 +8,7 @@ import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { Tooltip } from '@actual-app/components/tooltip';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
|
||||
import { useTransactions } from 'loot-core/client/data-hooks/transactions';
|
||||
import { pushModal } from 'loot-core/client/modals/modalsSlice';
|
||||
@@ -24,7 +25,6 @@ import {
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { unlinkAccount } from '../../accounts/accountsSlice';
|
||||
import { useSyncedPref } from '../../hooks/useSyncedPref';
|
||||
import { useDispatch } from '../../redux';
|
||||
import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal';
|
||||
import { CheckboxOption } from '../modals/ImportTransactionsModal/CheckboxOption';
|
||||
|
||||
@@ -4,6 +4,8 @@ import { Trans, useTranslation } from 'react-i18next';
|
||||
import { useResponsive } from '@actual-app/components/hooks/useResponsive';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useGlobalPref } from '@desktop-client/hooks/useGlobalPref';
|
||||
|
||||
import { pushModal } from 'loot-core/client/modals/modalsSlice';
|
||||
import {
|
||||
@@ -11,8 +13,6 @@ import {
|
||||
type AccountEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useAccounts } from '../../hooks/useAccounts';
|
||||
import { useGlobalPref } from '../../hooks/useGlobalPref';
|
||||
import { useDispatch } from '../../redux';
|
||||
import { MOBILE_NAV_HEIGHT } from '../mobile/MobileNavTabs';
|
||||
import { Page } from '../Page';
|
||||
|
||||
@@ -13,11 +13,11 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { Tooltip } from '@actual-app/components/tooltip';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useFeatureFlag } from '@desktop-client/hooks/useFeatureFlag';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import { type TransObjectLiteral } from 'loot-core/types/util';
|
||||
|
||||
import { useFeatureFlag } from '../../hooks/useFeatureFlag';
|
||||
import { type Binding } from '../spreadsheet';
|
||||
import { CellValue, CellValueText } from '../spreadsheet/CellValue';
|
||||
import { useFormat } from '../spreadsheet/useFormat';
|
||||
|
||||
@@ -3,8 +3,8 @@ import React, { memo, useState, useMemo } from 'react';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useLocalPref } from '@desktop-client/hooks/useLocalPref';
|
||||
|
||||
import { useLocalPref } from '../../hooks/useLocalPref';
|
||||
import { DropHighlightPosContext } from '../sort';
|
||||
import { Row } from '../table';
|
||||
|
||||
|
||||
@@ -8,12 +8,11 @@ import React, {
|
||||
import { useSpring, animated } from 'react-spring';
|
||||
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useResizeObserver } from '@desktop-client/hooks/useResizeObserver';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import { addMonths, subMonths } from 'loot-core/shared/months';
|
||||
|
||||
import { useResizeObserver } from '../../hooks/useResizeObserver';
|
||||
|
||||
import { type BudgetSummary as EnvelopeBudgetSummary } from './envelope/budgetsummary/BudgetSummary';
|
||||
import { MonthsContext } from './MonthsContext';
|
||||
import { type BudgetSummary as TrackingBudgetSummary } from './tracking/budgetsummary/BudgetSummary';
|
||||
|
||||
@@ -7,15 +7,15 @@ import React, {
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { useGlobalPref } from '@desktop-client/hooks/useGlobalPref';
|
||||
import { useLocalPref } from '@desktop-client/hooks/useLocalPref';
|
||||
|
||||
import {
|
||||
type CategoryEntity,
|
||||
type CategoryGroupEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useCategories } from '../../hooks/useCategories';
|
||||
import { useGlobalPref } from '../../hooks/useGlobalPref';
|
||||
import { useLocalPref } from '../../hooks/useLocalPref';
|
||||
import { type DropPosition } from '../sort';
|
||||
|
||||
import { BudgetCategories } from './BudgetCategories';
|
||||
|
||||
@@ -3,13 +3,13 @@ import React, { type ComponentProps } from 'react';
|
||||
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useDragRef } from '@desktop-client/hooks/useDragRef';
|
||||
|
||||
import {
|
||||
type CategoryGroupEntity,
|
||||
type CategoryEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useDragRef } from '../../hooks/useDragRef';
|
||||
import {
|
||||
useDraggable,
|
||||
useDroppable,
|
||||
|
||||
@@ -3,8 +3,8 @@ import React, { type ComponentProps } from 'react';
|
||||
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useDragRef } from '@desktop-client/hooks/useDragRef';
|
||||
|
||||
import { useDragRef } from '../../hooks/useDragRef';
|
||||
import {
|
||||
useDraggable,
|
||||
useDroppable,
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// @ts-strict-ignore
|
||||
import React, { type ComponentProps } from 'react';
|
||||
|
||||
import { useDragRef } from '@desktop-client/hooks/useDragRef';
|
||||
|
||||
import { type CategoryEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useDragRef } from '../../hooks/useDragRef';
|
||||
import {
|
||||
useDraggable,
|
||||
useDroppable,
|
||||
|
||||
@@ -10,11 +10,11 @@ import { SvgCalendar } from '@actual-app/components/icons/v2';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useLocale } from '@desktop-client/hooks/useLocale';
|
||||
import { useResizeObserver } from '@desktop-client/hooks/useResizeObserver';
|
||||
|
||||
import * as monthUtils from 'loot-core/shared/months';
|
||||
|
||||
import { useLocale } from '../../hooks/useLocale';
|
||||
import { useResizeObserver } from '../../hooks/useResizeObserver';
|
||||
import { Link } from '../common/Link';
|
||||
|
||||
import { type MonthBounds } from './MonthsContext';
|
||||
|
||||
@@ -8,15 +8,15 @@ import { Menu } from '@actual-app/components/menu';
|
||||
import { Popover } from '@actual-app/components/popover';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useContextMenu } from '@desktop-client/hooks/useContextMenu';
|
||||
import { useFeatureFlag } from '@desktop-client/hooks/useFeatureFlag';
|
||||
import { useGlobalPref } from '@desktop-client/hooks/useGlobalPref';
|
||||
|
||||
import {
|
||||
type CategoryGroupEntity,
|
||||
type CategoryEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useContextMenu } from '../../hooks/useContextMenu';
|
||||
import { useFeatureFlag } from '../../hooks/useFeatureFlag';
|
||||
import { useGlobalPref } from '../../hooks/useGlobalPref';
|
||||
import { NotesButton } from '../NotesButton';
|
||||
import { InputCell } from '../table';
|
||||
|
||||
|
||||
@@ -10,15 +10,15 @@ import { Popover } from '@actual-app/components/popover';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useContextMenu } from '@desktop-client/hooks/useContextMenu';
|
||||
import { useFeatureFlag } from '@desktop-client/hooks/useFeatureFlag';
|
||||
import { useGlobalPref } from '@desktop-client/hooks/useGlobalPref';
|
||||
|
||||
import {
|
||||
type CategoryEntity,
|
||||
type CategoryGroupEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useContextMenu } from '../../hooks/useContextMenu';
|
||||
import { useFeatureFlag } from '../../hooks/useFeatureFlag';
|
||||
import { useGlobalPref } from '../../hooks/useGlobalPref';
|
||||
import { NotesButton } from '../NotesButton';
|
||||
import { InputCell } from '../table';
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@ import React, { type ComponentPropsWithoutRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Menu } from '@actual-app/components/menu';
|
||||
|
||||
import { useFeatureFlag } from '../../../hooks/useFeatureFlag';
|
||||
import { useFeatureFlag } from '@desktop-client/hooks/useFeatureFlag';
|
||||
|
||||
type BudgetMenuProps = Omit<
|
||||
ComponentPropsWithoutRef<typeof Menu>,
|
||||
|
||||
@@ -4,10 +4,10 @@ import { Trans, useTranslation } from 'react-i18next';
|
||||
import { Button } from '@actual-app/components/button';
|
||||
import { InitialFocus } from '@actual-app/components/initial-focus';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
|
||||
import { type CategoryEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useCategories } from '../../../hooks/useCategories';
|
||||
import { CategoryAutocomplete } from '../../autocomplete/CategoryAutocomplete';
|
||||
import { addToBeBudgetedGroup, removeCategoriesFromGroups } from '../util';
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useContextMenu } from '@desktop-client/hooks/useContextMenu';
|
||||
import { useUndo } from '@desktop-client/hooks/useUndo';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import { envelopeBudget } from 'loot-core/client/queries';
|
||||
@@ -24,8 +26,6 @@ import {
|
||||
type CategoryEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useContextMenu } from '../../../hooks/useContextMenu';
|
||||
import { useUndo } from '../../../hooks/useUndo';
|
||||
import { type Binding, type SheetFields } from '../../spreadsheet';
|
||||
import { CellValue, CellValueText } from '../../spreadsheet/CellValue';
|
||||
import { useSheetName } from '../../spreadsheet/useSheetName';
|
||||
|
||||
@@ -5,12 +5,12 @@ import { Button } from '@actual-app/components/button';
|
||||
import { InitialFocus } from '@actual-app/components/initial-focus';
|
||||
import { Input } from '@actual-app/components/input';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
|
||||
import { evalArithmetic } from 'loot-core/shared/arithmetic';
|
||||
import { integerToCurrency, amountToInteger } from 'loot-core/shared/util';
|
||||
import { type CategoryEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useCategories } from '../../../hooks/useCategories';
|
||||
import { CategoryAutocomplete } from '../../autocomplete/CategoryAutocomplete';
|
||||
import { addToBeBudgetedGroup, removeCategoriesFromGroups } from '../util';
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@ import React, { type ComponentPropsWithoutRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Menu } from '@actual-app/components/menu';
|
||||
|
||||
import { useFeatureFlag } from '../../../../hooks/useFeatureFlag';
|
||||
import { useFeatureFlag } from '@desktop-client/hooks/useFeatureFlag';
|
||||
|
||||
type BudgetMonthMenuProps = Omit<
|
||||
ComponentPropsWithoutRef<typeof Menu>,
|
||||
|
||||
@@ -11,12 +11,12 @@ import { Popover } from '@actual-app/components/popover';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useLocale } from '@desktop-client/hooks/useLocale';
|
||||
import { useUndo } from '@desktop-client/hooks/useUndo';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import * as monthUtils from 'loot-core/shared/months';
|
||||
|
||||
import { useLocale } from '../../../../hooks/useLocale';
|
||||
import { useUndo } from '../../../../hooks/useUndo';
|
||||
import { NotesButton } from '../../../NotesButton';
|
||||
import { NamespaceContext } from '../../../spreadsheet/NamespaceContext';
|
||||
import { useEnvelopeBudget } from '../EnvelopeBudgetContext';
|
||||
|
||||
@@ -7,10 +7,10 @@ import React, {
|
||||
|
||||
import { Popover } from '@actual-app/components/popover';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useContextMenu } from '@desktop-client/hooks/useContextMenu';
|
||||
|
||||
import { envelopeBudget } from 'loot-core/client/queries';
|
||||
|
||||
import { useContextMenu } from '../../../../hooks/useContextMenu';
|
||||
import { CoverMenu } from '../CoverMenu';
|
||||
import { useEnvelopeSheetValue } from '../EnvelopeBudgetComponents';
|
||||
import { HoldMenu } from '../HoldMenu';
|
||||
|
||||
@@ -3,11 +3,11 @@ import React, { type CSSProperties } from 'react';
|
||||
import { Button } from '@actual-app/components/button';
|
||||
import { SvgChartPie } from '@actual-app/components/icons/v1';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { useFeatureFlag } from '@desktop-client/hooks/useFeatureFlag';
|
||||
|
||||
import { pushModal } from 'loot-core/client/modals/modalsSlice';
|
||||
import { type Template } from 'loot-core/server/budget/types/templates';
|
||||
|
||||
import { useFeatureFlag } from '../../../hooks/useFeatureFlag';
|
||||
import { useDispatch } from '../../../redux';
|
||||
|
||||
type CategoryAutomationButtonProps = {
|
||||
|
||||
@@ -4,6 +4,11 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { useGlobalPref } from '@desktop-client/hooks/useGlobalPref';
|
||||
import { useLocalPref } from '@desktop-client/hooks/useLocalPref';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
|
||||
import { pushModal } from 'loot-core/client/modals/modalsSlice';
|
||||
import { addNotification } from 'loot-core/client/notifications/notificationsSlice';
|
||||
@@ -23,11 +28,6 @@ import { useSpreadsheet } from 'loot-core/client/SpreadsheetProvider';
|
||||
import { send } from 'loot-core/platform/client/fetch';
|
||||
import * as monthUtils from 'loot-core/shared/months';
|
||||
|
||||
import { useCategories } from '../../hooks/useCategories';
|
||||
import { useGlobalPref } from '../../hooks/useGlobalPref';
|
||||
import { useLocalPref } from '../../hooks/useLocalPref';
|
||||
import { useNavigate } from '../../hooks/useNavigate';
|
||||
import { useSyncedPref } from '../../hooks/useSyncedPref';
|
||||
import { useDispatch } from '../../redux';
|
||||
import { NamespaceContext } from '../spreadsheet/NamespaceContext';
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@ import React, { type ComponentPropsWithoutRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Menu } from '@actual-app/components/menu';
|
||||
|
||||
import { useFeatureFlag } from '../../../hooks/useFeatureFlag';
|
||||
import { useFeatureFlag } from '@desktop-client/hooks/useFeatureFlag';
|
||||
|
||||
type BudgetMenuProps = Omit<
|
||||
ComponentPropsWithoutRef<typeof Menu>,
|
||||
|
||||
@@ -15,6 +15,7 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useUndo } from '@desktop-client/hooks/useUndo';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import { trackingBudget } from 'loot-core/client/queries';
|
||||
@@ -26,7 +27,6 @@ import {
|
||||
type CategoryGroupEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useUndo } from '../../../hooks/useUndo';
|
||||
import { type Binding, type SheetFields } from '../../spreadsheet';
|
||||
import { CellValue, CellValueText } from '../../spreadsheet/CellValue';
|
||||
import { useSheetValue } from '../../spreadsheet/useSheetValue';
|
||||
|
||||
@@ -2,8 +2,7 @@ import React, { type ComponentPropsWithoutRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Menu } from '@actual-app/components/menu';
|
||||
|
||||
import { useFeatureFlag } from '../../../../hooks/useFeatureFlag';
|
||||
import { useFeatureFlag } from '@desktop-client/hooks/useFeatureFlag';
|
||||
|
||||
type BudgetMonthMenuProps = Omit<
|
||||
ComponentPropsWithoutRef<typeof Menu>,
|
||||
|
||||
@@ -13,12 +13,12 @@ import { Stack } from '@actual-app/components/stack';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useLocale } from '@desktop-client/hooks/useLocale';
|
||||
import { useUndo } from '@desktop-client/hooks/useUndo';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import * as monthUtils from 'loot-core/shared/months';
|
||||
|
||||
import { useLocale } from '../../../../hooks/useLocale';
|
||||
import { useUndo } from '../../../../hooks/useUndo';
|
||||
import { NotesButton } from '../../../NotesButton';
|
||||
import { NamespaceContext } from '../../../spreadsheet/NamespaceContext';
|
||||
import { useTrackingBudget } from '../TrackingBudgetContext';
|
||||
|
||||
@@ -9,10 +9,9 @@ import { Button } from '@actual-app/components/button';
|
||||
import { styles, type CSSProperties } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import { useNavigate } from '../../hooks/useNavigate';
|
||||
|
||||
type TextLinkProps = {
|
||||
style?: CSSProperties;
|
||||
onClick?: MouseEventHandler;
|
||||
|
||||
@@ -28,11 +28,10 @@ import { TextOneLine } from '@actual-app/components/text-one-line';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { tokens } from '@actual-app/components/tokens';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useModalState } from '@desktop-client/hooks/useModalState';
|
||||
import { css } from '@emotion/css';
|
||||
import { AutoTextSize } from 'auto-text-size';
|
||||
|
||||
import { useModalState } from '../../hooks/useModalState';
|
||||
|
||||
type ModalProps = ComponentPropsWithRef<typeof ReactAriaModal> & {
|
||||
name: string;
|
||||
isLoading?: boolean;
|
||||
|
||||
@@ -14,6 +14,7 @@ import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { Tooltip } from '@actual-app/components/tooltip';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useDateFormat } from '@desktop-client/hooks/useDateFormat';
|
||||
import {
|
||||
parse as parseDate,
|
||||
format as formatDate,
|
||||
@@ -33,7 +34,6 @@ import {
|
||||
} from 'loot-core/shared/rules';
|
||||
import { titleFirst } from 'loot-core/shared/util';
|
||||
|
||||
import { useDateFormat } from '../../hooks/useDateFormat';
|
||||
import { GenericInput } from '../util/GenericInput';
|
||||
|
||||
import { CompactFiltersButton } from './CompactFiltersButton';
|
||||
|
||||
@@ -34,6 +34,8 @@ import { theme } from '@actual-app/components/theme';
|
||||
import { tokens } from '@actual-app/components/tokens';
|
||||
import { Tooltip } from '@actual-app/components/tooltip';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useInitialMount } from '@desktop-client/hooks/useInitialMount';
|
||||
import { useMetadataPref } from '@desktop-client/hooks/useMetadataPref';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import {
|
||||
@@ -58,8 +60,6 @@ import {
|
||||
type SyncedLocalFile,
|
||||
} from 'loot-core/types/file';
|
||||
|
||||
import { useInitialMount } from '../../hooks/useInitialMount';
|
||||
import { useMetadataPref } from '../../hooks/useMetadataPref';
|
||||
import { useSelector, useDispatch } from '../../redux';
|
||||
import { useMultiuserEnabled } from '../ServerContext';
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import { BigInput } from '@actual-app/components/input';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useGlobalPref } from '@desktop-client/hooks/useGlobalPref';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { createBudget } from 'loot-core/client/budgets/budgetsSlice';
|
||||
import { loggedIn, signOut } from 'loot-core/client/users/usersSlice';
|
||||
@@ -15,8 +17,6 @@ import {
|
||||
isElectron,
|
||||
} from 'loot-core/shared/environment';
|
||||
|
||||
import { useGlobalPref } from '../../hooks/useGlobalPref';
|
||||
import { useNavigate } from '../../hooks/useNavigate';
|
||||
import { useDispatch } from '../../redux';
|
||||
import { Link } from '../common/Link';
|
||||
import { useServerURL, useSetServerURL } from '../ServerContext';
|
||||
|
||||
@@ -6,13 +6,13 @@ import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { tokens } from '@actual-app/components/tokens';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useMetaThemeColor } from '@desktop-client/hooks/useMetaThemeColor';
|
||||
|
||||
import { setAppState } from 'loot-core/client/app/appSlice';
|
||||
import { loggedIn } from 'loot-core/client/users/usersSlice';
|
||||
|
||||
import { ProtectedRoute } from '../../auth/ProtectedRoute';
|
||||
import { Permissions } from '../../auth/types';
|
||||
import { useMetaThemeColor } from '../../hooks/useMetaThemeColor';
|
||||
import { useSelector, useDispatch } from '../../redux';
|
||||
import {
|
||||
BackToFileListButton,
|
||||
|
||||
@@ -7,11 +7,11 @@ import { Paragraph } from '@actual-app/components/paragraph';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { createBudget } from 'loot-core/client/budgets/budgetsSlice';
|
||||
import { send } from 'loot-core/platform/client/fetch';
|
||||
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import { useDispatch } from '../../../redux';
|
||||
import { Link } from '../../common/Link';
|
||||
import { useRefreshLoginMethods } from '../../ServerContext';
|
||||
|
||||
@@ -6,11 +6,10 @@ import { Button } from '@actual-app/components/button';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { send } from 'loot-core/platform/client/fetch';
|
||||
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
|
||||
import { Title } from './common';
|
||||
import { ConfirmPasswordForm } from './ConfirmPasswordForm';
|
||||
|
||||
|
||||
@@ -7,8 +7,7 @@ import { Button } from '@actual-app/components/button';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
function getErrorMessage(reason) {
|
||||
switch (reason) {
|
||||
|
||||
@@ -14,13 +14,13 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { loggedIn } from 'loot-core/client/users/usersSlice';
|
||||
import { send } from 'loot-core/platform/client/fetch';
|
||||
import { isElectron } from 'loot-core/shared/environment';
|
||||
import { type OpenIdConfig } from 'loot-core/types/models';
|
||||
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import { useDispatch } from '../../../redux';
|
||||
import { warningBackground } from '../../../style/themes/dark';
|
||||
import { Link } from '../../common/Link';
|
||||
|
||||
@@ -3,11 +3,11 @@ import React, { useEffect, useState } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { send } from 'loot-core/platform/client/fetch';
|
||||
import { type Handlers } from 'loot-core/types/handlers';
|
||||
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import {
|
||||
useSetLoginMethods,
|
||||
useSetMultiuserEnabled,
|
||||
|
||||
@@ -5,8 +5,7 @@ import { Button } from '@actual-app/components/button';
|
||||
import { SvgCheveronLeft } from '@actual-app/components/icons/v1';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
|
||||
import { useNavigate } from '../../hooks/useNavigate';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
type MobileBackButtonProps = ComponentPropsWithoutRef<typeof Button>;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
||||
import { useAccount } from '../../../hooks/useAccount';
|
||||
import { useSyncedPref } from '../../../hooks/useSyncedPref';
|
||||
import { useAccount } from '@desktop-client/hooks/useAccount';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
|
||||
import { AccountTransactions } from './AccountTransactions';
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccountPreviewTransactions } from '@desktop-client/hooks/useAccountPreviewTransactions';
|
||||
import { useDateFormat } from '@desktop-client/hooks/useDateFormat';
|
||||
import { useFailedAccounts } from '@desktop-client/hooks/useFailedAccounts';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { syncAndDownload } from 'loot-core/client/app/appSlice';
|
||||
import {
|
||||
@@ -41,10 +45,6 @@ import {
|
||||
type TransactionEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useAccountPreviewTransactions } from '../../../hooks/useAccountPreviewTransactions';
|
||||
import { useDateFormat } from '../../../hooks/useDateFormat';
|
||||
import { useFailedAccounts } from '../../../hooks/useFailedAccounts';
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import { useSelector, useDispatch } from '../../../redux';
|
||||
import { MobilePageHeader, Page } from '../../Page';
|
||||
import { MobileBackButton } from '../MobileBackButton';
|
||||
|
||||
@@ -25,6 +25,11 @@ import { Text } from '@actual-app/components/text';
|
||||
import { TextOneLine } from '@actual-app/components/text-one-line';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useFailedAccounts } from '@desktop-client/hooks/useFailedAccounts';
|
||||
import { useLocalPref } from '@desktop-client/hooks/useLocalPref';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import { syncAndDownload } from 'loot-core/client/app/appSlice';
|
||||
@@ -33,11 +38,6 @@ import * as queries from 'loot-core/client/queries';
|
||||
import { type AccountEntity } from 'loot-core/types/models';
|
||||
|
||||
import { moveAccount } from '../../../accounts/accountsSlice';
|
||||
import { useAccounts } from '../../../hooks/useAccounts';
|
||||
import { useFailedAccounts } from '../../../hooks/useFailedAccounts';
|
||||
import { useLocalPref } from '../../../hooks/useLocalPref';
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import { useSyncedPref } from '../../../hooks/useSyncedPref';
|
||||
import { useDispatch, useSelector } from '../../../redux';
|
||||
import { makeAmountFullStyle } from '../../budget/util';
|
||||
import { MobilePageHeader, Page } from '../../Page';
|
||||
|
||||
@@ -5,15 +5,15 @@ import { Button } from '@actual-app/components/button';
|
||||
import { type CSSProperties } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useNotes } from '@desktop-client/hooks/useNotes';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
import { useUndo } from '@desktop-client/hooks/useUndo';
|
||||
import { AutoTextSize } from 'auto-text-size';
|
||||
|
||||
import { pushModal } from 'loot-core/client/modals/modalsSlice';
|
||||
import { integerToCurrency } from 'loot-core/shared/util';
|
||||
import { type CategoryEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useNotes } from '../../../hooks/useNotes';
|
||||
import { useSyncedPref } from '../../../hooks/useSyncedPref';
|
||||
import { useUndo } from '../../../hooks/useUndo';
|
||||
import { useDispatch } from '../../../redux';
|
||||
import { makeAmountGrey } from '../../budget/util';
|
||||
import { PrivacyFilter } from '../../PrivacyFilter';
|
||||
|
||||
@@ -21,6 +21,13 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { useLocale } from '@desktop-client/hooks/useLocale';
|
||||
import { useLocalPref } from '@desktop-client/hooks/useLocalPref';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
import { useOverspentCategories } from '@desktop-client/hooks/useOverspentCategories';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
import { useUndo } from '@desktop-client/hooks/useUndo';
|
||||
import { AutoTextSize } from 'auto-text-size';
|
||||
|
||||
import { pushModal } from 'loot-core/client/modals/modalsSlice';
|
||||
@@ -32,13 +39,6 @@ import {
|
||||
import * as monthUtils from 'loot-core/shared/months';
|
||||
import { groupById } from 'loot-core/shared/util';
|
||||
|
||||
import { useCategories } from '../../../hooks/useCategories';
|
||||
import { useLocale } from '../../../hooks/useLocale';
|
||||
import { useLocalPref } from '../../../hooks/useLocalPref';
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import { useOverspentCategories } from '../../../hooks/useOverspentCategories';
|
||||
import { useSyncedPref } from '../../../hooks/useSyncedPref';
|
||||
import { useUndo } from '../../../hooks/useUndo';
|
||||
import { useDispatch } from '../../../redux';
|
||||
import { MobilePageHeader, Page } from '../../Page';
|
||||
import { PrivacyFilter } from '../../PrivacyFilter';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React from 'react';
|
||||
import { useParams, useSearchParams } from 'react-router-dom';
|
||||
|
||||
import * as monthUtils from 'loot-core/shared/months';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
|
||||
import { useCategories } from '../../../hooks/useCategories';
|
||||
import { useSyncedPref } from '../../../hooks/useSyncedPref';
|
||||
import * as monthUtils from 'loot-core/shared/months';
|
||||
|
||||
import { CategoryTransactions } from './CategoryTransactions';
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@ import React, { useCallback, useEffect, useState } from 'react';
|
||||
|
||||
import { TextOneLine } from '@actual-app/components/text-one-line';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useDateFormat } from '@desktop-client/hooks/useDateFormat';
|
||||
import { useLocale } from '@desktop-client/hooks/useLocale';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { SchedulesProvider } from 'loot-core/client/data-hooks/schedules';
|
||||
import {
|
||||
@@ -18,9 +21,6 @@ import {
|
||||
type TransactionEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useDateFormat } from '../../../hooks/useDateFormat';
|
||||
import { useLocale } from '../../../hooks/useLocale';
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import { useDispatch } from '../../../redux';
|
||||
import { MobilePageHeader, Page } from '../../Page';
|
||||
import { MobileBackButton } from '../MobileBackButton';
|
||||
|
||||
@@ -10,6 +10,7 @@ import { type CSSProperties, styles } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
import { css } from '@emotion/css';
|
||||
import { AutoTextSize } from 'auto-text-size';
|
||||
|
||||
@@ -17,7 +18,6 @@ import { envelopeBudget, trackingBudget } from 'loot-core/client/queries';
|
||||
import * as monthUtils from 'loot-core/shared/months';
|
||||
import { type CategoryGroupEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useSyncedPref } from '../../../hooks/useSyncedPref';
|
||||
import { PrivacyFilter } from '../../PrivacyFilter';
|
||||
import { CellValue } from '../../spreadsheet/CellValue';
|
||||
import { useFormat } from '../../spreadsheet/useFormat';
|
||||
|
||||
@@ -4,6 +4,10 @@ import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { AnimatedLoading } from '@actual-app/components/icons/AnimatedLoading';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { useLocale } from '@desktop-client/hooks/useLocale';
|
||||
import { useLocalPref } from '@desktop-client/hooks/useLocalPref';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
|
||||
import { sync } from 'loot-core/client/app/appSlice';
|
||||
import { collapseModals, pushModal } from 'loot-core/client/modals/modalsSlice';
|
||||
@@ -20,10 +24,6 @@ import { useSpreadsheet } from 'loot-core/client/SpreadsheetProvider';
|
||||
import { send } from 'loot-core/platform/client/fetch';
|
||||
import * as monthUtils from 'loot-core/shared/months';
|
||||
|
||||
import { useCategories } from '../../../hooks/useCategories';
|
||||
import { useLocale } from '../../../hooks/useLocale';
|
||||
import { useLocalPref } from '../../../hooks/useLocalPref';
|
||||
import { useSyncedPref } from '../../../hooks/useSyncedPref';
|
||||
import { useDispatch } from '../../../redux';
|
||||
import { prewarmMonth } from '../../budget/util';
|
||||
import { NamespaceContext } from '../../spreadsheet/NamespaceContext';
|
||||
|
||||
@@ -3,8 +3,7 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Button } from '@actual-app/components/button';
|
||||
import { SvgAdd } from '@actual-app/components/icons/v1';
|
||||
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
type AddTransactionButtonProps = {
|
||||
to?: string;
|
||||
|
||||
@@ -13,6 +13,8 @@ import { Button } from '@actual-app/components/button';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useMergedRefs } from '@desktop-client/hooks/useMergedRefs';
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
import {
|
||||
@@ -21,8 +23,6 @@ import {
|
||||
currencyToAmount,
|
||||
} from 'loot-core/shared/util';
|
||||
|
||||
import { useMergedRefs } from '../../../hooks/useMergedRefs';
|
||||
import { useSyncedPref } from '../../../hooks/useSyncedPref';
|
||||
import { makeAmountFullStyle } from '../../budget/util';
|
||||
|
||||
type AmountInputProps = {
|
||||
|
||||
@@ -23,6 +23,16 @@ import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { Toggle } from '@actual-app/components/toggle';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { useDateFormat } from '@desktop-client/hooks/useDateFormat';
|
||||
import { useInitialMount } from '@desktop-client/hooks/useInitialMount';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
import { usePayees } from '@desktop-client/hooks/usePayees';
|
||||
import {
|
||||
SingleActiveEditFormProvider,
|
||||
useSingleActiveEditForm,
|
||||
} from '@desktop-client/hooks/useSingleActiveEditForm';
|
||||
import {
|
||||
format as formatDate,
|
||||
parse as parseDate,
|
||||
@@ -56,16 +66,6 @@ import {
|
||||
groupById,
|
||||
} from 'loot-core/shared/util';
|
||||
|
||||
import { useAccounts } from '../../../hooks/useAccounts';
|
||||
import { useCategories } from '../../../hooks/useCategories';
|
||||
import { useDateFormat } from '../../../hooks/useDateFormat';
|
||||
import { useInitialMount } from '../../../hooks/useInitialMount';
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import { usePayees } from '../../../hooks/usePayees';
|
||||
import {
|
||||
SingleActiveEditFormProvider,
|
||||
useSingleActiveEditForm,
|
||||
} from '../../../hooks/useSingleActiveEditForm';
|
||||
import { useSelector, useDispatch } from '../../../redux';
|
||||
import { MobilePageHeader, Page } from '../../Page';
|
||||
import { AmountInput } from '../../util/AmountInput';
|
||||
|
||||
@@ -28,6 +28,17 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { useLocale } from '@desktop-client/hooks/useLocale';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
import { usePayees } from '@desktop-client/hooks/usePayees';
|
||||
import {
|
||||
useSelectedDispatch,
|
||||
useSelectedItems,
|
||||
} from '@desktop-client/hooks/useSelected';
|
||||
import { useTransactionBatchActions } from '@desktop-client/hooks/useTransactionBatchActions';
|
||||
import { useUndo } from '@desktop-client/hooks/useUndo';
|
||||
|
||||
import { setNotificationInset } from 'loot-core/client/notifications/notificationsSlice';
|
||||
import { validForTransfer } from 'loot-core/client/transfer';
|
||||
@@ -39,17 +50,6 @@ import {
|
||||
type TransactionEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useAccounts } from '../../../hooks/useAccounts';
|
||||
import { useCategories } from '../../../hooks/useCategories';
|
||||
import { useLocale } from '../../../hooks/useLocale';
|
||||
import { useNavigate } from '../../../hooks/useNavigate';
|
||||
import { usePayees } from '../../../hooks/usePayees';
|
||||
import {
|
||||
useSelectedDispatch,
|
||||
useSelectedItems,
|
||||
} from '../../../hooks/useSelected';
|
||||
import { useTransactionBatchActions } from '../../../hooks/useTransactionBatchActions';
|
||||
import { useUndo } from '../../../hooks/useUndo';
|
||||
import { useDispatch } from '../../../redux';
|
||||
import { useScrollListener } from '../../ScrollProvider';
|
||||
import { FloatingActionBar } from '../FloatingActionBar';
|
||||
|
||||
@@ -23,6 +23,10 @@ import { Text } from '@actual-app/components/text';
|
||||
import { TextOneLine } from '@actual-app/components/text-one-line';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccount } from '@desktop-client/hooks/useAccount';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { useDisplayPayee } from '@desktop-client/hooks/useDisplayPayee';
|
||||
import { usePayee } from '@desktop-client/hooks/usePayee';
|
||||
import {
|
||||
PressResponder,
|
||||
usePress,
|
||||
@@ -37,10 +41,6 @@ import {
|
||||
type TransactionEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { useAccount } from '../../../hooks/useAccount';
|
||||
import { useCategories } from '../../../hooks/useCategories';
|
||||
import { useDisplayPayee } from '../../../hooks/useDisplayPayee';
|
||||
import { usePayee } from '../../../hooks/usePayee';
|
||||
import { useSelector } from '../../../redux';
|
||||
import { makeAmountFullStyle } from '../../budget/util';
|
||||
|
||||
|
||||
@@ -5,13 +5,16 @@ import { Label } from '@actual-app/components/label';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import {
|
||||
SelectedProvider,
|
||||
useSelected,
|
||||
} from '@desktop-client/hooks/useSelected';
|
||||
|
||||
import {
|
||||
type AccountEntity,
|
||||
type TransactionEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { SelectedProvider, useSelected } from '../../../hooks/useSelected';
|
||||
import { Search } from '../../common/Search';
|
||||
import type { Binding, SheetNames, SheetFields } from '../../spreadsheet';
|
||||
import { CellValue, CellValueText } from '../../spreadsheet/CellValue';
|
||||
|
||||
@@ -19,13 +19,13 @@ import { Popover } from '@actual-app/components/popover';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccount } from '@desktop-client/hooks/useAccount';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useNotes } from '@desktop-client/hooks/useNotes';
|
||||
|
||||
import { type Modal as ModalType } from 'loot-core/client/modals/modalsSlice';
|
||||
import { type AccountEntity } from 'loot-core/types/models';
|
||||
|
||||
import { useAccount } from '../../hooks/useAccount';
|
||||
import { useAccounts } from '../../hooks/useAccounts';
|
||||
import { useNotes } from '../../hooks/useNotes';
|
||||
import {
|
||||
Modal,
|
||||
ModalCloseButton,
|
||||
|
||||
@@ -3,8 +3,8 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useMetadataPref } from '@desktop-client/hooks/useMetadataPref';
|
||||
|
||||
import { useMetadataPref } from '../../hooks/useMetadataPref';
|
||||
import { useSelector } from '../../redux';
|
||||
import { Modal, ModalHeader, ModalCloseButton } from '../common/Modal';
|
||||
import { BudgetFileSelection } from '../manager/BudgetFileSelection';
|
||||
|
||||
@@ -7,10 +7,10 @@ import { useTranslation } from 'react-i18next';
|
||||
import { Menu } from '@actual-app/components/menu';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { useLocalPref } from '@desktop-client/hooks/useLocalPref';
|
||||
|
||||
import { type Modal as ModalType } from 'loot-core/client/modals/modalsSlice';
|
||||
|
||||
import { useLocalPref } from '../../hooks/useLocalPref';
|
||||
import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal';
|
||||
|
||||
type BudgetPageMenuModalProps = Extract<
|
||||
|
||||
@@ -23,11 +23,11 @@ import { Popover } from '@actual-app/components/popover';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
import { useNotes } from '@desktop-client/hooks/useNotes';
|
||||
|
||||
import { type Modal as ModalType } from 'loot-core/client/modals/modalsSlice';
|
||||
|
||||
import { useCategories } from '../../hooks/useCategories';
|
||||
import { useNotes } from '../../hooks/useNotes';
|
||||
import {
|
||||
Modal,
|
||||
ModalCloseButton,
|
||||
|
||||
@@ -17,12 +17,12 @@ import { Popover } from '@actual-app/components/popover';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useCategory } from '@desktop-client/hooks/useCategory';
|
||||
import { useCategoryGroup } from '@desktop-client/hooks/useCategoryGroup';
|
||||
import { useNotes } from '@desktop-client/hooks/useNotes';
|
||||
|
||||
import { type Modal as ModalType } from 'loot-core/client/modals/modalsSlice';
|
||||
|
||||
import { useCategory } from '../../hooks/useCategory';
|
||||
import { useCategoryGroup } from '../../hooks/useCategoryGroup';
|
||||
import { useNotes } from '../../hooks/useNotes';
|
||||
import {
|
||||
Modal,
|
||||
ModalCloseButton,
|
||||
|
||||
@@ -11,6 +11,8 @@ import { styles } from '@actual-app/components/styles';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
|
||||
import {
|
||||
type Modal as ModalType,
|
||||
@@ -21,8 +23,6 @@ import { integerToCurrency } from 'loot-core/shared/util';
|
||||
import { type AccountEntity } from 'loot-core/types/models';
|
||||
import { type TransObjectLiteral } from 'loot-core/types/util';
|
||||
|
||||
import { useAccounts } from '../../hooks/useAccounts';
|
||||
import { useCategories } from '../../hooks/useCategories';
|
||||
import { useDispatch } from '../../redux';
|
||||
import { AccountAutocomplete } from '../autocomplete/AccountAutocomplete';
|
||||
import { CategoryAutocomplete } from '../autocomplete/CategoryAutocomplete';
|
||||
|
||||
@@ -7,10 +7,10 @@ import { Button } from '@actual-app/components/button';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
|
||||
import { type Modal as ModalType } from 'loot-core/client/modals/modalsSlice';
|
||||
|
||||
import { useCategories } from '../../hooks/useCategories';
|
||||
import { CategoryAutocomplete } from '../autocomplete/CategoryAutocomplete';
|
||||
import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal';
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ import { Trans, useTranslation } from 'react-i18next';
|
||||
import { Button } from '@actual-app/components/button';
|
||||
import { styles } from '@actual-app/components/styles';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useCategories } from '@desktop-client/hooks/useCategories';
|
||||
|
||||
import {
|
||||
type Modal as ModalType,
|
||||
pushModal,
|
||||
} from 'loot-core/client/modals/modalsSlice';
|
||||
|
||||
import { useCategories } from '../../hooks/useCategories';
|
||||
import { useDispatch } from '../../redux';
|
||||
import {
|
||||
addToBeBudgetedGroup,
|
||||
|
||||
@@ -11,6 +11,11 @@ import { Popover } from '@actual-app/components/popover';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useFeatureFlag } from '@desktop-client/hooks/useFeatureFlag';
|
||||
import { useGoCardlessStatus } from '@desktop-client/hooks/useGoCardlessStatus';
|
||||
import { usePluggyAiStatus } from '@desktop-client/hooks/usePluggyAiStatus';
|
||||
import { useSimpleFinStatus } from '@desktop-client/hooks/useSimpleFinStatus';
|
||||
import { useSyncServerStatus } from '@desktop-client/hooks/useSyncServerStatus';
|
||||
|
||||
import {
|
||||
type Modal as ModalType,
|
||||
@@ -22,11 +27,6 @@ import { send } from 'loot-core/platform/client/fetch';
|
||||
import { useAuth } from '../../auth/AuthProvider';
|
||||
import { Permissions } from '../../auth/types';
|
||||
import { authorizeBank } from '../../gocardless';
|
||||
import { useFeatureFlag } from '../../hooks/useFeatureFlag';
|
||||
import { useGoCardlessStatus } from '../../hooks/useGoCardlessStatus';
|
||||
import { usePluggyAiStatus } from '../../hooks/usePluggyAiStatus';
|
||||
import { useSimpleFinStatus } from '../../hooks/useSimpleFinStatus';
|
||||
import { useSyncServerStatus } from '../../hooks/useSyncServerStatus';
|
||||
import { useDispatch } from '../../redux';
|
||||
import { Warning } from '../alerts';
|
||||
import { Link } from '../common/Link';
|
||||
|
||||
@@ -11,13 +11,13 @@ import { Input } from '@actual-app/components/input';
|
||||
import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import * as useAccounts from '@desktop-client/hooks/useAccounts';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
|
||||
import { closeModal } from 'loot-core/client/modals/modalsSlice';
|
||||
import { createAccount } from 'loot-core/client/queries/queriesSlice';
|
||||
import { toRelaxedNumber } from 'loot-core/shared/util';
|
||||
|
||||
import * as useAccounts from '../../hooks/useAccounts';
|
||||
import { useNavigate } from '../../hooks/useNavigate';
|
||||
import { useDispatch } from '../../redux';
|
||||
import { Link } from '../common/Link';
|
||||
import {
|
||||
|
||||
@@ -11,13 +11,13 @@ import { useResponsive } from '@actual-app/components/hooks/useResponsive';
|
||||
import { Input } from '@actual-app/components/input';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useDateFormat } from '@desktop-client/hooks/useDateFormat';
|
||||
import { parseISO, format as formatDate, parse as parseDate } from 'date-fns';
|
||||
|
||||
import { type Modal as ModalType } from 'loot-core/client/modals/modalsSlice';
|
||||
import { currentDay, dayFromDate } from 'loot-core/shared/months';
|
||||
import { amountToInteger } from 'loot-core/shared/util';
|
||||
|
||||
import { useDateFormat } from '../../hooks/useDateFormat';
|
||||
import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal';
|
||||
import { SectionLabel } from '../forms';
|
||||
import { DateSelect } from '../select/DateSelect';
|
||||
|
||||
@@ -20,6 +20,12 @@ import { Text } from '@actual-app/components/text';
|
||||
import { theme } from '@actual-app/components/theme';
|
||||
import { Tooltip } from '@actual-app/components/tooltip';
|
||||
import { View } from '@actual-app/components/view';
|
||||
import { useDateFormat } from '@desktop-client/hooks/useDateFormat';
|
||||
import { useFeatureFlag } from '@desktop-client/hooks/useFeatureFlag';
|
||||
import {
|
||||
useSelected,
|
||||
SelectedProvider,
|
||||
} from '@desktop-client/hooks/useSelected';
|
||||
import { css } from '@emotion/css';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
@@ -48,9 +54,6 @@ import {
|
||||
amountToInteger,
|
||||
} from 'loot-core/shared/util';
|
||||
|
||||
import { useDateFormat } from '../../hooks/useDateFormat';
|
||||
import { useFeatureFlag } from '../../hooks/useFeatureFlag';
|
||||
import { useSelected, SelectedProvider } from '../../hooks/useSelected';
|
||||
import { useDispatch } from '../../redux';
|
||||
import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal';
|
||||
import { StatusBadge } from '../schedules/StatusBadge';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user