Sort import in alphabetical order (#238)
* style: enforce sorting of imports * style: alphabetize imports * style: merge duplicated imports
This commit is contained in:
parent
dc53a74459
commit
9c0df36e16
194 changed files with 745 additions and 742 deletions
|
@ -11,6 +11,10 @@ module.exports = {
|
||||||
'import/order': [
|
'import/order': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
|
alphabetize: {
|
||||||
|
caseInsensitive: true,
|
||||||
|
order: 'asc'
|
||||||
|
},
|
||||||
groups: [
|
groups: [
|
||||||
'builtin', // Built-in types are first
|
'builtin', // Built-in types are first
|
||||||
'external',
|
'external',
|
||||||
|
|
|
@ -11,12 +11,12 @@ import {
|
||||||
import { styles, hasHiddenScrollbars } from 'loot-design/src/style';
|
import { styles, hasHiddenScrollbars } from 'loot-design/src/style';
|
||||||
|
|
||||||
import installPolyfills from '../polyfills';
|
import installPolyfills from '../polyfills';
|
||||||
import FatalError from './FatalError';
|
|
||||||
import ManagementApp from './manager/ManagementApp';
|
|
||||||
import FinancesApp from './FinancesApp';
|
|
||||||
import AppBackground from './AppBackground';
|
import AppBackground from './AppBackground';
|
||||||
import UpdateNotification from './UpdateNotification';
|
import FatalError from './FatalError';
|
||||||
|
import FinancesApp from './FinancesApp';
|
||||||
|
import ManagementApp from './manager/ManagementApp';
|
||||||
import MobileWebMessage from './MobileWebMessage';
|
import MobileWebMessage from './MobileWebMessage';
|
||||||
|
import UpdateNotification from './UpdateNotification';
|
||||||
|
|
||||||
class App extends React.Component {
|
class App extends React.Component {
|
||||||
state = {
|
state = {
|
||||||
|
|
|
@ -3,8 +3,8 @@ import React from 'react';
|
||||||
import { css } from 'glamor';
|
import { css } from 'glamor';
|
||||||
|
|
||||||
import { View, Block } from 'loot-design/src/components/common';
|
import { View, Block } from 'loot-design/src/components/common';
|
||||||
import AnimatedLoading from 'loot-design/src/svg/v1/AnimatedLoading';
|
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
|
import AnimatedLoading from 'loot-design/src/svg/v1/AnimatedLoading';
|
||||||
|
|
||||||
import Background from './Background';
|
import Background from './Background';
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@ import React from 'react';
|
||||||
|
|
||||||
import CodeMirror from 'codemirror';
|
import CodeMirror from 'codemirror';
|
||||||
|
|
||||||
|
import * as spreadsheet from 'loot-core/src/client/sheetql/spreadsheet';
|
||||||
import {
|
import {
|
||||||
send,
|
send,
|
||||||
init as initConnection
|
init as initConnection
|
||||||
} from 'loot-core/src/platform/client/fetch';
|
} from 'loot-core/src/platform/client/fetch';
|
||||||
import * as spreadsheet from 'loot-core/src/client/sheetql/spreadsheet';
|
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Button,
|
Button,
|
||||||
|
|
|
@ -1,42 +1,41 @@
|
||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import { Router, Route, Redirect, Switch, useLocation } from 'react-router-dom';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { DndProvider } from 'react-dnd';
|
import { DndProvider } from 'react-dnd';
|
||||||
import Backend from 'react-dnd-html5-backend';
|
import Backend from 'react-dnd-html5-backend';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { Router, Route, Redirect, Switch, useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
import { createBrowserHistory } from 'history';
|
import { createBrowserHistory } from 'history';
|
||||||
import hotkeys from 'hotkeys-js';
|
import hotkeys from 'hotkeys-js';
|
||||||
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
|
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 { SpreadsheetProvider } from 'loot-core/src/client/SpreadsheetProvider';
|
||||||
import checkForUpgradeNotifications from 'loot-core/src/client/upgrade-notifications';
|
import checkForUpgradeNotifications from 'loot-core/src/client/upgrade-notifications';
|
||||||
import { colors } from 'loot-design/src/style';
|
|
||||||
import { View } from 'loot-design/src/components/common';
|
|
||||||
import { BudgetMonthCountProvider } from 'loot-design/src/components/budget/BudgetMonthCountContext';
|
|
||||||
import * as undo from 'loot-core/src/platform/client/undo';
|
import * as undo from 'loot-core/src/platform/client/undo';
|
||||||
import { PayeesProvider } from 'loot-core/src/client/data-hooks/payees';
|
import { BudgetMonthCountProvider } from 'loot-design/src/components/budget/BudgetMonthCountContext';
|
||||||
import { AccountsProvider } from 'loot-core/src/client/data-hooks/accounts';
|
import { View } from 'loot-design/src/components/common';
|
||||||
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
import { getLocationState } from '../util/location-state';
|
import { getLocationState, makeLocationState } from '../util/location-state';
|
||||||
import { makeLocationState } from '../util/location-state';
|
import Account from './accounts/Account';
|
||||||
import { PageTypeProvider } from './Page';
|
|
||||||
import { ActiveLocationProvider } from './ActiveLocation';
|
import { ActiveLocationProvider } from './ActiveLocation';
|
||||||
import BankSyncStatus from './BankSyncStatus';
|
import BankSyncStatus from './BankSyncStatus';
|
||||||
import Titlebar, { TitlebarProvider } from './Titlebar';
|
|
||||||
import FloatableSidebar, { SidebarProvider } from './FloatableSidebar';
|
|
||||||
import Account from './accounts/Account';
|
|
||||||
import Budget from './budget';
|
import Budget from './budget';
|
||||||
import Reports from './reports';
|
import FloatableSidebar, { SidebarProvider } from './FloatableSidebar';
|
||||||
import Schedules from './schedules';
|
import GlobalKeys from './GlobalKeys';
|
||||||
import EditSchedule from './schedules/EditSchedule';
|
|
||||||
import LinkSchedule from './schedules/LinkSchedule';
|
|
||||||
import DiscoverSchedules from './schedules/DiscoverSchedules';
|
|
||||||
import PostsOfflineNotification from './schedules/PostsOfflineNotification';
|
|
||||||
import FixSplitsTool from './tools/FixSplitsTool';
|
|
||||||
import Settings from './Settings';
|
|
||||||
import Modals from './Modals';
|
import Modals from './Modals';
|
||||||
import Notifications from './Notifications';
|
import Notifications from './Notifications';
|
||||||
import GlobalKeys from './GlobalKeys';
|
import { PageTypeProvider } from './Page';
|
||||||
|
import Reports from './reports';
|
||||||
|
import Schedules from './schedules';
|
||||||
|
import DiscoverSchedules from './schedules/DiscoverSchedules';
|
||||||
|
import EditSchedule from './schedules/EditSchedule';
|
||||||
|
import LinkSchedule from './schedules/LinkSchedule';
|
||||||
|
import PostsOfflineNotification from './schedules/PostsOfflineNotification';
|
||||||
|
import Settings from './Settings';
|
||||||
|
import Titlebar, { TitlebarProvider } from './Titlebar';
|
||||||
|
import FixSplitsTool from './tools/FixSplitsTool';
|
||||||
// import Debugger from './Debugger';
|
// import Debugger from './Debugger';
|
||||||
|
|
||||||
function URLBar() {
|
function URLBar() {
|
||||||
|
|
|
@ -2,30 +2,30 @@ import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { Route, Switch } from 'react-router-dom';
|
import { Route, Switch } from 'react-router-dom';
|
||||||
|
|
||||||
import { bindActionCreators } from 'redux';
|
|
||||||
import { createLocation } from 'history';
|
|
||||||
import Component from '@reactions/component';
|
import Component from '@reactions/component';
|
||||||
|
import { createLocation } from 'history';
|
||||||
|
import { bindActionCreators } from 'redux';
|
||||||
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
import { send, listen, unlisten } from 'loot-core/src/platform/client/fetch';
|
import { send, listen, unlisten } from 'loot-core/src/platform/client/fetch';
|
||||||
import CreateLocalAccount from 'loot-design/src/components/modals/CreateLocalAccount';
|
|
||||||
import CloseAccount from 'loot-design/src/components/modals/CloseAccount';
|
import CloseAccount from 'loot-design/src/components/modals/CloseAccount';
|
||||||
import SelectLinkedAccounts from 'loot-design/src/components/modals/SelectLinkedAccounts';
|
|
||||||
import ConfigureLinkedAccounts from 'loot-design/src/components/modals/ConfigureLinkedAccounts';
|
import ConfigureLinkedAccounts from 'loot-design/src/components/modals/ConfigureLinkedAccounts';
|
||||||
|
import CreateLocalAccount from 'loot-design/src/components/modals/CreateLocalAccount';
|
||||||
|
import EditField from 'loot-design/src/components/modals/EditField';
|
||||||
|
import ImportTransactions from 'loot-design/src/components/modals/ImportTransactions';
|
||||||
import LoadBackup from 'loot-design/src/components/modals/LoadBackup';
|
import LoadBackup from 'loot-design/src/components/modals/LoadBackup';
|
||||||
import PlaidExternalMsg from 'loot-design/src/components/modals/PlaidExternalMsg';
|
import PlaidExternalMsg from 'loot-design/src/components/modals/PlaidExternalMsg';
|
||||||
import ImportTransactions from 'loot-design/src/components/modals/ImportTransactions';
|
import SelectLinkedAccounts from 'loot-design/src/components/modals/SelectLinkedAccounts';
|
||||||
import EditField from 'loot-design/src/components/modals/EditField';
|
|
||||||
|
|
||||||
import CreateAccount from './modals/CreateAccount';
|
|
||||||
import ManagePayeesWithData from './payees/ManagePayeesWithData';
|
|
||||||
import ManageRules from './modals/ManageRules';
|
|
||||||
import EditRule from './modals/EditRule';
|
|
||||||
import MergeUnusedPayees from './modals/MergeUnusedPayees';
|
|
||||||
import ConfirmCategoryDelete from './modals/ConfirmCategoryDelete';
|
import ConfirmCategoryDelete from './modals/ConfirmCategoryDelete';
|
||||||
import WelcomeScreen from './modals/WelcomeScreen';
|
import CreateAccount from './modals/CreateAccount';
|
||||||
import CreateEncryptionKey from './modals/CreateEncryptionKey';
|
import CreateEncryptionKey from './modals/CreateEncryptionKey';
|
||||||
|
import EditRule from './modals/EditRule';
|
||||||
import FixEncryptionKey from './modals/FixEncryptionKey';
|
import FixEncryptionKey from './modals/FixEncryptionKey';
|
||||||
|
import ManageRules from './modals/ManageRules';
|
||||||
|
import MergeUnusedPayees from './modals/MergeUnusedPayees';
|
||||||
|
import WelcomeScreen from './modals/WelcomeScreen';
|
||||||
|
import ManagePayeesWithData from './payees/ManagePayeesWithData';
|
||||||
|
|
||||||
function Modals({
|
function Modals({
|
||||||
history,
|
history,
|
||||||
|
|
|
@ -12,9 +12,9 @@ import {
|
||||||
Stack,
|
Stack,
|
||||||
ExternalLink
|
ExternalLink
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
|
import { styles, colors } from 'loot-design/src/style';
|
||||||
import Delete from 'loot-design/src/svg/Delete';
|
import Delete from 'loot-design/src/svg/Delete';
|
||||||
import Loading from 'loot-design/src/svg/v1/AnimatedLoading';
|
import Loading from 'loot-design/src/svg/v1/AnimatedLoading';
|
||||||
import { styles, colors } from 'loot-design/src/style';
|
|
||||||
|
|
||||||
function compileMessage(message, actions, setLoading, onRemove) {
|
function compileMessage(message, actions, setLoading, onRemove) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -5,6 +5,10 @@ import { Route, Switch, Redirect } from 'react-router-dom';
|
||||||
import { css } from 'glamor';
|
import { css } from 'glamor';
|
||||||
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
|
import Platform from 'loot-core/src/client/platform';
|
||||||
|
import { send, listen } from 'loot-core/src/platform/client/fetch';
|
||||||
|
import { numberFormats } from 'loot-core/src/shared/util';
|
||||||
|
import { Information } from 'loot-design/src/components/alerts';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -12,12 +16,8 @@ import {
|
||||||
ButtonWithLoading,
|
ButtonWithLoading,
|
||||||
AnchorLink
|
AnchorLink
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import { send, listen } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import { numberFormats } from 'loot-core/src/shared/util';
|
|
||||||
import { styles, colors } from 'loot-design/src/style';
|
import { styles, colors } from 'loot-design/src/style';
|
||||||
import { Information } from 'loot-design/src/components/alerts';
|
|
||||||
import ExpandArrow from 'loot-design/src/svg/ExpandArrow';
|
import ExpandArrow from 'loot-design/src/svg/ExpandArrow';
|
||||||
import Platform from 'loot-core/src/client/platform';
|
|
||||||
|
|
||||||
import useServerVersion from '../hooks/useServerVersion';
|
import useServerVersion from '../hooks/useServerVersion';
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,9 @@ import { withRouter } from 'react-router-dom';
|
||||||
|
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
|
|
||||||
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
|
import * as queries from 'loot-core/src/client/queries';
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import { styles, colors } from 'loot-design/src/style';
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Input,
|
Input,
|
||||||
|
@ -13,8 +14,7 @@ import {
|
||||||
Text
|
Text
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import { Sidebar } from 'loot-design/src/components/sidebar';
|
import { Sidebar } from 'loot-design/src/components/sidebar';
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import { styles, colors } from 'loot-design/src/style';
|
||||||
import * as queries from 'loot-core/src/client/queries';
|
|
||||||
|
|
||||||
function EditableBudgetName({ prefs, savePrefs }) {
|
function EditableBudgetName({ prefs, savePrefs }) {
|
||||||
const [editing, setEditing] = useState(false);
|
const [editing, setEditing] = useState(false);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import Cell from 'loot-design/src/components/spreadsheet/Cell';
|
|
||||||
import { View } from 'loot-design/src/components/common';
|
import { View } from 'loot-design/src/components/common';
|
||||||
|
import Cell from 'loot-design/src/components/spreadsheet/Cell';
|
||||||
|
|
||||||
function SpreadsheetInterface() {
|
function SpreadsheetInterface() {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
import React, { useState, useEffect, useRef, useContext } from 'react';
|
import React, { useState, useEffect, useRef, useContext } from 'react';
|
||||||
import { Switch, Route, withRouter } from 'react-router-dom';
|
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
import { Switch, Route, withRouter } from 'react-router-dom';
|
||||||
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
|
import Platform from 'loot-core/src/client/platform';
|
||||||
import * as queries from 'loot-core/src/client/queries';
|
import * as queries from 'loot-core/src/client/queries';
|
||||||
import { listen } from 'loot-core/src/platform/client/fetch';
|
import { listen } from 'loot-core/src/platform/client/fetch';
|
||||||
import Platform from 'loot-core/src/client/platform';
|
|
||||||
import { colors } from 'loot-design/src/style';
|
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -17,16 +16,17 @@ import {
|
||||||
P
|
P
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import SheetValue from 'loot-design/src/components/spreadsheet/SheetValue';
|
import SheetValue from 'loot-design/src/components/spreadsheet/SheetValue';
|
||||||
import ArrowButtonRight1 from 'loot-design/src/svg/v2/ArrowButtonRight1';
|
import { colors } from 'loot-design/src/style';
|
||||||
import NavigationMenu from 'loot-design/src/svg/v2/NavigationMenu';
|
|
||||||
import ArrowLeft from 'loot-design/src/svg/v1/ArrowLeft';
|
import ArrowLeft from 'loot-design/src/svg/v1/ArrowLeft';
|
||||||
import AlertTriangle from 'loot-design/src/svg/v2/AlertTriangle';
|
import AlertTriangle from 'loot-design/src/svg/v2/AlertTriangle';
|
||||||
|
import ArrowButtonRight1 from 'loot-design/src/svg/v2/ArrowButtonRight1';
|
||||||
|
import NavigationMenu from 'loot-design/src/svg/v2/NavigationMenu';
|
||||||
|
|
||||||
import { MonthCountSelector } from './budget/MonthCountSelector';
|
|
||||||
import AccountSyncCheck from './accounts/AccountSyncCheck';
|
import AccountSyncCheck from './accounts/AccountSyncCheck';
|
||||||
import LoggedInUser from './LoggedInUser';
|
|
||||||
import AnimatedRefresh from './AnimatedRefresh';
|
import AnimatedRefresh from './AnimatedRefresh';
|
||||||
|
import { MonthCountSelector } from './budget/MonthCountSelector';
|
||||||
import { useSidebar } from './FloatableSidebar';
|
import { useSidebar } from './FloatableSidebar';
|
||||||
|
import LoggedInUser from './LoggedInUser';
|
||||||
|
|
||||||
export let TitlebarContext = React.createContext();
|
export let TitlebarContext = React.createContext();
|
||||||
|
|
||||||
|
|
|
@ -7,17 +7,17 @@ import { bindActionCreators } from 'redux';
|
||||||
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
|
|
||||||
import Intro from './tutorial/Intro';
|
|
||||||
import BudgetSummary from './tutorial/BudgetSummary';
|
|
||||||
import BudgetCategories from './tutorial/BudgetCategories';
|
import BudgetCategories from './tutorial/BudgetCategories';
|
||||||
import BudgetInitial from './tutorial/BudgetInitial';
|
import BudgetInitial from './tutorial/BudgetInitial';
|
||||||
|
import BudgetNewIncome from './tutorial/BudgetNewIncome';
|
||||||
|
import BudgetNextMonth from './tutorial/BudgetNextMonth';
|
||||||
|
import BudgetSummary from './tutorial/BudgetSummary';
|
||||||
|
import CategoryBalance from './tutorial/CategoryBalance';
|
||||||
|
import Final from './tutorial/Final';
|
||||||
|
import Intro from './tutorial/Intro';
|
||||||
|
import Overspending from './tutorial/Overspending';
|
||||||
import TransactionAdd from './tutorial/TransactionAdd';
|
import TransactionAdd from './tutorial/TransactionAdd';
|
||||||
import TransactionEnter from './tutorial/TransactionEnter';
|
import TransactionEnter from './tutorial/TransactionEnter';
|
||||||
import BudgetNewIncome from './tutorial/BudgetNewIncome';
|
|
||||||
import CategoryBalance from './tutorial/CategoryBalance';
|
|
||||||
import Overspending from './tutorial/Overspending';
|
|
||||||
import BudgetNextMonth from './tutorial/BudgetNextMonth';
|
|
||||||
import Final from './tutorial/Final';
|
|
||||||
|
|
||||||
function generatePath(innerRect, outerRect) {
|
function generatePath(innerRect, outerRect) {
|
||||||
const i = innerRect;
|
const i = innerRect;
|
||||||
|
|
|
@ -2,11 +2,27 @@ import React, { useState, useEffect, useRef, useMemo } from 'react';
|
||||||
import { useSelector, useDispatch } from 'react-redux';
|
import { useSelector, useDispatch } from 'react-redux';
|
||||||
import { Redirect, useParams, useHistory, useLocation } from 'react-router-dom';
|
import { Redirect, useParams, useHistory, useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
import { bindActionCreators } from 'redux';
|
|
||||||
import { debounce } from 'debounce';
|
import { debounce } from 'debounce';
|
||||||
|
import { bindActionCreators } from 'redux';
|
||||||
|
|
||||||
import { send, listen } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
|
import {
|
||||||
|
SchedulesProvider,
|
||||||
|
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 { send, listen } from 'loot-core/src/platform/client/fetch';
|
||||||
|
import {
|
||||||
|
deleteTransaction,
|
||||||
|
updateTransaction,
|
||||||
|
ungroupTransactions
|
||||||
|
} from 'loot-core/src/shared/transactions';
|
||||||
|
import {
|
||||||
|
currencyToInteger,
|
||||||
|
applyChanges,
|
||||||
|
groupById
|
||||||
|
} from 'loot-core/src/shared/util';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -18,46 +34,30 @@ import {
|
||||||
Menu,
|
Menu,
|
||||||
Stack
|
Stack
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import {
|
import { KeyHandlers } from 'loot-design/src/components/KeyHandlers';
|
||||||
currencyToInteger,
|
import CellValue from 'loot-design/src/components/spreadsheet/CellValue';
|
||||||
applyChanges,
|
|
||||||
groupById
|
|
||||||
} from 'loot-core/src/shared/util';
|
|
||||||
import DotsHorizontalTriple from 'loot-design/src/svg/v1/DotsHorizontalTriple';
|
|
||||||
import Pencil1 from 'loot-design/src/svg/v2/Pencil1';
|
|
||||||
import SearchAlternate from 'loot-design/src/svg/v2/SearchAlternate';
|
|
||||||
import DownloadThickBottom from 'loot-design/src/svg/v2/DownloadThickBottom';
|
|
||||||
import Add from 'loot-design/src/svg/v1/Add';
|
|
||||||
import format from 'loot-design/src/components/spreadsheet/format';
|
import format from 'loot-design/src/components/spreadsheet/format';
|
||||||
import useSheetValue from 'loot-design/src/components/spreadsheet/useSheetValue';
|
import useSheetValue from 'loot-design/src/components/spreadsheet/useSheetValue';
|
||||||
import CellValue from 'loot-design/src/components/spreadsheet/CellValue';
|
|
||||||
import ArrowButtonRight1 from 'loot-design/src/svg/v2/ArrowButtonRight1';
|
|
||||||
import CheckCircle1 from 'loot-design/src/svg/v2/CheckCircle1';
|
|
||||||
import Loading from 'loot-design/src/svg/v1/AnimatedLoading';
|
|
||||||
import ArrowsExpand3 from 'loot-design/src/svg/v2/ArrowsExpand3';
|
|
||||||
import ArrowsShrink3 from 'loot-design/src/svg/v2/ArrowsShrink3';
|
|
||||||
import * as queries from 'loot-core/src/client/queries';
|
|
||||||
import q, { runQuery, pagedQuery } from 'loot-core/src/client/query-helpers';
|
|
||||||
import { SelectedItemsButton } from 'loot-design/src/components/table';
|
import { SelectedItemsButton } from 'loot-design/src/components/table';
|
||||||
import {
|
|
||||||
deleteTransaction,
|
|
||||||
updateTransaction,
|
|
||||||
ungroupTransactions
|
|
||||||
} from 'loot-core/src/shared/transactions';
|
|
||||||
import { styles, colors } from 'loot-design/src/style';
|
|
||||||
import {
|
import {
|
||||||
SelectedProviderWithItems,
|
SelectedProviderWithItems,
|
||||||
useSelectedItems
|
useSelectedItems
|
||||||
} from 'loot-design/src/components/useSelected';
|
} from 'loot-design/src/components/useSelected';
|
||||||
import { KeyHandlers } from 'loot-design/src/components/KeyHandlers';
|
import { styles, colors } from 'loot-design/src/style';
|
||||||
import {
|
import Add from 'loot-design/src/svg/v1/Add';
|
||||||
SchedulesProvider,
|
import Loading from 'loot-design/src/svg/v1/AnimatedLoading';
|
||||||
useCachedSchedules
|
import DotsHorizontalTriple from 'loot-design/src/svg/v1/DotsHorizontalTriple';
|
||||||
} from 'loot-core/src/client/data-hooks/schedules';
|
import ArrowButtonRight1 from 'loot-design/src/svg/v2/ArrowButtonRight1';
|
||||||
|
import ArrowsExpand3 from 'loot-design/src/svg/v2/ArrowsExpand3';
|
||||||
|
import ArrowsShrink3 from 'loot-design/src/svg/v2/ArrowsShrink3';
|
||||||
|
import CheckCircle1 from 'loot-design/src/svg/v2/CheckCircle1';
|
||||||
|
import DownloadThickBottom from 'loot-design/src/svg/v2/DownloadThickBottom';
|
||||||
|
import Pencil1 from 'loot-design/src/svg/v2/Pencil1';
|
||||||
|
import SearchAlternate from 'loot-design/src/svg/v2/SearchAlternate';
|
||||||
|
|
||||||
import { authorizeBank } from '../../plaid';
|
import { authorizeBank } from '../../plaid';
|
||||||
import AnimatedRefresh from '../AnimatedRefresh';
|
|
||||||
import { useActiveLocation } from '../ActiveLocation';
|
import { useActiveLocation } from '../ActiveLocation';
|
||||||
|
import AnimatedRefresh from '../AnimatedRefresh';
|
||||||
import { FilterButton, AppliedFilters } from './Filters';
|
import { FilterButton, AppliedFilters } from './Filters';
|
||||||
import TransactionList from './TransactionList';
|
import TransactionList from './TransactionList';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { connect } from 'react-redux';
|
||||||
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
import { View, Button, Tooltip } from 'loot-design/src/components/common';
|
import { View, Button, Tooltip } from 'loot-design/src/components/common';
|
||||||
import ExclamationOutline from 'loot-design/src/svg/v1/ExclamationOutline';
|
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
|
import ExclamationOutline from 'loot-design/src/svg/v1/ExclamationOutline';
|
||||||
|
|
||||||
import { reauthorizeBank } from '../../plaid';
|
import { reauthorizeBank } from '../../plaid';
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,15 @@
|
||||||
import React, { useState, useRef, useEffect, useReducer } from 'react';
|
import React, { useState, useRef, useEffect, useReducer } from 'react';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
|
|
||||||
import scopeTab from 'react-modal/lib/helpers/scopeTab';
|
|
||||||
import {
|
import {
|
||||||
parse as parseDate,
|
parse as parseDate,
|
||||||
format as formatDate,
|
format as formatDate,
|
||||||
isValid as isDateValid
|
isValid as isDateValid
|
||||||
} from 'date-fns';
|
} from 'date-fns';
|
||||||
|
import scopeTab from 'react-modal/lib/helpers/scopeTab';
|
||||||
|
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import { getMonthYearFormat } from 'loot-core/src/shared/months';
|
import { getMonthYearFormat } from 'loot-core/src/shared/months';
|
||||||
import { titleFirst } from 'loot-core/src/shared/util';
|
|
||||||
import {
|
|
||||||
View,
|
|
||||||
Text,
|
|
||||||
Tooltip,
|
|
||||||
Stack,
|
|
||||||
Button,
|
|
||||||
Menu,
|
|
||||||
CustomSelect
|
|
||||||
} from 'loot-design/src/components/common';
|
|
||||||
import {
|
import {
|
||||||
mapField,
|
mapField,
|
||||||
friendlyOp,
|
friendlyOp,
|
||||||
|
@ -30,12 +20,22 @@ import {
|
||||||
FIELD_TYPES,
|
FIELD_TYPES,
|
||||||
TYPE_INFO
|
TYPE_INFO
|
||||||
} from 'loot-core/src/shared/rules';
|
} from 'loot-core/src/shared/rules';
|
||||||
|
import { titleFirst } from 'loot-core/src/shared/util';
|
||||||
|
import {
|
||||||
|
View,
|
||||||
|
Text,
|
||||||
|
Tooltip,
|
||||||
|
Stack,
|
||||||
|
Button,
|
||||||
|
Menu,
|
||||||
|
CustomSelect
|
||||||
|
} from 'loot-design/src/components/common';
|
||||||
|
import { colors } from 'loot-design/src/style';
|
||||||
import DeleteIcon from 'loot-design/src/svg/Delete';
|
import DeleteIcon from 'loot-design/src/svg/Delete';
|
||||||
import SettingsSliderAlternate from 'loot-design/src/svg/v2/SettingsSliderAlternate';
|
import SettingsSliderAlternate from 'loot-design/src/svg/v2/SettingsSliderAlternate';
|
||||||
import { colors } from 'loot-design/src/style';
|
|
||||||
|
|
||||||
import GenericInput from '../util/GenericInput';
|
|
||||||
import { Value } from '../modals/ManageRules';
|
import { Value } from '../modals/ManageRules';
|
||||||
|
import GenericInput from '../util/GenericInput';
|
||||||
|
|
||||||
let filterFields = [
|
let filterFields = [
|
||||||
'date',
|
'date',
|
||||||
|
|
|
@ -7,6 +7,11 @@ import {
|
||||||
isValid as isDateValid
|
isValid as isDateValid
|
||||||
} from 'date-fns';
|
} from 'date-fns';
|
||||||
|
|
||||||
|
import {
|
||||||
|
getAccountsById,
|
||||||
|
getCategoriesById
|
||||||
|
} from 'loot-core/src/client/reducers/queries';
|
||||||
|
import { integerToCurrency } from 'loot-core/src/shared/util';
|
||||||
import {
|
import {
|
||||||
Table,
|
Table,
|
||||||
Row,
|
Row,
|
||||||
|
@ -18,13 +23,8 @@ import {
|
||||||
useSelectedItems,
|
useSelectedItems,
|
||||||
useSelectedDispatch
|
useSelectedDispatch
|
||||||
} from 'loot-design/src/components/useSelected';
|
} from 'loot-design/src/components/useSelected';
|
||||||
import { integerToCurrency } from 'loot-core/src/shared/util';
|
|
||||||
import {
|
|
||||||
getAccountsById,
|
|
||||||
getCategoriesById
|
|
||||||
} from 'loot-core/src/client/reducers/queries';
|
|
||||||
import ArrowsSynchronize from 'loot-design/src/svg/v2/ArrowsSynchronize';
|
|
||||||
import { styles } from 'loot-design/src/style';
|
import { styles } from 'loot-design/src/style';
|
||||||
|
import ArrowsSynchronize from 'loot-design/src/svg/v2/ArrowsSynchronize';
|
||||||
|
|
||||||
import DisplayId from '../util/DisplayId';
|
import DisplayId from '../util/DisplayId';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React, { useRef, useEffect, useCallback, useLayoutEffect } from 'react';
|
import React, { useRef, useEffect, useCallback, useLayoutEffect } from 'react';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
|
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import {
|
import {
|
||||||
splitTransaction,
|
splitTransaction,
|
||||||
updateTransaction,
|
updateTransaction,
|
||||||
|
@ -8,7 +9,6 @@ import {
|
||||||
realizeTempTransactions,
|
realizeTempTransactions,
|
||||||
applyTransactionDiff
|
applyTransactionDiff
|
||||||
} from 'loot-core/src/shared/transactions';
|
} from 'loot-core/src/shared/transactions';
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import { getChangedValues, applyChanges } from 'loot-core/src/shared/util';
|
import { getChangedValues, applyChanges } from 'loot-core/src/shared/util';
|
||||||
|
|
||||||
import { TransactionTable } from './TransactionsTable';
|
import { TransactionTable } from './TransactionsTable';
|
||||||
|
|
|
@ -16,36 +16,31 @@ import {
|
||||||
isValid as isDateValid
|
isValid as isDateValid
|
||||||
} from 'date-fns';
|
} from 'date-fns';
|
||||||
|
|
||||||
import { View, Text, Tooltip, Button } from 'loot-design/src/components/common';
|
import { useCachedSchedules } from 'loot-core/src/client/data-hooks/schedules';
|
||||||
import CategoryAutocomplete from 'loot-design/src/components/CategorySelect';
|
|
||||||
import PayeeAutocomplete from 'loot-design/src/components/PayeeAutocomplete';
|
|
||||||
import AccountAutocomplete from 'loot-design/src/components/AccountAutocomplete';
|
|
||||||
import DateSelect from 'loot-design/src/components/DateSelect';
|
|
||||||
import RightArrow2 from 'loot-design/src/svg/RightArrow2';
|
|
||||||
import LeftArrow2 from 'loot-design/src/svg/LeftArrow2';
|
|
||||||
import Hyperlink2 from 'loot-design/src/svg/v2/Hyperlink2';
|
|
||||||
import CheveronDown from 'loot-design/src/svg/v1/CheveronDown';
|
|
||||||
import CalendarIcon from 'loot-design/src/svg/v2/Calendar';
|
|
||||||
import ArrowsSynchronize from 'loot-design/src/svg/v2/ArrowsSynchronize';
|
|
||||||
import {
|
|
||||||
integerToCurrency,
|
|
||||||
amountToInteger,
|
|
||||||
titleFirst
|
|
||||||
} from 'loot-core/src/shared/util';
|
|
||||||
import evalArithmetic from 'loot-core/src/shared/arithmetic';
|
|
||||||
import {
|
import {
|
||||||
getAccountsById,
|
getAccountsById,
|
||||||
getPayeesById,
|
getPayeesById,
|
||||||
getCategoriesById
|
getCategoriesById
|
||||||
} from 'loot-core/src/client/reducers/queries';
|
} from 'loot-core/src/client/reducers/queries';
|
||||||
|
import evalArithmetic from 'loot-core/src/shared/arithmetic';
|
||||||
import { currentDay } from 'loot-core/src/shared/months';
|
import { currentDay } from 'loot-core/src/shared/months';
|
||||||
|
import { getScheduledAmount } from 'loot-core/src/shared/schedules';
|
||||||
import {
|
import {
|
||||||
splitTransaction,
|
splitTransaction,
|
||||||
updateTransaction,
|
updateTransaction,
|
||||||
deleteTransaction,
|
deleteTransaction,
|
||||||
addSplitTransaction
|
addSplitTransaction
|
||||||
} from 'loot-core/src/shared/transactions';
|
} from 'loot-core/src/shared/transactions';
|
||||||
import { styles, colors } from 'loot-design/src/style';
|
import {
|
||||||
|
integerToCurrency,
|
||||||
|
amountToInteger,
|
||||||
|
titleFirst
|
||||||
|
} from 'loot-core/src/shared/util';
|
||||||
|
import AccountAutocomplete from 'loot-design/src/components/AccountAutocomplete';
|
||||||
|
import CategoryAutocomplete from 'loot-design/src/components/CategorySelect';
|
||||||
|
import { View, Text, Tooltip, Button } from 'loot-design/src/components/common';
|
||||||
|
import DateSelect from 'loot-design/src/components/DateSelect';
|
||||||
|
import PayeeAutocomplete from 'loot-design/src/components/PayeeAutocomplete';
|
||||||
import {
|
import {
|
||||||
Cell,
|
Cell,
|
||||||
Field,
|
Field,
|
||||||
|
@ -58,13 +53,18 @@ import {
|
||||||
useTableNavigator,
|
useTableNavigator,
|
||||||
Table
|
Table
|
||||||
} from 'loot-design/src/components/table';
|
} from 'loot-design/src/components/table';
|
||||||
|
import { useMergedRefs } from 'loot-design/src/components/useMergedRefs';
|
||||||
import {
|
import {
|
||||||
useSelectedDispatch,
|
useSelectedDispatch,
|
||||||
useSelectedItems
|
useSelectedItems
|
||||||
} from 'loot-design/src/components/useSelected';
|
} from 'loot-design/src/components/useSelected';
|
||||||
import { useMergedRefs } from 'loot-design/src/components/useMergedRefs';
|
import { styles, colors } from 'loot-design/src/style';
|
||||||
import { useCachedSchedules } from 'loot-core/src/client/data-hooks/schedules';
|
import LeftArrow2 from 'loot-design/src/svg/LeftArrow2';
|
||||||
import { getScheduledAmount } from 'loot-core/src/shared/schedules';
|
import RightArrow2 from 'loot-design/src/svg/RightArrow2';
|
||||||
|
import CheveronDown from 'loot-design/src/svg/v1/CheveronDown';
|
||||||
|
import ArrowsSynchronize from 'loot-design/src/svg/v2/ArrowsSynchronize';
|
||||||
|
import CalendarIcon from 'loot-design/src/svg/v2/Calendar';
|
||||||
|
import Hyperlink2 from 'loot-design/src/svg/v2/Hyperlink2';
|
||||||
|
|
||||||
import { getStatusProps } from '../schedules/StatusBadge';
|
import { getStatusProps } from '../schedules/StatusBadge';
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { act } from 'react-dom/test-utils';
|
|
||||||
import { render, fireEvent } from '@testing-library/react';
|
import { render, fireEvent } from '@testing-library/react';
|
||||||
import { format as formatDate, parse as parseDate } from 'date-fns';
|
import { format as formatDate, parse as parseDate } from 'date-fns';
|
||||||
|
import { act } from 'react-dom/test-utils';
|
||||||
|
|
||||||
import { integerToCurrency } from 'loot-core/src/shared/util';
|
|
||||||
import { initServer } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import {
|
import {
|
||||||
generateTransaction,
|
generateTransaction,
|
||||||
generateAccount,
|
generateAccount,
|
||||||
generateCategoryGroups,
|
generateCategoryGroups,
|
||||||
TestProvider
|
TestProvider
|
||||||
} from 'loot-core/src/mocks';
|
} from 'loot-core/src/mocks';
|
||||||
|
import { initServer } from 'loot-core/src/platform/client/fetch';
|
||||||
import {
|
import {
|
||||||
addSplitTransaction,
|
addSplitTransaction,
|
||||||
realizeTempTransactions,
|
realizeTempTransactions,
|
||||||
splitTransaction,
|
splitTransaction,
|
||||||
updateTransaction
|
updateTransaction
|
||||||
} from 'loot-core/src/shared';
|
} from 'loot-core/src/shared';
|
||||||
|
import { integerToCurrency } from 'loot-core/src/shared/util';
|
||||||
import { SelectedProviderWithItems } from 'loot-design/src/components';
|
import { SelectedProviderWithItems } from 'loot-design/src/components';
|
||||||
|
|
||||||
import { SplitsExpandedProvider, TransactionTable } from './TransactionsTable';
|
import { SplitsExpandedProvider, TransactionTable } from './TransactionsTable';
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { colors } from 'loot-design/src/style';
|
|
||||||
import { View } from 'loot-design/src/components/common';
|
|
||||||
import { useBudgetMonthCount } from 'loot-design/src/components/budget/BudgetMonthCountContext';
|
import { useBudgetMonthCount } from 'loot-design/src/components/budget/BudgetMonthCountContext';
|
||||||
|
import { View } from 'loot-design/src/components/common';
|
||||||
|
import { colors } from 'loot-design/src/style';
|
||||||
import CalendarIcon from 'loot-design/src/svg/v2/Calendar';
|
import CalendarIcon from 'loot-design/src/svg/v2/Calendar';
|
||||||
|
|
||||||
function Calendar({ color, onClick }) {
|
function Calendar({ color, onClick }) {
|
||||||
|
|
|
@ -3,16 +3,6 @@ import { connect } from 'react-redux';
|
||||||
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
import { send, listen } from 'loot-core/src/platform/client/fetch';
|
import { send, listen } from 'loot-core/src/platform/client/fetch';
|
||||||
import * as monthUtils from 'loot-core/src/shared/months';
|
|
||||||
import { getValidMonthBounds } from 'loot-design/src/components/budget/MonthsContext';
|
|
||||||
import * as rollover from 'loot-design/src/components/budget/rollover/rollover-components';
|
|
||||||
import { RolloverContext } from 'loot-design/src/components/budget/rollover/RolloverContext';
|
|
||||||
import * as report from 'loot-design/src/components/budget/report/components';
|
|
||||||
import { ReportProvider } from 'loot-design/src/components/budget/report/ReportContext';
|
|
||||||
import DynamicBudgetTable from 'loot-design/src/components/budget/DynamicBudgetTable';
|
|
||||||
import SpreadsheetContext from 'loot-design/src/components/spreadsheet/SpreadsheetContext';
|
|
||||||
import { View } from 'loot-design/src/components/common';
|
|
||||||
import { styles } from 'loot-design/src/style';
|
|
||||||
import {
|
import {
|
||||||
addCategory,
|
addCategory,
|
||||||
updateCategory,
|
updateCategory,
|
||||||
|
@ -23,6 +13,16 @@ import {
|
||||||
updateGroup,
|
updateGroup,
|
||||||
deleteGroup
|
deleteGroup
|
||||||
} from 'loot-core/src/shared/categories.js';
|
} from 'loot-core/src/shared/categories.js';
|
||||||
|
import * as monthUtils from 'loot-core/src/shared/months';
|
||||||
|
import DynamicBudgetTable from 'loot-design/src/components/budget/DynamicBudgetTable';
|
||||||
|
import { getValidMonthBounds } from 'loot-design/src/components/budget/MonthsContext';
|
||||||
|
import * as report from 'loot-design/src/components/budget/report/components';
|
||||||
|
import { ReportProvider } from 'loot-design/src/components/budget/report/ReportContext';
|
||||||
|
import * as rollover from 'loot-design/src/components/budget/rollover/rollover-components';
|
||||||
|
import { RolloverContext } from 'loot-design/src/components/budget/rollover/RolloverContext';
|
||||||
|
import { View } from 'loot-design/src/components/common';
|
||||||
|
import SpreadsheetContext from 'loot-design/src/components/spreadsheet/SpreadsheetContext';
|
||||||
|
import { styles } from 'loot-design/src/style';
|
||||||
|
|
||||||
import { TitlebarContext } from '../Titlebar';
|
import { TitlebarContext } from '../Titlebar';
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@ import React, { useState, useEffect } from 'react';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
|
||||||
|
import { signOut, loggedIn } from 'loot-core/src/client/actions/user';
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -9,8 +11,6 @@ import {
|
||||||
ButtonWithLoading
|
ButtonWithLoading
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
import { signOut, loggedIn } from 'loot-core/src/client/actions/user';
|
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
|
|
||||||
import { Title, Input } from './subscribe/common';
|
import { Title, Input } from './subscribe/common';
|
||||||
|
|
||||||
|
|
|
@ -8,16 +8,16 @@ import * as actions from 'loot-core/src/client/actions';
|
||||||
import { View, Text } from 'loot-design/src/components/common';
|
import { View, Text } from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
|
import useServerVersion from '../../hooks/useServerVersion';
|
||||||
import LoggedInUser from '../LoggedInUser';
|
import LoggedInUser from '../LoggedInUser';
|
||||||
import Notifications from '../Notifications';
|
import Notifications from '../Notifications';
|
||||||
import useServerVersion from '../../hooks/useServerVersion';
|
|
||||||
import ServerURL from './ServerURL';
|
|
||||||
import Modals from './Modals';
|
|
||||||
import Login from './subscribe/Login';
|
|
||||||
import Bootstrap from './subscribe/Bootstrap';
|
|
||||||
import Error from './subscribe/Error';
|
|
||||||
import ChangePassword from './subscribe/ChangePassword';
|
|
||||||
import ConfigServer from './ConfigServer';
|
import ConfigServer from './ConfigServer';
|
||||||
|
import Modals from './Modals';
|
||||||
|
import ServerURL from './ServerURL';
|
||||||
|
import Bootstrap from './subscribe/Bootstrap';
|
||||||
|
import ChangePassword from './subscribe/ChangePassword';
|
||||||
|
import Error from './subscribe/Error';
|
||||||
|
import Login from './subscribe/Login';
|
||||||
|
|
||||||
function Version() {
|
function Version() {
|
||||||
const version = useServerVersion();
|
const version = useServerVersion();
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { bindActionCreators } from 'redux';
|
|
||||||
import Component from '@reactions/component';
|
import Component from '@reactions/component';
|
||||||
|
import { bindActionCreators } from 'redux';
|
||||||
|
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import { View } from 'loot-design/src/components/common';
|
import { View } from 'loot-design/src/components/common';
|
||||||
import BudgetList from 'loot-design/src/components/manager/BudgetList';
|
import BudgetList from 'loot-design/src/components/manager/BudgetList';
|
||||||
import LoadBackup from 'loot-design/src/components/modals/LoadBackup';
|
import DeleteFile from 'loot-design/src/components/manager/DeleteFile';
|
||||||
import Import from 'loot-design/src/components/manager/Import';
|
import Import from 'loot-design/src/components/manager/Import';
|
||||||
|
import ImportActual from 'loot-design/src/components/manager/ImportActual';
|
||||||
import ImportYNAB4 from 'loot-design/src/components/manager/ImportYNAB4';
|
import ImportYNAB4 from 'loot-design/src/components/manager/ImportYNAB4';
|
||||||
import ImportYNAB5 from 'loot-design/src/components/manager/ImportYNAB5';
|
import ImportYNAB5 from 'loot-design/src/components/manager/ImportYNAB5';
|
||||||
import ImportActual from 'loot-design/src/components/manager/ImportActual';
|
import LoadBackup from 'loot-design/src/components/modals/LoadBackup';
|
||||||
import DeleteFile from 'loot-design/src/components/manager/DeleteFile';
|
|
||||||
|
|
||||||
import CreateEncryptionKey from '../modals/CreateEncryptionKey';
|
import CreateEncryptionKey from '../modals/CreateEncryptionKey';
|
||||||
import FixEncryptionKey from '../modals/FixEncryptionKey';
|
import FixEncryptionKey from '../modals/FixEncryptionKey';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
|
|
||||||
import { View, Text, AnchorLink } from 'loot-design/src/components/common';
|
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
|
import { View, Text, AnchorLink } from 'loot-design/src/components/common';
|
||||||
|
|
||||||
export default function ServerURL() {
|
export default function ServerURL() {
|
||||||
let [url, setUrl] = useState(null);
|
let [url, setUrl] = useState(null);
|
||||||
|
|
|
@ -2,14 +2,14 @@ import React, { useState } from 'react';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
|
||||||
|
import { createBudget } from 'loot-core/src/client/actions/budgets';
|
||||||
|
import { loggedIn } from 'loot-core/src/client/actions/user';
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import { View, Text, Button } from 'loot-design/src/components/common';
|
import { View, Text, Button } from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
import { loggedIn } from 'loot-core/src/client/actions/user';
|
|
||||||
import { createBudget } from 'loot-core/src/client/actions/budgets';
|
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
|
|
||||||
import { ConfirmPasswordForm } from './ConfirmPasswordForm';
|
|
||||||
import { useBootstrapped, Title } from './common';
|
import { useBootstrapped, Title } from './common';
|
||||||
|
import { ConfirmPasswordForm } from './ConfirmPasswordForm';
|
||||||
|
|
||||||
export default function Bootstrap() {
|
export default function Bootstrap() {
|
||||||
let dispatch = useDispatch();
|
let dispatch = useDispatch();
|
||||||
|
|
|
@ -2,12 +2,12 @@ import React, { useState } from 'react';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import { View, Text, Button } from 'loot-design/src/components/common';
|
import { View, Text, Button } from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
|
|
||||||
import { ConfirmPasswordForm } from './ConfirmPasswordForm';
|
|
||||||
import { Title } from './common';
|
import { Title } from './common';
|
||||||
|
import { ConfirmPasswordForm } from './ConfirmPasswordForm';
|
||||||
|
|
||||||
export default function ChangePassword() {
|
export default function ChangePassword() {
|
||||||
let dispatch = useDispatch();
|
let dispatch = useDispatch();
|
||||||
|
|
|
@ -2,6 +2,9 @@ import React, { useState } from 'react';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
|
||||||
|
import { createBudget } from 'loot-core/src/client/actions/budgets';
|
||||||
|
import { loggedIn } from 'loot-core/src/client/actions/user';
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -9,9 +12,6 @@ import {
|
||||||
ButtonWithLoading
|
ButtonWithLoading
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
import { loggedIn } from 'loot-core/src/client/actions/user';
|
|
||||||
import { createBudget } from 'loot-core/src/client/actions/budgets';
|
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
|
|
||||||
import { useBootstrapped, Title, Input } from './common';
|
import { useBootstrapped, Title, Input } from './common';
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { useHistory, useLocation } from 'react-router-dom';
|
import { useHistory, useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import {
|
import {
|
||||||
Text,
|
Text,
|
||||||
Button,
|
Button,
|
||||||
Input as BaseInput
|
Input as BaseInput
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import { colors, styles } from 'loot-design/src/style';
|
import { colors, styles } from 'loot-design/src/style';
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
|
|
||||||
// There are two URLs that dance with each other: `/login` and
|
// There are two URLs that dance with each other: `/login` and
|
||||||
// `/bootstrap`. Both of these URLs check the state of the the server
|
// `/bootstrap`. Both of these URLs check the state of the the server
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { NativeCategorySelect } from 'loot-design/src/components/CategorySelect';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -8,7 +9,6 @@ import {
|
||||||
Button
|
Button
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
import { NativeCategorySelect } from 'loot-design/src/components/CategorySelect';
|
|
||||||
|
|
||||||
class ConfirmCategoryDelete extends React.Component {
|
class ConfirmCategoryDelete extends React.Component {
|
||||||
state = { transferCategory: null, error: null };
|
state = { transferCategory: null, error: null };
|
||||||
|
|
|
@ -2,6 +2,8 @@ import React, { useState } from 'react';
|
||||||
|
|
||||||
import { css } from 'glamor';
|
import { css } from 'glamor';
|
||||||
|
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
|
import { getCreateKeyError } from 'loot-core/src/shared/errors';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -13,9 +15,7 @@ import {
|
||||||
Input,
|
Input,
|
||||||
InitialFocus
|
InitialFocus
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
import { getCreateKeyError } from 'loot-core/src/shared/errors';
|
|
||||||
|
|
||||||
export default function CreateEncryptionKey({
|
export default function CreateEncryptionKey({
|
||||||
modalProps,
|
modalProps,
|
||||||
|
|
|
@ -5,21 +5,10 @@ import {
|
||||||
initiallyLoadPayees,
|
initiallyLoadPayees,
|
||||||
setUndoEnabled
|
setUndoEnabled
|
||||||
} from 'loot-core/src/client/actions/queries';
|
} 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 q, { runQuery } from 'loot-core/src/client/query-helpers';
|
||||||
import {
|
|
||||||
View,
|
|
||||||
Text,
|
|
||||||
Modal,
|
|
||||||
Button,
|
|
||||||
Stack,
|
|
||||||
CustomSelect,
|
|
||||||
Tooltip
|
|
||||||
} from 'loot-design/src/components/common';
|
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import { colors } from 'loot-design/src/style';
|
import * as monthUtils from 'loot-core/src/shared/months';
|
||||||
import SubtractIcon from 'loot-design/src/svg/Subtract';
|
|
||||||
import AddIcon from 'loot-design/src/svg/Add';
|
|
||||||
import InformationOutline from 'loot-design/src/svg/v1/InformationOutline';
|
|
||||||
import {
|
import {
|
||||||
mapField,
|
mapField,
|
||||||
friendlyOp,
|
friendlyOp,
|
||||||
|
@ -30,22 +19,33 @@ import {
|
||||||
FIELD_TYPES,
|
FIELD_TYPES,
|
||||||
TYPE_INFO
|
TYPE_INFO
|
||||||
} from 'loot-core/src/shared/rules';
|
} from 'loot-core/src/shared/rules';
|
||||||
import useSelected, {
|
|
||||||
SelectedProvider
|
|
||||||
} from 'loot-design/src/components/useSelected';
|
|
||||||
import { useSchedules } from 'loot-core/src/client/data-hooks/schedules';
|
|
||||||
import {
|
import {
|
||||||
integerToCurrency,
|
integerToCurrency,
|
||||||
integerToAmount,
|
integerToAmount,
|
||||||
amountToInteger
|
amountToInteger
|
||||||
} from 'loot-core/src/shared/util';
|
} from 'loot-core/src/shared/util';
|
||||||
import * as monthUtils from 'loot-core/src/shared/months';
|
import {
|
||||||
|
View,
|
||||||
|
Text,
|
||||||
|
Modal,
|
||||||
|
Button,
|
||||||
|
Stack,
|
||||||
|
CustomSelect,
|
||||||
|
Tooltip
|
||||||
|
} from 'loot-design/src/components/common';
|
||||||
|
import useSelected, {
|
||||||
|
SelectedProvider
|
||||||
|
} from 'loot-design/src/components/useSelected';
|
||||||
|
import { colors } from 'loot-design/src/style';
|
||||||
|
import AddIcon from 'loot-design/src/svg/Add';
|
||||||
|
import SubtractIcon from 'loot-design/src/svg/Subtract';
|
||||||
|
import InformationOutline from 'loot-design/src/svg/v1/InformationOutline';
|
||||||
|
|
||||||
import SimpleTransactionsTable from '../accounts/SimpleTransactionsTable';
|
import SimpleTransactionsTable from '../accounts/SimpleTransactionsTable';
|
||||||
import { StatusBadge } from '../schedules/StatusBadge';
|
import { StatusBadge } from '../schedules/StatusBadge';
|
||||||
|
import { BetweenAmountInput } from '../util/AmountInput';
|
||||||
import DisplayId from '../util/DisplayId';
|
import DisplayId from '../util/DisplayId';
|
||||||
import GenericInput from '../util/GenericInput';
|
import GenericInput from '../util/GenericInput';
|
||||||
import { BetweenAmountInput } from '../util/AmountInput';
|
|
||||||
|
|
||||||
function updateValue(array, value, update) {
|
function updateValue(array, value, update) {
|
||||||
return array.map(v => (v === value ? update() : v));
|
return array.map(v => (v === value ? update() : v));
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
|
import { getTestKeyError } from 'loot-core/src/shared/errors';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -12,9 +14,7 @@ import {
|
||||||
InitialFocus,
|
InitialFocus,
|
||||||
ExternalLink
|
ExternalLink
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
import { getTestKeyError } from 'loot-core/src/shared/errors';
|
|
||||||
|
|
||||||
export default function FixEncryptionKey({
|
export default function FixEncryptionKey({
|
||||||
modalProps,
|
modalProps,
|
||||||
|
|
|
@ -1,13 +1,23 @@
|
||||||
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
|
|
||||||
import { css } from 'glamor';
|
|
||||||
import { format as formatDate, parseISO } from 'date-fns';
|
import { format as formatDate, parseISO } from 'date-fns';
|
||||||
|
import { css } from 'glamor';
|
||||||
|
|
||||||
import * as undo from 'loot-core/src/platform/client/undo';
|
import { pushModal } from 'loot-core/src/client/actions/modals';
|
||||||
import { initiallyLoadPayees } from 'loot-core/src/client/actions/queries';
|
import { initiallyLoadPayees } from 'loot-core/src/client/actions/queries';
|
||||||
import q from 'loot-core/src/client/query-helpers';
|
import q from 'loot-core/src/client/query-helpers';
|
||||||
import { liveQueryContext } from 'loot-core/src/client/query-hooks';
|
import { liveQueryContext } from 'loot-core/src/client/query-hooks';
|
||||||
|
import { getPayeesById } from 'loot-core/src/client/reducers/queries';
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
|
import * as undo from 'loot-core/src/platform/client/undo';
|
||||||
|
import { getMonthYearFormat } from 'loot-core/src/shared/months';
|
||||||
|
import { mapField, friendlyOp } from 'loot-core/src/shared/rules';
|
||||||
|
import {
|
||||||
|
extractScheduleConds,
|
||||||
|
getRecurringDescription
|
||||||
|
} from 'loot-core/src/shared/schedules';
|
||||||
|
import { integerToCurrency } from 'loot-core/src/shared/util';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -30,18 +40,8 @@ import useSelected, {
|
||||||
useSelectedItems,
|
useSelectedItems,
|
||||||
SelectedProvider
|
SelectedProvider
|
||||||
} from 'loot-design/src/components/useSelected';
|
} from 'loot-design/src/components/useSelected';
|
||||||
import { integerToCurrency } from 'loot-core/src/shared/util';
|
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import { pushModal } from 'loot-core/src/client/actions/modals';
|
|
||||||
import { mapField, friendlyOp } from 'loot-core/src/shared/rules';
|
|
||||||
import ArrowRight from 'loot-design/src/svg/RightArrow2';
|
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
import { getMonthYearFormat } from 'loot-core/src/shared/months';
|
import ArrowRight from 'loot-design/src/svg/RightArrow2';
|
||||||
import {
|
|
||||||
extractScheduleConds,
|
|
||||||
getRecurringDescription
|
|
||||||
} from 'loot-core/src/shared/schedules';
|
|
||||||
import { getPayeesById } from 'loot-core/src/client/reducers/queries';
|
|
||||||
|
|
||||||
let SchedulesQuery = liveQueryContext(q('schedules').select('*'));
|
let SchedulesQuery = liveQueryContext(q('schedules').select('*'));
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
import React, { useState, useRef, useEffect } from 'react';
|
import React, { useState, useRef, useEffect } from 'react';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
|
|
||||||
|
import { replaceModal } from 'loot-core/src/client/actions/modals';
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
|
import { Information } from 'loot-design/src/components/alerts';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -9,10 +12,7 @@ import {
|
||||||
Button,
|
Button,
|
||||||
P
|
P
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import { Information } from 'loot-design/src/components/alerts';
|
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import { replaceModal } from 'loot-core/src/client/actions/modals';
|
|
||||||
|
|
||||||
let highlightStyle = { color: colors.p5 };
|
let highlightStyle = { color: colors.p5 };
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@ import React, { useState, useEffect, useRef } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
import * as undo from 'loot-core/src/platform/client/undo';
|
|
||||||
import { send, listen } from 'loot-core/src/platform/client/fetch';
|
import { send, listen } from 'loot-core/src/platform/client/fetch';
|
||||||
import { ManagePayees } from 'loot-design/src/components/payees';
|
import * as undo from 'loot-core/src/platform/client/undo';
|
||||||
import { applyChanges } from 'loot-core/src/shared/util';
|
import { applyChanges } from 'loot-core/src/shared/util';
|
||||||
|
import { ManagePayees } from 'loot-design/src/components/payees';
|
||||||
|
|
||||||
function ManagePayeesWithData({
|
function ManagePayeesWithData({
|
||||||
history,
|
history,
|
||||||
|
|
|
@ -2,6 +2,9 @@ import React, { useState, useEffect } from 'react';
|
||||||
|
|
||||||
import * as d from 'date-fns';
|
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 { integerToCurrency } from 'loot-core/src/shared/util';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -9,16 +12,12 @@ import {
|
||||||
P,
|
P,
|
||||||
AlignedText
|
AlignedText
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import { styles } from 'loot-design/src/style';
|
import { colors, styles } from 'loot-design/src/style';
|
||||||
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 { colors } from 'loot-design/src/style';
|
|
||||||
|
|
||||||
import Header from './Header';
|
|
||||||
import Change from './Change';
|
import Change from './Change';
|
||||||
import CashFlowGraph from './graphs/CashFlowGraph';
|
|
||||||
import { cashFlowByDate } from './graphs/cash-flow-spreadsheet';
|
import { cashFlowByDate } from './graphs/cash-flow-spreadsheet';
|
||||||
|
import CashFlowGraph from './graphs/CashFlowGraph';
|
||||||
|
import Header from './Header';
|
||||||
import useReport from './useReport';
|
import useReport from './useReport';
|
||||||
import { useArgsMemo } from './util';
|
import { useArgsMemo } from './util';
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { styles } from 'loot-design/src/style';
|
|
||||||
import { integerToCurrency } from 'loot-core/src/shared/util';
|
import { integerToCurrency } from 'loot-core/src/shared/util';
|
||||||
import { Block } from 'loot-design/src/components/common';
|
import { Block } from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors, styles } from 'loot-design/src/style';
|
||||||
|
|
||||||
function Change({ amount, style }) {
|
function Change({ amount, style }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -2,8 +2,8 @@ import React from 'react';
|
||||||
|
|
||||||
import * as d from 'date-fns';
|
import * as d from 'date-fns';
|
||||||
|
|
||||||
import { colors } from 'loot-design/src/style';
|
|
||||||
import { Block } from 'loot-design/src/components/common';
|
import { Block } from 'loot-design/src/components/common';
|
||||||
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
function DateRange({ start, end }) {
|
function DateRange({ start, end }) {
|
||||||
start = d.parseISO(start);
|
start = d.parseISO(start);
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { styles } from 'loot-design/src/style';
|
import * as monthUtils from 'loot-core/src/shared/months';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Select,
|
Select,
|
||||||
Button,
|
Button,
|
||||||
ButtonLink
|
ButtonLink
|
||||||
} from 'loot-design/src/components/common';
|
} from 'loot-design/src/components/common';
|
||||||
import * as monthUtils from 'loot-core/src/shared/months';
|
import { styles } from 'loot-design/src/style';
|
||||||
import ArrowLeft from 'loot-design/src/svg/v1/ArrowLeft';
|
import ArrowLeft from 'loot-design/src/svg/v1/ArrowLeft';
|
||||||
|
|
||||||
function validateStart(allMonths, start, end) {
|
function validateStart(allMonths, start, end) {
|
||||||
|
|
|
@ -1,23 +1,22 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { bindActionCreators } from 'redux';
|
|
||||||
import * as d from 'date-fns';
|
import * as d from 'date-fns';
|
||||||
|
import { bindActionCreators } from 'redux';
|
||||||
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
import { View, P } from 'loot-design/src/components/common';
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import { styles } from 'loot-design/src/style';
|
|
||||||
import * as monthUtils from 'loot-core/src/shared/months';
|
import * as monthUtils from 'loot-core/src/shared/months';
|
||||||
import { integerToCurrency } from 'loot-core/src/shared/util';
|
import { integerToCurrency } from 'loot-core/src/shared/util';
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
import { View, P } from 'loot-design/src/components/common';
|
||||||
|
import { styles } from 'loot-design/src/style';
|
||||||
|
|
||||||
import Header from './Header';
|
import Change from './Change';
|
||||||
import { fromDateRepr } from './util';
|
|
||||||
import useReport from './useReport';
|
|
||||||
import netWorthSpreadsheet from './graphs/net-worth-spreadsheet';
|
import netWorthSpreadsheet from './graphs/net-worth-spreadsheet';
|
||||||
import NetWorthGraph from './graphs/NetWorthGraph';
|
import NetWorthGraph from './graphs/NetWorthGraph';
|
||||||
import Change from './Change';
|
import Header from './Header';
|
||||||
import { useArgsMemo } from './util';
|
import useReport from './useReport';
|
||||||
|
import { fromDateRepr, useArgsMemo } from './util';
|
||||||
|
|
||||||
function NetWorth({ accounts }) {
|
function NetWorth({ accounts }) {
|
||||||
const [earliestMonth, setEarliestMonth] = useState(null);
|
const [earliestMonth, setEarliestMonth] = useState(null);
|
||||||
|
|
|
@ -5,21 +5,21 @@ import { bindActionCreators } from 'redux';
|
||||||
import { VictoryBar, VictoryGroup, VictoryVoronoiContainer } from 'victory';
|
import { VictoryBar, VictoryGroup, VictoryVoronoiContainer } from 'victory';
|
||||||
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
import { View, Block, AnchorLink } from 'loot-design/src/components/common';
|
|
||||||
import { colors, styles } from 'loot-design/src/style';
|
|
||||||
import * as monthUtils from 'loot-core/src/shared/months';
|
import * as monthUtils from 'loot-core/src/shared/months';
|
||||||
import { integerToCurrency } from 'loot-core/src/shared/util';
|
import { integerToCurrency } from 'loot-core/src/shared/util';
|
||||||
|
import { View, Block, AnchorLink } from 'loot-design/src/components/common';
|
||||||
|
import { colors, styles } from 'loot-design/src/style';
|
||||||
|
|
||||||
import { useArgsMemo } from './util';
|
import Change from './Change';
|
||||||
import theme from './chart-theme';
|
import theme from './chart-theme';
|
||||||
import Container from './Container';
|
import Container from './Container';
|
||||||
|
import DateRange from './DateRange';
|
||||||
|
import { simpleCashFlow } from './graphs/cash-flow-spreadsheet';
|
||||||
|
import netWorthSpreadsheet from './graphs/net-worth-spreadsheet';
|
||||||
|
import NetWorthGraph from './graphs/NetWorthGraph';
|
||||||
import Tooltip from './Tooltip';
|
import Tooltip from './Tooltip';
|
||||||
import useReport from './useReport';
|
import useReport from './useReport';
|
||||||
import netWorthSpreadsheet from './graphs/net-worth-spreadsheet';
|
import { useArgsMemo } from './util';
|
||||||
import { simpleCashFlow } from './graphs/cash-flow-spreadsheet';
|
|
||||||
import NetWorthGraph from './graphs/NetWorthGraph';
|
|
||||||
import Change from './Change';
|
|
||||||
import DateRange from './DateRange';
|
|
||||||
|
|
||||||
function Card({ flex, to, style, children }) {
|
function Card({ flex, to, style, children }) {
|
||||||
const containerProps = { flex, margin: 15 };
|
const containerProps = { flex, margin: 15 };
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
|
|
||||||
import { VictoryTooltip } from 'victory';
|
|
||||||
import { css, before } from 'glamor';
|
import { css, before } from 'glamor';
|
||||||
|
import { VictoryTooltip } from 'victory';
|
||||||
|
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import * as d from 'date-fns';
|
||||||
import {
|
import {
|
||||||
VictoryChart,
|
VictoryChart,
|
||||||
VictoryBar,
|
VictoryBar,
|
||||||
|
@ -8,13 +9,12 @@ import {
|
||||||
VictoryVoronoiContainer,
|
VictoryVoronoiContainer,
|
||||||
VictoryGroup
|
VictoryGroup
|
||||||
} from 'victory';
|
} from 'victory';
|
||||||
import * as d from 'date-fns';
|
|
||||||
|
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
|
import theme from '../chart-theme';
|
||||||
import Container from '../Container';
|
import Container from '../Container';
|
||||||
import Tooltip from '../Tooltip';
|
import Tooltip from '../Tooltip';
|
||||||
import theme from '../chart-theme';
|
|
||||||
|
|
||||||
function CashFlowGraph({ style, start, end, graphData, isConcise, compact }) {
|
function CashFlowGraph({ style, start, end, graphData, isConcise, compact }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import * as d from 'date-fns';
|
||||||
import {
|
import {
|
||||||
VictoryChart,
|
VictoryChart,
|
||||||
VictoryBar,
|
VictoryBar,
|
||||||
|
@ -8,11 +9,10 @@ import {
|
||||||
VictoryVoronoiContainer,
|
VictoryVoronoiContainer,
|
||||||
VictoryGroup
|
VictoryGroup
|
||||||
} from 'victory';
|
} from 'victory';
|
||||||
import * as d from 'date-fns';
|
|
||||||
|
|
||||||
|
import theme from '../chart-theme';
|
||||||
import Container from '../Container';
|
import Container from '../Container';
|
||||||
import Tooltip from '../Tooltip';
|
import Tooltip from '../Tooltip';
|
||||||
import theme from '../chart-theme';
|
|
||||||
|
|
||||||
function Area({ start, end, data, style, scale, range }) {
|
function Area({ start, end, data, style, scale, range }) {
|
||||||
const zero = scale.y(0);
|
const zero = scale.y(0);
|
||||||
|
|
|
@ -2,10 +2,10 @@ import React from 'react';
|
||||||
|
|
||||||
import * as d from 'date-fns';
|
import * as d from 'date-fns';
|
||||||
|
|
||||||
import * as monthUtils from 'loot-core/src/shared/months';
|
|
||||||
import { AlignedText } from 'loot-design/src/components/common';
|
|
||||||
import { integerToCurrency, integerToAmount } from 'loot-core/src/shared/util';
|
|
||||||
import q from 'loot-core/src/client/query-helpers';
|
import q from 'loot-core/src/client/query-helpers';
|
||||||
|
import * as monthUtils from 'loot-core/src/shared/months';
|
||||||
|
import { integerToCurrency, integerToAmount } from 'loot-core/src/shared/util';
|
||||||
|
import { AlignedText } from 'loot-design/src/components/common';
|
||||||
|
|
||||||
import { fromDateRepr, fromDateReprToDay, runAll, index } from '../util';
|
import { fromDateRepr, fromDateReprToDay, runAll, index } from '../util';
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,14 @@ import React from 'react';
|
||||||
|
|
||||||
import * as d from 'date-fns';
|
import * as d from 'date-fns';
|
||||||
|
|
||||||
import * as monthUtils from 'loot-core/src/shared/months';
|
|
||||||
import { AlignedText } from 'loot-design/src/components/common';
|
|
||||||
import q, { runQuery } from 'loot-core/src/client/query-helpers';
|
import q, { runQuery } from 'loot-core/src/client/query-helpers';
|
||||||
|
import * as monthUtils from 'loot-core/src/shared/months';
|
||||||
import {
|
import {
|
||||||
integerToCurrency,
|
integerToCurrency,
|
||||||
integerToAmount,
|
integerToAmount,
|
||||||
amountToInteger
|
amountToInteger
|
||||||
} from 'loot-core/src/shared/util';
|
} from 'loot-core/src/shared/util';
|
||||||
|
import { AlignedText } from 'loot-design/src/components/common';
|
||||||
|
|
||||||
import { index } from '../util';
|
import { index } from '../util';
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ import { Route } from 'react-router-dom';
|
||||||
|
|
||||||
import { View } from 'loot-design/src/components/common';
|
import { View } from 'loot-design/src/components/common';
|
||||||
|
|
||||||
import Overview from './Overview';
|
|
||||||
import NetWorth from './NetWorth';
|
|
||||||
import CashFlow from './CashFlow';
|
import CashFlow from './CashFlow';
|
||||||
|
import NetWorth from './NetWorth';
|
||||||
|
import Overview from './Overview';
|
||||||
|
|
||||||
class Reports extends React.Component {
|
class Reports extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { useLocation, useHistory } from 'react-router-dom';
|
import { useLocation, useHistory } from 'react-router-dom';
|
||||||
|
|
||||||
import q, { runQuery } from 'loot-core/src/client/query-helpers';
|
|
||||||
import Platform from 'loot-core/src/client/platform';
|
import Platform from 'loot-core/src/client/platform';
|
||||||
|
import q, { runQuery } from 'loot-core/src/client/query-helpers';
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
|
import { getRecurringDescription } from 'loot-core/src/shared/schedules';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Stack,
|
Stack,
|
||||||
|
@ -18,13 +19,12 @@ import {
|
||||||
Field,
|
Field,
|
||||||
SelectCell
|
SelectCell
|
||||||
} from 'loot-design/src/components/table';
|
} from 'loot-design/src/components/table';
|
||||||
import { getRecurringDescription } from 'loot-core/src/shared/schedules';
|
|
||||||
import { colors } from 'loot-design/src/style';
|
|
||||||
import useSelected, {
|
import useSelected, {
|
||||||
useSelectedDispatch,
|
useSelectedDispatch,
|
||||||
useSelectedItems,
|
useSelectedItems,
|
||||||
SelectedProvider
|
SelectedProvider
|
||||||
} from 'loot-design/src/components/useSelected';
|
} from 'loot-design/src/components/useSelected';
|
||||||
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
import { Page } from '../Page';
|
import { Page } from '../Page';
|
||||||
import DisplayId from '../util/DisplayId';
|
import DisplayId from '../util/DisplayId';
|
||||||
|
|
|
@ -1,33 +1,32 @@
|
||||||
import React, { useEffect, useReducer } from 'react';
|
import React, { useEffect, useReducer } from 'react';
|
||||||
import { useParams, useHistory } from 'react-router-dom';
|
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
|
import { useParams, useHistory } from 'react-router-dom';
|
||||||
|
|
||||||
import { pushModal } from 'loot-core/src/client/actions/modals';
|
import { pushModal } from 'loot-core/src/client/actions/modals';
|
||||||
import { send, sendCatch } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import q, { runQuery, liveQuery } from 'loot-core/src/client/query-helpers';
|
|
||||||
import { extractScheduleConds } from 'loot-core/src/shared/schedules';
|
|
||||||
import * as monthUtils from 'loot-core/src/shared/months';
|
|
||||||
import { useCachedPayees } from 'loot-core/src/client/data-hooks/payees';
|
import { useCachedPayees } from 'loot-core/src/client/data-hooks/payees';
|
||||||
|
import q, { 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 { extractScheduleConds } from 'loot-core/src/shared/schedules';
|
||||||
|
import AccountAutocomplete from 'loot-design/src/components/AccountAutocomplete';
|
||||||
|
import { Stack, View, Text, Button } from 'loot-design/src/components/common';
|
||||||
|
import DateSelect from 'loot-design/src/components/DateSelect';
|
||||||
import {
|
import {
|
||||||
FormField,
|
FormField,
|
||||||
FormLabel,
|
FormLabel,
|
||||||
Checkbox
|
Checkbox
|
||||||
} from 'loot-design/src/components/forms';
|
} from 'loot-design/src/components/forms';
|
||||||
import { colors } from 'loot-design/src/style';
|
|
||||||
import PayeeAutocomplete from 'loot-design/src/components/PayeeAutocomplete';
|
import PayeeAutocomplete from 'loot-design/src/components/PayeeAutocomplete';
|
||||||
import AccountAutocomplete from 'loot-design/src/components/AccountAutocomplete';
|
import RecurringSchedulePicker from 'loot-design/src/components/RecurringSchedulePicker';
|
||||||
import { Stack, View, Text, Button } from 'loot-design/src/components/common';
|
|
||||||
import DateSelect from 'loot-design/src/components/DateSelect';
|
|
||||||
import { SelectedItemsButton } from 'loot-design/src/components/table';
|
import { SelectedItemsButton } from 'loot-design/src/components/table';
|
||||||
import useSelected, {
|
import useSelected, {
|
||||||
SelectedProvider
|
SelectedProvider
|
||||||
} from 'loot-design/src/components/useSelected';
|
} from 'loot-design/src/components/useSelected';
|
||||||
import RecurringSchedulePicker from 'loot-design/src/components/RecurringSchedulePicker';
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
import SimpleTransactionsTable from '../accounts/SimpleTransactionsTable';
|
import SimpleTransactionsTable from '../accounts/SimpleTransactionsTable';
|
||||||
import { usePageType } from '../Page';
|
|
||||||
import { Page } from '../Page';
|
|
||||||
import { OpSelect } from '../modals/EditRule';
|
import { OpSelect } from '../modals/EditRule';
|
||||||
|
import { Page, usePageType } from '../Page';
|
||||||
import { AmountInput, BetweenAmountInput } from '../util/AmountInput';
|
import { AmountInput, BetweenAmountInput } from '../util/AmountInput';
|
||||||
|
|
||||||
function mergeFields(defaults, initial) {
|
function mergeFields(defaults, initial) {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import React, { useState, useMemo } from 'react';
|
import React, { useState, useMemo } from 'react';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
|
|
||||||
|
import * as monthUtils from 'loot-core/src/shared/months';
|
||||||
|
import { getScheduledAmount } from 'loot-core/src/shared/schedules';
|
||||||
import { integerToCurrency } from 'loot-core/src/shared/util';
|
import { integerToCurrency } from 'loot-core/src/shared/util';
|
||||||
import { colors } from 'loot-design/src/style';
|
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
|
@ -17,8 +18,7 @@ import {
|
||||||
Field,
|
Field,
|
||||||
Cell
|
Cell
|
||||||
} from 'loot-design/src/components/table';
|
} from 'loot-design/src/components/table';
|
||||||
import * as monthUtils from 'loot-core/src/shared/months';
|
import { colors } from 'loot-design/src/style';
|
||||||
import { getScheduledAmount } from 'loot-core/src/shared/schedules';
|
|
||||||
import DotsHorizontalTriple from 'loot-design/src/svg/v1/DotsHorizontalTriple';
|
import DotsHorizontalTriple from 'loot-design/src/svg/v1/DotsHorizontalTriple';
|
||||||
import Check from 'loot-design/src/svg/v2/Check';
|
import Check from 'loot-design/src/svg/v2/Check';
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { colors } from 'loot-design/src/style';
|
|
||||||
import { View, Text } from 'loot-design/src/components/common';
|
|
||||||
import { titleFirst } from 'loot-core/src/shared/util';
|
import { titleFirst } from 'loot-core/src/shared/util';
|
||||||
import EditSkull1 from 'loot-design/src/svg/v2/EditSkull1';
|
import { View, Text } from 'loot-design/src/components/common';
|
||||||
|
import { colors } from 'loot-design/src/style';
|
||||||
import AlertTriangle from 'loot-design/src/svg/v2/AlertTriangle';
|
import AlertTriangle from 'loot-design/src/svg/v2/AlertTriangle';
|
||||||
import CalendarIcon from 'loot-design/src/svg/v2/Calendar';
|
import CalendarIcon from 'loot-design/src/svg/v2/Calendar';
|
||||||
import ValidationCheck from 'loot-design/src/svg/v2/ValidationCheck';
|
|
||||||
import FavoriteStar from 'loot-design/src/svg/v2/FavoriteStar';
|
|
||||||
import CheckCircle1 from 'loot-design/src/svg/v2/CheckCircle1';
|
import CheckCircle1 from 'loot-design/src/svg/v2/CheckCircle1';
|
||||||
|
import EditSkull1 from 'loot-design/src/svg/v2/EditSkull1';
|
||||||
|
import FavoriteStar from 'loot-design/src/svg/v2/FavoriteStar';
|
||||||
|
import ValidationCheck from 'loot-design/src/svg/v2/ValidationCheck';
|
||||||
|
|
||||||
export function getStatusProps(status) {
|
export function getStatusProps(status) {
|
||||||
let color, backgroundColor, Icon;
|
let color, backgroundColor, Icon;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
|
||||||
import { View, Button } from 'loot-design/src/components/common';
|
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import { useSchedules } from 'loot-core/src/client/data-hooks/schedules';
|
import { useSchedules } from 'loot-core/src/client/data-hooks/schedules';
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
|
import { View, Button } from 'loot-design/src/components/common';
|
||||||
|
|
||||||
import { Page } from '../Page';
|
import { Page } from '../Page';
|
||||||
import { SchedulesTable, ROW_HEIGHT } from './SchedulesTable';
|
import { SchedulesTable, ROW_HEIGHT } from './SchedulesTable';
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
import { colors } from 'loot-design/src/style';
|
|
||||||
import { View, P, ButtonWithLoading } from 'loot-design/src/components/common';
|
import { View, P, ButtonWithLoading } from 'loot-design/src/components/common';
|
||||||
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
import { Page } from '../Page';
|
import { Page } from '../Page';
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ import React from 'react';
|
||||||
import { Tooltip, Pointer, P } from 'loot-design/src/components/common';
|
import { Tooltip, Pointer, P } from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
import Navigation from './Navigation';
|
|
||||||
import { Title } from './common';
|
import { Title } from './common';
|
||||||
|
import Navigation from './Navigation';
|
||||||
|
|
||||||
function BudgetInitial({ targetRect, navigationProps }) {
|
function BudgetInitial({ targetRect, navigationProps }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -3,8 +3,8 @@ import React from 'react';
|
||||||
import { Tooltip, Pointer, P } from 'loot-design/src/components/common';
|
import { Tooltip, Pointer, P } from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
import Navigation from './Navigation';
|
|
||||||
import { Title } from './common';
|
import { Title } from './common';
|
||||||
|
import Navigation from './Navigation';
|
||||||
|
|
||||||
function BudgetSummary({ targetRect, navigationProps }) {
|
function BudgetSummary({ targetRect, navigationProps }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -6,8 +6,8 @@ import { bindActionCreators } from 'redux';
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
import { View, P, Button } from 'loot-design/src/components/common';
|
import { View, P, Button } from 'loot-design/src/components/common';
|
||||||
|
|
||||||
import Navigation from './Navigation';
|
|
||||||
import { Standalone, Title, useMinimized } from './common';
|
import { Standalone, Title, useMinimized } from './common';
|
||||||
|
import Navigation from './Navigation';
|
||||||
|
|
||||||
function BudgetNextMonth({ stepTwo, navigationProps }) {
|
function BudgetNextMonth({ stepTwo, navigationProps }) {
|
||||||
let [minimized, toggle] = useMinimized();
|
let [minimized, toggle] = useMinimized();
|
||||||
|
|
|
@ -3,8 +3,8 @@ import React from 'react';
|
||||||
import { Tooltip, Pointer, P } from 'loot-design/src/components/common';
|
import { Tooltip, Pointer, P } from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
import Navigation from './Navigation';
|
|
||||||
import { Title } from './common';
|
import { Title } from './common';
|
||||||
|
import Navigation from './Navigation';
|
||||||
|
|
||||||
function BudgetSummary({ fromYNAB, targetRect, navigationProps }) {
|
function BudgetSummary({ fromYNAB, targetRect, navigationProps }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -2,8 +2,8 @@ import React from 'react';
|
||||||
|
|
||||||
import { P, Button } from 'loot-design/src/components/common';
|
import { P, Button } from 'loot-design/src/components/common';
|
||||||
|
|
||||||
import Navigation from './Navigation';
|
|
||||||
import { Standalone, Title, useMinimized } from './common';
|
import { Standalone, Title, useMinimized } from './common';
|
||||||
|
import Navigation from './Navigation';
|
||||||
|
|
||||||
function CategoryBalance({ targetRect, navigationProps }) {
|
function CategoryBalance({ targetRect, navigationProps }) {
|
||||||
let [minimized, toggle] = useMinimized();
|
let [minimized, toggle] = useMinimized();
|
||||||
|
|
|
@ -2,8 +2,8 @@ import React from 'react';
|
||||||
|
|
||||||
import { P } from 'loot-design/src/components/common';
|
import { P } from 'loot-design/src/components/common';
|
||||||
|
|
||||||
import Navigation from './Navigation';
|
|
||||||
import { Standalone, Title } from './common';
|
import { Standalone, Title } from './common';
|
||||||
|
import Navigation from './Navigation';
|
||||||
|
|
||||||
function DeleteTransactions({ targetRect, navigationProps }) {
|
function DeleteTransactions({ targetRect, navigationProps }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -4,14 +4,14 @@ import { connect } from 'react-redux';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
import SheetValue from 'loot-design/src/components/spreadsheet/SheetValue';
|
|
||||||
import NamespaceContext from 'loot-design/src/components/spreadsheet/NamespaceContext';
|
|
||||||
import { P, View, Text, Button } from 'loot-design/src/components/common';
|
|
||||||
import * as monthUtils from 'loot-core/src/shared/months';
|
import * as monthUtils from 'loot-core/src/shared/months';
|
||||||
import { integerToCurrency } from 'loot-core/src/shared/util';
|
import { integerToCurrency } from 'loot-core/src/shared/util';
|
||||||
|
import { P, View, Text, Button } from 'loot-design/src/components/common';
|
||||||
|
import NamespaceContext from 'loot-design/src/components/spreadsheet/NamespaceContext';
|
||||||
|
import SheetValue from 'loot-design/src/components/spreadsheet/SheetValue';
|
||||||
|
|
||||||
import Navigation from './Navigation';
|
|
||||||
import { Standalone, Title, useMinimized } from './common';
|
import { Standalone, Title, useMinimized } from './common';
|
||||||
|
import Navigation from './Navigation';
|
||||||
|
|
||||||
function Overspending({ navigationProps, stepTwo }) {
|
function Overspending({ navigationProps, stepTwo }) {
|
||||||
let currentMonth = monthUtils.currentMonth();
|
let currentMonth = monthUtils.currentMonth();
|
||||||
|
|
|
@ -3,8 +3,8 @@ import React from 'react';
|
||||||
import { Tooltip, Pointer, P } from 'loot-design/src/components/common';
|
import { Tooltip, Pointer, P } from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
import Navigation from './Navigation';
|
|
||||||
import { Title } from './common';
|
import { Title } from './common';
|
||||||
|
import Navigation from './Navigation';
|
||||||
|
|
||||||
function TransactionAdd({ targetRect, navigationProps }) {
|
function TransactionAdd({ targetRect, navigationProps }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { P } from 'loot-design/src/components/common';
|
|
||||||
import * as monthUtils from 'loot-core/src/shared/months';
|
import * as monthUtils from 'loot-core/src/shared/months';
|
||||||
|
import { P } from 'loot-design/src/components/common';
|
||||||
|
|
||||||
import Navigation from './Navigation';
|
|
||||||
import { Standalone, Title } from './common';
|
import { Standalone, Title } from './common';
|
||||||
|
import Navigation from './Navigation';
|
||||||
|
|
||||||
function TransactionEnter({ fromYNAB, navigationProps }) {
|
function TransactionEnter({ fromYNAB, navigationProps }) {
|
||||||
const currentDay = monthUtils.currentDay();
|
const currentDay = monthUtils.currentDay();
|
||||||
|
|
|
@ -4,8 +4,8 @@ import { css } from 'glamor';
|
||||||
|
|
||||||
import { P } from 'loot-design/src/components/common';
|
import { P } from 'loot-design/src/components/common';
|
||||||
|
|
||||||
import Navigation from './Navigation';
|
|
||||||
import { Standalone } from './common';
|
import { Standalone } from './common';
|
||||||
|
import Navigation from './Navigation';
|
||||||
|
|
||||||
function TransactionFinalize({ navigationProps }) {
|
function TransactionFinalize({ navigationProps }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { CachedPayees } from 'loot-core/src/client/data-hooks/payees';
|
|
||||||
import { CachedAccounts } from 'loot-core/src/client/data-hooks/accounts';
|
import { CachedAccounts } from 'loot-core/src/client/data-hooks/accounts';
|
||||||
|
import { CachedPayees } from 'loot-core/src/client/data-hooks/payees';
|
||||||
import { Text } from 'loot-design/src/components/common';
|
import { Text } from 'loot-design/src/components/common';
|
||||||
import { colors } from 'loot-design/src/style';
|
import { colors } from 'loot-design/src/style';
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@ import React from 'react';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
|
|
||||||
import { getMonthYearFormat } from 'loot-core/src/shared/months';
|
import { getMonthYearFormat } from 'loot-core/src/shared/months';
|
||||||
import { View, Input } from 'loot-design/src/components/common';
|
|
||||||
import PayeeAutocomplete from 'loot-design/src/components/PayeeAutocomplete';
|
|
||||||
import AccountAutocomplete from 'loot-design/src/components/AccountAutocomplete';
|
import AccountAutocomplete from 'loot-design/src/components/AccountAutocomplete';
|
||||||
import Autocomplete from 'loot-design/src/components/Autocomplete';
|
import Autocomplete from 'loot-design/src/components/Autocomplete';
|
||||||
import CategoryAutocomplete from 'loot-design/src/components/CategorySelect';
|
import CategoryAutocomplete from 'loot-design/src/components/CategorySelect';
|
||||||
|
import { View, Input } from 'loot-design/src/components/common';
|
||||||
import DateSelect from 'loot-design/src/components/DateSelect';
|
import DateSelect from 'loot-design/src/components/DateSelect';
|
||||||
|
import PayeeAutocomplete from 'loot-design/src/components/PayeeAutocomplete';
|
||||||
import RecurringSchedulePicker from 'loot-design/src/components/RecurringSchedulePicker';
|
import RecurringSchedulePicker from 'loot-design/src/components/RecurringSchedulePicker';
|
||||||
|
|
||||||
export default function GenericInput({
|
export default function GenericInput({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import * as sharedListeners from 'loot-core/src/client/shared-listeners';
|
||||||
import { send, listen } from 'loot-core/src/platform/client/fetch';
|
import { send, listen } from 'loot-core/src/platform/client/fetch';
|
||||||
import * as undo from 'loot-core/src/platform/client/undo';
|
import * as undo from 'loot-core/src/platform/client/undo';
|
||||||
import * as sharedListeners from 'loot-core/src/client/shared-listeners';
|
|
||||||
|
|
||||||
export function handleGlobalEvents(actions, store) {
|
export function handleGlobalEvents(actions, store) {
|
||||||
global.Actual.onEventFromMain('update-downloaded', (event, info) => {
|
global.Actual.onEventFromMain('update-downloaded', (event, info) => {
|
||||||
|
|
|
@ -17,15 +17,15 @@ import {
|
||||||
} from 'redux';
|
} from 'redux';
|
||||||
import thunk from 'redux-thunk';
|
import thunk from 'redux-thunk';
|
||||||
|
|
||||||
import constants from 'loot-core/src/client/constants';
|
|
||||||
import reducers from 'loot-core/src/client/reducers';
|
|
||||||
import { send } from 'loot-core/src/platform/client/fetch';
|
|
||||||
import q, { runQuery } from 'loot-core/src/client/query-helpers';
|
|
||||||
import * as actions from 'loot-core/src/client/actions';
|
import * as actions from 'loot-core/src/client/actions';
|
||||||
|
import 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 { initialState as initialAppState } from 'loot-core/src/client/reducers/app';
|
import { initialState as initialAppState } from 'loot-core/src/client/reducers/app';
|
||||||
|
import { send } from 'loot-core/src/platform/client/fetch';
|
||||||
|
|
||||||
import { handleGlobalEvents } from './global-events';
|
|
||||||
import App from './components/App';
|
import App from './components/App';
|
||||||
|
import { handleGlobalEvents } from './global-events';
|
||||||
|
|
||||||
// See https://github.com/WICG/focus-visible. Only makes the blue
|
// See https://github.com/WICG/focus-visible. Only makes the blue
|
||||||
// focus outline appear from keyboard events.
|
// focus outline appear from keyboard events.
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import * as React from 'react';
|
import React, { useEffect, useMemo } from 'react';
|
||||||
import { useEffect, useMemo } from 'react';
|
|
||||||
|
|
||||||
import LRU from 'lru-cache';
|
import LRU from 'lru-cache';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { send } from '../../platform/client/fetch';
|
import { send } from '../../platform/client/fetch';
|
||||||
import constants from '../constants';
|
import constants from '../constants';
|
||||||
import { getPayees, getAccounts } from './queries';
|
|
||||||
import { addNotification } from './notifications';
|
import { addNotification } from './notifications';
|
||||||
|
import { getPayees, getAccounts } from './queries';
|
||||||
|
|
||||||
export function setAccountsSyncing(name) {
|
export function setAccountsSyncing(name) {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
import { send } from '../../platform/client/fetch';
|
||||||
|
import { getDownloadError } from '../../shared/errors';
|
||||||
import constants from '../constants';
|
import constants from '../constants';
|
||||||
|
import { setAppState } from './app';
|
||||||
import { closeModal, pushModal } from './modals';
|
import { closeModal, pushModal } from './modals';
|
||||||
import { loadPrefs, loadGlobalPrefs } from './prefs';
|
import { loadPrefs, loadGlobalPrefs } from './prefs';
|
||||||
import { send } from '../../platform/client/fetch';
|
|
||||||
import { setAppState } from './app';
|
|
||||||
import { startTutorialFirstTime } from './tutorial';
|
import { startTutorialFirstTime } from './tutorial';
|
||||||
import { getDownloadError } from '../../shared/errors';
|
|
||||||
|
|
||||||
const uuid = require('../../platform/uuid');
|
const uuid = require('../../platform/uuid');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import { send } from '../../platform/client/fetch';
|
||||||
import constants from '../constants';
|
import constants from '../constants';
|
||||||
import { closeModal } from './modals';
|
import { closeModal } from './modals';
|
||||||
import { send } from '../../platform/client/fetch';
|
|
||||||
|
|
||||||
export function loadPrefs() {
|
export function loadPrefs() {
|
||||||
return async (dispatch, getState) => {
|
return async (dispatch, getState) => {
|
||||||
|
|
|
@ -2,8 +2,8 @@ import throttle from 'throttleit';
|
||||||
|
|
||||||
import { send } from '../../platform/client/fetch';
|
import { send } from '../../platform/client/fetch';
|
||||||
import constants from '../constants';
|
import constants from '../constants';
|
||||||
import { addNotification, addGenericErrorNotification } from './notifications';
|
|
||||||
import { pushModal } from './modals';
|
import { pushModal } from './modals';
|
||||||
|
import { addNotification, addGenericErrorNotification } from './notifications';
|
||||||
|
|
||||||
export function applyBudgetAction(month, type, args) {
|
export function applyBudgetAction(month, type, args) {
|
||||||
return async function() {
|
return async function() {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { send } from '../../platform/client/fetch';
|
import { send } from '../../platform/client/fetch';
|
||||||
|
import { getUploadError } from '../../shared/errors';
|
||||||
import constants from '../constants';
|
import constants from '../constants';
|
||||||
import { loadPrefs } from './prefs';
|
|
||||||
import { syncAccounts } from './account';
|
import { syncAccounts } from './account';
|
||||||
import { pushModal } from './modals';
|
import { pushModal } from './modals';
|
||||||
import { getUploadError } from '../../shared/errors';
|
import { loadPrefs } from './prefs';
|
||||||
|
|
||||||
export function unregister() {
|
export function unregister() {
|
||||||
return async dispatch => {
|
return async dispatch => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { send } from '../../platform/client/fetch';
|
import { send } from '../../platform/client/fetch';
|
||||||
import constants from '../constants';
|
import constants from '../constants';
|
||||||
import { loadGlobalPrefs } from './prefs';
|
|
||||||
import { loadAllFiles, closeBudget } from './budgets';
|
import { loadAllFiles, closeBudget } from './budgets';
|
||||||
|
import { loadGlobalPrefs } from './prefs';
|
||||||
|
|
||||||
export function getUserData() {
|
export function getUserData() {
|
||||||
return async dispatch => {
|
return async dispatch => {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import React, { useEffect, useState, useContext } from 'react';
|
import React, { useEffect, useState, useContext } from 'react';
|
||||||
|
|
||||||
|
import q, { liveQuery } from 'loot-core/src/client/query-helpers';
|
||||||
import {
|
import {
|
||||||
getStatus,
|
getStatus,
|
||||||
getHasTransactionsQuery
|
getHasTransactionsQuery
|
||||||
} from 'loot-core/src/shared/schedules';
|
} from 'loot-core/src/shared/schedules';
|
||||||
import q, { liveQuery } from 'loot-core/src/client/query-helpers';
|
|
||||||
|
|
||||||
function loadStatuses(schedules, onData) {
|
function loadStatuses(schedules, onData) {
|
||||||
return liveQuery(getHasTransactionsQuery(schedules), onData, {
|
return liveQuery(getHasTransactionsQuery(schedules), onData, {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { parse as parseDate, isValid as isDateValid } from 'date-fns';
|
import { parse as parseDate, isValid as isDateValid } from 'date-fns';
|
||||||
|
|
||||||
import { currencyToAmount, amountToInteger } from '../shared/util';
|
|
||||||
import {
|
import {
|
||||||
dayFromDate,
|
dayFromDate,
|
||||||
getDayMonthRegex,
|
getDayMonthRegex,
|
||||||
|
@ -9,6 +8,7 @@ import {
|
||||||
getShortYearFormat
|
getShortYearFormat
|
||||||
} from '../shared/months';
|
} from '../shared/months';
|
||||||
import q from '../shared/query';
|
import q from '../shared/query';
|
||||||
|
import { currencyToAmount, amountToInteger } from '../shared/util';
|
||||||
|
|
||||||
function isInteger(num) {
|
function isInteger(num) {
|
||||||
return (num | 0) === num;
|
return (num | 0) === num;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { initServer, serverPush } from '../platform/client/fetch';
|
import { initServer, serverPush } from '../platform/client/fetch';
|
||||||
import q from '../shared/query';
|
|
||||||
import { runQuery, liveQuery, pagedQuery } from './query-helpers';
|
|
||||||
import { tracer } from '../shared/test-helpers';
|
|
||||||
import { subDays } from '../shared/months';
|
import { subDays } from '../shared/months';
|
||||||
|
import q from '../shared/query';
|
||||||
|
import { tracer } from '../shared/test-helpers';
|
||||||
|
import { runQuery, liveQuery, pagedQuery } from './query-helpers';
|
||||||
|
|
||||||
function wait(n) {
|
function wait(n) {
|
||||||
return new Promise(resolve => setTimeout(() => resolve(`wait(${n})`), n));
|
return new Promise(resolve => setTimeout(() => resolve(`wait(${n})`), n));
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import app from './app';
|
|
||||||
import queries from './queries';
|
|
||||||
import account from './account';
|
import account from './account';
|
||||||
|
import app from './app';
|
||||||
|
import budgets from './budgets';
|
||||||
import debug from './debug';
|
import debug from './debug';
|
||||||
import profile from './profile';
|
|
||||||
import prefs from './prefs';
|
|
||||||
import modals from './modals';
|
import modals from './modals';
|
||||||
import notifications from './notifications';
|
import notifications from './notifications';
|
||||||
import budgets from './budgets';
|
import prefs from './prefs';
|
||||||
|
import profile from './profile';
|
||||||
|
import queries from './queries';
|
||||||
import tutorial from './tutorial';
|
import tutorial from './tutorial';
|
||||||
import user from './user';
|
import user from './user';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import constants from '../constants';
|
|
||||||
import { setNumberFormat } from '../../shared/util.js';
|
import { setNumberFormat } from '../../shared/util.js';
|
||||||
|
import constants from '../constants';
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
local: null,
|
local: null,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import memoizeOne from 'memoize-one';
|
import memoizeOne from 'memoize-one';
|
||||||
|
|
||||||
import constants from '../constants';
|
|
||||||
import { groupById } from '../../shared/util';
|
import { groupById } from '../../shared/util';
|
||||||
|
import constants from '../constants';
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
newTransactions: [],
|
newTransactions: [],
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import * as monthUtils from '../shared/months';
|
import { addTransactions } from '../server/accounts/sync';
|
||||||
import * as sheet from '../server/sheet';
|
import { runQuery as aqlQuery } from '../server/aql';
|
||||||
|
import * as budgetActions from '../server/budget/actions';
|
||||||
import * as budget from '../server/budget/base';
|
import * as budget from '../server/budget/base';
|
||||||
import * as db from '../server/db';
|
import * as db from '../server/db';
|
||||||
import * as prefs from '../server/prefs';
|
|
||||||
import * as budgetActions from '../server/budget/actions';
|
|
||||||
import { runQuery as aqlQuery } from '../server/aql';
|
|
||||||
import { batchMessages, setSyncingMode } from '../server/sync';
|
|
||||||
import { runHandler, runMutator } from '../server/mutators';
|
import { runHandler, runMutator } from '../server/mutators';
|
||||||
import { addTransactions } from '../server/accounts/sync';
|
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';
|
||||||
|
|
||||||
function pickRandom(list) {
|
function pickRandom(list) {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
|
|
||||||
import thunk from 'redux-thunk';
|
|
||||||
import { createStore, combineReducers, applyMiddleware } from 'redux';
|
import { createStore, combineReducers, applyMiddleware } from 'redux';
|
||||||
|
import thunk from 'redux-thunk';
|
||||||
|
|
||||||
import reducers from '../client/reducers';
|
import reducers from '../client/reducers';
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
import * as sqlite from '../platform/server/sqlite';
|
|
||||||
import * as fetchClient from '../platform/client/fetch';
|
import * as fetchClient from '../platform/client/fetch';
|
||||||
import * as db from '../server/db';
|
import * as sqlite from '../platform/server/sqlite';
|
||||||
import * as sheet from '../server/sheet';
|
|
||||||
import * as rules from '../server/accounts/transaction-rules';
|
import * as rules from '../server/accounts/transaction-rules';
|
||||||
import * as tracking from '../server/tracking/events';
|
import * as db from '../server/db';
|
||||||
import { setSyncingMode } from '../server/sync';
|
|
||||||
import { updateVersion } from '../server/update';
|
|
||||||
import { resetTracer, tracer } from '../shared/test-helpers';
|
|
||||||
import {
|
import {
|
||||||
enableGlobalMutations,
|
enableGlobalMutations,
|
||||||
disableGlobalMutations
|
disableGlobalMutations
|
||||||
} from '../server/mutators';
|
} from '../server/mutators';
|
||||||
|
import * as sheet from '../server/sheet';
|
||||||
|
import { setSyncingMode } from '../server/sync';
|
||||||
|
import * as tracking from '../server/tracking/events';
|
||||||
|
import { updateVersion } from '../server/update';
|
||||||
|
import { resetTracer, tracer } from '../shared/test-helpers';
|
||||||
|
|
||||||
jest.mock('../server/post');
|
jest.mock('../server/post');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const undo = require('../undo');
|
|
||||||
const { captureException, captureBreadcrumb } = require('../../exceptions');
|
const { captureException, captureBreadcrumb } = require('../../exceptions');
|
||||||
const uuid = require('../../uuid');
|
const uuid = require('../../uuid');
|
||||||
|
const undo = require('../undo');
|
||||||
let replyHandlers = new Map();
|
let replyHandlers = new Map();
|
||||||
let listeners = new Map();
|
let listeners = new Map();
|
||||||
let messageQueue = [];
|
let messageQueue = [];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const undo = require('../undo');
|
|
||||||
const uuid = require('../../uuid');
|
const uuid = require('../../uuid');
|
||||||
|
const undo = require('../undo');
|
||||||
let replyHandlers = new Map();
|
let replyHandlers = new Map();
|
||||||
let listeners = new Map();
|
let listeners = new Map();
|
||||||
let messageQueue = [];
|
let messageQueue = [];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const uuid = require('../../uuid');
|
|
||||||
const { getChangedValues } = require('../../../shared/util');
|
const { getChangedValues } = require('../../../shared/util');
|
||||||
|
const uuid = require('../../uuid');
|
||||||
|
|
||||||
// List of recently used states. We don't use a true MRU structure
|
// List of recently used states. We don't use a true MRU structure
|
||||||
// because our needs are simple and we also do some custom reordering.
|
// because our needs are simple and we also do some custom reordering.
|
||||||
|
|
|
@ -2,8 +2,8 @@ let { SQLiteFS } = require('absurd-sql');
|
||||||
let IndexedDBBackend = require('absurd-sql/dist/indexeddb-backend').default;
|
let IndexedDBBackend = require('absurd-sql/dist/indexeddb-backend').default;
|
||||||
|
|
||||||
let connection = require('../connection');
|
let connection = require('../connection');
|
||||||
let { _getModule } = require('../sqlite');
|
|
||||||
let idb = require('../indexeddb');
|
let idb = require('../indexeddb');
|
||||||
|
let { _getModule } = require('../sqlite');
|
||||||
let baseAPI = require('./index.electron.js');
|
let baseAPI = require('./index.electron.js');
|
||||||
let join = require('./path-join');
|
let join = require('./path-join');
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import csvStringify from 'csv-stringify/lib/sync';
|
import csvStringify from 'csv-stringify/lib/sync';
|
||||||
|
|
||||||
import { runQuery as aqlQuery } from '../aql';
|
|
||||||
import { integerToAmount } from '../../shared/util';
|
import { integerToAmount } from '../../shared/util';
|
||||||
|
import { runQuery as aqlQuery } from '../aql';
|
||||||
|
|
||||||
export async function exportToCSV(
|
export async function exportToCSV(
|
||||||
transactions,
|
transactions,
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import asyncStorage from '../../platform/server/asyncStorage';
|
import asyncStorage from '../../platform/server/asyncStorage';
|
||||||
import * as db from '../db';
|
|
||||||
import { getServer } from '../server-config';
|
|
||||||
import * as bankSync from './sync';
|
|
||||||
import { fromPlaidAccountType } from '../../shared/accounts';
|
import { fromPlaidAccountType } from '../../shared/accounts';
|
||||||
import { amountToInteger } from '../../shared/util';
|
import { amountToInteger } from '../../shared/util';
|
||||||
import { post } from '../post';
|
import * as db from '../db';
|
||||||
import { runMutator } from '../mutators';
|
import { runMutator } from '../mutators';
|
||||||
|
import { post } from '../post';
|
||||||
|
import { getServer } from '../server-config';
|
||||||
|
import * as bankSync from './sync';
|
||||||
|
|
||||||
const uuid = require('../../platform/uuid');
|
const uuid = require('../../platform/uuid');
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import csv2json from 'csv-parse/lib/sync';
|
import csv2json from 'csv-parse/lib/sync';
|
||||||
|
|
||||||
import fs from '../../platform/server/fs';
|
import fs from '../../platform/server/fs';
|
||||||
import qif2json from './qif2json';
|
|
||||||
import { dayFromDate } from '../../shared/months';
|
import { dayFromDate } from '../../shared/months';
|
||||||
import { looselyParseAmount } from '../../shared/util';
|
import { looselyParseAmount } from '../../shared/util';
|
||||||
|
import qif2json from './qif2json';
|
||||||
|
|
||||||
export function parseFile(filepath, options) {
|
export function parseFile(filepath, options) {
|
||||||
let errors = [];
|
let errors = [];
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import * as d from 'date-fns';
|
import * as d from 'date-fns';
|
||||||
|
|
||||||
|
import { amountToInteger } from '../../shared/util';
|
||||||
|
import * as db from '../db';
|
||||||
|
import * as prefs from '../prefs';
|
||||||
import { parseFile } from './parse-file';
|
import { parseFile } from './parse-file';
|
||||||
import { reconcileTransactions } from './sync';
|
import { reconcileTransactions } from './sync';
|
||||||
import * as prefs from '../prefs';
|
|
||||||
import * as db from '../db';
|
|
||||||
import { amountToInteger } from '../../shared/util';
|
|
||||||
|
|
||||||
beforeEach(global.emptyDatabase());
|
beforeEach(global.emptyDatabase());
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import * as dateFns from 'date-fns';
|
import * as dateFns from 'date-fns';
|
||||||
|
|
||||||
import { RuleError } from '../errors';
|
|
||||||
import {
|
import {
|
||||||
monthFromDate,
|
monthFromDate,
|
||||||
yearFromDate,
|
yearFromDate,
|
||||||
|
@ -10,9 +9,10 @@ import {
|
||||||
subDays,
|
subDays,
|
||||||
parseDate
|
parseDate
|
||||||
} from '../../shared/months';
|
} from '../../shared/months';
|
||||||
import { fastSetMerge } from '../../shared/util';
|
|
||||||
import { sortNumbers, getApproxNumberThreshold } from '../../shared/rules';
|
import { sortNumbers, getApproxNumberThreshold } from '../../shared/rules';
|
||||||
import { recurConfigToRSchedule } from '../../shared/schedules';
|
import { recurConfigToRSchedule } from '../../shared/schedules';
|
||||||
|
import { fastSetMerge } from '../../shared/util';
|
||||||
|
import { RuleError } from '../errors';
|
||||||
import { Schedule as RSchedule } from '../util/rschedule';
|
import { Schedule as RSchedule } from '../util/rschedule';
|
||||||
|
|
||||||
function safeNumber(n) {
|
function safeNumber(n) {
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
import title from './title';
|
import * as monthUtils from '../../shared/months';
|
||||||
import * as db from '../db';
|
|
||||||
import { hasFieldsChanged, amountToInteger } from '../../shared/util';
|
|
||||||
import {
|
import {
|
||||||
makeChild as makeChildTransaction,
|
makeChild as makeChildTransaction,
|
||||||
recalculateSplit
|
recalculateSplit
|
||||||
} from '../../shared/transactions';
|
} from '../../shared/transactions';
|
||||||
import * as monthUtils from '../../shared/months';
|
import { hasFieldsChanged, amountToInteger } from '../../shared/util';
|
||||||
|
import * as db from '../db';
|
||||||
|
import { runMutator } from '../mutators';
|
||||||
import { getServer } from '../server-config';
|
import { getServer } from '../server-config';
|
||||||
import { batchMessages } from '../sync';
|
import { batchMessages } from '../sync';
|
||||||
import { runMutator } from '../mutators';
|
|
||||||
import { getStartingBalancePayee } from './payees';
|
import { getStartingBalancePayee } from './payees';
|
||||||
|
import title from './title';
|
||||||
import { runRules } from './transaction-rules';
|
import { runRules } from './transaction-rules';
|
||||||
import { batchUpdateTransactions } from './transactions';
|
import { batchUpdateTransactions } from './transactions';
|
||||||
|
|
||||||
const dateFns = require('date-fns');
|
|
||||||
const levenshtein = require('damerau-levenshtein');
|
const levenshtein = require('damerau-levenshtein');
|
||||||
|
const dateFns = require('date-fns');
|
||||||
|
|
||||||
const { post } = require('../post');
|
|
||||||
const uuid = require('../../platform/uuid');
|
const uuid = require('../../platform/uuid');
|
||||||
|
const { post } = require('../post');
|
||||||
|
|
||||||
// Plaid article about API options:
|
// Plaid article about API options:
|
||||||
// https://support.plaid.com/customer/en/portal/articles/2612155-transactions-returned-per-request
|
// https://support.plaid.com/customer/en/portal/articles/2612155-transactions-returned-per-request
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import * as monthUtils from '../../shared/months';
|
||||||
import * as db from '../db';
|
import * as db from '../db';
|
||||||
import { loadMappings } from '../db/mappings';
|
import { loadMappings } from '../db/mappings';
|
||||||
import { getServer } from '../server-config';
|
import { getServer } from '../server-config';
|
||||||
|
@ -7,9 +8,8 @@ import {
|
||||||
addTransactions,
|
addTransactions,
|
||||||
fromPlaid
|
fromPlaid
|
||||||
} from './sync';
|
} from './sync';
|
||||||
import * as monthUtils from '../../shared/months';
|
|
||||||
import * as transfer from './transfer';
|
|
||||||
import { loadRules, insertRule } from './transaction-rules';
|
import { loadRules, insertRule } from './transaction-rules';
|
||||||
|
import * as transfer from './transfer';
|
||||||
|
|
||||||
const snapshotDiff = require('snapshot-diff');
|
const snapshotDiff = require('snapshot-diff');
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,23 @@
|
||||||
|
import {
|
||||||
|
currentDay,
|
||||||
|
addDays,
|
||||||
|
subDays,
|
||||||
|
parseDate,
|
||||||
|
dayFromDate
|
||||||
|
} from '../../shared/months';
|
||||||
|
import {
|
||||||
|
FIELD_TYPES,
|
||||||
|
sortNumbers,
|
||||||
|
getApproxNumberThreshold
|
||||||
|
} from '../../shared/rules';
|
||||||
|
import { partitionByField, fastSetMerge } from '../../shared/util';
|
||||||
|
import { schemaConfig } from '../aql';
|
||||||
import * as db from '../db';
|
import * as db from '../db';
|
||||||
|
import { getMappings } from '../db/mappings';
|
||||||
|
import { RuleError } from '../errors';
|
||||||
|
import { requiredFields, toDateRepr } from '../models';
|
||||||
|
import { setSyncingMode, batchMessages } from '../sync';
|
||||||
|
import { addSyncListener } from '../sync/index';
|
||||||
import {
|
import {
|
||||||
Condition,
|
Condition,
|
||||||
Action,
|
Action,
|
||||||
|
@ -8,20 +27,6 @@ import {
|
||||||
migrateIds,
|
migrateIds,
|
||||||
iterateIds
|
iterateIds
|
||||||
} from './rules';
|
} from './rules';
|
||||||
import { getMappings } from '../db/mappings';
|
|
||||||
import { addDays, subDays, parseDate, dayFromDate } from '../../shared/months';
|
|
||||||
import { addSyncListener } from '../sync/index';
|
|
||||||
import { RuleError } from '../errors';
|
|
||||||
import {
|
|
||||||
FIELD_TYPES,
|
|
||||||
sortNumbers,
|
|
||||||
getApproxNumberThreshold
|
|
||||||
} from '../../shared/rules';
|
|
||||||
import { requiredFields, toDateRepr } from '../models';
|
|
||||||
import { currentDay } from '../../shared/months';
|
|
||||||
import { partitionByField, fastSetMerge } from '../../shared/util';
|
|
||||||
import { setSyncingMode, batchMessages } from '../sync';
|
|
||||||
import { schemaConfig } from '../aql';
|
|
||||||
|
|
||||||
// TODO: Detect if it looks like the user is creating a rename rule
|
// TODO: Detect if it looks like the user is creating a rename rule
|
||||||
// and prompt to create it in the pre phase instead
|
// and prompt to create it in the pre phase instead
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
|
import q from '../../shared/query';
|
||||||
|
import { runQuery } from '../aql';
|
||||||
import * as db from '../db';
|
import * as db from '../db';
|
||||||
|
import { loadMappings } from '../db/mappings';
|
||||||
import {
|
import {
|
||||||
getRules,
|
getRules,
|
||||||
loadRules,
|
loadRules,
|
||||||
|
@ -13,9 +16,6 @@ import {
|
||||||
updateCategoryRules,
|
updateCategoryRules,
|
||||||
migrateOldRules
|
migrateOldRules
|
||||||
} from './transaction-rules';
|
} from './transaction-rules';
|
||||||
import { loadMappings } from '../db/mappings';
|
|
||||||
import { runQuery } from '../aql';
|
|
||||||
import q from '../../shared/query';
|
|
||||||
|
|
||||||
// TODO: write tests to make sure payee renaming is "pre" and category
|
// TODO: write tests to make sure payee renaming is "pre" and category
|
||||||
// setting is "null" stage
|
// setting is "null" stage
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { batchMessages } from '../sync';
|
|
||||||
import * as db from '../db';
|
import * as db from '../db';
|
||||||
import { incrFetch, whereIn } from '../db/util';
|
import { incrFetch, whereIn } from '../db/util';
|
||||||
import * as transfer from './transfer';
|
import { batchMessages } from '../sync';
|
||||||
import * as rules from './transaction-rules';
|
import * as rules from './transaction-rules';
|
||||||
|
import * as transfer from './transfer';
|
||||||
|
|
||||||
const connection = require('../../platform/server/connection');
|
const connection = require('../../platform/server/connection');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import { expectSnapshotWithDiffer } from '../../mocks/util';
|
||||||
import * as db from '../db';
|
import * as db from '../db';
|
||||||
import * as transfer from './transfer';
|
import * as transfer from './transfer';
|
||||||
import { expectSnapshotWithDiffer } from '../../mocks/util';
|
|
||||||
|
|
||||||
beforeEach(global.emptyDatabase());
|
beforeEach(global.emptyDatabase());
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
import * as monthUtils from '../shared/months';
|
||||||
|
import q from '../shared/query';
|
||||||
|
import {
|
||||||
|
ungroupTransactions,
|
||||||
|
updateTransaction,
|
||||||
|
deleteTransaction
|
||||||
|
} from '../shared/transactions';
|
||||||
|
import { integerToAmount } from '../shared/util';
|
||||||
import { addTransactions } from './accounts/sync';
|
import { addTransactions } from './accounts/sync';
|
||||||
import {
|
import {
|
||||||
accountModel,
|
accountModel,
|
||||||
|
@ -6,22 +14,14 @@ import {
|
||||||
payeeModel,
|
payeeModel,
|
||||||
payeeRuleModel
|
payeeRuleModel
|
||||||
} from './api-models';
|
} from './api-models';
|
||||||
import {
|
|
||||||
ungroupTransactions,
|
|
||||||
updateTransaction,
|
|
||||||
deleteTransaction
|
|
||||||
} from '../shared/transactions';
|
|
||||||
import * as db from './db';
|
|
||||||
import * as sheet from './sheet';
|
|
||||||
import * as prefs from './prefs';
|
|
||||||
import * as monthUtils from '../shared/months';
|
|
||||||
import * as cloudStorage from './cloud-storage';
|
|
||||||
import { setSyncingMode, batchMessages } from './sync';
|
|
||||||
import { getClock } from './crdt';
|
|
||||||
import { runMutator } from './mutators';
|
|
||||||
import { integerToAmount } from '../shared/util';
|
|
||||||
import { runQuery as aqlQuery } from './aql';
|
import { runQuery as aqlQuery } from './aql';
|
||||||
import q from '../shared/query';
|
import * as cloudStorage from './cloud-storage';
|
||||||
|
import { getClock } from './crdt';
|
||||||
|
import * as db from './db';
|
||||||
|
import { runMutator } from './mutators';
|
||||||
|
import * as prefs from './prefs';
|
||||||
|
import * as sheet from './sheet';
|
||||||
|
import { setSyncingMode, batchMessages } from './sync';
|
||||||
|
|
||||||
const connection = require('../platform/server/connection');
|
const connection = require('../platform/server/connection');
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue