A local-first personal finance app
:art: (prettier) adding trailing commas (#647)
Matiss Janis Aboltins0b3c41201ab7
diff --git a/.prettierrc.json b/.prettierrc.jsonindex b0a179d48c..5393aaf2da 100644--- a/.prettierrc.json+++ b/.prettierrc.json@@ -1,5 +1,5 @@{"singleQuote": true,- "trailingComma": "none",+ "trailingComma": "all","arrowParens": "avoid"}diff --git a/packages/desktop-client/src/browser-preload.browser.js b/packages/desktop-client/src/browser-preload.browser.jsindex 5886a6b2c4..b8b26bee6f 100644--- a/packages/desktop-client/src/browser-preload.browser.js+++ b/packages/desktop-client/src/browser-preload.browser.js@@ -28,8 +28,8 @@ function createBackendWorker() {isDev: IS_DEV,hash: process.env.REACT_APP_BACKEND_WORKER_HASH,isSharedArrayBufferOverrideEnabled: localStorage.getItem(- 'SharedArrayBufferOverride'- )+ 'SharedArrayBufferOverride',+ ),});if (IS_DEV || IS_PERF_BUILD) {@@ -102,8 +102,8 @@ global.Actual = {new MouseEvent('click', {view: window,bubbles: true,- cancelable: true- })+ cancelable: true,+ }),);input.addEventListener('change', e => {@@ -149,7 +149,7 @@ global.Actual = {ipcConnect: () => {},getServerSocket: async () => {return worker;- }+ },};if (IS_DEV) {diff --git a/packages/desktop-client/src/browser-server.js b/packages/desktop-client/src/browser-server.jsindex 1093cd8190..984e1799e4 100644--- a/packages/desktop-client/src/browser-server.js+++ b/packages/desktop-client/src/browser-server.js@@ -13,7 +13,7 @@ self.addEventListener('message', e => {if (!self.SharedArrayBuffer && !msg.isSharedArrayBufferOverrideEnabled) {self.postMessage({type: 'app-init-failure',- SharedArrayBufferMissing: true+ SharedArrayBufferMissing: true,});return;}@@ -33,12 +33,12 @@ self.addEventListener('message', e => {console.log(err);let msg = {type: 'app-init-failure',- IDBFailure: err.message.includes('indexeddb-failure')+ IDBFailure: err.message.includes('indexeddb-failure'),};self.postMessage(msg);throw err;- }+ },);}}diff --git a/packages/desktop-client/src/components/AnimatedRefresh.js b/packages/desktop-client/src/components/AnimatedRefresh.jsindex c80445d4a1..8ea1d7000e 100644--- a/packages/desktop-client/src/components/AnimatedRefresh.js+++ b/packages/desktop-client/src/components/AnimatedRefresh.js@@ -7,7 +7,7 @@ import Refresh from 'loot-design/src/svg/v1/Refresh';let spin = css.keyframes({'0%': { transform: 'rotateZ(0deg)' },- '100%': { transform: 'rotateZ(360deg)' }+ '100%': { transform: 'rotateZ(360deg)' },});export default function AnimatedRefresh({ animating, iconStyle }) {diff --git a/packages/desktop-client/src/components/App.js b/packages/desktop-client/src/components/App.jsindex 18550f2c73..530a34f662 100644--- a/packages/desktop-client/src/components/App.js+++ b/packages/desktop-client/src/components/App.js@@ -6,7 +6,7 @@ import { css } from 'glamor';import * as actions from 'loot-core/src/client/actions';import {init as initConnection,- send+ send,} from 'loot-core/src/platform/client/fetch';import { styles, hasHiddenScrollbars } from 'loot-design/src/style';@@ -23,7 +23,7 @@ class App extends React.Component {state = {fatalError: null,initializing: true,- hiddenScrollbars: hasHiddenScrollbars()+ hiddenScrollbars: hasHiddenScrollbars(),};async init() {@@ -96,9 +96,9 @@ class App extends React.Component {{height: '100%',backgroundColor: '#E8ECF0',- overflow: 'hidden'+ overflow: 'hidden',},- styles.lightScrollbar+ styles.lightScrollbar,])}>{fatalError ? (@@ -134,7 +134,7 @@ export default connect(state => ({budgetId: state.prefs.local && state.prefs.local.id,cloudFileId: state.prefs.local && state.prefs.local.cloudFileId,- loadingText: state.app.loadingText+ loadingText: state.app.loadingText,}),- actions+ actions,)(App);diff --git a/packages/desktop-client/src/components/AppBackground.js b/packages/desktop-client/src/components/AppBackground.jsindex 254b708126..5b4dfdd2d0 100644--- a/packages/desktop-client/src/components/AppBackground.js+++ b/packages/desktop-client/src/components/AppBackground.js@@ -23,7 +23,7 @@ function AppBackground({ initializing, loadingText }) {padding: 50,paddingTop: 200,color: colors.n1,- alignItems: 'center'+ alignItems: 'center',})}><Block style={{ marginBottom: 20, fontSize: 18 }}>diff --git a/packages/desktop-client/src/components/Background.js b/packages/desktop-client/src/components/Background.jsindex 7d337ad59a..1c95aa2a63 100644--- a/packages/desktop-client/src/components/Background.js+++ b/packages/desktop-client/src/components/Background.js@@ -14,7 +14,7 @@ function Background({ selected }) {left: 0,right: 0,background: `url(${BG}) no-repeat center center fixed`,- backgroundSize: '100% 100%'+ backgroundSize: '100% 100%',})}></div>);diff --git a/packages/desktop-client/src/components/BankSyncStatus.js b/packages/desktop-client/src/components/BankSyncStatus.jsindex 665a04c970..06565d2f38 100644--- a/packages/desktop-client/src/components/BankSyncStatus.js+++ b/packages/desktop-client/src/components/BankSyncStatus.js@@ -19,7 +19,7 @@ function BankSyncStatus({ accountsSyncing }) {from: { opacity: 0, transform: 'translateY(-100px)' },enter: { opacity: 1, transform: 'translateY(0)' },leave: { opacity: 0, transform: 'translateY(-100px)' },- unique: true+ unique: true,});return (@@ -31,7 +31,7 @@ function BankSyncStatus({ accountsSyncing }) {right: 0,marginTop: 5,alignItems: 'center',- zIndex: 501+ zIndex: 501,}}>{transitions.map(@@ -46,7 +46,7 @@ function BankSyncStatus({ accountsSyncing }) {padding: '5px 13px',flexDirection: 'row',alignItems: 'center',- ...styles.shadow+ ...styles.shadow,}}><AnimatedRefresh@@ -56,7 +56,7 @@ function BankSyncStatus({ accountsSyncing }) {<Text>Syncing {item}</Text></View></animated.div>- )+ ),)}</View>);@@ -64,7 +64,7 @@ function BankSyncStatus({ accountsSyncing }) {export default connect(state => ({- accountsSyncing: state.account.accountsSyncing+ accountsSyncing: state.account.accountsSyncing,}),- actions+ actions,)(BankSyncStatus);diff --git a/packages/desktop-client/src/components/Box.js b/packages/desktop-client/src/components/Box.jsindex 0649804b38..fee24a48cf 100644--- a/packages/desktop-client/src/components/Box.js+++ b/packages/desktop-client/src/components/Box.js@@ -15,7 +15,7 @@ function Box({ flex, children, direction, style }) {...style,flex: getFlex(flex),display: 'flex',- flexDirection: direction || 'column'+ flexDirection: direction || 'column',}}>{children}diff --git a/packages/desktop-client/src/components/Debugger.js b/packages/desktop-client/src/components/Debugger.jsindex de887c3f30..413db67e39 100644--- a/packages/desktop-client/src/components/Debugger.js+++ b/packages/desktop-client/src/components/Debugger.js@@ -5,13 +5,13 @@ import CodeMirror from 'codemirror';import * as spreadsheet from 'loot-core/src/client/sheetql/spreadsheet';import {send,- init as initConnection+ init as initConnection,} from 'loot-core/src/platform/client/fetch';import {View,Button,Input,- InlineField+ InlineField,} from 'loot-design/src/components/common';import { colors } from 'loot-design/src/style';@@ -24,7 +24,7 @@ class Debugger extends React.Component {selecting: false,name: '__global!tmp',collapsed: true,- node: null+ node: null,};toggleRecord = () => {@@ -44,7 +44,7 @@ class Debugger extends React.Component {init() {this.mirror = CodeMirror(this.node, {- theme: 'monokai'+ theme: 'monokai',});this.mirror.setSize('100%', '100%');@@ -173,7 +173,7 @@ class Debugger extends React.Component {<Viewstyle={{height: '100%',- '& .CodeMirror': { border: '1px solid ' + colors.b4 }+ '& .CodeMirror': { border: '1px solid ' + colors.b4 },}}><div style={{ flex: 1, overflow: 'hidden' }}>{children}</div>@@ -190,12 +190,12 @@ class Debugger extends React.Component {color: 'white',zIndex: 1000,flexDirection: 'row',- alignItems: 'center'+ alignItems: 'center',},!collapsed && {width: 700,- height: 200- }+ height: 200,+ },]}>{collapsed ? (@@ -207,7 +207,7 @@ class Debugger extends React.Component {height: 10,backgroundColor: '#303030',marginRight: 10,- borderRadius: 10+ borderRadius: 10,}}/><Button onClick={this.toggleRecord} style={{ marginRight: 10 }}>@@ -225,7 +225,7 @@ class Debugger extends React.Component {flexDirection: 'row',justifyContent: 'flex-start',marginBottom: 5,- flexShrink: 0+ flexShrink: 0,}}><Button@@ -233,7 +233,7 @@ class Debugger extends React.Component {backgroundColor: '#303030',color: 'white',padding: '2px 5px',- marginRight: 5+ marginRight: 5,}}onClick={this.onClose}>@@ -244,11 +244,11 @@ class Debugger extends React.Component {{backgroundColor: '#303030',color: 'white',- padding: '2px 5px'+ padding: '2px 5px',},selecting && {- backgroundColor: colors.p7- }+ backgroundColor: colors.p7,+ },]}onClick={this.onSelect}>@@ -262,7 +262,7 @@ class Debugger extends React.Component {style={{backgroundColor: '#303030',color: 'white',- flex: 1+ flex: 1,}}/></InlineField>@@ -284,7 +284,7 @@ class Debugger extends React.Component {style={{backgroundColor: 'rgba(0, 0, 0, 0)',height: 30,- overflow: 'scroll'+ overflow: 'scroll',}}>{node && JSON.stringify(node._dependencies, null, 2)}@@ -296,7 +296,7 @@ class Debugger extends React.Component {backgroundColor: 'rgba(0, 0, 0, 0)',transition: 'background-color .5s',height: 30,- overflow: 'scroll'+ overflow: 'scroll',}}ref={n => (this.valueNode = n)}>diff --git a/packages/desktop-client/src/components/FatalError.js b/packages/desktop-client/src/components/FatalError.jsindex 32b7869fb6..ee225559f2 100644--- a/packages/desktop-client/src/components/FatalError.js+++ b/packages/desktop-client/src/components/FatalError.js@@ -8,7 +8,7 @@ import {Modal,P,Link,- Button+ Button,} from 'loot-design/src/components/common';import { Checkbox } from 'loot-design/src/components/forms';import { colors } from 'loot-design/src/style';@@ -63,7 +63,7 @@ class FatalError extends React.Component {style={{alignItems: 'center',justifyContent: 'center',- height: '100%'+ height: '100%',}}><Stack@@ -73,7 +73,7 @@ class FatalError extends React.Component {color: colors.r4,lineHeight: '1.5em',fontSize: 15,- '& a': { color: colors.r4 }+ '& a': { color: colors.r4 },}}><Text>{msg}</Text>@@ -127,7 +127,7 @@ class FatalError extends React.Component {style={{marginTop: 5,height: 100,- overflow: 'auto'+ overflow: 'auto',}}>{error.stack}@@ -183,7 +183,7 @@ function SharedArrayBufferOverride() {textDecoration: 'underline !important',boxShadow: 'none !important',display: 'inline !important',- font: 'inherit !important'+ font: 'inherit !important',}}>Advanced optionsdiff --git a/packages/desktop-client/src/components/FinancesApp.js b/packages/desktop-client/src/components/FinancesApp.jsindex d8e44eb6d1..5ec661d147 100644--- a/packages/desktop-client/src/components/FinancesApp.js+++ b/packages/desktop-client/src/components/FinancesApp.js@@ -8,7 +8,7 @@ import {Redirect,Switch,useLocation,- NavLink+ NavLink,} from 'react-router-dom';import { CompatRouter } from 'react-router-dom-v5-compat';@@ -64,7 +64,7 @@ function PageRoute({ path, component: Component }) {<Viewstyle={{flex: 1,- display: props.match ? 'flex' : 'none'+ display: props.match ? 'flex' : 'none',}}><Component {...props} />@@ -159,7 +159,7 @@ function NavTab({ icon: TabIcon, name, path }) {color: '#8E8E8F',display: 'flex',flexDirection: 'column',- textDecoration: 'none'+ textDecoration: 'none',}}activeStyle={{ color: colors.p5 }}>@@ -185,7 +185,7 @@ function MobileNavTabs() {height: '80px',justifyContent: 'space-around',paddingTop: 10,- width: '100%'+ width: '100%',}}><NavTab name="Budget" path="/budget" icon={Wallet} isActive={false} />@@ -233,7 +233,7 @@ class FinancesApp extends React.Component {handleWindowResize() {this.setState({isMobile: isMobile(),- windowWidth: window.innerWidth+ windowWidth: window.innerWidth,});}@@ -266,7 +266,7 @@ class FinancesApp extends React.Component {checkForUpgradeNotifications(this.props.addNotification,this.props.resetSync,- this.history+ this.history,);}, 100);@@ -295,7 +295,7 @@ class FinancesApp extends React.Component {flexDirection: 'column',overflow: 'hidden',position: 'relative',- width: '100%'+ width: '100%',}}>{!this.state.isMobile && (@@ -306,7 +306,7 @@ class FinancesApp extends React.Component {top: 0,left: 0,right: 0,- zIndex: 1000+ zIndex: 1000,}}/>)}@@ -315,7 +315,7 @@ class FinancesApp extends React.Component {flex: 1,display: 'flex',overflow: 'auto',- position: 'relative'+ position: 'relative',}}><Notifications />diff --git a/packages/desktop-client/src/components/FloatableSidebar.js b/packages/desktop-client/src/components/FloatableSidebar.jsindex a272c610c7..eaa3afa674 100644--- a/packages/desktop-client/src/components/FloatableSidebar.js+++ b/packages/desktop-client/src/components/FloatableSidebar.js@@ -23,7 +23,7 @@ export function SidebarProvider({ children }) {on: (name, listener) => {emitter.on(name, listener);return () => emitter.off(name, listener);- }+ },}}>{children}@@ -46,7 +46,7 @@ function Sidebar({ floatingSidebar }) {useEffect(() => {let cleanups = [sidebar.on('show', () => setHidden(false)),- sidebar.on('hide', () => setHidden(true))+ sidebar.on('hide', () => setHidden(true)),];return () => {cleanups.forEach(fn => fn());@@ -65,7 +65,7 @@ function Sidebar({ floatingSidebar }) {bottom: 0,left: 0,width: hidden ? 0 : 160,- zIndex: 999+ zIndex: 999,}}></View>)}@@ -94,7 +94,7 @@ function Sidebar({ floatingSidebar }) {: '0 15px 30px 0 rgba(0,0,0,0.25), 0 3px 15px 0 rgba(0,0,0,.5)',transform: `translateY(${!floatingSidebar ? -50 : 0}px)translateX(${hidden ? -SIDEBAR_WIDTH : 0}px)`,- transition: 'transform .5s, box-shadow .5s'+ transition: 'transform .5s, box-shadow .5s',}}><SidebarWithData />@@ -107,14 +107,14 @@ function Sidebar({ floatingSidebar }) {opacity: floatingSidebar ? 0 : 1,transform: `translateX(${floatingSidebar ? -50 : 0}px)`,transition: 'transform .4s, opacity .2s',- width: SIDEBAR_WIDTH+ width: SIDEBAR_WIDTH,},floatingSidebar && {position: 'absolute',top: 0,bottom: 0,- left: 0- }+ left: 0,+ },]}></View></>@@ -124,6 +124,6 @@ function Sidebar({ floatingSidebar }) {export default withRouter(connect(state => ({ floatingSidebar: state.prefs.global.floatingSidebar }),- actions- )(Sidebar)+ actions,+ )(Sidebar),);diff --git a/packages/desktop-client/src/components/LoggedInUser.js b/packages/desktop-client/src/components/LoggedInUser.jsindex 9e8bdb09ac..41fec806e0 100644--- a/packages/desktop-client/src/components/LoggedInUser.js+++ b/packages/desktop-client/src/components/LoggedInUser.js@@ -8,7 +8,7 @@ import {Text,Button,Tooltip,- Menu+ Menu,} from 'loot-design/src/components/common';import { colors } from 'loot-design/src/style';@@ -24,7 +24,7 @@ function LoggedInUser({pushModal,closeBudget,style,- color+ color,}) {let [loading, setLoading] = useState(true);let [menuOpen, setMenuOpen] = useState(false);@@ -89,7 +89,7 @@ function LoggedInUser({onMenuSelect={onMenuSelect}items={[{ name: 'change-password', text: 'Change password' },- { name: 'sign-out', text: 'Sign out' }+ { name: 'sign-out', text: 'Sign out' },]}/></Tooltip>@@ -105,7 +105,7 @@ export default connect(state => ({userData: state.user.data,files: state.budgets.allFiles,- budgetId: state.prefs.local && state.prefs.local.id+ budgetId: state.prefs.local && state.prefs.local.id,}),- actions+ actions,)(withRouter(LoggedInUser));diff --git a/packages/desktop-client/src/components/ManageRules.js b/packages/desktop-client/src/components/ManageRules.jsindex 836b7da87c..ac85aa98d2 100644--- a/packages/desktop-client/src/components/ManageRules.js+++ b/packages/desktop-client/src/components/ManageRules.js@@ -3,7 +3,7 @@ import React, {useEffect,useRef,useCallback,- useMemo+ useMemo,} from 'react';import { useDispatch, useSelector } from 'react-redux';@@ -27,7 +27,7 @@ import {Button,Stack,ExternalLink,- Input+ Input,} from 'loot-design/src/components/common';import {SelectCell,@@ -36,12 +36,12 @@ import {Cell,CellButton,TableHeader,- useTableNavigator+ useTableNavigator,} from 'loot-design/src/components/table';import useSelected, {useSelectedDispatch,useSelectedItems,- SelectedProvider+ SelectedProvider,} from 'loot-design/src/components/useSelected';import { colors } from 'loot-design/src/style';import ArrowRight from 'loot-design/src/svg/v0/RightArrow2';@@ -53,7 +53,7 @@ export function Value({field,inline = false,data: dataProp,- describe = x => x.name+ describe = x => x.name,}) {let { data, dateFormat } = useSelector(state => {let data;@@ -77,7 +77,7 @@ export function Value({return {data,- dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy'+ dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy',};});let [expanded, setExpanded] = useState(false);@@ -178,7 +178,7 @@ export function Value({{...css({color: colors.p4,textDecoration: 'none',- ':hover': { textDecoration: 'underline' }+ ':hover': { textDecoration: 'underline' },})}>{numHidden} more items...@@ -208,7 +208,7 @@ export function ConditionExpression({value,options,stage,- style+ style,}) {return (<View@@ -221,9 +221,9 @@ export function ConditionExpression({padding: '3px 5px',whiteSpace: 'nowrap',overflow: 'hidden',- textOverflow: 'ellipsis'+ textOverflow: 'ellipsis',},- style+ style,]}><Text style={{ color: colors.p4 }}>{mapField(field, options)}</Text>{' '}@@ -268,9 +268,9 @@ export function ActionExpression({ field, op, value, options, style }) {padding: '3px 5px',whiteSpace: 'nowrap',overflow: 'hidden',- textOverflow: 'ellipsis'+ textOverflow: 'ellipsis',},- style+ style,]}>{op === 'set' ? (@@ -299,7 +299,7 @@ let Rule = React.memo(focusedField,onHover,onEdit,- onEditRule+ onEditRule,}) => {let dispatchSelected = useSelectedDispatch();let borderColor = selected ? colors.b8 : colors.border;@@ -336,7 +336,7 @@ let Rule = React.memo(backgroundColor: colors.b10,color: colors.b1,borderRadius: 4,- padding: '3px 5px'+ padding: '3px 5px',}}>{rule.stage}@@ -395,13 +395,13 @@ let Rule = React.memo(</Cell></Row>);- }+ },);let SimpleTable = React.forwardRef(({ data, navigator, loadMore, style, onHoverLeave, children, ...props },- ref+ ref,) => {let contentRef = useRef();let contentHeight = useRef();@@ -431,9 +431,9 @@ let SimpleTable = React.forwardRef({flex: 1,outline: 'none',- '& .animated .animated-row': { transition: '.25s transform' }+ '& .animated .animated-row': { transition: '.25s transform' },},- style+ style,]}tabIndex="1"{...getNavigatorProps(props)}@@ -449,7 +449,7 @@ let SimpleTable = React.forwardRef(</View></View>);- }+ },);function RulesHeader() {@@ -478,7 +478,7 @@ function RulesList({collapsed: borderCollapsed,onHover,onCollapse,- onEditRule+ onEditRule,}) {if (rules.length === 0) {return null;@@ -534,7 +534,7 @@ function ruleToString(rule, data) {friendlyOp(cond.op),cond.op === 'oneOf'? cond.value.map(v => mapValue(cond.field, v, data)).join(', ')- : mapValue(cond.field, cond.value, data)+ : mapValue(cond.field, cond.value, data),]);let actions = rule.actions.flatMap(action => {if (action.op === 'set') {@@ -542,7 +542,7 @@ function ruleToString(rule, data) {friendlyOp(action.op),mapField(action.field),'to',- mapValue(action.field, action.value, data)+ mapValue(action.field, action.value, data),];} else if (action.op === 'link-schedule') {let schedule = data.schedules.find(s => s.id === action.value);@@ -550,8 +550,8 @@ function ruleToString(rule, data) {friendlyOp(action.op),describeSchedule(schedule,- data.payees.find(p => p.id === schedule._payee)- )+ data.payees.find(p => p.id === schedule._payee),+ ),];} else {return [];@@ -574,7 +574,7 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {payees: state.queries.payees,categories: state.queries.categories.list,accounts: state.queries.accounts,- schedules+ schedules,}));let filteredRules = useMemo(@@ -584,9 +584,9 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {: rules.filter(rule =>ruleToString(rule, filterData).toLowerCase()- .includes(filter.toLowerCase())+ .includes(filter.toLowerCase()),),- [rules, filter, filterData]+ [rules, filter, filterData],);let selectedInst = useSelected('manage-rules', allRules, []);let [hoveredRule, setHoveredRule] = useState(null);@@ -598,7 +598,7 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {let loadedRules = null;if (payeeId) {loadedRules = await send('payees-get-rules', {- id: payeeId+ id: payeeId,});} else {loadedRules = await send('rules-get');@@ -633,7 +633,7 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {async function onDeleteSelected() {setLoading(true);let { someDeletionsFailed } = await send('rule-delete-all', [- ...selectedInst.items+ ...selectedInst.items,]);if (someDeletionsFailed) {@@ -666,8 +666,8 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {});setLoading(false);- }- })+ },+ }),);}, []);@@ -679,17 +679,17 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {field: 'payee',op: 'is',value: payeeId || null,- type: 'id'- }+ type: 'id',+ },],actions: [{op: 'set',field: 'category',value: null,- type: 'id'- }- ]+ type: 'id',+ },+ ],};dispatch(@@ -706,8 +706,8 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {});setLoading(false);- }- })+ },+ }),);}@@ -727,7 +727,7 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {flexDirection: 'row',alignItems: 'center',padding: isModal ? '0 13px 15px' : '0 0 15px',- flexShrink: 0+ flexShrink: 0,}}><View@@ -735,7 +735,7 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {color: colors.n4,flexDirection: 'row',alignItems: 'center',- width: '50%'+ width: '50%',}}><Text>@@ -765,8 +765,8 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {? null: {backgroundColor: 'white',- '::placeholder': { color: colors.n8 }- }+ '::placeholder': { color: colors.n8 },+ },}}/></View>@@ -795,7 +795,7 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {paddingBlock: 15,paddingInline: isModal ? 13 : 0,borderTop: isModal && '1px solid ' + colors.border,- flexShrink: 0+ flexShrink: 0,}}><Stack direction="row" align="center" justify="flex-end" spacing={2}>@@ -817,7 +817,7 @@ function ManageRulesContent({ isModal, payeeId, setLoading }) {export default function ManageRules({isModal,payeeId,- setLoading = () => {}+ setLoading = () => {},}) {return (<SchedulesQuery.Provider>diff --git a/packages/desktop-client/src/components/MobileWebMessage.js b/packages/desktop-client/src/components/MobileWebMessage.jsindex 7b497c2385..c26060bfd7 100644--- a/packages/desktop-client/src/components/MobileWebMessage.js+++ b/packages/desktop-client/src/components/MobileWebMessage.js@@ -18,7 +18,7 @@ export default function MobileWebMessage() {let [show, setShow] = useState(isMobile() &&!hideMobileMessagePref &&- !document.cookie.match(/hideMobileMessage=true/)+ !document.cookie.match(/hideMobileMessage=true/),);let [requestDontRemindMe, setRequestDontRemindMe] = useState(false);@@ -57,7 +57,7 @@ export default function MobileWebMessage() {borderRadius: 6,zIndex: 10000,fontSize: 15,- ...styles.shadowLarge+ ...styles.shadowLarge,}}><Text style={{ lineHeight: '1.5em' }}>@@ -73,7 +73,7 @@ export default function MobileWebMessage() {style={{gap: 16,marginTop: 20,- justifyContent: 'center'+ justifyContent: 'center',}}><Button style={buttonStyle} onClick={onTry}>@@ -83,7 +83,7 @@ export default function MobileWebMessage() {style={{alignItems: 'center',flexDirection: 'row',- justifyContent: 'flex-end'+ justifyContent: 'flex-end',}}><Checkbox@@ -96,7 +96,7 @@ export default function MobileWebMessage() {<labelhtmlFor="dont_remind_me"style={{- userSelect: 'none'+ userSelect: 'none',}}>Don't remind me againdiff --git a/packages/desktop-client/src/components/Modals.js b/packages/desktop-client/src/components/Modals.jsindex d2126a6c94..ecaf7cb5e1 100644--- a/packages/desktop-client/src/components/Modals.js+++ b/packages/desktop-client/src/components/Modals.js@@ -36,7 +36,7 @@ function Modals({categories,payees,budgetId,- actions+ actions,}) {return modalStack.map(({ name, options = {} }, idx) => {const modalProps = {@@ -45,7 +45,7 @@ function Modals({showBack: idx > 0,isCurrent: idx === modalStack.length - 1,isHidden,- stackIndex: idx+ stackIndex: idx,};let location = createLocation('/' + name);@@ -126,7 +126,7 @@ function Modals({initialState={{ backups: [] }}didMount={async ({ setState }) => {setState({- backups: await send('backups-get', { id: budgetId })+ backups: await send('backups-get', { id: budgetId }),});listen('backups-updated', backups => {@@ -277,7 +277,7 @@ export default connect(categoryGroups: state.queries.categories.grouped,categories: state.queries.categories.list,payees: state.queries.payees,- budgetId: state.prefs.local && state.prefs.local.id+ budgetId: state.prefs.local && state.prefs.local.id,}),- dispatch => ({ actions: bindActionCreators(actions, dispatch) })+ dispatch => ({ actions: bindActionCreators(actions, dispatch) }),)(Modals);diff --git a/packages/desktop-client/src/components/Notifications.js b/packages/desktop-client/src/components/Notifications.jsindex 0d6d1fff3e..a795454c43 100644--- a/packages/desktop-client/src/components/Notifications.js+++ b/packages/desktop-client/src/components/Notifications.js@@ -10,7 +10,7 @@ import {Button,ButtonWithLoading,Stack,- ExternalLink+ ExternalLink,} from 'loot-design/src/components/common';import { styles, colors } from 'loot-design/src/style';import Loading from 'loot-design/src/svg/AnimatedLoading';@@ -86,14 +86,14 @@ function Notification({ notification, onRemove }) {let processedMessage = useMemo(() => compileMessage(message, messageActions, setOverlayLoading, onRemove),- [message, messageActions]+ [message, messageActions],);return (<Viewstyle={{marginTop: 10,- color: positive ? colors.g3 : error ? colors.r3 : colors.y2+ color: positive ? colors.g3 : error ? colors.r3 : colors.y2,}}><Stack@@ -113,7 +113,7 @@ function Notification({ notification, onRemove }) {...styles.shadowLarge,maxWidth: 550,- '& a': { color: 'currentColor' }+ '& a': { color: 'currentColor' },}}><Stack align="flex-start">@@ -144,8 +144,8 @@ function Notification({ notification, onRemove }) {? colors.g9: error? colors.r10- : colors.y9- }+ : colors.y9,+ },}}>{button.title}@@ -172,7 +172,7 @@ function Notification({ notification, onRemove }) {bottom: 0,backgroundColor: 'rgba(250, 250, 250, .75)',alignItems: 'center',- justifyContent: 'center'+ justifyContent: 'center',}}><Loading@@ -193,9 +193,9 @@ function Notifications({ notifications, removeNotification, style }) {position: 'absolute',bottom: 20,right: 13,- zIndex: 10000+ zIndex: 10000,},- style+ style,]}>{notifications.map(note => (@@ -216,5 +216,5 @@ function Notifications({ notifications, removeNotification, style }) {export default connect(state => ({ notifications: state.notifications.notifications }),- dispatch => bindActionCreators(actions, dispatch)+ dispatch => bindActionCreators(actions, dispatch),)(Notifications);diff --git a/packages/desktop-client/src/components/SidebarWithData.js b/packages/desktop-client/src/components/SidebarWithData.jsindex 9acc4f0187..96b146b129 100644--- a/packages/desktop-client/src/components/SidebarWithData.js+++ b/packages/desktop-client/src/components/SidebarWithData.js@@ -16,7 +16,7 @@ import {InitialFocus,Text,Tooltip,- Menu+ Menu,} from 'loot-design/src/components/common';import { Sidebar } from 'loot-design/src/components/sidebar';import { styles, colors } from 'loot-design/src/style';@@ -51,7 +51,7 @@ function EditableBudgetName({ prefs, savePrefs }) {let items = [{ name: 'rename', text: 'Rename Budget' },...(Platform.isBrowser ? [{ name: 'help', text: 'Help' }] : []),- { name: 'close', text: 'Close File' }+ { name: 'close', text: 'Close File' },];if (editing) {@@ -61,14 +61,14 @@ function EditableBudgetName({ prefs, savePrefs }) {style={{width: 160,fontSize: 16,- fontWeight: 500+ fontWeight: 500,}}defaultValue={prefs.budgetName}onEnter={async e => {const newBudgetName = e.target.value;if (newBudgetName.trim() !== '') {await savePrefs({- budgetName: e.target.value+ budgetName: e.target.value,});setEditing(false);}@@ -86,7 +86,7 @@ function EditableBudgetName({ prefs, savePrefs }) {fontSize: 16,fontWeight: 500,marginLeft: -5,- flex: '0 auto'+ flex: '0 auto',}}onClick={() => setMenuOpen(true)}>@@ -121,7 +121,7 @@ function SidebarWithData({floatingSidebar,savePrefs,saveGlobalPrefs,- getAccounts+ getAccounts,}) {useEffect(() => void getAccounts(), [getAccounts]);@@ -150,13 +150,13 @@ function SidebarWithData({onReorder={onReorder}onAddAccount={() =>replaceModal(- prefs['flags.syncAccount'] ? 'add-account' : 'add-local-account'+ prefs['flags.syncAccount'] ? 'add-account' : 'add-local-account',)}showClosedAccounts={prefs['ui.showClosedAccounts']}onToggleClosedAccounts={() =>savePrefs({- 'ui.showClosedAccounts': !prefs['ui.showClosedAccounts']+ 'ui.showClosedAccounts': !prefs['ui.showClosedAccounts'],})}style={[{ flex: 1 }, styles.darkScrollbar]}@@ -171,8 +171,8 @@ export default withRouter(failedAccounts: state.account.failedAccounts,updatedAccounts: state.queries.updatedAccounts,prefs: state.prefs.local,- floatingSidebar: state.prefs.global.floatingSidebar+ floatingSidebar: state.prefs.global.floatingSidebar,}),- dispatch => bindActionCreators(actions, dispatch)- )(SidebarWithData)+ dispatch => bindActionCreators(actions, dispatch),+ )(SidebarWithData),);diff --git a/packages/desktop-client/src/components/Titlebar.js b/packages/desktop-client/src/components/Titlebar.jsindex 16a06c3192..8585f0cecc 100644--- a/packages/desktop-client/src/components/Titlebar.js+++ b/packages/desktop-client/src/components/Titlebar.js@@ -15,7 +15,7 @@ import {Button,ButtonWithLoading,Tooltip,- P+ P,} from 'loot-design/src/components/common';import SheetValue from 'loot-design/src/components/spreadsheet/SheetValue';import { colors } from 'loot-design/src/style';@@ -128,7 +128,7 @@ export function SyncButton({ localPrefs, style, onSync }) {syncState === 'offline' ||syncState === 'local'? colors.n9- : null+ : null,},media(`(min-width: ${tokens.breakpoint_medium})`, {color:@@ -138,8 +138,8 @@ export function SyncButton({ localPrefs, style, onSync }) {syncState === 'offline' ||syncState === 'local'? colors.n6- : null- })+ : null,+ }),)}onClick={onSync}>@@ -192,7 +192,7 @@ function BudgetTitlebar({ globalPrefs, saveGlobalPrefs, localPrefs }) {loading={loading}style={{alignSelf: 'flex-start',- padding: '4px 7px'+ padding: '4px 7px',}}title="Learn more about budgeting"onClick={() => setShowTooltip(true)}@@ -205,7 +205,7 @@ function BudgetTitlebar({ globalPrefs, saveGlobalPrefs, localPrefs }) {onClose={() => setShowTooltip(false)}style={{padding: 10,- maxWidth: 400+ maxWidth: 400,}}><P>@@ -235,7 +235,7 @@ function BudgetTitlebar({ globalPrefs, saveGlobalPrefs, localPrefs }) {href="#"style={{color: colors.n4,- fontStyle: 'italic'+ fontStyle: 'italic',}}>How do these types of budgeting work?@@ -259,7 +259,7 @@ function Titlebar({syncError,setAppState,style,- sync+ sync,}) {let sidebar = useSidebar();const serverURL = useServerURL();@@ -274,13 +274,13 @@ function Titlebar({height: 36,pointerEvents: 'none','& *': {- pointerEvents: 'auto'- }+ pointerEvents: 'auto',+ },},!Platform.isBrowser &&Platform.OS === 'mac' &&floatingSidebar && { paddingLeft: 80 },- style+ style,]}>{floatingSidebar && (@@ -291,7 +291,7 @@ function Titlebar({'& .arrow-right': { opacity: 0, transition: 'opacity .3s' },'& .menu': { opacity: 1, transition: 'opacity .3s' },'&:hover .arrow-right': { opacity: 1 },- '&:hover .menu': { opacity: 0 }+ '&:hover .menu': { opacity: 0 },}}onMouseEnter={() => sidebar.show()}onMouseLeave={() => sidebar.hide()}@@ -308,7 +308,7 @@ function Titlebar({color: colors.n5,position: 'absolute',top: 1,- left: 1+ left: 1,}}/><NavigationMenu@@ -319,7 +319,7 @@ function Titlebar({color: colors.n5,position: 'absolute',top: 0,- left: 0+ left: 0,}}/></View>@@ -387,8 +387,8 @@ export default withRouter(globalPrefs: state.prefs.global,localPrefs: state.prefs.local,userData: state.user.data,- floatingSidebar: state.prefs.global.floatingSidebar+ floatingSidebar: state.prefs.global.floatingSidebar,}),- actions- )(Titlebar)+ actions,+ )(Titlebar),);diff --git a/packages/desktop-client/src/components/Tutorial.js b/packages/desktop-client/src/components/Tutorial.jsindex 7d4e6d34d1..7c7c46fade 100644--- a/packages/desktop-client/src/components/Tutorial.js+++ b/packages/desktop-client/src/components/Tutorial.js@@ -35,14 +35,14 @@ function expandRect({ top, left, width, height }, padding) {top: top - padding,left: left - padding,width: width + padding * 2,- height: height + padding * 2+ height: height + padding * 2,};} else if (padding) {return {top: top - (padding.top || 0),left: left - (padding.left || 0),width: width + (padding.right || 0) + (padding.left || 0),- height: height + (padding.bottom || 0) + (padding.top || 0)+ height: height + (padding.bottom || 0) + (padding.top || 0),};}@@ -54,7 +54,7 @@ function withinWindow(rect) {top: rect.top,left: rect.left,width: Math.min(rect.left + rect.width, window.innerWidth) - rect.left,- height: Math.min(rect.top + rect.height, window.innerHeight) - rect.top+ height: Math.min(rect.top + rect.height, window.innerHeight) - rect.top,};}@@ -76,7 +76,7 @@ class MeasureNodes extends React.Component {updateMeasurements() {this.setState({- measurements: this.props.nodes.map(node => node.getBoundingClientRect())+ measurements: this.props.nodes.map(node => node.getBoundingClientRect()),});}@@ -92,7 +92,7 @@ class Tutorial extends React.Component {static contextTypes = {getTutorialNode: PropTypes.func,- endTutorial: PropTypes.func+ endTutorial: PropTypes.func,};onClose = didQuitEarly => {@@ -142,7 +142,7 @@ class Tutorial extends React.Component {return <div>hi</div>;default:throw new Error(- `Encountered an unexpected error rendering the tutorial content for ${stage}`+ `Encountered an unexpected error rendering the tutorial content for ${stage}`,);}}@@ -157,7 +157,7 @@ class Tutorial extends React.Component {nextTutorialStage: this.props.nextTutorialStage,previousTutorialStage: this.props.previousTutorialStage,closeTutorial: () => this.onClose(true),- endTutorial: () => this.onClose(false)+ endTutorial: () => this.onClose(false),};switch (stage) {@@ -227,7 +227,7 @@ class Tutorial extends React.Component {<MeasureNodes nodes={[targetNode.parentNode, document.body]}>{(targetRect, windowRect) => {targetRect = withinWindow(- expandRect(expandRect(targetRect, 5), expand)+ expandRect(expandRect(targetRect, 5), expand),);return (@@ -244,7 +244,7 @@ class Tutorial extends React.Component {top: 0,left: 0,zIndex: 1000,- pointerEvents: 'none'+ pointerEvents: 'none',}}><path@@ -254,7 +254,7 @@ class Tutorial extends React.Component {style={{ pointerEvents: 'fill' }}/></svg>,- document.body+ document.body,)}{this.getContent(stage, targetRect, navigationProps)}</div>@@ -268,7 +268,7 @@ class Tutorial extends React.Component {export default connect(state => ({stage: state.tutorial.stage,- fromYNAB: state.tutorial.fromYNAB+ fromYNAB: state.tutorial.fromYNAB,}),- dispatch => bindActionCreators(actions, dispatch)+ dispatch => bindActionCreators(actions, dispatch),)(Tutorial);diff --git a/packages/desktop-client/src/components/TutorialPoints.js b/packages/desktop-client/src/components/TutorialPoints.jsindex f7027e1d59..083fa16508 100644--- a/packages/desktop-client/src/components/TutorialPoints.js+++ b/packages/desktop-client/src/components/TutorialPoints.js@@ -7,7 +7,7 @@ class Tutorial extends React.Component {static childContextTypes = {setTutorialNode: PropTypes.func,getTutorialNode: PropTypes.func,- endTutorial: PropTypes.func+ endTutorial: PropTypes.func,};constructor() {@@ -18,7 +18,7 @@ class Tutorial extends React.Component {getChildContext() {return {setTutorialNode: this.setTutorialNode,- getTutorialNode: this.getTutorialNode+ getTutorialNode: this.getTutorialNode,};}@@ -37,5 +37,5 @@ class Tutorial extends React.Component {}export default connect(state => ({ deactivated: state.tutorial.deactivated }))(- Tutorial+ Tutorial,);diff --git a/packages/desktop-client/src/components/UpdateNotification.js b/packages/desktop-client/src/components/UpdateNotification.jsindex 251974129e..ed8acdfa97 100644--- a/packages/desktop-client/src/components/UpdateNotification.js+++ b/packages/desktop-client/src/components/UpdateNotification.js@@ -12,7 +12,7 @@ function closeNotification(setAppState) {// Set a flag to never show an update notification again for this sessionsetAppState({updateInfo: null,- showUpdateNotification: false+ showUpdateNotification: false,});}@@ -20,7 +20,7 @@ function UpdateNotification({updateInfo,showUpdateNotification,updateApp,- setAppState+ setAppState,}) {if (updateInfo && showUpdateNotification) {let notes = updateInfo.releaseNotes;@@ -37,7 +37,7 @@ function UpdateNotification({padding: '7px 10px',borderRadius: 4,zIndex: 10000,- maxWidth: 450+ maxWidth: 450,}}><View style={{ flexDirection: 'row', alignItems: 'center' }}>@@ -58,7 +58,7 @@ function UpdateNotification({style={{ color: 'white', textDecoration: 'underline' }}onClick={() =>window.Actual.openURLInBrowser(- 'https://actualbudget.github.io/docs/Release-Notes/'+ 'https://actualbudget.github.io/docs/Release-Notes/',)}>@@ -88,7 +88,7 @@ function UpdateNotification({export default connect(state => ({updateInfo: state.app.updateInfo,- showUpdateNotification: state.app.showUpdateNotification+ showUpdateNotification: state.app.showUpdateNotification,}),- dispatch => bindActionCreators(actions, dispatch)+ dispatch => bindActionCreators(actions, dispatch),)(UpdateNotification);diff --git a/packages/desktop-client/src/components/accounts/Account.js b/packages/desktop-client/src/components/accounts/Account.jsindex e09d409173..1d9a662418 100644--- a/packages/desktop-client/src/components/accounts/Account.js+++ b/packages/desktop-client/src/components/accounts/Account.js@@ -8,7 +8,7 @@ import { bindActionCreators } from 'redux';import * as actions from 'loot-core/src/client/actions';import {SchedulesProvider,- useCachedSchedules+ 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';@@ -19,12 +19,12 @@ import {updateTransaction,realizeTempTransactions,ungroupTransaction,- ungroupTransactions+ ungroupTransactions,} from 'loot-core/src/shared/transactions';import {currencyToInteger,applyChanges,- groupById+ groupById,} from 'loot-core/src/shared/util';import {View,@@ -35,7 +35,7 @@ import {InitialFocus,Tooltip,Menu,- Stack+ Stack,} from 'loot-design/src/components/common';import { KeyHandlers } from 'loot-design/src/components/KeyHandlers';import NotesButton from 'loot-design/src/components/NotesButton';@@ -45,7 +45,7 @@ import useSheetValue from 'loot-design/src/components/spreadsheet/useSheetValue'import { SelectedItemsButton } from 'loot-design/src/components/table';import {SelectedProviderWithItems,- useSelectedItems+ useSelectedItems,} from 'loot-design/src/components/useSelected';import { styles, colors } from 'loot-design/src/style';import Loading from 'loot-design/src/svg/AnimatedLoading';@@ -68,7 +68,7 @@ import TransactionList from './TransactionList';import {SplitsExpandedProvider,useSplitsExpanded,- isPreviewId+ isPreviewId,} from './TransactionsTable';function EmptyMessage({ onAdd }) {@@ -79,7 +79,7 @@ function EmptyMessage({ onAdd }) {flex: 1,alignItems: 'center',borderTopWidth: 1,- borderColor: colors.n9+ borderColor: colors.n9,}}><View@@ -87,7 +87,7 @@ function EmptyMessage({ onAdd }) {width: 550,marginTop: 75,fontSize: 15,- alignItems: 'center'+ alignItems: 'center',}}><Text style={{ textAlign: 'center', lineHeight: '1.4em' }}>@@ -112,12 +112,12 @@ function ReconcilingMessage({balanceQuery,targetBalance,onDone,- onCreateTransaction+ onCreateTransaction,}) {let cleared = useSheetValue({name: balanceQuery.name + '-cleared',value: 0,- query: balanceQuery.query.filter({ cleared: true })+ query: balanceQuery.query.filter({ cleared: true }),});let targetDiff = targetBalance - cleared;@@ -131,7 +131,7 @@ function ReconcilingMessage({borderRadius: 4,marginTop: 5,marginBottom: 15,- padding: 10+ padding: 10,}}><View style={{ flexDirection: 'row', alignItems: 'center' }}>@@ -142,7 +142,7 @@ function ReconcilingMessage({flex: 1,flexDirection: 'row',alignItems: 'center',- justifyContent: 'center'+ justifyContent: 'center',}}><CheckCircle1@@ -150,7 +150,7 @@ function ReconcilingMessage({width: 13,height: 13,color: colors.g5,- marginRight: 3+ marginRight: 3,}}/>All reconciled!@@ -254,7 +254,7 @@ function AccountMenu({canShowBalances,onClose,onReconcile,- onMenuSelect+ onMenuSelect,}) {let [tooltip, setTooltip] = useState('default');@@ -277,7 +277,7 @@ function AccountMenu({items={[canShowBalances && {name: 'toggle-balance',- text: (showBalances ? 'Hide' : 'Show') + ' Running Balance'+ text: (showBalances ? 'Hide' : 'Show') + ' Running Balance',},{ name: 'export', text: 'Export' },{ name: 'reconcile', text: 'Reconcile' },@@ -289,7 +289,7 @@ function AccountMenu({: { name: 'link', text: 'Link Account' }),account.closed? { name: 'reopen', text: 'Reopen Account' }- : { name: 'close', text: 'Close Account' }+ : { name: 'close', text: 'Close Account' },].filter(x => x)}/></MenuTooltip>@@ -317,7 +317,7 @@ function DetailedBalance({ name, balance }) {backgroundColor: colors.n10,borderRadius: 4,padding: '4px 6px',- color: colors.n5+ color: colors.n5,}}>{name}{' '}@@ -334,9 +334,9 @@ function SelectedBalance({ selectedItems }) {query: q('transactions').filter({id: { $oneof: [...selectedItems] },- parent_id: { $oneof: [...selectedItems] }+ parent_id: { $oneof: [...selectedItems] },})- .select('id')+ .select('id'),});let ids = new Set((rows || []).map(r => r.id));@@ -346,7 +346,7 @@ function SelectedBalance({ selectedItems }) {query: q('transactions').filter({ id: { $oneof: finalIds } }).options({ splits: 'all' })- .calculate({ $sum: '$amount' })+ .calculate({ $sum: '$amount' }),});if (balance == null) {@@ -358,11 +358,11 @@ function SelectedBalance({ selectedItems }) {function MoreBalances({ balanceQuery }) {let cleared = useSheetValue({name: balanceQuery.name + '-cleared',- query: balanceQuery.query.filter({ cleared: true })+ query: balanceQuery.query.filter({ cleared: true }),});let uncleared = useSheetValue({name: balanceQuery.name + '-uncleared',- query: balanceQuery.query.filter({ cleared: false })+ query: balanceQuery.query.filter({ cleared: false }),});return (@@ -382,7 +382,7 @@ function Balances({ balanceQuery, showExtraBalances, onToggleExtraBalances }) {flexDirection: 'row',alignItems: 'center',marginTop: -5,- marginLeft: -5+ marginLeft: -5,}}><Button@@ -390,9 +390,9 @@ function Balances({ balanceQuery, showExtraBalances, onToggleExtraBalances }) {onClick={onToggleExtraBalances}style={{'& svg': {- opacity: selectedItems.size > 0 || showExtraBalances ? 1 : 0+ opacity: selectedItems.size > 0 || showExtraBalances ? 1 : 0,},- '&:hover svg': { opacity: 1 }+ '&:hover svg': { opacity: 1 },}}><CellValue@@ -400,7 +400,7 @@ function Balances({ balanceQuery, showExtraBalances, onToggleExtraBalances }) {type="financial"style={{ fontSize: 22, fontWeight: 400 }}getStyle={value => ({- color: value < 0 ? colors.r5 : value > 0 ? colors.g5 : colors.n8+ color: value < 0 ? colors.r5 : value > 0 ? colors.g5 : colors.n8,})}/>@@ -410,7 +410,7 @@ function Balances({ balanceQuery, showExtraBalances, onToggleExtraBalances }) {height: 10,marginLeft: 10,color: colors.n5,- transform: showExtraBalances ? 'rotateZ(180deg)' : 'rotateZ(0)'+ transform: showExtraBalances ? 'rotateZ(180deg)' : 'rotateZ(0)',}}/></Button>@@ -465,7 +465,7 @@ function SelectedTransactionsButton({onDelete,onEdit,onUnlink,- onScheduleAction+ onScheduleAction,}) {let selectedItems = useSelectedItems();let history = useHistory();@@ -474,7 +474,7 @@ function SelectedTransactionsButton({let items = [...selectedItems];return {preview: !!items.find(id => isPreviewId(id)),- trans: !!items.find(id => !isPreviewId(id))+ trans: !!items.find(id => !isPreviewId(id)),};}, [selectedItems]);@@ -505,7 +505,7 @@ function SelectedTransactionsButton({p: () => onEdit('payee', [...selectedItems]),n: () => onEdit('notes', [...selectedItems]),c: () => onEdit('category', [...selectedItems]),- l: () => onEdit('cleared', [...selectedItems])+ l: () => onEdit('cleared', [...selectedItems]),}}items={[@@ -513,14 +513,14 @@ function SelectedTransactionsButton({? [{ name: 'view-schedule', text: 'View schedule' },{ name: 'post-transaction', text: 'Post transaction' },- { name: 'skip', text: 'Skip scheduled date' }+ { name: 'skip', text: 'Skip scheduled date' },]: [{ name: 'show', text: 'Show', key: 'F' },{name: 'duplicate',text: 'Duplicate',- disabled: ambiguousDuplication+ disabled: ambiguousDuplication,},{ name: 'delete', text: 'Delete', key: 'D' },...(linked@@ -528,15 +528,15 @@ function SelectedTransactionsButton({{name: 'view-schedule',text: 'View schedule',- disabled: selectedItems.size > 1+ disabled: selectedItems.size > 1,},- { name: 'unlink-schedule', text: 'Unlink schedule' }+ { name: 'unlink-schedule', text: 'Unlink schedule' },]: [{name: 'link-schedule',- text: 'Link schedule'- }+ text: 'Link schedule',+ },]),Menu.line,{ type: Menu.label, name: 'Edit field' },@@ -546,8 +546,8 @@ function SelectedTransactionsButton({{ name: 'notes', text: 'Notes', key: 'N' },{ name: 'category', text: 'Category', key: 'C' },{ name: 'amount', text: 'Amount' },- { name: 'cleared', text: 'Cleared', key: 'L' }- ])+ { name: 'cleared', text: 'Cleared', key: 'L' },+ ]),]}onSelect={name => {switch (name) {@@ -577,14 +577,14 @@ function SelectedTransactionsButton({if (scheduleId) {history.push(`/schedule/edit/${scheduleId}`, {- locationPtr: history.location+ locationPtr: history.location,});}break;case 'link-schedule':history.push(`/schedule/link`, {locationPtr: history.location,- transactionIds: [...selectedItems]+ transactionIds: [...selectedItems],});break;case 'unlink-schedule':@@ -638,7 +638,7 @@ const AccountHeader = React.memo(onApplyFilter,onUpdateFilter,onDeleteFilter,- onScheduleAction+ onScheduleAction,}) => {let [menuOpen, setMenuOpen] = useState(false);let searchInput = useRef(null);@@ -654,11 +654,11 @@ const AccountHeader = React.memo(if (tableRef.current) {splitsExpanded.dispatch({type: 'switch-mode',- id: tableRef.current.getScrolledItem()+ id: tableRef.current.getScrolledItem(),});savePrefs({- 'expand-splits': !(splitsExpanded.state.mode === 'expand')+ 'expand-splits': !(splitsExpanded.state.mode === 'expand'),});}}@@ -671,7 +671,7 @@ const AccountHeader = React.memo(if (searchInput.current) {searchInput.current.focus();}- }+ },}}/>@@ -691,7 +691,7 @@ const AccountHeader = React.memo(fontWeight: 500,marginTop: -5,marginBottom: -2,- marginLeft: -5+ marginLeft: -5,}}/></InitialFocus>@@ -703,11 +703,11 @@ const AccountHeader = React.memo(gap: 3,'& .hover-visible': {opacity: 0,- transition: 'opacity .25s'+ transition: 'opacity .25s',},'&:hover .hover-visible': {- opacity: 1- }+ opacity: 1,+ },}}><View@@ -715,7 +715,7 @@ const AccountHeader = React.memo(fontSize: 25,fontWeight: 500,marginRight: 5,- marginBottom: 5+ marginBottom: 5,}}>{account && account.closed@@ -733,7 +733,7 @@ const AccountHeader = React.memo(style={{width: 11,height: 11,- color: colors.n8+ color: colors.n8,}}/></Button>@@ -811,7 +811,7 @@ const AccountHeader = React.memo(flexShrink: 0,color: search ? colors.p7 : 'inherit',margin: 5,- marginRight: 0+ marginRight: 0,}}/>}@@ -826,11 +826,11 @@ const AccountHeader = React.memo(transition: 'color .15s','& input::placeholder': {color: colors.n1,- transition: 'color .25s'- }+ transition: 'color .25s',+ },},focused && { boxShadow: '0 0 0 2px ' + colors.b5 },- !focused && search !== '' && { color: colors.p4 }+ !focused && search !== '' && { color: colors.p4 },]}onChange={e => onSearch(e.target.value)}/>@@ -865,7 +865,7 @@ const AccountHeader = React.memo(style={{width: 14,height: 14,- color: 'inherit'+ color: 'inherit',}}/>) : (@@ -873,7 +873,7 @@ const AccountHeader = React.memo(style={{width: 14,height: 14,- color: 'inherit'+ color: 'inherit',}}/>)}@@ -933,7 +933,7 @@ const AccountHeader = React.memo()}</>);- }+ },);function AllTransactions({ transactions, filtered, children }) {@@ -946,11 +946,11 @@ function AllTransactions({ transactions, filtered, children }) {s =>!s.completed &&['due', 'upcoming', 'missed'].includes(- scheduleData.statuses.get(s.id)- )+ scheduleData.statuses.get(s.id),+ ),): [],- [scheduleData]+ [scheduleData],);let prependTransactions = useMemo(() => {@@ -961,7 +961,7 @@ function AllTransactions({ transactions, filtered, children }) {amount: schedule._amount,date: schedule.next_date,notes: scheduleData.statuses.get(schedule.id),- schedule: schedule.id+ schedule: schedule.id,}));}, [schedules]);@@ -998,7 +998,7 @@ class AccountInternal extends React.PureComponent {balances: [],editingName: false,isAdding: false,- latestDate: null+ latestDate: null,};}@@ -1026,7 +1026,8 @@ class AccountInternal extends React.PureComponent {!messages.find(msg => msg.column === 'tombstone')) {let focusableMsgs = messages.filter(- msg => msg.dataset === 'transactions' && !(msg.column === 'tombstone')+ msg =>+ msg.dataset === 'transactions' && !(msg.column === 'tombstone'),);focusId = focusableMsgs.length === 1 ? focusableMsgs[0].row : null;@@ -1128,7 +1129,7 @@ class AccountInternal extends React.PureComponent {.options({ splits: 'grouped' }).filter({'account.offbudget': false,- ...locationState.filter+ ...locationState.filter,});}@@ -1151,12 +1152,12 @@ class AccountInternal extends React.PureComponent {if (isFiltered) {this.props.splitsExpandedDispatch({type: 'set-mode',- mode: 'collapse'+ mode: 'collapse',});} else {this.props.splitsExpandedDispatch({type: 'set-mode',- mode: this.props.expandSplits ? 'expand' : 'collapse'+ mode: this.props.expandSplits ? 'expand' : 'collapse',});}}@@ -1167,7 +1168,7 @@ class AccountInternal extends React.PureComponent {transactionCount: this.paged.getTotalCount(),transactionsFiltered: isFiltered,loading: false,- workingHard: false+ workingHard: false,},() => {if (this.state.showBalances) {@@ -1181,14 +1182,14 @@ class AccountInternal extends React.PureComponent {setTimeout(() => {this.table.current && this.table.current.setRowAnimation(true);}, 0);- }+ },);},{pageCount: 150,onlySync: true,- mapper: ungroupTransactions- }+ mapper: ungroupTransactions,+ },);}@@ -1200,11 +1201,11 @@ class AccountInternal extends React.PureComponent {loading: true,search: '',showBalances: nextProps.showBalances,- balances: []+ balances: [],},() => {this.fetchTransactions();- }+ },);}}@@ -1222,9 +1223,9 @@ class AccountInternal extends React.PureComponent {queries.makeTransactionSearchQuery(this.currentQuery,this.state.search,- this.props.dateFormat+ this.props.dateFormat,),- true+ true,);}}, 150);@@ -1243,8 +1244,8 @@ class AccountInternal extends React.PureComponent {if (account) {const res = await window.Actual.openFileDialog({filters: [- { name: 'Financial Files', extensions: ['qif', 'ofx', 'qfx', 'csv'] }- ]+ { name: 'Financial Files', extensions: ['qif', 'ofx', 'qfx', 'csv'] },+ ],});if (res) {@@ -1255,7 +1256,7 @@ class AccountInternal extends React.PureComponent {if (didChange) {this.fetchTransactions();}- }+ },});}}@@ -1263,7 +1264,7 @@ class AccountInternal extends React.PureComponent {onExport = async accountName => {let exportedTransactions = await send('transactions-export-query', {- query: this.currentQuery.serialize()+ query: this.currentQuery.serialize(),});let normalizedName =accountName && accountName.replace(/[()]/g, '').replace(/\s+/g, '-');@@ -1272,7 +1273,7 @@ class AccountInternal extends React.PureComponent {window.Actual.saveFile(exportedTransactions,filename,- 'Export Transactions'+ 'Export Transactions',);};@@ -1290,7 +1291,7 @@ class AccountInternal extends React.PureComponent {},mappedData => {return data;- }+ },);this.props.updateNewTransactions(newTransaction.id);@@ -1313,7 +1314,7 @@ class AccountInternal extends React.PureComponent {this.paged.getQuery().options({ splits: 'none' })- .select([{ balance: { $sumOver: '$amount' } }])+ .select([{ balance: { $sumOver: '$amount' } }]),);this.setState({ balances: groupById(data) });@@ -1331,7 +1332,7 @@ class AccountInternal extends React.PureComponent {if (name.trim().length) {const accountId = this.props.accountId;const account = this.props.accounts.find(- account => account.id === accountId+ account => account.id === accountId,);this.props.updateAccount({ ...account, name });this.setState({ editingName: false });@@ -1348,7 +1349,7 @@ class AccountInternal extends React.PureComponent {onMenuSelect = async item => {const accountId = this.props.accountId;const account = this.props.accounts.find(- account => account.id === accountId+ account => account.id === accountId,);switch (item) {@@ -1408,7 +1409,7 @@ class AccountInternal extends React.PureComponent {getBalanceQuery(account, id) {return {name: `balance-query-${id}`,- query: this.makeRootQuery().calculate({ $sum: '$amount' })+ query: this.makeRootQuery().calculate({ $sum: '$amount' }),};}@@ -1445,18 +1446,18 @@ class AccountInternal extends React.PureComponent {cleared: true,amount: diff,date: currentDay(),- notes: 'Reconciliation balance adjustment'- }+ notes: 'Reconciliation balance adjustment',+ },]);// Optimistic UI: update the transaction list before sending the data to the databasethis.setState({- transactions: [...this.state.transactions, ...reconciliationTransactions]+ transactions: [...this.state.transactions, ...reconciliationTransactions],});// sync the reconciliation transactionawait send('transactions-batch-update', {- added: reconciliationTransactions+ added: reconciliationTransactions,});await this.refetchTransactions();};@@ -1464,7 +1465,7 @@ class AccountInternal extends React.PureComponent {onShowTransactions = async ids => {this.onApplyFilter({customName: 'Selected transactions',- filter: { id: { $oneof: ids } }+ filter: { id: { $oneof: ids } },});};@@ -1476,7 +1477,7 @@ class AccountInternal extends React.PureComponent {q('transactions').filter({ id: { $oneof: ids } }).select('*')- .options({ splits: 'grouped' })+ .options({ splits: 'grouped' }),);let transactions = ungroupTransactions(data);@@ -1499,7 +1500,7 @@ class AccountInternal extends React.PureComponent {let { diff } = updateTransaction(transactions, {...trans,- [name]: value+ [name]: value,});// TODO: We need to keep an updated list of transactions so@@ -1543,17 +1544,17 @@ class AccountInternal extends React.PureComponent {q('transactions').filter({ id: { $oneof: ids } }).select('*')- .options({ splits: 'grouped' })+ .options({ splits: 'grouped' }),);let changes = {added: data.reduce((newTransactions, trans) => {return newTransactions.concat(- realizeTempTransactions(ungroupTransaction(trans))+ realizeTempTransactions(ungroupTransaction(trans)),);}, [])- .map(({ sort_order, ...trans }) => ({ ...trans }))+ .map(({ sort_order, ...trans }) => ({ ...trans })),};await send('transactions-batch-update', changes);@@ -1568,7 +1569,7 @@ class AccountInternal extends React.PureComponent {q('transactions').filter({ id: { $oneof: ids } }).select('*')- .options({ splits: 'grouped' })+ .options({ splits: 'grouped' }),);let transactions = ungroupTransactions(data);@@ -1607,7 +1608,7 @@ class AccountInternal extends React.PureComponent {onBatchUnlink = async ids => {await send('transactions-batch-update', {- updated: ids.map(id => ({ id, schedule: null }))+ updated: ids.map(id => ({ id, schedule: null })),});await this.refetchTransactions();@@ -1615,7 +1616,7 @@ class AccountInternal extends React.PureComponent {onUpdateFilter = (oldFilter, updatedFilter) => {this.applyFilters(- this.state.filters.map(f => (f === oldFilter ? updatedFilter : f))+ this.state.filters.map(f => (f === oldFilter ? updatedFilter : f)),);};@@ -1656,11 +1657,11 @@ class AccountInternal extends React.PureComponent {.filter(cond => !!cond.customName).map(f => f.filter);let { filters } = await send('make-filters-from-conditions', {- conditions: conditions.filter(cond => !cond.customName)+ conditions: conditions.filter(cond => !cond.customName),});this.currentQuery = this.rootQuery.filter({- $and: [...filters, ...customFilters]+ $and: [...filters, ...customFilters],});this.updateQuery(this.currentQuery, true);this.setState({ filters: conditions, search: '' });@@ -1682,7 +1683,7 @@ class AccountInternal extends React.PureComponent {accountsSyncing,replaceModal,showExtraBalances,- accountId+ accountId,} = this.props;let {transactions,@@ -1692,7 +1693,7 @@ class AccountInternal extends React.PureComponent {transactionsFiltered,editingName,showBalances,- balances+ balances,} = this.state;let account = accounts.find(account => account.id === accountId);@@ -1809,7 +1810,7 @@ class AccountInternal extends React.PureComponent {<EmptyMessageonAdd={() =>replaceModal(- syncEnabled ? 'add-account' : 'add-local-account'+ syncEnabled ? 'add-account' : 'add-local-account',)}/>@@ -1818,7 +1819,7 @@ class AccountInternal extends React.PureComponent {style={{marginTop: 20,textAlign: 'center',- fontStyle: 'italic'+ fontStyle: 'italic',}}>No transactions@@ -1830,7 +1831,7 @@ class AccountInternal extends React.PureComponent {onRefetchUpToRow={row =>this.paged.refetchUpToRow(row, {field: 'date',- order: 'desc'+ order: 'desc',})}onCloseAddTransaction={() =>@@ -1878,13 +1879,13 @@ export default function Account(props) {modalShowing: state.modals.modalStack.length > 0,accountsSyncing: state.account.accountsSyncing,lastUndoState: state.app.lastUndoState,- tutorialStage: state.tutorial.stage+ tutorialStage: state.tutorial.stage,}));let dispatch = useDispatch();let actionCreators = useMemo(() => bindActionCreators(actions, dispatch),- [dispatch]+ [dispatch],);let params = useParams();diff --git a/packages/desktop-client/src/components/accounts/AccountSyncCheck.js b/packages/desktop-client/src/components/accounts/AccountSyncCheck.jsindex a5c7924d76..2eca69ce1f 100644--- a/packages/desktop-client/src/components/accounts/AccountSyncCheck.js+++ b/packages/desktop-client/src/components/accounts/AccountSyncCheck.js@@ -67,7 +67,7 @@ function AccountSyncCheck({pushModal,closeModal,getAccounts,- addNotification+ addNotification,}) {if (!failedAccounts) {return null;@@ -101,7 +101,7 @@ function AccountSyncCheck({if (!modalOpened) {addNotification({type: 'error',- message: 'Unable to process this item, sorry!'+ message: 'Unable to process this item, sorry!',});}}@@ -121,7 +121,7 @@ function AccountSyncCheck({color: colors.r5,backgroundColor: colors.r10,padding: '4px 8px',- borderRadius: 4+ borderRadius: 4,}}onClick={() => setOpen(true)}>@@ -130,7 +130,7 @@ function AccountSyncCheck({width: 14,height: 14,marginRight: 5,- color: 'currentColor'+ color: 'currentColor',}}/>{' '}This account is experiencing connection problems. Let{"'"}s fix it.@@ -171,7 +171,7 @@ function AccountSyncCheck({export default connect(state => ({accounts: state.queries.accounts,- failedAccounts: state.account.failedAccounts+ failedAccounts: state.account.failedAccounts,}),- actions+ actions,)(AccountSyncCheck);diff --git a/packages/desktop-client/src/components/accounts/Filters.js b/packages/desktop-client/src/components/accounts/Filters.jsindex 81cd69d4bf..cee34db075 100644--- a/packages/desktop-client/src/components/accounts/Filters.js+++ b/packages/desktop-client/src/components/accounts/Filters.js@@ -4,7 +4,7 @@ import { useSelector } from 'react-redux';import {parse as parseDate,format as formatDate,- isValid as isDateValid+ isValid as isDateValid,} from 'date-fns';import scopeTab from 'react-modal/lib/helpers/scopeTab';@@ -18,7 +18,7 @@ import {unparse,makeValue,FIELD_TYPES,- TYPE_INFO+ TYPE_INFO,} from 'loot-core/src/shared/rules';import { titleFirst } from 'loot-core/src/shared/util';import {@@ -28,7 +28,7 @@ import {Stack,Button,Menu,- CustomSelect+ CustomSelect,} from 'loot-design/src/components/common';import { colors } from 'loot-design/src/style';import DeleteIcon from 'loot-design/src/svg/v0/Delete';@@ -44,7 +44,7 @@ let filterFields = ['notes','category','amount',- 'cleared'+ 'cleared',].map(field => [field, mapField(field)]);function subfieldFromFilter({ field, options, value }) {@@ -118,8 +118,8 @@ function OpButton({ op, selected, style, onClick }) {style,selected && {color: 'white',- '&,:hover,:active': { backgroundColor: colors.b4 }- }+ '&,:hover,:active': { backgroundColor: colors.b4 },+ },]}onClick={onClick}>@@ -142,7 +142,7 @@ function updateFilterReducer(state, action) {}case 'set-value': {let { value } = makeValue(action.value, {- type: FIELD_TYPES.get(state.field)+ type: FIELD_TYPES.get(state.field),});return { ...state, value: value };}@@ -157,7 +157,7 @@ function ConfigureField({op,value,dispatch,- onApply+ onApply,}) {let [subfield, setSubfield] = useState(initialSubfield);let inputRef = useRef();@@ -195,13 +195,13 @@ function ConfigureField({? [['amount', 'Amount'],['amount-inflow', 'Amount (inflow)'],- ['amount-outflow', 'Amount (outflow)']+ ['amount-outflow', 'Amount (outflow)'],]: field === 'date'? [['date', 'Date'],['month', 'Month'],- ['year', 'Year']+ ['year', 'Year'],]: null}@@ -245,7 +245,7 @@ function ConfigureField({dispatch({ type: 'set-op', op: 'is' });dispatch({ type: 'set-value', value: false });}}- />+ />,]: ops.map(currOp => (<OpButton@@ -281,7 +281,7 @@ function ConfigureField({field,op,value,- options: subfieldToOptions(field, subfield)+ options: subfieldToOptions(field, subfield),});}}>@@ -297,7 +297,7 @@ function ConfigureField({export function FilterButton({ onApply }) {let { dateFormat } = useSelector(state => {return {- dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy'+ dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy',};});@@ -316,7 +316,7 @@ export function FilterButton({ onApply }) {condOpen: true,field: action.field,op: ops[0],- value: type === 'boolean' ? true : null+ value: type === 'boolean' ? true : null,};}case 'close':@@ -325,7 +325,7 @@ export function FilterButton({ onApply }) {return updateFilterReducer(state, action);}},- { fieldsOpen: false, condOpen: false, field: null, value: null }+ { fieldsOpen: false, condOpen: false, field: null, value: null },);async function onValidateAndApply(cond) {@@ -336,7 +336,7 @@ export function FilterButton({ onApply }) {let date = parseDate(cond.value,getMonthYearFormat(dateFormat),- new Date()+ new Date(),);if (isDateValid(date)) {cond.value = formatDate(date, 'yyyy-MM');@@ -357,7 +357,7 @@ export function FilterButton({ onApply }) {let { error } = await send('rule-validate', {conditions: [cond],- actions: []+ actions: [],});if (error && error.conditionErrors.length > 0) {@@ -377,7 +377,7 @@ export function FilterButton({ onApply }) {width: 16,height: 16,color: 'inherit',- marginRight: 5+ marginRight: 5,}}/>{' '}Filter@@ -394,7 +394,7 @@ export function FilterButton({ onApply }) {}}items={filterFields.map(([name, text]) => ({name: name,- text: titleFirst(text)+ text: titleFirst(text),}))}/></Tooltip>@@ -423,7 +423,7 @@ function FilterEditor({ field, op, value, options, onSave, onClose }) {return updateFilterReducer(state, action);}},- { field, op, value, options }+ { field, op, value, options },);return (@@ -451,7 +451,7 @@ function FilterExpression({stage,style,onChange,- onDelete+ onDelete,}) {let [editing, setEditing] = useState(false);@@ -466,9 +466,9 @@ function FilterExpression({flexDirection: 'row',alignItems: 'center',marginBottom: 10,- marginRight: 10+ marginRight: 10,},- style+ style,]}><Button@@ -498,7 +498,7 @@ function FilterExpression({height: 8,color: colors.n4,margin: 5,- marginLeft: 3+ marginLeft: 3,}}/></Button>@@ -526,7 +526,7 @@ export function AppliedFilters({ filters, editingFilter, onUpdate, onDelete }) {alignItems: 'center',flexWrap: 'wrap',marginTop: 10,- marginBottom: -5+ marginBottom: -5,}}>{filters.map((filter, i) => (diff --git a/packages/desktop-client/src/components/accounts/MobileAccount.js b/packages/desktop-client/src/components/accounts/MobileAccount.jsindex 24ec85dee5..772c4db187 100644--- a/packages/desktop-client/src/components/accounts/MobileAccount.js+++ b/packages/desktop-client/src/components/accounts/MobileAccount.js@@ -9,7 +9,7 @@ import { bindActionCreators } from 'redux';import * as actions from 'loot-core/src/client/actions';import {SchedulesProvider,- useCachedSchedules+ useCachedSchedules,} from 'loot-core/src/client/data-hooks/schedules';import * as queries from 'loot-core/src/client/queries';import { pagedQuery } from 'loot-core/src/client/query-helpers';@@ -17,7 +17,7 @@ import { send, listen } from 'loot-core/src/platform/client/fetch';import {getSplit,isPreviewId,- ungroupTransactions+ ungroupTransactions,} from 'loot-core/src/shared/transactions';import { colors } from 'loot-design/src/style';import { withThemeColor } from 'loot-design/src/util/withThemeColor';@@ -50,7 +50,7 @@ function PreviewTransactions({ accountId, children }) {let schedules = scheduleData.schedules.filter(s =>!s.completed &&- ['due', 'upcoming', 'missed'].includes(scheduleData.statuses.get(s.id))+ ['due', 'upcoming', 'missed'].includes(scheduleData.statuses.get(s.id)),);return children(@@ -61,8 +61,8 @@ function PreviewTransactions({ accountId, children }) {amount: schedule._amount,date: schedule.next_date,notes: scheduleData.statuses.get(schedule.id),- schedule: schedule.id- }))+ schedule: schedule.id,+ })),);}@@ -79,13 +79,13 @@ function Account(props) {newTransactions: state.queries.newTransactions,categories: state.queries.categories.list,prefs: state.prefs.local,- dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy'+ dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy',}));let dispatch = useDispatch();let actionCreators = useMemo(() => bindActionCreators(actions, dispatch),- [dispatch]+ [dispatch],);const { id: accountId } = props.match.params;@@ -103,7 +103,7 @@ function Account(props) {paged = pagedQuery(query.options({ splits: 'grouped' }).select('*'),data => setTransactions(data),- { pageCount: 150, mapper: ungroupTransactions }+ { pageCount: 150, mapper: ungroupTransactions },);};@@ -159,8 +159,8 @@ function Account(props) {queries.makeTransactionSearchQuery(currentQuery,searchText,- state.dateFormat- )+ state.dateFormat,+ ),);}}, 150);@@ -194,7 +194,7 @@ function Account(props) {props.showActionSheetWithOptions({options,- cancelButtonIndex+ cancelButtonIndex,},buttonIndex => {switch (buttonIndex) {@@ -208,19 +208,19 @@ function Account(props) {break;default:}- }+ },);} else {let trans = [transaction];if (transaction.parent_id || transaction.is_parent) {let index = transactions.findIndex(- t => t.id === (transaction.parent_id || transaction.id)+ t => t.id === (transaction.parent_id || transaction.id),);trans = getSplit(transactions, index);}navigate('Transaction', {- transactions: trans+ transactions: trans,});}};@@ -282,7 +282,7 @@ export default connect(newTransactions: state.queries.newTransactions,updatedAccounts: state.queries.updatedAccounts,categories: state.queries.categories.list,- prefs: state.prefs.local+ prefs: state.prefs.local,}),- actions+ actions,)(withThemeColor(colors.n11)(Account));diff --git a/packages/desktop-client/src/components/accounts/MobileAccountDetails.js b/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsindex 852da24aef..229d629863 100644--- a/packages/desktop-client/src/components/accounts/MobileAccountDetails.js+++ b/packages/desktop-client/src/components/accounts/MobileAccountDetails.js@@ -5,7 +5,7 @@ import {Button,InputWithContent,Label,- View+ View,} from 'loot-design/src/components/common';import CellValue from 'loot-design/src/components/spreadsheet/CellValue';import Text from 'loot-design/src/components/Text';@@ -40,7 +40,7 @@ class TransactionSearchInput extends React.Component {margin: '11px auto 4px',borderRadius: 4,padding: 10,- width: '100%'+ width: '100%',}}><InputWithContent@@ -52,7 +52,7 @@ class TransactionSearchInput extends React.Component {flexShrink: 0,color: text ? colors.p7 : 'inherit',margin: 5,- marginRight: 0+ marginRight: 0,}}/>}@@ -66,7 +66,7 @@ class TransactionSearchInput extends React.Component {flex: 1,height: 32,marginLeft: 4,- padding: 8+ padding: 8,}}/></View>@@ -86,7 +86,7 @@ export default function AccountDetails({isNewTransaction,onLoadMore,onSearch,- onSelectTransaction+ onSelectTransaction,// refreshControl}) {let allTransactions = useMemo(() => {@@ -99,7 +99,7 @@ export default function AccountDetails({flex: 1,backgroundColor: colors.n11,overflowY: 'hidden',- width: '100%'+ width: '100%',}}><View@@ -110,7 +110,7 @@ export default function AccountDetails({overflowY: 'hidden',paddingTop: 20,top: 0,- width: '100%'+ width: '100%',}}><View@@ -118,7 +118,7 @@ export default function AccountDetails({alignItems: 'center',flexDirection: 'row',justifyContent: 'space-between',- width: '100%'+ width: '100%',}}><Link@@ -127,14 +127,14 @@ export default function AccountDetails({alignItems: 'center',display: 'flex',textDecoration: 'none',- width: LEFT_RIGHT_FLEX_WIDTH+ width: LEFT_RIGHT_FLEX_WIDTH,}}><CheveronLeftstyle={{color: colors.b5,width: 32,- height: 32+ height: 32,}}/><Text style={{ ...styles.text, color: colors.b5, fontWeight: 500 }}>@@ -144,7 +144,7 @@ export default function AccountDetails({<Viewstyle={{fontSize: 16,- fontWeight: 500+ fontWeight: 500,}}>{account.name}@@ -169,10 +169,10 @@ export default function AccountDetails({debug={true}style={{fontSize: 18,- fontWeight: '500'+ fontWeight: '500',}}getStyle={value => ({- color: value < 0 ? colors.r4 : colors.p5+ color: value < 0 ? colors.r4 : colors.p5,})}/><TransactionSearchInputdiff --git a/packages/desktop-client/src/components/accounts/MobileAccounts.js b/packages/desktop-client/src/components/accounts/MobileAccounts.jsindex 181b7ea589..f655274d12 100644--- a/packages/desktop-client/src/components/accounts/MobileAccounts.js+++ b/packages/desktop-client/src/components/accounts/MobileAccounts.js@@ -9,7 +9,7 @@ import {Button,Text,TextOneLine,- View+ View,} from 'loot-design/src/components/common';import CellValue from 'loot-design/src/components/spreadsheet/CellValue';import { colors, styles } from 'loot-design/src/style';@@ -22,14 +22,14 @@ export function AccountHeader({ name, amount }) {style={{flexDirection: 'row',marginTop: 28,- marginBottom: 10+ marginBottom: 10,}}><View style={{ flex: 1 }}><Textstyle={[styles.text,- { textTransform: 'uppercase', color: colors.n5, fontSize: 13 }+ { textTransform: 'uppercase', color: colors.n5, fontSize: 13 },]}data-testid="name">@@ -54,7 +54,7 @@ export function AccountCard({ account, updated, getBalanceQuery, onSelect }) {backgroundColor: 'white',boxShadow: `0 1px 1px ${colors.n7}`,borderRadius: 6,- marginTop: 10+ marginTop: 10,}}><Button@@ -65,21 +65,21 @@ export function AccountCard({ account, updated, getBalanceQuery, onSelect }) {alignItems: 'center',borderRadius: 6,'&:active': {- opacity: 0.1- }+ opacity: 0.1,+ },}}><Viewstyle={{flex: '1 auto',height: 52,- marginTop: 10+ marginTop: 10,}}><Viewstyle={{flexDirection: 'row',- alignItems: 'center'+ alignItems: 'center',}}><TextOneLine@@ -89,8 +89,8 @@ export function AccountCard({ account, updated, getBalanceQuery, onSelect }) {fontSize: 17,fontWeight: 600,color: updated ? colors.b2 : colors.n2,- paddingRight: 30- }+ paddingRight: 30,+ },]}>{account.name}@@ -102,7 +102,7 @@ export function AccountCard({ account, updated, getBalanceQuery, onSelect }) {marginLeft: '-23px',width: 8,height: 8,- borderRadius: 8+ borderRadius: 8,}}/>)}@@ -111,7 +111,7 @@ export function AccountCard({ account, updated, getBalanceQuery, onSelect }) {style={{flexDirection: 'row',alignItems: 'center',- marginTop: '4px'+ marginTop: '4px',}}><Text style={[styles.smallText, { color: colors.n5 }]}>@@ -123,7 +123,7 @@ export function AccountCard({ account, updated, getBalanceQuery, onSelect }) {height: 15,color: colors.n9,marginLeft: 8,- marginBottom: 2+ marginBottom: 2,}}/></View>@@ -153,7 +153,7 @@ function EmptyMessage({ onAdd }) {style={{ marginTop: 20, alignSelf: 'center' }}onClick={() =>alert(- 'Account creation is not supported on mobile on the self-hosted service yet'+ 'Account creation is not supported on mobile on the self-hosted service yet',)}>@@ -182,15 +182,15 @@ export class AccountList extends React.Component {getOnBudgetBalance,getOffBudgetBalance,onAddAccount,- onSelectAccount+ onSelectAccount,// onSelectTransaction,// refreshControl} = this.props;const budgetedAccounts = accounts.filter(- account => account.offbudget === 0+ account => account.offbudget === 0,);const offbudgetAccounts = accounts.filter(- account => account.offbudget === 1+ account => account.offbudget === 1,);// If there are no accounts, show a helpful message@@ -211,7 +211,7 @@ export class AccountList extends React.Component {fontWeight: 500,height: 50,justifyContent: 'center',- overflowY: 'auto'+ overflowY: 'auto',}}>Accounts@@ -220,7 +220,7 @@ export class AccountList extends React.Component {style={{backgroundColor: colors.n10,overflowY: 'auto',- padding: 10+ padding: 10,}}><AccountHeader name="Budgeted" amount={getOnBudgetBalance()} />@@ -338,7 +338,7 @@ export default connect(newTransactions: state.queries.newTransactions,updatedAccounts: state.queries.updatedAccounts,categories: state.queries.categories.list,- prefs: state.prefs.local+ prefs: state.prefs.local,}),- actions+ actions,)(withThemeColor(colors.b2)(Accounts));diff --git a/packages/desktop-client/src/components/accounts/MobileTransaction.js b/packages/desktop-client/src/components/accounts/MobileTransaction.jsindex bccae0c25c..4eb9385f2f 100644--- a/packages/desktop-client/src/components/accounts/MobileTransaction.js+++ b/packages/desktop-client/src/components/accounts/MobileTransaction.js@@ -48,7 +48,7 @@ export function DateHeader({ date }) {height: 25,backgroundColor: colors.n10,borderColor: colors.n9,- justifyContent: 'center'+ justifyContent: 'center',}}><Text style={[styles.text, { fontSize: 13, color: colors.n4 }]}>@@ -79,7 +79,7 @@ function Status({ status }) {style={{fontSize: 11,color,- fontStyle: 'italic'+ fontStyle: 'italic',}}>{titleFirst(status)}@@ -97,7 +97,7 @@ export class Transaction extends React.PureComponent {showCategory,added,// onSelect,- style+ style,} = this.props;let {id,@@ -107,7 +107,7 @@ export class Transaction extends React.PureComponent {cleared,is_parent,notes,- schedule+ schedule,} = transaction;if (isPreviewId(id)) {@@ -125,7 +125,7 @@ export class Transaction extends React.PureComponent {let prettyDescription = getDescriptionPretty(transaction,payee,- transferAcct+ transferAcct,);let prettyCategory = transferAcct? 'Transfer'@@ -136,7 +136,7 @@ export class Transaction extends React.PureComponent {let isPreview = isPreviewId(id);let textStyle = isPreview && {fontStyle: 'italic',- color: colors.n5+ color: colors.n5,};return (@@ -153,7 +153,7 @@ export class Transaction extends React.PureComponent {style={[{ flex: 1, height: 60, padding: '5px 10px' }, // remove padding when Button is backisPreview && { backgroundColor: colors.n11 },- style+ style,]}><View style={[{ flex: 1 }]}>@@ -164,7 +164,7 @@ export class Transaction extends React.PureComponent {width: 12,height: 12,marginRight: 5,- color: textStyle.color || colors.n1+ color: textStyle.color || colors.n1,}}/>)}@@ -175,8 +175,8 @@ export class Transaction extends React.PureComponent {{ fontSize: 14, fontWeight: added ? '600' : '400' },prettyDescription === '' && {color: colors.n6,- fontStyle: 'italic'- }+ fontStyle: 'italic',+ },]}>{prettyDescription || 'Empty'}@@ -189,7 +189,7 @@ export class Transaction extends React.PureComponent {style={{flexDirection: 'row',alignItems: 'center',- marginTop: 3+ marginTop: 3,}}><CheckCircle1@@ -197,7 +197,7 @@ export class Transaction extends React.PureComponent {width: 11,height: 11,color: cleared ? colors.g6 : colors.n8,- marginRight: 5+ marginRight: 5,}}/>{showCategory && (@@ -208,7 +208,7 @@ export class Transaction extends React.PureComponent {fontWeight: '400',color: prettyCategory ? colors.n3 : colors.p7,fontStyle: prettyCategory ? null : 'italic',- textAlign: 'left'+ textAlign: 'left',}}>{prettyCategory || 'Uncategorized'}@@ -221,7 +221,7 @@ export class Transaction extends React.PureComponent {style={[styles.text,textStyle,- { marginLeft: 25, marginRight: 5, fontSize: 14 }+ { marginLeft: 25, marginRight: 5, fontSize: 14 },]}>{integerToCurrency(amount)}@@ -252,7 +252,7 @@ export class TransactionList extends React.Component {sections.push({id: transaction.date,date: transaction.date,- data: []+ data: [],});}@@ -267,7 +267,7 @@ export class TransactionList extends React.Component {const {transactions,scrollProps = {},- onLoadMore+ onLoadMore,// refreshControl} = this.props;@@ -291,7 +291,7 @@ export class TransactionList extends React.Component {style={{display: 'flex',justifyContent: 'center',- width: '100%'+ width: '100%',}}><Text style={{ fontSize: 15 }}>No transactions</Text>@@ -311,7 +311,7 @@ export class TransactionList extends React.Component {key={transaction.id}style={{fontSize:- index === transactions.length - 1 ? 98 : 'inherit'+ index === transactions.length - 1 ? 98 : 'inherit',}}textValue={transaction.id}>@@ -347,7 +347,7 @@ function ListBox(props) {Math.abs(listBoxRef.current.scrollHeight -listBoxRef.current.clientHeight -- listBoxRef.current.scrollTop+ listBoxRef.current.scrollTop,) < listBoxRef.current.clientHeight // load more when we're one screen height from the end) {props.loadMore();@@ -373,7 +373,7 @@ function ListBox(props) {listStyle: 'none',margin: 0,overflowY: 'auto',- width: '100%'+ width: '100%',}}>{[...state.collection].map(item => (@@ -387,7 +387,7 @@ function ListBox(props) {function ListBoxSection({ section, state }) {let { itemProps, headingProps, groupProps } = useListBoxSection({heading: section.rendered,- 'aria-label': section['aria-label']+ 'aria-label': section['aria-label'],});// The heading is rendered inside an <li> element, which contains@@ -411,7 +411,7 @@ function ListBoxSection({ section, state }) {position: 'sticky',top: '0',width: '100%',- zIndex: zIndices.SECTION_HEADING+ zIndex: zIndices.SECTION_HEADING,}}>{section.rendered}@@ -421,7 +421,7 @@ function ListBoxSection({ section, state }) {{...groupProps}style={{padding: 0,- listStyle: 'none'+ listStyle: 'none',}}>{[...section.childNodes].map((node, index, nodes) => (@@ -455,7 +455,7 @@ function Option({ isLast, item, state }) {background: isSelected ? 'blueviolet' : 'transparent',color: isSelected ? 'white' : null,outline: isFocusVisible ? '2px solid orange' : 'none',- ...(!isLast && { borderBottom: `1px solid ${colors.border}` })+ ...(!isLast && { borderBottom: `1px solid ${colors.border}` }),}}>{item.rendered}@@ -475,9 +475,9 @@ export const ListItem = React.forwardRef(flexDirection: 'row',alignItems: 'center',paddingLeft: 10,- paddingRight: 10+ paddingRight: 10,},- style+ style,]}ref={ref}{...props}@@ -485,5 +485,5 @@ export const ListItem = React.forwardRef({children}</View>);- }+ },);diff --git a/packages/desktop-client/src/components/accounts/SimpleTransactionsTable.js b/packages/desktop-client/src/components/accounts/SimpleTransactionsTable.jsindex 189289b4c9..106a940e41 100644--- a/packages/desktop-client/src/components/accounts/SimpleTransactionsTable.js+++ b/packages/desktop-client/src/components/accounts/SimpleTransactionsTable.js@@ -4,12 +4,12 @@ import { useSelector } from 'react-redux';import {format as formatDate,parseISO,- isValid as isDateValid+ isValid as isDateValid,} from 'date-fns';import {getAccountsById,- getCategoriesById+ getCategoriesById,} from 'loot-core/src/client/reducers/queries';import { integerToCurrency } from 'loot-core/src/shared/util';import {@@ -17,11 +17,11 @@ import {Row,Field,Cell,- SelectCell+ SelectCell,} from 'loot-design/src/components/table';import {useSelectedItems,- useSelectedDispatch+ useSelectedDispatch,} from 'loot-design/src/components/useSelected';import { styles } from 'loot-design/src/style';import ArrowsSynchronize from 'loot-design/src/svg/v2/ArrowsSynchronize';@@ -37,7 +37,7 @@ function serializeTransaction(transaction, dateFormat) {return {...transaction,- date: date ? formatDate(parseISO(date), dateFormat) : null+ date: date ? formatDate(parseISO(date), dateFormat) : null,};}@@ -47,7 +47,7 @@ const TransactionRow = React.memo(function TransactionRow({payees,categories,accounts,- selected+ selected,}) {// TODO: Convert these to use fetched querieslet c = getCategoriesById(categories)[transaction.category];@@ -88,7 +88,7 @@ const TransactionRow = React.memo(function TransactionRow({style={{flexDirection: 'row',alignItems: 'center',- justifyContent: 'flex-start'+ justifyContent: 'flex-start',}}>{() => (@@ -98,7 +98,7 @@ const TransactionRow = React.memo(function TransactionRow({style={{width: 13,height: 13,- margin: '0 5px'+ margin: '0 5px',}}/>)}@@ -148,14 +148,14 @@ export default function SimpleTransactionsTable({schedules,renderEmpty,fields = ['date', 'payee', 'amount'],- style+ style,}) {let { payees, categories, accounts, dateFormat } = useSelector(state => {return {payees: state.queries.payees,accounts: state.queries.accounts,categories: state.queries.categories.grouped,- dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy'+ dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy',};});let selectedItems = useSelectedItems();@@ -179,7 +179,7 @@ export default function SimpleTransactionsTable({/>);},- [payees, categories, memoFields, selectedItems]+ [payees, categories, memoFields, selectedItems],);return (diff --git a/packages/desktop-client/src/components/accounts/TransactionList.js b/packages/desktop-client/src/components/accounts/TransactionList.jsindex ead417d157..5e5011be9c 100644--- a/packages/desktop-client/src/components/accounts/TransactionList.js+++ b/packages/desktop-client/src/components/accounts/TransactionList.js@@ -7,7 +7,7 @@ import {updateTransaction,addSplitTransaction,realizeTempTransactions,- applyTransactionDiff+ applyTransactionDiff,} from 'loot-core/src/shared/transactions';import { getChangedValues, applyChanges } from 'loot-core/src/shared/util';@@ -36,7 +36,7 @@ import { TransactionTable } from './TransactionsTable';async function saveDiff(diff) {let remoteUpdates = await send('transactions-batch-update', {...diff,- learnCategories: true+ learnCategories: true,});if (remoteUpdates.length > 0) {return { updates: remoteUpdates };@@ -48,7 +48,7 @@ async function saveDiffAndApply(diff, changes, onChange) {let remoteDiff = await saveDiff(diff);onChange(applyTransactionDiff(changes.newTransaction, remoteDiff),- applyChanges(remoteDiff, changes.data)+ applyChanges(remoteDiff, changes.data),);}@@ -75,7 +75,7 @@ export default function TransactionList({onChange,onRefetch,onCloseAddTransaction,- onCreatePayee+ onCreatePayee,}) {let transactionsLatest = useRef();let history = useHistory();@@ -147,7 +147,7 @@ export default function TransactionList({id => {history.push('/payees', { selectedPayee: id });},- [history]+ [history],);return (diff --git a/packages/desktop-client/src/components/accounts/TransactionsTable.js b/packages/desktop-client/src/components/accounts/TransactionsTable.jsindex 880010e3eb..e059ee2ae0 100644--- a/packages/desktop-client/src/components/accounts/TransactionsTable.js+++ b/packages/desktop-client/src/components/accounts/TransactionsTable.js@@ -6,21 +6,21 @@ import React, {useLayoutEffect,useEffect,useContext,- useReducer+ useReducer,} from 'react';import { useSelector, useDispatch } from 'react-redux';import {format as formatDate,parseISO,- isValid as isDateValid+ isValid as isDateValid,} from 'date-fns';import { useCachedSchedules } from 'loot-core/src/client/data-hooks/schedules';import {getAccountsById,getPayeesById,- getCategoriesById+ getCategoriesById,} from 'loot-core/src/client/reducers/queries';import evalArithmetic from 'loot-core/src/shared/arithmetic';import { currentDay } from 'loot-core/src/shared/months';@@ -29,12 +29,12 @@ import {splitTransaction,updateTransaction,deleteTransaction,- addSplitTransaction+ addSplitTransaction,} from 'loot-core/src/shared/transactions';import {integerToCurrency,amountToInteger,- titleFirst+ titleFirst,} from 'loot-core/src/shared/util';import AccountAutocomplete from 'loot-design/src/components/AccountAutocomplete';import CategoryAutocomplete from 'loot-design/src/components/CategorySelect';@@ -51,12 +51,12 @@ import {CustomCell,CellButton,useTableNavigator,- Table+ Table,} from 'loot-design/src/components/table';import { useMergedRefs } from 'loot-design/src/components/useMergedRefs';import {useSelectedDispatch,- useSelectedItems+ useSelectedItems,} from 'loot-design/src/components/useSelected';import { styles, colors } from 'loot-design/src/style';import LeftArrow2 from 'loot-design/src/svg/v0/LeftArrow2';@@ -103,7 +103,7 @@ function serializeTransaction(transaction, showZeroInDeposit, dateFormat) {...transaction,date,debit: debit != null ? integerToCurrency(debit) : '',- credit: credit != null ? integerToCurrency(credit) : ''+ credit: credit != null ? integerToCurrency(credit) : '',};}@@ -163,9 +163,9 @@ export function useSplitsExpanded() {expanded: id =>data.state.mode === 'collapse'? !data.state.ids.has(id)- : data.state.ids.has(id)+ : data.state.ids.has(id),}),- [data]+ [data],);}@@ -200,7 +200,7 @@ export function SplitsExpandedProvider({ children, initialMode = 'expand' }) {...state,mode: action.mode,ids: new Set(),- transitionId: null+ transitionId: null,};}case 'switch-mode':@@ -213,7 +213,7 @@ export function SplitsExpandedProvider({ children, initialMode = 'expand' }) {...state,mode: state.mode === 'expand' ? 'collapse' : 'expand',transitionId: action.id,- ids: new Set()+ ids: new Set(),};case 'finish-switch-mode':return { ...state, transitionId: null };@@ -258,7 +258,7 @@ export const TransactionHeader = React.memo(style={{color: colors.n4,fontWeight: 300,- zIndex: 200+ zIndex: 200,}}><SelectCell@@ -280,7 +280,7 @@ export const TransactionHeader = React.memo(<Cell value="" width={15 + styles.scrollbarWidth} /></Row>);- }+ },);function getPayeePretty(transaction, payee, transferAcct) {@@ -292,14 +292,14 @@ function getPayeePretty(transaction, payee, transferAcct) {<Viewstyle={{flexDirection: 'row',- alignItems: 'center'+ alignItems: 'center',}}><Icon width={10} height={8} style={{ marginRight: 5, flexShrink: 0 }} /><divstyle={{overflow: 'hidden',- textOverflow: 'ellipsis'+ textOverflow: 'ellipsis',}}>{transferAcct.name}@@ -325,7 +325,7 @@ function StatusCell({status,isChild,onEdit,- onUpdate+ onUpdate,}) {let isClearedField = status === 'cleared' || status == null;let statusProps = getStatusProps(status);@@ -340,7 +340,7 @@ function StatusCell({? colors.y5: selected? colors.b7- : colors.n7+ : colors.n7,};function onSelect() {@@ -365,12 +365,12 @@ function StatusCell({borderRadius: 50,':focus': {border: '1px solid ' + props.color,- boxShadow: `0 1px 2px ${props.color}`+ boxShadow: `0 1px 2px ${props.color}`,},- cursor: isClearedField ? 'pointer' : 'default'+ cursor: isClearedField ? 'pointer' : 'default',},- isChild && { visibility: 'hidden' }+ isChild && { visibility: 'hidden' },]}onEdit={() => onEdit(id, 'cleared')}onSelect={onSelect}@@ -380,8 +380,8 @@ function StatusCell({width: 13,height: 13,color: props.color,- marginTop: status === 'due' ? -1 : 0- }+ marginTop: status === 'due' ? -1 : 0,+ },})}</CellButton></Cell>@@ -404,7 +404,7 @@ function PayeeCell({onEdit,onUpdate,onCreatePayee,- onManagePayees+ onManagePayees,}) {let isCreatingPayee = useRef(false);@@ -434,7 +434,7 @@ function PayeeCell({onUpdate,onSave,shouldSaveFromKey,- inputStyle+ inputStyle,}) => {return (<>@@ -446,7 +446,7 @@ function PayeeCell({inputProps={{onBlur,onKeyDown,- style: inputStyle+ style: inputStyle,}}showManagePayees={true}tableBehavior={true}@@ -480,7 +480,7 @@ function CellWithScheduleIcon({ scheduleId, children }) {height: 13,marginLeft: 5,marginRight: 3,- color: 'inherit'+ color: 'inherit',};return (@@ -529,7 +529,7 @@ export const Transaction = React.memo(function Transaction(props) {onSplit,onManagePayees,onCreatePayee,- onToggleSplit+ onToggleSplit,} = props;let dispatchSelected = useSelectedDispatch();@@ -537,7 +537,7 @@ export const Transaction = React.memo(function Transaction(props) {let [prevShowZero, setPrevShowZero] = useState(showZeroInDeposit);let [prevTransaction, setPrevTransaction] = useState(originalTransaction);let [transaction, setTransaction] = useState(- serializeTransaction(originalTransaction, showZeroInDeposit, dateFormat)+ serializeTransaction(originalTransaction, showZeroInDeposit, dateFormat),);let isPreview = isPreviewId(transaction.id);@@ -546,7 +546,7 @@ export const Transaction = React.memo(function Transaction(props) {showZeroInDeposit !== prevShowZero) {setTransaction(- serializeTransaction(originalTransaction, showZeroInDeposit, dateFormat)+ serializeTransaction(originalTransaction, showZeroInDeposit, dateFormat),);setPrevTransaction(originalTransaction);setPrevShowZero(showZeroInDeposit);@@ -582,12 +582,12 @@ export const Transaction = React.memo(function Transaction(props) {let deserialized = deserializeTransaction(newTransaction,originalTransaction,- dateFormat+ dateFormat,);// Run the transaction through the formatting so that we know// it's always showing the formatted resultsetTransaction(- serializeTransaction(deserialized, showZeroInDeposit, dateFormat)+ serializeTransaction(deserialized, showZeroInDeposit, dateFormat),);onSave(deserialized);}@@ -606,7 +606,7 @@ export const Transaction = React.memo(function Transaction(props) {category,cleared,is_parent: isParent,- _unmatched = false+ _unmatched = false,} = transaction;// Join in some data@@ -641,7 +641,7 @@ export const Transaction = React.memo(function Transaction(props) {style={[style,isPreview && { color: colors.n5, fontStyle: 'italic' },- _unmatched && { opacity: 0.5 }+ _unmatched && { opacity: 0.5 },]}onMouseEnter={() => onHover && onHover(transaction.id)}>@@ -652,7 +652,7 @@ export const Transaction = React.memo(function Transaction(props) {style={{width: 110,backgroundColor: colors.n11,- borderBottomWidth: 0+ borderBottomWidth: 0,}}/>)}@@ -662,7 +662,7 @@ export const Transaction = React.memo(function Transaction(props) {style={{flex: 1,backgroundColor: colors.n11,- opacity: 0+ opacity: 0,}}/>)}@@ -716,7 +716,7 @@ export const Transaction = React.memo(function Transaction(props) {onUpdate,onSave,shouldSaveFromKey,- inputStyle+ inputStyle,}) => (<DateSelectvalue={date || ''}@@ -759,7 +759,7 @@ export const Transaction = React.memo(function Transaction(props) {onUpdate,onSave,shouldSaveFromKey,- inputStyle+ inputStyle,}) => (<AccountAutocompletevalue={accountId}@@ -819,7 +819,7 @@ export const Transaction = React.memo(function Transaction(props) {onExpose={!isPreview && (name => onEdit(id, name))}inputProps={{value: notes || '',- onUpdate: onUpdate.bind(null, 'notes')+ onUpdate: onUpdate.bind(null, 'notes'),}}/>)}@@ -847,7 +847,7 @@ export const Transaction = React.memo(function Transaction(props) {: colors.n10,margin: '0 5px',padding: '3px 7px',- borderRadius: 4+ borderRadius: 4,}}>{titleFirst(notes)}@@ -870,8 +870,8 @@ export const Transaction = React.memo(function Transaction(props) {transition: 'none','&:hover': {backgroundColor: 'rgba(100, 100, 100, .15)',- color: colors.n5- }+ color: colors.n5,+ },}}disabled={isTemporaryId(transaction.id)}onEdit={() => onEdit(id, 'category')}@@ -884,7 +884,7 @@ export const Transaction = React.memo(function Transaction(props) {alignSelf: 'stretch',borderRadius: 4,flex: 1,- padding: 4+ padding: 4,}}>{isParent && (@@ -894,7 +894,7 @@ export const Transaction = React.memo(function Transaction(props) {height: 14,color: 'currentColor',transition: 'transform .08s',- transform: expanded ? 'rotateZ(0)' : 'rotateZ(-90deg)'+ transform: expanded ? 'rotateZ(0)' : 'rotateZ(-90deg)',}}/>)}@@ -924,7 +924,7 @@ export const Transaction = React.memo(function Transaction(props) {style={{ fontStyle: 'italic', color: '#c0c0c0', fontWeight: 300 }}inputProps={{readOnly: true,- style: { fontStyle: 'italic' }+ style: { fontStyle: 'italic' },}}/>) : (@@ -936,7 +936,7 @@ export const Transaction = React.memo(function Transaction(props) {value? getDisplayValue(getCategoriesById(categoryGroups)[value],- 'name'+ 'name',): transaction.id? 'Categorize'@@ -949,7 +949,7 @@ export const Transaction = React.memo(function Transaction(props) {? {fontStyle: 'italic',fontWeight: 300,- color: colors.p8+ color: colors.p8,}: valueStyle}@@ -967,7 +967,7 @@ export const Transaction = React.memo(function Transaction(props) {onUpdate,onSave,shouldSaveFromKey,- inputStyle+ inputStyle,}) => (<CategoryAutocompletecategoryGroups={categoryGroups}@@ -998,7 +998,7 @@ export const Transaction = React.memo(function Transaction(props) {style={[isParent && { fontStyle: 'italic' }, styles.tnum]}inputProps={{value: debit,- onUpdate: onUpdate.bind(null, 'debit')+ onUpdate: onUpdate.bind(null, 'debit'),}}/>@@ -1016,7 +1016,7 @@ export const Transaction = React.memo(function Transaction(props) {style={[isParent && { fontStyle: 'italic' }, styles.tnum]}inputProps={{value: credit,- onUpdate: onUpdate.bind(null, 'credit')+ onUpdate: onUpdate.bind(null, 'credit'),}}/>@@ -1061,9 +1061,9 @@ export function TransactionError({ error, isDeposit, onAddSplit, style }) {{flexDirection: 'row',alignItems: 'center',- padding: '0 5px'+ padding: '0 5px',},- style+ style,]}data-testid="transaction-error">@@ -1071,7 +1071,7 @@ export function TransactionError({ error, isDeposit, onAddSplit, style }) {Amount left:{' '}<Text style={{ fontWeight: 500 }}>{integerToCurrency(- isDeposit ? error.difference : -error.difference+ isDeposit ? error.difference : -error.difference,)}</Text></Text>@@ -1099,8 +1099,8 @@ function makeTemporaryTransactions(currentAccountId, lastDate) {date: lastDate || currentDay(),account: currentAccountId || null,cleared: false,- amount: 0- }+ amount: 0,+ },];}@@ -1134,7 +1134,7 @@ function NewTransaction({onAdd,onAddSplit,onManagePayees,- onCreatePayee+ onCreatePayee,}) {const error = transactions[0].error;const isDeposit = transactions[0].amount > 0;@@ -1144,7 +1144,7 @@ function NewTransaction({style={{borderBottom: '1px solid #ebebeb',paddingBottom: 6,- backgroundColor: 'white'+ backgroundColor: 'white',}}data-testid="new-transaction"onKeyDown={e => {@@ -1187,7 +1187,7 @@ function NewTransaction({alignItems: 'center',justifyContent: 'flex-end',marginTop: 6,- marginRight: 20+ marginRight: 20,}}><Button@@ -1272,7 +1272,7 @@ class TransactionTable_ extends React.Component {tableNavigator,isNew,isMatched,- isExpanded+ isExpanded,} = this.props;let trans = item;@@ -1357,7 +1357,7 @@ class TransactionTable_ extends React.Component {newNavigator,renderEmpty,onHover,- onScroll+ onScroll,} = props;return (@@ -1376,7 +1376,7 @@ class TransactionTable_ extends React.Component {{props.isAdding && (<View{...newNavigator.getNavigatorProps({- onKeyDown: e => props.onCheckNewEnter(e)+ onKeyDown: e => props.onCheckNewEnter(e),})}><NewTransaction@@ -1436,7 +1436,7 @@ class TransactionTable_ extends React.Component {right: 0,height: 20,backgroundColor: 'red',- boxShadow: '0 0 6px rgba(0, 0, 0, .20)'+ boxShadow: '0 0 6px rgba(0, 0, 0, .20)',}}/>)}@@ -1449,7 +1449,7 @@ class TransactionTable_ extends React.Component {export let TransactionTable = React.forwardRef((props, ref) => {let [newTransactions, setNewTransactions] = useState(null);let [hoveredTransaction, setHoveredTransaction] = useState(- props.hoveredTransaction+ props.hoveredTransaction,);let [prevIsAdding, setPrevIsAdding] = useState(false);let splitsExpanded = useSplitsExpanded();@@ -1462,7 +1462,7 @@ export let TransactionTable = React.forwardRef((props, ref) => {let result;if (splitsExpanded.state.transitionId != null) {let index = props.transactions.findIndex(- t => t.id === splitsExpanded.state.transitionId+ t => t.id === splitsExpanded.state.transitionId,);result = props.transactions.filter((t, idx) => {if (t.parent_id) {@@ -1522,7 +1522,7 @@ export let TransactionTable = React.forwardRef((props, ref) => {newTransactions,newNavigator,tableNavigator,- transactions: props.transactions+ transactions: props.transactions,};});@@ -1539,14 +1539,14 @@ export let TransactionTable = React.forwardRef((props, ref) => {if (newTransactions[0].account == null) {props.addNotification({type: 'error',- message: 'Account is a required field'+ message: 'Account is a required field',});newNavigator.onEdit('temp', 'account');} else {let transactions = latestState.current.newTransactions;let lastDate = transactions.length > 0 ? transactions[0].date : null;setNewTransactions(- makeTemporaryTransactions(props.currentAccountId, lastDate)+ makeTemporaryTransactions(props.currentAccountId, lastDate),);newNavigator.onEdit('temp', 'date');props.onAdd(transactions);@@ -1574,7 +1574,7 @@ export let TransactionTable = React.forwardRef((props, ref) => {'category','debit','credit',- 'cleared'+ 'cleared',];fields = item.is_child@@ -1582,7 +1582,7 @@ export let TransactionTable = React.forwardRef((props, ref) => {: fields.filter(f =>(props.showAccount || f !== 'account') &&- (props.showCategory || f !== 'category')+ (props.showCategory || f !== 'category'),);if (isPreviewId(item.id)) {@@ -1698,7 +1698,7 @@ export let TransactionTable = React.forwardRef((props, ref) => {props.onSave(transaction);}},- [props.onSave]+ [props.onSave],);let onHover = useCallback(id => {@@ -1734,7 +1734,7 @@ export let TransactionTable = React.forwardRef((props, ref) => {// } else {newNavigator.onEdit(diff.added[0].id,- latestState.current.newNavigator.focusedField+ latestState.current.newNavigator.focusedField,);// }} else {@@ -1761,17 +1761,17 @@ export let TransactionTable = React.forwardRef((props, ref) => {setNewTransactions(data);newNavigator.onEdit(diff.added[0].id,- latestState.current.newNavigator.focusedField+ latestState.current.newNavigator.focusedField,);} else {let newId = props.onAddSplit(id);tableNavigator.onEdit(newId,- latestState.current.tableNavigator.focusedField+ latestState.current.tableNavigator.focusedField,);}},- [props.onAddSplit]+ [props.onAddSplit],);function onCloseAddTransaction() {@@ -1781,7 +1781,7 @@ export let TransactionTable = React.forwardRef((props, ref) => {let onToggleSplit = useCallback(id => splitsExpanded.dispatch({ type: 'toggle-split', id }),- [splitsExpanded.dispatch]+ [splitsExpanded.dispatch],);return (diff --git a/packages/desktop-client/src/components/accounts/TransactionsTable.test.js b/packages/desktop-client/src/components/accounts/TransactionsTable.test.jsindex e1e32f16d2..dd5d97c620 100644--- a/packages/desktop-client/src/components/accounts/TransactionsTable.test.js+++ b/packages/desktop-client/src/components/accounts/TransactionsTable.test.js@@ -8,14 +8,14 @@ import {generateTransaction,generateAccount,generateCategoryGroups,- TestProvider+ TestProvider,} from 'loot-core/src/mocks';import { initServer } from 'loot-core/src/platform/client/fetch';import {addSplitTransaction,realizeTempTransactions,splitTransaction,- updateTransaction+ updateTransaction,} from 'loot-core/src/shared';import { integerToCurrency } from 'loot-core/src/shared/util';import { SelectedProviderWithItems } from 'loot-design/src/components';@@ -27,21 +27,21 @@ const uuid = require('loot-core/src/platform/uuid');const accounts = [generateAccount('Bank of America')];const payees = [{ id: 'payed-to', name: 'Payed To' },- { id: 'guy', name: 'This guy on the side of the road' }+ { id: 'guy', name: 'This guy on the side of the road' },];const categoryGroups = generateCategoryGroups([{name: 'Investments and Savings',- categories: [{ name: 'Savings' }]+ categories: [{ name: 'Savings' }],},{name: 'Usual Expenses',- categories: [{ name: 'Food' }, { name: 'General' }, { name: 'Home' }]+ categories: [{ name: 'Food' }, { name: 'General' }, { name: 'Home' }],},{name: 'Projects',- categories: [{ name: 'Big Projects' }, { name: 'Shed' }]- }+ categories: [{ name: 'Big Projects' }, { name: 'Shed' }],+ },]);const usualGroup = categoryGroups[1];@@ -63,11 +63,11 @@ function generateTransactions(count, splitAtIndexes = [], showError = false) {? usualGroup.categories[1].id: usualGroup.categories[0].id,amount: isSplit ? 50 : undefined,- sort_order: i+ sort_order: i,},isSplit ? 30 : undefined,- showError- )+ showError,+ ),);}@@ -122,7 +122,7 @@ class LiveTransactionTable extends React.Component {newTransactions = realizeTempTransactions(newTransactions);this.setState({ transactions: [...newTransactions, ...state.transactions] },- this.notifyChange+ this.notifyChange,);};@@ -180,7 +180,7 @@ function initBasicServer() {default:throw new Error(`queried unknown table: ${query.table}`);}- }+ },});}@@ -199,45 +199,45 @@ function waitForAutocomplete() {const categories = categoryGroups.reduce((all, group) => all.concat(group.categories),- []+ [],);const keys = {ESC: {key: 'Esc',keyCode: 27,- which: 27+ which: 27,},ENTER: {key: 'Enter',keyCode: 13,- which: 13+ which: 13,},TAB: {key: 'Tab',keyCode: 9,- which: 9+ which: 9,},DOWN: {key: 'Down',keyCode: 40,- which: 40+ which: 40,},UP: {key: 'Up',keyCode: 38,- which: 38+ which: 38,},LEFT: {key: 'Left',keyCode: 37,- which: 37+ which: 37,},RIGHT: {key: 'Right',keyCode: 39,- which: 39- }+ which: 39,+ },};function prettyDate(date) {@@ -265,11 +265,11 @@ function renderTransactions(extraProps) {isAdding: false,onTransactionsChange: t => {transactions = t;- }+ },};let result = render(- <LiveTransactionTable {...defaultProps} {...extraProps} />+ <LiveTransactionTable {...defaultProps} {...extraProps} />,);return {...result,@@ -277,14 +277,14 @@ function renderTransactions(extraProps) {updateProps: props =>render(<LiveTransactionTable {...defaultProps} {...extraProps} {...props} />,- { container: result.container }- )+ { container: result.container },+ ),};}function queryNewField(container, name, subSelector = '', idx = 0) {const field = container.querySelectorAll(- `[data-testid="new-transaction"] [data-testid="${name}"]`+ `[data-testid="new-transaction"] [data-testid="${name}"]`,)[idx];if (subSelector !== '') {return field.querySelector(subSelector);@@ -294,7 +294,7 @@ function queryNewField(container, name, subSelector = '', idx = 0) {function queryField(container, name, subSelector = '', idx) {const field = container.querySelectorAll(- `[data-testid="transaction-table"] [data-testid="${name}"]`+ `[data-testid="transaction-table"] [data-testid="${name}"]`,)[idx];if (subSelector !== '') {return field.querySelector(subSelector);@@ -357,34 +357,34 @@ describe('Transactions', () => {getTransactions().forEach((transaction, idx) => {expect(queryField(container, 'date', 'div', idx).textContent).toBe(- prettyDate(transaction.date)+ prettyDate(transaction.date),);expect(queryField(container, 'account', 'div', idx).textContent).toBe(- accounts.find(acct => acct.id === transaction.account).name+ accounts.find(acct => acct.id === transaction.account).name,);expect(queryField(container, 'payee', 'div', idx).textContent).toBe(- payees.find(p => p.id === transaction.payee).name+ payees.find(p => p.id === transaction.payee).name,);expect(queryField(container, 'notes', 'div', idx).textContent).toBe(- transaction.notes+ transaction.notes,);expect(queryField(container, 'category', 'div', idx).textContent).toBe(transaction.category? categories.find(category => category.id === transaction.category).name- : 'Categorize'+ : 'Categorize',);if (transaction.amount <= 0) {expect(queryField(container, 'debit', 'div', idx).textContent).toBe(- integerToCurrency(-transaction.amount)+ integerToCurrency(-transaction.amount),);expect(queryField(container, 'credit', 'div', idx).textContent).toBe(- ''+ '',);} else {expect(queryField(container, 'debit', 'div', idx).textContent).toBe('');expect(queryField(container, 'credit', 'div', idx).textContent).toBe(- integerToCurrency(transaction.amount)+ integerToCurrency(transaction.amount),);}});@@ -464,7 +464,7 @@ describe('Transactions', () => {keys.TAB,keys.ENTER,keyWithShift(keys.TAB),- keyWithShift(keys.ENTER)+ keyWithShift(keys.ENTER),];ks.forEach((k, i) => func(k, i));@@ -474,7 +474,7 @@ describe('Transactions', () => {let input = editField(container, 'notes', 2);let oldValue = input.value;fireEvent.change(input, {- target: { value: 'a happy little note' + idx }+ target: { value: 'a happy little note' + idx },});// It's not saved yetexpect(getTransactions()[2].notes).toBe(oldValue);@@ -482,7 +482,7 @@ describe('Transactions', () => {// Now it should be saved!expect(getTransactions()[2].notes).toBe('a happy little note' + idx);expect(queryField(container, 'notes', 'div', 2).textContent).toBe(- 'a happy little note' + idx+ 'a happy little note' + idx,);});@@ -503,7 +503,7 @@ describe('Transactions', () => {let tooltip = container.querySelector('[data-testid="tooltip"]');expect(tooltip).toBeTruthy();expect(- [...tooltip.querySelectorAll('[data-testid*="category-item"]')].length+ [...tooltip.querySelectorAll('[data-testid*="category-item"]')].length,).toBe(9);fireEvent.change(input, { target: { value: 'Gener' } });@@ -536,7 +536,7 @@ describe('Transactions', () => {// No item should be highlightedlet highlighted = tooltip.querySelector(- '[data-testid="category-item-highlighted"]'+ '[data-testid="category-item-highlighted"]',);expect(highlighted).toBe(null);@@ -547,13 +547,13 @@ describe('Transactions', () => {// The right item should be highlightedhighlighted = tooltip.querySelector(- '[data-testid="category-item-highlighted"]'+ '[data-testid="category-item-highlighted"]',);expect(highlighted).toBeTruthy();expect(highlighted.textContent).toBe('General');expect(getTransactions()[2].category).toBe(- categories.find(category => category.name === 'Food').id+ categories.find(category => category.name === 'Food').id,);fireEvent.keyDown(input, keys.ENTER);@@ -561,7 +561,7 @@ describe('Transactions', () => {// The transactions data should be updated with the right categoryexpect(getTransactions()[2].category).toBe(- categories.find(category => category.name === 'General').id+ categories.find(category => category.name === 'General').id,);// The category field should still be editing@@ -584,7 +584,7 @@ describe('Transactions', () => {// Make sure none of the items are highlightedlet items = tooltip.querySelectorAll('[data-testid="category-item"]');let highlighted = tooltip.querySelector(- '[data-testid="category-item-highlighted"]'+ '[data-testid="category-item-highlighted"]',);expect(highlighted).toBe(null);@@ -593,19 +593,19 @@ describe('Transactions', () => {// Make sure the expected category is highlightedhighlighted = tooltip.querySelector(- '[data-testid="category-item-highlighted"]'+ '[data-testid="category-item-highlighted"]',);expect(highlighted).toBeTruthy();expect(highlighted.textContent).toBe('General');// Click the item and check the before/after valuesexpect(getTransactions()[2].category).toBe(- categories.find(c => c.name === 'Food').id+ categories.find(c => c.name === 'Food').id,);fireEvent.click(items[2]);await waitForAutocomplete();expect(getTransactions()[2].category).toBe(- categories.find(c => c.name === 'General').id+ categories.find(c => c.name === 'General').id,);// It should still be editing the category@@ -629,7 +629,7 @@ describe('Transactions', () => {// Make sure one of them is highlightedlet highlighted = tooltip.querySelector(- '[data-testid="category-item-highlighted"]'+ '[data-testid="category-item-highlighted"]',);expect(highlighted).toBeTruthy();@@ -641,7 +641,7 @@ describe('Transactions', () => {let currentCategory = getTransactions()[2].category;expect(currentCategory).toBe(oldCategory);expect(highlighted.textContent).not.toBe(- categories.find(c => c.id === currentCategory).name+ categories.find(c => c.id === currentCategory).name,);});@@ -655,7 +655,7 @@ describe('Transactions', () => {// For this first test case, make sure the tooltip is gone. We// don't need to check this in all the other caseslet tooltipItems = container.querySelectorAll(- '[data-testid="category-item-group"]'+ '[data-testid="category-item-group"]',);expect(tooltipItems.length).toBe(0);@@ -730,7 +730,7 @@ describe('Transactions', () => {// The date field should be re-focused to enter a new transactionexpect(container.ownerDocument.activeElement).toBe(- queryNewField(container, 'date', 'input')+ queryNewField(container, 'date', 'input'),);expect(queryNewField(container, 'debit').textContent).toBe('0.00');});@@ -745,7 +745,7 @@ describe('Transactions', () => {editNewField(container, 'category');let splitButton = document.body.querySelector(- '[data-testid="tooltip"] [data-testid="split-transaction-button"]'+ '[data-testid="tooltip"] [data-testid="split-transaction-button"]',);fireEvent.click(splitButton);await waitForAutocomplete();@@ -753,21 +753,21 @@ describe('Transactions', () => {await waitForAutocomplete();fireEvent.click(- container.querySelector('[data-testid="transaction-error"] button')+ container.querySelector('[data-testid="transaction-error"] button'),);input = editNewField(container, 'debit', 1);fireEvent.change(input, { target: { value: '45.00' } });fireEvent.blur(input);expect(- container.querySelector('[data-testid="transaction-error"]')+ container.querySelector('[data-testid="transaction-error"]'),).toBeTruthy();input = editNewField(container, 'debit', 2);fireEvent.change(input, { target: { value: '10.00' } });fireEvent.blur(input);expect(container.querySelector('[data-testid="transaction-error"]')).toBe(- null+ null,);let addButton = container.querySelector('[data-testid="add-button"]');@@ -788,7 +788,7 @@ describe('Transactions', () => {const { container, updateProps } = renderTransactions({onCloseAddTransaction: () => {updateProps({ isAdding: false });- }+ },});updateProps({ isAdding: true });@@ -800,7 +800,7 @@ describe('Transactions', () => {// The first escape closes the dropdownfireEvent.keyDown(input, keys.ESC);expect(- container.querySelector('[data-testid="new-transaction"]')+ container.querySelector('[data-testid="new-transaction"]'),).toBeTruthy();// TOOD: Fix this@@ -813,11 +813,11 @@ describe('Transactions', () => {// The cancel button should also close the new transaction formupdateProps({ isAdding: true });let cancelButton = container.querySelectorAll(- '[data-testid="new-transaction"] [data-testid="cancel-button"]'+ '[data-testid="new-transaction"] [data-testid="cancel-button"]',)[0];fireEvent.click(cancelButton);expect(container.querySelector('[data-testid="new-transaction"]')).toBe(- null+ null,);});@@ -829,13 +829,13 @@ describe('Transactions', () => {container,'select','[data-testid=cell-button]',- 2+ 2,);fireEvent.click(selectCell);// The header is is selected as well as the single transactionexpect(container.querySelectorAll('[data-testid=select] svg').length).toBe(- 2+ 2,);});@@ -868,7 +868,7 @@ describe('Transactions', () => {let input = editField(container, 'category', 0);let tooltip = container.querySelector('[data-testid="tooltip"]');let splitButton = tooltip.querySelector(- '[data-testid="split-transaction-button"]'+ '[data-testid="split-transaction-button"]',);// Make it clear that we are expected a negative transaction@@ -886,7 +886,7 @@ describe('Transactions', () => {expectErrorToExist(getTransactions().slice(0, 2));let toolbars = container.querySelectorAll(- '[data-testid="transaction-error"]'+ '[data-testid="transaction-error"]',);// Make sure the toolbar has appearedexpect(toolbars.length).toBe(1);@@ -912,7 +912,7 @@ describe('Transactions', () => {fireEvent.change(input, { target: { value: '17.77' } });fireEvent.keyDown(input, keys.TAB);expect(- container.querySelectorAll('[data-testid="transaction-error"]').length+ container.querySelectorAll('[data-testid="transaction-error"]').length,).toBe(0);expectErrorToNotExist(getTransactions().slice(0, 3));@@ -944,7 +944,7 @@ describe('Transactions', () => {let input = editField(container, 'category', 0);let tooltip = container.querySelector('[data-testid="tooltip"]');let splitButton = tooltip.querySelector(- '[data-testid="split-transaction-button"'+ '[data-testid="split-transaction-button"',);// The first transaction should always be a negative amount@@ -955,7 +955,7 @@ describe('Transactions', () => {fireEvent.click(splitButton);await waitForAutocomplete();fireEvent.click(- container.querySelector('[data-testid="transaction-error"] button')+ container.querySelector('[data-testid="transaction-error"] button'),);expect(getTransactions().length).toBe(7);diff --git a/packages/desktop-client/src/components/budget/MobileBudget.js b/packages/desktop-client/src/components/budget/MobileBudget.jsindex 78eb679e15..f2f4799acb 100644--- a/packages/desktop-client/src/components/budget/MobileBudget.js+++ b/packages/desktop-client/src/components/budget/MobileBudget.js@@ -6,7 +6,7 @@ import { send, listen } from 'loot-core/src/platform/client/fetch';import {addCategory,moveCategory,- moveCategoryGroup+ moveCategoryGroup,} from 'loot-core/src/shared/categories.js';import * as monthUtils from 'loot-core/src/shared/months';import { View } from 'loot-design/src/components/common';@@ -31,7 +31,7 @@ class Budget extends React.Component {currentMonth: currentMonth,initialized: false,editMode: false,- categoryGroups: null+ categoryGroups: null,};}@@ -112,10 +112,10 @@ class Budget extends React.Component {name,cat_group: groupId,is_income: 0,- id- })+ id,+ }),});- }+ },});};@@ -129,7 +129,7 @@ class Budget extends React.Component {let { id: catId, position } = aroundCategory;let group = categoryGroups.find(group =>- group.categories.find(cat => cat.id === catId)+ group.categories.find(cat => cat.id === catId),);if (position === 'bottom') {@@ -145,7 +145,7 @@ class Budget extends React.Component {this.props.moveCategory(id, groupId, targetId);this.setState({- categoryGroups: moveCategory(categoryGroups, id, groupId, targetId)+ categoryGroups: moveCategory(categoryGroups, id, groupId, targetId),});};@@ -161,7 +161,7 @@ class Budget extends React.Component {this.props.moveCategoryGroup(id, targetId);this.setState({- categoryGroups: moveCategoryGroup(categoryGroups, id, targetId)+ categoryGroups: moveCategoryGroup(categoryGroups, id, targetId),});};@@ -196,14 +196,14 @@ class Budget extends React.Component {'Set budgets to zero','Set budgets to 3 month average',budgetType === 'report' && 'Apply to all future budgets',- 'Cancel'+ 'Cancel',].filter(Boolean);this.props.showActionSheetWithOptions({options,cancelButtonIndex: options.length - 1,- title: 'Actions'+ title: 'Actions',},idx => {switch (idx) {@@ -226,7 +226,7 @@ class Budget extends React.Component {break;default:}- }+ },);};@@ -238,7 +238,7 @@ class Budget extends React.Component {prefs,budgetType,navigation,- applyBudgetAction+ applyBudgetAction,} = this.props;let numberFormat = prefs.numberFormat || 'comma-dot';@@ -250,7 +250,7 @@ class Budget extends React.Component {backgroundColor: 'white',alignItems: 'center',justifyContent: 'center',- marginBottom: 25+ marginBottom: 25,}}><AnimatedLoading width={25} height={25} />@@ -302,7 +302,7 @@ export default connect(categories: state.queries.categories.list,budgetType: state.prefs.local.budgetType || 'rollover',prefs: state.prefs.local,- initialBudgetMonth: state.app.budgetMonth+ initialBudgetMonth: state.app.budgetMonth,}),- actions+ actions,)(withThemeColor(colors.p5)(BudgetWrapper));diff --git a/packages/desktop-client/src/components/budget/MobileBudgetTable.js b/packages/desktop-client/src/components/budget/MobileBudgetTable.jsindex f869669acc..2eb226a0d3 100644--- a/packages/desktop-client/src/components/budget/MobileBudgetTable.js+++ b/packages/desktop-client/src/components/budget/MobileBudgetTable.js@@ -19,7 +19,7 @@ import {Card,Label,Text,- View+ View,} from 'loot-design/src/components/common';import CellValue from 'loot-design/src/components/spreadsheet/CellValue';import format from 'loot-design/src/components/spreadsheet/format';@@ -61,8 +61,8 @@ export function ToBudget({ toBudget, onClick }) {styles.smallText,{fontWeight: '500',- color: amount < 0 ? colors.r4 : colors.n1- }+ color: amount < 0 ? colors.r4 : colors.n1,+ },]}>{format(amount, 'financial')}@@ -96,8 +96,8 @@ function Saved({ projected }) {styles.smallText,{fontWeight: '500',- color: projected ? colors.y3 : isNegative ? colors.r4 : colors.n1- }+ color: projected ? colors.y3 : isNegative ? colors.r4 : colors.n1,+ },]}>{format(saved, 'financial')}@@ -116,7 +116,7 @@ export class BudgetCell extends React.PureComponent {textStyle,categoryId,month,- onBudgetAction+ onBudgetAction,} = this.props;return (@@ -132,8 +132,8 @@ export class BudgetCell extends React.PureComponent {...(!editing && {opacity: 0,position: 'absolute',- top: 0- })+ top: 0,+ }),}}focused={editing}textStyle={[styles.smallText, textStyle]}@@ -141,7 +141,7 @@ export class BudgetCell extends React.PureComponent {onBlur={value => {onBudgetAction(month, 'budget-amount', {category: categoryId,- amount: amountToInteger(value)+ amount: amountToInteger(value),});}}/>@@ -150,7 +150,7 @@ export class BudgetCell extends React.PureComponent {style={{justifyContent: 'center',height: ROW_HEIGHT - 4,- ...(editing && { display: 'none' })+ ...(editing && { display: 'none' }),}}><Text style={[styles.smallText, textStyle]} data-testid={name}>@@ -198,7 +198,7 @@ function BudgetGroupPreview({ group, pending, style }) {style={{marginTop: 7,marginBottom: 7,- opacity: pending ? 1 : 0.4+ opacity: pending ? 1 : 0.4,}}><TotalsRow group={group} blank={true} />@@ -235,7 +235,7 @@ function BudgetCategoryPreview({ name, pending, style }) {style={{flex: 1,borderColor: 'transparent',- borderRadius: 4+ borderRadius: 4,}}><Text style={styles.smallText}>{name}</Text>@@ -279,7 +279,7 @@ export class BudgetCategory extends React.PureComponent {style,month,// onEdit,- onBudgetAction+ onBudgetAction,} = this.props;let budgeted = rolloverBudget.catBudgeted(category.id);@@ -292,9 +292,9 @@ export class BudgetCategory extends React.PureComponent {{backgroundColor: editing ? colors.p11 : 'transparent',borderBottomWidth: 0,- borderTopWidth: index > 0 ? 1 : 0+ borderTopWidth: index > 0 ? 1 : 0,},- style+ style,]}data-testid="row">@@ -312,7 +312,7 @@ export class BudgetCategory extends React.PureComponent {style={{alignItems: 'center',flexDirection: 'row',- opacity: this.opacity+ opacity: this.opacity,}}><BudgetCell@@ -398,7 +398,7 @@ export class TotalsRow extends React.PureComponent {style={{flexDirection: 'row',alignItems: 'center',- backgroundColor: colors.n11+ backgroundColor: colors.n11,}}data-testid="totals">@@ -421,14 +421,14 @@ export class TotalsRow extends React.PureComponent {style={{flexDirection: 'row',alignItems: 'center',- opacity: this.opacity+ opacity: this.opacity,}}><CellValuebinding={rolloverBudget.groupBudgeted(group.id)}style={[styles.smallText,- { width: 90, fontWeight: '500', textAlign: 'right' }+ { width: 90, fontWeight: '500', textAlign: 'right' },]}type="financial"/>@@ -436,7 +436,7 @@ export class TotalsRow extends React.PureComponent {binding={rolloverBudget.groupBalance(group.id)}style={[styles.smallText,- { width: 90, fontWeight: '500', textAlign: 'right' }+ { width: 90, fontWeight: '500', textAlign: 'right' },]}type="financial"/>@@ -501,9 +501,9 @@ export class IncomeCategory extends React.PureComponent {flexDirection: 'row',alignItems: 'center',padding: 10,- backgroundColor: 'transparent'+ backgroundColor: 'transparent',},- style+ style,]}><View style={{ flex: 1 }}>@@ -517,7 +517,7 @@ export class IncomeCategory extends React.PureComponent {style={[styles.smallText,{ width: 90, textAlign: 'right' },- amountTextStyle+ amountTextStyle,]}type="financial"/>@@ -527,7 +527,7 @@ export class IncomeCategory extends React.PureComponent {style={[styles.smallText,{ width: 90, textAlign: 'right' },- amountTextStyle+ amountTextStyle,]}type="financial"/>@@ -587,7 +587,7 @@ export class BudgetGroup extends React.PureComponent {onReorderCategory,// onReorderGroup,onAddCategory,- onBudgetAction+ onBudgetAction,} = this.props;function editable(content) {@@ -623,7 +623,7 @@ export class BudgetGroup extends React.PureComponent {<Cardstyle={{marginTop: 7,- marginBottom: 7+ marginBottom: 7,}}><TotalsRow@@ -652,7 +652,7 @@ export class BudgetGroup extends React.PureComponent {/>);})}- </Card>+ </Card>,);}}@@ -669,7 +669,7 @@ export class IncomeBudgetGroup extends React.Component {justifyContent: 'flex-end',marginTop: 50,marginBottom: 5,- marginRight: 14+ marginRight: 14,}}>{type === 'report' && (@@ -724,7 +724,7 @@ export class BudgetGroups extends React.Component {getGroups = memoizeOne(groups => {return {incomeGroup: groups.find(group => group.is_income),- expenseGroups: groups.filter(group => !group.is_income)+ expenseGroups: groups.filter(group => !group.is_income),};});@@ -740,7 +740,7 @@ export class BudgetGroups extends React.Component {onAddCategory,onReorderCategory,onReorderGroup,- onBudgetAction+ onBudgetAction,} = this.props;const { incomeGroup, expenseGroups } = this.getGroups(categoryGroups);@@ -890,7 +890,7 @@ export class BudgetTable extends React.Component {onReorderGroup,onShowBudgetDetails,onOpenActionSheet,- onBudgetAction+ onBudgetAction,} = this.props;// let editMode = false; // neuter editMode -- sorry, not rewriting drag-n-drop right nowlet { editingCategory } = this.state;@@ -919,7 +919,7 @@ export class BudgetTable extends React.Component {paddingRight: 14,backgroundColor: 'white',borderBottomWidth: 1,- borderColor: colors.n9+ borderColor: colors.n9,}}>{type === 'report' ? (@@ -939,7 +939,7 @@ export class BudgetTable extends React.Component {type="financial"style={[styles.smallText,- { color: colors.n1, textAlign: 'right', fontWeight: '500' }+ { color: colors.n1, textAlign: 'right', fontWeight: '500' },]}formatter={value => {return format(-parseFloat(value || '0'), 'financial');@@ -953,7 +953,7 @@ export class BudgetTable extends React.Component {type="financial"style={[styles.smallText,- { color: colors.n1, textAlign: 'right', fontWeight: '500' }+ { color: colors.n1, textAlign: 'right', fontWeight: '500' },]}/></View>@@ -1029,7 +1029,7 @@ function UnconnectedBudgetHeader({onPrevMonth,onNextMonth,sync,- localPrefs+ localPrefs,}) {// let [menuOpen, setMenuOpen] = useState(false);@@ -1050,7 +1050,7 @@ function UnconnectedBudgetHeader({let buttonStyle = {paddingLeft: 15,paddingRight: 15,- backgroundColor: 'transparent'+ backgroundColor: 'transparent',};return (@@ -1061,7 +1061,7 @@ function UnconnectedBudgetHeader({flexShrink: 0,height: 50,justifyContent: 'center',- backgroundColor: colors.p5+ backgroundColor: colors.p5,}}>{!editMode && (@@ -1075,8 +1075,8 @@ function UnconnectedBudgetHeader({{left: 0,opacity: prevEnabled ? 1 : 0.6,- padding: '5px 30px 5px 0'- }+ padding: '5px 30px 5px 0',+ },]}><ArrowThinLeft style={{ color: colors.n11 }} width="15" height="15" />@@ -1089,9 +1089,9 @@ function UnconnectedBudgetHeader({marginTop: 12,marginBottom: 12,color: colors.n11,- textAlign: 'center'+ textAlign: 'center',// zIndex: -1- }+ },]}>{monthUtils.format(currentMonth, "MMMM ''yy")}@@ -1102,12 +1102,12 @@ function UnconnectedBudgetHeader({onClick={onDone}style={[buttonStyle,- { position: 'absolute', top: 0, bottom: 0, right: 0 }+ { position: 'absolute', top: 0, bottom: 0, right: 0 },]}textStyle={{color: colors.n11,fontSize: 15,- fontWeight: '500'+ fontWeight: '500',}}>Done@@ -1136,7 +1136,7 @@ function UnconnectedBudgetHeader({right: 0,backgroundColor: 'transparent',paddingLeft: 12,- paddingRight: 12+ paddingRight: 12,}}localPrefs={localPrefs}onSync={sync}@@ -1184,7 +1184,7 @@ function UnconnectedBudgetHeader({const BudgetHeader = connect(state => ({- localPrefs: state.prefs.local+ localPrefs: state.prefs.local,}),- actions+ actions,)(UnconnectedBudgetHeader);diff --git a/packages/desktop-client/src/components/budget/MobileTable.js b/packages/desktop-client/src/components/budget/MobileTable.jsindex cda9aad199..aff17c0a8b 100644--- a/packages/desktop-client/src/components/budget/MobileTable.js+++ b/packages/desktop-client/src/components/budget/MobileTable.js@@ -17,9 +17,9 @@ export const ListItem = ({ children, style, ...props }) => {alignItems: 'center',paddingLeft: 10,paddingRight: 10,- zIndex: 1+ zIndex: 1,},- style+ style,]}{...props}>diff --git a/packages/desktop-client/src/components/budget/MonthCountSelector.js b/packages/desktop-client/src/components/budget/MonthCountSelector.jsindex e21d3efbc4..f82e7cfcf8 100644--- a/packages/desktop-client/src/components/budget/MonthCountSelector.js+++ b/packages/desktop-client/src/components/budget/MonthCountSelector.js@@ -30,7 +30,7 @@ export function MonthCountSelector({ maxMonths, onChange }) {key={i}color={maxMonths >= i ? colors.n5 : colors.n8}onClick={() => onChange(i)}- />+ />,);}@@ -41,11 +41,11 @@ export function MonthCountSelector({ maxMonths, onChange }) {marginRight: 20,marginTop: -1,'& svg': {- transition: 'transform .15s'+ transition: 'transform .15s',},'& svg:hover': {- transform: 'scale(1.2)'- }+ transform: 'scale(1.2)',+ },}}title="Choose the number of months shown at a time">diff --git a/packages/desktop-client/src/components/budget/index.js b/packages/desktop-client/src/components/budget/index.jsindex b0001d90f0..b9a1c441ba 100644--- a/packages/desktop-client/src/components/budget/index.js+++ b/packages/desktop-client/src/components/budget/index.js@@ -11,7 +11,7 @@ import {deleteCategory,addGroup,updateGroup,- deleteGroup+ deleteGroup,} 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';@@ -42,7 +42,7 @@ class Budget extends React.PureComponent {collapsed: props.collapsedPrefs || [],bounds: { start: currentMonth, end: currentMonth },categoryGroups: null,- summaryCollapsed: props.summaryCollapsed+ summaryCollapsed: props.summaryCollapsed,};}@@ -89,7 +89,7 @@ class Budget extends React.PureComponent {}}),- titlebar.subscribe(this.onTitlebarEvent)+ titlebar.subscribe(this.onTitlebarEvent),];this.cleanup = () => {@@ -146,7 +146,7 @@ class Budget extends React.PureComponent {bounds = getValidMonthBounds(bounds,monthUtils.subMonths(startMonth, 1),- monthUtils.addMonths(startMonth, numMonths + 1)+ monthUtils.addMonths(startMonth, numMonths + 1),);let months = monthUtils.rangeInclusive(bounds.start, bounds.end);@@ -184,7 +184,7 @@ class Budget extends React.PureComponent {onShowNewCategory = groupId => {this.setState({newCategoryForGroup: groupId,- collapsed: this.state.collapsed.filter(c => c !== groupId)+ collapsed: this.state.collapsed.filter(c => c !== groupId),});};@@ -215,7 +215,7 @@ class Budget extends React.PureComponent {let id = await this.props.createCategory(category.name,category.cat_group,- category.is_income+ category.is_income,);this.setState({@@ -223,14 +223,14 @@ class Budget extends React.PureComponent {categoryGroups: addCategory(categoryGroups, {...category,is_income: category.is_income ? 1 : 0,- id- })+ id,+ }),});} else {this.props.updateCategory(category);this.setState({- categoryGroups: updateCategory(categoryGroups, category)+ categoryGroups: updateCategory(categoryGroups, category),});}};@@ -247,16 +247,16 @@ class Budget extends React.PureComponent {this.props.deleteCategory(id, transferCategory);this.setState({- categoryGroups: deleteCategory(categoryGroups, id)+ categoryGroups: deleteCategory(categoryGroups, id),});}- }+ },});} else {this.props.deleteCategory(id);this.setState({- categoryGroups: deleteCategory(categoryGroups, id)+ categoryGroups: deleteCategory(categoryGroups, id),});}};@@ -272,13 +272,13 @@ class Budget extends React.PureComponent {...group,is_income: 0,categories: group.categories || [],- id- })+ id,+ }),});} else {this.props.updateGroup(group);this.setState({- categoryGroups: updateGroup(categoryGroups, group)+ categoryGroups: updateGroup(categoryGroups, group),});}};@@ -302,15 +302,15 @@ class Budget extends React.PureComponent {this.props.deleteGroup(id, transferCategory);this.setState({- categoryGroups: deleteGroup(categoryGroups, id)+ categoryGroups: deleteGroup(categoryGroups, id),});- }+ },});} else {this.props.deleteGroup(id);this.setState({- categoryGroups: deleteGroup(categoryGroups, id)+ categoryGroups: deleteGroup(categoryGroups, id),});}};@@ -326,13 +326,13 @@ class Budget extends React.PureComponent {goBack: true,filterName: `${categoryName} (${monthUtils.format(month,- 'MMMM yyyy'+ 'MMMM yyyy',)})`,filter: {category: categoryId,- date: { $transform: '$month', $eq: month }- }- }+ date: { $transform: '$month', $eq: month },+ },+ },});};@@ -345,8 +345,8 @@ class Budget extends React.PureComponent {categoryGroups,sortInfo.id,sortInfo.groupId,- sortInfo.targetId- )+ sortInfo.targetId,+ ),});};@@ -358,8 +358,8 @@ class Budget extends React.PureComponent {categoryGroups: moveCategoryGroup(categoryGroups,sortInfo.id,- sortInfo.targetId- )+ sortInfo.targetId,+ ),});};@@ -391,7 +391,7 @@ class Budget extends React.PureComponent {maxMonths,budgetType: type,reportComponents,- rolloverComponents+ rolloverComponents,} = this.props;let {initialized,@@ -402,7 +402,7 @@ class Budget extends React.PureComponent {isAddingGroup,collapsed,summaryCollapsed,- bounds+ bounds,} = this.state;maxMonths = maxMonths || 1;@@ -507,9 +507,9 @@ function BudgetWrapper(props) {IncomeCategoryComponent: report.IncomeCategoryMonth,IncomeGroupComponent: report.IncomeGroupMonth,BudgetTotalsComponent: report.BudgetTotalsMonth,- IncomeHeaderComponent: report.IncomeHeaderMonth+ IncomeHeaderComponent: report.IncomeHeaderMonth,}),- [report]+ [report],);let rolloverComponents = useMemo(@@ -520,9 +520,9 @@ function BudgetWrapper(props) {IncomeCategoryComponent: rollover.IncomeCategoryMonth,IncomeGroupComponent: rollover.IncomeGroupMonth,BudgetTotalsComponent: rollover.BudgetTotalsMonth,- IncomeHeaderComponent: rollover.IncomeHeaderMonth+ IncomeHeaderComponent: rollover.IncomeHeaderMonth,}),- [rollover]+ [rollover],);// In a previous iteration, the wrapper needs `overflow: hidden` for@@ -533,7 +533,7 @@ function BudgetWrapper(props) {<Viewstyle={[styles.page,- { paddingLeft: 8, paddingRight: 8, overflow: 'hidden' }+ { paddingLeft: 8, paddingRight: 8, overflow: 'hidden' },]}><Budget@@ -553,7 +553,7 @@ export default connect(summaryCollapsed: state.prefs.local['budget.summaryCollapsed'],budgetType: state.prefs.local.budgetType || 'rollover',maxMonths: state.prefs.global.maxMonths,- categoryGroups: state.queries.categories.grouped+ categoryGroups: state.queries.categories.grouped,}),- actions+ actions,)(BudgetWrapper);diff --git a/packages/desktop-client/src/components/debug/index.js b/packages/desktop-client/src/components/debug/index.jsindex 8eb5687f82..e25ef7fcaf 100644--- a/packages/desktop-client/src/components/debug/index.js+++ b/packages/desktop-client/src/components/debug/index.js@@ -32,7 +32,7 @@ class Debug extends React.Component {code: null,sql: null,sqlgenValue: localStorage.sqlgenValue,- sqlgenRow: localStorage.sqlgenRow+ sqlgenRow: localStorage.sqlgenRow,};}@@ -62,7 +62,7 @@ class Debug extends React.Component {} catch (e) {}const res = await send('debug-sqlgen', {- expr: this.state.sqlgenValue+ expr: this.state.sqlgenValue,});this.setState({ sqlgenResult: res });}@@ -92,7 +92,7 @@ class Debug extends React.Component {// sql,sqlgenValue,sqlgenRow,- sqlgenResult+ sqlgenResult,} = this.state;return (diff --git a/packages/desktop-client/src/components/manager/ConfigServer.js b/packages/desktop-client/src/components/manager/ConfigServer.jsindex 2329e551d8..a9385ddef4 100644--- a/packages/desktop-client/src/components/manager/ConfigServer.js+++ b/packages/desktop-client/src/components/manager/ConfigServer.js@@ -9,13 +9,13 @@ import {View,Text,Button,- ButtonWithLoading+ ButtonWithLoading,} from 'loot-design/src/components/common';import { useSetThemeColor } from 'loot-design/src/components/hooks';import { colors } from 'loot-design/src/style';import {isDevelopmentEnvironment,- isPreviewEnvironment+ isPreviewEnvironment,} from 'loot-design/src/util/environment';import { useServerURL } from '../../hooks/useServerURL';@@ -101,7 +101,7 @@ export default function ConfigServer() {style={{fontSize: 16,color: colors.n2,- lineHeight: 1.5+ lineHeight: 1.5,}}>{currentUrl ? (@@ -124,7 +124,7 @@ export default function ConfigServer() {marginTop: 20,color: colors.r4,borderRadius: 4,- fontSize: 15+ fontSize: 15,}}>{getErrorMessage(error)}@@ -165,7 +165,7 @@ export default function ConfigServer() {flexDirection: 'row',flexFlow: 'row wrap',justifyContent: 'center',- marginTop: 15+ marginTop: 15,}}>{currentUrl ? (@@ -179,7 +179,7 @@ export default function ConfigServer() {style={{color: colors.n4,margin: 5,- marginRight: 15+ marginRight: 15,}}onClick={onSameDomain}>diff --git a/packages/desktop-client/src/components/manager/GraphBackground.js b/packages/desktop-client/src/components/manager/GraphBackground.jsindex ba392ac17c..587ab671c2 100644--- a/packages/desktop-client/src/components/manager/GraphBackground.js+++ b/packages/desktop-client/src/components/manager/GraphBackground.js@@ -55,7 +55,7 @@ function GraphBackground({ width, height, style }) {style={{fill: 'rgba(255, 255, 214, 0.8)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -82,7 +82,7 @@ function GraphBackground({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.9)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -109,7 +109,7 @@ function GraphBackground({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.6)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -136,7 +136,7 @@ function GraphBackground({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.3)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -186,7 +186,7 @@ function GraphBackground({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.18)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -236,7 +236,7 @@ function GraphBackground({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.06)',stroke: 'none',- width: 200+ width: 200,}}/></g>diff --git a/packages/desktop-client/src/components/manager/GraphBackground2.js b/packages/desktop-client/src/components/manager/GraphBackground2.jsindex 90b6325f45..ce56d45c43 100644--- a/packages/desktop-client/src/components/manager/GraphBackground2.js+++ b/packages/desktop-client/src/components/manager/GraphBackground2.js@@ -55,7 +55,7 @@ function GraphBackground2({ width, height, style }) {style={{fill: 'rgba(255, 255, 214, 0.8)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -82,7 +82,7 @@ function GraphBackground2({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.9)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -109,7 +109,7 @@ function GraphBackground2({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.6)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -136,7 +136,7 @@ function GraphBackground2({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.3)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -186,7 +186,7 @@ function GraphBackground2({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.18)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -236,7 +236,7 @@ function GraphBackground2({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.06)',stroke: 'none',- width: 200+ width: 200,}}/></g>diff --git a/packages/desktop-client/src/components/manager/GraphBackground3.js b/packages/desktop-client/src/components/manager/GraphBackground3.jsindex 4cbec59955..7818a0766a 100644--- a/packages/desktop-client/src/components/manager/GraphBackground3.js+++ b/packages/desktop-client/src/components/manager/GraphBackground3.js@@ -55,7 +55,7 @@ function GraphBackground3({ width, height, style }) {style={{fill: 'rgba(255, 255, 214, 0.8)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -82,7 +82,7 @@ function GraphBackground3({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.9)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -109,7 +109,7 @@ function GraphBackground3({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.6)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -136,7 +136,7 @@ function GraphBackground3({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.3)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -186,7 +186,7 @@ function GraphBackground3({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.18)',stroke: 'none',- width: 200+ width: 200,}}/></g>@@ -236,7 +236,7 @@ function GraphBackground3({ width, height, style }) {style={{fill: 'rgba(155, 102, 255, 0.06)',stroke: 'none',- width: 200+ width: 200,}}/></g>diff --git a/packages/desktop-client/src/components/manager/ManagementApp.js b/packages/desktop-client/src/components/manager/ManagementApp.jsindex 0d4c026c5c..96b0e09254 100644--- a/packages/desktop-client/src/components/manager/ManagementApp.js+++ b/packages/desktop-client/src/components/manager/ManagementApp.js@@ -37,8 +37,8 @@ function Version() {right: 0,marginLeft: 15,marginRight: 17,- zIndex: 5001- }+ zIndex: 5001,+ },}}href={'https://actualbudget.github.io/docs/Release-Notes/'}>@@ -88,7 +88,7 @@ class ManagementApp extends React.Component {// id" of some kind.this.props.setAppState({managerHasInitialized: true,- ...(!alreadyLoading ? { loadingText: null } : null)+ ...(!alreadyLoading ? { loadingText: null } : null),});}@@ -155,21 +155,21 @@ class ManagementApp extends React.Component {left: 0,right: 0,height: 40,- WebkitAppRegion: 'drag'+ WebkitAppRegion: 'drag',}}/><Viewstyle={{position: 'absolute',bottom: 40,- right: 15+ right: 15,}}><Notificationsstyle={{position: 'relative',left: 'initial',- right: 'initial'+ right: 'initial',}}/></View>@@ -184,7 +184,7 @@ class ManagementApp extends React.Component {padding: 20,position: 'absolute',right: 0,- top: 0+ top: 0,}}>{userData ? (@@ -211,7 +211,7 @@ class ManagementApp extends React.Component {top: 0,right: 0,padding: '6px 10px',- zIndex: 4000+ zIndex: 4000,}}><Switch>@@ -258,6 +258,6 @@ export default connect(state => {userData: state.user.data,managerHasInitialized: state.app.managerHasInitialized,loadingText: state.app.loadingText,- currentModals: modalStack.map(modal => modal.name)+ currentModals: modalStack.map(modal => modal.name),};}, actions)(ManagementApp);diff --git a/packages/desktop-client/src/components/manager/Modals.js b/packages/desktop-client/src/components/manager/Modals.jsindex e5f1a5d957..663170bd7a 100644--- a/packages/desktop-client/src/components/manager/Modals.js+++ b/packages/desktop-client/src/components/manager/Modals.js@@ -25,7 +25,7 @@ function Modals({availableImports,globalPrefs,isLoggedIn,- actions+ actions,}) {let stack = modalStack.map(({ name, options }, idx) => {const modalProps = {@@ -34,7 +34,7 @@ function Modals({onBack: actions.popModal,isCurrent: idx === modalStack.length - 1,isHidden,- stackIndex: idx+ stackIndex: idx,};switch (name) {@@ -86,7 +86,7 @@ function Modals({initialState={{ backups: [] }}didMount={async ({ setState }) => {setState({- backups: await send('backups-get', { id: options.budgetId })+ backups: await send('backups-get', { id: options.budgetId }),});}}>@@ -95,7 +95,7 @@ function Modals({budgetId={options.budgetId}modalProps={{...modalProps,- onClose: actions.popModal+ onClose: actions.popModal,}}backupDisabled={true}actions={actions}@@ -139,7 +139,7 @@ export default connect(availableImports: state.budgets.availableImports,globalPrefs: state.prefs.global,allFiles: state.budgets.allFiles,- isLoggedIn: !!state.user.data+ isLoggedIn: !!state.user.data,}),- dispatch => ({ actions: bindActionCreators(actions, dispatch) })+ dispatch => ({ actions: bindActionCreators(actions, dispatch) }),)(Modals);diff --git a/packages/desktop-client/src/components/manager/ServerURL.js b/packages/desktop-client/src/components/manager/ServerURL.jsindex 6f9ee831a8..48ce36c3a0 100644--- a/packages/desktop-client/src/components/manager/ServerURL.js+++ b/packages/desktop-client/src/components/manager/ServerURL.js@@ -17,7 +17,7 @@ export default function ServerURL() {justifyContent: 'center',flexDirection: 'row',marginBottom: 15,- zIndex: 5000+ zIndex: 5000,}}><Text>diff --git a/packages/desktop-client/src/components/manager/subscribe/Bootstrap.js b/packages/desktop-client/src/components/manager/subscribe/Bootstrap.jsindex 184f43caa2..08a88ac2ee 100644--- a/packages/desktop-client/src/components/manager/subscribe/Bootstrap.js+++ b/packages/desktop-client/src/components/manager/subscribe/Bootstrap.js@@ -56,7 +56,7 @@ export default function Bootstrap() {style={{fontSize: 16,color: colors.n2,- lineHeight: 1.4+ lineHeight: 1.4,}}>Set a password for this server instance@@ -68,7 +68,7 @@ export default function Bootstrap() {marginTop: 20,color: colors.r4,borderRadius: 4,- fontSize: 15+ fontSize: 15,}}>{getErrorMessage(error)}diff --git a/packages/desktop-client/src/components/manager/subscribe/ChangePassword.js b/packages/desktop-client/src/components/manager/subscribe/ChangePassword.jsindex 497425694e..ad7c4a1155 100644--- a/packages/desktop-client/src/components/manager/subscribe/ChangePassword.js+++ b/packages/desktop-client/src/components/manager/subscribe/ChangePassword.js@@ -49,7 +49,7 @@ export default function ChangePassword() {style={{fontSize: 16,color: colors.n2,- lineHeight: 1.4+ lineHeight: 1.4,}}>This will change the password for this server instance. All existing@@ -62,7 +62,7 @@ export default function ChangePassword() {marginTop: 20,color: colors.r4,borderRadius: 4,- fontSize: 15+ fontSize: 15,}}>{getErrorMessage(error)}@@ -75,7 +75,7 @@ export default function ChangePassword() {marginTop: 20,color: colors.g4,borderRadius: 4,- fontSize: 15+ fontSize: 15,}}>{msg}diff --git a/packages/desktop-client/src/components/manager/subscribe/ConfirmPasswordForm.js b/packages/desktop-client/src/components/manager/subscribe/ConfirmPasswordForm.jsindex 52453cdb2c..5a2605df32 100644--- a/packages/desktop-client/src/components/manager/subscribe/ConfirmPasswordForm.js+++ b/packages/desktop-client/src/components/manager/subscribe/ConfirmPasswordForm.js@@ -35,7 +35,7 @@ export function ConfirmPasswordForm({ buttons, onSetPassword, onError }) {display: 'flex',flexDirection: 'column',alignItems: 'stretch',- marginTop: 30+ marginTop: 30,}}onSubmit={onSubmit}>@@ -61,7 +61,7 @@ export function ConfirmPasswordForm({ buttons, onSetPassword, onError }) {flexDirection: 'row',alignItems: 'center',fontSize: 15,- marginTop: 20+ marginTop: 20,}}><label style={{ userSelect: 'none' }}>diff --git a/packages/desktop-client/src/components/manager/subscribe/Error.js b/packages/desktop-client/src/components/manager/subscribe/Error.jsindex 82903b12e4..2e7d5f35b0 100644--- a/packages/desktop-client/src/components/manager/subscribe/Error.js+++ b/packages/desktop-client/src/components/manager/subscribe/Error.js@@ -28,7 +28,7 @@ export default function Error() {style={{fontSize: 16,color: colors.n2,- lineHeight: 1.4+ lineHeight: 1.4,}}>{getErrorMessage(error)}diff --git a/packages/desktop-client/src/components/manager/subscribe/Login.js b/packages/desktop-client/src/components/manager/subscribe/Login.jsindex ed9ff8f25c..b0296f154d 100644--- a/packages/desktop-client/src/components/manager/subscribe/Login.js+++ b/packages/desktop-client/src/components/manager/subscribe/Login.js@@ -8,7 +8,7 @@ import {View,Text,Button,- ButtonWithLoading+ ButtonWithLoading,} from 'loot-design/src/components/common';import { colors } from 'loot-design/src/style';@@ -67,7 +67,7 @@ export default function Login() {style={{fontSize: 16,color: colors.n2,- lineHeight: 1.4+ lineHeight: 1.4,}}>If you lost your password, you likely still have access to your server@@ -80,7 +80,7 @@ export default function Login() {marginTop: 20,color: colors.r4,borderRadius: 4,- fontSize: 15+ fontSize: 15,}}>{getErrorMessage(error)}@@ -106,7 +106,7 @@ export default function Login() {style={{flexDirection: 'row',justifyContent: 'center',- marginTop: 15+ marginTop: 15,}}><Buttondiff --git a/packages/desktop-client/src/components/manager/subscribe/common.js b/packages/desktop-client/src/components/manager/subscribe/common.jsindex f0df7bdb92..26ad67eda4 100644--- a/packages/desktop-client/src/components/manager/subscribe/common.js+++ b/packages/desktop-client/src/components/manager/subscribe/common.js@@ -5,7 +5,7 @@ import { send } from 'loot-core/src/platform/client/fetch';import {Text,Button,- Input as BaseInput+ Input as BaseInput,} from 'loot-design/src/components/common';import { colors, styles } from 'loot-design/src/style';@@ -69,7 +69,7 @@ export function Title({ text }) {fontSize: 40,fontWeight: 700,color: colors.p3,- marginBottom: 20+ marginBottom: 20,}}>{text}@@ -87,9 +87,9 @@ export const Input = React.forwardRef((props, ref) => {fontSize: 15,border: 'none',...styles.shadow,- ':focus': { border: 'none', ...styles.shadow }+ ':focus': { border: 'none', ...styles.shadow },},- props.style+ props.style,]}/>);@@ -109,13 +109,13 @@ export const BareButton = React.forwardRef((props, ref) => {padding: '5px 7px',borderRadius: 4,':hover': {- backgroundColor: colors.n9+ backgroundColor: colors.n9,},':active': {- backgroundColor: colors.n9- }+ backgroundColor: colors.n9,+ },},- props.style+ props.style,]}/>);@@ -158,9 +158,9 @@ export function Paragraph({ style, children }) {fontSize: 15,color: colors.n2,lineHeight: 1.5,- marginTop: 20+ marginTop: 20,},- style+ style,]}>{children}diff --git a/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.js b/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.jsindex 6d391625b0..f03a5acd01 100644--- a/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.js+++ b/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.js@@ -6,7 +6,7 @@ import {Text,Block,Modal,- Button+ Button,} from 'loot-design/src/components/common';import { colors } from 'loot-design/src/style';@@ -84,7 +84,7 @@ class ConfirmCategoryDelete extends React.Component {marginTop: 20,flexDirection: 'row',justifyContent: 'flex-start',- alignItems: 'center'+ alignItems: 'center',}}><Text>Transfer to:</Text>@@ -95,15 +95,15 @@ class ConfirmCategoryDelete extends React.Component {categoryGroups={group? categoryGroups.filter(- g => g.id !== group.id && !!g.is_income === isIncome+ g => g.id !== group.id && !!g.is_income === isIncome,): categoryGroups.filter(g => !!g.is_income === isIncome).map(g => ({...g,categories: g.categories.filter(- c => c.id !== category.id- )+ c => c.id !== category.id,+ ),}))}name="category"diff --git a/packages/desktop-client/src/components/modals/CreateAccount.js b/packages/desktop-client/src/components/modals/CreateAccount.jsindex c81e2959a0..54428eac26 100644--- a/packages/desktop-client/src/components/modals/CreateAccount.js+++ b/packages/desktop-client/src/components/modals/CreateAccount.js@@ -40,7 +40,7 @@ class CreateAccount extends React.Component {padding: '10px 0',fontSize: 15,fontWeight: 600,- marginTop: 10+ marginTop: 10,}}onClick={this.onConnect}>@@ -52,7 +52,7 @@ class CreateAccount extends React.Component {marginTop: 30,marginBottom: 10,lineHeight: '1.4em',- fontSize: 15+ fontSize: 15,}}>You can also create a local account if you want to track@@ -66,7 +66,7 @@ class CreateAccount extends React.Component {fontSize: 15,fontWeight: 600,marginTop: 10,- color: colors.n3+ color: colors.n3,}}onClick={this.onCreateLocalAccount}>@@ -81,7 +81,7 @@ class CreateAccount extends React.Component {export default connect(state => ({- currentModal: state.modals.currentModal+ currentModal: state.modals.currentModal,}),- dispatch => bindActionCreators(actions, dispatch)+ dispatch => bindActionCreators(actions, dispatch),)(CreateAccount);diff --git a/packages/desktop-client/src/components/modals/CreateEncryptionKey.js b/packages/desktop-client/src/components/modals/CreateEncryptionKey.jsindex a13d99f3a9..5f256c9457 100644--- a/packages/desktop-client/src/components/modals/CreateEncryptionKey.js+++ b/packages/desktop-client/src/components/modals/CreateEncryptionKey.js@@ -13,14 +13,14 @@ import {P,ModalButtons,Input,- InitialFocus+ InitialFocus,} from 'loot-design/src/components/common';import { colors } from 'loot-design/src/style';export default function CreateEncryptionKey({modalProps,actions,- options = {}+ options = {},}) {let [password, setPassword] = useState('');let [loading, setLoading] = useState(false);@@ -134,7 +134,7 @@ export default function CreateEncryptionKey({color: colors.r4,textAlign: 'center',fontSize: 13,- marginBottom: 3+ marginBottom: 3,}}>{error}diff --git a/packages/desktop-client/src/components/modals/EditRule.js b/packages/desktop-client/src/components/modals/EditRule.jsindex 25b86c6215..b8ad4c4795 100644--- a/packages/desktop-client/src/components/modals/EditRule.js+++ b/packages/desktop-client/src/components/modals/EditRule.js@@ -3,7 +3,7 @@ import { useDispatch, useSelector } from 'react-redux';import {initiallyLoadPayees,- setUndoEnabled+ setUndoEnabled,} from 'loot-core/src/client/actions/queries';import { useSchedules } from 'loot-core/src/client/data-hooks/schedules';import q, { runQuery } from 'loot-core/src/client/query-helpers';@@ -17,12 +17,12 @@ import {unparse,makeValue,FIELD_TYPES,- TYPE_INFO+ TYPE_INFO,} from 'loot-core/src/shared/rules';import {integerToCurrency,integerToAmount,- amountToInteger+ amountToInteger,} from 'loot-core/src/shared/util';import {View,@@ -31,10 +31,10 @@ import {Button,Stack,CustomSelect,- Tooltip+ Tooltip,} from 'loot-design/src/components/common';import useSelected, {- SelectedProvider+ SelectedProvider,} from 'loot-design/src/components/useSelected';import { colors } from 'loot-design/src/style';import AddIcon from 'loot-design/src/svg/v0/Add';@@ -99,7 +99,7 @@ export function OpSelect({style,value,formatOp = friendlyOp,- onChange+ onChange,}) {// We don't support the `contains` operator for the id type for// rules yet@@ -141,7 +141,7 @@ function FieldError({ type }) {fontSize: 12,textAlign: 'center',color: colors.r5,- marginBottom: 5+ marginBottom: 5,}}>{getFieldError(type)}@@ -157,7 +157,7 @@ function Editor({ error, style, children }) {align="center"spacing={1}style={{- padding: '3px 5px'+ padding: '3px 5px',}}>{children}@@ -175,7 +175,7 @@ export function ConditionEditor({isSchedule,onChange,onDelete,- onAdd+ onAdd,}) {let { field, op, value, type, options, error } = condition;@@ -231,7 +231,7 @@ function formatAmount(amount) {return integerToCurrency(amount);} else {return `${integerToCurrency(amount.num1)} to ${integerToCurrency(- amount.num2+ amount.num2,)}`;}}@@ -241,7 +241,7 @@ function ScheduleDescription({ id }) {return state.prefs.local.dateFormat || 'MM/dd/yyyy';});let scheduleData = useSchedules({- transform: useCallback(q => q.filter({ id }), [])+ transform: useCallback(q => q.filter({ id }), []),});if (scheduleData == null) {@@ -262,7 +262,7 @@ function ScheduleDescription({ id }) {style={{whiteSpace: 'nowrap',overflow: 'hidden',- textOverflow: 'ellipsis'+ textOverflow: 'ellipsis',}}>Payee:{' '}@@ -289,7 +289,7 @@ let actionFields = ['amount','category','account',- 'cleared'+ 'cleared',].map(field => [field, mapField(field)]);function ActionEditor({ ops, action, editorStyle, onChange, onDelete, onAdd }) {let { field, op, value, type, error, inputKey = 'initial' } = action;@@ -360,7 +360,7 @@ function StageInfo() {padding: 10,color: colors.n4,maxWidth: 450,- lineHeight: 1.5+ lineHeight: 1.5,}}>The stage of a rule allows you to force a specific order. Pre rules@@ -380,9 +380,9 @@ function StageButton({ selected, children, style, onSelect }) {{ fontSize: 'inherit' },selected && {backgroundColor: colors.b9,- ':hover': { backgroundColor: colors.b9 }+ ':hover': { backgroundColor: colors.b9 },},- style+ style,]}onClick={onSelect}>@@ -400,7 +400,7 @@ export function ConditionsList({conditionFields,editorStyle,isSchedule,- onChangeConditions+ onChangeConditions,}) {function addCondition(index) {let field = 'payee';@@ -409,7 +409,7 @@ export function ConditionsList({type: FIELD_TYPES.get(field),field,op: 'is',- value: null+ value: null,});onChangeConditions(copy);}@@ -462,15 +462,15 @@ export function ConditionsList({return newInput(makeValue(cond.value != null ? [cond.value] : [], {...cond,- op: value- })+ op: value,+ }),);} else if (cond.op === 'oneOf' && op !== 'oneOf') {return newInput(makeValue(cond.value.length > 0 ? cond.value[0] : null, {...cond,- op: value- })+ op: value,+ }),);} else if (cond.op !== 'isbetween' && op === 'isbetween') {// TODO: I don't think we need `makeValue` anymore. It@@ -480,14 +480,14 @@ export function ConditionsList({return makeValue({num1: amountToInteger(cond.value),- num2: amountToInteger(cond.value)+ num2: amountToInteger(cond.value),},- { ...cond, op: value }+ { ...cond, op: value },);} else if (cond.op === 'isbetween' && op !== 'isbetween') {return makeValue(integerToAmount(cond.value.num1 || 0), {...cond,- op: value+ op: value,});} else {return { ...cond, op: value };@@ -497,7 +497,7 @@ export function ConditionsList({}return cond;- })+ }),);}@@ -552,19 +552,19 @@ let conditionFields = ['category','date','notes',- 'amount'+ 'amount',].map(field => [field, mapField(field)]).concat([['amount-inflow', mapField('amount', { inflow: true })],- ['amount-outflow', mapField('amount', { outflow: true })]+ ['amount-outflow', mapField('amount', { outflow: true })],]);export default function EditRule({history,modalProps,defaultRule,- onSave: originalOnSave+ onSave: originalOnSave,}) {let [conditions, setConditions] = useState(defaultRule.conditions.map(parse));let [actions, setActions] = useState(defaultRule.actions.map(parse));@@ -595,12 +595,12 @@ export default function EditRule({// Run it hereasync function run() {let { filters } = await send('make-filters-from-conditions', {- conditions: conditions.map(unparse)+ conditions: conditions.map(unparse),});if (filters.length > 0) {let { data: transactions } = await runQuery(- q('transactions').filter({ $and: filters }).select('*')+ q('transactions').filter({ $and: filters }).select('*'),);setTransactions(transactions);} else {@@ -624,7 +624,7 @@ export default function EditRule({type: FIELD_TYPES.get(field),field,op: 'set',- value: null+ value: null,});setActions(copy);}@@ -646,7 +646,7 @@ export default function EditRule({}return a;- })+ }),);}@@ -661,7 +661,7 @@ export default function EditRule({function onApply() {send('rule-apply-actions', {transactionIds: [...selectedInst.items],- actions+ actions,}).then(() => {// This makes it refetch the transactionssetActions([...actions]);@@ -673,7 +673,7 @@ export default function EditRule({...defaultRule,stage,conditions: conditions.map(unparse),- actions: actions.map(unparse)+ actions: actions.map(unparse),};let method = rule.id ? 'rule-update' : 'rule-add';@@ -700,7 +700,7 @@ export default function EditRule({let editorStyle = {backgroundColor: colors.n10,- borderRadius: 4+ borderRadius: 4,};return (@@ -719,7 +719,7 @@ export default function EditRule({flexGrow: 0,flexShrink: 0,flexBasis: 'auto',- overflow: 'hidden'+ overflow: 'hidden',}}><View@@ -727,7 +727,7 @@ export default function EditRule({flexDirection: 'row',alignItems: 'center',marginBottom: 15,- padding: '0 20px'+ padding: '0 20px',}}><Text style={{ color: colors.n4, marginRight: 15 }}>@@ -764,7 +764,7 @@ export default function EditRule({borderBottom: '1px solid ' + colors.border,padding: 20,overflow: 'auto',- maxHeight: 'calc(100% - 300px)'+ maxHeight: 'calc(100% - 300px)',}}><View style={{ flexShrink: 0 }}>@@ -821,7 +821,7 @@ export default function EditRule({style={{flexDirection: 'row',alignItems: 'center',- marginBottom: 12+ marginBottom: 12,}}><Text style={{ color: colors.n4, marginBottom: 0 }}>diff --git a/packages/desktop-client/src/components/modals/FixEncryptionKey.js b/packages/desktop-client/src/components/modals/FixEncryptionKey.jsindex 966e80e809..98d47e1286 100644--- a/packages/desktop-client/src/components/modals/FixEncryptionKey.js+++ b/packages/desktop-client/src/components/modals/FixEncryptionKey.js@@ -12,14 +12,14 @@ import {ModalButtons,Input,InitialFocus,- ExternalLink+ ExternalLink,} from 'loot-design/src/components/common';import { colors } from 'loot-design/src/style';export default function FixEncryptionKey({modalProps,actions,- options = {}+ options = {},}) {let { hasExistingKey, cloudFileId, onSuccess } = options;@@ -35,7 +35,7 @@ export default function FixEncryptionKey({let { error } = await send('key-test', {password,- fileId: cloudFileId+ fileId: cloudFileId,});if (error) {setError(getTestKeyError(error));@@ -57,7 +57,7 @@ export default function FixEncryptionKey({fontSize: 25,fontWeight: 700,color: colors.n2,- margin: '20px 0'+ margin: '20px 0',}}>{hasExistingKey@@ -98,7 +98,7 @@ export default function FixEncryptionKey({style={{marginTop: 15,flexDirection: 'column',- alignItems: 'center'+ alignItems: 'center',}}><Text style={{ fontWeight: 600, marginBottom: 5 }}>Password</Text>{' '}@@ -108,7 +108,7 @@ export default function FixEncryptionKey({color: colors.r4,textAlign: 'center',fontSize: 13,- marginBottom: 3+ marginBottom: 3,}}>{error}diff --git a/packages/desktop-client/src/components/modals/ManageRulesModal.js b/packages/desktop-client/src/components/modals/ManageRulesModal.jsindex 9362a1ee5d..fcd03ffad8 100644--- a/packages/desktop-client/src/components/modals/ManageRulesModal.js+++ b/packages/desktop-client/src/components/modals/ManageRulesModal.js@@ -3,7 +3,7 @@ import React, { useState } from 'react';import { Modal } from 'loot-design/src/components/common';import {isDevelopmentEnvironment,- isPreviewEnvironment+ isPreviewEnvironment,} from 'loot-design/src/util/environment';import ManageRules from '../ManageRules';@@ -13,7 +13,7 @@ export default function ManageRulesModal({ modalProps, payeeId }) {if (isDevelopmentEnvironment() || isPreviewEnvironment()) {if (location.pathname !== '/payees') {throw new Error(- `Possibly invalid use of ManageRulesModal, add the current url '${location.pathname}' to the allowlist if you're confident the modal can never appear on top of the '/rules' page.`+ `Possibly invalid use of ManageRulesModal, add the current url '${location.pathname}' to the allowlist if you're confident the modal can never appear on top of the '/rules' page.`,);}}diff --git a/packages/desktop-client/src/components/modals/MergeUnusedPayees.js b/packages/desktop-client/src/components/modals/MergeUnusedPayees.jsindex e76e85c778..727ac1ab18 100644--- a/packages/desktop-client/src/components/modals/MergeUnusedPayees.js+++ b/packages/desktop-client/src/components/modals/MergeUnusedPayees.js@@ -10,7 +10,7 @@ import {Modal,ModalButtons,Button,- P+ P,} from 'loot-design/src/components/common';import { colors } from 'loot-design/src/style';@@ -20,11 +20,11 @@ export default function MergeUnusedPayees({history,modalProps,payeeIds,- targetPayeeId+ targetPayeeId,}) {let { payees: allPayees, modalStack } = useSelector(state => ({payees: state.queries.payees,- modalStack: state.modals.modalStack+ modalStack: state.modals.modalStack,}));let isEditingRule = !!modalStack.find(m => m.name === 'edit-rule');let dispatch = useDispatch();@@ -48,7 +48,7 @@ export default function MergeUnusedPayees({// TODO: I think a custom `useSelector` hook that doesn't bind would// be nicelet [payees] = useState(() =>- payeeIds.map(id => allPayees.find(p => p.id === id))+ payeeIds.map(id => allPayees.find(p => p.id === id)),);let targetPayee = allPayees.find(p => p.id === targetPayeeId);@@ -59,14 +59,14 @@ export default function MergeUnusedPayees({async function onMerge() {await send('payees-merge', {targetId: targetPayee.id,- mergeIds: payees.map(p => p.id)+ mergeIds: payees.map(p => p.id),});let ruleId;if (shouldCreateRule && !isEditingRule) {let id = await send('rule-add-payee-rename', {fromNames: payees.map(p => p.name),- to: targetPayee.id+ to: targetPayee.id,});ruleId = id;}@@ -114,7 +114,7 @@ export default function MergeUnusedPayees({margin: 0,marginTop: 10,maxHeight: 140,- overflow: 'auto'+ overflow: 'auto',}}>{payees.map(p => (@@ -142,7 +142,7 @@ export default function MergeUnusedPayees({userSelect: 'none',display: 'flex',alignItems: 'center',- justifyContent: 'center'+ justifyContent: 'center',}}><inputdiff --git a/packages/desktop-client/src/components/modals/WelcomeScreen.js b/packages/desktop-client/src/components/modals/WelcomeScreen.jsindex 6e63a868ee..2a13b9c477 100644--- a/packages/desktop-client/src/components/modals/WelcomeScreen.js+++ b/packages/desktop-client/src/components/modals/WelcomeScreen.js@@ -6,7 +6,7 @@ import {View,Modal,P,- ExternalLink+ ExternalLink,} from 'loot-design/src/components/common';import { colors } from 'loot-design/src/style';@@ -40,7 +40,7 @@ function WelcomeScreen({ modalProps, actions }) {style={{color: colors.p5,fontWeight: 600,- '& a, & a:visited': { color: colors.p5 }+ '& a, & a:visited': { color: colors.p5 },}}>Read the{' '}diff --git a/packages/desktop-client/src/components/payees/ManagePayeesWithData.js b/packages/desktop-client/src/components/payees/ManagePayeesWithData.jsindex fa44a492fb..3a812371b3 100644--- a/packages/desktop-client/src/components/payees/ManagePayeesWithData.js+++ b/packages/desktop-client/src/components/payees/ManagePayeesWithData.js@@ -15,7 +15,7 @@ function ManagePayeesWithData({initiallyLoadPayees,getPayees,setLastUndoState,- pushModal+ pushModal,}) {let [payees, setPayees] = useState(initialPayees);let [ruleCounts, setRuleCounts] = useState({ value: new Map() });@@ -97,17 +97,17 @@ function ManagePayeesWithData({field: 'payee',op: 'is',value: id,- type: 'id'- }+ type: 'id',+ },],actions: [{op: 'set',field: 'category',value: null,- type: 'id'- }- ]+ type: 'id',+ },+ ],};pushModal('edit-rule', { rule });}@@ -133,7 +133,7 @@ function ManagePayeesWithData({let count = ruleCounts.value.get(id) || 0;ruleCounts.value.set(targetId,- (ruleCounts.value.get(targetId) || 0) + count+ (ruleCounts.value.get(targetId) || 0) + count,);});@@ -150,7 +150,7 @@ export default connect(state => ({initialPayees: state.queries.payees,lastUndoState: state.app.lastUndoState,- categoryGroups: state.queries.categories.grouped+ categoryGroups: state.queries.categories.grouped,}),- actions+ actions,)(ManagePayeesWithData);diff --git a/packages/desktop-client/src/components/reports/CashFlow.js b/packages/desktop-client/src/components/reports/CashFlow.jsindex 254c80891f..802ce26d0a 100644--- a/packages/desktop-client/src/components/reports/CashFlow.js+++ b/packages/desktop-client/src/components/reports/CashFlow.js@@ -10,7 +10,7 @@ import {Text,Block,P,- AlignedText+ AlignedText,} from 'loot-design/src/components/common';import { colors, styles } from 'loot-design/src/style';@@ -24,21 +24,21 @@ import { useArgsMemo } from './util';function CashFlow() {const [allMonths, setAllMonths] = useState(null);const [start, setStart] = useState(- monthUtils.subMonths(monthUtils.currentMonth(), 30)+ monthUtils.subMonths(monthUtils.currentMonth(), 30),);const [end, setEnd] = useState(monthUtils.currentDay());const [isConcise, setIsConcise] = useState(() => {const numDays = d.differenceInCalendarDays(d.parseISO(end),- d.parseISO(start)+ d.parseISO(start),);return numDays > 31 * 3;});const data = useReport('cash_flow',- useArgsMemo(cashFlowByDate)(start, end, isConcise)+ useArgsMemo(cashFlowByDate)(start, end, isConcise),);useEffect(() => {@@ -52,7 +52,7 @@ function CashFlow() {.rangeInclusive(earliestMonth, monthUtils.currentMonth()).map(month => ({name: month,- pretty: monthUtils.format(month, 'MMMM, yyyy')+ pretty: monthUtils.format(month, 'MMMM, yyyy'),})).reverse();@@ -64,7 +64,7 @@ function CashFlow() {function onChangeDates(start, end) {const numDays = d.differenceInCalendarDays(d.parseISO(end),- d.parseISO(start)+ d.parseISO(start),);const isConcise = numDays > 31 * 3;@@ -99,7 +99,7 @@ function CashFlow() {backgroundColor: 'white',paddingLeft: 30,paddingRight: 30,- overflow: 'auto'+ overflow: 'auto',}}><View@@ -108,7 +108,7 @@ function CashFlow() {paddingRight: 20,flexShrink: 0,alignItems: 'flex-end',- color: colors.n3+ color: colors.n3,}}><AlignedTextdiff --git a/packages/desktop-client/src/components/reports/Header.js b/packages/desktop-client/src/components/reports/Header.jsindex f834401c45..bd84f0a535 100644--- a/packages/desktop-client/src/components/reports/Header.js+++ b/packages/desktop-client/src/components/reports/Header.js@@ -5,7 +5,7 @@ import {View,Select,Button,- ButtonLink+ ButtonLink,} from 'loot-design/src/components/common';import { styles } from 'loot-design/src/style';import ArrowLeft from 'loot-design/src/svg/v1/ArrowLeft';@@ -55,7 +55,7 @@ function Header({ title, start, end, show1Month, allMonths, onChangeDates }) {style={{padding: 20,paddingTop: 0,- flexShrink: 0+ flexShrink: 0,}}><ButtonLink@@ -71,7 +71,7 @@ function Header({ title, start, end, show1Month, allMonths, onChangeDates }) {style={{flexDirection: 'row',alignItems: 'center',- marginTop: 15+ marginTop: 15,}}><div>diff --git a/packages/desktop-client/src/components/reports/NetWorth.js b/packages/desktop-client/src/components/reports/NetWorth.jsindex 2bbb2dccb2..6c005433b0 100644--- a/packages/desktop-client/src/components/reports/NetWorth.js+++ b/packages/desktop-client/src/components/reports/NetWorth.js@@ -21,13 +21,13 @@ import { fromDateRepr, useArgsMemo } from './util';function NetWorth({ accounts }) {const [allMonths, setAllMonths] = useState(null);const [start, setStart] = useState(- monthUtils.subMonths(monthUtils.currentMonth(), 5)+ monthUtils.subMonths(monthUtils.currentMonth(), 5),);const [end, setEnd] = useState(monthUtils.currentMonth());const data = useReport('net_worth',- useArgsMemo(netWorthSpreadsheet)(start, end, accounts)+ useArgsMemo(netWorthSpreadsheet)(start, end, accounts),);useEffect(() => {@@ -50,7 +50,7 @@ function NetWorth({ accounts }) {.rangeInclusive(earliestMonth, monthUtils.currentMonth()).map(month => ({name: month,- pretty: monthUtils.format(month, 'MMMM, yyyy')+ pretty: monthUtils.format(month, 'MMMM, yyyy'),})).reverse();@@ -81,7 +81,7 @@ function NetWorth({ accounts }) {style={{backgroundColor: 'white',padding: '30px',- overflow: 'auto'+ overflow: 'auto',}}><View style={{ textAlign: 'right', paddingRight: 20, flexShrink: 0 }}>@@ -114,5 +114,5 @@ function NetWorth({ accounts }) {export default connect(state => ({ accounts: state.queries.accounts }),- dispatch => bindActionCreators(actions, dispatch)+ dispatch => bindActionCreators(actions, dispatch),)(NetWorth);diff --git a/packages/desktop-client/src/components/reports/Overview.js b/packages/desktop-client/src/components/reports/Overview.jsindex 1f6508a1e8..5f15bf807f 100644--- a/packages/desktop-client/src/components/reports/Overview.js+++ b/packages/desktop-client/src/components/reports/Overview.js@@ -34,11 +34,11 @@ function Card({ flex, to, style, children }) {boxShadow: '0 2px 6px rgba(0, 0, 0, .15)',transition: 'box-shadow .25s',':hover': to && {- boxShadow: '0 4px 6px rgba(0, 0, 0, .15)'- }+ boxShadow: '0 4px 6px rgba(0, 0, 0, .15)',+ },},to ? null : containerProps,- style+ style,]}>{children}@@ -65,7 +65,7 @@ function NetWorthCard({ accounts }) {const data = useReport('net_worth',- useArgsMemo(netWorthSpreadsheet)(start, end, accounts)+ useArgsMemo(netWorthSpreadsheet)(start, end, accounts),);if (!data) {@@ -115,7 +115,7 @@ function CashFlowCard() {const data = useReport('cash_flow_simple',- useArgsMemo(simpleCashFlow)(start, end)+ useArgsMemo(simpleCashFlow)(start, end),);if (!data) {return null;@@ -154,7 +154,7 @@ function CashFlowCard() {theme={theme}domain={{x: [0, 100],- y: [0, Math.max(income, expense, 100)]+ y: [0, Math.max(income, expense, 100)],}}containerComponent={<VictoryVoronoiContainer voronoiDimension="x" />@@ -167,7 +167,7 @@ function CashFlowCard() {light={true}forceActive={true}style={{- padding: 0+ padding: 0,}}/>}@@ -175,7 +175,7 @@ function CashFlowCard() {top: 0,bottom: 0,left: 0,- right: 0+ right: 0,}}><VictoryBar@@ -190,8 +190,8 @@ function CashFlowCard() {<div>{integerToCurrency(income)}</div></div>),- labelPosition: 'left'- }+ labelPosition: 'left',+ },]}labels={d => d.premadeLabel}/>@@ -208,8 +208,8 @@ function CashFlowCard() {</div>),labelPosition: 'right',- fill: theme.colors.red- }+ fill: theme.colors.red,+ },]}labels={d => d.premadeLabel}/>@@ -226,13 +226,13 @@ function Overview({ accounts }) {<Viewstyle={[styles.page,- { paddingLeft: 40, paddingRight: 40, minWidth: 700 }+ { paddingLeft: 40, paddingRight: 40, minWidth: 700 },]}><Viewstyle={{flexDirection: 'row',- flex: '0 0 auto'+ flex: '0 0 auto',}}><NetWorthCard accounts={accounts} />@@ -242,7 +242,7 @@ function Overview({ accounts }) {<Viewstyle={{flex: '0 0 auto',- flexDirection: 'row'+ flexDirection: 'row',}}><Card@@ -251,9 +251,9 @@ function Overview({ accounts }) {color: '#a0a0a0',justifyContent: 'center',alignItems: 'center',- width: 200+ width: 200,},- styles.mediumText+ styles.mediumText,]}>More reports@@ -266,5 +266,5 @@ function Overview({ accounts }) {export default connect(state => ({ accounts: state.queries.accounts }),- dispatch => bindActionCreators(actions, dispatch)+ dispatch => bindActionCreators(actions, dispatch),)(Overview);diff --git a/packages/desktop-client/src/components/reports/Tooltip.js b/packages/desktop-client/src/components/reports/Tooltip.jsindex 81eb277dcb..3f3683778b 100644--- a/packages/desktop-client/src/components/reports/Tooltip.js+++ b/packages/desktop-client/src/components/reports/Tooltip.js@@ -22,7 +22,7 @@ class Tooltip extends React.Component {position,light,forceActive,- style+ style,} = this.props;const xRange = scale.x.range();const xPos = x - xRange[0];@@ -59,7 +59,7 @@ class Tooltip extends React.Component {// TODO: Transparent backgroundbackgroundColor: light ? 'transparent' : colors.n1,color: light ? 'inherit' : 'white',- padding: 10+ padding: 10,},!light &&before({@@ -71,14 +71,14 @@ class Tooltip extends React.Component {'7px solid ' + colors.n1,[position === 'right' ? 'left' : 'right']: -6,top: 'calc(50% - 7px)',- content: '" "'+ content: '" "',}),- style+ style,)}>{datum.premadeLabel}</div>,- portalHost+ portalHost,);}}diff --git a/packages/desktop-client/src/components/reports/chart-theme.js b/packages/desktop-client/src/components/reports/chart-theme.jsindex 256788f3ac..04137fa19e 100644--- a/packages/desktop-client/src/components/reports/chart-theme.js+++ b/packages/desktop-client/src/components/reports/chart-theme.js@@ -4,7 +4,7 @@ let colorFades = {blueFadeStart: 'rgba(229, 245, 255, 1)',blueFadeEnd: 'rgba(229, 245, 255, 0)',redFadeStart: 'rgba(255, 243, 242, 1)',- redFadeEnd: 'rgba(255, 243, 242, 0)'+ redFadeEnd: 'rgba(255, 243, 242, 0)',};// Typography@@ -19,33 +19,33 @@ const baseLabelStyles = {fontSize,letterSpacing,fill: colors.n1,- stroke: 'transparent'+ stroke: 'transparent',};const axisBaseStyles = {axis: {fill: 'transparent',- stroke: 'none'+ stroke: 'none',},grid: {fill: 'none',stroke: 'none',- pointerEvents: 'none'+ pointerEvents: 'none',},ticks: {fill: 'transparent',size: 1,- stroke: 'none'+ stroke: 'none',},axisLabel: baseLabelStyles,- tickLabels: baseLabelStyles+ tickLabels: baseLabelStyles,};export default {colors: {...colorFades,red: colors.r7,- blue: colors.b6+ blue: colors.b6,},area: {style: {@@ -54,12 +54,12 @@ export default {stroke: colors.b6,strokeWidth: 2,strokeLinejoin: 'round',- strokeLinecap: 'round'- }- }+ strokeLinecap: 'round',+ },+ },},axis: {- style: axisBaseStyles+ style: axisBaseStyles,},dependentAxis: {style: {@@ -67,23 +67,23 @@ export default {grid: {...axisBaseStyles.grid,stroke: 'rgba(0,0,0,.2)',- strokeDasharray: '1,1'+ strokeDasharray: '1,1',},- tickLabels: { ...baseLabelStyles, padding: 5 }- }+ tickLabels: { ...baseLabelStyles, padding: 5 },+ },},independentAxis: {style: {...axisBaseStyles,axis: { ...axisBaseStyles.axis, stroke: 'rgba(0,0,0,.2)' },- tickLabels: { ...baseLabelStyles, padding: 10 }- }+ tickLabels: { ...baseLabelStyles, padding: 10 },+ },},bar: {style: {labels: baseLabelStyles,- data: { fill: colors.b6, stroke: 'none' }- }+ data: { fill: colors.b6, stroke: 'none' },+ },},line: {style: {@@ -93,21 +93,21 @@ export default {stroke: colors.b6,strokeWidth: 2,strokeLinejoin: 'round',- strokeLinecap: 'round'- }- }+ strokeLinecap: 'round',+ },+ },},voronoi: {style: {- labels: baseLabelStyles- }+ labels: baseLabelStyles,+ },},chart: {padding: {top: 20,left: 65,right: 20,- bottom: 50- }- }+ bottom: 50,+ },+ },};diff --git a/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.js b/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.jsindex 455ba4c675..6300013d69 100644--- a/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.js+++ b/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.js@@ -7,7 +7,7 @@ import {VictoryLine,VictoryAxis,VictoryVoronoiContainer,- VictoryGroup+ VictoryGroup,} from 'victory';import { colors } from 'loot-design/src/style';@@ -43,7 +43,7 @@ function CashFlowGraph({ style, start, end, graphData, isConcise, compact }) {labelComponent={<Tooltip portalHost={portalHost} />}labels={x => x.premadeLabel}style={{- data: { stroke: colors.n5 }+ data: { stroke: colors.n5 },}}/><VictoryAxisdiff --git a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.js b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.jsindex b1b2386a0c..60dee3c169 100644--- a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.js+++ b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.js@@ -7,7 +7,7 @@ import {VictoryArea,VictoryAxis,VictoryVoronoiContainer,- VictoryGroup+ VictoryGroup,} from 'victory';import theme from '../chart-theme';@@ -93,7 +93,7 @@ function NetWorthGraph({ style, start, end, graphData, compact }) {top: 0,bottom: 0,left: 0,- right: 0+ right: 0,}}>@@ -114,10 +114,10 @@ function NetWorthGraph({ style, start, end, graphData, compact }) {? { width: 50 }: {clipPath: 'url(#positive)',- fill: 'url(#positive-gradient)'- }- }- }+ fill: 'url(#positive-gradient)',+ },+ },+ },)}{graphData.data.length > 1 && (<VictoryArea@@ -127,8 +127,8 @@ function NetWorthGraph({ style, start, end, graphData, compact }) {clipPath: 'url(#negative)',fill: 'url(#negative-gradient)',stroke: theme.colors.red,- strokeLinejoin: 'round'- }+ strokeLinejoin: 'round',+ },}}/>)}diff --git a/packages/desktop-client/src/components/reports/graphs/cash-flow-spreadsheet.js b/packages/desktop-client/src/components/reports/graphs/cash-flow-spreadsheet.jsindex c555067e57..d4971e107f 100644--- a/packages/desktop-client/src/components/reports/graphs/cash-flow-spreadsheet.js+++ b/packages/desktop-client/src/components/reports/graphs/cash-flow-spreadsheet.js@@ -19,9 +19,9 @@ export function simpleCashFlow(start, end) {$or: [{'payee.transfer_acct.offbudget': true,- 'payee.transfer_acct': null- }- ]+ 'payee.transfer_acct': null,+ },+ ],}).calculate({ $sum: '$amount' });}@@ -29,16 +29,16 @@ export function simpleCashFlow(start, end) {return runAll([makeQuery().filter({ amount: { $gt: 0 } }),- makeQuery().filter({ amount: { $lt: 0 } })+ makeQuery().filter({ amount: { $lt: 0 } }),],data => {setData({graphData: {income: data[0],- expense: data[1]- }+ expense: data[1],+ },});- }+ },);};}@@ -49,15 +49,15 @@ export function cashFlowByDate(start, end, isConcise) {let query = q('transactions').filter({$and: [{ date: { $transform: '$month', $gte: start } },- { date: { $transform: '$month', $lte: end } }+ { date: { $transform: '$month', $lte: end } },],'account.offbudget': false,$or: [{'payee.transfer_acct.offbudget': true,- 'payee.transfer_acct': null- }- ]+ 'payee.transfer_acct': null,+ },+ ],});if (isConcise) {@@ -65,7 +65,7 @@ export function cashFlowByDate(start, end, isConcise) {.groupBy({ $month: '$date' }).select([{ date: { $month: '$date' } },- { amount: { $sum: '$amount' } }+ { amount: { $sum: '$amount' } },]);}@@ -79,15 +79,15 @@ export function cashFlowByDate(start, end, isConcise) {q('transactions').filter({date: { $transform: '$month', $lt: start },- 'account.offbudget': false+ 'account.offbudget': false,}).calculate({ $sum: '$amount' }),makeQuery('amount > 0').filter({ amount: { $gt: 0 } }),- makeQuery('amount < 0').filter({ amount: { $lt: 0 } })+ makeQuery('amount < 0').filter({ amount: { $lt: 0 } }),],data => {setData(recalculate(data, start, end, isConcise));- }+ },);};}@@ -97,18 +97,18 @@ function recalculate(data, start, end, isConcise) {const dates = isConcise? monthUtils.rangeInclusive(monthUtils.getMonth(start),- monthUtils.getMonth(end)+ monthUtils.getMonth(end),): monthUtils.dayRangeInclusive(start, end);const incomes = index(income,'date',- isConcise ? fromDateRepr : fromDateReprToDay+ isConcise ? fromDateRepr : fromDateReprToDay,);const expenses = index(expense,'date',- isConcise ? fromDateRepr : fromDateReprToDay+ isConcise ? fromDateRepr : fromDateReprToDay,);let balance = startingBalance;@@ -156,11 +156,11 @@ function recalculate(data, start, end, isConcise) {x,y: integerToAmount(balance),premadeLabel: label,- amount: balance+ amount: balance,});return res;},- { expenses: [], income: [], balances: [] }+ { expenses: [], income: [], balances: [] },);const { balances } = graphData;@@ -170,6 +170,6 @@ function recalculate(data, start, end, isConcise) {balance: balances[balances.length - 1].amount,totalExpenses,totalIncome,- totalChange: balances[balances.length - 1].amount - balances[0].amount+ totalChange: balances[balances.length - 1].amount - balances[0].amount,};}diff --git a/packages/desktop-client/src/components/reports/graphs/net-worth-spreadsheet.js b/packages/desktop-client/src/components/reports/graphs/net-worth-spreadsheet.jsindex b3de61c8e6..1616e83e95 100644--- a/packages/desktop-client/src/components/reports/graphs/net-worth-spreadsheet.js+++ b/packages/desktop-client/src/components/reports/graphs/net-worth-spreadsheet.js@@ -7,7 +7,7 @@ import * as monthUtils from 'loot-core/src/shared/months';import {integerToCurrency,integerToAmount,- amountToInteger+ amountToInteger,} from 'loot-core/src/shared/util';import { AlignedText } from 'loot-design/src/components/common';@@ -25,7 +25,7 @@ export default function createSpreadsheet(start, end, accounts) {runQuery(q('transactions').filter({ account: acct.id, date: { $lt: start + '-01' } })- .calculate({ $sum: '$amount' })+ .calculate({ $sum: '$amount' }),).then(({ data }) => data),runQuery(@@ -34,23 +34,23 @@ export default function createSpreadsheet(start, end, accounts) {account: acct.id,$and: [{ date: { $gte: start + '-01' } },- { date: { $lte: end + '-31' } }- ]+ { date: { $lte: end + '-31' } },+ ],}).groupBy({ $month: '$date' }).select([{ date: { $month: '$date' } },- { amount: { $sum: '$amount' } }- ])- ).then(({ data }) => data)+ { amount: { $sum: '$amount' } },+ ]),+ ).then(({ data }) => data),]);return {id: acct.id,balances: index(balances, 'date'),- starting+ starting,};- })+ }),);setData(recalculate(data, start, end));@@ -129,9 +129,9 @@ function recalculate(data, start, end) {data: graphData,hasNegative,start,- end+ end,},netWorth: endNetWorth,- totalChange: endNetWorth - startNetWorth+ totalChange: endNetWorth - startNetWorth,};}diff --git a/packages/desktop-client/src/components/reports/util.js b/packages/desktop-client/src/components/reports/util.jsindex 078d54d571..dbe6bb1a3e 100644--- a/packages/desktop-client/src/components/reports/util.js+++ b/packages/desktop-client/src/components/reports/util.js@@ -24,7 +24,7 @@ export async function runAll(queries, cb) {let data = await Promise.all(queries.map(q => {return runQuery(q).then(({ data }) => data);- })+ }),);cb(data);}diff --git a/packages/desktop-client/src/components/schedules/DiscoverSchedules.js b/packages/desktop-client/src/components/schedules/DiscoverSchedules.jsindex 128bad80fb..cca716fceb 100644--- a/packages/desktop-client/src/components/schedules/DiscoverSchedules.js+++ b/packages/desktop-client/src/components/schedules/DiscoverSchedules.js@@ -8,19 +8,19 @@ import {View,Stack,ButtonWithLoading,- P+ P,} from 'loot-design/src/components/common';import {Table,TableHeader,Row,Field,- SelectCell+ SelectCell,} from 'loot-design/src/components/table';import useSelected, {useSelectedDispatch,useSelectedItems,- SelectedProvider+ SelectedProvider,} from 'loot-design/src/components/useSelected';import { colors } from 'loot-design/src/style';@@ -54,8 +54,8 @@ function DiscoverSchedulesTable({ schedules, loading }) {cursor: 'pointer',backgroundColor: selected ? colors.selected : 'white',':hover': {- backgroundColor: selected ? colors.selected : colors.hover- }+ backgroundColor: selected ? colors.selected : colors.hover,+ },}}><SelectCell@@ -104,7 +104,8 @@ function DiscoverSchedulesTable({ schedules, loading }) {backgroundColor={pageType.type === 'modal' ? 'transparent' : undefined}style={{flex: 1,- backgroundColor: pageType.type === 'modal' ? 'transparent' : undefined+ backgroundColor:+ pageType.type === 'modal' ? 'transparent' : undefined,}}items={schedules}loading={loading}@@ -137,23 +138,23 @@ export default function DiscoverSchedules() {for (let schedule of selected) {let scheduleId = await send('schedule/create', {- conditions: schedule._conditions+ conditions: schedule._conditions,});// Now query for matching transactions and link them automaticallylet { filters } = await send('make-filters-from-conditions', {- conditions: schedule._conditions+ conditions: schedule._conditions,});if (filters.length > 0) {let { data: transactions } = await runQuery(- q('transactions').filter({ $and: filters }).select('id')+ q('transactions').filter({ $and: filters }).select('id'),);await send('transactions-batch-update', {updated: transactions.map(t => ({id: t.id,- schedule: scheduleId- }))+ schedule: scheduleId,+ })),});}}@@ -190,7 +191,7 @@ export default function DiscoverSchedules() {justify="flex-end"style={{paddingTop: 20,- paddingBottom: pageType.type === 'modal' ? 0 : 20+ paddingBottom: pageType.type === 'modal' ? 0 : 20,}}><ButtonWithLoadingdiff --git a/packages/desktop-client/src/components/schedules/EditSchedule.js b/packages/desktop-client/src/components/schedules/EditSchedule.jsindex 064e56ea83..7fe5ce68ab 100644--- a/packages/desktop-client/src/components/schedules/EditSchedule.js+++ b/packages/desktop-client/src/components/schedules/EditSchedule.js@@ -14,13 +14,13 @@ import DateSelect from 'loot-design/src/components/DateSelect';import {FormField,FormLabel,- Checkbox+ Checkbox,} from 'loot-design/src/components/forms';import PayeeAutocomplete from 'loot-design/src/components/PayeeAutocomplete';import RecurringSchedulePicker from 'loot-design/src/components/RecurringSchedulePicker';import { SelectedItemsButton } from 'loot-design/src/components/table';import useSelected, {- SelectedProvider+ SelectedProvider,} from 'loot-design/src/components/useSelected';import { colors } from 'loot-design/src/style';@@ -76,9 +76,9 @@ function updateScheduleConditions(schedule, fields) {{op: fields.amountOp,field: 'amount',- value: fields.amount- }- ].filter(Boolean)+ value: fields.amount,+ },+ ].filter(Boolean),};}@@ -115,8 +115,8 @@ export default function ScheduleDetails() {amount: schedule._amount || 0,amountOp: schedule._amountOp || 'isapprox',date: schedule._date,- posts_transaction: action.schedule.posts_transaction- }+ posts_transaction: action.schedule.posts_transaction,+ },};}case 'set-field':@@ -156,7 +156,7 @@ export default function ScheduleDetails() {return {...state,- fields: { ...state.fields, ...fields }+ fields: { ...state.fields, ...fields },};case 'set-transactions':return { ...state, transactions: action.transactions };@@ -169,15 +169,15 @@ export default function ScheduleDetails() {? {frequency: 'monthly',start: monthUtils.currentDay(),- patterns: []+ patterns: [],}- : monthUtils.currentDay()- }+ : monthUtils.currentDay(),+ },};case 'set-upcoming-dates':return {...state,- upcomingDates: action.dates+ upcomingDates: action.dates,};case 'form-error':@@ -201,13 +201,13 @@ export default function ScheduleDetails() {amount: null,amountOp: null,date: null,- posts_transaction: false+ posts_transaction: false,},- initialFields+ initialFields,),transactions: [],- transactionsMode: adding ? 'matched' : 'linked'- }+ transactionsMode: adding ? 'matched' : 'linked',+ },);async function loadSchedule() {@@ -221,13 +221,13 @@ export default function ScheduleDetails() {let date = {start: monthUtils.currentDay(),frequency: 'monthly',- patterns: []+ patterns: [],};let schedule = {posts_transaction: false,_date: date,_conditions: [{ op: 'isapprox', field: 'date', value: date }],- _actions: []+ _actions: [],};dispatch({ type: 'set-schedule', schedule });@@ -252,7 +252,7 @@ export default function ScheduleDetails() {if (date.frequency) {let { data } = await sendCatch('schedule/get-upcoming-dates', {config: date,- count: 3+ count: 3,});dispatch({ type: 'set-upcoming-dates', dates: data });} else {@@ -279,7 +279,7 @@ export default function ScheduleDetails() {.filter({ schedule: state.schedule.id }).select('*').options({ splits: 'none' }),- data => dispatch({ type: 'set-transactions', transactions: data })+ data => dispatch({ type: 'set-transactions', transactions: data }),);return live.unsubscribe;}@@ -292,7 +292,7 @@ export default function ScheduleDetails() {if (state.schedule && state.transactionsMode === 'matched') {let { error, conditions } = updateScheduleConditions(state.schedule,- state.fields+ state.fields,);dispatch({ type: 'set-transactions', transactions: [] });@@ -315,7 +315,7 @@ export default function ScheduleDetails() {});send('make-filters-from-conditions', {- conditions: conditions+ conditions: conditions,}).then(({ filters }) => {if (current) {let live = liveQuery(@@ -323,7 +323,7 @@ export default function ScheduleDetails() {.filter({ $and: filters }).select('*').options({ splits: 'none' }),- data => dispatch({ type: 'set-transactions', transactions: data })+ data => dispatch({ type: 'set-transactions', transactions: data }),);unsubscribe = live.unsubscribe;}@@ -345,7 +345,7 @@ export default function ScheduleDetails() {let { error, conditions } = updateScheduleConditions(state.schedule,- state.fields+ state.fields,);if (error) {@@ -356,16 +356,16 @@ export default function ScheduleDetails() {let res = await sendCatch(adding ? 'schedule/create' : 'schedule/update', {schedule: {id: state.schedule.id,- posts_transaction: state.fields.posts_transaction+ posts_transaction: state.fields.posts_transaction,},- conditions+ conditions,});if (res.error) {dispatch({type: 'form-error',error:- 'An error occurred while saving. Please contact [email protected] for support.'+ 'An error occurred while saving. Please contact [email protected] for support.',});} else {if (adding) {@@ -384,8 +384,8 @@ export default function ScheduleDetails() {onSave: async () => {let schedule = await loadSchedule();dispatch({ type: 'set-schedule', schedule });- }- })+ },+ }),);}@@ -393,15 +393,15 @@ export default function ScheduleDetails() {await send('transactions-batch-update', {updated: ids.map(id => ({id,- schedule: scheduleId || state.schedule.id- }))+ schedule: scheduleId || state.schedule.id,+ })),});selectedInst.dispatch({ type: 'select-none' });}async function onUnlinkTransactions(ids) {await send('transactions-batch-update', {- updated: ids.map(id => ({ id, schedule: null }))+ updated: ids.map(id => ({ id, schedule: null })),});selectedInst.dispatch({ type: 'select-none' });}@@ -470,7 +470,7 @@ export default function ScheduleDetails() {style={{padding: '0 10px',color: colors.n5,- fontSize: 12+ fontSize: 12,}}onChange={(_, op) =>dispatch({ type: 'set-field', field: 'amountOp', value: op })@@ -484,7 +484,7 @@ export default function ScheduleDetails() {dispatch({type: 'set-field',field: 'amount',- value+ value,})}/>@@ -495,7 +495,7 @@ export default function ScheduleDetails() {dispatch({type: 'set-field',field: 'amount',- value+ value,})}/>@@ -552,7 +552,7 @@ export default function ScheduleDetails() {flex: 1,flexDirection: 'row',alignItems: 'center',- userSelect: 'none'+ userSelect: 'none',}}><Checkbox@@ -570,7 +570,7 @@ export default function ScheduleDetails() {<Viewstyle={{alignItems: 'flex-end',- flex: 1+ flex: 1,}}><View@@ -579,7 +579,7 @@ export default function ScheduleDetails() {flexDirection: 'row',alignItems: 'center',userSelect: 'none',- justifyContent: 'flex-end'+ justifyContent: 'flex-end',}}><Checkbox@@ -589,7 +589,7 @@ export default function ScheduleDetails() {dispatch({type: 'set-field',field: 'posts_transaction',- value: e.target.checked+ value: e.target.checked,});}}/>@@ -608,7 +608,7 @@ export default function ScheduleDetails() {color: colors.n4,marginTop: 10,fontSize: 13,- lineHeight: '1.4em'+ lineHeight: '1.4em',}}>If checked, the schedule will automatically create transactions for@@ -623,7 +623,7 @@ export default function ScheduleDetails() {color: colors.b5,fontSize: 13,textAlign: 'right',- width: 350+ width: 350,}}>This schedule has custom conditions and actions@@ -657,7 +657,7 @@ export default function ScheduleDetails() {color:state.transactionsMode === 'linked' ? colors.b4 : colors.n7,marginRight: 10,- fontSize: 14+ fontSize: 14,}}onClick={() => onSwitchTransactions('linked')}>@@ -670,7 +670,7 @@ export default function ScheduleDetails() {state.transactionsMode === 'matched'? colors.b4: colors.n7,- fontSize: 14+ fontSize: 14,}}onClick={() => onSwitchTransactions('matched')}>@@ -722,7 +722,7 @@ export default function ScheduleDetails() {border: '1px solid ' + colors.border,borderRadius: 4,overflow: 'hidden',- marginTop: 5+ marginTop: 5,}}/></SelectedProvider>diff --git a/packages/desktop-client/src/components/schedules/LinkSchedule.js b/packages/desktop-client/src/components/schedules/LinkSchedule.jsindex d7289298ad..114876c003 100644--- a/packages/desktop-client/src/components/schedules/LinkSchedule.js+++ b/packages/desktop-client/src/components/schedules/LinkSchedule.js@@ -13,7 +13,7 @@ export default function ScheduleLink() {let location = useLocation();let history = useHistory();let scheduleData = useSchedules(- useCallback(query => query.filter({ completed: false }), [])+ useCallback(query => query.filter({ completed: false }), []),);let [filter, setFilter] = useState('');@@ -29,7 +29,7 @@ export default function ScheduleLink() {let ids = state.transactionIds;if (ids && ids.length > 0) {await send('transactions-batch-update', {- updated: ids.map(id => ({ id, schedule: scheduleId }))+ updated: ids.map(id => ({ id, schedule: scheduleId })),});}history.goBack();diff --git a/packages/desktop-client/src/components/schedules/SchedulesTable.js b/packages/desktop-client/src/components/schedules/SchedulesTable.jsindex 878c32f713..9b02316cf1 100644--- a/packages/desktop-client/src/components/schedules/SchedulesTable.js+++ b/packages/desktop-client/src/components/schedules/SchedulesTable.js@@ -11,14 +11,14 @@ import {Text,Button,Tooltip,- Menu+ Menu,} from 'loot-design/src/components/common';import {Table,TableHeader,Row,Field,- Cell+ Cell,} from 'loot-design/src/components/table';import { colors } from 'loot-design/src/style';import DotsHorizontalTriple from 'loot-design/src/svg/v1/DotsHorizontalTriple';@@ -63,15 +63,15 @@ function OverflowMenu({ schedule, status, onAction }) {items={[status === 'due' && {name: 'post-transaction',- text: 'Post transaction'+ text: 'Post transaction',},...(schedule.completed? [{ name: 'restart', text: 'Restart' }]: [{ name: 'skip', text: 'Skip next date' },- { name: 'complete', text: 'Complete' }+ { name: 'complete', text: 'Complete' },]),- { name: 'delete', text: 'Delete' }+ { name: 'delete', text: 'Delete' },]}/></Tooltip>@@ -93,7 +93,7 @@ export function ScheduleAmountCell({ amount, op }) {textAlign: 'right',flexDirection: 'row',alignItems: 'center',- padding: '0 5px'+ padding: '0 5px',}}>{isApprox && (@@ -102,7 +102,7 @@ export function ScheduleAmountCell({ amount, op }) {textAlign: 'left',color: colors.n7,lineHeight: '1em',- marginRight: 10+ marginRight: 10,}}title={(isApprox ? 'Approximately ' : '') + str}>@@ -115,7 +115,7 @@ export function ScheduleAmountCell({ amount, op }) {color: num > 0 ? colors.g5 : null,whiteSpace: 'nowrap',overflow: 'hidden',- textOverflow: 'ellipsis'+ textOverflow: 'ellipsis',}}title={(isApprox ? 'Approximately ' : '') + str}>@@ -134,7 +134,7 @@ export function SchedulesTable({style,onSelect,onAction,- tableStyle+ tableStyle,}) {let dateFormat = useSelector(state => {return state.prefs.local.dateFormat || 'MM/dd/yyyy';@@ -203,7 +203,7 @@ export function SchedulesTable({style={{cursor: 'pointer',backgroundColor: 'white',- ':hover': { backgroundColor: colors.hover }+ ':hover': { backgroundColor: colors.hover },}}><Field width="flex">@@ -251,7 +251,7 @@ export function SchedulesTable({style={{cursor: 'pointer',backgroundColor: 'white',- ':hover': { backgroundColor: colors.hover }+ ':hover': { backgroundColor: colors.hover },}}onClick={() => setShowCompleted(true)}>@@ -260,7 +260,7 @@ export function SchedulesTable({style={{fontStyle: 'italic',textAlign: 'center',- color: colors.n6+ color: colors.n6,}}>Show completed schedulesdiff --git a/packages/desktop-client/src/components/schedules/StatusBadge.js b/packages/desktop-client/src/components/schedules/StatusBadge.jsindex 17a95efceb..8a09785d1a 100644--- a/packages/desktop-client/src/components/schedules/StatusBadge.js+++ b/packages/desktop-client/src/components/schedules/StatusBadge.js@@ -83,9 +83,9 @@ export function StatusBadge({ status, style }) {borderRadius: 4,flexDirection: 'row',alignItems: 'center',- flexShrink: 0+ flexShrink: 0,},- style+ style,]}><Icon@@ -93,7 +93,7 @@ export function StatusBadge({ status, style }) {width: 13,height: 13,color: 'inherit',- marginRight: 7+ marginRight: 7,}}/><Text style={{ lineHeight: '1em' }}>{titleFirst(status)}</Text>diff --git a/packages/desktop-client/src/components/schedules/index.js b/packages/desktop-client/src/components/schedules/index.jsindex a945113c50..027170ec4b 100644--- a/packages/desktop-client/src/components/schedules/index.js+++ b/packages/desktop-client/src/components/schedules/index.js@@ -48,7 +48,7 @@ export default function Schedules() {case 'restart':await send('schedule/update', {schedule: { id, completed: false },- resetNextDate: true+ resetNextDate: true,});break;case 'delete':@@ -72,7 +72,7 @@ export default function Schedules() {style={{marginTop: 20,flexBasis: (ROW_HEIGHT - 1) * (Math.max(schedules.length, 1) + 1),- overflow: 'hidden'+ overflow: 'hidden',}}><SchedulesTable@@ -91,7 +91,7 @@ export default function Schedules() {flexDirection: 'row',justifyContent: 'space-between',margin: '20px 0',- flexShrink: 0+ flexShrink: 0,}}><Button onClick={onDiscover}>Find schedules</Button>diff --git a/packages/desktop-client/src/components/settings/Experimental.js b/packages/desktop-client/src/components/settings/Experimental.jsindex a96411f34d..60ee158ae5 100644--- a/packages/desktop-client/src/components/settings/Experimental.js+++ b/packages/desktop-client/src/components/settings/Experimental.js@@ -11,7 +11,7 @@ export default function ExperimentalFeatures({ prefs, savePrefs }) {let flags = Object.fromEntries(Object.entries(prefs).filter(([key]) => key.startsWith('flags.'))- .map(([key, value]) => [key.replace('flags.', ''), value])+ .map(([key, value]) => [key.replace('flags.', ''), value]),);let disabled = prefs.budgetType === 'report' && flags.reportBudget;@@ -23,7 +23,7 @@ export default function ExperimentalFeatures({ prefs, savePrefs }) {<labelstyle={{display: 'flex',- color: disabled ? colors.n5 : 'inherit'+ color: disabled ? colors.n5 : 'inherit',}}><Checkbox@@ -60,7 +60,7 @@ export default function ExperimentalFeatures({ prefs, savePrefs }) {checked={flags.goalTemplatesEnabled}onChange={() => {savePrefs({- 'flags.goalTemplatesEnabled': !flags.goalTemplatesEnabled+ 'flags.goalTemplatesEnabled': !flags.goalTemplatesEnabled,});}}/>{' '}@@ -73,7 +73,7 @@ export default function ExperimentalFeatures({ prefs, savePrefs }) {style={{flexShrink: 0,alignSelf: 'flex-start',- color: colors.p4+ color: colors.p4,}}>I understand the risks, show experimental featuresdiff --git a/packages/desktop-client/src/components/settings/Export.js b/packages/desktop-client/src/components/settings/Export.jsindex 2d352d4cf0..b3350db5d1 100644--- a/packages/desktop-client/src/components/settings/Export.js+++ b/packages/desktop-client/src/components/settings/Export.js@@ -13,7 +13,7 @@ export default function ExportBudget({ prefs }) {window.Actual.saveFile(data,`${format(new Date(), 'yyyy-MM-dd')}-${prefs.id}.zip`,- 'Export budget'+ 'Export budget',);}diff --git a/packages/desktop-client/src/components/settings/FixSplits.js b/packages/desktop-client/src/components/settings/FixSplits.jsindex b874a6a2e2..468406a311 100644--- a/packages/desktop-client/src/components/settings/FixSplits.js+++ b/packages/desktop-client/src/components/settings/FixSplits.js@@ -5,7 +5,7 @@ import {View,Text,P,- ButtonWithLoading+ ButtonWithLoading,} from 'loot-design/src/components/common';import { colors } from 'loot-design/src/style';@@ -41,7 +41,7 @@ function renderResults(results) {marginBottom: 0,marginLeft: '1em',textAlign: 'right',- whiteSpace: 'pre-wrap'+ whiteSpace: 'pre-wrap',}}>{result}@@ -69,7 +69,7 @@ export default function FixSplitsTool() {justifyContent: 'space-between',maxWidth: 500,width: '100%',- alignItems: 'center'+ alignItems: 'center',}}><ButtonWithLoading loading={loading} onClick={onFix}>diff --git a/packages/desktop-client/src/components/settings/Format.js b/packages/desktop-client/src/components/settings/Format.jsindex f05ff7e3f9..62818239d4 100644--- a/packages/desktop-client/src/components/settings/Format.js+++ b/packages/desktop-client/src/components/settings/Format.js@@ -12,7 +12,7 @@ let dateFormats = [{ value: 'dd/MM/yyyy', label: 'DD/MM/YYYY' },{ value: 'yyyy-MM-dd', label: 'YYYY-MM-DD' },{ value: 'MM.dd.yyyy', label: 'MM.DD.YYYY' },- { value: 'dd.MM.yyyy', label: 'DD.MM.YYYY' }+ { value: 'dd.MM.yyyy', label: 'DD.MM.YYYY' },];export default function FormatSettings({ prefs, savePrefs }) {diff --git a/packages/desktop-client/src/components/settings/Global.js b/packages/desktop-client/src/components/settings/Global.jsindex 80d7162d1a..2e7c225910 100644--- a/packages/desktop-client/src/components/settings/Global.js+++ b/packages/desktop-client/src/components/settings/Global.js@@ -17,7 +17,7 @@ export default function GlobalSettings({ globalPrefs, saveGlobalPrefs }) {async function onChooseDocumentDir() {let res = await window.Actual.openFileDialog({- properties: ['openDirectory']+ properties: ['openDirectory'],});if (res) {saveGlobalPrefs({ documentDir: res[0] });@@ -31,7 +31,7 @@ export default function GlobalSettings({ globalPrefs, saveGlobalPrefs }) {style={{flexDirection: 'row',alignItems: 'center',- overflow: 'hidden'+ overflow: 'hidden',}}><Text style={{ flexShrink: 0 }}>Store files here: </Text>@@ -47,7 +47,7 @@ export default function GlobalSettings({ globalPrefs, saveGlobalPrefs }) {// TODO: When we update electron, we should be able to// remove this. In previous versions of Chrome, once the// scrollbar appears it never goes away- '::-webkit-scrollbar': { display: 'none' }+ '::-webkit-scrollbar': { display: 'none' },}}>{globalPrefs.documentDir}@@ -59,7 +59,7 @@ export default function GlobalSettings({ globalPrefs, saveGlobalPrefs }) {fontSize: 14,marginLeft: 5,flexShrink: 0,- alignSelf: 'flex-start'+ alignSelf: 'flex-start',}}>Change locationdiff --git a/packages/desktop-client/src/components/settings/UI.js b/packages/desktop-client/src/components/settings/UI.jsindex 03aaf870d8..23a9cf06c0 100644--- a/packages/desktop-client/src/components/settings/UI.js+++ b/packages/desktop-client/src/components/settings/UI.js@@ -13,7 +13,7 @@ export function Section({ title, children, style, titleProps, ...props }) {<Viewstyle={[{ fontSize: 20, fontWeight: 500, flexShrink: 0 },- titleProps && titleProps.style+ titleProps && titleProps.style,]}{...titleProps}>@@ -35,11 +35,11 @@ export function Setting({ primaryAction, children }) {padding: 15,borderRadius: 4,border: '1px solid ' + colors.n8,- width: '100%'+ width: '100%',},media(`(min-width: ${tokens.breakpoint_medium})`, {- width: 'auto'- })+ width: 'auto',+ }),)}><View@@ -47,7 +47,7 @@ export function Setting({ primaryAction, children }) {marginBottom: primaryAction ? 10 : 0,maxWidth: 500,lineHeight: 1.5,- gap: 10+ gap: 10,}}>{children}@@ -73,11 +73,11 @@ export function AdvancedToggle({ children }) {{...css({marginBottom: 25,- width: '100%'+ width: '100%',},media(`(min-width: ${tokens.breakpoint_medium})`, {- width: 'auto'- })+ width: 'auto',+ }),)}>{children}@@ -90,7 +90,7 @@ export function AdvancedToggle({ children }) {flexShrink: 0,alignSelf: 'flex-start',color: colors.p4,- marginBottom: 25+ marginBottom: 25,}}>Show advanced settingsdiff --git a/packages/desktop-client/src/components/settings/index.js b/packages/desktop-client/src/components/settings/index.jsindex 0acd6b1613..c5a39923d5 100644--- a/packages/desktop-client/src/components/settings/index.js+++ b/packages/desktop-client/src/components/settings/index.js@@ -54,7 +54,7 @@ function Settings({globalPrefs,pushModal,resetSync,- closeBudget+ closeBudget,}) {useEffect(() => {let unlisten = listen('prefs-updated', () => {@@ -68,7 +68,7 @@ function Settings({return (<Viewstyle={{- marginInline: globalPrefs.floatingSidebar && !isMobile() ? 'auto' : 0+ marginInline: globalPrefs.floatingSidebar && !isMobile() ? 'auto' : 0,}}><Page title="Settings">@@ -78,8 +78,8 @@ function Settings({title="Budget"style={css(media(`(min-width: ${tokens.breakpoint_medium})`, {- display: 'none'- })+ display: 'none',+ }),)}><FormField>@@ -123,8 +123,8 @@ export default withThemeColor(colors.n10)(connect(state => ({prefs: state.prefs.local,- globalPrefs: state.prefs.global+ globalPrefs: state.prefs.global,}),- actions- )(Settings)+ actions,+ )(Settings),);diff --git a/packages/desktop-client/src/components/tutorial/BudgetCategories.js b/packages/desktop-client/src/components/tutorial/BudgetCategories.jsindex bf7beb148c..a90650a73a 100644--- a/packages/desktop-client/src/components/tutorial/BudgetCategories.js+++ b/packages/desktop-client/src/components/tutorial/BudgetCategories.js@@ -17,7 +17,7 @@ function BudgetInitial({ targetRect, navigationProps }) {backgroundColor: 'transparent',boxShadow: 'none',transform: 'translateX(-5px)',- fontSize: 14+ fontSize: 14,}}><Pointerdiff --git a/packages/desktop-client/src/components/tutorial/BudgetInitial.js b/packages/desktop-client/src/components/tutorial/BudgetInitial.jsindex ba1050480c..16277bb156 100644--- a/packages/desktop-client/src/components/tutorial/BudgetInitial.js+++ b/packages/desktop-client/src/components/tutorial/BudgetInitial.js@@ -42,7 +42,7 @@ function BudgetInitial({ accounts, navigationProps }) {export default connect(state => ({- accounts: state.queries.accounts+ accounts: state.queries.accounts,}),- dispatch => bindActionCreators(actions, dispatch)+ dispatch => bindActionCreators(actions, dispatch),)(BudgetInitial);diff --git a/packages/desktop-client/src/components/tutorial/BudgetNewIncome.js b/packages/desktop-client/src/components/tutorial/BudgetNewIncome.jsindex 70d9218b08..143d8c9553 100644--- a/packages/desktop-client/src/components/tutorial/BudgetNewIncome.js+++ b/packages/desktop-client/src/components/tutorial/BudgetNewIncome.js@@ -18,7 +18,7 @@ function BudgetSummary({ targetRect, navigationProps }) {color: colors.n1,boxShadow: 'none',marginTop: 5,- fontSize: 14+ fontSize: 14,}}><Pointerdiff --git a/packages/desktop-client/src/components/tutorial/BudgetNextMonth.js b/packages/desktop-client/src/components/tutorial/BudgetNextMonth.jsindex 24a2e3d2b4..06a8eb3a72 100644--- a/packages/desktop-client/src/components/tutorial/BudgetNextMonth.js+++ b/packages/desktop-client/src/components/tutorial/BudgetNextMonth.js@@ -58,5 +58,5 @@ function BudgetNextMonth({ stepTwo, navigationProps }) {}export default connect(null, dispatch => bindActionCreators(actions, dispatch))(- BudgetNextMonth+ BudgetNextMonth,);diff --git a/packages/desktop-client/src/components/tutorial/BudgetSummary.js b/packages/desktop-client/src/components/tutorial/BudgetSummary.jsindex e20bc282ad..f134dfd25d 100644--- a/packages/desktop-client/src/components/tutorial/BudgetSummary.js+++ b/packages/desktop-client/src/components/tutorial/BudgetSummary.js@@ -18,7 +18,7 @@ function BudgetSummary({ fromYNAB, targetRect, navigationProps }) {color: colors.n1,boxShadow: 'none',marginTop: 5,- fontSize: 14+ fontSize: 14,}}><Pointerdiff --git a/packages/desktop-client/src/components/tutorial/Intro.js b/packages/desktop-client/src/components/tutorial/Intro.jsindex 5eaf93ed73..df609aae70 100644--- a/packages/desktop-client/src/components/tutorial/Intro.js+++ b/packages/desktop-client/src/components/tutorial/Intro.js@@ -5,7 +5,7 @@ import {Text,P,ModalButtons,- Button+ Button,} from 'loot-design/src/components/common';import { Standalone, Title, ExternalLink } from './common';diff --git a/packages/desktop-client/src/components/tutorial/Navigation.js b/packages/desktop-client/src/components/tutorial/Navigation.jsindex 2ab184c099..a3fe222369 100644--- a/packages/desktop-client/src/components/tutorial/Navigation.js+++ b/packages/desktop-client/src/components/tutorial/Navigation.js@@ -9,7 +9,7 @@ function Navigation({showBack = true,showNext = true,leftContent,- disableNext+ disableNext,}) {return (<ModalButtons leftContent={leftContent} style={{ marginTop: 20 }}>diff --git a/packages/desktop-client/src/components/tutorial/Overspending.js b/packages/desktop-client/src/components/tutorial/Overspending.jsindex fd4881cdb3..3e74dbf48f 100644--- a/packages/desktop-client/src/components/tutorial/Overspending.js+++ b/packages/desktop-client/src/components/tutorial/Overspending.js@@ -91,5 +91,5 @@ function Overspending({ navigationProps, stepTwo }) {}export default connect(null, dispatch => bindActionCreators(actions, dispatch))(- Overspending+ Overspending,);diff --git a/packages/desktop-client/src/components/tutorial/TransactionAdd.js b/packages/desktop-client/src/components/tutorial/TransactionAdd.jsindex 6ae808eed7..4c0fcc81a0 100644--- a/packages/desktop-client/src/components/tutorial/TransactionAdd.js+++ b/packages/desktop-client/src/components/tutorial/TransactionAdd.js@@ -18,7 +18,7 @@ function TransactionAdd({ targetRect, navigationProps }) {color: colors.n1,boxShadow: 'none',marginTop: 5,- fontSize: 14+ fontSize: 14,}}><Pointerdiff --git a/packages/desktop-client/src/components/tutorial/common.js b/packages/desktop-client/src/components/tutorial/common.jsindex 39d64bb54b..3558420c30 100644--- a/packages/desktop-client/src/components/tutorial/common.js+++ b/packages/desktop-client/src/components/tutorial/common.js@@ -32,7 +32,7 @@ export function Standalone({ children, width = 320, skipAnimation = false }) {boxShadow: '0 2px 8px rgba(0, 0, 0, .3)',borderRadius: 4,zIndex: 1000,- fontSize: 14+ fontSize: 14,}}>{children}diff --git a/packages/desktop-client/src/components/util/AmountInput.js b/packages/desktop-client/src/components/util/AmountInput.jsindex ff1f586290..d21fe311af 100644--- a/packages/desktop-client/src/components/util/AmountInput.js+++ b/packages/desktop-client/src/components/util/AmountInput.js@@ -2,12 +2,12 @@ import React, { useState } from 'react';import {integerToCurrency,- currencyToInteger+ currencyToInteger,} from 'loot-core/src/shared/util';import {View,Button,- InputWithContent+ InputWithContent,} from 'loot-design/src/components/common';import Add from 'loot-design/src/svg/v1/Add';import Subtract from 'loot-design/src/svg/v1/Subtract';diff --git a/packages/desktop-client/src/components/util/GenericInput.js b/packages/desktop-client/src/components/util/GenericInput.jsindex 083d53def2..c8b23fa0fb 100644--- a/packages/desktop-client/src/components/util/GenericInput.js+++ b/packages/desktop-client/src/components/util/GenericInput.js@@ -19,14 +19,14 @@ export default function GenericInput({value,inputRef,style,- onChange+ onChange,}) {let { payees, accounts, categoryGroups, dateFormat } = useSelector(state => {return {payees: state.queries.payees,accounts: state.queries.accounts,categoryGroups: state.queries.categories.grouped,- dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy'+ dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy',};});@@ -56,7 +56,7 @@ export default function GenericInput({onSelect={onChange}inputProps={{inputRef,- ...(showPlaceholder ? { placeholder: 'nothing' } : null)+ ...(showPlaceholder ? { placeholder: 'nothing' } : null),}}/>);@@ -73,7 +73,7 @@ export default function GenericInput({onSelect={onChange}inputProps={{inputRef,- ...(showPlaceholder ? { placeholder: 'nothing' } : null)+ ...(showPlaceholder ? { placeholder: 'nothing' } : null),}}/>);@@ -89,7 +89,7 @@ export default function GenericInput({onSelect={onChange}inputProps={{inputRef,- ...(showPlaceholder ? { placeholder: 'nothing' } : null)+ ...(showPlaceholder ? { placeholder: 'nothing' } : null),}}/>);diff --git a/packages/desktop-client/src/global-events.js b/packages/desktop-client/src/global-events.jsindex 9e81de5226..d50a41b392 100644--- a/packages/desktop-client/src/global-events.js+++ b/packages/desktop-client/src/global-events.js@@ -31,7 +31,7 @@ export function handleGlobalEvents(actions, store) {// Right now, it prompts to merge into the first payeeactions.pushModal('merge-unused-payees', {payeeIds: orphanedIds,- targetPayeeId: updatedPayeeIds[0]+ targetPayeeId: updatedPayeeIds[0],});});@@ -40,7 +40,7 @@ export function handleGlobalEvents(actions, store) {if (history) {history.push(`/schedule/posts-offline-notification`, {locationPtr: history.location,- payees+ payees,});}});@@ -68,7 +68,7 @@ export function handleGlobalEvents(actions, store) {type: 'warning',message: 'Unable to authenticate with server',sticky: true,- id: 'auth-issue'+ id: 'auth-issue',});}});@@ -130,7 +130,7 @@ export function handleGlobalEvents(actions, store) {message:'This browser only supports using the app in one tab at a time, ' +'and another tab has opened the app. No changes will be saved ' +- 'from this tab; please close it and continue working in the other one.'+ 'from this tab; please close it and continue working in the other one.',});});diff --git a/packages/desktop-client/src/index.js b/packages/desktop-client/src/index.jsindex 1a7b31c9ec..1cd3eabad7 100644--- a/packages/desktop-client/src/index.js+++ b/packages/desktop-client/src/index.js@@ -15,7 +15,7 @@ import {createStore,combineReducers,applyMiddleware,- bindActionCreators+ bindActionCreators,} from 'redux';import thunk from 'redux-thunk';@@ -47,8 +47,8 @@ function rootReducer(state, action) {updateInfo: state.updateInfo,showUpdateNotification: state.showUpdateNotification,managerHasInitialized: state.app.managerHasInitialized,- loadingText: state.app.loadingText- }+ loadingText: state.app.loadingText,+ },};}@@ -73,5 +73,5 @@ ReactDOM.render(<Provider store={store}><App /></Provider>,- document.getElementById('root')+ document.getElementById('root'),);diff --git a/packages/desktop-client/src/plaid.js b/packages/desktop-client/src/plaid.jsindex fdaeae4a1b..8da29c334d 100644--- a/packages/desktop-client/src/plaid.js+++ b/packages/desktop-client/src/plaid.js@@ -17,7 +17,7 @@ function _authorize(pushModal, plaidToken, { onSuccess, onClose }) {},onClose,- onSuccess+ onSuccess,});}@@ -28,15 +28,15 @@ export async function authorizeBank(pushModal, { upgradingId } = {}) {institution: data.metadata.institution,publicToken: data.publicToken,accounts: data.metadata.accounts,- upgradingId+ upgradingId,});- }+ },});}export async function reauthorizeBank(pushModal, bankId, onSuccess) {let { linkToken } = await send('make-plaid-public-token', {- bankId+ bankId,});// We don't do anything with the error right nowdiff --git a/packages/loot-core/src/client/SpreadsheetProvider.js b/packages/loot-core/src/client/SpreadsheetProvider.jsindex 4d036b4a9d..9101f1006b 100644--- a/packages/loot-core/src/client/SpreadsheetProvider.js+++ b/packages/loot-core/src/client/SpreadsheetProvider.js@@ -104,7 +104,7 @@ function makeSpreadsheet() {return send('create-query', {sheetName,name,- query: query.serialize()+ query: query.serialize(),});}}diff --git a/packages/loot-core/src/client/actions/account.js b/packages/loot-core/src/client/actions/account.jsindex 83880052bb..dd8140de44 100644--- a/packages/loot-core/src/client/actions/account.js+++ b/packages/loot-core/src/client/actions/account.js@@ -7,7 +7,7 @@ import { getPayees, getAccounts } from './queries';export function setAccountsSyncing(name) {return {type: constants.SET_ACCOUNTS_SYNCING,- name+ name,};}@@ -17,20 +17,20 @@ export function markAccountFailed(id, errorType, errorCode) {id,failed: true,errorType,- errorCode+ errorCode,};}export function markAccountSuccess(id) {return {type: 'ACCOUNT_SYNC_STATUS',id,- failed: false+ failed: false,};}export function setFailedAccounts(syncErrors) {return {type: 'ACCOUNT_SYNC_FAILURES',- syncErrors+ syncErrors,};}@@ -48,7 +48,7 @@ export function linkAccount(institution, publicToken, accountId, upgradingId) {institution,publicToken,accountId,- upgradingId+ upgradingId,});await dispatch(getPayees());await dispatch(getAccounts());@@ -59,14 +59,14 @@ export function connectAccounts(institution,publicToken,accountIds,- offbudgetIds+ offbudgetIds,) {return async dispatch => {let ids = await send('accounts-connect', {institution,publicToken,accountIds,- offbudgetIds+ offbudgetIds,});await dispatch(getPayees());await dispatch(getAccounts());@@ -111,9 +111,9 @@ export function syncAccounts(id) {.map(error => ({id: error.accountId,type: error.category,- code: error.code- }))- )+ code: error.code,+ })),+ ),);}@@ -122,16 +122,16 @@ export function syncAccounts(id) {dispatch(addNotification({type: 'error',- message: error.message- })+ message: error.message,+ }),);} else {dispatch(addNotification({type: 'error',message: error.message,- internal: error.internal- })+ internal: error.internal,+ }),);}});@@ -140,7 +140,7 @@ export function syncAccounts(id) {type: constants.SET_NEW_TRANSACTIONS,newTransactions,matchedTransactions,- updatedAccounts+ updatedAccounts,});return newTransactions.length > 0 || matchedTransactions.length > 0;@@ -151,7 +151,7 @@ export function syncAccounts(id) {export function setLastTransaction(transaction) {return {type: constants.SET_LAST_TRANSACTION,- transaction+ transaction,};}@@ -159,7 +159,7 @@ export function parseTransactions(filepath, options) {return async dispatch => {return await send('transactions-parse-file', {filepath,- options+ options,});};}@@ -169,10 +169,10 @@ export function importTransactions(id, transactions) {let {errors = [],added,- updated+ updated,} = await send('transactions-import', {accountId: id,- transactions+ transactions,});errors.forEach(error => {@@ -180,8 +180,8 @@ export function importTransactions(id, transactions) {addNotification({type: 'error',message: error.message,- internal: error.internal- })+ internal: error.internal,+ }),);});@@ -189,7 +189,7 @@ export function importTransactions(id, transactions) {type: constants.SET_NEW_TRANSACTIONS,newTransactions: added,matchedTransactions: updated,- updatedAccounts: added.length > 0 ? [id] : []+ updatedAccounts: added.length > 0 ? [id] : [],});return added.length > 0 || updated.length > 0;@@ -199,14 +199,14 @@ export function importTransactions(id, transactions) {export function updateNewTransactions(changedId) {return {type: constants.UPDATE_NEW_TRANSACTIONS,- changedId+ changedId,};}export function markAccountRead(accountId) {return {type: constants.MARK_ACCOUNT_READ,- accountId: accountId+ accountId: accountId,};}@@ -214,7 +214,7 @@ export function getBanks() {return async dispatch => {dispatch({type: constants.LOAD_BANKS,- banks: await send('banks')+ banks: await send('banks'),});};}diff --git a/packages/loot-core/src/client/actions/app.js b/packages/loot-core/src/client/actions/app.jsindex 2587523b44..f976e24044 100644--- a/packages/loot-core/src/client/actions/app.js+++ b/packages/loot-core/src/client/actions/app.js@@ -4,7 +4,7 @@ import constants from '../constants';export function setAppState(state) {return {type: constants.SET_APP_STATE,- state+ state,};}@@ -18,7 +18,7 @@ export function updateApp() {export function setLastUndoState(undoState) {return {type: constants.SET_LAST_UNDO_STATE,- undoState+ undoState,};}diff --git a/packages/loot-core/src/client/actions/budgets.js b/packages/loot-core/src/client/actions/budgets.jsindex ec395f950c..548f86f141 100644--- a/packages/loot-core/src/client/actions/budgets.js+++ b/packages/loot-core/src/client/actions/budgets.js@@ -26,7 +26,7 @@ export function loadBudgets() {dispatch({type: constants.SET_BUDGETS,- budgets+ budgets,});};}@@ -37,7 +37,7 @@ export function loadRemoteFiles() {dispatch({type: constants.SET_REMOTE_FILES,- files+ files,});};}@@ -50,7 +50,7 @@ export function loadAllFiles() {dispatch({type: constants.SET_ALL_FILES,budgets,- remoteFiles: files+ remoteFiles: files,});return getState().budgets.allFiles;@@ -72,7 +72,7 @@ export function loadBudget(id, loadingText = '', options = {}) {// eslint-disable-next-linelet showBackups = confirm('This budget cannot be loaded with this version of the app. ' +- 'Make sure the app is up-to-date. Do you want to load a backup?'+ 'Make sure the app is up-to-date. Do you want to load a backup?',);if (showBackups) {@@ -81,16 +81,16 @@ export function loadBudget(id, loadingText = '', options = {}) {} else {alert('This budget cannot be loaded with this version of the app. ' +- 'Make sure the app is up-to-date.'+ 'Make sure the app is up-to-date.',);}} else if (error === 'budget-not-found') {alert(- 'Budget file could not be found. If you changed something manually, please restart the app.'+ 'Budget file could not be found. If you changed something manually, please restart the app.',);} else {alert(- 'Error loading budget. Please open a issue on GitHub for support.'+ 'Error loading budget. Please open a issue on GitHub for support.',);}@@ -145,7 +145,9 @@ export function deleteBudget(id, cloudFileId) {export function createBudget({ testMode, demoMode } = {}) {return async (dispatch, getState) => {dispatch(- setAppState({ loadingText: testMode || demoMode ? 'Making demo...' : '' })+ setAppState({+ loadingText: testMode || demoMode ? 'Making demo...' : '',+ }),);if (demoMode) {@@ -210,7 +212,7 @@ export function downloadBudget(cloudFileId, { replace } = {}) {let { id, error } = await send('download-budget', {fileId: cloudFileId,- replace+ replace,});if (error) {@@ -220,7 +222,7 @@ export function downloadBudget(cloudFileId, { replace } = {}) {cloudFileId,onSuccess: () => {dispatch(downloadBudget(cloudFileId, { replace }));- }+ },};dispatch(pushModal('fix-encryption-key', opts));@@ -229,7 +231,7 @@ export function downloadBudget(cloudFileId, { replace } = {}) {alert(`A file with id "${error.meta.id}" already exists with the name "${error.meta.name}". ` +'This file will be replaced. This probably happened because files were manually ' +- 'moved around outside of Actual.'+ 'moved around outside of Actual.',);return dispatch(downloadBudget(cloudFileId, { replace: true }));@@ -242,7 +244,7 @@ export function downloadBudget(cloudFileId, { replace } = {}) {await Promise.all([dispatch(loadGlobalPrefs()),dispatch(loadAllFiles()),- dispatch(loadBudget(id))+ dispatch(loadBudget(id)),]);dispatch(setAppState({ loadingText: null }));}@@ -256,7 +258,7 @@ export function getYNAB4Imports() {let imports = await send('get-ynab4-files');dispatch({type: 'SET_AVAILABLE_IMPORTS',- imports+ imports,});return imports;};diff --git a/packages/loot-core/src/client/actions/debug.js b/packages/loot-core/src/client/actions/debug.jsindex afa90415e9..0c44b8df39 100644--- a/packages/loot-core/src/client/actions/debug.js+++ b/packages/loot-core/src/client/actions/debug.js@@ -4,6 +4,6 @@ export function debugCell(sheet, name) {return {type: constants.DEBUG_CELL,sheet,- name+ name,};}diff --git a/packages/loot-core/src/client/actions/notifications.js b/packages/loot-core/src/client/actions/notifications.jsindex 52eb7e4db4..2610cf1828 100644--- a/packages/loot-core/src/client/actions/notifications.js+++ b/packages/loot-core/src/client/actions/notifications.js@@ -7,8 +7,8 @@ export function addNotification(notification) {type: constants.ADD_NOTIFICATION,notification: {...notification,- id: notification.id || uuid.v4Sync()- }+ id: notification.id || uuid.v4Sync(),+ },};}@@ -17,13 +17,13 @@ export function addGenericErrorNotification() {type: 'error',message:'Something internally went wrong. You may want to restart the app if anything looks wrong. ' +- 'We have been notified of the issue and will try to fix it soon.'+ 'We have been notified of the issue and will try to fix it soon.',});}export function removeNotification(id) {return {type: constants.REMOVE_NOTIFICATION,- id+ id,};}diff --git a/packages/loot-core/src/client/actions/prefs.js b/packages/loot-core/src/client/actions/prefs.jsindex 50e6027e00..8aedebe070 100644--- a/packages/loot-core/src/client/actions/prefs.js+++ b/packages/loot-core/src/client/actions/prefs.js@@ -16,7 +16,7 @@ export function loadPrefs() {dispatch({type: constants.SET_PREFS,prefs,- globalPrefs: await send('load-global-prefs')+ globalPrefs: await send('load-global-prefs'),});return prefs;@@ -28,7 +28,7 @@ export function savePrefs(prefs) {await send('save-prefs', prefs);dispatch({type: constants.MERGE_LOCAL_PREFS,- prefs+ prefs,});};}@@ -39,7 +39,7 @@ export function loadGlobalPrefs() {dispatch({type: constants.SET_PREFS,prefs: getState().prefs.local,- globalPrefs+ globalPrefs,});return globalPrefs;};@@ -50,7 +50,7 @@ export function saveGlobalPrefs(prefs) {await send('save-global-prefs', prefs);dispatch({type: constants.MERGE_GLOBAL_PREFS,- globalPrefs: prefs+ globalPrefs: prefs,});};}diff --git a/packages/loot-core/src/client/actions/queries.js b/packages/loot-core/src/client/actions/queries.jsindex 0a785d8328..e1c4e9f338 100644--- a/packages/loot-core/src/client/actions/queries.js+++ b/packages/loot-core/src/client/actions/queries.js@@ -13,7 +13,7 @@ export function applyBudgetAction(month, type, args) {await send('budget/budget-amount', {month,category: args.category,- amount: args.amount+ amount: args.amount,});break;case 'copy-last':@@ -34,7 +34,7 @@ export function applyBudgetAction(month, type, args) {case 'hold':await send('budget/hold-for-next-month', {month,- amount: args.amount+ amount: args.amount,});break;case 'reset-hold':@@ -44,14 +44,14 @@ export function applyBudgetAction(month, type, args) {await send('budget/cover-overspending', {month,to: args.to,- from: args.from+ from: args.from,});break;case 'transfer-available':await send('budget/transfer-available', {month,amount: args.amount,- category: args.category+ category: args.category,});break;case 'transfer-category':@@ -59,14 +59,14 @@ export function applyBudgetAction(month, type, args) {month,amount: args.amount,from: args.from,- to: args.to+ to: args.to,});break;case 'carryover': {await send('budget/set-carryover', {startMonth: month,category: args.category,- flag: args.flag+ flag: args.flag,});break;}@@ -80,7 +80,7 @@ export function getCategories() {const categories = await send('get-categories');dispatch({type: constants.LOAD_CATEGORIES,- categories+ categories,});return categories;};@@ -91,7 +91,7 @@ export function createCategory(name, groupId, isIncome) {let id = await send('category-create', {name,groupId,- isIncome+ isIncome,});dispatch(getCategories());return id;@@ -109,8 +109,8 @@ export function deleteCategory(id, transferId) {addNotification({type: 'error',message:- 'A category must be transferred to another of the same type (expense or income)'- })+ 'A category must be transferred to another of the same type (expense or income)',+ }),);break;default:@@ -182,7 +182,7 @@ export function getPayees() {let payees = await send('payees-get');dispatch({type: constants.LOAD_PAYEES,- payees+ payees,});return payees;};@@ -229,18 +229,18 @@ export function createAccount(name, type, balance, offBudget) {export function openAccountCloseModal(accountId) {return async function (dispatch, getState) {const { balance, numTransactions } = await send('account-properties', {- id: accountId+ id: accountId,});const account = getState().queries.accounts.find(- acct => acct.id === accountId+ acct => acct.id === accountId,);dispatch(pushModal('close-account', {account,balance,- canDelete: numTransactions === 0- })+ canDelete: numTransactions === 0,+ }),);};}@@ -251,7 +251,7 @@ export function closeAccount(accountId, transferAccountId, categoryId, forced) {id: accountId,transferAccountId,categoryId,- forced+ forced,});dispatch(getAccounts());};diff --git a/packages/loot-core/src/client/actions/sync.js b/packages/loot-core/src/client/actions/sync.jsindex fd8b99799b..d5776a1027 100644--- a/packages/loot-core/src/client/actions/sync.js+++ b/packages/loot-core/src/client/actions/sync.js@@ -11,7 +11,7 @@ export function unregister() {const profile = await send('unregister');dispatch({type: constants.SET_PROFILE,- profile+ profile,});};}@@ -32,8 +32,8 @@ export function resetSync() {onSuccess: () => {// TODO: There won't be a loading indicator for thisdispatch(resetSync());- }- })+ },+ }),);} else if (error.reason === 'encrypt-failure') {dispatch(pushModal('create-encryption-key', { recreate: true }));diff --git a/packages/loot-core/src/client/actions/user.js b/packages/loot-core/src/client/actions/user.jsindex 1462231656..5fe274dae9 100644--- a/packages/loot-core/src/client/actions/user.js+++ b/packages/loot-core/src/client/actions/user.js@@ -10,7 +10,7 @@ export function getUserData() {dispatch({type: constants.GET_USER_DATA,- data+ data,});return data;};diff --git a/packages/loot-core/src/client/constants.js b/packages/loot-core/src/client/constants.jsindex 76132ccf19..469f413bf8 100644--- a/packages/loot-core/src/client/constants.js+++ b/packages/loot-core/src/client/constants.js@@ -39,5 +39,5 @@ export default {SIGN_OUT: 'SIGN_OUT',SET_TUTORIAL_STAGE: 'SET_TUTORIAL_STAGE',- DEACTIVATE_TUTORIAL: 'DEACTIVATE_TUTORIAL'+ DEACTIVATE_TUTORIAL: 'DEACTIVATE_TUTORIAL',};diff --git a/packages/loot-core/src/client/data-hooks/schedules.js b/packages/loot-core/src/client/data-hooks/schedules.jsindex 6cb01a4d30..879f85b53f 100644--- a/packages/loot-core/src/client/data-hooks/schedules.js+++ b/packages/loot-core/src/client/data-hooks/schedules.js@@ -3,7 +3,7 @@ import React, { useEffect, useState, useContext } from 'react';import q, { liveQuery } from 'loot-core/src/client/query-helpers';import {getStatus,- getHasTransactionsQuery+ getHasTransactionsQuery,} from 'loot-core/src/shared/schedules';function loadStatuses(schedules, onData) {@@ -14,10 +14,10 @@ function loadStatuses(schedules, onData) {return new Map(schedules.map(s => [s.id,- getStatus(s.next_date, s.completed, hasTrans.has(s.id))- ])+ getStatus(s.next_date, s.completed, hasTrans.has(s.id)),+ ]),);- }+ },});}@@ -37,10 +37,10 @@ export function useSchedules({ transform } = {}) {}statusQuery = loadStatuses(schedules, statuses =>- setData({ schedules, statuses })+ setData({ schedules, statuses }),);}- }+ },);return () => {diff --git a/packages/loot-core/src/client/platform.js b/packages/loot-core/src/client/platform.jsindex 67bc30649c..60e4a16ddb 100644--- a/packages/loot-core/src/client/platform.js+++ b/packages/loot-core/src/client/platform.js@@ -5,7 +5,7 @@ const isMac =navigator.platform && navigator.platform.toUpperCase().indexOf('MAC') >= 0;const isProbablySafari = /^((?!chrome|android).)*safari/i.test(- navigator.userAgent+ navigator.userAgent,);export default {@@ -13,5 +13,5 @@ export default {env: 'web',isBrowser: !!window.Actual.IS_FAKE_WEB,isReactNativeWeb: false,- isProbablySafari+ isProbablySafari,};diff --git a/packages/loot-core/src/client/queries.js b/packages/loot-core/src/client/queries.jsindex 87b05bf025..72a15502e4 100644--- a/packages/loot-core/src/client/queries.js+++ b/packages/loot-core/src/client/queries.js@@ -5,7 +5,7 @@ import {getDayMonthRegex,getDayMonthFormat,getShortYearRegex,- getShortYearFormat+ getShortYearFormat,} from '../shared/months';import q from '../shared/query';import { currencyToAmount, amountToInteger } from '../shared/util';@@ -15,12 +15,12 @@ export function getAccountFilter(accountId, field = 'account') {if (accountId === 'budgeted') {return {[`${field}.offbudget`]: false,- [`${field}.closed`]: false+ [`${field}.closed`]: false,};} else if (accountId === 'offbudget') {return {[`${field}.offbudget`]: true,- [`${field}.closed`]: false+ [`${field}.closed`]: false,};} else if (accountId === 'uncategorized') {return {@@ -30,9 +30,9 @@ export function getAccountFilter(accountId, field = 'account') {$or: [{'payee.transfer_acct.offbudget': true,- 'payee.transfer_acct': null- }- ]+ 'payee.transfer_acct': null,+ },+ ],};} else {return { [field]: accountId };@@ -75,17 +75,17 @@ export function makeTransactionSearchQuery(currentQuery, search, dateFormat) {$or: [isDateValid(parsedDate) && { date: dayFromDate(parsedDate) },amount != null && {- amount: { $transform: '$abs', $eq: amountToInteger(amount) }+ amount: { $transform: '$abs', $eq: amountToInteger(amount) },},amount != null &&Number.isInteger(amount) && {amount: {$transform: { $abs: { $idiv: ['$', 100] } },- $eq: amount- }- }- ].filter(Boolean)- }+ $eq: amount,+ },+ },+ ].filter(Boolean),+ },});}@@ -95,7 +95,7 @@ export function accountBalance(acct) {query: q('transactions').filter({ account: acct.id }).options({ splits: 'none' })- .calculate({ $sum: '$amount' })+ .calculate({ $sum: '$amount' }),};}@@ -104,7 +104,7 @@ export function allAccountBalance() {query: q('transactions').filter({ 'account.closed': false }).calculate({ $sum: '$amount' }),- name: 'accounts-balance'+ name: 'accounts-balance',};}@@ -113,7 +113,7 @@ export function budgetedAccountBalance() {name: `budgeted-accounts-balance`,query: q('transactions').filter({ 'account.offbudget': false, 'account.closed': false })- .calculate({ $sum: '$amount' })+ .calculate({ $sum: '$amount' }),};}@@ -122,7 +122,7 @@ export function offbudgetAccountBalance() {name: `offbudget-accounts-balance`,query: q('transactions').filter({ 'account.offbudget': true, 'account.closed': false })- .calculate({ $sum: '$amount' })+ .calculate({ $sum: '$amount' }),};}@@ -132,22 +132,22 @@ let uncategorizedQuery = q('transactions').filter({$or: [{'payee.transfer_acct.offbudget': true,- 'payee.transfer_acct': null- }- ]+ 'payee.transfer_acct': null,+ },+ ],});export function uncategorizedBalance() {return {name: 'uncategorized-balance',- query: uncategorizedQuery.calculate({ $sum: '$amount' })+ query: uncategorizedQuery.calculate({ $sum: '$amount' }),};}export function uncategorizedCount() {return {name: 'uncategorized-amount',- query: uncategorizedQuery.calculate({ $count: '$id' })+ query: uncategorizedQuery.calculate({ $count: '$id' }),};}@@ -172,7 +172,7 @@ export const rolloverBudget = {catBudgeted: id => `budget-${id}`,catSumAmount: id => `sum-amount-${id}`,catBalance: id => `leftover-${id}`,- catCarryover: id => `carryover-${id}`+ catCarryover: id => `carryover-${id}`,};export const reportBudget = {@@ -194,5 +194,5 @@ export const reportBudget = {catBudgeted: id => `budget-${id}`,catSumAmount: id => `sum-amount-${id}`,catBalance: id => `leftover-${id}`,- catCarryover: id => `carryover-${id}`+ catCarryover: id => `carryover-${id}`,};diff --git a/packages/loot-core/src/client/query-helpers.js b/packages/loot-core/src/client/query-helpers.jsindex 0a9b2a82bc..635d9c75e6 100644--- a/packages/loot-core/src/client/query-helpers.js+++ b/packages/loot-core/src/client/query-helpers.js@@ -192,8 +192,8 @@ export class PagedQuery extends LiveQuery {this.query.limit(this.data == null? this.pageCount- : Math.max(this.data.length, this.pageCount)- )+ : Math.max(this.data.length, this.pageCount),+ ),);});@@ -226,9 +226,9 @@ export class PagedQuery extends LiveQuery {result = await runQuery(this.query.filter({[field]: {- [order === 'asc' ? '$lte' : '$gte']: fullRow[field]- }- })+ [order === 'asc' ? '$lte' : '$gte']: fullRow[field],+ },+ }),);let data = result.data;@@ -238,15 +238,15 @@ export class PagedQuery extends LiveQuery {this.query.filter({[field]: {- [order === 'asc' ? '$gt' : '$lt']: fullRow[field]- }+ [order === 'asc' ? '$gt' : '$lt']: fullRow[field],+ },})- .limit(this.pageCount)+ .limit(this.pageCount),);return {data: data.concat(result.data),- dependencies: result.dependencies+ dependencies: result.dependencies,};});@@ -264,7 +264,7 @@ export class PagedQuery extends LiveQuery {if (!this.done) {let { data } = await runQuery(- this.query.limit(this.pageCount).offset(previousData.length)+ this.query.limit(this.pageCount).offset(previousData.length),);// If either there is an existing request in flight or the datadiff --git a/packages/loot-core/src/client/query-helpers.test.js b/packages/loot-core/src/client/query-helpers.test.jsindex 6f93cbefe4..9b72a3fb08 100644--- a/packages/loot-core/src/client/query-helpers.test.js+++ b/packages/loot-core/src/client/query-helpers.test.js@@ -20,7 +20,7 @@ function isCountQuery(query) {function select(row, selectExpressions) {return Object.fromEntries(- selectExpressions.map(fieldName => [fieldName, row[fieldName]])+ selectExpressions.map(fieldName => [fieldName, row[fieldName]]),);}@@ -63,14 +63,14 @@ function runPagedQuery(query, data) {}).map(row => select(row, query.selectExpressions)),query.limit,- query.offset+ query.offset,);}} else if (query.offset != null || query.limit != null) {return limitOffset(data.map(row => select(row, query.selectExpressions)),query.limit,- query.offset+ query.offset,);}@@ -87,7 +87,7 @@ function initBasicServer(delay) {await wait(delay);}return { data: query.selectExpressions, dependencies: ['transactions'] };- }+ },});}@@ -101,16 +101,16 @@ function initPagingServer(dataLength, { delay, eventType = 'select' } = {}) {query: async query => {tracer.event('server-query',- eventType === 'select' ? query.selectExpressions : query+ eventType === 'select' ? query.selectExpressions : query,);if (delay) {await wait(delay);}return {data: runPagedQuery(query, data),- dependencies: ['transactions']+ dependencies: ['transactions'],};- }+ },});return data;@@ -182,13 +182,13 @@ describe('query helpers', () => {}await wait(500);return { data: requestId, dependencies: ['transactions'] };- }+ },});tracer.start();let query = q('transactions').select('*');let lq = doQuery(query, data => tracer.event('data', data), {- onlySync: true+ onlySync: true,});// Users should never call `run` manually but we'll do it to@@ -279,7 +279,7 @@ describe('query helpers', () => {let query = q('transactions').select('id');let paged = pagedQuery(query, data => tracer.event('data', data), {- onPageData: data => tracer.event('page-data', data)+ onPageData: data => tracer.event('page-data', data),});await tracer.expect('server-query', [{ result: { $count: '*' } }]);@@ -339,7 +339,7 @@ describe('query helpers', () => {let query = q('transactions').select('id');pagedQuery(query, data => tracer.event('data', data), {- pageCount: 10+ pageCount: 10,});await tracer.expect('server-query', [{ result: { $count: '*' } }]);@@ -380,7 +380,7 @@ describe('query helpers', () => {let query = q('transactions').select('id');let paged = pagedQuery(query, data => tracer.event('data', data), {pageCount: 20,- onPageData: data => tracer.event('page-data', data)+ onPageData: data => tracer.event('page-data', data),});await tracer.expect('server-query', [{ result: { $count: '*' } }]);@@ -415,7 +415,7 @@ describe('query helpers', () => {let query = q('transactions').select('id');let paged = pagedQuery(query, data => tracer.event('data', data), {pageCount: 20,- onPageData: data => tracer.event('page-data', data)+ onPageData: data => tracer.event('page-data', data),});await paged.fetchNext();@@ -458,7 +458,7 @@ describe('query helpers', () => {let query = q('transactions').select(['id', 'date']);let paged = pagedQuery(query, data => tracer.event('data', data), {pageCount: 20,- onPageData: data => tracer.event('page-data', data)+ onPageData: data => tracer.event('page-data', data),});await paged.run();@@ -470,29 +470,29 @@ describe('query helpers', () => {await tracer.expect('server-query',expect.objectContaining({- selectExpressions: [{ result: { $count: '*' } }]- })+ selectExpressions: [{ result: { $count: '*' } }],+ }),);await tracer.expect('server-query',- expect.objectContaining({ filterExpressions: [{ id: 300 }] })+ expect.objectContaining({ filterExpressions: [{ id: 300 }] }),);await tracer.expect('server-query',expect.objectContaining({- filterExpressions: [{ date: { $gte: item.date } }]- })+ filterExpressions: [{ date: { $gte: item.date } }],+ }),);await tracer.expect('server-query',expect.objectContaining({filterExpressions: [{ date: { $lt: item.date } }],- limit: 20- })+ limit: 20,+ }),);await tracer.expect('data',- data.slice(0, data.findIndex(row => row.date < item.date) + 20)+ data.slice(0, data.findIndex(row => row.date < item.date) + 20),);await wait(1000);diff --git a/packages/loot-core/src/client/query-hooks.js b/packages/loot-core/src/client/query-hooks.jsindex 4cedb29ca4..cee470c07b 100644--- a/packages/loot-core/src/client/query-hooks.js+++ b/packages/loot-core/src/client/query-hooks.js@@ -13,7 +13,7 @@ function makeContext(queryState, opts, QueryClass) {useEffect(() => {if (query.getNumListeners() !== 0) {throw new Error(- 'Query already has listeners. You cannot use the same query context `Provider` twice'+ 'Query already has listeners. You cannot use the same query context `Provider` twice',);}@@ -44,7 +44,7 @@ function makeContext(queryState, opts, QueryClass) {let queryData = useContext(Context);if (queryData == null) {throw new Error(- "`useQuery` tried to access a query that hasn't been run. You need to put its `Provider` in a parent component"+ "`useQuery` tried to access a query that hasn't been run. You need to put its `Provider` in a parent component",);}return queryData;@@ -52,7 +52,7 @@ function makeContext(queryState, opts, QueryClass) {return {Provider,- useQuery+ useQuery,};}@@ -80,7 +80,7 @@ export function queryContext(queryState, opts) {return {Provider,- useQuery+ useQuery,};}@@ -103,7 +103,7 @@ export function useLiveQuery(query, opts) {setData(data);}},- opts+ opts,);return () => {diff --git a/packages/loot-core/src/client/reducers/account.js b/packages/loot-core/src/client/reducers/account.jsindex db0d0398cf..3c42c00cef 100644--- a/packages/loot-core/src/client/reducers/account.js+++ b/packages/loot-core/src/client/reducers/account.js@@ -3,7 +3,7 @@ import constants from '../constants';const initialState = {banks: [],failedAccounts: new Map(),- accountsSyncing: null+ accountsSyncing: null,};export default function update(state = initialState, action) {@@ -11,19 +11,19 @@ export default function update(state = initialState, action) {case constants.LOAD_BANKS:return {...state,- banks: action.banks+ banks: action.banks,};case constants.SET_ACCOUNTS_SYNCING:return {...state,- accountsSyncing: action.name+ accountsSyncing: action.name,};case constants.ACCOUNT_SYNC_STATUS: {let failedAccounts = new Map(state.failedAccounts);if (action.failed) {failedAccounts.set(action.id, {type: action.errorType,- code: action.errorCode+ code: action.errorCode,});} else {failedAccounts.delete(action.id);@@ -36,7 +36,7 @@ export default function update(state = initialState, action) {action.syncErrors.forEach(error => {failures.set(error.id, {type: error.type,- code: error.code+ code: error.code,});});diff --git a/packages/loot-core/src/client/reducers/app.js b/packages/loot-core/src/client/reducers/app.jsindex 3c5e31b94f..558bc5cbe6 100644--- a/packages/loot-core/src/client/reducers/app.js+++ b/packages/loot-core/src/client/reducers/app.js@@ -6,7 +6,7 @@ export const initialState = {showUpdateNotification: true,managerHasInitialized: false,lastUndoState: { current: null },- lastSplitState: { current: null }+ lastSplitState: { current: null },};export default function update(state = initialState, action) {@@ -14,7 +14,7 @@ export default function update(state = initialState, action) {case constants.SET_APP_STATE:return {...state,- ...action.state+ ...action.state,};case constants.SET_LAST_UNDO_STATE:// Intentionally mutate it. Components should never rerenderdiff --git a/packages/loot-core/src/client/reducers/budgets.js b/packages/loot-core/src/client/reducers/budgets.jsindex 3576b3b416..6359a8f447 100644--- a/packages/loot-core/src/client/reducers/budgets.js+++ b/packages/loot-core/src/client/reducers/budgets.js@@ -46,7 +46,7 @@ export function reconcileFiles(localFiles, remoteFiles) {deleted: remote.deleted,encryptKeyId: remote.encryptKeyId,hasKey: remote.hasKey,- state: 'synced'+ state: 'synced',};} else {return {@@ -55,7 +55,7 @@ export function reconcileFiles(localFiles, remoteFiles) {deleted: remote.deleted,encryptKeyId: remote.encryptKeyId,hasKey: remote.hasKey,- state: 'detached'+ state: 'detached',};}} else {@@ -79,11 +79,11 @@ export function reconcileFiles(localFiles, remoteFiles) {deleted: f.deleted,encryptKeyId: f.encryptKeyId,hasKey: f.hasKey,- state: 'remote'+ state: 'remote',};- })+ }),)- .filter(f => !f.deleted)+ .filter(f => !f.deleted),);// One last pass to list all the broken (unauthorized) files at the@@ -97,7 +97,7 @@ const initialState = {budgets: [],availableImports: [],remoteFiles: null,- allFiles: null+ allFiles: null,};export default function update(state = initialState, action) {@@ -106,25 +106,25 @@ export default function update(state = initialState, action) {return {...state,budgets: action.budgets,- allFiles: reconcileFiles(action.budgets, state.remoteFiles)+ allFiles: reconcileFiles(action.budgets, state.remoteFiles),};case constants.SET_REMOTE_FILES:return {...state,remoteFiles: action.files,- allFiles: reconcileFiles(state.budgets, action.files)+ allFiles: reconcileFiles(state.budgets, action.files),};case constants.SET_ALL_FILES:return {...state,budgets: action.budgetes,remoteFiles: action.remoteFiles,- allFiles: reconcileFiles(action.budgets, action.remoteFiles)+ allFiles: reconcileFiles(action.budgets, action.remoteFiles),};case constants.SET_AVAILABLE_IMPORTS:return {...state,- availableImports: action.imports+ availableImports: action.imports,};case constants.SIGN_OUT:// If the user logs out, make sure to reset all the filesdiff --git a/packages/loot-core/src/client/reducers/debug.js b/packages/loot-core/src/client/reducers/debug.jsindex 38a47424bf..be86400e57 100644--- a/packages/loot-core/src/client/reducers/debug.js+++ b/packages/loot-core/src/client/reducers/debug.js@@ -1,7 +1,7 @@import constants from '../constants';const initialState = {- selectedCell: null+ selectedCell: null,};function update(state = initialState, action) {@@ -11,7 +11,7 @@ function update(state = initialState, action) {...state,selectedCell: action.sheet? { sheet: action.sheet, name: action.name }- : null+ : null,};default:}diff --git a/packages/loot-core/src/client/reducers/index.js b/packages/loot-core/src/client/reducers/index.jsindex bd61c354bd..0a90b63619 100644--- a/packages/loot-core/src/client/reducers/index.js+++ b/packages/loot-core/src/client/reducers/index.js@@ -21,5 +21,5 @@ export default {notifications,budgets,tutorial,- user+ user,};diff --git a/packages/loot-core/src/client/reducers/modals.js b/packages/loot-core/src/client/reducers/modals.jsindex ecf4b67025..85beb36f46 100644--- a/packages/loot-core/src/client/reducers/modals.js+++ b/packages/loot-core/src/client/reducers/modals.js@@ -2,7 +2,7 @@ import constants from '../constants';const initialState = {modalStack: [],- isHidden: false+ isHidden: false,};function update(state = initialState, action) {@@ -12,13 +12,13 @@ function update(state = initialState, action) {...state,modalStack: [...state.modalStack,- { name: action.name, options: action.options }- ]+ { name: action.name, options: action.options },+ ],};case constants.REPLACE_MODAL:return {...state,- modalStack: [{ name: action.name, options: action.options }]+ modalStack: [{ name: action.name, options: action.options }],};case constants.POP_MODAL:return { ...state, modalStack: state.modalStack.slice(0, -1) };@@ -32,7 +32,7 @@ function update(state = initialState, action) {if ('loadingText' in action.state) {return {...state,- isHidden: action.state.loadingText != null+ isHidden: action.state.loadingText != null,};}break;diff --git a/packages/loot-core/src/client/reducers/notifications.js b/packages/loot-core/src/client/reducers/notifications.jsindex 6d44d773f3..ef94ff2b2d 100644--- a/packages/loot-core/src/client/reducers/notifications.js+++ b/packages/loot-core/src/client/reducers/notifications.js@@ -1,7 +1,7 @@import constants from '../constants';const initialState = {- notifications: []+ notifications: [],};export default function update(state = initialState, action) {@@ -13,12 +13,12 @@ export default function update(state = initialState, action) {return {...state,- notifications: [...state.notifications, action.notification]+ notifications: [...state.notifications, action.notification],};case constants.REMOVE_NOTIFICATION:return {...state,- notifications: state.notifications.filter(n => n.id !== action.id)+ notifications: state.notifications.filter(n => n.id !== action.id),};default:}diff --git a/packages/loot-core/src/client/reducers/prefs.js b/packages/loot-core/src/client/reducers/prefs.jsindex 80c8048e3d..f15fcc1b69 100644--- a/packages/loot-core/src/client/reducers/prefs.js+++ b/packages/loot-core/src/client/reducers/prefs.js@@ -3,7 +3,7 @@ import constants from '../constants';const initialState = {local: null,- global: null+ global: null,};export default function update(state = initialState, action) {@@ -20,12 +20,12 @@ export default function update(state = initialState, action) {return {...state,- local: { ...state.local, ...action.prefs }+ local: { ...state.local, ...action.prefs },};case constants.MERGE_GLOBAL_PREFS:return {...state,- global: { ...state.global, ...action.globalPrefs }+ global: { ...state.global, ...action.globalPrefs },};default:diff --git a/packages/loot-core/src/client/reducers/profile.js b/packages/loot-core/src/client/reducers/profile.jsindex a88fe8393a..cb4a8a52f2 100644--- a/packages/loot-core/src/client/reducers/profile.js+++ b/packages/loot-core/src/client/reducers/profile.js@@ -7,7 +7,7 @@ export default function update(state = initialState, action) {case constants.SET_PROFILE:return {...state,- ...action.profile+ ...action.profile,};default:}diff --git a/packages/loot-core/src/client/reducers/queries.js b/packages/loot-core/src/client/reducers/queries.jsindex bcb6fa2ccf..8a10c36a30 100644--- a/packages/loot-core/src/client/reducers/queries.js+++ b/packages/loot-core/src/client/reducers/queries.js@@ -11,10 +11,10 @@ const initialState = {accounts: [],categories: {grouped: [],- list: []+ list: [],},payees: [],- earliestTransaction: null+ earliestTransaction: null,};export default function update(state = initialState, action) {@@ -24,34 +24,34 @@ export default function update(state = initialState, action) {...state,newTransactions: action.newTransactions || [],matchedTransactions: action.matchedTransactions || [],- updatedAccounts: action.updatedAccounts || []+ updatedAccounts: action.updatedAccounts || [],};case constants.UPDATE_NEW_TRANSACTIONS:return {...state,newTransactions: state.newTransactions.filter(- id => id !== action.changedId+ id => id !== action.changedId,),matchedTransactions: state.matchedTransactions.filter(- id => id !== action.changedId- )+ id => id !== action.changedId,+ ),};case constants.SET_LAST_TRANSACTION:return {...state,- lastTransaction: action.transaction+ lastTransaction: action.transaction,};case constants.MARK_ACCOUNT_READ:return {...state,updatedAccounts: state.updatedAccounts.filter(- id => id !== action.accountId- )+ id => id !== action.accountId,+ ),};case constants.LOAD_ACCOUNTS:return {...state,- accounts: action.accounts+ accounts: action.accounts,};case constants.UPDATE_ACCOUNT: {return {@@ -61,18 +61,18 @@ export default function update(state = initialState, action) {return { ...account, ...action.account };}return account;- })+ }),};}case constants.LOAD_CATEGORIES:return {...state,- categories: action.categories+ categories: action.categories,};case constants.LOAD_PAYEES:return {...state,- payees: action.payees+ payees: action.payees,};case constants.ADD_CATEGORY: {let category = { id: 'temp', name: action.name };@@ -86,8 +86,8 @@ export default function update(state = initialState, action) {}return group;}),- list: [category, ...state.categories.list]- }+ list: [category, ...state.categories.list],+ },};}case constants.DELETE_CATEGORY: {@@ -97,11 +97,11 @@ export default function update(state = initialState, action) {grouped: state.categories.grouped.map(group => {return {...group,- categories: group.categories.filter(cat => cat.id !== action.id)+ categories: group.categories.filter(cat => cat.id !== action.id),};}),- list: state.categories.list.filter(cat => cat.id !== action.id)- }+ list: state.categories.list.filter(cat => cat.id !== action.id),+ },};}diff --git a/packages/loot-core/src/client/reducers/tutorial.js b/packages/loot-core/src/client/reducers/tutorial.jsindex 11a94bd8e2..70abf855c2 100644--- a/packages/loot-core/src/client/reducers/tutorial.js+++ b/packages/loot-core/src/client/reducers/tutorial.js@@ -2,7 +2,7 @@ import constants from '../constants';const initialState = {stage: null,- fromYNAB: false+ fromYNAB: false,};export default function update(state = initialState, action) {@@ -12,7 +12,7 @@ export default function update(state = initialState, action) {...state,deactivated: false,stage: action.stage,- fromYNAB: 'fromYNAB' in action ? action.fromYNAB : state.fromYNAB+ fromYNAB: 'fromYNAB' in action ? action.fromYNAB : state.fromYNAB,};case constants.DEACTIVATE_TUTORIAL:return { ...state, stage: null };diff --git a/packages/loot-core/src/client/reducers/user.js b/packages/loot-core/src/client/reducers/user.jsindex 6071d92cfc..0d13621631 100644--- a/packages/loot-core/src/client/reducers/user.js+++ b/packages/loot-core/src/client/reducers/user.js@@ -1,7 +1,7 @@import constants from '../constants';const initialState = {- data: null+ data: null,};export default function update(state = initialState, action) {diff --git a/packages/loot-core/src/client/shared-listeners.js b/packages/loot-core/src/client/shared-listeners.jsindex 343a247d03..766189bb7d 100644--- a/packages/loot-core/src/client/shared-listeners.js+++ b/packages/loot-core/src/client/shared-listeners.js@@ -19,7 +19,7 @@ export function listenForSyncEvent(actions, store) {actions.addNotification({title: 'Syncing has been fixed!',message: 'Happy budgeting!',- type: 'message'+ type: 'message',});}@@ -61,8 +61,8 @@ export function listenForSyncEvent(actions, store) {id: 'reset-sync',button: {title: 'Reset sync',- action: actions.resetSync- }+ action: actions.resetSync,+ },};} else {// A bug happened during the sync process. Sync state needs@@ -82,8 +82,8 @@ export function listenForSyncEvent(actions, store) {attemptedSyncRepair = true;await send('sync-repair');actions.sync();- }- }+ },+ },};}break;@@ -101,14 +101,14 @@ export function listenForSyncEvent(actions, store) {'\n\nOld encryption keys are not migrated. If using ' +'encryption, [reset encryption here](#makeKey).',messageActions: {- makeKey: () => actions.pushModal('create-encryption-key')+ makeKey: () => actions.pushModal('create-encryption-key'),},sticky: true,id: 'old-file',button: {title: 'Reset sync',- action: actions.resetSync- }+ action: actions.resetSync,+ },};break;@@ -125,8 +125,8 @@ export function listenForSyncEvent(actions, store) {id: 'invalid-key-state',button: {title: 'Reset key',- action: () => actions.pushModal('create-encryption-key')- }+ action: () => actions.pushModal('create-encryption-key'),+ },};break;@@ -148,8 +148,8 @@ export function listenForSyncEvent(actions, store) {await actions.uploadBudget();actions.sync();actions.loadPrefs();- }- }+ },+ },};break;@@ -162,7 +162,7 @@ export function listenForSyncEvent(actions, store) {learnMore,sticky: true,id: 'upload-file',- button: { title: 'Upload', action: actions.resetSync }+ button: { title: 'Upload', action: actions.resetSync },};break;@@ -186,8 +186,8 @@ export function listenForSyncEvent(actions, store) {id: 'needs-revert',button: {title: 'Revert',- action: () => actions.closeAndDownloadBudget(cloudFileId)- }+ action: () => actions.closeAndDownloadBudget(cloudFileId),+ },};break;case 'encrypt-failure':@@ -204,9 +204,9 @@ export function listenForSyncEvent(actions, store) {title: 'Create key',action: () =>actions.pushModal('fix-encryption-key', {- onSuccess: () => actions.sync()- })- }+ onSuccess: () => actions.sync(),+ }),+ },};} else {notif = {@@ -220,9 +220,9 @@ export function listenForSyncEvent(actions, store) {title: 'Reset key',action: () =>actions.pushModal('create-encryption-key', {- onSuccess: () => actions.sync()- })- }+ onSuccess: () => actions.sync(),+ }),+ },};}break;@@ -232,12 +232,12 @@ export function listenForSyncEvent(actions, store) {message:"We couldn't apply changes from the server. This probably means you " +'need to update the app to support the latest database.',- type: 'warning'+ type: 'warning',};break;case 'apply-failure':notif = {- message: `We couldn't apply that change to the database. Please report this as a bug by [opening a Github issue](${githubIssueLink}).`+ message: `We couldn't apply that change to the database. Please report this as a bug by [opening a Github issue](${githubIssueLink}).`,};break;case 'beta-version':@@ -246,7 +246,7 @@ export function listenForSyncEvent(actions, store) {break;default:notif = {- message: `We had problems syncing your changes. Please report this as a bug by [opening a Github issue](${githubIssueLink}).`+ message: `We had problems syncing your changes. Please report this as a bug by [opening a Github issue](${githubIssueLink}).`,};}diff --git a/packages/loot-core/src/client/tutorial.js b/packages/loot-core/src/client/tutorial.jsindex 602036fed1..96c513a816 100644--- a/packages/loot-core/src/client/tutorial.js+++ b/packages/loot-core/src/client/tutorial.js@@ -1,5 +1,5 @@export const stages = {- BUDGET: 'budget'+ BUDGET: 'budget',};export const order = [stages.BUDGET];diff --git a/packages/loot-core/src/client/upgrade-notifications.js b/packages/loot-core/src/client/upgrade-notifications.jsindex f87601fb9b..989b171f26 100644--- a/packages/loot-core/src/client/upgrade-notifications.js+++ b/packages/loot-core/src/client/upgrade-notifications.js@@ -6,7 +6,7 @@ export default function checkForUpgradeNotifications(addNotification,resetSync,// Note: history is only available on desktop- history+ history,) {// TODO: Probably should only show one of these at at time?send('get-upgrade-notifications').then(types => {@@ -40,11 +40,11 @@ export default function checkForUpgradeNotifications(// eslint-disable-next-linelocationPtr: __history.location});- }+ },},onClose: () => {send('seen-upgrade-notification', { type: 'schedules' });- }+ },});break;}@@ -62,12 +62,12 @@ export default function checkForUpgradeNotifications(title: 'Repair splits...',action: () =>history.push('/tools/fix-splits', {- locationPtr: history.location- })+ locationPtr: history.location,+ }),},onClose: () => {send('seen-upgrade-notification', { type: 'repair-splits' });- }+ },});}break;diff --git a/packages/loot-core/src/mocks/arbitrary-schema.js b/packages/loot-core/src/mocks/arbitrary-schema.jsindex 2fee695829..13fcd11f8f 100644--- a/packages/loot-core/src/mocks/arbitrary-schema.js+++ b/packages/loot-core/src/mocks/arbitrary-schema.js@@ -60,7 +60,7 @@ function flattenSortTransactions(arr) {...fields,is_parent: true,is_child: false,- parent_id: null+ parent_id: null,});subtransactions.forEach(subtrans => {list.push({@@ -69,7 +69,7 @@ function flattenSortTransactions(arr) {is_child: true,parent_id: trans.id,date: trans.date,- account: trans.account+ account: trans.account,});});} else {@@ -77,7 +77,7 @@ function flattenSortTransactions(arr) {...fields,is_parent: false,is_child: false,- parent_id: null+ parent_id: null,});}return list;@@ -99,19 +99,19 @@ function tableArbitrary(tableSchema, extraArbs, requiredKeys = []) {...Object.fromEntries(Object.entries(tableSchema).map(([name, field]) => {return [name, typeArbitrary(field, name)];- })+ }),),// Override the amount to make it a smaller integeramount: fc.integer({ min: -1000000, max: 1000000 }),- ...extraArbs+ ...extraArbs,},{requiredKeys: ['id',...requiredKeys,- ...Object.keys(tableSchema).filter(name => tableSchema[name].required)- ]- }+ ...Object.keys(tableSchema).filter(name => tableSchema[name].required),+ ],+ },);return arb;@@ -130,10 +130,10 @@ function makeTransaction({ splitFreq = 1, payeeIds } = {}) {...payeeField,subtransactions: fc.frequency({ arbitrary: fc.constant([]), weight: 1 },- { arbitrary: fc.array(subtrans), weight: splitFreq }- )+ { arbitrary: fc.array(subtrans), weight: splitFreq },+ ),},- ['subtransactions']+ ['subtransactions'],);}@@ -150,5 +150,5 @@ export default {payee: tableArbitrary(schema.payees),account: tableArbitrary(schema.accounts),category: tableArbitrary(schema.categories),- category_group: tableArbitrary(schema.category_groups)+ category_group: tableArbitrary(schema.category_groups),};diff --git a/packages/loot-core/src/mocks/budget.js b/packages/loot-core/src/mocks/budget.jsindex b1d9633a6e..bc387d940b 100644--- a/packages/loot-core/src/mocks/budget.js+++ b/packages/loot-core/src/mocks/budget.js@@ -39,7 +39,7 @@ function getStartingBalanceCat(categories) {function extractCommonThings(payees, groups) {let incomePayee = payees.find(p => p.name === 'Deposit');let expensePayees = payees.filter(- p => p.name !== 'Deposit' && p.name !== 'Starting Balance'+ p => p.name !== 'Deposit' && p.name !== 'Starting Balance',);let expenseGroup = groups.find(g => g.is_income === 0);let incomeGroup = groups.find(g => g.is_income === 1);@@ -52,8 +52,8 @@ function extractCommonThings(payees, groups) {'Clothing','General','Gift',- 'Medical'- ].indexOf(c.name) !== -1+ 'Medical',+ ].indexOf(c.name) !== -1,);return {@@ -62,7 +62,7 @@ function extractCommonThings(payees, groups) {incomeGroup,expenseCategories: categories,billCategories: groups.find(g => g.name === 'Bills').categories,- billPayees: expensePayees.filter(p => p.bill)+ billPayees: expensePayees.filter(p => p.bill),};}@@ -73,7 +73,7 @@ async function fillPrimaryChecking(handlers, account, payees, groups) {incomeGroup,expenseCategories,billCategories,- billPayees+ billPayees,} = extractCommonThings(payees, groups);let numTransactions = integer(100, 200);@@ -105,7 +105,7 @@ async function fillPrimaryChecking(handlers, account, payees, groups) {payee: payee.id,account: account.id,date: monthUtils.subDays(monthUtils.currentDay(), Math.floor(i / 3)),- category: category.id+ category: category.id,};transactions.push(transaction);@@ -120,18 +120,18 @@ async function fillPrimaryChecking(handlers, account, payees, groups) {{ amount: a, category: pick() },{amount: transaction.amount - a * 2,- category: pick()- }+ category: pick(),+ },];}}let earliestMonth = monthUtils.monthFromDate(- transactions[transactions.length - 1].date+ transactions[transactions.length - 1].date,);let months = monthUtils.rangeInclusive(earliestMonth,- monthUtils.currentMonth()+ monthUtils.currentMonth(),);let currentDay = monthUtils.currentDay();for (let month of months) {@@ -142,7 +142,7 @@ async function fillPrimaryChecking(handlers, account, payees, groups) {payee: billPayees.find(p => p.name.toLowerCase().includes('power')).id,account: account.id,date,- category: billCategories.find(c => c.name === 'Power').id+ category: billCategories.find(c => c.name === 'Power').id,});}@@ -153,7 +153,7 @@ async function fillPrimaryChecking(handlers, account, payees, groups) {payee: billPayees.find(p => p.name.toLowerCase().includes('water')).id,account: account.id,date,- category: billCategories.find(c => c.name === 'Water').id+ category: billCategories.find(c => c.name === 'Water').id,});}@@ -164,7 +164,7 @@ async function fillPrimaryChecking(handlers, account, payees, groups) {payee: billPayees.find(p => p.name.toLowerCase().includes('housy')).id,account: account.id,date,- category: billCategories.find(c => c.name === 'Mortgage').id+ category: billCategories.find(c => c.name === 'Mortgage').id,});}@@ -176,7 +176,7 @@ async function fillPrimaryChecking(handlers, account, payees, groups) {.id,account: account.id,date,- category: billCategories.find(c => c.name === 'Internet').id+ category: billCategories.find(c => c.name === 'Internet').id,});}@@ -188,7 +188,7 @@ async function fillPrimaryChecking(handlers, account, payees, groups) {.id,account: account.id,date,- category: billCategories.find(c => c.name === 'Cell').id+ category: billCategories.find(c => c.name === 'Cell').id,});}}@@ -206,7 +206,7 @@ async function fillPrimaryChecking(handlers, account, payees, groups) {account: account.id,date: earliestDate,category: getStartingBalanceCat(incomeGroup.categories),- starting_balance_flag: true+ starting_balance_flag: true,});return addTransactions(account.id, transactions);@@ -241,7 +241,7 @@ async function fillChecking(handlers, account, payees, groups) {payee: payee.id,account: account.id,date: monthUtils.subDays(monthUtils.currentDay(), i * 2),- category: category.id+ category: category.id,});}@@ -251,12 +251,12 @@ async function fillChecking(handlers, account, payees, groups) {account: account.id,date: transactions[transactions.length - 1].date,category: getStartingBalanceCat(incomeGroup.categories),- starting_balance_flag: true+ starting_balance_flag: true,});await handlers['transactions-batch-update']({added: transactions,- fastMode: true+ fastMode: true,});}@@ -277,7 +277,7 @@ async function fillInvestment(handlers, account, payees, groups) {payee: payee.id,account: account.id,date: monthUtils.subDays(monthUtils.currentDay(), integer(10, 360)),- category: category.id+ category: category.id,});}@@ -287,12 +287,12 @@ async function fillInvestment(handlers, account, payees, groups) {account: account.id,date: findMin(transactions, 'date').date,category: getStartingBalanceCat(incomeGroup.categories),- starting_balance_flag: true+ starting_balance_flag: true,});await handlers['transactions-batch-update']({added: transactions,- fastMode: true+ fastMode: true,});}@@ -322,7 +322,7 @@ async function fillSavings(handlers, account, payees, groups) {payee: payee.id,account: account.id,date: monthUtils.subDays(monthUtils.currentDay(), i * 5),- category: category.id+ category: category.id,});}@@ -332,12 +332,12 @@ async function fillSavings(handlers, account, payees, groups) {account: account.id,date: transactions[transactions.length - 1].date,category: getStartingBalanceCat(incomeGroup.categories),- starting_balance_flag: true+ starting_balance_flag: true,});await handlers['transactions-batch-update']({added: transactions,- fastMode: true+ fastMode: true,});}@@ -356,8 +356,8 @@ async function fillMortgage(handlers, account, payees, groups) {date:monthUtils.subMonths(monthUtils.currentDay(), numTransactions) + '-02',category: getStartingBalanceCat(incomeGroup.categories),- starting_balance_flag: true- }+ starting_balance_flag: true,+ },];for (let i = 0; i < numTransactions; i++) {let payee = incomePayee;@@ -368,13 +368,13 @@ async function fillMortgage(handlers, account, payees, groups) {account: account.id,date: monthUtils.subMonths(monthUtils.currentDay(), i) + '-02',category: category.id,- starting_balance_flag: true+ starting_balance_flag: true,});}await handlers['transactions-batch-update']({added: transactions,- fastMode: true+ fastMode: true,});}@@ -392,8 +392,8 @@ async function fillOther(handlers, account, payees, groups) {date:monthUtils.subMonths(monthUtils.currentDay(), numTransactions) + '-02',category: getStartingBalanceCat(incomeGroup.categories),- starting_balance_flag: true- }+ starting_balance_flag: true,+ },];for (let i = 0; i < numTransactions; i++) {let payee = incomePayee;@@ -404,13 +404,13 @@ async function fillOther(handlers, account, payees, groups) {payee: payee.id,account: account.id,date: monthUtils.subMonths(monthUtils.currentDay(), i) + '-02',- category: category.id+ category: category.id,});}await handlers['transactions-batch-update']({added: transactions,- fastMode: true+ fastMode: true,});}@@ -419,14 +419,14 @@ async function createBudget(accounts, payees, groups) {let earliestDate = (await db.first(`SELECT * FROM v_transactions t LEFT JOIN accounts a ON t.account = a.id- WHERE a.offbudget = 0 AND t.is_child = 0 ORDER BY date ASC LIMIT 1`+ WHERE a.offbudget = 0 AND t.is_child = 0 ORDER BY date ASC LIMIT 1`,)).date;let earliestPrimaryDate = (await db.first(`SELECT * FROM v_transactions t LEFT JOIN accounts a ON t.account = a.idWHERE a.id = ? AND a.offbudget = 0 AND t.is_child = 0 ORDER BY date ASC LIMIT 1`,- [primaryAccount.id]+ [primaryAccount.id],)).date;@@ -450,7 +450,7 @@ async function createBudget(accounts, payees, groups) {function setBudgetIfSpent(month, cat) {let spent = sheet.getCellValue(monthUtils.sheetForMonth(month),- `sum-amount-${cat.id}`+ `sum-amount-${cat.id}`,);if (spent < 0) {@@ -494,7 +494,7 @@ async function createBudget(accounts, payees, groups) {setBudgetIfSpent(month, category('Power'));}}- })+ }),);await sheet.waitOnSpreadsheet();@@ -522,7 +522,7 @@ async function createBudget(accounts, payees, groups) {}}}- })+ }),);await sheet.waitOnSpreadsheet();@@ -534,8 +534,8 @@ async function createBudget(accounts, payees, groups) {{amount: -toBudget,category: category('Income').id,- date: monthUtils.currentMonth() + '-01'- }+ date: monthUtils.currentMonth() + '-01',+ },]);}@@ -565,14 +565,14 @@ export async function createTestBudget(handlers) {{ name: 'Vanguard 401k', type: 'investment', offBudget: 1 },{ name: 'Mortgage', type: 'mortgage', offBudget: 1 },{ name: 'House Asset', type: 'other', offBudget: 1 },- { name: 'Roth IRA', type: 'investment', offBudget: 1 }+ { name: 'Roth IRA', type: 'investment', offBudget: 1 },];await runMutator(() =>batchMessages(async () => {for (let account of accounts) {account.id = await handlers['account-create'](account);}- })+ }),);let payees = [@@ -587,7 +587,7 @@ export async function createTestBudget(handlers) {{ name: 'Extra Watery', bill: true },{ name: 'Housy House', bill: true },{ name: 'Fast Internet', bill: true },- { name: 'T-mobile', bill: true }+ { name: 'T-mobile', bill: true },];await runMutator(() =>@@ -595,7 +595,7 @@ export async function createTestBudget(handlers) {for (let payee of payees) {payee.id = await handlers['payee-create']({ name: payee.name });}- })+ }),);let categoryGroups = [@@ -609,8 +609,8 @@ export async function createTestBudget(handlers) {{ name: 'Clothing' },{ name: 'Entertainment' },{ name: 'Restaurants' },- { name: 'Food' }- ]+ { name: 'Food' },+ ],},{name: 'Bills',@@ -619,8 +619,8 @@ export async function createTestBudget(handlers) {{ name: 'Water' },{ name: 'Mortgage' },{ name: 'Internet' },- { name: 'Cell' }- ]+ { name: 'Cell' },+ ],},{name: 'Income',@@ -628,23 +628,23 @@ export async function createTestBudget(handlers) {categories: [{ name: 'Income', is_income: true },{ name: 'Misc', is_income: true },- { name: 'Starting Balances', is_income: true }- ]- }+ { name: 'Starting Balances', is_income: true },+ ],+ },];await runMutator(async () => {for (let group of categoryGroups) {group.id = await handlers['category-group-create']({name: group.name,- isIncome: group.is_income ? 1 : 0+ isIncome: group.is_income ? 1 : 0,});for (let category of group.categories) {category.id = await handlers['category-create']({...category,isIncome: category.is_income ? 1 : 0,- groupId: group.id+ groupId: group.id,});}}@@ -684,7 +684,7 @@ export async function createTestBudget(handlers) {default:}}- })+ }),);setSyncingMode('import');@@ -698,7 +698,7 @@ export async function createTestBudget(handlers) {q('transactions').filter({ account: primaryAccount.id }).calculate({ $sum: '$amount' })- .serialize()+ .serialize(),);if (primaryBalance < 0) {let { data: results } = await aqlQuery(@@ -706,13 +706,13 @@ export async function createTestBudget(handlers) {.filter({ account: primaryAccount.id, amount: { $gt: 0 } }).limit(1).select(['id', 'amount'])- .serialize()+ .serialize(),);let lastDeposit = results[0];await runHandler(handlers['transaction-update'], {...lastDeposit,- amount: lastDeposit.amount + -primaryBalance + integer(10000, 20000)+ amount: lastDeposit.amount + -primaryBalance + integer(10000, 20000),});}diff --git a/packages/loot-core/src/mocks/index.js b/packages/loot-core/src/mocks/index.jsindex 9a0e56ae9b..5be16f256c 100644--- a/packages/loot-core/src/mocks/index.js+++ b/packages/loot-core/src/mocks/index.js@@ -12,7 +12,7 @@ export function generateAccount(name, isConnected, type, offbudget) {bankName: isConnected ? 'boa' : null,type: type || 'checking',offbudget: offbudget ? 1 : 0,- closed: 0+ closed: 0,};}@@ -23,7 +23,7 @@ export function generateCategory(name, group, isIncome = false) {name: name,cat_group: group,is_income: isIncome ? 1 : 0,- sort_order: sortOrder+++ sort_order: sortOrder++,};}@@ -33,7 +33,7 @@ export function generateCategoryGroup(name, isIncome = false) {id: uuid.v4Sync(),name: name,is_income: isIncome ? 1 : 0,- sort_order: groupSortOrder+++ sort_order: groupSortOrder++,};}@@ -44,8 +44,8 @@ export function generateCategoryGroups(definition) {return {...g,categories: group.categories.map(cat =>- generateCategory(cat.name, g.id, cat.is_income)- )+ generateCategory(cat.name, g.id, cat.is_income),+ ),};});}@@ -63,7 +63,7 @@ function _generateTransaction(data) {category: data.category,sort_order: data.sort_order != null ? data.sort_order : 1,cleared: false,- error: null+ error: null,};}@@ -85,7 +85,7 @@ export function generateTransaction(data, splitAmount, showError = false) {date: parent.date,notes: null,category: null,- isChild: true+ isChild: true,},{id: parent.id + '/' + uuid.v4Sync(),@@ -94,8 +94,8 @@ export function generateTransaction(data, splitAmount, showError = false) {date: parent.date,notes: null,category: null,- isChild: true- }+ isChild: true,+ },);if (showError) {@@ -104,7 +104,7 @@ export function generateTransaction(data, splitAmount, showError = false) {last.error = {type: 'SplitTransactionError',version: 1,- difference: 500+ difference: 500,};}}@@ -117,7 +117,7 @@ export function generateTransactions(accountId,groupId,splitAtIndexes = [],- showError = false+ showError = false,) {const transactions = [];@@ -131,11 +131,11 @@ export function generateTransactions(account: accountId,category: groupId,amount: isSplit ? 50 : undefined,- sort_order: i+ sort_order: i,},isSplit ? 30 : undefined,- showError- )+ showError,+ ),);}diff --git a/packages/loot-core/src/mocks/plaid.js b/packages/loot-core/src/mocks/plaid.jsindex d0720580c6..d582060bc1 100644--- a/packages/loot-core/src/mocks/plaid.js+++ b/packages/loot-core/src/mocks/plaid.js@@ -6,13 +6,13 @@ export function generateAccount(balance) {balances: {available: balance,current: balance,- limit: null+ limit: null,},mask: '0000',name: 'Plaid Checking',official_name: 'Plaid Interest Checking',subtype: 'checking',- type: 'depository'+ type: 'depository',};}@@ -21,7 +21,7 @@ export function generateTransaction(amount,name,date,- pending = false+ pending = false,) {return {account_id: acctId,@@ -37,7 +37,7 @@ export function generateTransaction(lon: null,state: null,store_number: null,- zip: null+ zip: null,},name,payment_meta: {@@ -48,11 +48,11 @@ export function generateTransaction(payment_processor: null,ppd_id: null,reason: null,- reference_number: null+ reference_number: null,},pending: pending,pending_transaction_id: null,transaction_id: uuid.v4Sync(),- transaction_type: 'special'+ transaction_type: 'special',};}diff --git a/packages/loot-core/src/mocks/setup.js b/packages/loot-core/src/mocks/setup.jsindex 20adeb4048..898ff7e0a6 100644--- a/packages/loot-core/src/mocks/setup.js+++ b/packages/loot-core/src/mocks/setup.js@@ -4,7 +4,7 @@ import * as rules from '../server/accounts/transaction-rules';import * as db from '../server/db';import {enableGlobalMutations,- disableGlobalMutations+ disableGlobalMutations,} from '../server/mutators';import { setServer } from '../server/server-config';import * as sheet from '../server/sheet';@@ -62,7 +62,7 @@ global.getDatabaseDump = async function (tables) {db.getDatabase(),"SELECT name FROM sqlite_master WHERE type='table'",[],- true+ true,);tables = rows.map(row => row.name);@@ -91,10 +91,10 @@ global.getDatabaseDump = async function (tables) {db.getDatabase(),'SELECT * FROM ' + table + ' ORDER BY ' + sortColumn,[],- true- )+ true,+ ),];- })+ }),);let grouped = {};@@ -117,7 +117,7 @@ global.emptyDatabase = function (avoidUpdate) {let memoryDB = new sqlite.openDatabase(path);sqlite.execQuery(memoryDB,- nativeFs.readFileSync(__dirname + '/../server/sql/init.sql', 'utf8')+ nativeFs.readFileSync(__dirname + '/../server/sql/init.sql', 'utf8'),);db.setDatabase(memoryDB);diff --git a/packages/loot-core/src/mocks/spreadsheet.js b/packages/loot-core/src/mocks/spreadsheet.jsindex 52d5e5103f..a83cc3f5f0 100644--- a/packages/loot-core/src/mocks/spreadsheet.js+++ b/packages/loot-core/src/mocks/spreadsheet.js@@ -13,7 +13,7 @@ function makeSpreadsheet() {cells[resolvedName] = {name: resolvedName,sheet: sheetName,- value: null+ value: null,};return cells[resolvedName];},@@ -37,7 +37,7 @@ function makeSpreadsheet() {// it's a noop.return () => {this.observers[resolvedName] = this.observers[resolvedName].filter(- x => x !== cb+ x => x !== cb,);};},@@ -95,7 +95,7 @@ function makeSpreadsheet() {batchChange(batch) {this.setCells(batch.updateCells);this.deleteCells(batch.deleteCells);- }+ },};}diff --git a/packages/loot-core/src/mocks/util.js b/packages/loot-core/src/mocks/util.jsindex 9508b0e3a9..32c2952b7f 100644--- a/packages/loot-core/src/mocks/util.js+++ b/packages/loot-core/src/mocks/util.js@@ -11,7 +11,7 @@ export function expectSnapshotWithDiffer(initialValue, { onlyUpdates } = {}) {expectToMatchDiff: value => {expect(snapshotDiff(currentValue, value)).toMatchSnapshot();currentValue = value;- }+ },};}@@ -19,7 +19,7 @@ export function getFixtures(filename) {join(dirname(filename),'__fixtures__',- basename(filename).replace(/\.[^.]+.js/, '.fixtures.js')+ basename(filename).replace(/\.[^.]+.js/, '.fixtures.js'),);}diff --git a/packages/loot-core/src/platform/client/fetch/index.browser.js b/packages/loot-core/src/platform/client/fetch/index.browser.jsindex 3dc657c657..6b39f14a88 100644--- a/packages/loot-core/src/platform/client/fetch/index.browser.js+++ b/packages/loot-core/src/platform/client/fetch/index.browser.js@@ -19,7 +19,7 @@ class ReconstructedError extends Error {},set: function (value) {this._stack = value;- }+ },});this.stack = stack;@@ -102,14 +102,14 @@ function connectWorker(worker, onOpen, onError) {msg.stack,msg.url,msg.line,- msg.column+ msg.column,)- : msg.exc+ : msg.exc,);if (msg.message && msg.message.includes('indexeddb-quota-error')) {alert(- 'We hit a limit on the local storage available. Edits may not be saved. Please get in touch https://actualbudget.github.io/docs/Contact/ so we can help debug this.'+ 'We hit a limit on the local storage available. Edits may not be saved. Please get in touch https://actualbudget.github.io/docs/Contact/ so we can help debug this.',);}} else if (msg.type === 'capture-breadcrumb') {@@ -130,7 +130,7 @@ function connectWorker(worker, onOpen, onError) {module.exports.init = async function init(worker) {return new Promise((resolve, reject) =>- connectWorker(worker, resolve, reject)+ connectWorker(worker, resolve, reject),);};@@ -144,7 +144,7 @@ module.exports.send = function send(name, args, { catchErrors = false } = {}) {name,args,undoTag: undo.snapshot(),- catchErrors+ catchErrors,});} else {messageQueue.push({@@ -152,7 +152,7 @@ module.exports.send = function send(name, args, { catchErrors = false } = {}) {name,args,undoTag: undo.snapshot(),- catchErrors+ catchErrors,});}});@@ -173,7 +173,7 @@ module.exports.listen = function listen(name, cb) {let arr = listeners.get(name);listeners.set(name,- arr.filter(cb_ => cb_ !== cb)+ arr.filter(cb_ => cb_ !== cb),);};};diff --git a/packages/loot-core/src/platform/client/fetch/index.testing.js b/packages/loot-core/src/platform/client/fetch/index.testing.jsindex 1667ad3dc2..42b287a8c1 100644--- a/packages/loot-core/src/platform/client/fetch/index.testing.js+++ b/packages/loot-core/src/platform/client/fetch/index.testing.js@@ -11,7 +11,7 @@ module.exports.initServer = handlers => {if (catchErrors) {return promise.then(data => ({ data }),- err => ({ error: { message: err.message } })+ err => ({ error: { message: err.message } }),);}return promise;@@ -39,7 +39,7 @@ module.exports.serverPush = (name, args) => {module.exports.send = async function (name,args,- { catchErrors = false } = {}+ { catchErrors = false } = {},) {if (serverHandler) {return serverHandler({ name, args, catchErrors });@@ -62,7 +62,7 @@ module.exports.listen = function listen(name, cb) {let arr = listeners.get(name);listeners.set(name,- arr.filter(cb_ => cb_ !== cb)+ arr.filter(cb_ => cb_ !== cb),);};};diff --git a/packages/loot-core/src/platform/client/fetch/index.web.js b/packages/loot-core/src/platform/client/fetch/index.web.jsindex 36e897176f..4790ae4715 100644--- a/packages/loot-core/src/platform/client/fetch/index.web.js+++ b/packages/loot-core/src/platform/client/fetch/index.web.js@@ -89,7 +89,7 @@ module.exports.send = function send(name, args, { catchErrors = false } = {}) {name,args,undoTag: undo.snapshot(),- catchErrors: !!catchErrors+ catchErrors: !!catchErrors,});} else {messageQueue.push({@@ -97,7 +97,7 @@ module.exports.send = function send(name, args, { catchErrors = false } = {}) {name,args,undoTag: undo.snapshot(),- catchErrors+ catchErrors,});}});@@ -119,7 +119,7 @@ module.exports.listen = function listen(name, cb) {if (arr) {listeners.set(name,- arr.filter(cb_ => cb_ !== cb)+ arr.filter(cb_ => cb_ !== cb),);}};diff --git a/packages/loot-core/src/platform/client/undo/index.web.js b/packages/loot-core/src/platform/client/undo/index.web.jsindex 01911ff540..580c1cecb8 100644--- a/packages/loot-core/src/platform/client/undo/index.web.js+++ b/packages/loot-core/src/platform/client/undo/index.web.js@@ -8,7 +8,7 @@ let UNDO_STATE_MRU = [];let currentUndoState = {url: null,openModal: null,- selectedItems: null+ selectedItems: null,};function setUndoState(name, value) {diff --git a/packages/loot-core/src/platform/server/asyncStorage/index.electron.js b/packages/loot-core/src/platform/server/asyncStorage/index.electron.jsindex bae6efced3..4062fc654d 100644--- a/packages/loot-core/src/platform/server/asyncStorage/index.electron.js+++ b/packages/loot-core/src/platform/server/asyncStorage/index.electron.js@@ -30,7 +30,7 @@ function _saveStore() {'utf8',function (err, _) {return err ? reject(err) : resolve();- }+ },);});}@@ -57,7 +57,7 @@ function multiGet(keys) {return resolve(keys.map(function (key) {return [key, store[key]];- })+ }),);});}@@ -83,5 +83,5 @@ module.exports = {removeItem,multiGet,multiSet,- multiRemove+ multiRemove,};diff --git a/packages/loot-core/src/platform/server/asyncStorage/index.testing.js b/packages/loot-core/src/platform/server/asyncStorage/index.testing.jsindex 05bbc421c9..ec1a75924c 100644--- a/packages/loot-core/src/platform/server/asyncStorage/index.testing.js+++ b/packages/loot-core/src/platform/server/asyncStorage/index.testing.js@@ -21,7 +21,7 @@ function multiGet(keys) {return resolve(keys.map(function (key) {return [key, store[key]];- })+ }),);});}@@ -45,5 +45,5 @@ module.exports = {removeItem,multiGet,multiSet,- multiRemove+ multiRemove,};diff --git a/packages/loot-core/src/platform/server/asyncStorage/index.web.js b/packages/loot-core/src/platform/server/asyncStorage/index.web.jsindex 71d5e6dcb6..c0b790a250 100644--- a/packages/loot-core/src/platform/server/asyncStorage/index.web.js+++ b/packages/loot-core/src/platform/server/asyncStorage/index.web.js@@ -67,7 +67,7 @@ async function multiGet(keys) {req.onerror = e => reject(e);req.onsuccess = e => resolve([key, e.target.result]);});- })+ }),);commit(transaction);@@ -87,7 +87,7 @@ async function multiSet(keyValues) {req.onerror = e => reject(e);req.onsuccess = e => resolve();});- })+ }),);commit(transaction);@@ -107,7 +107,7 @@ async function multiRemove(keys) {req.onerror = e => reject(e);req.onsuccess = e => resolve();});- })+ }),);commit(transaction);@@ -122,5 +122,5 @@ module.exports = {removeItem,multiGet,multiSet,- multiRemove+ multiRemove,};diff --git a/packages/loot-core/src/platform/server/connection/index.electron.js b/packages/loot-core/src/platform/server/connection/index.electron.jsindex f31ab61678..4683888fcc 100644--- a/packages/loot-core/src/platform/server/connection/index.electron.js+++ b/packages/loot-core/src/platform/server/connection/index.electron.js@@ -35,7 +35,7 @@ function init(socketName, handlers) {isMutating(handlers[name]) &&name !== 'undo' &&name !== 'redo',- undoTag+ undoTag,});},nativeError => {@@ -49,7 +49,7 @@ function init(socketName, handlers) {ipc.server.emit(socket, 'message', {type: 'reply',id,- result: { error, data: null }+ result: { error, data: null },});} else {ipc.server.emit(socket, 'message', { type: 'error', id });@@ -63,7 +63,7 @@ function init(socketName, handlers) {// Notify the frontend that something bad happendsend('server-error');}- }+ },);} else {console.warn('Unknown method: ' + name);@@ -72,7 +72,7 @@ function init(socketName, handlers) {type: 'reply',id,result: null,- error: { type: 'APIError', message: 'Unknown method: ' + name }+ error: { type: 'APIError', message: 'Unknown method: ' + name },});}});diff --git a/packages/loot-core/src/platform/server/connection/index.web.js b/packages/loot-core/src/platform/server/connection/index.web.jsindex 93bb7228d4..2bd1e317da 100644--- a/packages/loot-core/src/platform/server/connection/index.web.js+++ b/packages/loot-core/src/platform/server/connection/index.web.js@@ -52,7 +52,7 @@ function init(serverChannel, handlers) {id,result,mutated: isMutating(handlers[name]),- undoTag+ undoTag,});},nativeError => {@@ -66,7 +66,7 @@ function init(serverChannel, handlers) {serverChannel.postMessage({type: 'reply',id,- result: { error, data: null }+ result: { error, data: null },});} else {serverChannel.postMessage({ type: 'error', id });@@ -81,7 +81,7 @@ function init(serverChannel, handlers) {// Notify the frontend that something bad happendsend('server-error');}- }+ },);} else {console.warn('Unknown method: ' + name);@@ -89,11 +89,11 @@ function init(serverChannel, handlers) {type: 'reply',id,result: null,- error: { type: 'APIError', message: 'Unknown method: ' + name }+ error: { type: 'APIError', message: 'Unknown method: ' + name },});}},- false+ false,);serverChannel.postMessage({ type: 'connect' });@@ -104,7 +104,7 @@ function send(name, args) {getGlobalObject().__globalServerChannel.postMessage({type: 'push',name,- args+ args,});}}diff --git a/packages/loot-core/src/platform/server/fetch/index.web.js b/packages/loot-core/src/platform/server/fetch/index.web.jsindex 74639811ca..f5061330ec 100644--- a/packages/loot-core/src/platform/server/fetch/index.web.js+++ b/packages/loot-core/src/platform/server/fetch/index.web.js@@ -2,5 +2,5 @@ module.exports = {fetch: self.fetch,fetchBinary: () => {throw new Error('fetchBinary not implemented');- }+ },};diff --git a/packages/loot-core/src/platform/server/fs/index.electron.js b/packages/loot-core/src/platform/server/fs/index.electron.jsindex bd174d66f1..36641f96c6 100644--- a/packages/loot-core/src/platform/server/fs/index.electron.js+++ b/packages/loot-core/src/platform/server/fs/index.electron.js@@ -42,7 +42,7 @@ module.exports = {// never allowing slashes.if (id.match(/[^A-Za-z0-9\-_]/)) {throw new Error(- `Invalid budget id "${id}". Check the id of your budget in the "Advanced" section of the settings page.`+ `Invalid budget id "${id}". Check the id of your budget in the "Advanced" section of the settings page.`,);}@@ -163,5 +163,5 @@ module.exports = {}});});- }+ },};diff --git a/packages/loot-core/src/platform/server/fs/index.web.js b/packages/loot-core/src/platform/server/fs/index.web.jsindex ab20651515..d4b0068592 100644--- a/packages/loot-core/src/platform/server/fs/index.web.js+++ b/packages/loot-core/src/platform/server/fs/index.web.js@@ -85,7 +85,7 @@ async function _readFile(filepath, opts) {if (opts.encoding === 'utf8' && ArrayBuffer.isView(item.contents)) {return String.fromCharCode.apply(null,- new Uint16Array(item.contents.buffer)+ new Uint16Array(item.contents.buffer),);}@@ -188,7 +188,7 @@ async function populateDefaultFilesystem() {files.map(async file => {let contents = await fetchFile(process.env.PUBLIC_URL + 'data/' + file);_writeFile('/' + file, contents);- })+ }),);}@@ -313,7 +313,7 @@ async function removeDirRecursively(dirpath) {async function getModifiedTime(filepath) {throw new Error(- 'getModifiedTime not supported on the web (only used for backups)'+ 'getModifiedTime not supported on the web (only used for backups)',);}@@ -341,5 +341,5 @@ module.exports = {removeFile,removeDir,removeDirRecursively,- getModifiedTime+ getModifiedTime,};diff --git a/packages/loot-core/src/platform/server/fs/index.web.test.js b/packages/loot-core/src/platform/server/fs/index.web.test.jsindex c83f50f4de..14f67e6fd4 100644--- a/packages/loot-core/src/platform/server/fs/index.web.test.js+++ b/packages/loot-core/src/platform/server/fs/index.web.test.js@@ -47,11 +47,11 @@ describe('web filesystem', () => {// Make sure they are in idbexpect(await idb.get(store, '/documents/foo.txt')).toEqual({filepath: '/documents/foo.txt',- contents: 'hello'+ contents: 'hello',});expect(await idb.get(store, '/documents/foo.bin')).toEqual({filepath: '/documents/foo.bin',- contents: new Uint8Array(buf)+ contents: new Uint8Array(buf),});// Write a file outside of documents@@ -71,7 +71,7 @@ describe('web filesystem', () => {expect(await readFile('/documents/db.sqlite')).toBe('some junk');expect(await readFile('/blocked/' + pathToId('/documents/db.sqlite'))).toBe(- 'some junk'+ 'some junk',);});@@ -81,11 +81,11 @@ describe('web filesystem', () => {idb.set(store, { filepath: '/documents/ok.txt', contents: 'oh yeah' });idb.set(store, {filepath: '/documents/deep/nested/file/ok.txt',- contents: 'deeper'+ contents: 'deeper',});idb.set(store, {filepath: '/documents/deep/nested/db.sqlite',- contents: 'this will be blank and just create a symlink'+ contents: 'this will be blank and just create a symlink',});await sqlite.init();@@ -98,7 +98,7 @@ describe('web filesystem', () => {let FS = sqlite._getModule().FS;let { node } = FS.lookupPath('/documents/deep/nested/db.sqlite');expect(node.link).toBe(- '/blocked/' + pathToId('/documents/deep/nested/db.sqlite')+ '/blocked/' + pathToId('/documents/deep/nested/db.sqlite'),);});});diff --git a/packages/loot-core/src/platform/server/indexeddb/index.web.js b/packages/loot-core/src/platform/server/indexeddb/index.web.jsindex 7b809c1d9a..bb09f4ddc6 100644--- a/packages/loot-core/src/platform/server/indexeddb/index.web.js+++ b/packages/loot-core/src/platform/server/indexeddb/index.web.js@@ -153,5 +153,5 @@ module.exports = {getStore,get,set,- del+ del,};diff --git a/packages/loot-core/src/platform/server/log/index.api.js b/packages/loot-core/src/platform/server/log/index.api.jsindex 6adfe53620..9c4c7b023c 100644--- a/packages/loot-core/src/platform/server/log/index.api.js+++ b/packages/loot-core/src/platform/server/log/index.api.js@@ -4,5 +4,5 @@ export default {},warn: (...args) => {console.warn(...args);- }+ },};diff --git a/packages/loot-core/src/platform/server/log/index.web.js b/packages/loot-core/src/platform/server/log/index.web.jsindex 6adfe53620..9c4c7b023c 100644--- a/packages/loot-core/src/platform/server/log/index.web.js+++ b/packages/loot-core/src/platform/server/log/index.web.js@@ -4,5 +4,5 @@ export default {},warn: (...args) => {console.warn(...args);- }+ },};diff --git a/packages/loot-core/src/platform/server/sqlite/index.web.js b/packages/loot-core/src/platform/server/sqlite/index.web.jsindex eab3e1482b..a4586235eb 100644--- a/packages/loot-core/src/platform/server/sqlite/index.web.js+++ b/packages/loot-core/src/platform/server/sqlite/index.web.js@@ -8,7 +8,7 @@ export async function init() {// we're returning a real one for correct semanticsreturn new Promise((resolve, reject) => {initSqlJS({- locateFile: file => process.env.PUBLIC_URL + file+ locateFile: file => process.env.PUBLIC_URL + file,}).then(sql => {SQL = sql;@@ -16,7 +16,7 @@ export async function init() {},err => {reject(err);- }+ },);});}@@ -156,7 +156,7 @@ export async function openDatabase(pathOrBuffer) {let db = new SQL.Database(path.includes('/blocked') ? path : SQL.FS.readlink(path),- { filename: true }+ { filename: true },);db.exec(`PRAGMA journal_mode=MEMORY;diff --git a/packages/loot-core/src/platform/server/sqlite/index.web.test.js b/packages/loot-core/src/platform/server/sqlite/index.web.test.jsindex 8ba9b1c19e..9b6918823f 100644--- a/packages/loot-core/src/platform/server/sqlite/index.web.test.js+++ b/packages/loot-core/src/platform/server/sqlite/index.web.test.js@@ -3,7 +3,7 @@ import {openDatabase,transaction,execQuery,- runQuery+ runQuery,} from './index.web';beforeAll(() => {diff --git a/packages/loot-core/src/platform/uuid/index.electron.js b/packages/loot-core/src/platform/uuid/index.electron.jsindex 495211d3a3..633da75631 100644--- a/packages/loot-core/src/platform/uuid/index.electron.js+++ b/packages/loot-core/src/platform/uuid/index.electron.js@@ -7,5 +7,5 @@ module.exports = {v4Sync: function () {return uuid.v4();- }+ },};diff --git a/packages/loot-core/src/platform/uuid/index.testing.js b/packages/loot-core/src/platform/uuid/index.testing.jsindex 0704644649..fdae42aec9 100644--- a/packages/loot-core/src/platform/uuid/index.testing.js+++ b/packages/loot-core/src/platform/uuid/index.testing.js@@ -5,5 +5,5 @@ module.exports = {v4Sync: function () {return global.randomId();- }+ },};diff --git a/packages/loot-core/src/platform/uuid/index.web.js b/packages/loot-core/src/platform/uuid/index.web.jsindex 495211d3a3..633da75631 100644--- a/packages/loot-core/src/platform/uuid/index.web.js+++ b/packages/loot-core/src/platform/uuid/index.web.js@@ -7,5 +7,5 @@ module.exports = {v4Sync: function () {return uuid.v4();- }+ },};diff --git a/packages/loot-core/src/server/__mocks__/post.js b/packages/loot-core/src/server/__mocks__/post.jsindex 4d39d500ab..8524d220e0 100644--- a/packages/loot-core/src/server/__mocks__/post.js+++ b/packages/loot-core/src/server/__mocks__/post.js@@ -5,5 +5,5 @@ module.exports = {postBinary: mockServer.handleRequestBinary,get(url) {throw new Error('get unimplemented');- }+ },};diff --git a/packages/loot-core/src/server/accounts/export-to-csv.js b/packages/loot-core/src/server/accounts/export-to-csv.jsindex 6ca03cdde4..20cc597848 100644--- a/packages/loot-core/src/server/accounts/export-to-csv.js+++ b/packages/loot-core/src/server/accounts/export-to-csv.js@@ -7,7 +7,7 @@ export async function exportToCSV(transactions,accounts,categoryGroups,- payees+ payees,) {const accountNamesById = accounts.reduce((reduced, { id, name }) => {reduced[id] = name;@@ -18,11 +18,11 @@ export async function exportToCSV((reduced, { name, categories: subCategories }) => {subCategories.forEach(subCategory =>- (reduced[subCategory.id] = `${name}: ${subCategory.name}`)+ (reduced[subCategory.id] = `${name}: ${subCategory.name}`),);return reduced;},- {}+ {},);const payeeNamesById = payees.reduce((reduced, { id, name }) => {@@ -37,8 +37,8 @@ export async function exportToCSV(Payee: payeeNamesById[payee],Notes: notes,Category: categoryNamesById[category],- Amount: amount == null ? 0 : integerToAmount(amount)- })+ Amount: amount == null ? 0 : integerToAmount(amount),+ }),);return csvStringify(transactionsForExport, { header: true });@@ -56,9 +56,9 @@ export async function exportQueryToCSV(query) {{ IsParent: 'is_parent' },{ Notes: 'notes' },{ Category: 'category.name' },- { Amount: 'amount' }+ { Amount: 'amount' },])- .options({ splits: 'all' })+ .options({ splits: 'all' }),);let parentsPayees = new Map();@@ -79,7 +79,7 @@ export async function exportQueryToCSV(query) {Payee: trans.ParentId ? parentsPayees.get(trans.ParentId) : trans.Payee,Notes: trans.Notes,Category: trans.Category,- Amount: trans.Amount == null ? 0 : integerToAmount(trans.Amount)+ Amount: trans.Amount == null ? 0 : integerToAmount(trans.Amount),};});diff --git a/packages/loot-core/src/server/accounts/link.js b/packages/loot-core/src/server/accounts/link.jsindex 0837ed60d0..d3aee3cd1f 100644--- a/packages/loot-core/src/server/accounts/link.js+++ b/packages/loot-core/src/server/accounts/link.js@@ -13,7 +13,7 @@ const uuid = require('../../platform/uuid');export async function handoffPublicToken(institution, publicToken) {let [[, userId], [, key]] = await asyncStorage.multiGet(['user-id',- 'user-key'+ 'user-key',]);if (institution == null || !institution.institution_id || !institution.name) {@@ -28,15 +28,15 @@ export async function handoffPublicToken(institution, publicToken) {userId,key,item_id: id,- public_token: publicToken+ public_token: publicToken,});await runMutator(() =>db.insertWithUUID('banks', {id,bank_id: institution.institution_id,- name: institution.name- })+ name: institution.name,+ }),);return id;@@ -45,7 +45,7 @@ export async function handoffPublicToken(institution, publicToken) {export async function addAccounts(bankId, accountIds, offbudgetIds = []) {let [[, userId], [, userKey]] = await asyncStorage.multiGet(['user-id',- 'user-key'+ 'user-key',]);// Get all the available accounts@@ -65,13 +65,13 @@ export async function addAccounts(bankId, accountIds, offbudgetIds = []) {balance_current: amountToInteger(acct.balances.current),mask: acct.mask,bank: bankId,- offbudget: offbudgetIds.includes(acct.account_id) ? 1 : 0+ offbudget: offbudgetIds.includes(acct.account_id) ? 1 : 0,});// Create a transfer payeeawait db.insertPayee({name: '',- transfer_acct: id+ transfer_acct: id,});return id;@@ -81,6 +81,6 @@ export async function addAccounts(bankId, accountIds, offbudgetIds = []) {await bankSync.syncAccount(userId, userKey, id, acct.account_id, bankId);return id;- })+ }),);}diff --git a/packages/loot-core/src/server/accounts/parse-file.js b/packages/loot-core/src/server/accounts/parse-file.jsindex 8d26e09d4f..34d7f05a9b 100644--- a/packages/loot-core/src/server/accounts/parse-file.js+++ b/packages/loot-core/src/server/accounts/parse-file.js@@ -27,7 +27,7 @@ export function parseFile(filepath, options) {errors.push({message: 'Invalid file type',- internal: ''+ internal: '',});return { errors };}@@ -44,12 +44,12 @@ async function parseCSV(filepath, options = {}) {delimiter: options.delimiter || ',',quote: '"',trim: true,- relax_column_count: true+ relax_column_count: true,});} catch (err) {errors.push({message: 'Failed parsing: ' + err.message,- internal: err.message+ internal: err.message,});return { errors, transactions: [] };}@@ -67,7 +67,7 @@ async function parseQIF(filepath) {} catch (err) {errors.push({message: "Failed parsing: doesn't look like a valid QIF file.",- internal: err.stack+ internal: err.stack,});return { errors, transactions: [] };}@@ -79,8 +79,8 @@ async function parseQIF(filepath) {date: trans.date,payee_name: trans.payee,imported_payee: trans.payee,- notes: trans.memo || null- }))+ notes: trans.memo || null,+ })),};}@@ -99,7 +99,7 @@ async function parseOFX(filepath) {} catch (err) {errors.push({message: 'Failed importing file',- internal: err.stack+ internal: err.stack,});return { errors };}@@ -112,7 +112,7 @@ async function parseOFX(filepath) {date: trans.date ? dayFromDate(trans.date * 1000) : null,payee_name: trans.name,imported_payee: trans.name,- notes: trans.memo || null- }))+ notes: trans.memo || null,+ })),};}diff --git a/packages/loot-core/src/server/accounts/parse-file.test.js b/packages/loot-core/src/server/accounts/parse-file.test.jsindex ad3593f510..cc86ac696a 100644--- a/packages/loot-core/src/server/accounts/parse-file.test.js+++ b/packages/loot-core/src/server/accounts/parse-file.test.js@@ -24,7 +24,7 @@ async function getTransactions(accountId) {return db.runQuery('SELECT * FROM transactions WHERE acct = ?',[accountId],- true+ true,);}@@ -40,7 +40,7 @@ async function importFileWithRealTime(accountId, filepath, dateFormat) {amount: amountToInteger(trans.amount),date: dateFormat? d.format(d.parse(trans.date, dateFormat, new Date()), 'yyyy-MM-dd')- : trans.date+ : trans.date,}));}@@ -59,7 +59,7 @@ describe('File import', () => {let { errors } = await importFileWithRealTime('one',__dirname + '/../../mocks/files/data.qif',- 'MM/dd/yy'+ 'MM/dd/yy',);expect(errors.length).toBe(0);expect(await getTransactions('one')).toMatchSnapshot();@@ -71,7 +71,7 @@ describe('File import', () => {let { errors } = await importFileWithRealTime('one',- __dirname + '/../../mocks/files/data.ofx'+ __dirname + '/../../mocks/files/data.ofx',);expect(errors.length).toBe(0);expect(await getTransactions('one')).toMatchSnapshot();@@ -83,7 +83,7 @@ describe('File import', () => {let { errors } = await importFileWithRealTime('one',- __dirname + '/../../mocks/files/data.qfx'+ __dirname + '/../../mocks/files/data.qfx',);expect(errors.length).toBe(0);expect(await getTransactions('one')).toMatchSnapshot();@@ -95,14 +95,14 @@ describe('File import', () => {let res = await importFileWithRealTime('one',- __dirname + '/../../mocks/files/best.data-ever$.QFX'+ __dirname + '/../../mocks/files/best.data-ever$.QFX',);expect(res.errors.length).toBe(0);res = await importFileWithRealTime('one',__dirname + '/../../mocks/files/big.data.QiF',- 'MM/dd/yy'+ 'MM/dd/yy',);expect(res.errors.length).toBe(0);@@ -118,7 +118,7 @@ describe('File import', () => {let { errors } = await importFileWithRealTime('one',__dirname + '/../../mocks/files/8859-1.qfx',- 'yyyy-MM-dd'+ 'yyyy-MM-dd',);expect(errors.length).toBe(0);expect(await getTransactions('one')).toMatchSnapshot();diff --git a/packages/loot-core/src/server/accounts/payees.js b/packages/loot-core/src/server/accounts/payees.jsindex e1b92a863d..23f726f3ef 100644--- a/packages/loot-core/src/server/accounts/payees.js+++ b/packages/loot-core/src/server/accounts/payees.js@@ -5,7 +5,7 @@ export async function createPayee(description) {// namelet row = await db.first(`SELECT id FROM payees WHERE LOWER(name) = ? AND tombstone = 0`,- [description.toLowerCase()]+ [description.toLowerCase()],);if (row) {@@ -24,13 +24,13 @@ export async function getStartingBalancePayee() {`);if (category === null) {category = await db.first(- 'SELECT * FROM categories WHERE is_income = 1 AND tombstone = 0'+ 'SELECT * FROM categories WHERE is_income = 1 AND tombstone = 0',);}let id = await createPayee('Starting Balance');return {id,- category: category ? category.id : null+ category: category ? category.id : null,};}diff --git a/packages/loot-core/src/server/accounts/qif2json.js b/packages/loot-core/src/server/accounts/qif2json.jsindex 161bb264f4..1f0dc8892b 100644--- a/packages/loot-core/src/server/accounts/qif2json.js+++ b/packages/loot-core/src/server/accounts/qif2json.js@@ -37,7 +37,7 @@ export default function parse(qif, options) {break;case 'A':transaction.address = (transaction.address || []).concat(- line.substring(1)+ line.substring(1),);break;case 'P':diff --git a/packages/loot-core/src/server/accounts/rules.js b/packages/loot-core/src/server/accounts/rules.jsindex 51d110d985..47ef3b93e8 100644--- a/packages/loot-core/src/server/accounts/rules.js+++ b/packages/loot-core/src/server/accounts/rules.js@@ -7,7 +7,7 @@ import {isAfter,addDays,subDays,- parseDate+ parseDate,} from '../../shared/months';import { sortNumbers, getApproxNumberThreshold } from '../../shared/rules';import { recurConfigToRSchedule } from '../../shared/schedules';@@ -27,7 +27,7 @@ export function parseRecurDate(desc) {return {type: 'recur',- schedule: new RSchedule({ rrules: rules })+ schedule: new RSchedule({ rrules: rules }),};} catch (e) {throw new RuleError('parse-recur-date', e.message);@@ -85,7 +85,7 @@ let CONDITION_TYPES = {assert(parsed,'date-format',- `Invalid date format (field: ${fieldName})`+ `Invalid date format (field: ${fieldName})`,);// Approximate only works with exact & recurring dates@@ -93,7 +93,7 @@ let CONDITION_TYPES = {assert(parsed.type === 'date' || parsed.type === 'recur','date-format',- `Invalid date value for "isapprox" (field: ${fieldName})`+ `Invalid date value for "isapprox" (field: ${fieldName})`,);}// These only work with exact dates@@ -101,12 +101,12 @@ let CONDITION_TYPES = {assert(parsed.type === 'date','date-format',- `Invalid date value for "${op}" (field: ${fieldName})`+ `Invalid date value for "${op}" (field: ${fieldName})`,);}return parsed;- }+ },},id: {ops: ['is', 'contains', 'oneOf'],@@ -116,12 +116,12 @@ let CONDITION_TYPES = {assert(Array.isArray(value),'no-empty-array',- `oneOf must have an array value (field: ${fieldName})`+ `oneOf must have an array value (field: ${fieldName})`,);return value;}return value;- }+ },},string: {ops: ['is', 'contains', 'oneOf'],@@ -132,8 +132,8 @@ let CONDITION_TYPES = {Array.isArray(value),'no-empty-array',`oneOf must have an array value (field: ${fieldName}): ${JSON.stringify(- value- )}`+ value,+ )}`,);return value.filter(Boolean).map(val => val.toLowerCase());}@@ -142,12 +142,12 @@ let CONDITION_TYPES = {assert(typeof value === 'string' && value.length > 0,'no-empty-string',- `contains must have non-empty string (field: ${fieldName})`+ `contains must have non-empty string (field: ${fieldName})`,);}return value.toLowerCase();- }+ },},number: {ops: ['is', 'isapprox', 'isbetween', 'gt', 'gte', 'lt', 'lte'],@@ -162,26 +162,26 @@ let CONDITION_TYPES = {parsed != null,'not-number',`Value must be a number or between amount: ${JSON.stringify(- value- )} (field: ${fieldName})`+ value,+ )} (field: ${fieldName})`,);if (op === 'isbetween') {assert(parsed.type === 'between','number-format',- `Invalid between value for "${op}" (field: ${fieldName})`+ `Invalid between value for "${op}" (field: ${fieldName})`,);} else {assert(parsed.type === 'literal','number-format',- `Invalid number value for "${op}" (field: ${fieldName})`+ `Invalid number value for "${op}" (field: ${fieldName})`,);}return parsed;- }+ },},boolean: {ops: ['is'],@@ -190,12 +190,12 @@ let CONDITION_TYPES = {assert(typeof value === 'boolean','not-boolean',- `Value must be a boolean: ${value} (field: ${fieldName})`+ `Value must be a boolean: ${value} (field: ${fieldName})`,);return value;- }- }+ },+ },};export class Condition {@@ -210,12 +210,12 @@ export class Condition {assert(type,'internal',- `Invalid condition type: ${typeName} (field: ${field})`+ `Invalid condition type: ${typeName} (field: ${field})`,);assert(type.ops.includes(op),'internal',- `Invalid condition operator: ${op} (type: ${typeName}, field: ${field})`+ `Invalid condition operator: ${op} (type: ${typeName}, field: ${field})`,);if (type.nullable !== true) {@@ -278,7 +278,7 @@ export class Condition {let fieldDate = parseDate(fieldValue);return schedule.occursBetween(dateFns.subDays(fieldDate, 2),- dateFns.addDays(fieldDate, 2)+ dateFns.addDays(fieldDate, 2),);} else {return schedule.occursOn({ date: parseDate(fieldValue) });@@ -385,7 +385,7 @@ export class Condition {field: this.field,value: this.unparsedValue,type: this.type,- ...(this.options ? { options: this.options } : null)+ ...(this.options ? { options: this.options } : null),};}}@@ -397,7 +397,7 @@ export class Action {assert(ACTION_OPS.includes(op),'internal',- `Invalid action operation: ${op}`+ `Invalid action operation: ${op}`,);if (op === 'set') {@@ -434,7 +434,7 @@ export class Action {field: this.field,value: this.value,type: this.type,- ...(this.options ? { options: this.options } : null)+ ...(this.options ? { options: this.options } : null),};}}@@ -444,10 +444,10 @@ export class Rule {this.id = id;this.stage = stage;this.conditions = conditions.map(- c => new Condition(c.op, c.field, c.value, c.options, fieldTypes)+ c => new Condition(c.op, c.field, c.value, c.options, fieldTypes),);this.actions = actions.map(- a => new Action(a.op, a.field, a.value, a.options, fieldTypes)+ a => new Action(a.op, a.field, a.value, a.options, fieldTypes),);}@@ -489,7 +489,7 @@ export class Rule {id: this.id,stage: this.stage,conditions: this.conditions.map(c => c.serialize()),- actions: this.actions.map(a => a.serialize())+ actions: this.actions.map(a => a.serialize()),};}}@@ -564,7 +564,7 @@ export class RuleIndexer {return fastSetMerge(indexedRules || new Set(),- this.rules.get('*') || new Set()+ this.rules.get('*') || new Set(),);}}@@ -578,7 +578,7 @@ const OP_SCORES = {gte: 1,lt: 1,lte: 1,- contains: 0+ contains: 0,};function computeScore(rule) {@@ -593,7 +593,7 @@ function computeScore(rule) {if (rule.conditions.every(- cond => cond.op === 'is' || cond.op === 'isapprox' || cond.op === 'oneOf'+ cond => cond.op === 'is' || cond.op === 'isapprox' || cond.op === 'oneOf',)) {return initialScore * 2;diff --git a/packages/loot-core/src/server/accounts/rules.test.js b/packages/loot-core/src/server/accounts/rules.test.jsindex 9f284b2e5f..74c54c80f1 100644--- a/packages/loot-core/src/server/accounts/rules.test.js+++ b/packages/loot-core/src/server/accounts/rules.test.js@@ -5,7 +5,7 @@ import {Condition,Action,Rule,- RuleIndexer+ RuleIndexer,} from './rules';let fieldTypes = new Map(@@ -16,23 +16,23 @@ let fieldTypes = new Map(category: 'string',description: 'id',description2: 'id',- amount: 'number'- })+ amount: 'number',+ }),);describe('Condition', () => {test('parses date formats correctly', () => {expect(parseDateString('2020-08-10')).toEqual({type: 'date',- date: '2020-08-10'+ date: '2020-08-10',});expect(parseDateString('2020-08')).toEqual({type: 'month',- date: '2020-08'+ date: '2020-08',});expect(parseDateString('2020')).toEqual({type: 'year',- date: '2020'+ date: '2020',});// Invalid dates@@ -119,10 +119,10 @@ describe('Condition', () => {{start: '2019-01-01',frequency: 'monthly',- patterns: [{ type: 'day', value: 15 }]+ patterns: [{ type: 'day', value: 15 }],},null,- fieldTypes+ fieldTypes,);expect(cond.eval({ date: '2018-03-15' })).toBe(false);expect(cond.eval({ date: '2019-03-15' })).toBe(true);@@ -136,10 +136,10 @@ describe('Condition', () => {{start: '2018-01-12',frequency: 'monthly',- interval: 3+ interval: 3,},null,- fieldTypes+ fieldTypes,);expect(cond.eval({ date: '2019-01-12' })).toBe(true);expect(cond.eval({ date: '2019-04-12' })).toBe(true);@@ -153,10 +153,10 @@ describe('Condition', () => {{start: '2019-01-01',frequency: 'monthly',- patterns: [{ type: 'day', value: 15 }]+ patterns: [{ type: 'day', value: 15 }],},null,- fieldTypes+ fieldTypes,);expect(cond.eval({ date: '2019-03-12' })).toBe(false);expect(cond.eval({ date: '2019-03-13' })).toBe(true);@@ -239,7 +239,7 @@ describe('Condition', () => {'amount',{ num1: 0, num2: 10 },null,- fieldTypes+ fieldTypes,);expect(() => {@@ -266,7 +266,7 @@ describe('Condition', () => {'amount',{ num1: 32, num2: 86 },null,- fieldTypes+ fieldTypes,);expect(cond.eval({ amount: 30 })).toBe(false);expect(cond.eval({ amount: 32 })).toBe(true);@@ -279,7 +279,7 @@ describe('Condition', () => {'amount',{ num1: -16, num2: -20 },null,- fieldTypes+ fieldTypes,);expect(cond.eval({ amount: -18 })).toBe(true);expect(cond.eval({ amount: -12 })).toBe(false);@@ -328,14 +328,14 @@ describe('Rule', () => {let rule = new Rule({conditions: [{ op: 'is', field: 'name', value: 'James' }],actions: [{ op: 'set', field: 'name', value: 'Sarah' }],- fieldTypes+ fieldTypes,});// This matchesexpect(rule.exec({ name: 'James' })).toEqual({ name: 'Sarah' });// It returns updates, not the whole objectexpect(rule.exec({ name: 'James', date: '2018-10-01' })).toEqual({- name: 'Sarah'+ name: 'Sarah',});// This does not matchexpect(rule.exec({ name: 'James2' })).toEqual(null);@@ -345,14 +345,14 @@ describe('Rule', () => {conditions: [{ op: 'is', field: 'name', value: 'James' }],actions: [{ op: 'set', field: 'name', value: 'Sarah' },- { op: 'set', field: 'category', value: 'Sarah' }+ { op: 'set', field: 'category', value: 'Sarah' },],- fieldTypes+ fieldTypes,});expect(rule.exec({ name: 'James' })).toEqual({name: 'Sarah',- category: 'Sarah'+ category: 'Sarah',});expect(rule.exec({ name: 'James2' })).toEqual(null);expect(rule.apply({ name: 'James2' })).toEqual({ name: 'James2' });@@ -368,20 +368,20 @@ describe('Rule', () => {value: {start: '2018-01-12',frequency: 'monthly',- interval: 3- }- }+ interval: 3,+ },+ },],actions: [{ op: 'set', field: 'name', value: 'Sarah' }],- fieldTypes+ fieldTypes,});expect(rule.exec({ name: 'James', date: '2018-01-12' })).toEqual({- name: 'Sarah'+ name: 'Sarah',});expect(rule.exec({ name: 'James2', date: '2018-01-12' })).toEqual(null);expect(rule.exec({ name: 'James', date: '2018-01-10' })).toEqual({- name: 'Sarah'+ name: 'Sarah',});expect(rule.exec({ name: 'James', date: '2018-01-15' })).toEqual(null);});@@ -395,7 +395,7 @@ describe('Rule', () => {let rules = [rule('id1', [{ op: 'contains', field: 'name', value: 'sar' }]),rule('id2', [{ op: 'contains', field: 'name', value: 'jim' }]),- rule('id3', [{ op: 'is', field: 'name', value: 'James' }])+ rule('id3', [{ op: 'is', field: 'name', value: 'James' }]),];expectOrder(rankRules(rules), ['id1', 'id2', 'id3']);@@ -406,13 +406,13 @@ describe('Rule', () => {rule('id3', [{ op: 'is', field: 'name', value: 'James' }]),rule('id4', [{ op: 'is', field: 'name', value: 'James' },- { op: 'gt', field: 'amount', value: 5 }+ { op: 'gt', field: 'amount', value: 5 },]),rule('id5', [{ op: 'is', field: 'name', value: 'James' },{ op: 'gt', field: 'amount', value: 5 },- { op: 'lt', field: 'amount', value: 10 }- ])+ { op: 'lt', field: 'amount', value: 10 },+ ]),];expectOrder(rankRules(rules), ['id1', 'id4', 'id5', 'id2', 'id3']);});@@ -425,25 +425,25 @@ describe('Rule', () => {rule('first',[{ op: 'is', field: 'description', value: 'id1' }],- [{ op: 'set', field: 'name', value: 'sar' }]+ [{ op: 'set', field: 'name', value: 'sar' }],),rule('second', [- { op: 'oneOf', field: 'description', value: ['id2', 'id3'] }+ { op: 'oneOf', field: 'description', value: ['id2', 'id3'] },]),rule('third',[{ op: 'is', field: 'name', value: 'James' }],- [{ op: 'set', field: 'description', value: 'id3' }]+ [{ op: 'set', field: 'description', value: 'id3' }],),rule('fourth', [{ op: 'is', field: 'name', value: 'James' },- { op: 'gt', field: 'amount', value: 5 }+ { op: 'gt', field: 'amount', value: 5 },]),rule('fifth', [{ op: 'is', field: 'description2', value: 'id5' },{ op: 'gt', field: 'amount', value: 5 },- { op: 'lt', field: 'amount', value: 10 }- ])+ { op: 'lt', field: 'amount', value: 10 },+ ]),];let foundRules = [];@@ -461,27 +461,27 @@ describe('RuleIndexer', () => {let rule = new Rule({conditions: [{ op: 'is', field: 'name', value: 'James' }],actions: [{ op: 'set', field: 'name', value: 'Sarah' }],- fieldTypes+ fieldTypes,});indexer.index(rule);let rule2 = new Rule({conditions: [{ op: 'is', field: 'category', value: 'foo' }],actions: [{ op: 'set', field: 'name', value: 'Sarah' }],- fieldTypes+ fieldTypes,});indexer.index(rule2);// rule2 always gets returned because it's not indexed and always// needs to be runexpect(indexer.getApplicableRules({ name: 'James' })).toEqual(- new Set([rule, rule2])+ new Set([rule, rule2]),);expect(indexer.getApplicableRules({ name: 'James2' })).toEqual(- new Set([rule2])+ new Set([rule2]),);expect(indexer.getApplicableRules({ amount: 15 })).toEqual(- new Set([rule2])+ new Set([rule2]),);});@@ -491,24 +491,24 @@ describe('RuleIndexer', () => {let rule = new Rule({conditions: [{ op: 'is', field: 'name', value: 'James' },- { op: 'is', field: 'category', value: 'food' }+ { op: 'is', field: 'category', value: 'food' },],actions: [{ op: 'set', field: 'name', value: 'Sarah' }],- fieldTypes+ fieldTypes,});indexer.index(rule);let rule2 = new Rule({conditions: [{ op: 'is', field: 'category', value: 'bars' }],actions: [{ op: 'set', field: 'name', value: 'Sarah' }],- fieldTypes+ fieldTypes,});indexer.index(rule2);let rule3 = new Rule({conditions: [{ op: 'is', field: 'date', value: '2020-01-20' }],actions: [{ op: 'set', field: 'name', value: 'Sarah' }],- fieldTypes+ fieldTypes,});indexer.index(rule3);@@ -518,19 +518,19 @@ describe('RuleIndexer', () => {expect(indexer.rules.get('*').size).toBe(1);expect(- indexer.getApplicableRules({ name: 'James', category: 'food' })+ indexer.getApplicableRules({ name: 'James', category: 'food' }),).toEqual(new Set([rule, rule3]));expect(- indexer.getApplicableRules({ name: 'James', category: 'f' })+ indexer.getApplicableRules({ name: 'James', category: 'f' }),).toEqual(new Set([rule, rule3]));expect(- indexer.getApplicableRules({ name: 'James', category: 'foo' })+ indexer.getApplicableRules({ name: 'James', category: 'foo' }),).toEqual(new Set([rule, rule3]));expect(- indexer.getApplicableRules({ name: 'James', category: 'bars' })+ indexer.getApplicableRules({ name: 'James', category: 'bars' }),).toEqual(new Set([rule2, rule3]));expect(indexer.getApplicableRules({ name: 'James' })).toEqual(- new Set([rule3])+ new Set([rule3]),);});@@ -541,7 +541,7 @@ describe('RuleIndexer', () => {id: 'id1',conditions: [{ op: 'is', field: 'category', value: 'food' }],actions: [{ op: 'set', field: 'name', value: 'Sarah' }],- fieldTypes+ fieldTypes,});indexer.index(rule);@@ -559,7 +559,7 @@ describe('RuleIndexer', () => {rule = new Rule({conditions: [{ op: 'is', field: 'category', value: 'alcohol' }],actions: [{ op: 'set', field: 'name', value: 'Sarah' }],- fieldTypes+ fieldTypes,});indexer.index(rule);@@ -574,31 +574,31 @@ describe('RuleIndexer', () => {let rule = new Rule({conditions: [- { op: 'oneOf', field: 'name', value: ['James', 'Sarah', 'Evy'] }+ { op: 'oneOf', field: 'name', value: ['James', 'Sarah', 'Evy'] },],actions: [{ op: 'set', field: 'category', value: 'Food' }],- fieldTypes+ fieldTypes,});indexer.index(rule);let rule2 = new Rule({conditions: [{ op: 'is', field: 'name', value: 'Georgia' }],actions: [{ op: 'set', field: 'category', value: 'Food' }],- fieldTypes+ fieldTypes,});indexer.index(rule2);expect(indexer.getApplicableRules({ name: 'James' })).toEqual(- new Set([rule])+ new Set([rule]),);expect(indexer.getApplicableRules({ name: 'Evy' })).toEqual(- new Set([rule])+ new Set([rule]),);expect(indexer.getApplicableRules({ name: 'Charlotte' })).toEqual(- new Set([])+ new Set([]),);expect(indexer.getApplicableRules({ name: 'Georgia' })).toEqual(- new Set([rule2])+ new Set([rule2]),);});});diff --git a/packages/loot-core/src/server/accounts/sync.js b/packages/loot-core/src/server/accounts/sync.jsindex 4331b6f2e0..2dbe085ecf 100644--- a/packages/loot-core/src/server/accounts/sync.js+++ b/packages/loot-core/src/server/accounts/sync.js@@ -1,7 +1,7 @@import * as monthUtils from '../../shared/months';import {makeChild as makeChildTransaction,- recalculateSplit+ recalculateSplit,} from '../../shared/transactions';import { hasFieldsChanged, amountToInteger } from '../../shared/util';import * as db from '../db';@@ -34,9 +34,9 @@ function makeSplitTransaction(trans, subtransactions) {subtransactions: subtransactions.map((transaction, idx) =>makeChildTransaction(trans, {...transaction,- sort_order: 0 - idx- })- )+ sort_order: 0 - idx,+ }),+ ),});return [parent, ...sub];}@@ -55,7 +55,7 @@ function getAccountBalance(account) {async function updateAccountBalance(id, balance) {await db.runQuery('UPDATE accounts SET balance_current = ? WHERE id = ?', [amountToInteger(balance),- id+ id,]);}@@ -63,7 +63,7 @@ export async function getAccounts(userId, userKey, id) {let res = await post(getServer().PLAID_SERVER + '/accounts', {userId,key: userKey,- item_id: id+ item_id: id,});let { accounts } = res;@@ -81,7 +81,7 @@ export function fromPlaid(trans) {payee_name: trans.name,imported_payee: trans.name,amount: -amountToInteger(trans.amount),- date: trans.date+ date: trans.date,};}@@ -91,7 +91,7 @@ async function downloadTransactions(acctId,bankId,since,- count+ count,) {let allTransactions = [];let accountBalance = null;@@ -110,7 +110,7 @@ async function downloadTransactions(start_date: since,end_date: endDate,count: pageSize,- offset+ offset,});if (res.error_code) {@@ -126,7 +126,7 @@ async function downloadTransactions(// Remove pending transactions for now - we will handle them in// the future.allTransactions = allTransactions.concat(- res.transactions.filter(t => !t.pending)+ res.transactions.filter(t => !t.pending),);accountBalance = getAccountBalance(res.accounts[0]);@@ -145,7 +145,7 @@ async function downloadTransactions(return {transactions: allTransactions.map(fromPlaid),- accountBalance+ accountBalance,};}@@ -172,7 +172,7 @@ async function resolvePayee(trans, payeeName, payeesToCreate) {async function normalizeTransactions(transactions,acctId,- { rawPayeeName } = {}+ { rawPayeeName } = {},) {let payeesToCreate = new Map();@@ -213,7 +213,7 @@ async function normalizeTransactions(subtransactions: subtransactions? subtransactions.map(t => ({ ...t, account: acctId })): null,- trans+ trans,});}@@ -240,7 +240,7 @@ export async function reconcileTransactions(acctId, transactions) {let { normalized, payeesToCreate } = await normalizeTransactions(transactions,- acctId+ acctId,);// The first pass runs the rules, and preps data for fuzzy matching@@ -258,7 +258,7 @@ export async function reconcileTransactions(acctId, transactions) {if (trans.imported_id) {match = await db.first('SELECT * FROM v_transactions WHERE imported_id = ? AND account = ?',- [trans.imported_id, acctId]+ [trans.imported_id, acctId],);// TODO: Pending transactions@@ -281,8 +281,8 @@ export async function reconcileTransactions(acctId, transactions) {db.toDateRepr(monthUtils.subDays(trans.date, 4)),db.toDateRepr(monthUtils.addDays(trans.date, 1)),trans.amount || 0,- acctId- ]+ acctId,+ ],);}@@ -291,7 +291,7 @@ export async function reconcileTransactions(acctId, transactions) {trans,subtransactions,match,- fuzzyDataset+ fuzzyDataset,});}@@ -304,7 +304,7 @@ export async function reconcileTransactions(acctId, transactions) {if (!data.match && data.fuzzyDataset) {// Try to find one where the payees match.let match = data.fuzzyDataset.find(- row => !hasMatched.has(row.id) && data.trans.payee === row.payee+ row => !hasMatched.has(row.id) && data.trans.payee === row.payee,);if (match) {@@ -337,7 +337,7 @@ export async function reconcileTransactions(acctId, transactions) {let existing = {...match,cleared: match.cleared === 1,- date: db.fromDateRepr(match.date)+ date: db.fromDateRepr(match.date),};// Update the transaction@@ -348,7 +348,7 @@ export async function reconcileTransactions(acctId, transactions) {category: existing.category || trans.category || null,imported_payee: trans.imported_payee || null,notes: existing.notes || trans.notes || null,- cleared: trans.cleared != null ? trans.cleared : true+ cleared: trans.cleared != null ? trans.cleared : true,};if (hasFieldsChanged(existing, updates, Object.keys(updates))) {@@ -360,7 +360,7 @@ export async function reconcileTransactions(acctId, transactions) {...trans,id: uuid.v4Sync(),category: trans.category || null,- cleared: trans.cleared != null ? trans.cleared : true+ cleared: trans.cleared != null ? trans.cleared : true,};if (subtransactions && subtransactions.length > 0) {@@ -376,7 +376,7 @@ export async function reconcileTransactions(acctId, transactions) {return {added: added.map(trans => trans.id),- updated: updated.map(trans => trans.id)+ updated: updated.map(trans => trans.id),};}@@ -385,14 +385,14 @@ export async function reconcileTransactions(acctId, transactions) {export async function addTransactions(acctId,transactions,- { runTransfers = true } = {}+ { runTransfers = true } = {},) {const added = [];let { normalized, payeesToCreate } = await normalizeTransactions(transactions,acctId,- { rawPayeeName: true }+ { rawPayeeName: true },);for (let { trans, subtransactions } of normalized) {@@ -403,7 +403,7 @@ export async function addTransactions(id: uuid.v4Sync(),...trans,account: acctId,- cleared: trans.cleared != null ? trans.cleared : true+ cleared: trans.cleared != null ? trans.cleared : true,};// Add split transactions if they are given@@ -423,7 +423,7 @@ export async function addTransactions(} else {await batchMessages(async () => {newTransactions = await Promise.all(- added.map(async trans => db.insertTransaction(trans))+ added.map(async trans => db.insertTransaction(trans)),);});}@@ -435,13 +435,13 @@ export async function syncAccount(userId, userKey, id, acctId, bankId) {// (that will make start date after end date)const latestTransaction = await db.first('SELECT * FROM v_transactions WHERE account = ? ORDER BY date DESC LIMIT 1',- [id]+ [id],);if (latestTransaction) {const startingTransaction = await db.first('SELECT date FROM v_transactions WHERE account = ? ORDER BY date ASC LIMIT 1',- [id]+ [id],);const startingDate = db.fromDateRepr(startingTransaction.date);// assert(startingTransaction)@@ -465,7 +465,7 @@ export async function syncAccount(userId, userKey, id, acctId, bankId) {userKey,acctId,bankId,- date+ date,);if (transactions.length === 0) {return { added: [], updated: [] };@@ -485,7 +485,7 @@ export async function syncAccount(userId, userKey, id, acctId, bankId) {// on-budget account, or for the past 30 days if off-budgetconst startingDay = monthUtils.subDays(monthUtils.currentDay(),- acctRow.offbudget === 0 ? 1 : 30+ acctRow.offbudget === 0 ? 1 : 30,);const { transactions } = await downloadTransactions(@@ -493,7 +493,7 @@ export async function syncAccount(userId, userKey, id, acctId, bankId) {userKey,acctId,bankId,- dateFns.format(dateFns.parseISO(startingDay), 'yyyy-MM-dd')+ dateFns.format(dateFns.parseISO(startingDay), 'yyyy-MM-dd'),);// We need to add a transaction that represents the starting@@ -522,13 +522,13 @@ export async function syncAccount(userId, userKey, id, acctId, bankId) {payee: payee.id,date: oldestDate,cleared: true,- starting_balance_flag: true+ starting_balance_flag: true,});let result = await reconcileTransactions(id, transactions);return {...result,- added: [initialId, ...result.added]+ added: [initialId, ...result.added],};});}diff --git a/packages/loot-core/src/server/accounts/sync.test.js b/packages/loot-core/src/server/accounts/sync.test.jsindex 499551689b..1029d5d066 100644--- a/packages/loot-core/src/server/accounts/sync.test.js+++ b/packages/loot-core/src/server/accounts/sync.test.js@@ -7,7 +7,7 @@ import {syncAccount,reconcileTransactions,addTransactions,- fromPlaid+ fromPlaid,} from './sync';import { loadRules, insertRule } from './transaction-rules';import * as transfer from './transfer';@@ -30,7 +30,7 @@ function getAllTransactions() {FROM v_transactions_internal tLEFT JOIN payees p ON p.id = t.payeeORDER BY date DESC, amount DESC, id- `+ `,);}@@ -41,7 +41,7 @@ function expectSnapshotWithDiffer(initialValue) {expectToMatchDiff: value => {expect(snapshotDiff(currentValue, value)).toMatchSnapshot();currentValue = value;- }+ },};}@@ -54,12 +54,12 @@ function prepMockTransactions() {mockTransactions = [...transactions.filter(t => t.date <= '2017-10-15'),...transactions.filter(t => t.date === '2017-10-16').slice(0, 1),- ...transactions.filter(t => t.date === '2017-10-17').slice(0, 3)+ ...transactions.filter(t => t.date === '2017-10-17').slice(0, 3),];return {accounts: data.accounts,- transactions: { [account_id]: mockTransactions }+ transactions: { [account_id]: mockTransactions },};});return mockTransactions;@@ -70,13 +70,13 @@ async function prepareDatabase() {await db.insertCategory({name: 'income',cat_group: 'group1',- is_income: 1+ is_income: 1,});const { accounts } = await post(getServer().PLAID_SERVER + '/accounts', {client_id: '',group_id: '',- item_id: '1'+ item_id: '1',});const acct = accounts[0];@@ -84,12 +84,12 @@ async function prepareDatabase() {id: 'one',account_id: acct.account_id,name: acct.official_name,- balance_current: acct.balances.current+ balance_current: acct.balances.current,});await db.insertPayee({id: 'transfer-' + id,name: '',- transfer_acct: id+ transfer_acct: id,});return { id, account_id: acct.account_id };@@ -109,7 +109,7 @@ describe('Account sync', () => {await reconcileTransactions(id, [{ date: '2020-01-02', payee_name: 'bakkerij', amount: 4133 },- { date: '2020-01-03', payee_name: 'kroger', amount: 5000 }+ { date: '2020-01-03', payee_name: 'kroger', amount: 5000 },]);payees = await getAllPayees();@@ -118,10 +118,10 @@ describe('Account sync', () => {let transactions = await getAllTransactions();expect(transactions.length).toBe(2);expect(transactions.find(t => t.amount === 4133).payee).toBe(- payees.find(p => p.name === 'Bakkerij').id+ payees.find(p => p.name === 'Bakkerij').id,);expect(transactions.find(t => t.amount === 5000).payee).toBe(- payees.find(p => p.name === 'Kroger').id+ payees.find(p => p.name === 'Kroger').id,);});@@ -142,12 +142,12 @@ describe('Account sync', () => {account: id,amount: -2947,date: '2017-10-15',- payee: payeeId+ payee: payeeId,});let { added, updated } = await reconcileTransactions(id,- mockTransactions.filter(t => t.date >= '2017-10-15').map(fromPlaid)+ mockTransactions.filter(t => t.date >= '2017-10-15').map(fromPlaid),);expect(added.length).toBe(3);@@ -191,26 +191,26 @@ describe('Account sync', () => {account: id,amount: -2947,date: '2017-10-15',- payee: await db.insertPayee({ name: 'papa johns' })+ payee: await db.insertPayee({ name: 'papa johns' }),});await db.insertTransaction({id: 'two',account: id,amount: -2947,date: '2017-10-17',- payee: await db.insertPayee({ name: 'lowes' })+ payee: await db.insertPayee({ name: 'lowes' }),});await db.insertTransaction({id: 'three',account: id,amount: -2947,date: '2017-10-17',- payee: await db.insertPayee({ name: 'macy' })+ payee: await db.insertPayee({ name: 'macy' }),});let { added, updated } = await reconcileTransactions(id,- mockTransactions.filter(t => t.date >= '2017-10-15').map(fromPlaid)+ mockTransactions.filter(t => t.date >= '2017-10-15').map(fromPlaid),);let transactions = await getAllTransactions();@@ -218,13 +218,13 @@ describe('Account sync', () => {expect(added.length).toBe(1);expect(transactions.find(t => t.id === 'one').imported_id).toBe(- mocked[1].transaction_id+ mocked[1].transaction_id,);expect(transactions.find(t => t.id === 'two').imported_id).toBe(- mocked[0].transaction_id+ mocked[0].transaction_id,);expect(transactions.find(t => t.id === 'three').imported_id).toBe(- mocked[2].transaction_id+ mocked[2].transaction_id,);});@@ -250,19 +250,19 @@ describe('Account sync', () => {amount: -3000,date: '2017-10-15',imported_id: 'imported1',- payee: await db.insertPayee({ name: 'papa johns' })+ payee: await db.insertPayee({ name: 'papa johns' }),});await db.insertTransaction({id: 'two',account: id,amount: -2947,date: '2017-10-17',- payee: await db.insertPayee({ name: 'lowes' })+ payee: await db.insertPayee({ name: 'lowes' }),});let { added, updated } = await reconcileTransactions(id,- mockTransactions.filter(t => t.date >= '2017-10-15').map(fromPlaid)+ mockTransactions.filter(t => t.date >= '2017-10-15').map(fromPlaid),);let transactions = await getAllTransactions();@@ -272,7 +272,7 @@ describe('Account sync', () => {// Make sure lowes, which has the imported_id, is the one that// got matched with the same imported_idexpect(transactions.find(t => t.id === 'one').imported_payee).toBe(- "Lowe's Store"+ "Lowe's Store",);});@@ -298,7 +298,7 @@ describe('Account sync', () => {amount: -2947,date: '2017-10-15',payee: await db.insertPayee({ name: 'foo' }),- imported_id: 'trans1'+ imported_id: 'trans1',});await db.insertTransaction({@@ -307,7 +307,7 @@ describe('Account sync', () => {amount: -2947,date: '2017-10-15',payee: await db.insertPayee({ name: 'bar' }),- imported_id: 'trans2'+ imported_id: 'trans2',});differ.expectToMatchDiff(await getAllTransactions());@@ -326,7 +326,7 @@ describe('Account sync', () => {await db.insertPayee({id: 'transfer-two',name: '',- transfer_acct: 'two'+ transfer_acct: 'two',});await syncAccount('userId', 'userKey', id, account_id, 'bank');@@ -341,7 +341,7 @@ describe('Account sync', () => {account: 'two',amount: 2948,date: '2017-10-15',- payee: 'transfer-' + id+ payee: 'transfer-' + id,});await transfer.onInsert(await db.getTransaction(transactionId));@@ -362,12 +362,12 @@ describe('Account sync', () => {id: 'one',account: acctId,amount: 2948,- date: '2020-01-01'+ date: '2020-01-01',});await reconcileTransactions(acctId, [{ date: '2020-01-02' },- { date: '2020-01-01', amount: 2948 }+ { date: '2020-01-01', amount: 2948 },]);let transactions = await getAllTransactions();@@ -380,7 +380,7 @@ describe('Account sync', () => {// Make _at least_ the date is requiredawait expect(reconcileTransactions(acctId, [{}])).rejects.toThrow(- /`date` is required/+ /`date` is required/,);});@@ -388,11 +388,11 @@ describe('Account sync', () => {const { id: acctId } = await prepareDatabase();await db.insertCategoryGroup({id: 'group2',- name: 'group2'+ name: 'group2',});let catId = await db.insertCategory({name: 'Food',- cat_group: 'group2'+ cat_group: 'group2',});let payeeId = await db.insertPayee({ name: 'bakkerij' });@@ -400,11 +400,11 @@ describe('Account sync', () => {await insertRule({stage: null,conditions: [{ op: 'is', field: 'payee', value: payeeId }],- actions: [{ op: 'set', field: 'category', value: catId }]+ actions: [{ op: 'set', field: 'category', value: catId }],});await reconcileTransactions(acctId, [- { date: '2020-01-02', payee_name: 'Bakkerij', amount: 4133 }+ { date: '2020-01-02', payee_name: 'Bakkerij', amount: 4133 },]);let transactions = await getAllTransactions();@@ -425,7 +425,7 @@ describe('Account sync', () => {const { id: acctId } = await prepareDatabase();await reconcileTransactions(acctId, [- { date: '2020-01-02', payee_name: ' ', amount: 4133 }+ { date: '2020-01-02', payee_name: ' ', amount: 4133 },]);let transactions = await getAllTransactions();@@ -450,11 +450,11 @@ describe('Account sync', () => {await insertRule({stage: null,conditions: [{ op: 'is', field: 'imported_payee', value: 'Bakkerij' }],- actions: [{ op: 'set', field: 'payee', value: payeeId }]+ actions: [{ op: 'set', field: 'payee', value: payeeId }],});await reconcileTransactions(acctId, [- { date: '2020-01-02', payee_name: 'bakkerij', amount: 4133 }+ { date: '2020-01-02', payee_name: 'bakkerij', amount: 4133 },]);let payees = await getAllPayees();@@ -496,7 +496,7 @@ describe('Account sync', () => {await insertRule({stage: null,conditions: [{ op: 'is', field: 'imported_payee', value: 'Bakkerij' }],- actions: [{ op: 'set', field: 'payee', value: payeeId2 }]+ actions: [{ op: 'set', field: 'payee', value: payeeId2 }],});if (version === 'v1') {@@ -510,7 +510,7 @@ describe('Account sync', () => {account: acctId,amount: -2947,date: '2017-10-15',- payee: payeeId1+ payee: payeeId1,});// It will try to match to this one first, make sure it matches// the above transaction though@@ -519,7 +519,7 @@ describe('Account sync', () => {account: acctId,amount: -2947,date: '2017-10-17',- payee: null+ payee: null,});let { updated } = await reconcileTransactions(acctId, [@@ -527,8 +527,8 @@ describe('Account sync', () => {date: '2017-10-17',payee_name: 'bakkerij',amount: -2947,- imported_id: 'imported1'- }+ imported_id: 'imported1',+ },]);let payees = await getAllPayees();@@ -541,7 +541,7 @@ describe('Account sync', () => {let transactions = await getAllTransactions();expect(transactions.length).toBe(2);expect(transactions.find(t => t.id === 'one').imported_id).toBe(- 'imported1'+ 'imported1',);});};@@ -558,30 +558,30 @@ describe('Account sync', () => {await insertRule({stage: null,conditions: [{ op: 'is', field: 'imported_payee', value: 'Bakkerij' }],- actions: [{ op: 'set', field: 'payee', value: payeeId }]+ actions: [{ op: 'set', field: 'payee', value: payeeId }],});let transactions = [{date: '2017-10-17',payee_name: 'BAKKerij',- amount: -2947+ amount: -2947,},{date: '2017-10-18',payee_name: 'bakkERIj2',- amount: -2947+ amount: -2947,},{date: '2017-10-19',payee_name: 'bakkerij3',- amount: -2947+ amount: -2947,},{date: '2017-10-20',payee_name: 'BakkeriJ3',- amount: -2947- }+ amount: -2947,+ },];let added = await addTransactions(acctId, transactions);@@ -598,7 +598,7 @@ describe('Account sync', () => {'bakkerij3','bakkerij3','bakkERIj2',- 'bakkerij-renamed'+ 'bakkerij-renamed',]);});diff --git a/packages/loot-core/src/server/accounts/title/index.js b/packages/loot-core/src/server/accounts/title/index.jsindex 54fde8753e..af08c964d7 100644--- a/packages/loot-core/src/server/accounts/title/index.js+++ b/packages/loot-core/src/server/accounts/title/index.js@@ -6,7 +6,7 @@ let character ='[0-9\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376-\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0523\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0621-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4-\u07F5\u07FA\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0972\u097B-\u097F\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58-\u0C59\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D3D\u0D60-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDD\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8B\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10D0-\u10FA\u10FC\u1100-\u1159\u115F-\u11A2\u11A8-\u11F9\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u1676\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19A9\u19C1-\u19C7\u1A00-\u1A16\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u2094\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2C6F\u2C71-\u2C7D\u2C80-\u2CE4\u2D00-\u2D25\u2D30-\u2D65\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31B7\u31F0-\u31FF\u3400\u4DB5\u4E00\u9FC3\uA000-\uA48C\uA500-\uA60C\uA610-\uA61F\uA62A-\uA62B\uA640-\uA65F\uA662-\uA66E\uA67F-\uA697\uA717-\uA71F\uA722-\uA788\uA78B-\uA78C\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA90A-\uA925\uA930-\uA946\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAC00\uD7A3\uF900-\uFA2D\uFA30-\uFA6A\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]';let regex = new RegExp(`(?:(?:(\\s?(?:^|[.\\(\\)!?;:"-])\\s*)(${character}))|(${character}))(${character}*[’']*${character}*)`,- 'g'+ 'g',);let convertToRegExp = specials =>diff --git a/packages/loot-core/src/server/accounts/title/lower-case.js b/packages/loot-core/src/server/accounts/title/lower-case.jsindex ab90383dd2..78bcc639b0 100644--- a/packages/loot-core/src/server/accounts/title/lower-case.js+++ b/packages/loot-core/src/server/accounts/title/lower-case.js@@ -5,13 +5,13 @@ const conjunctions = ['but','or','yet',- 'so'+ 'so',];const articles = ['a', //'an',- 'the'+ 'the',];const prepositions = [@@ -83,7 +83,7 @@ const prepositions = ['via','with','within',- 'without'+ 'without',];module.exports = new Set([...conjunctions, ...articles, ...prepositions]);diff --git a/packages/loot-core/src/server/accounts/title/specials.js b/packages/loot-core/src/server/accounts/title/specials.jsindex 334a4a209b..e2493792cc 100644--- a/packages/loot-core/src/server/accounts/title/specials.js+++ b/packages/loot-core/src/server/accounts/title/specials.js@@ -17,7 +17,7 @@ const intended = ['WordPress','JavaScript','Next.js',- 'Node.js'+ 'Node.js',];module.exports = intended;diff --git a/packages/loot-core/src/server/accounts/transaction-rules.js b/packages/loot-core/src/server/accounts/transaction-rules.jsindex 2dc6e4c201..71093351d5 100644--- a/packages/loot-core/src/server/accounts/transaction-rules.js+++ b/packages/loot-core/src/server/accounts/transaction-rules.js@@ -3,12 +3,12 @@ import {addDays,subDays,parseDate,- dayFromDate+ dayFromDate,} from '../../shared/months';import {FIELD_TYPES,sortNumbers,- getApproxNumberThreshold+ getApproxNumberThreshold,} from '../../shared/rules';import { partitionByField, fastSetMerge } from '../../shared/util';import { schemaConfig } from '../aql';@@ -26,7 +26,7 @@ import {RuleIndexer,rankRules,migrateIds,- iterateIds+ iterateIds,} from './rules';// TODO: Detect if it looks like the user is creating a rename rule@@ -45,7 +45,7 @@ export function resetState() {allRules = new Map();firstcharIndexer = new RuleIndexer({field: 'imported_payee',- method: 'firstchar'+ method: 'firstchar',});payeeIndexer = new RuleIndexer({ field: 'payee' });}@@ -56,7 +56,7 @@ function invert(obj) {return Object.fromEntries(Object.entries(obj).map(entry => {return [entry[1], entry[0]];- })+ }),);}@@ -66,14 +66,14 @@ let publicFields = invert(schemaConfig.views.transactions.fields);function fromInternalField(obj) {return {...obj,- field: publicFields[obj.field] || obj.field+ field: publicFields[obj.field] || obj.field,};}function toInternalField(obj) {return {...obj,- field: internalFields[obj.field] || obj.field+ field: internalFields[obj.field] || obj.field,};}@@ -130,7 +130,7 @@ export const ruleModel = {row.actions = JSON.stringify(actions);}return row;- }+ },};export function makeRule(data) {@@ -138,7 +138,7 @@ export function makeRule(data) {try {rule = new Rule({...ruleModel.toJS(data),- fieldTypes: FIELD_TYPES+ fieldTypes: FIELD_TYPES,});} catch (e) {console.warn('Invalid rule', e);@@ -202,7 +202,7 @@ export async function updateRule(rule) {export async function deleteRule(rule) {let schedule = await db.first('SELECT id FROM schedules WHERE rule = ?', [- rule.id+ rule.id,]);if (schedule) {@@ -262,8 +262,8 @@ export function runRules(trans) {let rules = rankRules(fastSetMerge(firstcharIndexer.getApplicableRules(trans),- payeeIndexer.getApplicableRules(trans)- )+ payeeIndexer.getApplicableRules(trans),+ ),);for (let i = 0; i < rules.length; i++) {@@ -289,7 +289,7 @@ export function conditionsToAQL(conditions, { recurDateBounds = 100 } = {}) {cond.field,cond.value,cond.options,- FIELD_TYPES+ FIELD_TYPES,);} catch (e) {errors.push(e.type || 'internal');@@ -317,12 +317,12 @@ export function conditionsToAQL(conditions, { recurDateBounds = 100 } = {}) {return {$and: [{ amount: { $lt: 0 } },- { [field]: { $transform: '$neg', [op]: value } }- ]+ { [field]: { $transform: '$neg', [op]: value } },+ ],};} else if (options.inflow) {return {- $and: [{ amount: { $gt: 0 } }, { [field]: { [op]: value } }]+ $and: [{ amount: { $gt: 0 } }, { [field]: { [op]: value } }],};}}@@ -352,12 +352,12 @@ export function conditionsToAQL(conditions, { recurDateBounds = 100 } = {}) {return {$and: [{ date: { $gte: subDays(d, 2) } },- { date: { $lte: addDays(d, 2) } }- ]+ { date: { $lte: addDays(d, 2) } },+ ],};}return { date: d };- })+ }),};} else {if (op === 'isapprox') {@@ -366,7 +366,7 @@ export function conditionsToAQL(conditions, { recurDateBounds = 100 } = {}) {let low = subDays(fullDate, 2);return {- $and: [{ date: { $gte: low } }, { date: { $lte: high } }]+ $and: [{ date: { $gte: low } }, { date: { $lte: high } }],};} else {switch (value.type) {@@ -376,14 +376,14 @@ export function conditionsToAQL(conditions, { recurDateBounds = 100 } = {}) {let low = value.date + '-00';let high = value.date + '-99';return {- $and: [{ date: { $gte: low } }, { date: { $lte: high } }]+ $and: [{ date: { $gte: low } }, { date: { $lte: high } }],};}case 'year': {let low = value.date + '-00-00';let high = value.date + '-99-99';return {- $and: [{ date: { $gte: low } }, { date: { $lte: high } }]+ $and: [{ date: { $gte: low } }, { date: { $lte: high } }],};}default:@@ -398,8 +398,8 @@ export function conditionsToAQL(conditions, { recurDateBounds = 100 } = {}) {return {$and: [apply(field, '$gte', number - threshold),- apply(field, '$lte', number + threshold)- ]+ apply(field, '$lte', number + threshold),+ ],};}return apply(field, '$eq', number);@@ -412,7 +412,7 @@ export function conditionsToAQL(conditions, { recurDateBounds = 100 } = {}) {// number type so we don't use `apply`let [low, high] = sortNumbers(value.num1, value.num2);return {- [field]: [{ $gte: low }, { $lte: high }]+ [field]: [{ $gte: low }, { $lte: high }],};case 'contains':// Running contains with id will automatically reach into@@ -420,7 +420,7 @@ export function conditionsToAQL(conditions, { recurDateBounds = 100 } = {}) {return apply(type === 'id' ? field + '.name' : field,'$like',- '%' + value + '%'+ '%' + value + '%',);case 'oneOf':let values = value;@@ -462,7 +462,7 @@ export function applyActions(transactionIds, actions, handlers) {action.field,action.value,action.options,- FIELD_TYPES+ FIELD_TYPES,);} catch (e) {console.log('Action error', e);@@ -502,7 +502,7 @@ function* getIsSetterRules(stage,condField,actionField,- { condValue, actionValue }+ { condValue, actionValue },) {let rules = getRules();for (let i = 0; i < rules.length; i++) {@@ -530,7 +530,7 @@ function* getOneOfSetterRules(stage,condField,actionField,- { condValue, actionValue }+ { condValue, actionValue },) {let rules = getRules();for (let i = 0; i < rules.length; i++) {@@ -556,7 +556,7 @@ function* getOneOfSetterRules(export async function updatePayeeRenameRule(fromNames, to) {let renameRule = getOneOfSetterRules('pre', 'imported_payee', 'payee', {- actionValue: to+ actionValue: to,}).next().value;// Note that we don't check for existing rules that set this@@ -570,12 +570,12 @@ export async function updatePayeeRenameRule(fromNames, to) {let newValue = [...fastSetMerge(new Set(condition.value),- new Set(fromNames.filter(name => name !== ''))- )+ new Set(fromNames.filter(name => name !== '')),+ ),];let rule = {...renameRule,- conditions: [{ ...condition, value: newValue }]+ conditions: [{ ...condition, value: newValue }],};await updateRule(rule);return renameRule.id;@@ -584,7 +584,7 @@ export async function updatePayeeRenameRule(fromNames, to) {stage: 'pre',conditions: [{ op: 'oneOf', field: 'imported_payee', value: fromNames }],actions: [{ op: 'set', field: 'payee', value: to }],- fieldTypes: FIELD_TYPES+ fieldTypes: FIELD_TYPES,});return insertRule(rule.serialize());}@@ -639,7 +639,7 @@ export async function updateCategoryRules(transactions) {`SELECT t.* FROM v_transactions tLEFT JOIN accounts a ON a.id = t.accountWHERE date >= ? AND date <= ? AND is_parent = 0 AND a.closed = 0`,- [toDateRepr(oldestDate), toDateRepr(addDays(currentDay(), 180))]+ [toDateRepr(oldestDate), toDateRepr(addDays(currentDay(), 180))],);let allTransactions = partitionByField(register, 'payee');@@ -665,8 +665,8 @@ export async function updateCategoryRules(transactions) {for (let [payeeId, category] of categoriesToSet.entries()) {let ruleSetters = [...getIsSetterRules(null, 'payee', 'category', {- condValue: payeeId- })+ condValue: payeeId,+ }),];if (ruleSetters.length > 0) {@@ -681,7 +681,7 @@ export async function updateCategoryRules(transactions) {if (action.value !== category) {await updateRule({...rule,- actions: [{ ...action, value: category }]+ actions: [{ ...action, value: category }],});}}@@ -691,7 +691,7 @@ export async function updateCategoryRules(transactions) {stage: null,conditions: [{ op: 'is', field: 'payee', value: payeeId }],actions: [{ op: 'set', field: 'category', value: category }],- fieldTypes: FIELD_TYPES+ fieldTypes: FIELD_TYPES,});await insertRule(newRule.serialize());}@@ -705,12 +705,12 @@ export async function migrateOldRules() {`SELECT p.*, c.id as category FROM payees pLEFT JOIN category_mapping cm ON cm.id = p.categoryLEFT JOIN categories c ON (c.id = cm.transferId AND c.tombstone = 0)- WHERE p.tombstone = 0 AND transfer_acct IS NULL`+ WHERE p.tombstone = 0 AND transfer_acct IS NULL`,);let allRules = await db.all(`SELECT pr.*, pm.targetId as payee_id FROM payee_rules prLEFT JOIN payee_mapping pm ON pm.id = pr.payee_id- WHERE pr.tombstone = 0`+ WHERE pr.tombstone = 0`,);let payeesById = new Map();@@ -748,10 +748,10 @@ export async function migrateOldRules() {{op: 'oneOf',field: 'imported_payee',- value: equals.map(payeeRule => payeeRule.value)- }+ value: equals.map(payeeRule => payeeRule.value),+ },],- actions+ actions,});}@@ -763,11 +763,11 @@ export async function migrateOldRules() {{op: 'contains',field: 'imported_payee',- value: payeeRule.value- }+ value: payeeRule.value,+ },],- actions- }))+ actions,+ })),);}}@@ -789,16 +789,16 @@ export async function migrateOldRules() {{op: 'oneOf',field: 'payee',- value: [...payeeIds]- }+ value: [...payeeIds],+ },],actions: [{op: 'set',field: 'category',- value: catId- }- ]+ value: catId,+ },+ ],});}@@ -812,7 +812,7 @@ export async function migrateOldRules() {await insertRule({stage: rule.stage,conditions: rule.conditions,- actions: rule.actions+ actions: rule.actions,});}diff --git a/packages/loot-core/src/server/accounts/transaction-rules.test.js b/packages/loot-core/src/server/accounts/transaction-rules.test.jsindex 19f5a3e8f4..ac07721665 100644--- a/packages/loot-core/src/server/accounts/transaction-rules.test.js+++ b/packages/loot-core/src/server/accounts/transaction-rules.test.js@@ -15,7 +15,7 @@ import {resetState,getProbableCategory,updateCategoryRules,- migrateOldRules+ migrateOldRules,} from './transaction-rules';// TODO: write tests to make sure payee renaming is "pre" and category@@ -30,7 +30,7 @@ beforeEach(async () => {async function getMatchingTransactions(conds) {let { filters } = conditionsToAQL(conds);let { data } = await runQuery(- q('transactions').filter({ $and: filters }).select('*')+ q('transactions').filter({ $and: filters }).select('*'),);return data;}@@ -51,39 +51,39 @@ describe('Transaction rules', () => {expect(makeRule({conditions: JSON.stringify([- { op: 'noop', field: 'date', value: '2019-05' }+ { op: 'noop', field: 'date', value: '2019-05' },]),actions: JSON.stringify([{ op: 'set', field: 'name', value: 'Sarah' },- { op: 'set', field: 'category', value: 'Sarah' }- ])- })+ { op: 'set', field: 'category', value: 'Sarah' },+ ]),+ }),).toBe(null);// setting an invalid fieldexpect(makeRule({conditions: JSON.stringify([- { op: 'is', field: 'date', value: '2019-05' }+ { op: 'is', field: 'date', value: '2019-05' },]),actions: JSON.stringify([{ op: 'set', field: 'notes', value: 'Sarah' },- { op: 'set', field: 'invalid', value: 'Sarah' }- ])- })+ { op: 'set', field: 'invalid', value: 'Sarah' },+ ]),+ }),).toBe(null);// condition has valid operator & setting valid fieldsexpect(makeRule({conditions: JSON.stringify([- { op: 'is', field: 'date', value: '2019-05' }+ { op: 'is', field: 'date', value: '2019-05' },]),actions: JSON.stringify([{ op: 'set', field: 'notes', value: 'Sarah' },- { op: 'set', field: 'category', value: 'Sarah' }- ])- })+ { op: 'set', field: 'category', value: 'Sarah' },+ ]),+ }),).not.toBe(null);spy.mockRestore();@@ -101,8 +101,8 @@ describe('Transaction rules', () => {conditions: [{ op: 'is', field: 'date', value: '2019-05' }],actions: [{ op: 'set', field: 'notes', value: 'Sarah' },- { op: 'set', field: 'category', value: 'food' }- ]+ { op: 'set', field: 'category', value: 'food' },+ ],});expect((await db.all('SELECT * FROM rules')).length).toBe(2);expect(getRules().length).toBe(2);@@ -123,7 +123,7 @@ describe('Transaction rules', () => {let transaction = runRules({date: '2019-05-10',notes: '',- category: null+ category: null,});expect(transaction.date).toBe('2019-05-10');expect(transaction.notes).toBe('Sarah');@@ -137,15 +137,15 @@ describe('Transaction rules', () => {conditions: [{ op: 'is', field: 'imported_payee', value: 'kroger' }],actions: [{ op: 'set', field: 'notes', value: 'Sarah' },- { op: 'set', field: 'category', value: 'food' }- ]+ { op: 'set', field: 'category', value: 'food' },+ ],});expect(getRules().length).toBe(1);let transaction = runRules({imported_payee: 'Kroger',notes: '',- category: null+ category: null,});expect(transaction.imported_payee).toBe('Kroger');expect(transaction.notes).toBe('Sarah');@@ -154,14 +154,14 @@ describe('Transaction rules', () => {// Change the actionawait updateRule({id,- actions: [{ op: 'set', field: 'category', value: 'bars' }]+ actions: [{ op: 'set', field: 'category', value: 'bars' }],});expect(getRules().length).toBe(1);transaction = runRules({imported_payee: 'Kroger',notes: '',- category: null+ category: null,});expect(transaction.imported_payee).toBe('Kroger');expect(transaction.notes).toBe('');@@ -170,12 +170,12 @@ describe('Transaction rules', () => {// If changing the condition, make sure the rule is re-indexedawait updateRule({id,- conditions: [{ op: 'is', field: 'imported_payee', value: 'ABC' }]+ conditions: [{ op: 'is', field: 'imported_payee', value: 'ABC' }],});transaction = runRules({imported_payee: 'ABC',notes: '',- category: null+ category: null,});expect(transaction.category).toBe('bars');expect(getRules().length).toBe(1);@@ -188,15 +188,15 @@ describe('Transaction rules', () => {conditions: [{ op: 'is', field: 'payee', value: 'kroger' }],actions: [{ op: 'set', field: 'notes', value: 'Sarah' },- { op: 'set', field: 'category', value: 'food' }- ]+ { op: 'set', field: 'category', value: 'food' },+ ],});expect(getRules().length).toBe(1);let transaction = runRules({payee: 'Kroger',notes: '',- category: null+ category: null,});expect(transaction.payee).toBe('Kroger');expect(transaction.category).toBe('food');@@ -206,7 +206,7 @@ describe('Transaction rules', () => {transaction = runRules({payee: 'Kroger',notes: '',- category: null+ category: null,});expect(transaction.payee).toBe('Kroger');expect(transaction.category).toBe(null);@@ -217,13 +217,13 @@ describe('Transaction rules', () => {await insertRule({stage: 'pre',conditions: [{ op: 'contains', field: 'imported_payee', value: 'lowes' }],- actions: [{ op: 'set', field: 'payee', value: 'lowes' }]+ actions: [{ op: 'set', field: 'payee', value: 'lowes' }],});await insertRule({stage: 'post',conditions: [{ op: 'is', field: 'imported_payee', value: 'kroger' }],- actions: [{ op: 'set', field: 'notes', value: 'Sarah' }]+ actions: [{ op: 'set', field: 'notes', value: 'Sarah' }],});resetState();@@ -235,13 +235,13 @@ describe('Transaction rules', () => {let transaction = runRules({imported_payee: 'blah Lowes blah',payee: null,- category: null+ category: null,});expect(transaction.payee).toBe('lowes');transaction = runRules({imported_payee: 'kroger',- category: null+ category: null,});expect(transaction.notes).toBe('Sarah');});@@ -255,19 +255,19 @@ describe('Transaction rules', () => {await db.insertCategory({id: 'food_id',name: 'food',- cat_group: 'group'+ cat_group: 'group',});await db.insertCategory({id: 'beer_id',name: 'beer',- cat_group: 'group'+ cat_group: 'group',});await insertRule({id: 'one',stage: 'pre',conditions: [{ op: 'contains', field: 'imported_payee', value: 'lowes' }],- actions: [{ op: 'set', field: 'payee', value: 'lowes_id' }]+ actions: [{ op: 'set', field: 'payee', value: 'lowes_id' }],});await insertRule({@@ -275,9 +275,9 @@ describe('Transaction rules', () => {stage: 'pre',conditions: [{ op: 'is', field: 'payee', value: 'lowes_id' },- { op: 'is', field: 'category', value: 'food_id' }+ { op: 'is', field: 'category', value: 'food_id' },],- actions: [{ op: 'set', field: 'notes', value: 'Sarah' }]+ actions: [{ op: 'set', field: 'notes', value: 'Sarah' }],});let rule1 = getRules().find(r => r.id === 'one');@@ -311,44 +311,44 @@ describe('Transaction rules', () => {{op: 'oneOf',field: 'payee',- value: ['kroger', 'kroger1', 'kroger2', 'kroger3', 'kroger4']- }+ value: ['kroger', 'kroger1', 'kroger2', 'kroger3', 'kroger4'],+ },],- actions: [{ op: 'set', field: 'notes', value: 'got it2' }]+ actions: [{ op: 'set', field: 'notes', value: 'got it2' }],});await insertRule({stage: 'pre',conditions: [{ op: 'is', field: 'imported_payee', value: '123 kroger' }],- actions: [{ op: 'set', field: 'payee', value: 'kroger3' }]+ actions: [{ op: 'set', field: 'payee', value: 'kroger3' }],});await insertRule({stage: null,conditions: [- { op: 'contains', field: 'imported_payee', value: 'kroger' }+ { op: 'contains', field: 'imported_payee', value: 'kroger' },],- actions: [{ op: 'set', field: 'payee', value: 'kroger4' }]+ actions: [{ op: 'set', field: 'payee', value: 'kroger4' }],});await insertRule({stage: null,conditions: [{ op: 'is', field: 'payee', value: 'kroger4' }],- actions: [{ op: 'set', field: 'notes', value: 'got it' }]+ actions: [{ op: 'set', field: 'notes', value: 'got it' }],});expect(runRules({imported_payee: '123 kroger',date: '2020-08-11',- amount: 50- })+ amount: 50,+ }),).toEqual({date: '2020-08-11',imported_payee: '123 kroger',payee: 'kroger4',amount: 50,- notes: 'got it2'+ notes: 'got it2',});});@@ -357,7 +357,7 @@ describe('Transaction rules', () => {let categoryGroupId = await db.insertCategoryGroup({ name: 'general' });let categoryId = await db.insertCategory({name: 'food',- cat_group: categoryGroupId+ cat_group: categoryGroupId,});let krogerId = await db.insertPayee({ name: 'kroger' });let lowesId = await db.insertPayee({ name: 'lowes', category: categoryId });@@ -365,17 +365,17 @@ describe('Transaction rules', () => {await db.insertPayeeRule({payee_id: krogerId,type: 'contains',- value: 'kroger'+ value: 'kroger',});await db.insertPayeeRule({payee_id: lowesId,type: 'equals',- value: '123 lowes'+ value: '123 lowes',});await db.insertPayeeRule({payee_id: lowesId,type: 'equals',- value: 'lowes 456'+ value: 'lowes 456',});// Migrate!@@ -386,27 +386,27 @@ describe('Transaction rules', () => {expect(runRules({ payee: null, imported_payee: '123 lowes' })).toEqual({category: categoryId,imported_payee: '123 lowes',- payee: lowesId+ payee: lowesId,});expect(runRules({ payee: null, imported_payee: 'lowes 456' })).toEqual({category: categoryId,imported_payee: 'lowes 456',- payee: lowesId+ payee: lowesId,});expect(runRules({ payee: null, imported_payee: '1 lowes 2' })).toEqual({imported_payee: '1 lowes 2',- payee: null+ payee: null,});expect(runRules({payee: null,imported_payee: 'blah blah kroger bla',- category: null- })+ category: null,+ }),).toEqual({imported_payee: 'blah blah kroger bla',payee: krogerId,- category: null+ category: null,});});@@ -416,7 +416,7 @@ describe('Transaction rules', () => {let categoryGroupId = await db.insertCategoryGroup({ name: 'general' });let categoryId = await db.insertCategory({name: 'food',- cat_group: categoryGroupId+ cat_group: categoryGroupId,});let krogerId = await db.insertPayee({ name: 'kroger' });let lowesId = await db.insertPayee({ name: 'lowes', category: categoryId });@@ -427,7 +427,7 @@ describe('Transaction rules', () => {account,payee: krogerId,notes: 'barr',- amount: 353+ amount: 353,});await db.insertTransaction({id: '2',@@ -435,7 +435,7 @@ describe('Transaction rules', () => {account,payee: krogerId,notes: 'fooo',- amount: 453+ amount: 453,});await db.insertTransaction({id: '3',@@ -443,70 +443,70 @@ describe('Transaction rules', () => {account,payee: lowesId,notes: 'FooO',- amount: -322+ amount: -322,});let transactions = await getMatchingTransactions([- { field: 'date', op: 'is', value: '2020-10-15' }+ { field: 'date', op: 'is', value: '2020-10-15' },]);expect(transactions.map(t => t.id)).toEqual(['2', '3']);transactions = await getMatchingTransactions([- { field: 'payee', op: 'is', value: lowesId }+ { field: 'payee', op: 'is', value: lowesId },]);expect(transactions.map(t => t.id)).toEqual(['3']);transactions = await getMatchingTransactions([- { field: 'amount', op: 'is', value: 353 }+ { field: 'amount', op: 'is', value: 353 },]);expect(transactions.map(t => t.id)).toEqual(['1']);transactions = await getMatchingTransactions([- { field: 'notes', op: 'is', value: 'FooO' }+ { field: 'notes', op: 'is', value: 'FooO' },]);expect(transactions.map(t => t.id)).toEqual(['2', '3']);transactions = await getMatchingTransactions([- { field: 'notes', op: 'contains', value: 'oo' }+ { field: 'notes', op: 'contains', value: 'oo' },]);expect(transactions.map(t => t.id)).toEqual(['2', '3']);transactions = await getMatchingTransactions([- { field: 'notes', op: 'oneOf', value: ['fooo', 'barr'] }+ { field: 'notes', op: 'oneOf', value: ['fooo', 'barr'] },]);expect(transactions.map(t => t.id)).toEqual(['2', '3', '1']);transactions = await getMatchingTransactions([- { field: 'amount', op: 'gt', value: 300 }+ { field: 'amount', op: 'gt', value: 300 },]);expect(transactions.map(t => t.id)).toEqual(['2', '1']);transactions = await getMatchingTransactions([{ field: 'amount', op: 'gt', value: 400 },- { field: 'amount', op: 'lt', value: 500 }+ { field: 'amount', op: 'lt', value: 500 },]);expect(transactions.map(t => t.id)).toEqual(['2']);transactions = await getMatchingTransactions([{ field: 'amount', op: 'gt', value: 300, options: { inflow: true } },- { field: 'amount', op: 'lt', value: 400, options: { inflow: true } }+ { field: 'amount', op: 'lt', value: 400, options: { inflow: true } },]);expect(transactions.map(t => t.id)).toEqual(['1']);// If `inflow` is true, it should never return outflow transactionstransactions = await getMatchingTransactions([- { field: 'amount', op: 'gt', value: -1000, options: { inflow: true } }+ { field: 'amount', op: 'gt', value: -1000, options: { inflow: true } },]);expect(transactions.map(t => t.id)).toEqual(['2', '1']);// Same thing for `outflow`: never return `inflow` transactionstransactions = await getMatchingTransactions([- { field: 'amount', op: 'gt', value: 300, options: { outflow: true } }+ { field: 'amount', op: 'gt', value: 300, options: { outflow: true } },]);expect(transactions.map(t => t.id)).toEqual(['3']);transactions = await getMatchingTransactions([- { field: 'date', op: 'gt', value: '2020-10-10' }+ { field: 'date', op: 'gt', value: '2020-10-10' },]);expect(transactions.map(t => t.id)).toEqual(['2', '3']);@@ -530,7 +530,7 @@ describe('Learning categories', () => {transaction,expectedCategory,expectedRuleCount = 1,- expectedPayee = 'foo'+ expectedPayee = 'foo',) {await db.insertTransaction(transaction);await updateCategoryRules([transaction]);@@ -540,7 +540,7 @@ describe('Learning categories', () => {expectCategoryRule(getRules()[expectedRuleCount - 1],expectedCategory,- expectedPayee+ expectedPayee,);}}@@ -564,7 +564,7 @@ describe('Learning categories', () => {winner = getProbableCategory([{ category: 'foo' },{ category: 'foo' },- { category: 'foo' }+ { category: 'foo' },]);expect(winner).toBe('foo');@@ -572,7 +572,7 @@ describe('Learning categories', () => {{ category: 'bar' },{ category: 'foo' },{ category: 'foo' },- { category: 'foo' }+ { category: 'foo' },]);expect(winner).toBe('foo');@@ -582,7 +582,7 @@ describe('Learning categories', () => {{ category: 'bar' },{ category: 'foo' },{ category: 'foo' },- { category: 'foo' }+ { category: 'foo' },]);expect(winner).toBe('bar');});@@ -596,10 +596,10 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: 'foo',- category: 'food'+ category: 'food',},null,- 0+ 0,);await insertTransaction(@@ -608,10 +608,10 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: 'foo',- category: 'food'+ category: 'food',},null,- 0+ 0,);await insertTransaction(@@ -620,9 +620,9 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: 'foo',- category: 'food'+ category: 'food',},- 'food'+ 'food',);});@@ -635,10 +635,10 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: 'foo',- category: 'food'+ category: 'food',},null,- 0+ 0,);await insertTransaction(@@ -647,10 +647,10 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: 'foo',- category: 'beer'+ category: 'beer',},null,- 0+ 0,);await insertTransaction(@@ -659,16 +659,16 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: 'foo',- category: 'beer'+ category: 'beer',},null,- 0+ 0,);await insertRule({stage: null,conditions: [{ op: 'is', field: 'payee', value: 'foo' }],- actions: [{ op: 'set', field: 'category', value: 'fun' }]+ actions: [{ op: 'set', field: 'category', value: 'fun' }],});// Even though the system couldn't figure out the category to set,@@ -679,10 +679,10 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: 'foo',- category: 'bills'+ category: 'bills',},'fun',- 1+ 1,);});@@ -692,7 +692,7 @@ describe('Learning categories', () => {await insertRule({stage: null,conditions: [{ op: 'is', field: 'payee', value: 'foo' }],- actions: [{ op: 'set', field: 'category', value: 'beer' }]+ actions: [{ op: 'set', field: 'category', value: 'beer' }],});await insertTransaction(@@ -701,10 +701,10 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: 'foo',- category: 'food'+ category: 'food',},'beer',- 1+ 1,);await insertTransaction({@@ -712,10 +712,10 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: 'foo',- category: 'food'+ category: 'food',},'beer',- 1+ 1,);await insertTransaction({@@ -723,10 +723,10 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: 'foo',- category: 'food'+ category: 'food',},'food',- 1+ 1,);});@@ -736,7 +736,7 @@ describe('Learning categories', () => {await insertRule({stage: null,conditions: [{ op: 'is', field: 'payee', value: 'foo' }],- actions: [{ op: 'set', field: 'category', value: 'beer' }]+ actions: [{ op: 'set', field: 'category', value: 'beer' }],});// Use a new payee, so the category should be remembered@@ -746,10 +746,10 @@ describe('Learning categories', () => {date: '2016-12-03',account: 'acct',payee: 'bar',- category: 'fun'+ category: 'fun',},'beer',- 1+ 1,);await insertTransaction({@@ -757,10 +757,10 @@ describe('Learning categories', () => {date: '2016-12-03',account: 'acct',payee: 'bar',- category: 'fun'+ category: 'fun',},'beer',- 1+ 1,);await insertTransaction({@@ -768,11 +768,11 @@ describe('Learning categories', () => {date: '2016-12-03',account: 'acct',payee: 'bar',- category: 'fun'+ category: 'fun',},'fun',2,- 'bar'+ 'bar',);});@@ -782,24 +782,24 @@ describe('Learning categories', () => {await insertRule({stage: null,conditions: [{ op: 'is', field: 'payee', value: 'foo' }],- actions: [{ op: 'set', field: 'category', value: 'unknown1' }]+ actions: [{ op: 'set', field: 'category', value: 'unknown1' }],});await insertRule({stage: null,conditions: [{ op: 'is', field: 'payee', value: 'foo' }],- actions: [{ op: 'set', field: 'category', value: 'unknown2' }]+ actions: [{ op: 'set', field: 'category', value: 'unknown2' }],});await insertRule({stage: null,conditions: [{ op: 'is', field: 'payee', value: null }],- actions: [{ op: 'set', field: 'category', value: 'beer' }]+ actions: [{ op: 'set', field: 'category', value: 'beer' }],});let trans = {date: '2016-12-01',account: 'acct',payee: 'foo',- category: 'food'+ category: 'food',};await db.insertTransaction({ ...trans, id: 'one' });await db.insertTransaction({ ...trans, id: 'two' });@@ -811,7 +811,7 @@ describe('Learning categories', () => {date: '2016-12-02',account: 'acct',payee: 'foo',- category: 'beer'+ category: 'beer',};await db.insertTransaction({ ...trans, id: 'four' });await db.insertTransaction({ ...trans, id: 'five' });@@ -843,7 +843,7 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: null,- category: 'food'+ category: 'food',};await db.insertTransaction({ ...trans, id: 'one' });await db.insertTransaction({ ...trans, id: 'two' });@@ -858,12 +858,12 @@ describe('Learning categories', () => {await insertRule({stage: null,conditions: [{ op: 'is', field: 'payee', value: 'foo' }],- actions: [{ op: 'set', field: 'category', value: 'unknown1' }]+ actions: [{ op: 'set', field: 'category', value: 'unknown1' }],});await insertRule({stage: null,conditions: [{ op: 'oneOf', field: 'payee', value: ['foo', 'bar'] }],- actions: [{ op: 'set', field: 'category', value: 'unknown1' }]+ actions: [{ op: 'set', field: 'category', value: 'unknown1' }],});expect(getRules().length).toBe(2);@@ -871,7 +871,7 @@ describe('Learning categories', () => {date: '2016-12-01',account: 'acct',payee: null,- category: 'food'+ category: 'food',};await db.insertTransaction({ ...trans, id: 'one' });await db.insertTransaction({ ...trans, id: 'two' });@@ -890,7 +890,7 @@ describe('Learning categories', () => {await insertRule({stage: null,conditions: [{ op: 'is', field: 'imported_payee', value: 'foo' }],- actions: [{ op: 'set', field: 'payee', value: 'unknown1' }]+ actions: [{ op: 'set', field: 'payee', value: 'unknown1' }],});// The rule that the system sees should use the new public names@@ -919,9 +919,9 @@ describe('Learning categories', () => {await db.insertWithUUID('rules', {stage: null,conditions: JSON.stringify([- { op: 'is', field: 'imported_payee', value: 'foo' }+ { op: 'is', field: 'imported_payee', value: 'foo' },]),- actions: JSON.stringify([{ op: 'set', field: 'payee', value: 'payee1' }])+ actions: JSON.stringify([{ op: 'set', field: 'payee', value: 'payee1' }]),});await loadRules();diff --git a/packages/loot-core/src/server/accounts/transactions.js b/packages/loot-core/src/server/accounts/transactions.jsindex 9e4621030e..08e469cc97 100644--- a/packages/loot-core/src/server/accounts/transactions.js+++ b/packages/loot-core/src/server/accounts/transactions.js@@ -10,7 +10,7 @@ const connection = require('../../platform/server/connection');async function idsWithChildren(ids) {let whereIds = whereIn(ids, 'parent_id');let rows = await db.all(- `SELECT id FROM v_transactions_internal WHERE ${whereIds}`+ `SELECT id FROM v_transactions_internal WHERE ${whereIds}`,);let set = new Set(ids);for (let row of rows) {@@ -27,7 +27,7 @@ async function getTransactionsByIds(ids) {(query, params) => db.selectWithSchema('transactions', query, params),ids,id => `id = '${id}'`,- where => `SELECT * FROM v_transactions_internal WHERE ${where}`+ where => `SELECT * FROM v_transactions_internal WHERE ${where}`,);}@@ -36,7 +36,7 @@ export async function batchUpdateTransactions({deleted,updated,learnCategories = false,- detectOrphanPayees = true+ detectOrphanPayees = true,}) {// Track the ids of each type of transaction change (see below for why)let addedIds = [];@@ -65,7 +65,7 @@ export async function batchUpdateTransactions({await batchMessages(async () => {if (added) {addedIds = await Promise.all(- added.map(async t => db.insertTransaction(t))+ added.map(async t => db.insertTransaction(t)),);}@@ -77,7 +77,7 @@ export async function batchUpdateTransactions({// be fixed (it should only take an id)deletedIds.map(async id => {await db.deleteTransaction({ id });- })+ }),);}@@ -94,7 +94,7 @@ export async function batchUpdateTransactions({}await db.updateTransaction(t);- })+ }),);}});@@ -132,10 +132,10 @@ export async function batchUpdateTransactions({...(added ? added.filter(add => add.category).map(add => add.id) : []),...(updated? updated.filter(update => update.category).map(update => update.id)- : [])+ : []),]);await rules.updateCategoryRules(- allAdded.concat(allUpdated).filter(trans => ids.has(trans.id))+ allAdded.concat(allUpdated).filter(trans => ids.has(trans.id)),);}@@ -153,7 +153,7 @@ export async function batchUpdateTransactions({if (orphanedIds.length > 0) {connection.send('orphaned-payees', {orphanedIds,- updatedPayeeIds: newPayeeIds+ updatedPayeeIds: newPayeeIds,});}}@@ -162,6 +162,6 @@ export async function batchUpdateTransactions({return {added: resultAdded,- updated: resultUpdated+ updated: resultUpdated,};}diff --git a/packages/loot-core/src/server/accounts/transfer.js b/packages/loot-core/src/server/accounts/transfer.jsindex ba1c3b3bf6..484a07d035 100644--- a/packages/loot-core/src/server/accounts/transfer.js+++ b/packages/loot-core/src/server/accounts/transfer.js@@ -8,7 +8,7 @@ async function getTransferredAccount(transaction) {if (transaction.payee) {let { transfer_acct } = await db.first('SELECT id, transfer_acct FROM v_payees WHERE id = ?',- [transaction.payee]+ [transaction.payee],);return transfer_acct;}@@ -18,11 +18,11 @@ async function getTransferredAccount(transaction) {async function clearCategory(transaction, transferAcct) {const { offbudget: fromOffBudget } = await db.first('SELECT offbudget FROM accounts WHERE id = ?',- [transaction.account]+ [transaction.account],);const { offbudget: toOffBudget } = await db.first('SELECT offbudget FROM accounts WHERE id = ?',- [transferAcct]+ [transferAcct],);// We should clear the category to make sure it's not being@@ -38,7 +38,7 @@ async function clearCategory(transaction, transferAcct) {export async function addTransfer(transaction, transferredAccount) {let { id: fromPayee } = await db.first('SELECT id FROM payees WHERE transfer_acct = ?',- [transaction.account]+ [transaction.account],);// We need to enforce certain constraints with child transaction transfers@@ -49,7 +49,7 @@ export async function addTransfer(transaction, transferredAccount) {LEFT JOIN payees p ON p.id = t.payeeWHERE t.id = ?`,- [transaction.parent_id]+ [transaction.parent_id],);if (row.transfer_acct) {@@ -75,7 +75,7 @@ export async function addTransfer(transaction, transferredAccount) {date: transaction.date,transfer_id: transaction.id,notes: transaction.notes || null,- cleared: false+ cleared: false,});await db.updateTransaction({ id: transaction.id, transfer_id: id });@@ -84,7 +84,7 @@ export async function addTransfer(transaction, transferredAccount) {return {id: transaction.id,transfer_id: id,- ...(categoryCleared ? { category: null } : {})+ ...(categoryCleared ? { category: null } : {}),};}@@ -103,7 +103,7 @@ export async function removeTransfer(transaction) {await db.updateTransaction({id: transaction.transfer_id,transfer_id: null,- payee: null+ payee: null,});} else {await db.deleteTransaction({ id: transaction.transfer_id });@@ -124,7 +124,7 @@ export async function updateTransfer(transaction, transferredAccount) {payee: payee.id,date: transaction.date,notes: transaction.notes,- amount: -transaction.amount+ amount: -transaction.amount,});const categoryCleared = await clearCategory(transaction, transferredAccount);diff --git a/packages/loot-core/src/server/accounts/transfer.test.js b/packages/loot-core/src/server/accounts/transfer.test.jsindex 14f92546a4..98a0360970 100644--- a/packages/loot-core/src/server/accounts/transfer.test.js+++ b/packages/loot-core/src/server/accounts/transfer.test.js@@ -11,7 +11,7 @@ function getAllTransactions() {FROM v_transactions tLEFT JOIN payees p ON p.id = t.payeeORDER BY date DESC, amount DESC, id- `+ `,);}@@ -21,7 +21,7 @@ async function prepareDatabase() {id: '1',name: 'cat1',cat_group: 'group1',- is_income: 0+ is_income: 0,});await db.insertAccount({ id: 'one', name: 'one' });await db.insertAccount({ id: 'two', name: 'two' });@@ -30,7 +30,7 @@ async function prepareDatabase() {await db.insertPayee({ name: '', transfer_acct: 'two' });await db.insertPayee({name: '',- transfer_acct: 'three'+ transfer_acct: 'three',});}@@ -42,7 +42,7 @@ describe('Transfer', () => {account: 'one',amount: 5000,payee: await db.insertPayee({ name: 'Non-transfer' }),- date: '2017-01-01'+ date: '2017-01-01',};await db.insertTransaction(transaction);await transfer.onInsert(transaction);@@ -50,17 +50,17 @@ describe('Transfer', () => {let differ = expectSnapshotWithDiffer(await getAllTransactions());let transferTwo = await db.first(- "SELECT * FROM payees WHERE transfer_acct = 'two'"+ "SELECT * FROM payees WHERE transfer_acct = 'two'",);let transferThree = await db.first(- "SELECT * FROM payees WHERE transfer_acct = 'three'"+ "SELECT * FROM payees WHERE transfer_acct = 'three'",);transaction = {account: 'one',amount: 5000,payee: transferTwo.id,- date: '2017-01-01'+ date: '2017-01-01',};transaction.id = await db.insertTransaction(transaction);await transfer.onInsert(transaction);@@ -73,7 +73,7 @@ describe('Transfer', () => {transaction = {...transaction,date: '2017-01-05',- notes: 'This is a note'+ notes: 'This is a note',};await db.updateTransaction(transaction);await transfer.onUpdate(transaction);@@ -81,7 +81,7 @@ describe('Transfer', () => {transaction = {...transaction,- payee: transferThree.id+ payee: transferThree.id,};await db.updateTransaction(transaction);await transfer.onUpdate(transaction);@@ -89,7 +89,7 @@ describe('Transfer', () => {transaction = {...transaction,- payee: await db.insertPayee({ name: 'Not transferred anymore' })+ payee: await db.insertPayee({ name: 'Not transferred anymore' }),};await db.updateTransaction(transaction);await transfer.onUpdate(transaction);@@ -102,7 +102,7 @@ describe('Transfer', () => {// Re-transfer ittransaction = {...transaction,- payee: transferTwo.id+ payee: transferTwo.id,};await db.updateTransaction(transaction);await transfer.onUpdate(transaction);@@ -120,10 +120,10 @@ describe('Transfer', () => {await prepareDatabase();let transferTwo = await db.first(- "SELECT * FROM payees WHERE transfer_acct = 'two'"+ "SELECT * FROM payees WHERE transfer_acct = 'two'",);let transferThree = await db.first(- "SELECT * FROM payees WHERE transfer_acct = 'three'"+ "SELECT * FROM payees WHERE transfer_acct = 'three'",);let transaction = {@@ -131,7 +131,7 @@ describe('Transfer', () => {amount: 5000,payee: await db.insertPayee({ name: 'Non-transfer' }),date: '2017-01-01',- category: '1'+ category: '1',};transaction.id = await db.insertTransaction(transaction);await transfer.onInsert(transaction);@@ -141,7 +141,7 @@ describe('Transfer', () => {transaction = {...(await db.getTransaction(transaction.id)),payee: transferThree.id,- notes: 'hi'+ notes: 'hi',};await db.updateTransaction(transaction);await transfer.onUpdate(transaction);@@ -149,7 +149,7 @@ describe('Transfer', () => {transaction = {...(await db.getTransaction(transaction.id)),- payee: transferTwo.id+ payee: transferTwo.id,};await db.updateTransaction(transaction);await transfer.onUpdate(transaction);diff --git a/packages/loot-core/src/server/api-models.js b/packages/loot-core/src/server/api-models.jsindex 8b52ac1f40..c42701eff1 100644--- a/packages/loot-core/src/server/api-models.js+++ b/packages/loot-core/src/server/api-models.js@@ -74,7 +74,7 @@ export const transactionModel = {result.cleared = transaction.cleared;}return result;- }+ },};export const accountModel = {@@ -86,7 +86,7 @@ export const accountModel = {name: account.name,type: account.type,offbudget: account.offbudget ? true : false,- closed: account.closed ? true : false+ closed: account.closed ? true : false,};},@@ -99,7 +99,7 @@ export const accountModel = {result.closed = account.closed ? 1 : 0;}return result;- }+ },};export const categoryModel = {@@ -110,7 +110,7 @@ export const categoryModel = {id: category.id,name: category.name,is_income: category.is_income ? true : false,- group_id: category.cat_group+ group_id: category.cat_group,};},@@ -123,7 +123,7 @@ export const categoryModel = {result.cat_group = category.group_id;}return result;- }+ },};export const categoryGroupModel = {@@ -134,7 +134,7 @@ export const categoryGroupModel = {id: group.id,name: group.name,is_income: group.is_income ? true : false,- categories: group.categories.map(categoryModel.toExternal)+ categories: group.categories.map(categoryModel.toExternal),};},@@ -147,7 +147,7 @@ export const categoryGroupModel = {result.categories = group.categories.map(categoryModel.fromExternal);}return result;- }+ },};export const payeeModel = {@@ -158,14 +158,14 @@ export const payeeModel = {id: payee.id,name: payee.name,category: payee.category,- transfer_acct: payee.transfer_acct+ transfer_acct: payee.transfer_acct,};},fromExternal(payee) {// No translation is neededreturn payee;- }+ },};export const payeeRuleModel = {@@ -178,5 +178,5 @@ export const payeeRuleModel = {fromExternal(rule) {return rule;- }+ },};diff --git a/packages/loot-core/src/server/api.js b/packages/loot-core/src/server/api.jsindex c2b78c5fde..61f93e9b08 100644--- a/packages/loot-core/src/server/api.js+++ b/packages/loot-core/src/server/api.js@@ -3,7 +3,7 @@ import q from '../shared/query';import {ungroupTransactions,updateTransaction,- deleteTransaction+ deleteTransaction,} from '../shared/transactions';import { integerToAmount } from '../shared/util';@@ -13,7 +13,7 @@ import {categoryModel,categoryGroupModel,payeeModel,- payeeRuleModel+ payeeRuleModel,} from './api-models';import { runQuery as aqlQuery } from './aql';import * as cloudStorage from './cloud-storage';@@ -46,20 +46,20 @@ function withMutation(handler) {let rows = await db.all('SELECT DISTINCT dataset FROM messages_crdt WHERE timestamp > ?',- [latestTimestamp]+ [latestTimestamp],);// Only send the sync event if anybody else is connectedif (connection.getNumClients() > 1) {connection.send('sync-event', {type: 'success',- tables: rows.map(row => row.dataset)+ tables: rows.map(row => row.dataset),});}return result;},- { undoDisabled: true }+ { undoDisabled: true },);};}@@ -86,7 +86,7 @@ async function validateExpenseCategory(debug, id) {}let row = await db.first('SELECT is_income FROM categories WHERE id = ?', [- id+ id,]);if (!row) {@@ -146,13 +146,13 @@ handlers['api/load-budget'] = async function ({ id }) {if (error === 'out-of-sync-migrations' || error === 'out-of-sync-data') {throw new Error(- 'This budget cannot be loaded with this version of the app.'+ 'This budget cannot be loaded with this version of the app.',);} else if (error === 'budget-not-found') {throw new Error('Budget "' +id +- '" not found. Check the id of your budget in the "Advanced" section of the settings page.'+ '" not found. Check the id of your budget in the "Advanced" section of the settings page.',);} else {throw new Error('We had an unknown problem opening "' + id + '".');@@ -253,8 +253,8 @@ handlers['api/budget-month'] = async function ({ month }) {categories: group.categories.map(cat => ({...categoryModel.toExternal(cat),- received: value(`sum-amount-${cat.id}`)- }))+ received: value(`sum-amount-${cat.id}`),+ })),};}@@ -269,61 +269,61 @@ handlers['api/budget-month'] = async function ({ month }) {budgeted: value(`budget-${cat.id}`),spent: value(`sum-amount-${cat.id}`),balance: value(`leftover-${cat.id}`),- carryover: value(`carryover-${cat.id}`)- }))+ carryover: value(`carryover-${cat.id}`),+ })),};- })+ }),};};handlers['api/budget-set-amount'] = withMutation(async function ({month,categoryId,- amount+ amount,}) {return handlers['budget/budget-amount']({month,category: categoryId,- amount+ amount,});});handlers['api/budget-set-carryover'] = withMutation(async function ({month,categoryId,- flag+ flag,}) {await validateMonth(month);await validateExpenseCategory('budget-set-carryover', categoryId);return handlers['budget/set-carryover']({startMonth: month,category: categoryId,- flag+ flag,});});handlers['api/transactions-export'] = async function ({transactions,categoryGroups,- payees+ payees,}) {return handlers['transactions-export']({transactions,categoryGroups,- payees+ payees,});};handlers['api/transactions-import'] = withMutation(async function ({accountId,- transactions+ transactions,}) {return handlers['transactions-import']({ accountId, transactions });});handlers['api/transactions-add'] = withMutation(async function ({accountId,- transactions+ transactions,}) {await addTransactions(accountId, transactions, { runTransfers: false });return 'ok';@@ -332,7 +332,7 @@ handlers['api/transactions-add'] = withMutation(async function ({handlers['api/transactions-get'] = async function ({accountId,startDate,- endDate+ endDate,}) {let { data } = await aqlQuery(q('transactions')@@ -340,11 +340,11 @@ handlers['api/transactions-get'] = async function ({$and: [accountId && { account: accountId },startDate && { date: { $gte: startDate } },- endDate && { date: { $lte: endDate } }- ].filter(Boolean)+ endDate && { date: { $lte: endDate } },+ ].filter(Boolean),}).select('*')- .options({ splits: 'grouped' })+ .options({ splits: 'grouped' }),);return data;};@@ -355,10 +355,10 @@ handlers['api/transactions-filter'] = async function ({ text, accountId }) {handlers['api/transaction-update'] = withMutation(async function ({id,- fields+ fields,}) {let { data } = await aqlQuery(- q('transactions').filter({ id }).select('*').options({ splits: 'grouped' })+ q('transactions').filter({ id }).select('*').options({ splits: 'grouped' }),);let transactions = ungroupTransactions(data);@@ -372,7 +372,7 @@ handlers['api/transaction-update'] = withMutation(async function ({handlers['api/transaction-delete'] = withMutation(async function ({ id }) {let { data } = await aqlQuery(- q('transactions').filter({ id }).select('*').options({ splits: 'grouped' })+ q('transactions').filter({ id }).select('*').options({ splits: 'grouped' }),);let transactions = ungroupTransactions(data);@@ -391,7 +391,7 @@ handlers['api/accounts-get'] = async function () {handlers['api/account-create'] = withMutation(async function ({account,- initialBalance = null+ initialBalance = null,}) {return handlers['account-create']({name: account.name,@@ -400,7 +400,7 @@ handlers['api/account-create'] = withMutation(async function ({closed: account.closed,// Current the API expects an amount but it really should expect// an integer- balance: initialBalance != null ? integerToAmount(initialBalance) : null+ balance: initialBalance != null ? integerToAmount(initialBalance) : null,});});@@ -411,12 +411,12 @@ handlers['api/account-update'] = withMutation(async function ({ id, fields }) {handlers['api/account-close'] = withMutation(async function ({id,transferAccountId,- transferCategoryId+ transferCategoryId,}) {return handlers['account-close']({id,transferAccountId,- categoryId: transferCategoryId+ categoryId: transferCategoryId,});});@@ -436,28 +436,28 @@ handlers['api/categories-get'] = async function ({ grouped } = {}) {};handlers['api/category-group-create'] = withMutation(async function ({- group+ group,}) {return handlers['category-group-create']({ name: group.name });});handlers['api/category-group-update'] = withMutation(async function ({id,- fields+ fields,}) {return handlers['category-group-update']({id,- ...categoryGroupModel.fromExternal(fields)+ ...categoryGroupModel.fromExternal(fields),});});handlers['api/category-group-delete'] = withMutation(async function ({id,- transferCategoryId+ transferCategoryId,}) {return handlers['category-group-delete']({id,- transferId: transferCategoryId+ transferId: transferCategoryId,});});@@ -465,24 +465,24 @@ handlers['api/category-create'] = withMutation(async function ({ category }) {return handlers['category-create']({name: category.name,groupId: category.group_id,- isIncome: category.is_income+ isIncome: category.is_income,});});handlers['api/category-update'] = withMutation(async function ({ id, fields }) {return handlers['category-update']({id,- ...categoryModel.fromExternal(fields)+ ...categoryModel.fromExternal(fields),});});handlers['api/category-delete'] = withMutation(async function ({id,- transferCategoryId+ transferCategoryId,}) {return handlers['category-delete']({id,- transferId: transferCategoryId+ transferId: transferCategoryId,});});@@ -497,7 +497,7 @@ handlers['api/payee-create'] = withMutation(async function ({ payee }) {handlers['api/payee-update'] = withMutation(async function ({ id, fields }) {return handlers['payees-batch-change']({- updated: [{ id, ...payeeModel.fromExternal(fields) }]+ updated: [{ id, ...payeeModel.fromExternal(fields) }],});});@@ -512,22 +512,22 @@ handlers['api/payee-rules-get'] = async function ({ payeeId }) {handlers['api/payee-rule-create'] = withMutation(async function ({payee_id,- rule+ rule,}) {return handlers['payees-add-rule']({payee_id,type: rule.type,- value: rule.value || null+ value: rule.value || null,});});handlers['api/payee-rule-update'] = withMutation(async function ({id,- fields+ fields,}) {return handlers['payees-update-rule']({id,- ...payeeRuleModel.fromExternal(fields)+ ...payeeRuleModel.fromExternal(fields),});});diff --git a/packages/loot-core/src/server/app.js b/packages/loot-core/src/server/app.jsindex 964398ea39..d34b9b09ad 100644--- a/packages/loot-core/src/server/app.js+++ b/packages/loot-core/src/server/app.js@@ -18,7 +18,7 @@ class App {method(name, func) {if (this.handlers[name] != null) {throw new Error(- 'Conflicting method name, names must be globally unique: ' + name+ 'Conflicting method name, names must be globally unique: ' + name,);}this.handlers[name] = func;@@ -50,8 +50,8 @@ class App {if (this.unlistenServices.length > 0) {captureException(new Error(- 'App: startServices called while services are already running'- )+ 'App: startServices called while services are already running',+ ),);}this.unlistenServices = this.services.map(service => service());diff --git a/packages/loot-core/src/server/aql/compiler.js b/packages/loot-core/src/server/aql/compiler.jsindex 3e0efc80f5..0bf6642eb8 100644--- a/packages/loot-core/src/server/aql/compiler.js+++ b/packages/loot-core/src/server/aql/compiler.js@@ -49,7 +49,7 @@ function getFieldDescription(schema, tableName, field) {let fieldDesc = schema[tableName][field];if (fieldDesc == null) {throw new CompileError(- `Field "${field}" does not exist in table "${tableName}"`+ `Field "${field}" does not exist in table "${tableName}"`,);}return fieldDesc;@@ -74,7 +74,7 @@ function makePath(state, path) {if (!table[field] || table[field].ref == null) {throw new CompileError(- `Field not joinable on table ${tableName}: "${field}"`+ `Field not joinable on table ${tableName}: "${field}"`,);}@@ -98,7 +98,7 @@ function makePath(state, path) {tableName: tableName,tableId: uid(tableName),joinField: parts[parts.length - 1],- joinTable+ joinTable,};}@@ -110,10 +110,10 @@ function resolvePath(state, path) {let fullName = acc.context + '.' + name;return {context: fullName,- path: [...acc.path, fullName]+ path: [...acc.path, fullName],};},- { context: state.implicitTableName, path: [] }+ { context: state.implicitTableName, path: [] },).path;paths.forEach(path => {@@ -137,7 +137,7 @@ function transformField(state, name) {if (path === '') {pathInfo = {tableName: state.implicitTableName,- tableId: state.implicitTableId+ tableId: state.implicitTableId,};} else {pathInfo = resolvePath(state, path);@@ -210,7 +210,7 @@ function inferParam(param, type) {'date-month': ['date'],'date-year': ['date', 'date-month'],id: ['string'],- float: ['integer']+ float: ['integer'],};if (@@ -218,7 +218,7 @@ function inferParam(param, type) {(!casts[type] || !casts[type].includes(existingType))) {throw new Error(- `Parameter "${name}" can't convert to ${type} (already inferred as ${existingType})`+ `Parameter "${name}" can't convert to ${type} (already inferred as ${existingType})`,);}} else {@@ -250,7 +250,7 @@ function castInput(state, expr, type) {return parseDate(expr.value) || badDateFormat(expr.value, 'date');} else {throw new CompileError(- 'Casting string fields to dates is not supported'+ 'Casting string fields to dates is not supported',);}}@@ -273,12 +273,12 @@ function castInput(state, expr, type) {return typed(dateToInt(expr2.value.toString().slice(0, 6)),'date-month',- { literal: true }+ { literal: true },);} else {return typed(`CAST(SUBSTR(${expr2.value}, 1, 6) AS integer)`,- 'date-month'+ 'date-month',);}} else if (type === 'date-year') {@@ -297,12 +297,12 @@ function castInput(state, expr, type) {if (expr2.literal) {return typed(dateToInt(expr2.value.toString().slice(0, 4)), 'date-year', {- literal: true+ literal: true,});} else {return typed(`CAST(SUBSTR(${expr2.value}, 1, 4) AS integer)`,- 'date-year'+ 'date-year',);}} else if (type === 'id') {@@ -368,7 +368,7 @@ function saveStack(type, func) {if (state == null || state.compileStack == null) {throw new CompileError('This function cannot track error data. ' +- 'It needs to accept the compiler state as the first argument.'+ 'It needs to accept the compiler state as the first argument.',);}@@ -423,7 +423,7 @@ function getCompileError(error, stack) {const rootMethod = stack[0].type;const methodArgs = stack[0].args[0];stackStr += `\n ${rootMethod}(${prettyValue(- methodArgs.length === 1 ? methodArgs[0] : methodArgs+ methodArgs.length === 1 ? methodArgs[0] : methodArgs,)})`;// In production, hide internal stack traces@@ -456,13 +456,13 @@ function compileLiteral(value) {return typed(value ? 1 : 0, 'boolean', { literal: true });} else if (typeof value === 'number') {return typed(value, Number.isInteger(value) ? 'integer' : 'float', {- literal: true+ literal: true,});} else if (Array.isArray(value)) {return typed(value, 'array', { literal: true });} else {throw new CompileError(- 'Unsupported type of expression: ' + JSON.stringify(value)+ 'Unsupported type of expression: ' + JSON.stringify(value),);}}@@ -512,7 +512,7 @@ const compileFunction = saveStack('function', (state, func) => {if (name[0] !== '$') {throw new CompileError(- `Unknown property "${name}". Did you mean to call a function? Try prefixing it with $`+ `Unknown property "${name}". Did you mean to call a function? Try prefixing it with $`,);}@@ -538,7 +538,7 @@ const compileFunction = saveStack('function', (state, func) => {return typed(`(SUM(${arg1}) OVER (${order} ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING))`,- args[0].type+ args[0].type,);}@@ -554,7 +554,7 @@ const compileFunction = saveStack('function', (state, func) => {let [arg1, arg2, arg3] = valArray(state, args, ['string','integer',- 'integer'+ 'integer',]);return typed(`SUBSTR(${arg1}, ${arg2}, ${arg3})`, 'string');}@@ -580,7 +580,7 @@ const compileFunction = saveStack('function', (state, func) => {valArray(state, args, ['integer', 'integer']);return typed(`(${val(state, args[0])} / ${val(state, args[1])})`,- args[0].type+ args[0].type,);}@@ -627,7 +627,7 @@ const compileOp = saveStack('op', (state, fieldRef, opData) => {if ($transform) {lhs = compileFunction({ ...state, implicitField: fieldRef },- typeof $transform === 'string' ? { [$transform]: '$' } : $transform+ typeof $transform === 'string' ? { [$transform]: '$' } : $transform,);} else {lhs = compileExpr(state, '$' + fieldRef);@@ -776,14 +776,14 @@ function compileJoins(state, tableRef, internalTableFilters) {' AND ' +compileAnd({ ...state, implicitTableName: tableName, implicitTableId: tableId },- filters+ filters,);}joins.push(`LEFT JOIN ${noMapping ? tableName : tableRef(tableName, true)- } ${tableId} ON ${addTombstone(state.schema, tableName, tableId, on)}`+ } ${tableId} ON ${addTombstone(state.schema, tableName, tableId, on)}`,);if (state.dependencies.indexOf(tableName) === -1) {@@ -799,7 +799,7 @@ function expandStar(state, expr) {if (expr === '*') {pathInfo = {tableName: state.implicitTableName,- tableId: state.implicitTableId+ tableId: state.implicitTableId,};} else if (expr.match(/\.\*$/)) {let result = popPath(expr);@@ -846,7 +846,7 @@ const compileSelect = saveStack(if (name[0] === '$') {state.compileStack.push({ type: 'value', value: expr });throw new CompileError(- `Invalid field "${name}", are you trying to select a function? You need to name the expression`+ `Invalid field "${name}", are you trying to select a function? You need to name the expression`,);}@@ -862,7 +862,7 @@ const compileSelect = saveStack(});return select.join(', ');- }+ },);const compileGroupBy = saveStack('groupBy', (state, exprs) => {@@ -954,7 +954,7 @@ export function compileQuery(queryState, schema, schemaConfig = {}) {let {tableViews = {},tableFilters = name => [],- customizeQuery = queryState => queryState+ customizeQuery = queryState => queryState,} = schemaConfig;let internalTableFilters = name => {@@ -963,12 +963,12 @@ export function compileQuery(queryState, schema, schemaConfig = {}) {for (let filter of filters) {if (Array.isArray(filter)) {throw new CompileError(- 'Invalid internal table filter: only object filters are supported'+ 'Invalid internal table filter: only object filters are supported',);}if (Object.keys(filter)[0].indexOf('.') !== -1) {throw new CompileError(- 'Invalid internal table filter: field names cannot contain paths'+ 'Invalid internal table filter: field names cannot contain paths',);}}@@ -991,7 +991,7 @@ export function compileQuery(queryState, schema, schemaConfig = {}) {groupExpressions,orderExpressions,limit,- offset+ offset,} = customizeQuery(queryState);let select = '';@@ -1008,7 +1008,7 @@ export function compileQuery(queryState, schema, schemaConfig = {}) {compileStack: [],outputTypes: new Map(),validateRefs,- namedParameters: []+ namedParameters: [],};resetUid();@@ -1018,7 +1018,7 @@ export function compileQuery(queryState, schema, schemaConfig = {}) {state,selectExpressions,isAggregateQuery(queryState),- orderExpressions+ orderExpressions,);if (filterExpressions.length > 0) {@@ -1065,12 +1065,12 @@ export function compileQuery(queryState, schema, schemaConfig = {}) {groupBy,orderBy,limit,- offset+ offset,};return {sqlPieces,- state+ state,};}@@ -1083,7 +1083,7 @@ export function defaultConstructQuery(queryState, state, sqlPieces) {state.schema,state.implicitTableName,state.implicitTableId,- s.where+ s.where,);return `diff --git a/packages/loot-core/src/server/aql/compiler.test.js b/packages/loot-core/src/server/aql/compiler.test.jsindex 1ea3633c54..e676628b88 100644--- a/packages/loot-core/src/server/aql/compiler.test.js+++ b/packages/loot-core/src/server/aql/compiler.test.js@@ -16,8 +16,8 @@ let basicSchema = {amount: { type: 'integer' },amount2: { type: 'integer' },amount3: { type: 'float' },- is_parent: { type: 'boolean' }- }+ is_parent: { type: 'boolean' },+ },};let schemaWithRefs = {@@ -25,19 +25,19 @@ let schemaWithRefs = {id: { type: 'id' },payee: { type: 'id', ref: 'payees' },date: { type: 'date' },- amount: { type: 'integer' }+ amount: { type: 'integer' },},payees: {name: { type: 'string' },id: { type: 'id' },- account: { type: 'id', ref: 'accounts' }+ account: { type: 'id', ref: 'accounts' },},accounts: {id: { type: 'id' },trans1: { type: 'id', ref: 'transactions' },trans2: { type: 'id', ref: 'transactions' },- trans3: { type: 'id', ref: 'transactions' }- }+ trans3: { type: 'id', ref: 'transactions' },+ },};let schemaWithTombstone = {@@ -45,17 +45,17 @@ let schemaWithTombstone = {id: { type: 'id' },payee: { type: 'id', ref: 'payees' },amount: { type: 'integer' },- tombstone: { type: 'boolean' }+ tombstone: { type: 'boolean' },},payees: {name: { type: 'string' },id: { type: 'id' },- tombstone: { type: 'boolean' }+ tombstone: { type: 'boolean' },},accounts: {id: { type: 'id' },- trans: { type: 'id', ref: 'transactions' }- }+ trans: { type: 'id', ref: 'transactions' },+ },};describe('sheet language', () => {@@ -65,10 +65,10 @@ describe('sheet language', () => {.select(['trans1', 'trans2']).withoutValidatedRefs().serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'SELECT accounts.trans1 AS trans1, accounts.trans2 AS trans2, accounts.id AS id FROM accounts'+ 'SELECT accounts.trans1 AS trans1, accounts.trans2 AS trans2, accounts.id AS id FROM accounts',);// Allows renaming@@ -77,10 +77,10 @@ describe('sheet language', () => {.select(['trans1', 'trans1.id', { transId: 'trans1.id' }]).withoutValidatedRefs().serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'SELECT accounts.trans1 AS trans1, transactions1.id AS "trans1.id", transactions1.id AS transId, accounts.id AS id FROM'+ 'SELECT accounts.trans1 AS trans1, transactions1.id AS "trans1.id", transactions1.id AS transId, accounts.id AS id FROM',);// Joined fields should be named by path@@ -89,10 +89,10 @@ describe('sheet language', () => {.select(['trans1.payee.name']).withoutValidatedRefs().serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'SELECT payees2.name AS "trans1.payee.name", accounts.id AS id FROM accounts'+ 'SELECT payees2.name AS "trans1.payee.name", accounts.id AS id FROM accounts',);// Renaming works with joined fields@@ -101,16 +101,16 @@ describe('sheet language', () => {.select([{ payeeName: 'trans1.payee.name' }]).withoutValidatedRefs().serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'SELECT payees2.name AS payeeName, accounts.id AS id FROM accounts'+ 'SELECT payees2.name AS payeeName, accounts.id AS id FROM accounts',);// By default, it should do id ref validationresult = generateSQLWithState(query('accounts').select(['trans1', 'trans2']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(sqlLines(result.sql)).toEqual(sqlLines(`@@ -118,7 +118,7 @@ describe('sheet language', () => {LEFT JOIN transactions transactions1 ON transactions1.id = accounts.trans1LEFT JOIN transactions transactions2 ON transactions2.id = accounts.trans2WHERE 1- `)+ `),);});@@ -127,17 +127,17 @@ describe('sheet language', () => {query('transactions').select([{ num: { $idiv: [{ $neg: '$amount' }, 2] } }]).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'SELECT ((-transactions.amount) / 2) AS num, transactions.id AS id FROM transactions'+ 'SELECT ((-transactions.amount) / 2) AS num, transactions.id AS id FROM transactions',);});it('`select` allows selecting all fields with *', () => {let result = generateSQLWithState(query('accounts').select(['*']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(sqlLines(result.sql)).toEqual(sqlLines(`@@ -146,13 +146,13 @@ describe('sheet language', () => {LEFT JOIN transactions transactions2 ON transactions2.id = accounts.trans2LEFT JOIN transactions transactions3 ON transactions3.id = accounts.trans3WHERE 1- `)+ `),);// Test selecting from joined tablesresult = generateSQLWithState(query('accounts').select(['*', 'trans1.*']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(sqlLines(result.sql)).toEqual(sqlLines(`@@ -162,7 +162,7 @@ describe('sheet language', () => {LEFT JOIN transactions transactions3 ON transactions3.id = accounts.trans3LEFT JOIN payees payees4 ON payees4.id = transactions1.payeeWHERE 1- `)+ `),);});@@ -171,32 +171,32 @@ describe('sheet language', () => {// doesn't have it )let result = generateSQLWithState(query('accounts').select(['trans']).withoutValidatedRefs().serialize(),- schemaWithTombstone+ schemaWithTombstone,);expect(result.sql).not.toMatch('tombstone');// By default, the tombstone flag should be added if necessaryresult = generateSQLWithState(query('transactions').select(['amount']).serialize(),- schemaWithTombstone+ schemaWithTombstone,);expect(sqlLines(result.sql)).toEqual(sqlLines(`SELECT transactions.amount AS amount, transactions.id AS id FROM transactionsWHERE 1 AND transactions.tombstone = 0- `)+ `),);// `withDead` should not add the tombstone flagresult = generateSQLWithState(query('transactions').select(['amount']).withDead().serialize(),- schemaWithTombstone+ schemaWithTombstone,);expect(sqlLines(result.sql)).toEqual(sqlLines(`SELECT transactions.amount AS amount, transactions.id AS id FROM transactionsWHERE 1- `)+ `),);// The tombstone flag should also be added if joining@@ -204,7 +204,7 @@ describe('sheet language', () => {query('accounts').select(['trans.amount', 'trans.payee.name']).serialize(),- schemaWithTombstone+ schemaWithTombstone,);expect(sqlLines(result.sql)).toEqual(sqlLines(`@@ -212,7 +212,7 @@ describe('sheet language', () => {LEFT JOIN transactions transactions1 ON transactions1.id = accounts.trans AND transactions1.tombstone = 0LEFT JOIN payees payees2 ON payees2.id = transactions1.payee AND payees2.tombstone = 0WHERE 1- `)+ `),);// TODO: provide a way to customize joins, which would allow@@ -222,22 +222,22 @@ describe('sheet language', () => {it('`select` always includes the id', () => {let result = generateSQLWithState(query('payees').select('name').serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch('payees.id AS id');result = generateSQLWithState(query('payees').select(['name', 'id']).serialize(),- schemaWithRefs+ schemaWithRefs,);// id is only included once, we manually selected itexpect(result.sql).toMatch(- 'SELECT payees.name AS name, payees.id AS id FROM'+ 'SELECT payees.name AS name, payees.id AS id FROM',);result = generateSQLWithState(query('payees').select('name').groupBy('account').serialize(),- schemaWithRefs+ schemaWithRefs,);// id should not automatically by selected if using `groupBy`expect(result.sql).not.toMatch('payees.id AS id');@@ -250,14 +250,14 @@ describe('sheet language', () => {.filter({ 'payee.name': 'kroger' }).select(['amount']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect([...result.state.paths.keys()]).toEqual(['transactions.payee']);expect(sqlLines(result.sql)).toEqual(sqlLines(`SELECT transactions.amount AS amount, transactions.id AS id FROM transactionsLEFT JOIN payees payees1 ON payees1.id = transactions.payee- WHERE (payees1.name = 'kroger')`)+ WHERE (payees1.name = 'kroger')`),);// Make sure it works in a `get`@@ -266,7 +266,7 @@ describe('sheet language', () => {.filter({ amount: 123 }).select(['payee.name']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect([...result.state.paths.keys()]).toEqual(['transactions.payee']);expect(sqlLines(result.sql)).toEqual(@@ -274,7 +274,7 @@ describe('sheet language', () => {SELECT payees1.name AS "payee.name", transactions.id AS id FROM transactionsLEFT JOIN payees payees1 ON payees1.id = transactions.payeeWHERE (transactions.amount = 123)- `)+ `),);// Join tables deeply@@ -283,12 +283,12 @@ describe('sheet language', () => {.filter({ 'payee.account.trans1.amount': 234 }).select(['amount', 'payee.name']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect([...result.state.paths.keys()]).toEqual(['transactions.payee','transactions.payee.account',- 'transactions.payee.account.trans1'+ 'transactions.payee.account.trans1',]);expect(sqlLines(result.sql)).toEqual(sqlLines(`@@ -297,7 +297,7 @@ describe('sheet language', () => {LEFT JOIN accounts accounts2 ON accounts2.id = payees1.accountLEFT JOIN transactions transactions3 ON transactions3.id = accounts2.trans1WHERE (transactions3.amount = 234)- `)+ `),);});@@ -307,11 +307,11 @@ describe('sheet language', () => {.filter({'payee.account.trans1.amount': 1,'payee.account.trans2.amount': 2,- 'payee.account.trans3.amount': 3+ 'payee.account.trans3.amount': 3,}).select(['payee.account.trans2.payee']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect([...state.paths.keys()]).toEqual(['transactions.payee',@@ -319,7 +319,7 @@ describe('sheet language', () => {'transactions.payee.account.trans2','transactions.payee.account.trans2.payee','transactions.payee.account.trans1',- 'transactions.payee.account.trans3'+ 'transactions.payee.account.trans3',]);// It should not join `transactions.payee.account` multiple times,// only once@@ -335,14 +335,14 @@ describe('sheet language', () => {WHERE (transactions5.amount = 1AND transactions3.amount = 2AND transactions6.amount = 3)- `)+ `),);});it('groupBy should work', () => {let result = generateSQLWithState(query('transactions').groupBy('payee.name').select('id').serialize(),- schemaWithRefs+ schemaWithRefs,);expect(sqlLines(result.sql)).toEqual(sqlLines(`@@ -350,7 +350,7 @@ describe('sheet language', () => {LEFT JOIN payees payees1 ON payees1.id = transactions.payeeWHERE 1GROUP BY payees1.name- `)+ `),);// Allows functions@@ -359,7 +359,7 @@ describe('sheet language', () => {.groupBy({ $substr: ['$payee.name', 0, 4] }).select('id').serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch('GROUP BY SUBSTR(payees1.name, 0, 4)');});@@ -367,7 +367,7 @@ describe('sheet language', () => {it('orderBy should work', () => {let result = generateSQLWithState(query('transactions').orderBy('payee.name').select('id').serialize(),- schemaWithRefs+ schemaWithRefs,);expect(sqlLines(result.sql)).toEqual(sqlLines(`@@ -375,7 +375,7 @@ describe('sheet language', () => {LEFT JOIN payees payees1 ON payees1.id = transactions.payeeWHERE 1ORDER BY payees1.name- `)+ `),);// Allows complex ordering and specifying direction@@ -385,14 +385,14 @@ describe('sheet language', () => {'payee.id',{ 'payee.name': 'desc' },{ $substr: ['$payee.name', 0, 4] },- { $substr: ['$payee.name', 0, 4], $dir: 'desc' }+ { $substr: ['$payee.name', 0, 4], $dir: 'desc' },]).select('id').serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'ORDER BY payees1.id, payees1.name desc, SUBSTR(payees1.name, 0, 4), SUBSTR(payees1.name, 0, 4) desc'+ 'ORDER BY payees1.id, payees1.name desc, SUBSTR(payees1.name, 0, 4), SUBSTR(payees1.name, 0, 4) desc',);});@@ -401,23 +401,23 @@ describe('sheet language', () => {query('transactions').select(['id', { payeeName: { $substr: ['$payee.name', 0, 4] } }]).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'SELECT transactions.id AS id, SUBSTR(payees1.name, 0, 4) AS payeeName FROM transactions'+ 'SELECT transactions.id AS id, SUBSTR(payees1.name, 0, 4) AS payeeName FROM transactions',);result = generateSQLWithState(query('transactions').select(['id',- { name: { $substr: [{ $substr: ['$payee.name', 1, 5] }, 3, 4] } }+ { name: { $substr: [{ $substr: ['$payee.name', 1, 5] }, 3, 4] } },]).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'SELECT transactions.id AS id, SUBSTR(SUBSTR(payees1.name, 1, 5), 3, 4) AS name FROM'+ 'SELECT transactions.id AS id, SUBSTR(SUBSTR(payees1.name, 1, 5), 3, 4) AS name FROM',);});@@ -426,11 +426,11 @@ describe('sheet language', () => {query('transactions').filter({date: [{ $lt: '2020-01-01' }],- $or: [{ 'payee.name': 'foo' }, { 'payee.name': 'bar' }]+ $or: [{ 'payee.name': 'foo' }, { 'payee.name': 'bar' }],}).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(sqlLines(result.sql)).toEqual(sqlLines(`@@ -439,7 +439,7 @@ describe('sheet language', () => {WHERE (transactions.date < 20200101AND (payees1.name = 'foo'OR payees1.name = 'bar'))- `)+ `),);// Combining `$or` and `$and` works@@ -452,14 +452,14 @@ describe('sheet language', () => {{$and: [{ date: [{ $gt: '2019-12-31' }] },- { date: [{ $lt: '2020-01-01' }] }- ]- }- ]+ { date: [{ $lt: '2020-01-01' }] },+ ],+ },+ ],}).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(sqlLines(result.sql)).toEqual(sqlLines(`@@ -469,7 +469,7 @@ describe('sheet language', () => {OR payees1.name = 'bar'OR (transactions.date > 20191231AND transactions.date < 20200101)))- `)+ `),);// Giving a field an array implicitly ANDs the filters@@ -478,13 +478,13 @@ describe('sheet language', () => {.filter({ date: [{ $lt: '2020-01-01' }, { $gt: '2019-12-01' }] }).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(sqlLines(result.sql)).toEqual(sqlLines(`SELECT transactions.id AS id FROM transactionsWHERE (transactions.date < 20200101 AND transactions.date > 20191201)- `)+ `),);// Allows referencing fields@@ -493,13 +493,13 @@ describe('sheet language', () => {.filter({ amount: { $lt: '$amount2' } }).select(['id']).serialize(),- basicSchema+ basicSchema,);expect(sqlLines(result.sql)).toEqual(sqlLines(`SELECT transactions.id AS id FROM transactionsWHERE (transactions.amount < transactions.amount2)- `)+ `),);});@@ -507,29 +507,29 @@ describe('sheet language', () => {let result = generateSQLWithState(query('transactions').filter({- $and: { payee: 'payee1', amount: 12 }+ $and: { payee: 'payee1', amount: 12 },}).select(['id']).withoutValidatedRefs().serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- /WHERE \(\(transactions.payee = 'payee1'\s*\n\s*AND transactions.amount = 12\)\)/+ /WHERE \(\(transactions.payee = 'payee1'\s*\n\s*AND transactions.amount = 12\)\)/,);result = generateSQLWithState(query('transactions').filter({- $or: { payee: 'payee1', amount: 12 }+ $or: { payee: 'payee1', amount: 12 },}).select(['id']).withoutValidatedRefs().serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- /WHERE \(\(transactions.payee = 'payee1'\s*\n\s*OR transactions.amount = 12\)\)/+ /WHERE \(\(transactions.payee = 'payee1'\s*\n\s*OR transactions.amount = 12\)\)/,);});@@ -538,18 +538,18 @@ describe('sheet language', () => {let result = generateSQLWithState(query('transactions').filter({- 'payee.name': { $transform: { $substr: ['$', 0, 4] }, $lt: 'foo' }+ 'payee.name': { $transform: { $substr: ['$', 0, 4] }, $lt: 'foo' },}).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(sqlLines(result.sql)).toEqual(sqlLines(`SELECT transactions.id AS id FROM transactionsLEFT JOIN payees payees1 ON payees1.id = transactions.payeeWHERE (SUBSTR(payees1.name, 0, 4) < 'foo')- `)+ `),);// Allows transforming left-hand side and calling a function on@@ -557,14 +557,14 @@ describe('sheet language', () => {result = generateSQLWithState(query('transactions').filter({- date: { $transform: '$month', $lt: { $month: '$date' } }+ date: { $transform: '$month', $lt: { $month: '$date' } },}).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'WHERE (CAST(SUBSTR(transactions.date, 1, 6) AS integer) < CAST(SUBSTR(transactions.date, 1, 6) AS integer))'+ 'WHERE (CAST(SUBSTR(transactions.date, 1, 6) AS integer) < CAST(SUBSTR(transactions.date, 1, 6) AS integer))',);// Allows nesting functions@@ -572,34 +572,34 @@ describe('sheet language', () => {query('transactions').filter({'payee.name': {- $lt: { $substr: [{ $substr: ['$payee.name', 1, 5] }, 3, 4] }- }+ $lt: { $substr: [{ $substr: ['$payee.name', 1, 5] }, 3, 4] },+ },}).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'WHERE (payees1.name < SUBSTR(SUBSTR(payees1.name, 1, 5), 3, 4))'+ 'WHERE (payees1.name < SUBSTR(SUBSTR(payees1.name, 1, 5), 3, 4))',);});it('allows limit and offset', () => {let result = generateSQLWithState(query('transactions').select(['id']).limit(10).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(/\s+LIMIT 10\s*$/);result = generateSQLWithState(query('transactions').select(['id']).offset(11).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(/\s+OFFSET 11\s*$/);result = generateSQLWithState(query('transactions').select(['id']).limit(10).offset(11).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(/\s+LIMIT 10\s*\n\s*OFFSET 11\s*$/);});@@ -610,7 +610,7 @@ describe('sheet language', () => {.filter({ amount: ':amount' }).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch('transactions.amount = ?');@@ -619,7 +619,7 @@ describe('sheet language', () => {.filter({ amount: { $lt: { $neg: ':amount' } } }).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch('WHERE (transactions.amount < (-?))');@@ -629,10 +629,10 @@ describe('sheet language', () => {.filter({ date: { $transform: '$month', $eq: { $month: ':month' } } }).select().serialize(),- schemaWithRefs+ schemaWithRefs,);let monthParam = result.state.namedParameters.find(- p => p.paramName === 'month'+ p => p.paramName === 'month',);expect(monthParam.paramType).toBe('date-month');});@@ -644,14 +644,14 @@ describe('sheet language', () => {{tableViews: { transactions: 'v_transactions' },tableFilters: name =>- name === 'transactions' ? [{ amount: { $gt: 0 } }] : []- }+ name === 'transactions' ? [{ amount: { $gt: 0 } }] : [],+ },);expect(sqlLines(result.sql)).toEqual(sqlLines(`SELECT v_transactions.amount AS amount, v_transactions.id AS id FROM v_transactionsWHERE 1 AND (v_transactions.amount > 0)- `)+ `),);// Make sure the same customizations are applied when joining@@ -661,8 +661,8 @@ describe('sheet language', () => {{tableViews: { transactions: 'v_transactions' },tableFilters: name =>- name === 'transactions' ? [{ amount: { $gt: 0 } }] : []- }+ name === 'transactions' ? [{ amount: { $gt: 0 } }] : [],+ },);// The joined table should be customizedexpect(result.sql).toMatch('LEFT JOIN v_transactions');@@ -675,7 +675,7 @@ describe('sheet language', () => {SELECT transactions1.amount AS "trans1.amount", accounts.id AS id FROM accountsLEFT JOIN v_transactions transactions1 ON transactions1.id = accounts.trans1 AND (transactions1.amount > 0)WHERE 1- `)+ `),);// Internal table filters can't use paths@@ -686,9 +686,9 @@ describe('sheet language', () => {{tableViews: { transactions: 'v_transactions' },tableFilters: name =>- name === 'transactions' ? [{ 'payee.name': 'foo' }] : []- }- )+ name === 'transactions' ? [{ 'payee.name': 'foo' }] : [],+ },+ ),).toThrow(/cannot contain paths/);});@@ -699,14 +699,14 @@ describe('sheet language', () => {{tableViews: { transactions: 'v_transactions' },tableFilters: name =>- name === 'transactions' ? [{ amount: { $gt: 0 } }] : []- }+ name === 'transactions' ? [{ amount: { $gt: 0 } }] : [],+ },);expect(sqlLines(result.sql)).toEqual(sqlLines(`SELECT v_transactions.amount AS amount, v_transactions.id AS id FROM v_transactionsWHERE 1- `)+ `),);});@@ -717,7 +717,7 @@ describe('sheet language', () => {query('transactions').select({ month: { $month: '$payee.name2' } }).serialize(),- schemaWithRefs+ schemaWithRefs,);throw new Error('Test should have thrown');} catch (e) {@@ -734,14 +734,14 @@ describe('sheet language', () => {.filter({ date: { $transform: '$month', $eq: 10 } }).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);throw new Error('Test should have thrown');} catch (e) {expect(e.message).toMatch('Expression stack:');expect(e.message).toMatch('{"date":{"$transform":"$month","$eq":10}}');expect(e.message).toMatch(- 'filter({"date":{"$transform":"$month","$eq":10}})'+ 'filter({"date":{"$transform":"$month","$eq":10}})',);}@@ -752,7 +752,7 @@ describe('sheet language', () => {.groupBy({ $month: '$date2' }).select({ amount: { $sum: '$amount' } }).serialize(),- schemaWithRefs+ schemaWithRefs,);throw new Error('Test should have thrown');} catch (e) {@@ -769,7 +769,7 @@ describe('sheet language', () => {.orderBy({ $month: '$date2' }).select({ amount: { $sum: '$amount' } }).serialize(),- schemaWithRefs+ schemaWithRefs,);throw new Error('Test should have thrown');} catch (e) {@@ -786,7 +786,7 @@ describe('sheet language', () => {.filter({ id: { $oneof: ['one', 'two', 'three'] } }).select(['amount']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch("id IN ('one','two','three')");});@@ -799,7 +799,7 @@ describe('Type conversions', () => {.filter({ date: '2020-01-01' }).select(['id']).serialize(),- basicSchema+ basicSchema,);expect(result.sql).toMatch('WHERE (transactions.date = 20200101)');@@ -808,10 +808,10 @@ describe('Type conversions', () => {.filter({ date: { $transform: '$month', $eq: '2020-01' } }).select(['id']).serialize(),- basicSchema+ basicSchema,);expect(result.sql).toMatch(- 'WHERE (CAST(SUBSTR(transactions.date, 1, 6) AS integer) = 202001)'+ 'WHERE (CAST(SUBSTR(transactions.date, 1, 6) AS integer) = 202001)',);// You can also specify a full date that is auto-converted to month@@ -820,10 +820,10 @@ describe('Type conversions', () => {.filter({ date: { $transform: '$month', $eq: '2020-01-01' } }).select(['id']).serialize(),- basicSchema+ basicSchema,);expect(result.sql).toMatch(- 'WHERE (CAST(SUBSTR(transactions.date, 1, 6) AS integer) = 202001)'+ 'WHERE (CAST(SUBSTR(transactions.date, 1, 6) AS integer) = 202001)',);// You can also specify a full date that is auto-converted to month@@ -832,10 +832,10 @@ describe('Type conversions', () => {.filter({ date: { $transform: '$year', $eq: '2020-01-01' } }).select(['id']).serialize(),- basicSchema+ basicSchema,);expect(result.sql).toMatch(- 'WHERE (CAST(SUBSTR(transactions.date, 1, 4) AS integer) = 2020)'+ 'WHERE (CAST(SUBSTR(transactions.date, 1, 4) AS integer) = 2020)',);});@@ -843,14 +843,14 @@ describe('Type conversions', () => {let result = generateSQLWithState(query('accounts').filter({- 'trans1.date': { $transform: '$month', $eq: '$trans2.date' }+ 'trans1.date': { $transform: '$month', $eq: '$trans2.date' },}).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'WHERE (CAST(SUBSTR(transactions2.date, 1, 6) AS integer) = CAST(SUBSTR(transactions1.date, 1, 6) AS integer))'+ 'WHERE (CAST(SUBSTR(transactions2.date, 1, 6) AS integer) = CAST(SUBSTR(transactions1.date, 1, 6) AS integer))',);// You can also specify a full date that is auto-converted to month@@ -859,10 +859,10 @@ describe('Type conversions', () => {.filter({ 'trans1.date': { $transform: '$year', $eq: '$trans2.date' } }).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch(- 'WHERE (CAST(SUBSTR(transactions2.date, 1, 4) AS integer) = CAST(SUBSTR(transactions1.date, 1, 4) AS integer))'+ 'WHERE (CAST(SUBSTR(transactions2.date, 1, 4) AS integer) = CAST(SUBSTR(transactions1.date, 1, 4) AS integer))',);});@@ -870,7 +870,7 @@ describe('Type conversions', () => {expect(() => {generateSQLWithState(query('transactions').filter({ id: 'foo' }).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);}).not.toThrow();@@ -880,7 +880,7 @@ describe('Type conversions', () => {.filter({ id: '$trans1.id' }).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);}).not.toThrow();@@ -888,7 +888,7 @@ describe('Type conversions', () => {expect(() => {generateSQLWithState(query('transactions').filter({ id: 5 }).select(['id']).serialize(),- schemaWithRefs+ schemaWithRefs,);}).toThrow(/Can't convert/);});@@ -900,7 +900,7 @@ describe('Type conversions', () => {.filter({ amount3: 45 }).select(['id']).serialize(),- basicSchema+ basicSchema,);}).not.toThrow();@@ -911,7 +911,7 @@ describe('Type conversions', () => {.filter({ amount: 45.5 }).select(['id']).serialize(),- basicSchema+ basicSchema,);}).toThrow(/Can't convert/);});@@ -920,7 +920,7 @@ describe('Type conversions', () => {// With validated refslet result = generateSQLWithState(query('transactions').filter({ payee: null }).select().serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch('WHERE (payees1.id IS NULL)');@@ -931,7 +931,7 @@ describe('Type conversions', () => {.select().withoutValidatedRefs().serialize(),- schemaWithRefs+ schemaWithRefs,);expect(result.sql).toMatch('WHERE (transactions.payee IS NULL)');});diff --git a/packages/loot-core/src/server/aql/exec.js b/packages/loot-core/src/server/aql/exec.jsindex 5b75234ee4..afc81fd43a 100644--- a/packages/loot-core/src/server/aql/exec.js+++ b/packages/loot-core/src/server/aql/exec.js@@ -29,7 +29,7 @@ export async function execQuery(state,sqlPieces,params,- outputTypes+ outputTypes,) {let sql = defaultConstructQuery(queryState, state, sqlPieces);let data = await db.all(sql, params);@@ -41,7 +41,7 @@ export async function runCompiledQuery(query,pieces,state,- { params = {}, executors = {} } = {}+ { params = {}, executors = {} } = {},) {let paramArray = state.namedParameters.map(param => {let name = param.paramName;@@ -58,7 +58,7 @@ export async function runCompiledQuery(query,pieces,paramArray,- state.outputTypes+ state.outputTypes,);} else {data = await execQuery(query, state, pieces, paramArray, state.outputTypes);diff --git a/packages/loot-core/src/server/aql/exec.test.js b/packages/loot-core/src/server/aql/exec.test.jsindex 0e5cfc463f..f5c5294fdc 100644--- a/packages/loot-core/src/server/aql/exec.test.js+++ b/packages/loot-core/src/server/aql/exec.test.js@@ -29,12 +29,12 @@ async function insertTransactions(repeatTimes = 1) {let cat1 = await db.insertCategory({id: 'cat' + i + 'a',name: 'cat' + i + 'a',- cat_group: group+ cat_group: group,});let cat2 = await db.insertCategory({id: 'cat' + i + 'b',name: 'cat' + i + 'b',- cat_group: group+ cat_group: group,});let parent = {@@ -42,14 +42,14 @@ async function insertTransactions(repeatTimes = 1) {account: 'acct',date: '2020-01-04',amount: -100,- is_parent: true+ is_parent: true,};let parent2 = {id: uuid.v4Sync(),account: 'acct',date: '2020-01-01',amount: -89,- is_parent: true+ is_parent: true,};transactions = transactions.concat([@@ -61,7 +61,7 @@ async function insertTransactions(repeatTimes = 1) {parent2,makeChild(parent2, { amount: -9, category: cat2 }),makeChild(parent2, { amount: -80, category: cat1 }),- { account: 'acct', date: '2020-01-03', amount: -53, category: cat1 }+ { account: 'acct', date: '2020-01-03', amount: -53, category: cat1 },]);}@@ -76,7 +76,7 @@ describe('runQuery', () => {// datelet { data } = await runQuery(- query('transactions').select('date').serialize()+ query('transactions').select('date').serialize(),);expect(data[0].date).toBe('2020-01-04');@@ -85,7 +85,7 @@ describe('runQuery', () => {await runQuery(query('transactions').select({ month: { $month: '$date' } })- .serialize()+ .serialize(),)).data;expect(data[0].month).toBe('2020-01');@@ -95,7 +95,7 @@ describe('runQuery', () => {await runQuery(query('transactions').select({ year: { $year: '$date' } })- .serialize()+ .serialize(),)).data;expect(data[0].year).toBe('2020');@@ -106,7 +106,7 @@ describe('runQuery', () => {query('transactions').select(['is_child', 'is_parent']).raw()- .serialize()+ .serialize(),)).data;expect(data[0].is_child).toBe(false);@@ -122,7 +122,7 @@ describe('runQuery', () => {account: 'acct',date: '2020-01-01',amount: -5001,- cleared: true+ cleared: true,});let { data } = await runQuery(@@ -130,7 +130,7 @@ describe('runQuery', () => {.filter({ amount: { $lt: { $neg: ':amount' } } }).select().serialize(),- { params: { amount: 5000 } }+ { params: { amount: 5000 } },);expect(data[0].id).toBe(transId);@@ -140,7 +140,7 @@ describe('runQuery', () => {.filter({ date: { $transform: '$month', $eq: { $month: ':month' } } }).select('date').serialize(),- { params: { month: '2020-01-02' } }+ { params: { month: '2020-01-02' } },)).data;expect(data[0].id).toBe(transId);@@ -151,7 +151,7 @@ describe('runQuery', () => {.filter({ date: { $transform: '$year', $eq: { $year: ':month' } } }).select('date').serialize(),- { params: { month: '2020-01-02' } }+ { params: { month: '2020-01-02' } },)).data;expect(data[0].id).toBe(transId);@@ -162,7 +162,7 @@ describe('runQuery', () => {.filter({ cleared: ':cleared' }).select('date').serialize(),- { params: { cleared: true } }+ { params: { cleared: true } },)).data;expect(data[0].id).toBe(transId);@@ -175,13 +175,13 @@ describe('runQuery', () => {account: 'acct',date: '2020-01-01',amount: -5001,- category: null+ category: null,});let transCat = await db.insertTransaction({account: 'acct',date: '2020-01-01',amount: -5001,- category: 'cat'+ category: 'cat',});let queryState = query('transactions')@@ -202,18 +202,18 @@ describe('runQuery', () => {id: transId,account: 'acct',date: '2020-01-01',- amount: -5001+ amount: -5001,});let { data } = await runQuery(query('transactions').filter({amount: { $lt: { $neg: ':amount' } },- date: [{ $lte: ':date' }, { $gte: ':date' }]+ date: [{ $lte: ':date' }, { $gte: ':date' }],}).select().serialize(),- { params: { amount: 5000, date: '2020-01-01' } }+ { params: { amount: 5000, date: '2020-01-01' } },);expect(data[0].id).toBe(transId);});@@ -230,7 +230,7 @@ describe('runQuery', () => {.filter({ id: { $oneof: repeat(ids, 1000) }, amount: { $lt: 50 } }).select('id').raw()- .serialize()+ .serialize(),);expect(data.map(row => row.id).sort()).toEqual(ids);});diff --git a/packages/loot-core/src/server/aql/index.js b/packages/loot-core/src/server/aql/index.jsindex 493010c65e..764408a608 100644--- a/packages/loot-core/src/server/aql/index.js+++ b/packages/loot-core/src/server/aql/index.js@@ -2,7 +2,7 @@ export {convertForInsert,convertForUpdate,convertFromSelect,- convertInputType+ convertInputType,} from './schema-helpers';export { compileQuery } from './compiler';export { makeViews } from './views';diff --git a/packages/loot-core/src/server/aql/schema-helpers.js b/packages/loot-core/src/server/aql/schema-helpers.jsindex b9afc3b2ac..f3091fec2b 100644--- a/packages/loot-core/src/server/aql/schema-helpers.js+++ b/packages/loot-core/src/server/aql/schema-helpers.js@@ -112,16 +112,16 @@ export function conform(schema, schemaConfig, table, obj, { skipNull } = {}) {if (fieldDesc == null) {throw new Error(`Field "${field}" does not exist on table ${table}: ${JSON.stringify(- obj- )}`+ obj,+ )}`,);}if (isRequired(field, fieldDesc) && obj[field] == null) {throw new Error(`"${field}" is required for table "${table}": ${JSON.stringify(- obj- )}`+ obj,+ )}`,);}@@ -132,7 +132,7 @@ export function conform(schema, schemaConfig, table, obj, { skipNull } = {}) {return [fieldRef(field), convertInputType(obj[field], fieldDesc.type)];})- .filter(Boolean)+ .filter(Boolean),);}@@ -160,7 +160,7 @@ export function convertForInsert(schema, schemaConfig, table, rawObj) {// checks the fields in `obj`. For insert, we need to do it// here to check that all required fields in the table existthrow new Error(- `"${field}" is required for table "${table}": ${JSON.stringify(obj)}`+ `"${field}" is required for table "${table}": ${JSON.stringify(obj)}`,);}}diff --git a/packages/loot-core/src/server/aql/schema-helpers.test.js b/packages/loot-core/src/server/aql/schema-helpers.test.jsindex e7ff6767e0..bc3b4855d5 100644--- a/packages/loot-core/src/server/aql/schema-helpers.test.js+++ b/packages/loot-core/src/server/aql/schema-helpers.test.js@@ -2,7 +2,7 @@ import {conform,convertForInsert,convertForUpdate,- convertFromSelect+ convertFromSelect,} from './schema-helpers';let basicSchema = {@@ -13,8 +13,8 @@ let basicSchema = {amount: { type: 'integer', default: 0, required: true },cleared: { type: 'boolean', default: true },notes: { type: 'text' },- sort_order: { type: 'float', default: () => Date.now() }- }+ sort_order: { type: 'float', default: () => Date.now() },+ },};describe('schema-helpers', () => {@@ -22,12 +22,12 @@ describe('schema-helpers', () => {let trans = convertFromSelect(basicSchema, {}, 'transactions', {amount: 5,cleared: 0,- date: 20200101+ date: 20200101,});expect(trans).toEqual({amount: 5,cleared: false,- date: '2020-01-01'+ date: '2020-01-01',});});@@ -36,7 +36,7 @@ describe('schema-helpers', () => {id: 't1',account: 'foo',amount: 5,- date: '2020-01-01'+ date: '2020-01-01',});expect(trans).toEqual({id: 't1',@@ -44,14 +44,14 @@ describe('schema-helpers', () => {amount: 5,cleared: 1,date: 20200101,- sort_order: 123456789+ sort_order: 123456789,});});test('a basic update works', () => {let trans = convertForUpdate(basicSchema, {}, 'transactions', {id: 'foo',- amount: 5001+ amount: 5001,});expect(trans).toEqual({ id: 'foo', amount: 5001 });});@@ -61,7 +61,7 @@ describe('schema-helpers', () => {convertForInsert(basicSchema, {}, 'transactions2', {id: 't1',account: 'foo',- amount: 5+ amount: 5,});}).toThrow(/"transactions2" does not exist/);@@ -69,7 +69,7 @@ describe('schema-helpers', () => {convertForInsert(basicSchema, {}, 'transactions', {id: 't1',account: 'foo',- amount: 5+ amount: 5,});}).toThrow(/"date" is required/);@@ -78,7 +78,7 @@ describe('schema-helpers', () => {id: 't1',account: 'foo',amount: 5,- date: null+ date: null,});}).toThrow(/"date" is required/);});@@ -88,7 +88,7 @@ describe('schema-helpers', () => {convertForUpdate(basicSchema, {}, 'transactions2', {id: 'trans',account: 'acct',- amount: 5+ amount: 5,});}).toThrow(/"transactions2" does not exist/);@@ -96,7 +96,7 @@ describe('schema-helpers', () => {convertForUpdate(basicSchema, {}, 'transactions', {id: 'trans',account: 'acct',- amount: 5+ amount: 5,});}).not.toThrow(/"date" is required/);@@ -105,7 +105,7 @@ describe('schema-helpers', () => {id: 'trans',account: 'acct',amount: 5,- date: null+ date: null,});}).toThrow(/"date" is required/);@@ -114,7 +114,7 @@ describe('schema-helpers', () => {convertForUpdate(basicSchema, {}, 'transactions', {id: 'trans',account: 'acct',- amount: null+ amount: null,});}).toThrow(/"amount" is required/);});@@ -122,7 +122,7 @@ describe('schema-helpers', () => {test('conform converts types to db representations', () => {let obj = conform(basicSchema, {}, 'transactions', {date: '2020-01-01',- cleared: false+ cleared: false,});expect(obj.date).toBe(20200101);expect(obj.cleared).toBe(0);@@ -133,11 +133,11 @@ describe('schema-helpers', () => {basicSchema,{views: {- transactions: { fields: { amount: 'amount2', cleared: 'cleared2' } }- }+ transactions: { fields: { amount: 'amount2', cleared: 'cleared2' } },+ },},'transactions',- { amount: 100, cleared: false, date: '2020-01-01' }+ { amount: 100, cleared: false, date: '2020-01-01' },);expect(obj.amount2).toBe(100);expect(obj.cleared2).toBe(0);@@ -151,7 +151,7 @@ describe('schema-helpers', () => {id: 't1',account: 'foo',date: '2020-01-01',- cleared: null+ cleared: null,});expect(trans).toEqual({id: 't1',@@ -159,17 +159,17 @@ describe('schema-helpers', () => {amount: 0,date: 20200101,cleared: 1,- sort_order: 123456789+ sort_order: 123456789,});// Updates should never apply defaultstrans = convertForUpdate(basicSchema, {}, 'transactions', {id: 'id',- cleared: null+ cleared: null,});expect(trans).toEqual({id: 'id',- cleared: 0+ cleared: 0,});});@@ -179,7 +179,7 @@ describe('schema-helpers', () => {id: 't1',account: 'foo',date: '2020-01-01',- notes: null+ notes: null,});expect(trans).toEqual({id: 't1',@@ -187,17 +187,17 @@ describe('schema-helpers', () => {date: 20200101,amount: 0,cleared: 1,- sort_order: 123456789+ sort_order: 123456789,});// `notes` is null and must be included in an updatetrans = convertForUpdate(basicSchema, {}, 'transactions', {id: 'id',- notes: null+ notes: null,});expect(trans).toEqual({id: 'id',- notes: null+ notes: null,});});@@ -205,7 +205,7 @@ describe('schema-helpers', () => {expect(() => {convertForUpdate(basicSchema, {}, 'transactions', {id: 'id',- amount: 45.5+ amount: 45.5,});}).toThrow("Can't convert to integer");});diff --git a/packages/loot-core/src/server/aql/schema/executors.js b/packages/loot-core/src/server/aql/schema/executors.jsindex f7a1b2ccef..2784f1f2c7 100644--- a/packages/loot-core/src/server/aql/schema/executors.js+++ b/packages/loot-core/src/server/aql/schema/executors.js@@ -11,7 +11,7 @@ export function toGroup(parents, children, mapper = x => x) {let childs = children.get(parent.id) || [];list.push({...mapper(parent),- subtransactions: childs.map(mapper)+ subtransactions: childs.map(mapper),});return list;}, []);@@ -41,7 +41,7 @@ function execTransactions(state, query, sql, params, outputTypes) {sql,params,splitType,- outputTypes+ outputTypes,);} else if (splitType === 'grouped') {return execTransactionsGrouped(@@ -50,7 +50,7 @@ function execTransactions(state, query, sql, params, outputTypes) {sql,params,splitType,- outputTypes+ outputTypes,);}}@@ -80,7 +80,7 @@ async function execTransactionsGrouped(sql,params,splitType,- outputTypes+ outputTypes,) {let { withDead } = queryState;let whereDead = withDead ? '' : `AND ${sql.from}.tombstone = 0`;@@ -144,14 +144,14 @@ async function execTransactionsGrouped(matched = new Set([].concat.apply([],- rows.map(row => row.matched.split(','))- )+ rows.map(row => row.matched.split(',')),+ ),);}let where = whereIn(rows.map(row => row.group_id),- `IFNULL(${sql.from}.parent_id, ${sql.from}.id)`+ `IFNULL(${sql.from}.parent_id, ${sql.from}.id)`,);let finalSql = `SELECT ${sql.select}, parent_id AS _parent_id FROM ${sql.from}@@ -177,7 +177,7 @@ async function execTransactionsGrouped(}return acc;},- { parents: [], children: new Map() }+ { parents: [], children: new Map() },);let mapper = trans => {@@ -200,7 +200,7 @@ async function execTransactionsBasic(sql,params,splitType,- outputTypes+ outputTypes,) {let s = { ...sql };@@ -216,5 +216,5 @@ async function execTransactionsBasic(}export default {- transactions: execTransactions+ transactions: execTransactions,};diff --git a/packages/loot-core/src/server/aql/schema/executors.test.js b/packages/loot-core/src/server/aql/schema/executors.test.jsindex e2a5d5130f..1d9d9187f7 100644--- a/packages/loot-core/src/server/aql/schema/executors.test.js+++ b/packages/loot-core/src/server/aql/schema/executors.test.js@@ -43,7 +43,7 @@ async function insertTransactions(transactions, payeeIds) {for (let i = 0; i < payeeIds.length; i++) {await db.insertPayee({id: payeeIds[i],- name: 'payee' + (i + 1)+ name: 'payee' + (i + 1),});}}@@ -55,7 +55,7 @@ function expectTransactionOrder(data, fields) {{ date: 'desc' },'starting_balance_flag',{ sort_order: 'desc' },- 'id'+ 'id',];let sorted = [...data].sort((i1, i2) => {@@ -104,7 +104,7 @@ async function expectPagedData(query, numTransactions, allData) {// Pull in all the data via pageslet { data } = await runQuery(- query.limit(pageCount).offset(pagedData.length).serialize()+ query.limit(pageCount).offset(pagedData.length).serialize(),);expect(data.length).toBeLessThanOrEqual(pageCount);@@ -130,7 +130,7 @@ describe('transaction executors', () => {arbs.makeTransactionArray({splitFreq: 2,minLength: 2,- maxLength: 20+ maxLength: 20,}),async arr => {await insertTransactions(arr);@@ -140,7 +140,7 @@ describe('transaction executors', () => {.filter({ amount: { $lt: 0 } }).select('*').options({ splits: 'inline' })- .serialize()+ .serialize(),);expect(data.filter(t => t.is_parent).length).toBe(0);@@ -150,14 +150,14 @@ describe('transaction executors', () => {query('transactions').filter({ amount: { $lt: 0 } }).select('*')- .serialize()+ .serialize(),);// inline should be the defaultexpect(defaultData).toEqual(data);- }+ },),- { numRuns: 50 }+ { numRuns: 50 },);});@@ -167,7 +167,7 @@ describe('transaction executors', () => {arbs.makeTransactionArray({splitFreq: 2,minLength: 2,- maxLength: 8+ maxLength: 8,}),async arr => {await insertTransactions(arr);@@ -177,13 +177,13 @@ describe('transaction executors', () => {.filter({ amount: { $lt: 0 } }).select('*').options({ splits: 'none' })- .serialize()+ .serialize(),);expect(data.filter(t => t.is_child).length).toBe(0);- }+ },),- { numRuns: 50 }+ { numRuns: 50 },);});@@ -200,7 +200,7 @@ describe('transaction executors', () => {let aggQuery = query('transactions').filter({$or: [{ amount: { $lt: -5 } }, { amount: { $gt: -2 } }],- 'payee.name': { $gt: '' }+ 'payee.name': { $gt: '' },}).options({ splits: 'grouped' }).calculate({ $sum: '$amount' });@@ -217,7 +217,7 @@ describe('transaction executors', () => {}, 0);expect(data).toBe(sum);- }+ },).beforeEach(() => {setClock(null);@@ -227,7 +227,7 @@ describe('transaction executors', () => {DELETE FROM payees;DELETE FROM payee_mapping;`);- })+ }),);});@@ -282,7 +282,7 @@ describe('transaction executors', () => {expect(trans.category).toBe(null);expect(trans.subtransactions.length).toBe(- allTransactions.filter(t => t.parent_id === trans.id).length+ allTransactions.filter(t => t.parent_id === trans.id).length,);// Subtransactions should be ordered as well@@ -316,9 +316,9 @@ describe('transaction executors', () => {arbs.makeTransactionArray({splitFreq: 0.1,payeeIds,- maxLength: 100+ maxLength: 100,}),- check+ check,).beforeEach(() => {setClock(null);@@ -329,14 +329,14 @@ describe('transaction executors', () => {DELETE FROM payee_mapping;`);}),- { numRuns: 300 }+ { numRuns: 300 },);}it('queries the correct transactions without filters', async () => {return runTest(arr => {let expectedIds = new Set(- arr.filter(t => !t.tombstone && !t.is_child).map(t => t.id)+ arr.filter(t => !t.tombstone && !t.is_child).map(t => t.id),);// Even though we're applying some filters, these are always@@ -344,7 +344,7 @@ describe('transaction executors', () => {// should take the optimized pathlet happyQuery = query('transactions').filter({- date: { $gt: '2017-01-01' }+ date: { $gt: '2017-01-01' },}).options({ splits: 'grouped' }).select(['*', 'payee.name']);@@ -354,7 +354,7 @@ describe('transaction executors', () => {return {expectedIds,- query: happyQuery+ query: happyQuery,};});});@@ -395,7 +395,7 @@ describe('transaction executors', () => {.filter({id: [{ $oneof: ids }],payee: { $gt: '' },- $or: [{ amount: { $lt: -2 } }, { amount: { $gt: -1 } }]+ $or: [{ amount: { $lt: -2 } }, { amount: { $gt: -1 } }],}).options({ splits: 'grouped' }).select(['*', 'payee.name'])@@ -408,7 +408,7 @@ describe('transaction executors', () => {return {expectedIds,expectedMatchedIds: matched,- query: unhappyQuery+ query: unhappyQuery,};});});diff --git a/packages/loot-core/src/server/aql/schema/index.js b/packages/loot-core/src/server/aql/schema/index.jsindex 4c0b2dd81f..7dd71366b3 100644--- a/packages/loot-core/src/server/aql/schema/index.js+++ b/packages/loot-core/src/server/aql/schema/index.js@@ -48,7 +48,7 @@ export const schema = {sort_order: f('float', { default: () => Date.now() }),cleared: f('boolean', { default: true }),tombstone: f('boolean'),- schedule: f('id', { ref: 'schedules' })+ schedule: f('id', { ref: 'schedules' }),// subtransactions is a special field added if the table has the// `splits: grouped` option},@@ -56,7 +56,7 @@ export const schema = {id: f('id'),name: f('string', { required: true }),transfer_acct: f('id', { ref: 'accounts' }),- tombstone: f('boolean')+ tombstone: f('boolean'),},accounts: {id: f('id'),@@ -66,7 +66,7 @@ export const schema = {offbudget: f('boolean'),closed: f('boolean'),sort_order: f('float'),- tombstone: f('boolean')+ tombstone: f('boolean'),},categories: {id: f('id'),@@ -74,14 +74,14 @@ export const schema = {is_income: f('boolean'),group: f('id', { ref: 'category_groups' }),sort_order: f('float'),- tombstone: f('boolean')+ tombstone: f('boolean'),},category_groups: {id: f('id'),name: f('string'),is_income: f('boolean'),sort_order: f('float'),- tombstone: f('boolean')+ tombstone: f('boolean'),},schedules: {id: f('id'),@@ -99,19 +99,19 @@ export const schema = {_amountOp: f('string'),_date: f('json/fallback'),_conditions: f('json'),- _actions: f('json')+ _actions: f('json'),},rules: {id: f('id'),stage: f('string'),conditions: f('json'),actions: f('json'),- tombstone: f('boolean')+ tombstone: f('boolean'),},notes: {id: f('id'),- note: f('string')- }+ note: f('string'),+ },};export const schemaConfig = {@@ -169,12 +169,12 @@ export const schemaConfig = {{ date: 'desc' },'starting_balance_flag',{ sort_order: 'desc' },- 'id'+ 'id',];case 'payees':return [{ $condition: { transfer_acct: null }, $dir: 'desc' },- { $nocase: '$name' }+ { $nocase: '$name' },];case 'accounts':return ['sort_order', 'name'];@@ -188,7 +188,7 @@ export const schemaConfig = {return {...queryState,- orderExpressions: orderBy(queryState.orderExpressions)+ orderExpressions: orderBy(queryState.orderExpressions),};},@@ -196,7 +196,7 @@ export const schemaConfig = {payees: {v_payees: internalFields => {let fields = internalFields({- name: 'COALESCE(__accounts.name, _.name)'+ name: 'COALESCE(__accounts.name, _.name)',});return `@@ -206,18 +206,18 @@ export const schemaConfig = {-- Either this isn't a transfer payee, if the account existsWHERE _.transfer_acct IS NULL OR __accounts.id IS NOT NULL`;- }+ },},categories: {fields: {- group: 'cat_group'+ group: 'cat_group',},v_categories: internalFields => {let fields = internalFields({ group: 'cat_group' });return `SELECT ${fields} FROM categories _`;- }+ },},schedules: {@@ -235,7 +235,7 @@ export const schemaConfig = {_amountOp: `json_extract(_rules.conditions, _paths.amount || '.op')`,_date: `json_extract(_rules.conditions, _paths.date || '.value')`,_conditions: '_rules.conditions',- _actions: '_rules.actions'+ _actions: '_rules.actions',});return `@@ -245,7 +245,7 @@ export const schemaConfig = {LEFT JOIN rules _rules ON _rules.id = _.ruleLEFT JOIN payee_mapping pm ON pm.id = json_extract(_rules.conditions, _paths.payee || '.value')`;- }+ },},transactions: {@@ -256,7 +256,7 @@ export const schemaConfig = {imported_id: 'financial_id',imported_payee: 'imported_description',transfer_id: 'transferred_id',- payee: 'description'+ payee: 'description',},v_transactions_internal: internalFields => {@@ -265,7 +265,7 @@ export const schemaConfig = {payee: 'pm.targetId',category: `CASE WHEN _.isParent = 1 THEN NULL ELSE cm.transferId END`,amount: `IFNULL(_.amount, 0)`,- parent_id: 'CASE WHEN _.isChild = 0 THEN NULL ELSE _.parent_id END'+ parent_id: 'CASE WHEN _.isChild = 0 THEN NULL ELSE _.parent_id END',});return `@@ -292,7 +292,7 @@ export const schemaConfig = {let fields = publicFields({payee: 'p.id',category: 'c.id',- account: 'a.id'+ account: 'a.id',});// This adds an order, and also validates any id references by@@ -305,7 +305,7 @@ export const schemaConfig = {LEFT JOIN accounts a ON (a.id = _.account AND a.tombstone = 0)ORDER BY _.date desc, _.starting_balance_flag, _.sort_order desc, _.id;`;- }- }- }+ },+ },+ },};diff --git a/packages/loot-core/src/server/aql/schema/index.test.js b/packages/loot-core/src/server/aql/schema/index.test.jsindex 8b543e3a5c..1d9d4084a1 100644--- a/packages/loot-core/src/server/aql/schema/index.test.js+++ b/packages/loot-core/src/server/aql/schema/index.test.js@@ -28,7 +28,7 @@ describe('schema', () => {expect((await db.all('SELECT * FROM v_transactions')).length).toBe(0);await db.runQuery('INSERT INTO transactions (date, acct, isChild) VALUES (?, ?, ?)',- [20200101, 'foo', 1]+ [20200101, 'foo', 1],);expect((await db.all('SELECT * FROM transactions')).length).toBe(1);expect((await db.all('SELECT * FROM v_transactions')).length).toBe(0);diff --git a/packages/loot-core/src/server/aql/schema/run-query.js b/packages/loot-core/src/server/aql/schema/run-query.jsindex b12488f3d3..de78a332cc 100644--- a/packages/loot-core/src/server/aql/schema/run-query.js+++ b/packages/loot-core/src/server/aql/schema/run-query.js@@ -1,7 +1,7 @@import { Query } from '../../../shared/query';import {runQuery as _runQuery,- runCompiledQuery as _runCompiledQuery+ runCompiledQuery as _runCompiledQuery,} from '../exec';import schemaExecutors from './executors';@@ -11,7 +11,7 @@ import { schema, schemaConfig } from './index';export function runCompiledQuery(query, sqlPieces, state, params) {return _runCompiledQuery(query, sqlPieces, state, {params,- executors: schemaExecutors+ executors: schemaExecutors,});}@@ -22,6 +22,6 @@ export function runQuery(query, params) {return _runQuery(schema, schemaConfig, query, {params,- executors: schemaExecutors+ executors: schemaExecutors,});}diff --git a/packages/loot-core/src/server/aql/views.js b/packages/loot-core/src/server/aql/views.jsindex 659fc462e1..31f21269c1 100644--- a/packages/loot-core/src/server/aql/views.js+++ b/packages/loot-core/src/server/aql/views.js@@ -23,7 +23,7 @@ export function makeViews(schema, schemaConfig) {let { fields: fieldMappings = {}, ...tableViews } = views[table];let publicFields = Object.fromEntries(- Object.keys(schema[table]).map(name => [name, name])+ Object.keys(schema[table]).map(name => [name, name]),);let internalFields = { ...publicFields, ...fieldMappings };diff --git a/packages/loot-core/src/server/aql/views.test.js b/packages/loot-core/src/server/aql/views.test.jsindex bb6d46b5fc..b94d38124e 100644--- a/packages/loot-core/src/server/aql/views.test.js+++ b/packages/loot-core/src/server/aql/views.test.js@@ -8,20 +8,20 @@ const schema = {transactions: {id: { type: 'id' },amount: { type: 'integer' },- transfer_id: { type: 'integer' }- }+ transfer_id: { type: 'integer' },+ },};const schemaConfig = {views: {transactions: {fields: {- amount: 'a_mo_unt'+ amount: 'a_mo_unt',},v_transactions1: internalFields => {let fields = internalFields({- transfer_id: 'CASE WHEN amount < 4 THEN null ELSE transfer_id END'+ transfer_id: 'CASE WHEN amount < 4 THEN null ELSE transfer_id END',});return `SELECT ${fields} FROM transactions`;@@ -29,13 +29,13 @@ const schemaConfig = {v_transactions2: (_, publicFields) => {let fields = publicFields({- transfer_id: 'COERCE(transfer_id, "foo")'+ transfer_id: 'COERCE(transfer_id, "foo")',});return `SELECT ${fields} FROM v_transactions1`;- }- }- }+ },+ },+ },};describe('schema views', () => {@@ -43,16 +43,16 @@ describe('schema views', () => {let str = makeViews(schema, schemaConfig);expect(str).toMatch('DROP VIEW IF EXISTS v_transactions1;');expect(str).toMatch(- 'CREATE VIEW v_transactions1 AS SELECT _.id, _.a_mo_unt AS amount, CASE WHEN amount < 4 THEN null ELSE transfer_id END AS transfer_id FROM transactions;'+ 'CREATE VIEW v_transactions1 AS SELECT _.id, _.a_mo_unt AS amount, CASE WHEN amount < 4 THEN null ELSE transfer_id END AS transfer_id FROM transactions;',);expect(str).toMatch('DROP VIEW IF EXISTS v_transactions2;');expect(str).toMatch(- 'CREATE VIEW v_transactions2 AS SELECT _.id, _.amount, COERCE(transfer_id, "foo") AS transfer_id FROM v_transactions1;'+ 'CREATE VIEW v_transactions2 AS SELECT _.id, _.amount, COERCE(transfer_id, "foo") AS transfer_id FROM v_transactions1;',);db.execQuery('DROP TABLE transactions');db.execQuery(- 'CREATE TABLE transactions (id TEXT PRIMARY KEY, a_mo_unt INTEGER, transfer_id TEXT)'+ 'CREATE TABLE transactions (id TEXT PRIMARY KEY, a_mo_unt INTEGER, transfer_id TEXT)',);// Make sure the string is valid SQLdiff --git a/packages/loot-core/src/server/backups.js b/packages/loot-core/src/server/backups.jsindex f0efe08bfe..25a051510c 100644--- a/packages/loot-core/src/server/backups.js+++ b/packages/loot-core/src/server/backups.js@@ -30,9 +30,9 @@ export async function getBackups(id) {const mtime = await fs.getModifiedTime(fs.join(backupDir, path));return {id: path,- date: new Date(mtime)+ date: new Date(mtime),};- })+ }),);backups.sort((b1, b2) => {@@ -53,7 +53,7 @@ export async function getLatestBackup(id) {return {id: LATEST_BACKUP_FILENAME,date: null,- isLatest: true+ isLatest: true,};}return null;@@ -69,7 +69,7 @@ export async function getAvailableBackups(id) {backups = backups.map(backup => ({...backup,- date: backup.date ? dateFns.format(backup.date, 'yyyy-MM-dd h:mm') : null+ date: backup.date ? dateFns.format(backup.date, 'yyyy-MM-dd h:mm') : null,}));return backups;@@ -141,12 +141,12 @@ export async function loadBackup(id, backupId) {// current version so the user can easily revert back to itawait fs.copyFile(fs.join(budgetDir, 'db.sqlite'),- fs.join(budgetDir, LATEST_BACKUP_FILENAME)+ fs.join(budgetDir, LATEST_BACKUP_FILENAME),);await fs.copyFile(fs.join(budgetDir, 'metadata.json'),- fs.join(budgetDir, 'metadata.latest.json')+ fs.join(budgetDir, 'metadata.latest.json'),);// Restart the backup service to make sure the user has the full@@ -164,11 +164,11 @@ export async function loadBackup(id, backupId) {// backupawait fs.copyFile(fs.join(budgetDir, LATEST_BACKUP_FILENAME),- fs.join(budgetDir, 'db.sqlite')+ fs.join(budgetDir, 'db.sqlite'),);await fs.copyFile(fs.join(budgetDir, 'metadata.latest.json'),- fs.join(budgetDir, 'metadata.json')+ fs.join(budgetDir, 'metadata.json'),);await fs.removeFile(fs.join(budgetDir, LATEST_BACKUP_FILENAME));await fs.removeFile(fs.join(budgetDir, 'metadata.latest.json'));@@ -189,7 +189,7 @@ export async function loadBackup(id, backupId) {await prefs.savePrefs({groupId: null,lastSyncedTimestamp: null,- lastUploaded: null+ lastUploaded: null,});// Re-upload the new file@@ -201,7 +201,7 @@ export async function loadBackup(id, backupId) {await fs.copyFile(fs.join(budgetDir, 'backups', backupId),- fs.join(budgetDir, 'db.sqlite')+ fs.join(budgetDir, 'db.sqlite'),);}}diff --git a/packages/loot-core/src/server/backups.test.js b/packages/loot-core/src/server/backups.test.jsindex a1c86cbf78..491f6633f5 100644--- a/packages/loot-core/src/server/backups.test.js+++ b/packages/loot-core/src/server/backups.test.js@@ -12,7 +12,7 @@ describe('Backups', () => {function cleanDates(backups) {return backups.map(backup => ({id: backup.id,- date: dateFns.format(backup.date, 'yyyy-MM-dd')+ date: dateFns.format(backup.date, 'yyyy-MM-dd'),}));}@@ -23,9 +23,9 @@ describe('Backups', () => {{ id: 'backup1', date: dateFns.parseISO('2017-01-01') },{ id: 'backup2', date: dateFns.parseISO('2017-01-01') },{ id: 'backup3', date: dateFns.parseISO('2017-01-01') },- { id: 'backup4', date: dateFns.parseISO('2017-01-01') }- ])- )+ { id: 'backup4', date: dateFns.parseISO('2017-01-01') },+ ]),+ ),).toMatchSnapshot();// Should not delete any since up to 3 are allowed on the current@@ -36,9 +36,9 @@ describe('Backups', () => {{ id: 'backup1', date: dateFns.parseISO('2017-01-01') },{ id: 'backup2', date: dateFns.parseISO('2017-01-01') },{ id: 'backup3', date: dateFns.parseISO('2016-12-30') },- { id: 'backup4', date: dateFns.parseISO('2016-12-29') }- ])- )+ { id: 'backup4', date: dateFns.parseISO('2016-12-29') },+ ]),+ ),).toMatchSnapshot();// Should delete any additional backups on other days (keep the@@ -50,9 +50,9 @@ describe('Backups', () => {{ id: 'backup2', date: dateFns.parseISO('2017-01-01') },{ id: 'backup3', date: dateFns.parseISO('2016-12-29') },{ id: 'backup4', date: dateFns.parseISO('2016-12-29') },- { id: 'backup5', date: dateFns.parseISO('2016-12-29') }- ])- )+ { id: 'backup5', date: dateFns.parseISO('2016-12-29') },+ ]),+ ),).toMatchSnapshot();// Should only keep up to 10 backups@@ -70,9 +70,9 @@ describe('Backups', () => {{ id: 'backup9', date: dateFns.parseISO('2016-12-23') },{ id: 'backup10', date: dateFns.parseISO('2016-12-22') },{ id: 'backup11', date: dateFns.parseISO('2016-12-21') },- { id: 'backup12', date: dateFns.parseISO('2016-12-20') }- ])- )+ { id: 'backup12', date: dateFns.parseISO('2016-12-20') },+ ]),+ ),).toMatchSnapshot();});});diff --git a/packages/loot-core/src/server/budget/actions.js b/packages/loot-core/src/server/budget/actions.jsindex ae6c7bff08..e26536deb5 100644--- a/packages/loot-core/src/server/budget/actions.js+++ b/packages/loot-core/src/server/budget/actions.js@@ -40,7 +40,7 @@ function getBudgetData(table, month) {LEFT JOIN ${table} b ON b.category = c.idWHERE c.tombstone = 0 AND b.month = ?`,- [month]+ [month],);}@@ -61,7 +61,7 @@ export function getBudget({ category, month }) {let table = getBudgetTable();let existing = db.firstSync(`SELECT * FROM ${table} WHERE month = ? AND category = ?`,- [dbMonth(month), category]+ [dbMonth(month), category],);return existing ? existing.amount || 0 : 0;}@@ -72,7 +72,7 @@ export function setBudget({ category, month, amount }) {let existing = db.firstSync(`SELECT id FROM ${table} WHERE month = ? AND category = ?`,- [dbMonth(month), category]+ [dbMonth(month), category],);if (existing) {return db.update(table, { id: existing.id, amount });@@ -81,19 +81,19 @@ export function setBudget({ category, month, amount }) {id: `${dbMonth(month)}-${category}`,month: dbMonth(month),category,- amount+ amount,});}export function setBuffer(month, amount) {let existing = db.firstSync(`SELECT id FROM zero_budget_months WHERE id = ?`,- [month]+ [month],);if (existing) {return db.update('zero_budget_months', {id: existing.id,- buffered: amount+ buffered: amount,});}return db.insert('zero_budget_months', { id: month, buffered: amount });@@ -102,7 +102,7 @@ export function setBuffer(month, amount) {function setCarryover(table, category, month, flag) {let existing = db.firstSync(`SELECT id FROM ${table} WHERE month = ? AND category = ?`,- [month, category]+ [month, category],);if (existing) {return db.update(table, { id: existing.id, carryover: flag ? 1 : 0 });@@ -111,7 +111,7 @@ function setCarryover(table, category, month, flag) {id: `${month}-${category}`,month,category,- carryover: flag ? 1 : 0+ carryover: flag ? 1 : 0,});}@@ -130,7 +130,7 @@ export async function copyPreviousMonth({ month }) {setBudget({category: prevBudget.category,month,- amount: prevBudget.amount+ amount: prevBudget.amount,});});});@@ -138,7 +138,7 @@ export async function copyPreviousMonth({ month }) {export async function setZero({ month }) {let categories = await db.all(- 'SELECT * FROM v_categories WHERE tombstone = 0'+ 'SELECT * FROM v_categories WHERE tombstone = 0',);await batchMessages(() => {@@ -153,7 +153,7 @@ export async function setZero({ month }) {export async function set3MonthAvg({ month }) {let categories = await db.all(- 'SELECT * FROM v_categories WHERE tombstone = 0'+ 'SELECT * FROM v_categories WHERE tombstone = 0',);let prevMonth1 = monthUtils.prevMonth(month);@@ -168,15 +168,15 @@ export async function set3MonthAvg({ month }) {let spent1 = await getSheetValue(monthUtils.sheetForMonth(prevMonth1),- 'sum-amount-' + cat.id+ 'sum-amount-' + cat.id,);let spent2 = await getSheetValue(monthUtils.sheetForMonth(prevMonth2),- 'sum-amount-' + cat.id+ 'sum-amount-' + cat.id,);let spent3 = await getSheetValue(monthUtils.sheetForMonth(prevMonth3),- 'sum-amount-' + cat.id+ 'sum-amount-' + cat.id,);const avg = Math.round((spent1 + spent2 + spent3) / 3);@@ -188,7 +188,7 @@ export async function set3MonthAvg({ month }) {export async function holdForNextMonth({ month, amount }) {let row = await db.first('SELECT buffered FROM zero_budget_months WHERE id = ?',- [month]+ [month],);let sheetName = monthUtils.sheetForMonth(month);@@ -198,7 +198,7 @@ export async function holdForNextMonth({ month, amount }) {let bufferedAmount = calcBufferedAmount(toBudget,(row && row.buffered) || 0,- amount+ amount,);await setBuffer(month, bufferedAmount);@@ -217,7 +217,7 @@ export async function coverOverspending({ month, to, from }) {let leftover = await getSheetValue(sheetName, 'leftover-' + to);let leftoverFrom = await getSheetValue(sheetName,- from === 'to-be-budgeted' ? 'to-budget' : 'leftover-' + from+ from === 'to-be-budgeted' ? 'to-budget' : 'leftover-' + from,);if (leftover >= 0 || leftoverFrom <= 0) {@@ -232,7 +232,7 @@ export async function coverOverspending({ month, to, from }) {await setBudget({category: from,month,- amount: fromBudgeted - amountCovered+ amount: fromBudgeted - amountCovered,});}diff --git a/packages/loot-core/src/server/budget/app.js b/packages/loot-core/src/server/budget/app.jsindex ed8c35e0bf..bf626da569 100644--- a/packages/loot-core/src/server/budget/app.js+++ b/packages/loot-core/src/server/budget/app.js@@ -10,38 +10,38 @@ let app = createApp();app.method('budget/budget-amount', mutator(undoable(actions.setBudget)));app.method('budget/copy-previous-month',- mutator(undoable(actions.copyPreviousMonth))+ mutator(undoable(actions.copyPreviousMonth)),);app.method('budget/set-zero', mutator(undoable(actions.setZero)));app.method('budget/set-3month-avg', mutator(undoable(actions.set3MonthAvg)));app.method('budget/apply-goal-template',- mutator(undoable(goalActions.applyTemplate))+ mutator(undoable(goalActions.applyTemplate)),);app.method('budget/overwrite-goal-template',- mutator(undoable(goalActions.overwriteTemplate))+ mutator(undoable(goalActions.overwriteTemplate)),);app.method('budget/hold-for-next-month',- mutator(undoable(actions.holdForNextMonth))+ mutator(undoable(actions.holdForNextMonth)),);app.method('budget/reset-hold', mutator(undoable(actions.resetHold)));app.method('budget/cover-overspending',- mutator(undoable(actions.coverOverspending))+ mutator(undoable(actions.coverOverspending)),);app.method('budget/transfer-available',- mutator(undoable(actions.transferAvailable))+ mutator(undoable(actions.transferAvailable)),);app.method('budget/transfer-category',- mutator(undoable(actions.transferCategory))+ mutator(undoable(actions.transferCategory)),);app.method('budget/set-carryover',- mutator(undoable(actions.setCategoryCarryover))+ mutator(undoable(actions.setCategoryCarryover)),);export default app;diff --git a/packages/loot-core/src/server/budget/base.js b/packages/loot-core/src/server/budget/base.jsindex d73f1a9366..9b5c454289 100644--- a/packages/loot-core/src/server/budget/base.js+++ b/packages/loot-core/src/server/budget/base.js@@ -46,12 +46,12 @@ function createCategory(cat, sheetName, prevSheetName, start, end) {WHERE t.date >= ${start} AND t.date <= ${end}AND category = '${cat.id}' AND a.offbudget = 0`,[],- true+ true,);let row = rows[0];let amount = row ? row.amount : 0;return amount || 0;- }+ },});if (getBudgetType() === 'rollover') {@@ -65,20 +65,20 @@ function createCategoryGroup(group, sheetName) {sheet.get().createDynamic(sheetName, 'group-sum-amount-' + group.id, {initialValue: 0,dependencies: group.categories.map(cat => `sum-amount-${cat.id}`),- run: sumAmounts+ run: sumAmounts,});if (!group.is_income || getBudgetType() !== 'rollover') {sheet.get().createDynamic(sheetName, 'group-budget-' + group.id, {initialValue: 0,dependencies: group.categories.map(cat => `budget-${cat.id}`),- run: sumAmounts+ run: sumAmounts,});sheet.get().createDynamic(sheetName, 'group-leftover-' + group.id, {initialValue: 0,dependencies: group.categories.map(cat => `leftover-${cat.id}`),- run: sumAmounts+ run: sumAmounts,});}}@@ -91,7 +91,7 @@ function handleAccountChange(months, oldValue, newValue) {WHERE acct = ?`,[newValue.id],- true+ true,);months.forEach(month => {@@ -145,17 +145,17 @@ function handleCategoryChange(months, oldValue, newValue) {sheet.get().addDependencies(sheetName, `group-sum-amount-${groupId}`, [- `sum-amount-${catId}`+ `sum-amount-${catId}`,]);sheet.get().addDependencies(sheetName, `group-budget-${groupId}`, [- `budget-${catId}`+ `budget-${catId}`,]);sheet.get().addDependencies(sheetName, `group-leftover-${groupId}`, [- `leftover-${catId}`+ `leftover-${catId}`,]);}@@ -163,17 +163,17 @@ function handleCategoryChange(months, oldValue, newValue) {sheet.get().removeDependencies(sheetName, `group-sum-amount-${groupId}`, [- `sum-amount-${catId}`+ `sum-amount-${catId}`,]);sheet.get().removeDependencies(sheetName, `group-budget-${groupId}`, [- `budget-${catId}`+ `budget-${catId}`,]);sheet.get().removeDependencies(sheetName, `group-leftover-${groupId}`, [- `leftover-${catId}`+ `leftover-${catId}`,]);}@@ -211,7 +211,7 @@ function handleCategoryChange(months, oldValue, newValue) {.get().addDependencies(sheetName, 'last-month-overspent', [`${prevSheetName}!leftover-${id}`,- `${prevSheetName}!carryover-${id}`+ `${prevSheetName}!carryover-${id}`,]);}@@ -236,17 +236,17 @@ function handleCategoryGroupChange(months, oldValue, newValue) {sheet.get().addDependencies(sheetName, 'total-budgeted', [- `group-budget-${groupId}`+ `group-budget-${groupId}`,]);sheet.get().addDependencies(sheetName, 'total-spent', [- `group-sum-amount-${groupId}`+ `group-sum-amount-${groupId}`,]);sheet.get().addDependencies(sheetName, 'total-leftover', [- `group-leftover-${groupId}`+ `group-leftover-${groupId}`,]);}@@ -254,17 +254,17 @@ function handleCategoryGroupChange(months, oldValue, newValue) {sheet.get().removeDependencies(sheetName, 'total-budgeted', [- `group-budget-${groupId}`+ `group-budget-${groupId}`,]);sheet.get().removeDependencies(sheetName, 'total-spent', [- `group-sum-amount-${groupId}`+ `group-sum-amount-${groupId}`,]);sheet.get().removeDependencies(sheetName, 'total-leftover', [- `group-leftover-${groupId}`+ `group-leftover-${groupId}`,]);}@@ -291,7 +291,7 @@ function handleCategoryGroupChange(months, oldValue, newValue) {let categories = db.runQuery('SELECT * FROM categories WHERE tombstone = 0 AND cat_group = ?',[group.id],- true+ true,);createCategoryGroup({ ...group, categories }, sheetName);@@ -316,7 +316,7 @@ function handleBudgetChange(budget) {.get().set(`${sheetName}!carryover-${budget.category}`,- budget.carryover === 1 ? true : false+ budget.carryover === 1 ? true : false,);}}@@ -338,7 +338,7 @@ export function triggerBudgetChanges(oldValues, newValues) {handleBudgetChange(newValue);} else if (table === 'transactions') {let changed = new Set(- Object.keys(getChangedValues(oldValue || {}, newValue) || {})+ Object.keys(getChangedValues(oldValue || {}, newValue) || {}),);if (oldValue) {@@ -373,13 +373,13 @@ export async function doTransfer(categoryIds, transferId) {let transferValue = budgetActions.getBudget({month,- category: transferId+ category: transferId,});budgetActions.setBudget({month,category: transferId,- amount: totalValue + transferValue+ amount: totalValue + transferValue,});});}@@ -433,7 +433,7 @@ export async function createBudget(months) {export async function createAllBudgets() {let earliestTransaction = await db.first(- 'SELECT * FROM transactions WHERE isChild=0 AND date IS NOT NULL ORDER BY date ASC LIMIT 1'+ 'SELECT * FROM transactions WHERE isChild=0 AND date IS NOT NULL ORDER BY date ASC LIMIT 1',);let earliestDate =earliestTransaction && db.fromDateRepr(earliestTransaction.date);@@ -444,7 +444,7 @@ export async function createAllBudgets() {// month is also used as the starting monthlet { start, end, range } = getBudgetRange(earliestDate || currentMonth,- currentMonth+ currentMonth,);let meta = sheet.get().meta();diff --git a/packages/loot-core/src/server/budget/base.test.js b/packages/loot-core/src/server/budget/base.test.jsindex e177bcccb4..69b078605e 100644--- a/packages/loot-core/src/server/budget/base.test.js+++ b/packages/loot-core/src/server/budget/base.test.js@@ -16,11 +16,11 @@ describe('Base budget', () => {await db.insertCategoryGroup({id: 'group2',name: 'income',- is_income: 1+ is_income: 1,});let catId = await db.insertCategory({name: 'foo',- cat_group: 'group1'+ cat_group: 'group1',});await createAllBudgets();@@ -31,7 +31,7 @@ describe('Base budget', () => {date: '2016-12-15',amount: -5000,account: '29eef937-9933-49ef-80d9-71627074cf31',- category: catId+ category: catId,});// Make sure that the spreadsheet finishes processing to make sure@@ -42,14 +42,14 @@ describe('Base budget', () => {expect(sheet.getCellValue(monthUtils.sheetForMonth('2016-12'),- `sum-amount-${catId}`- )+ `sum-amount-${catId}`,+ ),).toBe(0);// Create the referenced accountawait db.insertAccount({id: '29eef937-9933-49ef-80d9-71627074cf31',- name: 'foo'+ name: 'foo',});// Make sure the spreadsheet finishes processing@@ -59,8 +59,8 @@ describe('Base budget', () => {expect(sheet.getCellValue(monthUtils.sheetForMonth('2016-12'),- `sum-amount-${catId}`- )+ `sum-amount-${catId}`,+ ),).toBe(-5000);});});diff --git a/packages/loot-core/src/server/budget/goaltemplates.js b/packages/loot-core/src/server/budget/goaltemplates.jsindex d4ec2db12b..f78751fad7 100644--- a/packages/loot-core/src/server/budget/goaltemplates.js+++ b/packages/loot-core/src/server/budget/goaltemplates.js@@ -2,7 +2,7 @@ import {differenceInCalendarMonths,addMonths,addWeeks,- format+ format,} from 'date-fns';import * as monthUtils from '../../shared/months';@@ -23,7 +23,7 @@ async function processTemplate(month, force) {let category_templates = await getCategoryTemplates();let categories = await db.all(- 'SELECT * FROM v_categories WHERE tombstone = 0'+ 'SELECT * FROM v_categories WHERE tombstone = 0',);let num_applied = 0;@@ -32,7 +32,7 @@ async function processTemplate(month, force) {let budgeted = await getSheetValue(monthUtils.sheetForMonth(month),- `budget-${category.id}`+ `budget-${category.id}`,);if (budgeted === 0 || force) {@@ -43,7 +43,7 @@ async function processTemplate(month, force) {category,template,month,- force+ force,);if (to_budget != null) {num_applied++;@@ -64,84 +64,84 @@ async function getCategoryTemplates() {{type: 'simple',re: /^#template \$?(\-?\d+(\.\d{2})?)$/im,//eslint-disable-line- params: ['monthly']+ params: ['monthly'],},{type: 'simple',re: /^#template up to \$?(\d+(\.\d{2})?)$/im,- params: ['limit']+ params: ['limit'],},{type: 'simple',re: /^#template \$?(\d+(\.\d{2})?) up to \$?(\d+(\.\d{2})?)$/im,- params: ['monthly', null, 'limit']+ params: ['monthly', null, 'limit'],},{type: 'by',re: /^#template \$?(\d+(\.\d{2})?) by (\d{4}\-\d{2})$/im,//eslint-disable-line- params: ['amount', null, 'month']+ params: ['amount', null, 'month'],},{type: 'by',re: /^#template \$?(\d+(\.\d{2})?) by (\d{4}\-\d{2}) repeat every (\d+) months$/im,//eslint-disable-line- params: ['amount', null, 'month', 'repeat']+ params: ['amount', null, 'month', 'repeat'],},{type: 'week',re: /^#template \$?(\d+(\.\d{2})?) repeat every week starting (\d{4}\-\d{2}\-\d{2})$/im,//eslint-disable-line- params: ['amount', null, 'starting']+ params: ['amount', null, 'starting'],},{type: 'week',re: /^#template \$?(\d+(\.\d{2})?) repeat every week starting (\d{4}\-\d{2}\-\d{2}) up to \$?(\d+(\.\d{2})?)$/im,//eslint-disable-line- params: ['amount', null, 'starting', 'limit']+ params: ['amount', null, 'starting', 'limit'],},{type: 'weeks',re: /^#template \$?(\d+(\.\d{2})?) repeat every (\d+) weeks starting (\d{4}\-\d{2}\-\d{2})$/im,//eslint-disable-line- params: ['amount', null, 'weeks', 'starting']+ params: ['amount', null, 'weeks', 'starting'],},{type: 'weeks',re: /^#template \$?(\d+(\.\d{2})?) repeat every (\d+) weeks starting (\d{4}\-\d{2}\-\d{2}) up to \$?(\d+(\.\d{2})?)$/im,//eslint-disable-line- params: ['amount', null, 'weeks', 'starting', 'limit']+ params: ['amount', null, 'weeks', 'starting', 'limit'],},{type: 'by_annual',re: /^#template \$?(\d+(\.\d{2})?) by (\d{4}\-\d{2}) repeat every year$/im,//eslint-disable-line- params: ['amount', null, 'month']+ params: ['amount', null, 'month'],},{type: 'by_annual',re: /^#template \$?(\d+(\.\d{2})?) by (\d{4}\-\d{2}) repeat every (\d+) years$/im,//eslint-disable-line- params: ['amount', null, 'month', 'repeat']+ params: ['amount', null, 'month', 'repeat'],},{type: 'spend',re: /^#template \$?(\d+(\.\d{2})?) by (\d{4}\-\d{2}) spend from (\d{4}\-\d{2})$/im,//eslint-disable-line- params: ['amount', null, 'month', 'from']+ params: ['amount', null, 'month', 'from'],},{type: 'spend',re: /^#template \$?(\d+(\.\d{2})?) by (\d{4}\-\d{2}) spend from (\d{4}\-\d{2}) repeat every (\d+) months$/im,//eslint-disable-line- params: ['amount', null, 'month', 'from', 'repeat']+ params: ['amount', null, 'month', 'from', 'repeat'],},{type: 'spend_annual',re: /^#template \$?(\d+(\.\d{2})?) by (\d{4}\-\d{2}) spend from (\d{4}\-\d{2}) repeat every year$/im,//eslint-disable-line- params: ['amount', null, 'month', 'from']+ params: ['amount', null, 'month', 'from'],},{type: 'spend_annual',re: /^#template \$?(\d+(\.\d{2})?) by (\d{4}\-\d{2}) spend from (\d{4}\-\d{2}) repeat every (\d+) years$/im,//eslint-disable-line- params: ['amount', null, 'month', 'from', 'repeat']+ params: ['amount', null, 'month', 'from', 'repeat'],},{type: 'percentage',re: /^#template (\d+(\.\d+)?)% of (.*)$/im,- params: ['percent', null, 'category']+ params: ['percent', null, 'category'],},- { type: 'error', re: /^#template .*$/im, params: [] }+ { type: 'error', re: /^#template .*$/im, params: [] },];let templates = {};@@ -192,7 +192,7 @@ async function applyCategoryTemplate(category, template_lines, month, force) {let target_month = new Date(`${template.month}-01`);let num_months = differenceInCalendarMonths(target_month,- current_month+ current_month,);let repeat = template.type.includes('annual')? (template.repeat || 1) * 12@@ -213,7 +213,7 @@ async function applyCategoryTemplate(category, template_lines, month, force) {console.log(`${category.name}: ${`${template.month} is in the past:`} ${template.line- }`+ }`,);return null;}@@ -236,7 +236,7 @@ async function applyCategoryTemplate(category, template_lines, month, force) {) {return differenceInCalendarMonths(new Date(`${a.month}-01`),- new Date(`${b.month}-01`)+ new Date(`${b.month}-01`),);} else {return a.type.localeCompare(b.type);@@ -273,7 +273,7 @@ async function applyCategoryTemplate(category, template_lines, month, force) {console.log(`${category.name}: ${`More than one 'up to' limit found.`} ${template.line- }`+ }`,);return null;} else {@@ -295,7 +295,7 @@ async function applyCategoryTemplate(category, template_lines, month, force) {let target = amountToInteger(template.amount);let num_months = differenceInCalendarMonths(target_month,- current_month+ current_month,);let repeat =template.type === 'by'@@ -322,7 +322,7 @@ async function applyCategoryTemplate(category, template_lines, month, force) {console.log(`${category.name}: ${`More than one 'up to' limit found.`} ${template.line- }`+ }`,);return null;} else {@@ -358,18 +358,18 @@ async function applyCategoryTemplate(category, template_lines, month, force) {if (first_month) {let spent = await getSheetValue(sheetName,- `sum-amount-${category.id}`+ `sum-amount-${category.id}`,);let balance = await getSheetValue(sheetName,- `leftover-${category.id}`+ `leftover-${category.id}`,);already_budgeted = balance - spent;first_month = false;} else {let budgeted = await getSheetValue(sheetName,- `budget-${category.id}`+ `budget-${category.id}`,);already_budgeted += budgeted;}@@ -380,14 +380,14 @@ async function applyCategoryTemplate(category, template_lines, month, force) {console.log(`${category.name}: ${`${template.to} is in the past:`} ${template.line- }`+ }`,);return null;} else if (num_months === 0) {to_budget = target - already_budgeted;} else {to_budget = Math.round(- (target - already_budgeted) / (num_months + 1)+ (target - already_budgeted) / (num_months + 1),);}break;diff --git a/packages/loot-core/src/server/budget/report.js b/packages/loot-core/src/server/budget/report.jsindex 52ba157ef5..6e6098e7e7 100644--- a/packages/loot-core/src/server/budget/report.js+++ b/packages/loot-core/src/server/budget/report.js@@ -23,30 +23,30 @@ export async function createCategory(cat, sheetName, prevSheetName) {`budget-${cat.id}`,`sum-amount-${cat.id}`,`${prevSheetName}!carryover-${cat.id}`,- `${prevSheetName}!leftover-${cat.id}`+ `${prevSheetName}!leftover-${cat.id}`,],run: (budgeted, sumAmount, prevCarryover, prevLeftover) => {if (cat.is_income) {return safeNumber(number(budgeted) -number(sumAmount) +- (prevCarryover ? number(prevLeftover) : 0)+ (prevCarryover ? number(prevLeftover) : 0),);}return safeNumber(number(budgeted) +number(sumAmount) +- (prevCarryover ? number(prevLeftover) : 0)+ (prevCarryover ? number(prevLeftover) : 0),);- }+ },});sheet.get().createDynamic(sheetName, `spent-with-carryover-${cat.id}`, {initialValue: 0,dependencies: [`budget-${cat.id}`,`sum-amount-${cat.id}`,- `carryover-${cat.id}`+ `carryover-${cat.id}`,],// TODO: Why refresh??refresh: true,@@ -54,7 +54,7 @@ export async function createCategory(cat, sheetName, prevSheetName) {return carryover? Math.max(0, safeNumber(number(budgeted) + number(sumAmount))): sumAmount;- }+ },});sheet.get().createStatic(sheetName, `carryover-${cat.id}`, false);@@ -69,34 +69,34 @@ export function createSummary(groups, categories, sheetName) {dependencies: groups.filter(group => !group.is_income).map(group => `group-budget-${group.id}`),- run: sumAmounts+ run: sumAmounts,});sheet.get().createDynamic(sheetName, 'total-spent', {initialValue: 0,refresh: true,dependencies: expenseCategories.map(- cat => `${sheetName}!spent-with-carryover-${cat.id}`+ cat => `${sheetName}!spent-with-carryover-${cat.id}`,),- run: sumAmounts+ run: sumAmounts,});sheet.get().createDynamic(sheetName, 'total-income', {initialValue: 0,dependencies: [`group-sum-amount-${incomeGroup.id}`],- run: amount => amount+ run: amount => amount,});sheet.get().createDynamic(sheetName, 'total-leftover', {initialValue: 0,dependencies: ['total-budgeted', 'total-spent'],- run: sumAmounts+ run: sumAmounts,});sheet.get().createDynamic(sheetName, 'total-budget-income', {initialValue: 0,dependencies: [`group-budget-${incomeGroup.id}`],- run: amount => amount+ run: amount => amount,});sheet.get().createDynamic(sheetName, 'total-saved', {@@ -104,7 +104,7 @@ export function createSummary(groups, categories, sheetName) {dependencies: ['total-budget-income', 'total-budgeted'],run: (income, budgeted) => {return income - budgeted;- }+ },});sheet.get().createDynamic(sheetName, 'real-saved', {@@ -112,6 +112,6 @@ export function createSummary(groups, categories, sheetName) {dependencies: ['total-income', 'total-spent'],run: (income, spent) => {return safeNumber(income - -spent);- }+ },});}diff --git a/packages/loot-core/src/server/budget/rollover.js b/packages/loot-core/src/server/budget/rollover.jsindex ea0748ab70..1fcbec4cd6 100644--- a/packages/loot-core/src/server/budget/rollover.js+++ b/packages/loot-core/src/server/budget/rollover.js@@ -50,15 +50,15 @@ export function createCategory(cat, sheetName, prevSheetName) {`sum-amount-${cat.id}`,`${prevSheetName}!carryover-${cat.id}`,`${prevSheetName}!leftover-${cat.id}`,- `${prevSheetName}!leftover-pos-${cat.id}`+ `${prevSheetName}!leftover-pos-${cat.id}`,],run: (budgeted, spent, prevCarryover, prevLeftover, prevLeftoverPos) => {return safeNumber(number(budgeted) +number(spent) +- (prevCarryover ? number(prevLeftover) : number(prevLeftoverPos))+ (prevCarryover ? number(prevLeftover) : number(prevLeftoverPos)),);- }+ },});sheet.get().createDynamic(sheetName, 'leftover-pos-' + cat.id, {@@ -66,7 +66,7 @@ export function createCategory(cat, sheetName, prevSheetName) {dependencies: [`leftover-${cat.id}`],run: leftover => {return leftover < 0 ? 0 : leftover;- }+ },});}}@@ -80,21 +80,22 @@ export function createSummary(groups, categories, prevSheetName, sheetName) {sheet.get().createDynamic(sheetName, 'from-last-month', {initialValue: 0,dependencies: [`${prevSheetName}!to-budget`, `${prevSheetName}!buffered`],- run: (toBudget, buffered) => safeNumber(number(toBudget) + number(buffered))+ run: (toBudget, buffered) =>+ safeNumber(number(toBudget) + number(buffered)),});// Alias the group income total to `total-income`sheet.get().createDynamic(sheetName, 'total-income', {initialValue: 0,dependencies: [`group-sum-amount-${incomeGroup.id}`],- run: amount => amount+ run: amount => amount,});sheet.get().createDynamic(sheetName, 'available-funds', {initialValue: 0,dependencies: ['total-income', 'from-last-month'],run: (income, fromLastMonth) =>- safeNumber(number(income) + number(fromLastMonth))+ safeNumber(number(income) + number(fromLastMonth)),});sheet.get().createDynamic(sheetName, 'last-month-overspent', {@@ -102,8 +103,8 @@ export function createSummary(groups, categories, prevSheetName, sheetName) {dependencies: flatten2(expenseCategories.map(cat => [`${prevSheetName}!leftover-${cat.id}`,- `${prevSheetName}!carryover-${cat.id}`- ])+ `${prevSheetName}!carryover-${cat.id}`,+ ]),),run: (...data) => {data = unflatten2(data);@@ -113,9 +114,9 @@ export function createSummary(groups, categories, prevSheetName, sheetName) {return total;}return total + Math.min(0, number(leftover));- }, 0)+ }, 0),);- }+ },});sheet.get().createDynamic(sheetName, 'total-budgeted', {@@ -126,7 +127,7 @@ export function createSummary(groups, categories, prevSheetName, sheetName) {run: (...amounts) => {// Negate budgeted amountreturn -sumAmounts(...amounts);- }+ },});sheet.get().createDynamic(sheetName, 'buffered', { initialValue: 0 });@@ -137,16 +138,16 @@ export function createSummary(groups, categories, prevSheetName, sheetName) {'available-funds','last-month-overspent','total-budgeted',- 'buffered'+ 'buffered',],run: (available, lastOverspent, totalBudgeted, buffered) => {return safeNumber(number(available) +number(lastOverspent) +number(totalBudgeted) -- number(buffered)+ number(buffered),);- }+ },});sheet.get().createDynamic(sheetName, 'total-spent', {@@ -154,7 +155,7 @@ export function createSummary(groups, categories, prevSheetName, sheetName) {dependencies: groups.filter(group => !group.is_income).map(group => `group-sum-amount-${group.id}`),- run: sumAmounts+ run: sumAmounts,});sheet.get().createDynamic(sheetName, 'total-leftover', {@@ -162,7 +163,7 @@ export function createSummary(groups, categories, prevSheetName, sheetName) {dependencies: groups.filter(group => !group.is_income).map(group => `group-leftover-${group.id}`),- run: sumAmounts+ run: sumAmounts,});}diff --git a/packages/loot-core/src/server/budget/util.js b/packages/loot-core/src/server/budget/util.jsindex f6d288ec92..d36bacac6c 100644--- a/packages/loot-core/src/server/budget/util.js+++ b/packages/loot-core/src/server/budget/util.js@@ -7,7 +7,7 @@ export function sumAmounts(...amounts) {return safeNumber(amounts.reduce((total, amount) => {return total + number(amount);- }, 0)+ }, 0),);}diff --git a/packages/loot-core/src/server/cloud-storage.js b/packages/loot-core/src/server/cloud-storage.jsindex 4e5546603b..04096a6241 100644--- a/packages/loot-core/src/server/cloud-storage.js+++ b/packages/loot-core/src/server/cloud-storage.js@@ -9,7 +9,7 @@ import {HTTPError,PostError,FileDownloadError,- FileUploadError+ FileUploadError,} from './errors';import { runMutator } from './mutators';import { post } from './post';@@ -47,7 +47,7 @@ export async function checkKey() {try {res = await post(getServer().SYNC_SERVER + '/user-get-key', {token: userToken,- fileId: cloudFileId+ fileId: cloudFileId,});} catch (e) {console.log(e);@@ -59,7 +59,7 @@ export async function checkKey() {return {valid:res.id == encryptKeyId && // eslint-disable-line- (encryptKeyId == null || encryption.hasKey(encryptKeyId))+ (encryptKeyId == null || encryption.hasKey(encryptKeyId)),};}@@ -75,14 +75,14 @@ export async function resetSyncState(newKeyState) {try {await post(getServer().SYNC_SERVER + '/reset-user-file', {token: userToken,- fileId: cloudFileId+ fileId: cloudFileId,});} catch (e) {if (e instanceof PostError) {return {error: {- reason: e.reason === 'unauthorized' ? 'unauthorized' : 'network'- }+ reason: e.reason === 'unauthorized' ? 'unauthorized' : 'network',+ },};}return { error: { reason: 'internal' } };@@ -95,7 +95,7 @@ export async function resetSyncState(newKeyState) {fileId: cloudFileId,keyId: newKeyState.key.getId(),keySalt: newKeyState.salt,- testContent: newKeyState.testContent+ testContent: newKeyState.testContent,});} catch (e) {if (e instanceof PostError) {@@ -126,7 +126,7 @@ export async function exportBuffer() {await runMutator(async () => {let rawDbContent = await fs.readFile(fs.join(budgetDir, 'db.sqlite'),- 'binary'+ 'binary',);// Do some post-processing of the database. We NEVER upload the cache with@@ -138,7 +138,7 @@ export async function exportBuffer() {`DELETE FROM kvcache;DELETE FROM kvcache_key;- `+ `,);let dbContent = sqlite.exportDatabase(memDb);@@ -147,7 +147,7 @@ export async function exportBuffer() {// mark it as a file that needs a new clock so when a new client// downloads it, it'll get set to a unique nodelet meta = JSON.parse(- await fs.readFile(fs.join(budgetDir, 'metadata.json'))+ await fs.readFile(fs.join(budgetDir, 'metadata.json')),);meta.resetClock = true;@@ -187,7 +187,7 @@ export async function importBuffer(fileData, buffer) {cloudFileId: fileData.fileId,groupId: fileData.groupId,lastUploaded: monthUtils.currentDay(),- encryptKeyId: fileData.encryptMeta ? fileData.encryptMeta.keyId : null+ encryptKeyId: fileData.encryptMeta ? fileData.encryptMeta.keyId : null,};let budgetDir = fs.getBudgetDir(meta.id);@@ -242,7 +242,7 @@ export async function upload() {encrypted = await encryption.encrypt(zipContent, encryptKeyId);} catch (e) {throw FileUploadError('encrypt-failure', {- isMissingKey: e.message === 'missing-key'+ isMissingKey: e.message === 'missing-key',});}uploadContent = encrypted.value;@@ -267,16 +267,18 @@ export async function upload() {...(uploadMeta? { 'X-ACTUAL-ENCRYPT-META': JSON.stringify(uploadMeta) }: null),- ...(groupId ? { 'X-ACTUAL-GROUP-ID': groupId } : null)+ ...(groupId ? { 'X-ACTUAL-GROUP-ID': groupId } : null),},- body: uploadContent+ body: uploadContent,});} catch (err) {console.log('Upload failure', err);if (err instanceof PostError) {throw new FileUploadError(- err.reason === 'unauthorized' ? 'unauthorized' : err.reason || 'network'+ err.reason === 'unauthorized'+ ? 'unauthorized'+ : err.reason || 'network',);}@@ -289,7 +291,7 @@ export async function upload() {await prefs.savePrefs({lastUploaded: monthUtils.currentDay(),cloudFileId,- groupId: res.groupId+ groupId: res.groupId,});}} else {@@ -324,7 +326,7 @@ export async function removeFile(fileId) {await post(getServer().SYNC_SERVER + '/delete-user-file', {token: userToken,- fileId+ fileId,});}@@ -338,8 +340,8 @@ export async function listRemoteFiles() {try {res = await fetchJSON(getServer().SYNC_SERVER + '/list-user-files', {headers: {- 'X-ACTUAL-TOKEN': userToken- }+ 'X-ACTUAL-TOKEN': userToken,+ },});} catch (e) {console.log('Error', e);@@ -352,7 +354,7 @@ export async function listRemoteFiles() {return res.data.map(file => ({...file,- hasKey: encryption.hasKey(file.encryptKeyId)+ hasKey: encryption.hasKey(file.encryptKeyId),}));}@@ -364,8 +366,8 @@ export async function download(fileId, replace) {buffer = await fetch(getServer().SYNC_SERVER + '/download-user-file', {headers: {'X-ACTUAL-TOKEN': userToken,- 'X-ACTUAL-FILE-ID': fileId- }+ 'X-ACTUAL-FILE-ID': fileId,+ },}).then(checkHTTPStatus).then(res => {@@ -384,8 +386,8 @@ export async function download(fileId, replace) {res = await fetchJSON(getServer().SYNC_SERVER + '/get-user-file-info', {headers: {'X-ACTUAL-TOKEN': userToken,- 'X-ACTUAL-FILE-ID': fileId- }+ 'X-ACTUAL-FILE-ID': fileId,+ },});} catch (err) {throw FileDownloadError('internal', { fileId });@@ -404,7 +406,7 @@ export async function download(fileId, replace) {buffer = await encryption.decrypt(buffer, fileData.encryptMeta);} catch (e) {throw FileDownloadError('decrypt-failure', {- isMissingKey: e.message === 'missing-key'+ isMissingKey: e.message === 'missing-key',});}}diff --git a/packages/loot-core/src/server/crdt/index.js b/packages/loot-core/src/server/crdt/index.jsindex ce714a60b9..18ad17bf14 100644--- a/packages/loot-core/src/server/crdt/index.js+++ b/packages/loot-core/src/server/crdt/index.js@@ -8,5 +8,5 @@ export {makeClientId,serializeClock,deserializeClock,- Timestamp+ Timestamp,} from './timestamp';diff --git a/packages/loot-core/src/server/crdt/merkle.js b/packages/loot-core/src/server/crdt/merkle.jsindex e9f886a563..48df9b0efe 100644--- a/packages/loot-core/src/server/crdt/merkle.js+++ b/packages/loot-core/src/server/crdt/merkle.js@@ -36,8 +36,8 @@ function insertKey(trie, key, hash) {const n = trie[c] || {};return Object.assign({}, trie, {[c]: Object.assign({}, n, insertKey(n, key.slice(1), hash), {- hash: n.hash ^ hash- })+ hash: n.hash ^ hash,+ }),});}diff --git a/packages/loot-core/src/server/crdt/merkle.test.js b/packages/loot-core/src/server/crdt/merkle.test.jsindex fd1a51d07a..91b383cddc 100644--- a/packages/loot-core/src/server/crdt/merkle.test.js+++ b/packages/loot-core/src/server/crdt/merkle.test.js@@ -18,11 +18,11 @@ describe('merkle trie', () => {test('adding an item works', () => {let trie = merkle.insert({},- Timestamp.parse('2018-11-12T13:21:40.122Z-0000-0123456789ABCDEF')+ Timestamp.parse('2018-11-12T13:21:40.122Z-0000-0123456789ABCDEF'),);trie = merkle.insert(trie,- Timestamp.parse('2018-11-13T13:21:40.122Z-0000-0123456789ABCDEF')+ Timestamp.parse('2018-11-13T13:21:40.122Z-0000-0123456789ABCDEF'),);expect(trie).toMatchSnapshot();});@@ -39,7 +39,7 @@ describe('merkle trie', () => {// Second client messagesmessage('2018-11-20T13:19:40.122Z-0000-0123456789ABCDEF', 1300),- message('2018-11-25T13:19:40.122Z-0000-0123456789ABCDEF', 1400)+ message('2018-11-25T13:19:40.122Z-0000-0123456789ABCDEF', 1400),];trie1 = merkle.insert(trie1, messages[0].timestamp);@@ -52,7 +52,7 @@ describe('merkle trie', () => {expect(trie2.hash).toBe(108);expect(new Date(merkle.diff(trie1, trie2)).toISOString()).toBe(- '2018-11-02T17:15:00.000Z'+ '2018-11-02T17:15:00.000Z',);trie1 = merkle.insert(trie1, messages[3].timestamp);@@ -68,7 +68,7 @@ describe('merkle trie', () => {let trie1 = {};let trie2 = merkle.insert({},- Timestamp.parse('2009-01-02T10:17:37.789Z-0000-0000testinguuid1')+ Timestamp.parse('2009-01-02T10:17:37.789Z-0000-0000testinguuid1'),);expect(merkle.diff(trie1, trie2)).toBe(0);@@ -87,7 +87,7 @@ describe('merkle trie', () => {message('2018-11-01T02:10:00.000Z-0000-0123456789ABCDEF', 1800),message('2018-11-01T02:19:00.000Z-0000-0123456789ABCDEF', 1900),message('2018-11-01T02:28:00.000Z-0000-0123456789ABCDEF', 2000),- message('2018-11-01T02:37:00.000Z-0000-0123456789ABCDEF', 2100)+ message('2018-11-01T02:37:00.000Z-0000-0123456789ABCDEF', 2100),];let trie = {};@@ -115,7 +115,7 @@ describe('merkle trie', () => {message('2018-11-01T02:10:00.000Z-0000-0123456789ABCDEF', 1800),message('2018-11-01T02:19:00.000Z-0000-0123456789ABCDEF', 1900),message('2018-11-01T02:28:00.000Z-0000-0123456789ABCDEF', 2000),- message('2018-11-01T02:37:00.000Z-0000-0123456789ABCDEF', 2100)+ message('2018-11-01T02:37:00.000Z-0000-0123456789ABCDEF', 2100),];let trie = insertMessages({}, messages);@@ -123,32 +123,32 @@ describe('merkle trie', () => {// Case 0: It always returns a base time when comparing with an// empty trieexpect(new Date(merkle.diff({}, trie)).toISOString()).toBe(- '1970-01-01T00:00:00.000Z'+ '1970-01-01T00:00:00.000Z',);expect(new Date(merkle.diff(trie, {})).toISOString()).toBe(- '1970-01-01T00:00:00.000Z'+ '1970-01-01T00:00:00.000Z',);// Case 1: Add an older message that modifies the trie in such a// way that it modifies the 1st out of 3 branches (so it will be// pruned away)let trie1 = insertMessages(trie, [- message('2018-11-01T00:59:00.000Z-0000-0123456789ABCDEF', 900)+ message('2018-11-01T00:59:00.000Z-0000-0123456789ABCDEF', 900),]);// Normal comparision worksexpect(new Date(merkle.diff(trie1, trie)).toISOString()).toBe(- '2018-11-01T00:54:00.000Z'+ '2018-11-01T00:54:00.000Z',);// Comparing the pruned new trie is lossy, so it returns an even older timeexpect(new Date(merkle.diff(merkle.prune(trie1), trie)).toISOString()).toBe(- '2018-11-01T00:45:00.000Z'+ '2018-11-01T00:45:00.000Z',);// Comparing the pruned original trie is just as lossyexpect(new Date(merkle.diff(trie1, merkle.prune(trie))).toISOString()).toBe(- '2018-11-01T00:45:00.000Z'+ '2018-11-01T00:45:00.000Z',);// Pruning both tries is just as lossy as well, since the changed@@ -156,8 +156,8 @@ describe('merkle trie', () => {// key so it bails at the pointexpect(new Date(- merkle.diff(merkle.prune(trie1), merkle.prune(trie))- ).toISOString()+ merkle.diff(merkle.prune(trie1), merkle.prune(trie)),+ ).toISOString(),).toBe('2018-11-01T00:45:00.000Z');// Case 2: Add two messages similar to the above case, but the@@ -165,22 +165,22 @@ describe('merkle trie', () => {// first message modifiying the 1st keylet trie2 = insertMessages(trie, [message('2018-11-01T00:59:00.000Z-0000-0123456789ABCDEF', 900),- message('2018-11-01T01:15:00.000Z-0000-0123456789ABCDEF', 1422)+ message('2018-11-01T01:15:00.000Z-0000-0123456789ABCDEF', 1422),]);// Normal comparision worksexpect(new Date(merkle.diff(trie2, trie)).toISOString()).toBe(- '2018-11-01T00:54:00.000Z'+ '2018-11-01T00:54:00.000Z',);// Same as case 1expect(new Date(merkle.diff(merkle.prune(trie2), trie)).toISOString()).toBe(- '2018-11-01T00:45:00.000Z'+ '2018-11-01T00:45:00.000Z',);// Same as case 1expect(new Date(merkle.diff(trie2, merkle.prune(trie))).toISOString()).toBe(- '2018-11-01T00:45:00.000Z'+ '2018-11-01T00:45:00.000Z',);// Pruning both tries is very lossy and this ends up returning a@@ -190,8 +190,8 @@ describe('merkle trie', () => {// ignores the first message.expect(new Date(- merkle.diff(merkle.prune(trie2), merkle.prune(trie))- ).toISOString()+ merkle.diff(merkle.prune(trie2), merkle.prune(trie)),+ ).toISOString(),).toBe('2018-11-01T01:12:00.000Z');});});diff --git a/packages/loot-core/src/server/crdt/timestamp.js b/packages/loot-core/src/server/crdt/timestamp.jsindex ea1fec3340..e91b5c3385 100644--- a/packages/loot-core/src/server/crdt/timestamp.js+++ b/packages/loot-core/src/server/crdt/timestamp.js@@ -43,7 +43,7 @@ export function makeClock(timestamp, merkle = {}) {export function serializeClock(clock) {return JSON.stringify({timestamp: clock.timestamp.toString(),- merkle: clock.merkle+ merkle: clock.merkle,});}@@ -54,13 +54,13 @@ export function deserializeClock(clock) {} catch (e) {data = {timestamp: '1970-01-01T00:00:00.000Z-0000-' + makeClientId(),- merkle: {}+ merkle: {},};}return {timestamp: MutableTimestamp.from(Timestamp.parse(data.timestamp)),- merkle: data.merkle+ merkle: data.merkle,};}@@ -70,7 +70,7 @@ export function makeClientId() {var config = {// Allow 5 minutes of clock drift- maxDrift: 5 * 60 * 1000+ maxDrift: 5 * 60 * 1000,};const MAX_COUNTER = parseInt('0xFFFF');@@ -84,7 +84,7 @@ export class Timestamp {this._state = {millis: millis,counter: counter,- node: node+ node: node,};}@@ -96,7 +96,7 @@ export class Timestamp {return [new Date(this.millis()).toISOString(),('0000' + this.counter().toString(16).toUpperCase()).slice(-4),- ('0000000000000000' + this.node()).slice(-16)+ ('0000000000000000' + this.node()).slice(-16),].join('-');}@@ -135,7 +135,7 @@ MutableTimestamp.from = timestamp => {return new MutableTimestamp(timestamp.millis(),timestamp.counter(),- timestamp.node()+ timestamp.node(),);};@@ -154,10 +154,10 @@ Timestamp.init = function (options = {}) {0,options.node? ('0000000000000000' + options.node).toString().slice(-16)- : ''- )+ : '',+ ),),- null+ null,);};@@ -198,7 +198,7 @@ Timestamp.send = function () {return new Timestamp(clock.timestamp.millis(),clock.timestamp.counter(),- clock.timestamp.node()+ clock.timestamp.node(),);};@@ -260,7 +260,7 @@ Timestamp.recv = function (msg) {return new Timestamp(clock.timestamp.millis(),clock.timestamp.counter(),- clock.timestamp.node()+ clock.timestamp.node(),);};diff --git a/packages/loot-core/src/server/crdt/timestamp.test.js b/packages/loot-core/src/server/crdt/timestamp.test.jsindex 2e6f35e158..2ed80bf6e2 100644--- a/packages/loot-core/src/server/crdt/timestamp.test.js+++ b/packages/loot-core/src/server/crdt/timestamp.test.js@@ -38,7 +38,7 @@ describe('Timestamp', function () {'1969-01-01T00:00:00.000Z-0000-0000000000000000','10000-01-01T00:00:00.000Z-FFFF-FFFFFFFFFFFFFFFF','9999-12-31T23:59:59.999Z-10000-FFFFFFFFFFFFFFFF',- '9999-12-31T23:59:59.999Z-FFFF-10000000000000000'+ '9999-12-31T23:59:59.999Z-FFFF-10000000000000000',];for (var invalidInput of invalidInputs) {expect(Timestamp.parse(invalidInput)).toBe(null);@@ -49,7 +49,7 @@ describe('Timestamp', function () {var validInputs = ['1970-01-01T00:00:00.000Z-0000-0000000000000000','2015-04-24T22:23:42.123Z-1000-0123456789ABCDEF',- '9999-12-31T23:59:59.999Z-FFFF-FFFFFFFFFFFFFFFF'+ '9999-12-31T23:59:59.999Z-FFFF-FFFFFFFFFFFFFFFF',];for (var validInput of validInputs) {var parsed = Timestamp.parse(validInput);@@ -68,50 +68,50 @@ describe('Timestamp', function () {it('should send monotonically with a monotonic clock', function () {now = 10;expect(Timestamp.send()).toEqual(- Timestamp.parse('1970-01-01T00:00:00.010Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.010Z-0000-0000000000000001'),);now++;expect(Timestamp.send()).toEqual(- Timestamp.parse('1970-01-01T00:00:00.011Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.011Z-0000-0000000000000001'),);now++;expect(Timestamp.send()).toEqual(- Timestamp.parse('1970-01-01T00:00:00.012Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.012Z-0000-0000000000000001'),);});it('should send monotonically with a stuttering clock', function () {now = 20;expect(Timestamp.send()).toEqual(- Timestamp.parse('1970-01-01T00:00:00.020Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.020Z-0000-0000000000000001'),);expect(Timestamp.send()).toEqual(- Timestamp.parse('1970-01-01T00:00:00.020Z-0001-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.020Z-0001-0000000000000001'),);expect(Timestamp.send()).toEqual(- Timestamp.parse('1970-01-01T00:00:00.020Z-0002-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.020Z-0002-0000000000000001'),);now++;expect(Timestamp.send()).toEqual(- Timestamp.parse('1970-01-01T00:00:00.021Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.021Z-0000-0000000000000001'),);});it('should send monotonically with a regressing clock', function () {now = 30;expect(Timestamp.send()).toEqual(- Timestamp.parse('1970-01-01T00:00:00.030Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.030Z-0000-0000000000000001'),);now--;expect(Timestamp.send()).toEqual(- Timestamp.parse('1970-01-01T00:00:00.030Z-0001-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.030Z-0001-0000000000000001'),);expect(Timestamp.send()).toEqual(- Timestamp.parse('1970-01-01T00:00:00.030Z-0002-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.030Z-0002-0000000000000001'),);now = 31;expect(Timestamp.send()).toEqual(- Timestamp.parse('1970-01-01T00:00:00.031Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.031Z-0000-0000000000000001'),);});@@ -132,26 +132,26 @@ describe('Timestamp', function () {now = 52;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.051Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.051Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.052Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.052Z-0000-0000000000000001'),);now = 54;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.053Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.053Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.054Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.054Z-0000-0000000000000001'),);now = 56;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.055Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.055Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.056Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.056Z-0000-0000000000000001'),);});@@ -159,34 +159,34 @@ describe('Timestamp', function () {now = 61;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.062Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.062Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.062Z-0001-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.062Z-0001-0000000000000001'),);now = 62;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.062Z-0001-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.062Z-0001-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.062Z-0002-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.062Z-0002-0000000000000001'),);now = 62;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.062Z-0002-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.062Z-0002-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.062Z-0003-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.062Z-0003-0000000000000001'),);now = 63;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.062Z-0004-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.062Z-0004-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.063Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.063Z-0000-0000000000000001'),);});@@ -194,26 +194,26 @@ describe('Timestamp', function () {now = 73;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.071Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.071Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.073Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.073Z-0000-0000000000000001'),);now = 73;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.072Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.072Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.073Z-0001-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.073Z-0001-0000000000000001'),);now = 74;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.073Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.073Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.074Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.074Z-0000-0000000000000001'),);});@@ -221,86 +221,86 @@ describe('Timestamp', function () {now = 81;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.083Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.083Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.083Z-0001-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.083Z-0001-0000000000000001'),);now = 82;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.083Z-0001-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.083Z-0001-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.083Z-0002-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.083Z-0002-0000000000000001'),);now = 83;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.083Z-0002-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.083Z-0002-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.083Z-0003-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.083Z-0003-0000000000000001'),);now = 84;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.083Z-0003-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.083Z-0003-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.084Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.084Z-0000-0000000000000001'),);});it('should receive monotonically with a local regressing clock', function () {now = 93;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.091Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.091Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.093Z-0000-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.093Z-0000-0000000000000001'),);now = 92;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.092Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.092Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.093Z-0001-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.093Z-0001-0000000000000001'),);now = 91;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.093Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.093Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.093Z-0002-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.093Z-0002-0000000000000001'),);});it('should receive monotonically with a remote regressing clock', function () {now = 101;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.103Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.103Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.103Z-0001-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.103Z-0001-0000000000000001'),);now = 102;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.102Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.102Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.103Z-0002-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.103Z-0002-0000000000000001'),);now = 103;expect(Timestamp.recv(- Timestamp.parse('1970-01-01T00:00:00.101Z-0000-0000000000000002')- )+ Timestamp.parse('1970-01-01T00:00:00.101Z-0000-0000000000000002'),+ ),).toEqual(- Timestamp.parse('1970-01-01T00:00:00.103Z-0003-0000000000000001')+ Timestamp.parse('1970-01-01T00:00:00.103Z-0003-0000000000000001'),);});@@ -315,7 +315,7 @@ describe('Timestamp', function () {it('should fail with clock drift', function () {expect(function () {Timestamp.recv(- Timestamp.parse('1980-01-01T00:00:00.101Z-0000-0000000000000002')+ Timestamp.parse('1980-01-01T00:00:00.101Z-0000-0000000000000002'),);}).toThrow(Timestamp.ClockDriftError);});diff --git a/packages/loot-core/src/server/db/index.js b/packages/loot-core/src/server/db/index.jsindex 25a269763e..fc406c145a 100644--- a/packages/loot-core/src/server/db/index.js+++ b/packages/loot-core/src/server/db/index.js@@ -8,7 +8,7 @@ import {schemaConfig,convertForInsert,convertForUpdate,- convertFromSelect+ convertFromSelect,} from '../aql';import {makeClock,@@ -16,14 +16,14 @@ import {serializeClock,deserializeClock,makeClientId,- Timestamp+ Timestamp,} from '../crdt';import {accountModel,categoryModel,categoryGroupModel,payeeModel,- payeeRuleModel+ payeeRuleModel,} from '../models';import { sendMessages, batchMessages } from '../sync';@@ -88,7 +88,7 @@ export async function loadClock() {await runQuery('INSERT INTO messages_clock (id, clock) VALUES (?, ?)', [1,- serializeClock(clock)+ serializeClock(clock),]);}}@@ -162,7 +162,7 @@ export async function select(table, id) {const rows = await runQuery('SELECT * FROM ' + table + ' WHERE id = ?',[id],- true+ true,);return rows[0];}@@ -181,9 +181,9 @@ export async function update(table, params) {row: params.id,column: k,value: params[k],- timestamp: Timestamp.send()+ timestamp: Timestamp.send(),};- })+ }),);}@@ -214,9 +214,9 @@ export async function insert(table, row) {row: row.id,column: k,value: row[k],- timestamp: Timestamp.send()+ timestamp: Timestamp.send(),};- })+ }),);}@@ -227,8 +227,8 @@ export async function delete_(table, id) {row: id,column: 'tombstone',value: 1,- timestamp: Timestamp.send()- }+ timestamp: Timestamp.send(),+ },]);}@@ -253,7 +253,7 @@ export function insertWithSchema(table, row) {return insertWithUUID(table,- convertForInsert(schema, schemaConfig, table, row)+ convertForInsert(schema, schemaConfig, table, row),);}@@ -275,7 +275,7 @@ export async function getCategories() {export async function getCategoriesGrouped() {const groups = await all(- 'SELECT * FROM category_groups WHERE tombstone = 0 ORDER BY is_income, sort_order, id'+ 'SELECT * FROM category_groups WHERE tombstone = 0 ORDER BY is_income, sort_order, id',);const rows = await all(`SELECT * FROM categories WHERE tombstone = 0@@ -285,7 +285,7 @@ export async function getCategoriesGrouped() {return groups.map(group => {return {...group,- categories: rows.filter(row => row.cat_group === group.id)+ categories: rows.filter(row => row.cat_group === group.id),};});}@@ -298,7 +298,7 @@ export async function insertCategoryGroup(group) {group = {...categoryGroupModel.validate(group),- sort_order: sort_order+ sort_order: sort_order,};return insertWithUUID('category_groups', group);}@@ -310,7 +310,7 @@ export function updateCategoryGroup(group) {export async function moveCategoryGroup(id, targetId) {const groups = await all(- `SELECT id, sort_order FROM category_groups WHERE tombstone = 0 ORDER BY sort_order, id`+ `SELECT id, sort_order FROM category_groups WHERE tombstone = 0 ORDER BY sort_order, id`,);const { updates, sort_order } = shoveSortOrders(groups, targetId);@@ -322,7 +322,7 @@ export async function moveCategoryGroup(id, targetId) {export async function deleteCategoryGroup(group, transferId) {const categories = await all('SELECT * FROM categories WHERE cat_group = ?', [- group.id+ group.id,]);// Delete all the categories within a group@@ -345,12 +345,12 @@ export async function insertCategory(category, { atEnd } = {}) {// the sort orders to make sure there's room for itconst categories = await all(`SELECT id, sort_order FROM categories WHERE cat_group = ? AND tombstone = 0 ORDER BY sort_order, id`,- [category.cat_group]+ [category.cat_group],);const { updates, sort_order: order } = shoveSortOrders(categories,- categories.length > 0 ? categories[0].id : null+ categories.length > 0 ? categories[0].id : null,);for (let info of updates) {await update('categories', info);@@ -360,7 +360,7 @@ export async function insertCategory(category, { atEnd } = {}) {category = {...categoryModel.validate(category),- sort_order: sort_order+ sort_order: sort_order,};const id = await insertWithUUID('categories', category);@@ -383,7 +383,7 @@ export async function moveCategory(id, groupId, targetId) {const categories = await all(`SELECT id, sort_order FROM categories WHERE cat_group = ? AND tombstone = 0 ORDER BY sort_order, id`,- [groupId]+ [groupId],);const { updates, sort_order } = shoveSortOrders(categories, targetId);@@ -400,7 +400,7 @@ export async function deleteCategory(category, transferId) {// "forwarded" to the new transferred category.const existingTransfers = await all('SELECT * FROM category_mapping WHERE transferId = ?',- [category.id]+ [category.id],);for (let mapping of existingTransfers) {await update('category_mapping', { id: mapping.id, transferId });@@ -429,7 +429,7 @@ export async function insertPayee(payee) {export async function deletePayee(payee) {let { transfer_acct } = await first('SELECT * FROM payees WHERE id = ?', [- payee.id+ payee.id,]);if (transfer_acct) {// You should never be able to delete transfer payees@@ -444,7 +444,7 @@ export async function deletePayee(payee) {// );let rules = await all('SELECT * FROM payee_rules WHERE payee_id = ?', [- payee.id+ payee.id,]);await Promise.all(rules.map(rule => deletePayeeRule({ id: rule.id })));return delete_('payees', payee.id);@@ -475,23 +475,23 @@ export async function mergePayees(target, ids) {ids.map(async id => {let mappings = await all('SELECT id FROM payee_mapping WHERE targetId = ?',- [id]+ [id],);await Promise.all(mappings.map(m =>- update('payee_mapping', { id: m.id, targetId: target })- )+ update('payee_mapping', { id: m.id, targetId: target }),+ ),);- })+ }),);return Promise.all(ids.map(id =>Promise.all([update('payee_mapping', { id, targetId: target }),- delete_('payees', id)- ])- )+ delete_('payees', id),+ ]),+ ),);});}@@ -517,7 +517,7 @@ export async function getOrphanedPayees() {export async function getPayeeByName(name) {return first(`SELECT * FROM payees WHERE LOWER(name) = ? AND tombstone = 0`, [- name.toLowerCase()+ name.toLowerCase(),]);}@@ -540,7 +540,7 @@ export function getPayeeRules(id) {`SELECT pr.* FROM payee_rules prLEFT JOIN payee_mapping pm ON pm.id = pr.payee_idWHERE pm.targetId = ? AND pr.tombstone = 0`,- [id]+ [id],);}@@ -549,7 +549,7 @@ export function getAccounts() {`SELECT a.*, b.name as bankName, b.id as bankId FROM accounts aLEFT JOIN banks b ON a.bank = b.idWHERE a.tombstone = 0- ORDER BY sort_order, name`+ ORDER BY sort_order, name`,);}@@ -562,7 +562,7 @@ export async function insertAccount(account) {const accounts = await all('SELECT * FROM accounts WHERE offbudget = ? ORDER BY sort_order, name',- [account.offbudget != null ? account.offbudget : 0]+ [account.offbudget != null ? account.offbudget : 0],);// Don't pass a target in, it will default to appending at the end@@ -586,12 +586,12 @@ export async function moveAccount(id, targetId) {let accounts;if (account.closed) {accounts = await all(- `SELECT id, sort_order FROM accounts WHERE closed = 1 ORDER BY sort_order, name`+ `SELECT id, sort_order FROM accounts WHERE closed = 1 ORDER BY sort_order, name`,);} else {accounts = await all(`SELECT id, sort_order FROM accounts WHERE tombstone = 0 AND offbudget = ? ORDER BY sort_order, name`,- [account.offbudget]+ [account.offbudget],);}@@ -608,7 +608,7 @@ export async function getTransaction(id) {let rows = await selectWithSchema('transactions','SELECT * FROM v_transactions WHERE id = ?',- [id]+ [id],);return rows[0];}@@ -617,7 +617,7 @@ export async function getTransactionsByDate(accountId,startDate,endDate,- options = {}+ options = {},) {throw new Error('`getTransactionsByDate` is deprecated');}@@ -625,14 +625,14 @@ export async function getTransactionsByDate(export async function getTransactions(accountId, arg2) {if (arg2 !== undefined) {throw new Error(- '`getTransactions` was given a second argument, it now only takes a single argument `accountId`'+ '`getTransactions` was given a second argument, it now only takes a single argument `accountId`',);}return selectWithSchema('transactions','SELECT * FROM v_transactions WHERE account = ?',- [accountId]+ [accountId],);}diff --git a/packages/loot-core/src/server/db/index.test.js b/packages/loot-core/src/server/db/index.test.jsindex f7cdd9424c..971f674f00 100644--- a/packages/loot-core/src/server/db/index.test.js+++ b/packages/loot-core/src/server/db/index.test.js@@ -5,7 +5,7 @@ beforeEach(global.emptyDatabase());async function insertTransactions(transactions) {await db.insertAccount({ id: 'foo', name: 'bar' });return Promise.all(- transactions.map(transaction => db.insertTransaction(transaction))+ transactions.map(transaction => db.insertTransaction(transaction)),);}@@ -21,7 +21,7 @@ async function getTransactions(latestDate) {is_parent: row.is_parent,amount: row.amount,starting_balance_flag: row.starting_balance_flag,- sort_order: row.sort_order+ sort_order: row.sort_order,}));}@@ -33,7 +33,7 @@ describe('Database', () => {await db.insertCategoryGroup({ id: 'group1', name: 'group1' });await db.insertCategory({name: 'foo',- cat_group: 'group1'+ cat_group: 'group1',});expect((await db.getCategories()).length).toBe(1);});@@ -44,7 +44,7 @@ describe('Database', () => {{ date: '2018-01-02', account: 'foo', amount: -24 },{ date: '2018-01-04', account: 'foo', amount: 12 },{ date: '2018-01-01', account: 'foo', amount: 2 },- { date: '2018-01-03', account: 'foo', amount: -5 }+ { date: '2018-01-03', account: 'foo', amount: -5 },]);expect(await getTransactions('2018-01-05')).toMatchSnapshot();});@@ -59,10 +59,10 @@ describe('Database', () => {date: '2018-01-03',account: 'foo',amount: 12,- starting_balance_flag: 1+ starting_balance_flag: 1,},{ date: '2018-01-03', account: 'foo', amount: -25 },- { date: '2018-01-03', account: 'foo', amount: -5 }+ { date: '2018-01-03', account: 'foo', amount: -5 },]);expect(await getTransactions('2018-01-05')).toMatchSnapshot();});@@ -74,7 +74,7 @@ describe('Database', () => {{ date: '2018-01-03', account: 'foo', amount: -24, sort_order: 8 },{ date: '2018-01-03', account: 'foo', amount: 12, sort_order: 2 },{ date: '2018-01-03', account: 'foo', amount: 2, sort_order: 4 },- { date: '2018-01-03', account: 'foo', amount: -5, sort_order: 1 }+ { date: '2018-01-03', account: 'foo', amount: -5, sort_order: 1 },]);expect(await getTransactions('2018-01-05')).toMatchSnapshot();});@@ -88,22 +88,22 @@ describe('Database', () => {date: '2018-01-03',account: 'foo',amount: -24,- sort_order: 4+ sort_order: 4,},{id: 'foo1',date: '2018-01-03',account: 'foo',amount: 12,- sort_order: 4+ sort_order: 4,},{id: 'foo2',date: '2018-01-03',account: 'foo',amount: 2,- sort_order: 4- }+ sort_order: 4,+ },]);expect(await getTransactions('2018-01-05')).toMatchSnapshot();});@@ -118,7 +118,7 @@ describe('Database', () => {account: 'foo',amount: -24,sort_order: 8,- is_parent: true+ is_parent: true,},{id: 'child3',@@ -127,7 +127,7 @@ describe('Database', () => {amount: -5,sort_order: 7.97,is_child: true,- parent_id: 'foo'+ parent_id: 'foo',},{id: 'child1',@@ -136,7 +136,7 @@ describe('Database', () => {amount: 12,sort_order: 7.99,is_child: true,- parent_id: 'foo'+ parent_id: 'foo',},{id: 'child2',@@ -145,8 +145,8 @@ describe('Database', () => {amount: 2,sort_order: 7.98,is_child: true,- parent_id: 'foo'- }+ parent_id: 'foo',+ },]);expect(await getTransactions('2018-01-05')).toMatchSnapshot();});@@ -160,7 +160,7 @@ describe('Database', () => {account: 'foo',amount: -5,sort_order: 7.97,- is_child: true+ is_child: true,},{id: 'foo/child1',@@ -168,7 +168,7 @@ describe('Database', () => {account: 'foo',amount: 12,sort_order: 7.99,- is_child: true+ is_child: true,},{id: 'foo/child2',@@ -176,8 +176,8 @@ describe('Database', () => {account: 'foo',amount: 2,sort_order: 7.98,- is_child: true- }+ is_child: true,+ },]);expect(await getTransactions('2018-01-05')).toMatchSnapshot();});@@ -187,12 +187,12 @@ describe('Database', () => {await db.insertCategory({id: 'cat1',name: 'cat1',- cat_group: 'group1'+ cat_group: 'group1',});await db.insertCategory({id: 'cat2',name: 'cat2',- cat_group: 'group1'+ cat_group: 'group1',});await insertTransactions([@@ -204,7 +204,7 @@ describe('Database', () => {category: 'cat1',amount: -24,sort_order: 8,- is_parent: true+ is_parent: true,},{id: 'child3',@@ -214,7 +214,7 @@ describe('Database', () => {amount: -5,sort_order: 7.97,is_child: true,- parent_id: 'parent1'+ parent_id: 'parent1',},{id: 'child2',@@ -224,8 +224,8 @@ describe('Database', () => {amount: 2,sort_order: 7.98,is_child: true,- parent_id: 'parent1'- }+ parent_id: 'parent1',+ },]);const rows = await db.getTransactions('foo');@@ -242,7 +242,7 @@ describe('Database', () => {date: '2018-01-05',account: 'foo',amount: -23,- sort_order: 5+ sort_order: 5,},{id: 'parent1',@@ -251,7 +251,7 @@ describe('Database', () => {category: 'cat1',amount: -24,sort_order: 8,- is_parent: true+ is_parent: true,},{id: 'child3',@@ -261,7 +261,7 @@ describe('Database', () => {amount: -5,sort_order: 7.97,is_child: true,- parent_id: 'parent1'+ parent_id: 'parent1',},{id: 'child2',@@ -271,8 +271,8 @@ describe('Database', () => {amount: 2,sort_order: 7.98,is_child: true,- parent_id: 'parent1'- }+ parent_id: 'parent1',+ },]);await db.deleteTransaction({ id: 'parent1' });diff --git a/packages/loot-core/src/server/db/mappings.js b/packages/loot-core/src/server/db/mappings.jsindex 91d0007bfa..32358a38d2 100644--- a/packages/loot-core/src/server/db/mappings.js+++ b/packages/loot-core/src/server/db/mappings.js@@ -23,11 +23,11 @@ export async function loadMappings() {// data. But you know, we really could keep a global mapping table.let categories = (await db.all('SELECT * FROM category_mapping')).map(r => [r.id,- r.transferId+ r.transferId,]);let payees = (await db.all('SELECT * FROM payee_mapping')).map(r => [r.id,- r.targetId+ r.targetId,]);// All ids are unique, so we can just keep a global table of mappingsdiff --git a/packages/loot-core/src/server/db/util.js b/packages/loot-core/src/server/db/util.jsindex ef4930f526..cce97d26e4 100644--- a/packages/loot-core/src/server/db/util.js+++ b/packages/loot-core/src/server/db/util.js@@ -3,7 +3,7 @@ export async function incrFetch(terms,compare,makeQuery,- params = []+ params = [],) {let pageCount = 500;let results = [];diff --git a/packages/loot-core/src/server/encryption-internals.js b/packages/loot-core/src/server/encryption-internals.jsindex d330ecbe04..bdae080351 100644--- a/packages/loot-core/src/server/encryption-internals.js+++ b/packages/loot-core/src/server/encryption-internals.js@@ -26,8 +26,8 @@ export function encrypt(masterKey, value) {keyId: masterKey.getId(),algorithm: ENCRYPTION_ALGORITHM,iv: iv.toString('base64'),- authTag: authTag.toString('base64')- }+ authTag: authTag.toString('base64'),+ },};}@@ -50,14 +50,14 @@ export function createKey({ secret, salt }) {let buffer = createKeyBuffer({ secret, salt });return {raw: buffer,- base64: buffer.toString('base64')+ base64: buffer.toString('base64'),};}export function importKey(str) {return {raw: Buffer.from(str, 'base64'),- base64: str+ base64: str,};}@@ -75,6 +75,6 @@ function createKeyBuffer({ numBytes, secret, salt }) {salt || crypto.randomBytes(32).toString('base64'),10000,numBytes || 32,- 'sha512'+ 'sha512',);}diff --git a/packages/loot-core/src/server/encryption-internals.web.js b/packages/loot-core/src/server/encryption-internals.web.jsindex 42525354af..d808d13a2b 100644--- a/packages/loot-core/src/server/encryption-internals.web.js+++ b/packages/loot-core/src/server/encryption-internals.web.js@@ -29,10 +29,10 @@ export async function encrypt(masterKey, value) {{name: browserAlgorithmName(ENCRYPTION_ALGORITHM),iv,- tagLength: 128+ tagLength: 128,},masterKey.getValue().raw,- value+ value,);encrypted = Buffer.from(encrypted);@@ -47,8 +47,8 @@ export async function encrypt(masterKey, value) {keyId: masterKey.getId(),algorithm: ENCRYPTION_ALGORITHM,iv: Buffer.from(iv).toString('base64'),- authTag: authTag.toString('base64')- }+ authTag: authTag.toString('base64'),+ },};}@@ -59,10 +59,10 @@ export async function decrypt(masterKey, encrypted, meta) {{name: browserAlgorithmName(algorithm),iv: Buffer.from(iv, 'base64'),- tagLength: 128+ tagLength: 128,},masterKey.getValue().raw,- Buffer.concat([encrypted, Buffer.from(authTag, 'base64')])+ Buffer.concat([encrypted, Buffer.from(authTag, 'base64')]),);return Buffer.from(decrypted);@@ -77,7 +77,7 @@ export async function createKey({ secret, salt }) {passwordBuffer,{ name: 'PBKDF2' },false,- ['deriveBits', 'deriveKey']+ ['deriveBits', 'deriveKey'],);let derivedKey = await crypto.subtle.deriveKey(@@ -85,19 +85,19 @@ export async function createKey({ secret, salt }) {name: 'PBKDF2',hash: 'SHA-512',salt: saltBuffer,- iterations: 10000+ iterations: 10000,},passwordKey,{ name: 'AES-GCM', length: 256 },true,- ['encrypt', 'decrypt']+ ['encrypt', 'decrypt'],);let exported = await crypto.subtle.exportKey('raw', derivedKey);return {raw: derivedKey,- base64: Buffer.from(exported).toString('base64')+ base64: Buffer.from(exported).toString('base64'),};}@@ -107,11 +107,11 @@ export async function importKey(str) {Buffer.from(str, 'base64'),{ name: 'AES-GCM' },false,- ['encrypt', 'decrypt']+ ['encrypt', 'decrypt'],);return {raw: key,- base64: str+ base64: str,};}diff --git a/packages/loot-core/src/server/encryption.js b/packages/loot-core/src/server/encryption.jsindex 1763c09b47..c76ea23352 100644--- a/packages/loot-core/src/server/encryption.js+++ b/packages/loot-core/src/server/encryption.js@@ -30,7 +30,7 @@ class Key {serialize() {return {id: this.id,- base64: this.value.base64+ base64: this.value.base64,};}}@@ -93,5 +93,5 @@ export default {getKey,hasKey,unloadKey,- unloadAllKeys+ unloadAllKeys,};diff --git a/packages/loot-core/src/server/encryption.test.js b/packages/loot-core/src/server/encryption.test.jsindex 35a0b85791..a1dfe57a1d 100644--- a/packages/loot-core/src/server/encryption.test.js+++ b/packages/loot-core/src/server/encryption.test.js@@ -7,7 +7,7 @@ describe('Encryption', () => {let key = await encryption.createKey({id: 'foo',password: 'mypassword',- salt: 'salt'+ salt: 'salt',});await encryption.loadKey(key);diff --git a/packages/loot-core/src/server/main.js b/packages/loot-core/src/server/main.jsindex a79957c742..6e12922da2 100644--- a/packages/loot-core/src/server/main.js+++ b/packages/loot-core/src/server/main.js@@ -28,7 +28,7 @@ import {loadBackup,makeBackup,startBackupService,- stopBackupService+ stopBackupService,} from './backups';import budgetApp from './budget/app';import * as budget from './budget/base';@@ -41,7 +41,7 @@ import {serializeClock,deserializeClock,Timestamp,- merkle+ merkle,} from './crdt';import * as db from './db';import * as mappings from './db/mappings';@@ -65,7 +65,7 @@ import {clearFullSyncTimeout,syncAndReceiveMessages,resetSync,- repairSync+ repairSync,} from './sync';import * as syncMigrations from './sync/migrate';import toolsApp from './tools/app';@@ -115,14 +115,14 @@ handlers['transactions-batch-update'] = mutator(async function ({added,deleted,updated,- learnCategories+ learnCategories,}) {return withUndo(async () => {let result = await batchUpdateTransactions({added,updated,deleted,- learnCategories+ learnCategories,});// Return all data updates to the frontend@@ -151,14 +151,14 @@ handlers['transactions-filter'] = async function ({latestDate,count,notPaged,- options = {}+ options = {},}) {return db.getTransactions(term,accountId,latestDate,notPaged ? null : count == null ? undefined : count,- options+ options,);};@@ -170,7 +170,7 @@ handlers['transactions-export'] = async function ({transactions,accounts,categoryGroups,- payees+ payees,}) {return exportToCSV(transactions, accounts, categoryGroups, payees);};@@ -182,7 +182,7 @@ handlers['transactions-export-query'] = async function ({ query: queryState }) {handlers['get-categories'] = async function () {return {grouped: await db.getCategoriesGrouped(),- list: await db.getCategories()+ list: await db.getCategories(),};};@@ -192,7 +192,7 @@ handlers['get-earliest-transaction'] = async function () {.options({ splits: 'none' }).orderBy({ date: 'asc' }).select('*')- .limit(1)+ .limit(1),);return data[0] || null;};@@ -220,7 +220,7 @@ handlers['rollover-budget-month'] = async function ({ month }) {value('from-last-month'),value('total-income'),value('total-spent'),- value('total-leftover')+ value('total-leftover'),];for (let group of groups) {@@ -234,7 +234,7 @@ handlers['rollover-budget-month'] = async function ({ month }) {values = values.concat([value(`group-budget-${group.id}`),value(`group-sum-amount-${group.id}`),- value(`group-leftover-${group.id}`)+ value(`group-leftover-${group.id}`),]);for (let cat of group.categories) {@@ -242,7 +242,7 @@ handlers['rollover-budget-month'] = async function ({ month }) {value(`budget-${cat.id}`),value(`sum-amount-${cat.id}`),value(`leftover-${cat.id}`),- value(`carryover-${cat.id}`)+ value(`carryover-${cat.id}`),]);}}@@ -267,21 +267,21 @@ handlers['report-budget-month'] = async function ({ month }) {value('total-income'),value('total-spent'),value('real-saved'),- value('total-leftover')+ value('total-leftover'),];for (let group of groups) {values = values.concat([value(`group-budget-${group.id}`),value(`group-sum-amount-${group.id}`),- value(`group-leftover-${group.id}`)+ value(`group-leftover-${group.id}`),]);for (let cat of group.categories) {values = values.concat([value(`budget-${cat.id}`),value(`sum-amount-${cat.id}`),- value(`leftover-${cat.id}`)+ value(`leftover-${cat.id}`),]);if (!group.is_income) {@@ -310,7 +310,7 @@ handlers['budget-set-type'] = async function ({ type }) {handlers['category-create'] = mutator(async function ({name,groupId,- isIncome+ isIncome,}) {return withUndo(async () => {if (!groupId) {@@ -320,7 +320,7 @@ handlers['category-create'] = mutator(async function ({return db.insertCategory({name,cat_group: groupId,- is_income: isIncome ? 1 : 0+ is_income: isIncome ? 1 : 0,});});});@@ -354,7 +354,7 @@ handlers['category-delete'] = mutator(async function ({ id, transferId }) {await batchMessages(async () => {let row = await db.first('SELECT is_income FROM categories WHERE id = ?',- [id]+ [id],);if (!row) {result = { error: 'no-categories' };@@ -364,7 +364,7 @@ handlers['category-delete'] = mutator(async function ({ id, transferId }) {let transfer =transferId &&(await db.first('SELECT is_income FROM categories WHERE id = ?', [- transferId+ transferId,]));if (!row || (transferId && !transfer)) {@@ -392,12 +392,12 @@ handlers['category-delete'] = mutator(async function ({ id, transferId }) {handlers['category-group-create'] = mutator(async function ({name,- isIncome+ isIncome,}) {return withUndo(async () => {return db.insertCategoryGroup({name,- is_income: isIncome ? 1 : 0+ is_income: isIncome ? 1 : 0,});});});@@ -419,19 +419,19 @@ handlers['category-group-move'] = mutator(async function ({ id, targetId }) {handlers['category-group-delete'] = mutator(async function ({id,- transferId+ transferId,}) {return withUndo(async () => {const groupCategories = await db.all('SELECT id FROM categories WHERE cat_group = ? AND tombstone = 0',- [id]+ [id],);return batchMessages(async () => {if (transferId) {await budget.doTransfer(groupCategories.map(c => c.id),- transferId+ transferId,);}await db.deleteCategoryGroup({ id }, transferId);@@ -445,7 +445,7 @@ handlers['must-category-transfer'] = async function ({ id }) {LEFT JOIN category_mapping cm ON cm.id = t.categoryWHERE cm.transferId = ? AND t.tombstone = 0`,[id],- true+ true,);// If there are transactions with this category, return early since@@ -492,14 +492,14 @@ handlers['payees-merge'] = mutator(async function ({ targetId, mergeIds }) {async () => {return db.mergePayees(targetId, mergeIds);},- { targetId, mergeIds }+ { targetId, mergeIds },);});handlers['payees-batch-change'] = mutator(async function ({added,deleted,- updated+ updated,}) {return withUndo(async () => {return batchMessages(async () => {@@ -532,7 +532,7 @@ handlers['payees-delete-rule'] = mutator(async function ({ id, payee_id }) {async () => {return await db.deletePayeeRule({ id });},- { payeeId: payee_id }+ { payeeId: payee_id },);});@@ -541,7 +541,7 @@ handlers['payees-update-rule'] = mutator(async function (rule) {async () => {return await db.updatePayeeRule(rule);},- { payeeId: rule.payee_id }+ { payeeId: rule.payee_id },);});@@ -551,7 +551,7 @@ handlers['payees-add-rule'] = mutator(async function (rule) {let id = await db.insertPayeeRule(rule);return { ...rule, id };},- { payeeId: rule.payee_id }+ { payeeId: rule.payee_id },);});@@ -583,8 +583,8 @@ function validateRule(rule) {cond.field,cond.value,cond.options,- ruleFieldTypes- )+ ruleFieldTypes,+ ),);let actionErrors = runValidation(@@ -595,14 +595,14 @@ function validateRule(rule) {action.field,action.value,action.options,- ruleFieldTypes- )+ ruleFieldTypes,+ ),);if (conditionErrors || actionErrors) {return {conditionErrors,- actionErrors+ actionErrors,};}@@ -655,7 +655,7 @@ handlers['rule-delete-all'] = mutator(async function (ids) {handlers['rule-apply-actions'] = mutator(async function ({transactionIds,- actions+ actions,}) {return rules.applyActions(transactionIds, actions, handlers);});@@ -723,7 +723,7 @@ handlers['debugCell'] = async function ({ sheetName, name }) {let node = sheet.get().getNode(resolveName(sheetName, name));return {...node,- _run: node._run && node._run.toString()+ _run: node._run && node._run.toString(),};};@@ -746,7 +746,7 @@ handlers['bank-delete'] = async function ({ id }) {const accts = await db.runQuery('SELECT * FROM accounts WHERE bank = ?',[id],- true+ true,);await db.delete_('banks', id);@@ -756,7 +756,7 @@ handlers['bank-delete'] = async function ({ id }) {// the "recorded" functionsawait db.runQuery('DELETE FROM transactions WHERE acct = ?', [acct.id]);await db.delete_('accounts', acct.id);- })+ }),);return 'ok';};@@ -775,11 +775,11 @@ handlers['accounts-get'] = async function () {handlers['account-properties'] = async function ({ id }) {const { balance } = await db.first('SELECT sum(amount) as balance FROM transactions WHERE acct = ? AND isParent = 0 AND tombstone = 0',- [id]+ [id],);const { count } = await db.first('SELECT count(id) as count FROM transactions WHERE acct = ? AND tombstone = 0',- [id]+ [id],);return { balance: balance || 0, numTransactions: count };@@ -789,13 +789,13 @@ handlers['accounts-link'] = async function ({institution,publicToken,accountId,- upgradingId+ upgradingId,}) {let bankId = await link.handoffPublicToken(institution, publicToken);let [[, userId], [, userKey]] = await asyncStorage.multiGet(['user-id',- 'user-key'+ 'user-key',]);// Get all the available accounts and find the selected one@@ -811,7 +811,7 @@ handlers['accounts-link'] = async function ({balance_available: amountToInteger(account.balances.available),balance_limit: amountToInteger(account.balances.limit),mask: account.mask,- bank: bankId+ bank: bankId,});await bankSync.syncAccount(@@ -819,12 +819,12 @@ handlers['accounts-link'] = async function ({userKey,upgradingId,account.account_id,- bankId+ bankId,);connection.send('sync-event', {type: 'success',- tables: ['transactions']+ tables: ['transactions'],});return 'ok';@@ -834,7 +834,7 @@ handlers['accounts-connect'] = async function ({institution,publicToken,accountIds,- offbudgetIds+ offbudgetIds,}) {let bankId = await link.handoffPublicToken(institution, publicToken);let ids = await link.addAccounts(bankId, accountIds, offbudgetIds);@@ -846,19 +846,19 @@ handlers['account-create'] = mutator(async function ({type,balance,offBudget,- closed+ closed,}) {return withUndo(async () => {const id = await db.insertAccount({name,type,offbudget: offBudget ? 1 : 0,- closed: closed ? 1 : 0+ closed: closed ? 1 : 0,});await db.insertPayee({name: '',- transfer_acct: id+ transfer_acct: id,});if (balance != null && balance !== 0) {@@ -871,7 +871,7 @@ handlers['account-create'] = mutator(async function ({payee: payee.id,date: monthUtils.currentDay(),cleared: true,- starting_balance_flag: true+ starting_balance_flag: true,});}@@ -883,7 +883,7 @@ handlers['account-close'] = mutator(async function ({id,transferAccountId,categoryId,- forced+ forced,}) {// Unlink the account if it's linked. This makes sure to remove it// from Plaid. (This should not be undo-able, as it mutates the@@ -893,7 +893,7 @@ handlers['account-close'] = mutator(async function ({return withUndo(async () => {let account = await db.first('SELECT * FROM accounts WHERE id = ? AND tombstone = 0',- [id]+ [id],);// Do nothing if the account doesn't exist or it's already been@@ -903,7 +903,7 @@ handlers['account-close'] = mutator(async function ({}const { balance, numTransactions } = await handlers['account-properties']({- id+ id,});// If there are no transactions, we can simply delete the account@@ -913,12 +913,12 @@ handlers['account-close'] = mutator(async function ({let rows = await db.runQuery('SELECT id, transfer_id FROM v_transactions WHERE account = ?',[id],- true+ true,);let { id: payeeId } = await db.first('SELECT id FROM payees WHERE transfer_acct = ?',- [id]+ [id],);await batchMessages(() => {@@ -933,7 +933,7 @@ handlers['account-close'] = mutator(async function ({db.updateTransaction({id: row.transfer_id,payee: null,- transfer_id: null+ transfer_id: null,});}@@ -955,7 +955,7 @@ handlers['account-close'] = mutator(async function ({if (balance !== 0) {let { id: payeeId } = await db.first('SELECT id FROM payees WHERE transfer_acct = ?',- [transferAccountId]+ [transferAccountId],);await handlers['transaction-add']({@@ -965,7 +965,7 @@ handlers['account-close'] = mutator(async function ({account: id,date: monthUtils.currentDay(),notes: 'Closing account',- category: categoryId || null+ category: categoryId || null,});}}@@ -989,7 +989,7 @@ let stopPolling = false;handlers['poll-web-token'] = async function ({ token }) {let [[, userId], [, key]] = await asyncStorage.multiGet(['user-id',- 'user-key'+ 'user-key',]);let startTime = Date.now();@@ -1010,8 +1010,8 @@ handlers['poll-web-token'] = async function ({ token }) {{userId,key,- token- }+ token,+ },);if (data) {@@ -1044,14 +1044,14 @@ handlers['poll-web-token-stop'] = async function () {handlers['accounts-sync'] = async function ({ id }) {let [[, userId], [, userKey]] = await asyncStorage.multiGet(['user-id',- 'user-key'+ 'user-key',]);let accounts = await db.runQuery(`SELECT a.*, b.id as bankId FROM accounts aLEFT JOIN banks b ON a.bank = b.idWHERE a.tombstone = 0 AND a.closed = 0`,[],- true+ true,);if (id) {@@ -1072,7 +1072,7 @@ handlers['accounts-sync'] = async function ({ id }) {userKey,acct.id,acct.account_id,- acct.bankId+ acct.bankId,);let { added, updated } = res;@@ -1089,19 +1089,19 @@ handlers['accounts-sync'] = async function ({ id }) {accountId: acct.id,message: 'Failed syncing account "' + acct.name + '".',category: err.category,- code: err.code+ code: err.code,});} else if (err instanceof PostError && err.reason !== 'internal') {errors.push({accountId: acct.id,- message: `Account "${acct.name}" is not linked properly. Please link it again`+ message: `Account "${acct.name}" is not linked properly. Please link it again`,});} else {errors.push({accountId: acct.id,message:'There was an internal error. Please get in touch https://actualbudget.github.io/docs/Contact for support.',- internal: err.stack+ internal: err.stack,});err.message = 'Failed syncing account: ' + err.message;@@ -1115,7 +1115,7 @@ handlers['accounts-sync'] = async function ({ id }) {if (updatedAccounts.length > 0) {connection.send('sync-event', {type: 'success',- tables: ['transactions']+ tables: ['transactions'],});}@@ -1124,7 +1124,7 @@ handlers['accounts-sync'] = async function ({ id }) {handlers['transactions-import'] = mutator(function ({accountId,- transactions+ transactions,}) {return withUndo(async () => {if (typeof accountId !== 'string') {@@ -1146,7 +1146,7 @@ handlers['transactions-import'] = mutator(function ({handlers['account-unlink'] = mutator(async function ({ id }) {let { bank: bankId } = await db.first('SELECT bank FROM accounts WHERE id = ?',- [id]+ [id],);if (!bankId) {@@ -1159,12 +1159,12 @@ handlers['account-unlink'] = mutator(async function ({ id }) {bank: null,balance_current: null,balance_available: null,- balance_limit: null+ balance_limit: null,});let { count } = await db.first('SELECT COUNT(*) as count FROM accounts WHERE bank = ?',- [bankId]+ [bankId],);if (count === 0) {@@ -1173,13 +1173,13 @@ handlers['account-unlink'] = mutator(async function ({ id }) {let [[, userId], [, key]] = await asyncStorage.multiGet(['user-id',- 'user-key'+ 'user-key',]);await post(getServer().PLAID_SERVER + '/remove-access-token', {userId,key,- item_id: bankId+ item_id: bankId,});}@@ -1189,13 +1189,13 @@ handlers['account-unlink'] = mutator(async function ({ id }) {handlers['make-plaid-public-token'] = async function ({ bankId }) {let [[, userId], [, userKey]] = await asyncStorage.multiGet(['user-id',- 'user-key'+ 'user-key',]);let data = await post(getServer().PLAID_SERVER + '/make-public-token', {userId: userId,key: userKey,- item_id: '' + bankId+ item_id: '' + bankId,});if (data.error_code) {@@ -1231,14 +1231,14 @@ handlers['load-global-prefs'] = async function () {[, maxMonths],[, autoUpdate],[, documentDir],- [, encryptKey]+ [, encryptKey],] = await asyncStorage.multiGet(['floating-sidebar','seen-tutorial','max-months','auto-update','document-dir',- 'encrypt-key'+ 'encrypt-key',]);return {floatingSidebar: floatingSidebar === 'true' ? true : false,@@ -1246,7 +1246,7 @@ handlers['load-global-prefs'] = async function () {maxMonths: stringToInteger(maxMonths || ''),autoUpdate: autoUpdate == null || autoUpdate === 'true' ? true : false,documentDir: documentDir || getDefaultDocumentDir(),- keyId: encryptKey && JSON.parse(encryptKey).id+ keyId: encryptKey && JSON.parse(encryptKey).id,};};@@ -1260,7 +1260,7 @@ handlers['save-prefs'] = async function (prefsToSet) {await post(getServer().SYNC_SERVER + '/update-user-filename', {token: userToken,fileId: cloudFileId,- name: prefsToSet.budgetName+ name: prefsToSet.budgetName,});}@@ -1307,8 +1307,8 @@ handlers['key-make'] = async function ({ password }) {salt,testContent: JSON.stringify({...testContent,- value: testContent.value.toString('base64')- })+ value: testContent.value.toString('base64'),+ }),});};@@ -1325,7 +1325,7 @@ handlers['key-test'] = async function ({ fileId, password }) {try {res = await post(getServer().SYNC_SERVER + '/user-get-key', {token: userToken,- fileId+ fileId,});} catch (e) {console.log(e);@@ -1433,8 +1433,8 @@ handlers['subscribe-get-user'] = async function () {try {let res = await get(getServer().SIGNUP_SERVER + '/validate', {headers: {- 'X-ACTUAL-TOKEN': userToken- }+ 'X-ACTUAL-TOKEN': userToken,+ },});res = JSON.parse(res);@@ -1460,7 +1460,7 @@ handlers['subscribe-change-password'] = async function ({ password }) {try {await post(getServer().SIGNUP_SERVER + '/change-password', {token: userToken,- password+ password,});} catch (err) {return { error: err.reason || 'network-failure' };@@ -1471,7 +1471,7 @@ handlers['subscribe-change-password'] = async function ({ password }) {handlers['subscribe-sign-in'] = async function ({ password }) {let res = await post(getServer().SIGNUP_SERVER + '/login', {- password+ password,});if (res.token) {@@ -1488,7 +1488,7 @@ handlers['subscribe-sign-out'] = async function () {'user-token','encrypt-keys','lastBudget',- 'readOnly'+ 'readOnly',]);return 'ok';};@@ -1519,7 +1519,7 @@ handlers['set-server-url'] = async function ({ url }) {if (url != null) {// Validate the server is runninglet { error } = await runHandler(handlers['subscribe-needs-bootstrap'], {- url+ url,});if (error) {return { error };@@ -1566,13 +1566,13 @@ handlers['get-budgets'] = async function () {id: name,cloudFileId: prefs.cloudFileId,groupId: prefs.groupId,- name: prefs.budgetName || '(no name)'+ name: prefs.budgetName || '(no name)',};}}return null;- })+ }),)).filter(x => x);@@ -1685,7 +1685,7 @@ handlers['create-demo-budget'] = async function () {return handlers['create-budget']({budgetName: 'Demo Budget',testMode: true,- testBudgetId: DEMO_BUDGET_ID+ testBudgetId: DEMO_BUDGET_ID,});};@@ -1734,7 +1734,7 @@ handlers['create-budget'] = async function ({budgetName,avoidUpload,testMode,- testBudgetId+ testBudgetId,} = {}) {let id;if (testMode) {@@ -1765,7 +1765,7 @@ handlers['create-budget'] = async function ({// Create the initial prefs fileawait fs.writeFile(fs.join(budgetDir, 'metadata.json'),- JSON.stringify(prefs.getDefaultPrefs(id, budgetName))+ JSON.stringify(prefs.getDefaultPrefs(id, budgetName)),);// Load it in@@ -1842,20 +1842,20 @@ handlers['import-budget'] = async function ({ filepath, type }) {let { id } = await cloudStorage.importBuffer({ cloudFileId: null, groupId: null },- buffer+ buffer,);// We never want to load cached data from imported files, so// delete the cachelet sqliteDb = await sqlite.openDatabase(- fs.join(fs.getBudgetDir(id), 'db.sqlite')+ fs.join(fs.getBudgetDir(id), 'db.sqlite'),);sqlite.execQuery(sqliteDb,`DELETE FROM kvcache;DELETE FROM kvcache_key;- `+ `,);sqlite.closeDatabase(sqliteDb);@@ -1888,7 +1888,7 @@ async function loadBudget(id, appVersion, { showUpdate } = {}) {dir = fs.getBudgetDir(id);} catch (e) {captureException(- new Error('`getBudgetDir` failed in `loadBudget`: ' + e.message)+ new Error('`getBudgetDir` failed in `loadBudget`: ' + e.message),);return { error: 'budget-not-found' };}@@ -1951,7 +1951,7 @@ async function loadBudget(id, appVersion, { showUpdate } = {}) {getClock().timestamp.setNode(makeClientId());await db.runQuery('INSERT OR REPLACE INTO messages_clock (id, clock) VALUES (1, ?)',- [serializeClock(getClock())]+ [serializeClock(getClock())],);await prefs.savePrefs({ resetClock: false });@@ -2133,7 +2133,7 @@ export async function initApp(version, isDev, socketName) {await Promise.all(Object.keys(keys).map(fileId => {return encryption.loadKey(keys[fileId]);- })+ }),);} catch (e) {console.log('Error loading key', e);@@ -2159,7 +2159,7 @@ export async function initApp(version, isDev, socketName) {let autoUpdate = await asyncStorage.getItem('auto-update');process.send({type: 'shouldAutoUpdate',- flag: autoUpdate == null || autoUpdate === 'true'+ flag: autoUpdate == null || autoUpdate === 'true',});}@@ -2231,9 +2231,9 @@ export const lib = {makeClientId,serializeClock,deserializeClock,- Timestamp+ Timestamp,},- SyncProtoBuf: SyncPb+ SyncProtoBuf: SyncPb,};if (process.env.NODE_ENV === 'development' && Platform.isWeb) {diff --git a/packages/loot-core/src/server/main.test.js b/packages/loot-core/src/server/main.test.jsindex 80b702312b..b79d609bcb 100644--- a/packages/loot-core/src/server/main.test.js+++ b/packages/loot-core/src/server/main.test.js@@ -9,7 +9,7 @@ import {runHandler,runMutator,disableGlobalMutations,- enableGlobalMutations+ enableGlobalMutations,} from './mutators';import * as prefs from './prefs';@@ -41,11 +41,11 @@ async function createTestBudget(name) {await fs.mkdir(budgetPath);await fs.copyFile(fs.join(templatePath, 'metadata.json'),- fs.join(budgetPath, 'metadata.json')+ fs.join(budgetPath, 'metadata.json'),);await fs.copyFile(fs.join(templatePath, 'db.sqlite'),- fs.join(budgetPath, 'db.sqlite')+ fs.join(budgetPath, 'db.sqlite'),);}@@ -67,7 +67,7 @@ describe('Budgets', () => {let row = await db.first('SELECT * FROM messages_clock');let { error } = await runHandler(handlers['load-budget'], {- id: 'test-budget'+ id: 'test-budget',});expect(error).toBe(undefined);@@ -87,7 +87,7 @@ describe('Budgets', () => {const spy = jest.spyOn(console, 'warn').mockImplementation();let { error } = await runHandler(handlers['load-budget'], {- id: 'test-budget'+ id: 'test-budget',});// There should be an error and the budget should be unloadedexpect(error).toBe('out-of-sync-migrations');@@ -109,12 +109,12 @@ describe('Accounts', () => {await db.insertCategoryGroup({id: 'group1',name: 'income',- is_income: 1+ is_income: 1,});await db.insertCategory({name: 'income',cat_group: 'group1',- is_income: 1+ is_income: 1,});});@@ -126,7 +126,7 @@ describe('Accounts', () => {await runHandler(handlers['accounts-connect'], {institution: { institution_id: 1, name: 'Jamesy Bank' },publicToken: 'foo',- accountIds: accounts.map(acct => acct.account_id)+ accountIds: accounts.map(acct => acct.account_id),});// Import transactions for all accounts@@ -138,11 +138,11 @@ describe('Accounts', () => {for (let account of res) {const sum = await db.first('SELECT sum(amount) as sum FROM transactions WHERE acct = ? AND starting_balance_flag = 0',- [account.id]+ [account.id],);const starting = await db.first('SELECT * FROM transactions WHERE acct = ? AND starting_balance_flag = 1',- [account.id]+ [account.id],);expect(account.balance_current - sum.sum).toBe(starting.amount);@@ -150,7 +150,7 @@ describe('Accounts', () => {// possibleconst earliestTrans = await db.first('SELECT p.name as payee_name FROM transactions t LEFT JOIN payees p ON p.id = t.description WHERE acct = ? ORDER BY date LIMIT 1',- [account.id]+ [account.id],);expect(earliestTrans.payee_name).toBe('Starting Balance');}@@ -164,17 +164,17 @@ describe('Accounts', () => {await db.insertPayee({id: 'transfer-one',name: '',- transfer_acct: 'one'+ transfer_acct: 'one',});await db.insertPayee({id: 'transfer-two',name: '',- transfer_acct: 'two'+ transfer_acct: 'two',});await db.insertPayee({id: 'transfer-three',name: '',- transfer_acct: 'three'+ transfer_acct: 'three',});});@@ -184,17 +184,17 @@ describe('Accounts', () => {account: 'one',amount: 5000,payee: 'transfer-two',- date: '2017-01-01'+ date: '2017-01-01',});let differ = expectSnapshotWithDiffer(- await db.all('SELECT * FROM transactions')+ await db.all('SELECT * FROM transactions'),);let transaction = await db.getTransaction(id);await runHandler(handlers['transaction-update'], {...(await db.getTransaction(id)),payee: 'transfer-three',- date: '2017-01-03'+ date: '2017-01-03',});differ.expectToMatchDiff(await db.all('SELECT * FROM transactions'));@@ -212,7 +212,7 @@ describe('Budget', () => {await db.insertCategoryGroup({id: 'incomeGroup',name: 'incomeGroup',- is_income: 1+ is_income: 1,});await db.insertCategoryGroup({ id: 'group1', name: 'group1' });await db.insertCategory({ name: 'foo', cat_group: 'group1' });@@ -231,7 +231,7 @@ describe('Budget', () => {await runHandler(handlers['transaction-add'], {date: '2016-05-06',amount: 50,- account: 'one'+ account: 'one',});// Fast-forward in time to a future month and make sure it creates@@ -265,40 +265,40 @@ describe('Budget', () => {// Force the system to start tracking these months so budgets are// automatically updated when adding/deleting categoriesawait db.runQuery('INSERT INTO created_budgets (month) VALUES (?)', [- '2017-01'+ '2017-01',]);await db.runQuery('INSERT INTO created_budgets (month) VALUES (?)', [- '2017-02'+ '2017-02',]);await db.runQuery('INSERT INTO created_budgets (month) VALUES (?)', [- '2017-03'+ '2017-03',]);await db.runQuery('INSERT INTO created_budgets (month) VALUES (?)', [- '2017-04'+ '2017-04',]);let categories;await captureChangedCells(async () => {await runMutator(() =>- db.insertCategoryGroup({ id: 'group1', name: 'group1' })+ db.insertCategoryGroup({ id: 'group1', name: 'group1' }),);categories = [await runHandler(handlers['category-create'], {name: 'foo',- groupId: 'group1'+ groupId: 'group1',}),await runHandler(handlers['category-create'], {name: 'bar',- groupId: 'group1'+ groupId: 'group1',}),await runHandler(handlers['category-create'], {name: 'baz',- groupId: 'group1'+ groupId: 'group1',}),await runHandler(handlers['category-create'], {name: 'biz',- groupId: 'group1'- })+ groupId: 'group1',+ }),];});@@ -308,18 +308,18 @@ describe('Budget', () => {date: '2017-02-06',amount: 5000,account: 'boa',- category: categories[0]+ category: categories[0],};// Test insertionslet changed = await captureChangedCells(() =>- runHandler(handlers['transaction-add'], trans)+ runHandler(handlers['transaction-add'], trans),);expect(changed.sort()).toMatchSnapshot();// Test updateschanged = await captureChangedCells(async () => {await runHandler(handlers['transaction-update'], {...(await db.getTransaction(trans.id)),- amount: 7000+ amount: 7000,});});expect(changed.sort()).toMatchSnapshot();@@ -361,7 +361,7 @@ describe('Categories', () => {await db.insertCategoryGroup({id: 'group2',name: 'group2',- is_income: 1+ is_income: 1,});await db.insertCategory({ id: 'foo', name: 'foo', cat_group: 'group1' });await db.insertCategory({ id: 'bar', name: 'bar', cat_group: 'group1b' });@@ -369,20 +369,20 @@ describe('Categories', () => {id: 'income1',name: 'income1',is_income: 1,- cat_group: 'group2'+ cat_group: 'group2',});await db.insertCategory({id: 'income2',name: 'income2',is_income: 1,- cat_group: 'group2'+ cat_group: 'group2',});return await db.insertTransaction({date: '2017-01-01',account: 'acct',amount: 4500,- category: 'foo'+ category: 'foo',});});@@ -393,7 +393,7 @@ describe('Categories', () => {await budgetActions.setBudget({category: 'foo',month: '2018-01',- amount: 1000+ amount: 1000,});expect(sheet.getCellValue(sheetName, 'group-budget-group1')).toBe(1000);expect(sheet.getCellValue(sheetName, 'group-budget-group1b')).toBe(0);@@ -404,7 +404,7 @@ describe('Categories', () => {await runHandler(handlers['category-delete'], {id: 'foo',- transferId: 'bar'+ transferId: 'bar',});// Make sure the transaction has been updated@@ -419,7 +419,7 @@ describe('Categories', () => {// sense. Make sure this doesn't do anything.let { error } = await runHandler(handlers['category-delete'], {id: 'income1',- transferId: 'bar'+ transferId: 'bar',});expect(error).toBe('category-type');@@ -429,7 +429,7 @@ describe('Categories', () => {// Make sure you can delete income categoriesawait runHandler(handlers['category-delete'], {id: 'income1',- transferId: 'income2'+ transferId: 'income2',});categories = await db.getCategories();diff --git a/packages/loot-core/src/server/migrate/cli.js b/packages/loot-core/src/server/migrate/cli.jsindex fb454c4520..693cdc8e73 100755--- a/packages/loot-core/src/server/migrate/cli.js+++ b/packages/loot-core/src/server/migrate/cli.js@@ -8,7 +8,7 @@ import {getMigrationList,getAppliedMigrations,getPending,- migrate+ migrate,} from './migrations';const fs = require('fs');@@ -19,18 +19,18 @@ const argv = require('yargs').options({alias: 'migrationsDir',requiresArg: true,type: 'string',- describe: 'Migrations directory'+ describe: 'Migrations directory',},name: {requiresArg: true,type: 'string',- describe: 'Name of new migration'+ describe: 'Name of new migration',},db: {requiresArg: true,type: 'string',- describe: 'Path to database'- }+ describe: 'Path to database',+ },}).argv;function getDatabase(shouldReset) {@@ -66,7 +66,7 @@ withMigrationsDir(argv.migrationsDir || getMigrationsDir(), async () => {fs.unlinkSync(argv.db);const initSql = fs.readFileSync(path.join(__dirname, '../../../src/server/sql/init.sql'),- 'utf8'+ 'utf8',);getDatabase().exec(initSql);break;diff --git a/packages/loot-core/src/server/migrate/migrations.js b/packages/loot-core/src/server/migrate/migrations.jsindex 3bf278eebe..d4b7ae2dbc 100644--- a/packages/loot-core/src/server/migrate/migrations.js+++ b/packages/loot-core/src/server/migrate/migrations.js@@ -10,7 +10,7 @@ const uuid = require('../../platform/uuid');let MIGRATIONS_DIR = fs.migrationsPath;let javascriptMigrations = {- 1632571489012: m1632571489012+ 1632571489012: m1632571489012,};export async function withMigrationsDir(dir, func) {@@ -41,7 +41,7 @@ export async function getAppliedMigrations(db) {db,'SELECT * FROM __migrations__ ORDER BY id ASC',[],- true+ true,);return rows.map(row => row.id);}@@ -74,7 +74,7 @@ async function applyJavaScript(db, id) {runQuery: (query, params, fetchAll) =>sqlite.runQuery(db, query, params, fetchAll),execQuery: query => sqlite.execQuery(db, query),- transaction: func => sqlite.transaction(db, func)+ transaction: func => sqlite.transaction(db, func),};if (javascriptMigrations[id] == null) {@@ -102,7 +102,7 @@ export async function applyMigration(db, name, migrationsDir) {await applySql(db, code);}await sqlite.runQuery(db, 'INSERT INTO __migrations__ (id) VALUES (?)', [- getMigrationId(name)+ getMigrationId(name),]);}diff --git a/packages/loot-core/src/server/migrate/migrations.test.js b/packages/loot-core/src/server/migrate/migrations.test.jsindex a008982faf..c763190b6d 100644--- a/packages/loot-core/src/server/migrate/migrations.test.js+++ b/packages/loot-core/src/server/migrate/migrations.test.js@@ -5,7 +5,7 @@ import {withMigrationsDir,getAppliedMigrations,getMigrationList,- getPending+ getPending,} from './migrations';beforeEach(global.emptyDatabase(true));@@ -14,7 +14,7 @@ describe('Migrations', () => {test('gets the latest migrations', async () => {let applied = await getAppliedMigrations(db.getDatabase());let available = await getMigrationList(- __dirname + '/../../mocks/migrations'+ __dirname + '/../../mocks/migrations',);expect(applied.length).toBe(0);@@ -35,7 +35,7 @@ describe('Migrations', () => {throw new Error('Found older migration out of order');}}- }+ },);});@@ -53,7 +53,7 @@ describe('Migrations', () => {return;}expect('should never reach here').toBe(null);- }+ },);});@@ -62,19 +62,19 @@ describe('Migrations', () => {__dirname + '/../../mocks/migrations',async () => {let desc = await db.first(- "SELECT * FROM sqlite_master WHERE name = 'poop'"+ "SELECT * FROM sqlite_master WHERE name = 'poop'",);expect(desc).toBe(null);await migrate(db.getDatabase());desc = await db.first(- "SELECT * FROM sqlite_master WHERE name = 'poop'"+ "SELECT * FROM sqlite_master WHERE name = 'poop'",);expect(desc).toBeDefined();expect(desc.sql.indexOf('is_income')).toBe(-1);expect(desc.sql.indexOf('is_expense')).not.toBe(-1);- }+ },);});});diff --git a/packages/loot-core/src/server/models.js b/packages/loot-core/src/server/models.jsindex 09ba437efc..1f504569ba 100644--- a/packages/loot-core/src/server/models.js+++ b/packages/loot-core/src/server/models.js@@ -60,11 +60,11 @@ export const accountModel = {'account',account,update ? ['name', 'type', 'offbudget', 'closed'] : ['name', 'type'],- update+ update,);return account;- }+ },};export const categoryModel = {@@ -73,12 +73,12 @@ export const categoryModel = {'category',category,update ? ['name', 'is_income', 'cat_group'] : ['name', 'cat_group'],- update+ update,);let { sort_order, ...rest } = category;return rest;- }+ },};export const categoryGroupModel = {@@ -87,19 +87,19 @@ export const categoryGroupModel = {'categoryGroup',categoryGroup,update ? ['name', 'is_income'] : ['name'],- update+ update,);let { sort_order, ...rest } = categoryGroup;return rest;- }+ },};export const payeeModel = {validate(payee, { update } = {}) {requiredFields('payee', payee, ['name'], update);return payee;- }+ },};export const payeeRuleModel = {@@ -117,7 +117,7 @@ export const payeeRuleModel = {requiredFields('payee_rules', rule, ['payee_id', 'type'], update);return rule;- }+ },};export const transactionModel = {@@ -146,7 +146,7 @@ export const transactionModel = {if (!('location' in row)) {throw new Error('A full transaction is required to be passed to `toJS`. Instead got: ' +- JSON.stringify(row)+ JSON.stringify(row),);}@@ -187,5 +187,5 @@ export const transactionModel = {}return row;- }+ },};diff --git a/packages/loot-core/src/server/mutators.js b/packages/loot-core/src/server/mutators.jsindex 2e9647800a..e44be7603a 100644--- a/packages/loot-core/src/server/mutators.js+++ b/packages/loot-core/src/server/mutators.js@@ -105,7 +105,7 @@ export function getMutatorContext() {if (currentContext == null) {captureBreadcrumb({category: 'server',- message: 'Recent methods: ' + _latestHandlerNames.join(', ')+ message: 'Recent methods: ' + _latestHandlerNames.join(', '),});// captureException(new Error('getMutatorContext: mutator not running'));diff --git a/packages/loot-core/src/server/perf.js b/packages/loot-core/src/server/perf.jsindex 43bccfece1..6182c1f5a1 100644--- a/packages/loot-core/src/server/perf.js+++ b/packages/loot-core/src/server/perf.js@@ -46,7 +46,7 @@ export function stop() {const avg = total / records.length;console.log(- `[${name}] count: ${records.length} total: ${total}s avg: ${avg}`+ `[${name}] count: ${records.length} total: ${total}s avg: ${avg}`,);}diff --git a/packages/loot-core/src/server/platform.js b/packages/loot-core/src/server/platform.jsindex bb16b34e12..75692d92ee 100644--- a/packages/loot-core/src/server/platform.js+++ b/packages/loot-core/src/server/platform.js@@ -1,5 +1,5 @@export default {isMobile: false,isWeb: false,- isDesktop: true+ isDesktop: true,};diff --git a/packages/loot-core/src/server/platform.web.js b/packages/loot-core/src/server/platform.web.jsindex b24defd8ad..71d68d5424 100644--- a/packages/loot-core/src/server/platform.web.js+++ b/packages/loot-core/src/server/platform.web.js@@ -1,5 +1,5 @@export default {isMobile: false,isWeb: true,- isDesktop: false+ isDesktop: false,};diff --git a/packages/loot-core/src/server/post.js b/packages/loot-core/src/server/post.jsindex 3dbfe244b7..59fefe719d 100644--- a/packages/loot-core/src/server/post.js+++ b/packages/loot-core/src/server/post.js@@ -28,8 +28,8 @@ export async function post(url, data) {method: 'POST',body: JSON.stringify(data),headers: {- 'Content-Type': 'application/json'- }+ 'Content-Type': 'application/json',+ },});text = await res.text();} catch (err) {@@ -52,7 +52,7 @@ export async function post(url, data) {'\nData: ' +JSON.stringify(data, null, 2) +'\nResponse: ' +- JSON.stringify(res, null, 2)+ JSON.stringify(res, null, 2),);throw new PostError(res.description || res.reason || 'unknown');@@ -70,8 +70,8 @@ export async function postBinary(url, data, headers) {headers: {'Content-Length': data.length,'Content-Type': 'application/actual-sync',- ...headers- }+ ...headers,+ },});} catch (err) {throw new PostError('network-failure');diff --git a/packages/loot-core/src/server/prefs.js b/packages/loot-core/src/server/prefs.jsindex 6e91dba3d6..ec79a9597c 100644--- a/packages/loot-core/src/server/prefs.js+++ b/packages/loot-core/src/server/prefs.js@@ -41,7 +41,7 @@ export async function savePrefs(prefsToSet, { avoidSync = false } = {}) {row: key,column: 'value',value: prefsToSet[key],- timestamp: Timestamp.send()+ timestamp: Timestamp.send(),};}return null;@@ -74,7 +74,7 @@ export function getDefaultPrefs(id, budgetName) {id,budgetName,'notifications.schedules': true,- 'notifications.repair-splits': true+ 'notifications.repair-splits': true,};}diff --git a/packages/loot-core/src/server/schedules/app.js b/packages/loot-core/src/server/schedules/app.jsindex a75edbe9bc..f60bb61aae 100644--- a/packages/loot-core/src/server/schedules/app.js+++ b/packages/loot-core/src/server/schedules/app.js@@ -9,7 +9,7 @@ import {recurConfigToRSchedule,getHasTransactionsQuery,getStatus,- getScheduledAmount+ getScheduledAmount,} from '../../shared/schedules';import { Rule, Condition } from '../accounts/rules';import { addTransactions } from '../accounts/sync';@@ -17,7 +17,7 @@ import {insertRule,updateRule,getRules,- ruleModel+ ruleModel,} from '../accounts/transaction-rules';import { createApp } from '../app';import { runQuery as aqlQuery } from '../aql';@@ -50,7 +50,7 @@ export function updateConditions(conditions, newConditions) {let replacements = zip(Object.values(scheduleConds),- Object.values(newScheduleConds)+ Object.values(newScheduleConds),);let updated = conditions.map(cond => {@@ -73,7 +73,7 @@ export function getNextDate(dateCond, start = new Date()) {'date',dateCond.value,null,- new Map(Object.entries({ date: 'date' }))+ new Map(Object.entries({ date: 'date' })),);let value = cond.getValue();@@ -96,14 +96,14 @@ export async function getRuleForSchedule(id) {}let { data: ruleId } = await aqlQuery(- q('schedules').filter({ id }).calculate('rule')+ q('schedules').filter({ id }).calculate('rule'),);return getRules().find(rule => rule.id === ruleId);}export async function fixRuleForSchedule(id) {let { data: ruleId } = await aqlQuery(- q('schedules').filter({ id }).calculate('rule')+ q('schedules').filter({ id }).calculate('rule'),);if (ruleId) {@@ -116,9 +116,9 @@ export async function fixRuleForSchedule(id) {stage: null,conditions: [{ op: 'isapprox', field: 'date', value: currentDay() },- { op: 'isapprox', field: 'amount', value: 0 }+ { op: 'isapprox', field: 'amount', value: 0 },],- actions: [{ op: 'link-schedule', value: id }]+ actions: [{ op: 'link-schedule', value: id }],});await db.updateWithSchema('schedules', { id, rule: newId });@@ -138,14 +138,14 @@ export async function setNextDate({ id, start, conditions, reset }) {let { date: dateCond } = extractScheduleConds(conditions);let { data: nextDate } = await aqlQuery(- q('schedules').filter({ id }).calculate('next_date')+ q('schedules').filter({ id }).calculate('next_date'),);// Only do this if a date condition existsif (dateCond) {let newNextDate = getNextDate(dateCond,- start ? start(nextDate) : new Date()+ start ? start(nextDate) : new Date(),);if (newNextDate !== nextDate) {@@ -153,7 +153,7 @@ export async function setNextDate({ id, start, conditions, reset }) {// have it, so we need to query itlet nd = await db.first('SELECT id, base_next_date_ts FROM schedules_next_date WHERE schedule_id = ?',- [id]+ [id],);await db.update(@@ -162,13 +162,13 @@ export async function setNextDate({ id, start, conditions, reset }) {? {id: nd.id,base_next_date: toDateRepr(newNextDate),- base_next_date_ts: Date.now()+ base_next_date_ts: Date.now(),}: {id: nd.id,local_next_date: toDateRepr(newNextDate),- local_next_date_ts: nd.base_next_date_ts- }+ local_next_date_ts: nd.base_next_date_ts,+ },);}}@@ -195,7 +195,7 @@ export async function createSchedule({ schedule, conditions = [] } = {}) {ruleId = await insertRule({stage: null,conditions,- actions: [{ op: 'link-schedule', value: scheduleId }]+ actions: [{ op: 'link-schedule', value: scheduleId }],});let now = Date.now();@@ -204,13 +204,13 @@ export async function createSchedule({ schedule, conditions = [] } = {}) {local_next_date: nextDateRepr,local_next_date_ts: now,base_next_date: nextDateRepr,- base_next_date_ts: now+ base_next_date_ts: now,});await db.insertWithSchema('schedules', {...schedule,id: scheduleId,- rule: ruleId+ rule: ruleId,});return scheduleId;@@ -265,17 +265,17 @@ export async function updateSchedule({ schedule, conditions, resetNextDate }) {resetNextDate ||!deepEqual(oldConditions.find(c => c.field === 'account'),- oldConditions.find(c => c.field === 'account')+ oldConditions.find(c => c.field === 'account'),) ||!deepEqual(stripType(oldConditions.find(c => c.field === 'date') || {}),- stripType(newConditions.find(c => c.field === 'date') || {})+ stripType(newConditions.find(c => c.field === 'date') || {}),)) {await setNextDate({id: schedule.id,conditions: newConditions,- reset: true+ reset: true,});}} else if (resetNextDate) {@@ -288,7 +288,7 @@ export async function updateSchedule({ schedule, conditions, resetNextDate }) {export async function deleteSchedule({ id }) {let { data: ruleId } = await aqlQuery(- q('schedules').filter({ id }).calculate('rule')+ q('schedules').filter({ id }).calculate('rule'),);await batchMessages(async () => {@@ -302,7 +302,7 @@ export async function skipNextDate({ id }) {id,start: nextDate => {return d.addDays(parseDate(nextDate), 1);- }+ },});}@@ -354,8 +354,8 @@ function onRuleUpdate(rule) {payeeIdx === -1 ? null : `$[${payeeIdx}]`,accountIdx === -1 ? null : `$[${accountIdx}]`,amountIdx === -1 ? null : `$[${amountIdx}]`,- dateIdx === -1 ? null : `$[${dateIdx}]`- ]+ dateIdx === -1 ? null : `$[${dateIdx}]`,+ ],);}}@@ -398,7 +398,7 @@ async function postTransactionForSchedule({ id }) {amount: getScheduledAmount(schedule._amount),date: schedule.next_date,schedule: schedule.id,- cleared: false+ cleared: false,};if (transaction.account) {@@ -413,10 +413,10 @@ export async function advanceSchedulesService(syncSuccess) {let { data: schedules } = await aqlQuery(q('schedules').filter({ completed: false, '_account.closed': false })- .select('*')+ .select('*'),);let { data: hasTransData } = await aqlQuery(- getHasTransactionsQuery(schedules)+ getHasTransactionsQuery(schedules),);let hasTrans = new Set(hasTransData.filter(Boolean).map(row => row.schedule));@@ -427,7 +427,7 @@ export async function advanceSchedulesService(syncSuccess) {let status = getStatus(schedule.next_date,schedule.completed,- hasTrans.has(schedule.id)+ hasTrans.has(schedule.id),);if (status === 'paid') {@@ -444,7 +444,7 @@ export async function advanceSchedulesService(syncSuccess) {if (schedule._date < currentDay()) {// Complete any single schedulesawait updateSchedule({- schedule: { id: schedule.id, completed: true }+ schedule: { id: schedule.id, completed: true },});}}@@ -475,7 +475,7 @@ export async function advanceSchedulesService(syncSuccess) {connection.send('sync-event', {type: 'success',tables: ['transactions'],- syncDisabled: 'false'+ syncDisabled: 'false',});}}@@ -489,11 +489,11 @@ app.method('schedule/delete', mutator(undoable(deleteSchedule)));app.method('schedule/skip-next-date', mutator(undoable(skipNextDate)));app.method('schedule/post-transaction',- mutator(undoable(postTransactionForSchedule))+ mutator(undoable(postTransactionForSchedule)),);app.method('schedule/force-run-service',- mutator(() => advanceSchedulesService(true))+ mutator(() => advanceSchedulesService(true)),);app.method('schedule/get-possible-transactions', getPossibleTransactions);app.method('schedule/discover', discoverSchedules);diff --git a/packages/loot-core/src/server/schedules/app.test.js b/packages/loot-core/src/server/schedules/app.test.jsindex a398c8704d..812a95adce 100644--- a/packages/loot-core/src/server/schedules/app.test.js+++ b/packages/loot-core/src/server/schedules/app.test.js@@ -11,7 +11,7 @@ import {createSchedule,updateSchedule,deleteSchedule,- setNextDate+ setNextDate,} from './app';beforeEach(async () => {@@ -29,15 +29,15 @@ describe('schedule app', () => {it('conditions are updated when they exist', () => {let conds = [{ op: 'is', field: 'payee', value: 'FOO' },- { op: 'is', field: 'date', value: '2020-01-01' }+ { op: 'is', field: 'date', value: '2020-01-01' },];let updated = updateConditions(conds, [{op: 'is',field: 'payee',- value: 'bar'- }+ value: 'bar',+ },]);expect(updated.length).toBe(2);@@ -47,15 +47,15 @@ describe('schedule app', () => {it("conditions are added if they don't exist", () => {let conds = [{ op: 'contains', field: 'payee', value: 'FOO' },- { op: 'contains', field: 'notes', value: 'dflksjdflskdjf' }+ { op: 'contains', field: 'notes', value: 'dflksjdflskdjf' },];let updated = updateConditions(conds, [{op: 'is',field: 'payee',- value: 'bar'- }+ value: 'bar',+ },]);expect(updated.length).toBe(3);@@ -63,7 +63,7 @@ describe('schedule app', () => {it('getNextDate works with date conditions', () => {expect(- getNextDate({ op: 'is', field: 'date', value: '2021-04-30' })+ getNextDate({ op: 'is', field: 'date', value: '2021-04-30' }),).toBe('2021-04-30');expect(@@ -75,10 +75,10 @@ describe('schedule app', () => {frequency: 'monthly',patterns: [{ type: 'day', value: 15 },- { type: 'day', value: 30 }- ]- }- })+ { type: 'day', value: 30 },+ ],+ },+ }),).toBe('2021-05-30');});});@@ -95,15 +95,15 @@ describe('schedule app', () => {frequency: 'monthly',patterns: [{ type: 'day', value: 15 },- { type: 'day', value: 30 }- ]- }- }- ]+ { type: 'day', value: 30 },+ ],+ },+ },+ ],});let {- data: [row]+ data: [row],} = await aqlQuery(q('schedules').filter({ id }).select('*'));expect(row).toBeTruthy();@@ -112,8 +112,8 @@ describe('schedule app', () => {await expect(createSchedule({- conditions: [{ op: 'is', field: 'payee', value: 'p1' }]- })+ conditions: [{ op: 'is', field: 'payee', value: 'p1' }],+ }),).rejects.toThrow(/date condition is required/);});@@ -129,15 +129,17 @@ describe('schedule app', () => {frequency: 'monthly',patterns: [{ type: 'day', value: 15 },- { type: 'day', value: 30 }- ]- }- }- ]+ { type: 'day', value: 30 },+ ],+ },+ },+ ],});let res = await aqlQuery(- q('schedules').filter({ id }).select(['next_date', 'posts_transaction'])+ q('schedules')+ .filter({ id })+ .select(['next_date', 'posts_transaction']),);let row = res.data[0];@@ -157,15 +159,17 @@ describe('schedule app', () => {frequency: 'monthly',patterns: [{ type: 'day', value: 18 },- { type: 'day', value: 29 }- ]- }- }- ]+ { type: 'day', value: 29 },+ ],+ },+ },+ ],});res = await aqlQuery(- q('schedules').filter({ id }).select(['next_date', 'posts_transaction'])+ q('schedules')+ .filter({ id })+ .select(['next_date', 'posts_transaction']),);row = res.data[0];@@ -185,11 +189,11 @@ describe('schedule app', () => {frequency: 'monthly',patterns: [{ type: 'day', value: 15 },- { type: 'day', value: 30 }- ]- }- }- ]+ { type: 'day', value: 30 },+ ],+ },+ },+ ],});let { data: schedules } = await aqlQuery(q('schedules').select('*'));@@ -211,15 +215,15 @@ describe('schedule app', () => {frequency: 'monthly',patterns: [{ type: 'day', value: 15 },- { type: 'day', value: 30 }- ]- }- }- ]+ { type: 'day', value: 30 },+ ],+ },+ },+ ],});let { data: ruleId } = await aqlQuery(- q('schedules').filter({ id }).calculate('rule')+ q('schedules').filter({ id }).calculate('rule'),);// Manually update the rule@@ -234,15 +238,15 @@ describe('schedule app', () => {frequency: 'monthly',patterns: [{ type: 'day', value: 18 },- { type: 'day', value: 28 }- ]- }- }- ]+ { type: 'day', value: 28 },+ ],+ },+ },+ ],});let res = await aqlQuery(- q('schedules').filter({ id }).select(['next_date'])+ q('schedules').filter({ id }).select(['next_date']),);let row = res.data[0];diff --git a/packages/loot-core/src/server/schedules/find-schedules.js b/packages/loot-core/src/server/schedules/find-schedules.jsindex 497a9efd67..893639db40 100644--- a/packages/loot-core/src/server/schedules/find-schedules.js+++ b/packages/loot-core/src/server/schedules/find-schedules.js@@ -31,11 +31,11 @@ async function getTransactions(date, account) {'payee.transfer_acct': null,$and: [{ date: { $gte: d.subDays(date, 2) } },- { date: { $lte: d.addDays(date, 2) } }- ]+ { date: { $lte: d.addDays(date, 2) } },+ ],}).select('*')- .options({ splits: 'none' })+ .options({ splits: 'none' }),);return data;}@@ -63,7 +63,7 @@ export function matchSchedules(allOccurs, config, partialMatchRank = 0.5) {let matched = occur.transactions.find(t =>t.amount >= trans.amount - threshold &&- t.amount <= trans.amount + threshold+ t.amount <= trans.amount + threshold,);matched = matched && matched.payee === payee ? matched : null;@@ -79,12 +79,12 @@ export function matchSchedules(allOccurs, config, partialMatchRank = 0.5) {let rank = found.reduce((total, match) => total + match.rank,- getRank(baseOccur.date, trans.date)+ getRank(baseOccur.date, trans.date),);let exactAmount = found.reduce((exact, match) => exact && match.trans.amount === trans.amount,- true+ true,);schedules.push({@@ -96,7 +96,7 @@ export function matchSchedules(allOccurs, config, partialMatchRank = 0.5) {// Exact dates rank as 1, so all of them matches exactly it// would equal the number of `allOccurs`exactDate: rank === allOccurs.length,- exactAmount+ exactAmount,});}@@ -108,7 +108,7 @@ async function schedulesForPattern(numDays,baseConfig,accountId,- partialMatchRank+ partialMatchRank,) {let schedules = [];@@ -134,12 +134,12 @@ async function schedulesForPattern(for (let date of dates) {data.push({date: dayFromDate(date),- transactions: await getTransactions(date, accountId)+ transactions: await getTransactions(date, accountId),});}schedules = schedules.concat(- matchSchedules(data, config, partialMatchRank)+ matchSchedules(data, config, partialMatchRank),);}return schedules;@@ -150,7 +150,7 @@ async function weekly(startDate, accountId) {d.subWeeks(parseDate(startDate), 4),7 * 2,{ frequency: 'weekly' },- accountId+ accountId,);}@@ -161,7 +161,7 @@ async function every2weeks(startDate, accountId) {d.subWeeks(parseDate(startDate), 7),7 * 2,{ frequency: 'weekly', interval: 2 },- accountId+ accountId,);}@@ -180,7 +180,7 @@ async function monthly(startDate, accountId) {}return { start, frequency: 'monthly' };},- accountId+ accountId,);}@@ -194,7 +194,7 @@ async function monthlyLastDay(startDate, accountId) {accountId,// Last day patterns should win over day-specific ones that just// happen to match- 0.75+ 0.75,);let s2 = await schedulesForPattern(@@ -202,7 +202,7 @@ async function monthlyLastDay(startDate, accountId) {1,{ frequency: 'monthly', patterns: [{ type: 'day', value: -1 }] },accountId,- 0.75+ 0.75,);return s1.concat(s2);@@ -221,11 +221,11 @@ async function monthly1stor3rd(startDate, accountId) {frequency: 'monthly',patterns: [{ type: dayValue, value: 1 },- { type: dayValue, value: 3 }- ]+ { type: dayValue, value: 3 },+ ],};},- accountId+ accountId,);}@@ -242,11 +242,11 @@ async function monthly2ndor4th(startDate, accountId) {frequency: 'monthly',patterns: [{ type: dayValue, value: 2 },- { type: dayValue, value: 4 }- ]+ { type: dayValue, value: 4 },+ ],};},- accountId+ accountId,);}@@ -264,8 +264,8 @@ async function findStartDate(schedule) {currentConfig.start = dayFromDate(d.subWeeks(parseDate(currentConfig.start),- currentConfig.interval || 1- )+ currentConfig.interval || 1,+ ),);break;@@ -273,16 +273,16 @@ async function findStartDate(schedule) {currentConfig.start = dayFromDate(d.subMonths(parseDate(currentConfig.start),- currentConfig.interval || 1- )+ currentConfig.interval || 1,+ ),);break;case 'yearly':currentConfig.start = dayFromDate(d.subYears(parseDate(currentConfig.start),- currentConfig.interval || 1- )+ currentConfig.interval || 1,+ ),);break;default:@@ -290,11 +290,11 @@ async function findStartDate(schedule) {}let newConditions = conditions.map(c =>- c.field === 'date' ? { ...c, value: currentConfig } : c+ c.field === 'date' ? { ...c, value: currentConfig } : c,);let { filters, errors } = conditionsToAQL(newConditions, {- recurDateBounds: 1+ recurDateBounds: 1,});if (errors.length > 0) {// Somehow we generated an invalid config. Abort the whole@@ -304,7 +304,7 @@ async function findStartDate(schedule) {}let { data } = await aqlQuery(- q('transactions').filter({ $and: filters }).select('*')+ q('transactions').filter({ $and: filters }).select('*'),);if (data.length === 0) {@@ -319,8 +319,8 @@ async function findStartDate(schedule) {...schedule,date: currentConfig,_conditions: conditions.map(c =>- c.field === 'date' ? { ...c, value: currentConfig } : c- )+ c.field === 'date' ? { ...c, value: currentConfig } : c,+ ),};}return schedule;@@ -338,7 +338,7 @@ export async function findSchedules() {// and find the best one...let { data: accounts } = await aqlQuery(- q('accounts').filter({ closed: false }).select('*')+ q('accounts').filter({ closed: false }).select('*'),);let allSchedules = [];@@ -347,7 +347,7 @@ export async function findSchedules() {// Find latest transaction-ish to start withlet latestTrans = await db.first('SELECT * FROM v_transactions WHERE account = ? AND parent_id IS NULL ORDER BY date DESC LIMIT 1',- [account.id]+ [account.id],);if (latestTrans) {@@ -358,7 +358,7 @@ export async function findSchedules() {await monthly(latestDate, account.id),await monthlyLastDay(latestDate, account.id),await monthly1stor3rd(latestDate, account.id),- await monthly2ndor4th(latestDate, account.id)+ await monthly2ndor4th(latestDate, account.id),);}}@@ -381,16 +381,16 @@ export async function findSchedules() {{op: winner.exactDate ? 'is' : 'isapprox',field: 'date',- value: winner.date+ value: winner.date,},{op: winner.exactAmount ? 'is' : 'isapprox',field: 'amount',- value: winner.amount- }- ]+ value: winner.amount,+ },+ ],};- }+ },);let finalized = [];diff --git a/packages/loot-core/src/server/server-config.js b/packages/loot-core/src/server/server-config.jsindex 1b9b64e73e..f2c0058c69 100644--- a/packages/loot-core/src/server/server-config.js+++ b/packages/loot-core/src/server/server-config.js@@ -23,7 +23,7 @@ export function getServer(url) {BASE_SERVER: url,SYNC_SERVER: joinURL(url, '/sync'),SIGNUP_SERVER: joinURL(url, '/account'),- PLAID_SERVER: joinURL(url, '/plaid')+ PLAID_SERVER: joinURL(url, '/plaid'),};}return config;diff --git a/packages/loot-core/src/server/sheet.js b/packages/loot-core/src/server/sheet.jsindex 56410268cf..3b10823bec 100644--- a/packages/loot-core/src/server/sheet.js+++ b/packages/loot-core/src/server/sheet.js@@ -25,7 +25,7 @@ async function updateSpreadsheetCache(rawDb, names) {sqlite.runQuery(rawDb,'INSERT OR REPLACE INTO kvcache (key, value) VALUES (?, ?)',- [name, JSON.stringify(node.value)]+ [name, JSON.stringify(node.value)],);}});@@ -39,14 +39,14 @@ function setCacheStatus(mainDb, cacheDb, { clean }) {sqlite.runQuery(cacheDb,'INSERT OR REPLACE INTO kvcache_key (id, key) VALUES (1, ?)',- [num]+ [num],);if (mainDb) {sqlite.runQuery(mainDb,'INSERT OR REPLACE INTO kvcache_key (id, key) VALUES (1, ?)',- [num]+ [num],);}} else {@@ -59,7 +59,7 @@ function isCacheDirty(mainDb, cacheDb) {cacheDb,'SELECT key FROM kvcache_key WHERE id = 1',[],- true+ true,);let num = rows.length === 0 ? null : rows[0].key;@@ -72,7 +72,7 @@ function isCacheDirty(mainDb, cacheDb) {mainDb,'SELECT key FROM kvcache_key WHERE id = 1',[],- true+ true,);if (rows.length === 0 || rows[0].key !== num) {return true;@@ -103,7 +103,7 @@ export async function loadSpreadsheet(db, onSheetChange) {`CREATE TABLE IF NOT EXISTS kvcache (key TEXT PRIMARY KEY, value TEXT);CREATE TABLE IF NOT EXISTS kvcache_key (id INTEGER PRIMARY KEY, key REAL)- `+ `,);} else {// All other platforms use the same database for cache@@ -114,7 +114,7 @@ export async function loadSpreadsheet(db, onSheetChange) {if (cacheEnabled) {sheet = new Spreadsheet(updateSpreadsheetCache.bind(null, cacheDb),- setCacheStatus.bind(null, mainDb, cacheDb)+ setCacheStatus.bind(null, mainDb, cacheDb),);} else {sheet = new Spreadsheet();@@ -122,7 +122,7 @@ export async function loadSpreadsheet(db, onSheetChange) {captureBreadcrumb({message: 'loading spreaadsheet',- category: 'server'+ category: 'server',});globalSheet = sheet;@@ -137,7 +137,7 @@ export async function loadSpreadsheet(db, onSheetChange) {cacheDb,'SELECT * FROM kvcache',[],- true+ true,);console.log(`Loaded spreadsheet from cache (${cachedRows.length} items)`);@@ -152,7 +152,7 @@ export async function loadSpreadsheet(db, onSheetChange) {captureBreadcrumb({message: 'loaded spreaadsheet',- category: 'server'+ category: 'server',});return sheet;@@ -202,7 +202,7 @@ export async function loadUserBudgets(db) {sheet.set(`${sheetName}!budget-${budget.category}`, budget.amount);sheet.set(`${sheetName}!carryover-${budget.category}`,- budget.carryover === 1 ? true : false+ budget.carryover === 1 ? true : false,);}}diff --git a/packages/loot-core/src/server/sheet.test.js b/packages/loot-core/src/server/sheet.test.jsindex e5190a2732..f48a9e7413 100644--- a/packages/loot-core/src/server/sheet.test.js+++ b/packages/loot-core/src/server/sheet.test.js@@ -16,8 +16,8 @@ async function insertTransactions() {amount: -3200,account: '1',category: 'cat1',- date: '2017-01-08'- })[0]+ date: '2017-01-08',+ })[0],);await db.insertTransaction(generateTransaction({@@ -25,8 +25,8 @@ async function insertTransactions() {amount: -2800,account: '1',category: 'cat2',- date: '2017-01-10'- })[0]+ date: '2017-01-10',+ })[0],);await db.insertTransaction(generateTransaction({@@ -34,8 +34,8 @@ async function insertTransactions() {amount: -9832,account: '1',category: 'cat2',- date: '2017-01-15'- })[0]+ date: '2017-01-15',+ })[0],);}@@ -47,7 +47,7 @@ describe('Spreadsheet', () => {spreadsheet.startTransaction();spreadsheet.set('g!foo',- `=from transactions where category = "cat2" calculate { sum(amount) }`+ `=from transactions where category = "cat2" calculate { sum(amount) }`,);spreadsheet.endTransaction();@@ -77,7 +77,7 @@ describe('Spreadsheet', () => {spreadsheet.startTransaction();spreadsheet.set('g!foo',- `=from transactions where category = "cat2" calculate { sum(amount) }`+ `=from transactions where category = "cat2" calculate { sum(amount) }`,);spreadsheet.endTransaction();diff --git a/packages/loot-core/src/server/spreadsheet/globals.js b/packages/loot-core/src/server/spreadsheet/globals.jsindex c9a8eccd7c..1faf592f65 100644--- a/packages/loot-core/src/server/spreadsheet/globals.js+++ b/packages/loot-core/src/server/spreadsheet/globals.js@@ -34,5 +34,5 @@ module.exports = {firstValue,number,min,- max+ max,};diff --git a/packages/loot-core/src/server/spreadsheet/graph-data-structure.js b/packages/loot-core/src/server/spreadsheet/graph-data-structure.jsindex f6fb66e677..8cd8399dcc 100644--- a/packages/loot-core/src/server/spreadsheet/graph-data-structure.js+++ b/packages/loot-core/src/server/spreadsheet/graph-data-structure.js@@ -9,7 +9,7 @@ function Graph(serialized) {removeIncomingEdges,topologicalSort,generateDOT,- getEdges+ getEdges,};var edges = new Map();diff --git a/packages/loot-core/src/server/spreadsheet/new/compiler.js b/packages/loot-core/src/server/spreadsheet/new/compiler.jsindex 76c62176d7..e6df083f2e 100644--- a/packages/loot-core/src/server/spreadsheet/new/compiler.js+++ b/packages/loot-core/src/server/spreadsheet/new/compiler.js@@ -11,7 +11,7 @@ import {VAR,JUMPF,JUMPT,- LABEL+ LABEL,} from './ops';import parse from './parser';import generateSql from './sqlgen';@@ -32,7 +32,7 @@ class Compiler {}throw new Error(- `[${lineno + 1}, ${colno + 1}] ${msg}:\n${lines[lineno]}\n${space}^`+ `[${lineno + 1}, ${colno + 1}] ${msg}:\n${lines[lineno]}\n${space}^`,);}@@ -105,7 +105,7 @@ class Compiler {node.table,node.where,node.groupby,- node.select+ node.select,);// TODO: This is a hack, but I'm pretty sure we can get rid of all@@ -147,7 +147,7 @@ class Compiler {this.fail('Unknown node type: ' + node.getTypeName(),node.lineno,- node.colno+ node.colno,);}return method.call(this, node, si);@@ -171,7 +171,7 @@ class Compiler {return {ops: this.ops,dependencies: this.dependencies,- sqlDependencies: this.sqlDependencies+ sqlDependencies: this.sqlDependencies,};}}diff --git a/packages/loot-core/src/server/spreadsheet/new/compiler.test.js b/packages/loot-core/src/server/spreadsheet/new/compiler.test.jsindex 1cfe6529ba..b1796ebd0a 100644--- a/packages/loot-core/src/server/spreadsheet/new/compiler.test.js+++ b/packages/loot-core/src/server/spreadsheet/new/compiler.test.js@@ -3,7 +3,7 @@ import { compile } from './compiler';describe('Compiler', () => {test('get-query', () => {compile(- '=from transactions where acct.offbudget = 0 and category = null and (description.transfer_acct.offbudget = 1 or description.transfer_acct = null) calculate { count(date) }'+ '=from transactions where acct.offbudget = 0 and category = null and (description.transfer_acct.offbudget = 1 or description.transfer_acct = null) calculate { count(date) }',);});@@ -87,7 +87,7 @@ describe('Compiler', () => {test('field dependencies', () => {let sqlDependencies = compile(- '=from transactions where acct.offbudget = 0 and category = null and (description.transfer_acct.offbudget = 1 or description.transfer_acct = null) calculate { count(date) }'+ '=from transactions where acct.offbudget = 0 and category = null and (description.transfer_acct.offbudget = 1 or description.transfer_acct = null) calculate { count(date) }',).sqlDependencies;expect(sqlDependencies[0].fields).toMatchSnapshot();diff --git a/packages/loot-core/src/server/spreadsheet/new/lexer.js b/packages/loot-core/src/server/spreadsheet/new/lexer.jsindex 8d2e822921..8361ee9eb4 100644--- a/packages/loot-core/src/server/spreadsheet/new/lexer.js+++ b/packages/loot-core/src/server/spreadsheet/new/lexer.js@@ -27,7 +27,7 @@ function token(type, value, lineno, colno) {type: type,value: value,lineno: lineno,- colno: colno+ colno: colno,};}diff --git a/packages/loot-core/src/server/spreadsheet/new/nodes.js b/packages/loot-core/src/server/spreadsheet/new/nodes.jsindex 6bf52d42a1..7ca640a68f 100644--- a/packages/loot-core/src/server/spreadsheet/new/nodes.js+++ b/packages/loot-core/src/server/spreadsheet/new/nodes.js@@ -45,7 +45,7 @@ class Node {copy() {const inst = Object.assign(Object.create(Object.getPrototypeOf(this)),- this+ this,);for (var i = 0; i < inst.fieldNames.length; i++) {@@ -147,7 +147,7 @@ export class Query extends Node {select,where,groupby,- calculated+ calculated,);}getTypeName() {diff --git a/packages/loot-core/src/server/spreadsheet/new/ops.js b/packages/loot-core/src/server/spreadsheet/new/ops.jsindex a55b3e0cde..897139ad7e 100644--- a/packages/loot-core/src/server/spreadsheet/new/ops.js+++ b/packages/loot-core/src/server/spreadsheet/new/ops.js@@ -28,6 +28,6 @@ export function LABEL() {resolve(n) {idx = n;- }+ },};}diff --git a/packages/loot-core/src/server/spreadsheet/new/parser.js b/packages/loot-core/src/server/spreadsheet/new/parser.jsindex 39abe8acea..f6a67ec2cd 100644--- a/packages/loot-core/src/server/spreadsheet/new/parser.js+++ b/packages/loot-core/src/server/spreadsheet/new/parser.js@@ -55,7 +55,7 @@ function fail(state, msg, lineno, colno) {}throw new Error(- `[${lineno + 1}, ${colno + 1}] ${msg}:\n${lines[lineno]}\n${space}^`+ `[${lineno + 1}, ${colno + 1}] ${msg}:\n${lines[lineno]}\n${space}^`,);}@@ -75,7 +75,7 @@ function expectValue(state, type, value) {state,'expected ' + value + ', got ' + tok.value,tok.lineno,- tok.colno+ tok.colno,);}return tok;@@ -88,7 +88,7 @@ function expect(state, type) {state,'expected ' + type + ', got ' + tok.type,tok.lineno,- tok.colno+ tok.colno,);}return tok;@@ -154,7 +154,7 @@ function parseCompare(state) {tok.colno,tok.value,node,- parseAdd(state)+ parseAdd(state),);} else {pushToken(state, tok);@@ -250,7 +250,7 @@ function parsePrimary(state) {return parsePostfix(state,- new nodes.Symbol(tok.lineno, tok.colno, tok.value)+ new nodes.Symbol(tok.lineno, tok.colno, tok.value),);} else if (tok.type === types.TOKEN_LEFT_PAREN) {const node = parseExpression(state);@@ -312,7 +312,7 @@ function parseQueryExpression(state) {state,'Unexpected token in query select: ' + tok.value,tok.lineno,- tok.colno+ tok.colno,);}@@ -348,7 +348,7 @@ function parseQueryExpression(state) {select,where,groupby,- calculated+ calculated,);}@@ -371,7 +371,7 @@ function parsePostfix(state, node) {tok.lineno,tok.colno,node,- new nodes.Literal(val.lineno, val.colno, val.value)+ new nodes.Literal(val.lineno, val.colno, val.value),);} else if (tok.type === types.TOKEN_EXCLAIM) {const name = nextToken(state);@@ -380,14 +380,14 @@ function parsePostfix(state, node) {state,'Expected cell name in sheet reference',name.lineno,- name.colno+ name.colno,);}return new nodes.Symbol(node.lineno,node.colno,- node.value + '!' + name.value+ node.value + '!' + name.value,);} else {pushToken(state, tok);@@ -422,7 +422,7 @@ function parseArgs(state) {state,'Expected comma after function argument',tok.lineno,- tok.colno+ tok.colno,);}@@ -437,7 +437,7 @@ export default function parse(src) {let state = {src: src,tokens: lex(src),- peeked: null+ peeked: null,};if (state.tokens.is_finished()) {@@ -452,7 +452,7 @@ export default function parse(src) {state,'Unexpected token after expression: ' + tok.value,tok.lineno,- tok.colno+ tok.colno,);}diff --git a/packages/loot-core/src/server/spreadsheet/new/sqlgen.js b/packages/loot-core/src/server/spreadsheet/new/sqlgen.jsindex 665464c73a..a62d2a6a92 100644--- a/packages/loot-core/src/server/spreadsheet/new/sqlgen.js+++ b/packages/loot-core/src/server/spreadsheet/new/sqlgen.js@@ -123,7 +123,7 @@ function transformLookups(node, implicitTable) {lookups = lookups.map((lookup, idx) => {return {field: lookup.field,- tableId: uid()+ tableId: uid(),};});@@ -136,14 +136,14 @@ function transformLookups(node, implicitTable) {if (!SCHEMA_PATHS[table]) {const err = new Error(- `Table "${table}" not joinable for field "${lookup}"`+ `Table "${table}" not joinable for field "${lookup}"`,);err.node = node;throw err;}if (!SCHEMA_PATHS[table][lookup.field]) {const err = new Error(- `Unknown field "${lookup}" on table "${table}"`+ `Unknown field "${lookup}" on table "${table}"`,);err.node = node;throw err;@@ -161,7 +161,7 @@ function transformLookups(node, implicitTable) {node.lineno,node.colno,new nodes.Symbol(node.lineno, node.colno, tableId),- new nodes.Symbol(node.lineno, node.colno, field)+ new nodes.Symbol(node.lineno, node.colno, field),);}});@@ -237,7 +237,7 @@ export default function generate(table, where, groupby, select, deps) {joins.push(meta.sql(lookup.tableId));} else {joins.push(- `LEFT JOIN ${meta.table} ${lookup.tableId} ON ${lookup.tableId}.id = ${currentTable.id}.${lookup.field}`+ `LEFT JOIN ${meta.table} ${lookup.tableId} ON ${lookup.tableId}.id = ${currentTable.id}.${lookup.field}`,);}@@ -255,7 +255,7 @@ export default function generate(table, where, groupby, select, deps) {return {sql,where: whereTransformed,- dependencies+ dependencies,};}@@ -264,17 +264,17 @@ export const SCHEMA_PATHS = {category: {table: 'categories',sql: id => `LEFT JOIN categories ${id} ON __cm.transferId = ${id}.id`,- field: '__cm.transferId'+ field: '__cm.transferId',},acct: { table: 'accounts' },- description: { table: 'payees' }+ description: { table: 'payees' },},payees: {- transfer_acct: { table: 'accounts' }+ transfer_acct: { table: 'accounts' },},accounts: {- bank: { table: 'banks' }- }+ bank: { table: 'banks' },+ },};const tables = {@@ -290,5 +290,5 @@ const tables = {${join}${whereStr}`;- }+ },};diff --git a/packages/loot-core/src/server/spreadsheet/new/vm.js b/packages/loot-core/src/server/spreadsheet/new/vm.jsindex 2ddb902653..14261ba370 100644--- a/packages/loot-core/src/server/spreadsheet/new/vm.js+++ b/packages/loot-core/src/server/spreadsheet/new/vm.js@@ -76,7 +76,7 @@ export default class VM {const func = this.get(callee);this.reg1 = func.apply(null,- args.map(arg => this.get(arg))+ args.map(arg => this.get(arg)),);}@@ -89,7 +89,7 @@ export default class VM {}return res;}),- 'Running sql: ' + sql+ 'Running sql: ' + sql,);}@@ -113,7 +113,7 @@ export default class VM {console.log('VM caught error during activity: ' + activityName);console.log(err);this.resume(null);- }+ },);}diff --git a/packages/loot-core/src/server/spreadsheet/new/vm.test.js b/packages/loot-core/src/server/spreadsheet/new/vm.test.jsindex bfebe10ffd..f3bc89c78b 100644--- a/packages/loot-core/src/server/spreadsheet/new/vm.test.js+++ b/packages/loot-core/src/server/spreadsheet/new/vm.test.js@@ -5,7 +5,7 @@ const { unresolveName } = require('../util');const db = {runQuery: sql => {return Promise.resolve([{ 'sum(t.amount)': 1000 }]);- }+ },};function makeScopes(vars) {@@ -26,7 +26,7 @@ function makeScopes(vars) {vars[name] = value;},- getAll: () => vars+ getAll: () => vars,};}@@ -49,7 +49,7 @@ test('vm basic', async () => {},firstValue: arr => {return arr[0]['sum(t.amount)'];- }+ },});});diff --git a/packages/loot-core/src/server/spreadsheet/spreadsheet.js b/packages/loot-core/src/server/spreadsheet/spreadsheet.jsindex c2762f2d90..eda4175bee 100644--- a/packages/loot-core/src/server/spreadsheet/spreadsheet.js+++ b/packages/loot-core/src/server/spreadsheet/spreadsheet.js@@ -16,7 +16,7 @@ export default class Spreadsheet {this.computeQueue = [];this.events = mitt();this._meta = {- createdMonths: new Set()+ createdMonths: new Set(),};}@@ -38,7 +38,7 @@ export default class Spreadsheet {name,expr: null,value: null,- sheet: sheet+ sheet: sheet,});}return this.nodes.get(name);@@ -63,7 +63,7 @@ export default class Spreadsheet {serialize() {return {graph: this.graph.getEdges(),- nodes: [...this.nodes.entries()]+ nodes: [...this.nodes.entries()],};}@@ -133,14 +133,14 @@ export default class Spreadsheet {if (result instanceof Promise) {console.warn(- 'dynamic cell returned a promise! this is discouraged because errors are not handled properly'+ 'dynamic cell returned a promise! this is discouraged because errors are not handled properly',);}} else if (node.sql) {result = runCompiledQuery(node.query,node.sql.sqlPieces,- node.sql.state+ node.sql.state,);} else {idx++;@@ -166,7 +166,7 @@ export default class Spreadsheet {// TODO: use captureException hereconsole.warn(`Failed running ${node.name}!`, err);this.runComputations(idx + 1);- }+ },);return;@@ -229,7 +229,7 @@ export default class Spreadsheet {onFinish(func) {if (this.transactionDepth !== 0) {throw new Error(- 'onFinish called while inside a spreadsheet transaction. This is not allowed as it will lead to race conditions'+ 'onFinish called while inside a spreadsheet transaction. This is not allowed as it will lead to race conditions',);}@@ -338,7 +338,7 @@ export default class Spreadsheet {createDynamic(sheetName,cellName,- { dependencies = [], run, initialValue, refresh }+ { dependencies = [], run, initialValue, refresh },) {let name = resolveName(sheetName, cellName);let node = this._getNode(name);@@ -410,7 +410,7 @@ export default class Spreadsheet {let node = this.getNode(name);let newDeps = deps.filter(- dep => (node._dependencies || []).indexOf(dep) === -1+ dep => (node._dependencies || []).indexOf(dep) === -1,);if (newDeps.length > 0) {@@ -435,7 +435,7 @@ export default class Spreadsheet {let node = this.getNode(name);node._dependencies = (node._dependencies || []).filter(- dep => deps.indexOf(dep) === -1+ dep => deps.indexOf(dep) === -1,);deps.forEach(dep => {diff --git a/packages/loot-core/src/server/spreadsheet/spreadsheet.test.js b/packages/loot-core/src/server/spreadsheet/spreadsheet.test.jsindex 34a2e4cd87..33ed0b70bf 100644--- a/packages/loot-core/src/server/spreadsheet/spreadsheet.test.js+++ b/packages/loot-core/src/server/spreadsheet/spreadsheet.test.js@@ -22,8 +22,8 @@ async function insertTransactions(payeeId = null) {account: '1',category: 'cat1',date: '2017-01-08',- description: payeeId- })[0]+ description: payeeId,+ })[0],);await db.insertTransaction(generateTransaction({@@ -31,8 +31,8 @@ async function insertTransactions(payeeId = null) {account: '1',category: 'cat2',date: '2017-01-10',- description: payeeId- })[0]+ description: payeeId,+ })[0],);await db.insertTransaction(generateTransaction({@@ -40,8 +40,8 @@ async function insertTransactions(payeeId = null) {account: '1',category: 'cat2',date: '2017-01-15',- description: payeeId- })[0]+ description: payeeId,+ })[0],);}@@ -132,7 +132,7 @@ describe('Spreadsheet', () => {spreadsheet.set('g!foo',- '=from transactions where acct.offbudget = 0 and (description.transfer_acct.offbudget = null or description.transfer_acct.offbudget = 1) select { acct.offbudget, description.transfer_acct.offbudget as foo, amount }'+ '=from transactions where acct.offbudget = 0 and (description.transfer_acct.offbudget = null or description.transfer_acct.offbudget = 1) select { acct.offbudget, description.transfer_acct.offbudget as foo, amount }',);return new Promise(resolve => {@@ -151,7 +151,7 @@ describe('Spreadsheet', () => {run: async () => {await wait(100);return 5;- }+ },});spreadsheet.onFinish(() => {@@ -171,7 +171,7 @@ describe('Spreadsheet', () => {run: async () => {await wait(100);return 5;- }+ },});spreadsheet.createDynamic('foo', 'y', {@@ -179,7 +179,7 @@ describe('Spreadsheet', () => {dependencies: ['x'],run: x => {return x * 3;- }+ },});});diff --git a/packages/loot-core/src/server/spreadsheet/sqlinterp.js b/packages/loot-core/src/server/spreadsheet/sqlinterp.jsindex 623022df6b..d3581df87c 100644--- a/packages/loot-core/src/server/spreadsheet/sqlinterp.js+++ b/packages/loot-core/src/server/spreadsheet/sqlinterp.js@@ -26,7 +26,7 @@ const builtinFuncs = {},date: function (str) {return dateFns.parseISO(str);- }+ },};function interpretExpr(expr, context) {diff --git a/packages/loot-core/src/server/spreadsheet/sqlinterp.test.js b/packages/loot-core/src/server/spreadsheet/sqlinterp.test.jsindex 75b7168fe0..02cbc8fcff 100644--- a/packages/loot-core/src/server/spreadsheet/sqlinterp.test.js+++ b/packages/loot-core/src/server/spreadsheet/sqlinterp.test.js@@ -7,13 +7,13 @@ test('sql interpretation works', async () => {date: 20170106,amount: -5000,acct: 'boa',- category: 1+ category: 1,};const transFeb = {date: 20170215,amount: -7620,acct: 'boa',- category: 1+ category: 1,};const { sqlDependencies } = compile(`diff --git a/packages/loot-core/src/server/spreadsheet/usage.js b/packages/loot-core/src/server/spreadsheet/usage.jsindex dc95dee07f..c1f1762722 100644--- a/packages/loot-core/src/server/spreadsheet/usage.js+++ b/packages/loot-core/src/server/spreadsheet/usage.js@@ -22,23 +22,23 @@ const sheet = new Spreadsheet({data: {type: 'query',query: query,- sql: sql+ sql: sql,},ast: {type: 'CallExpression',callee: {type: 'Identifier',- name: 'runQuery'+ name: 'runQuery',},arguments: [{type: 'Literal',raw: sql,- value: sql- }- ]- }+ value: sql,+ },+ ],+ },};},run: sql => {@@ -50,9 +50,9 @@ const sheet = new Spreadsheet({resolve(rows);});});- }- }- }+ },+ },+ },});db.on('preupdate', function (type, dbname, table, old, _new, oldId, newId) {@@ -82,7 +82,7 @@ function insertRow() {const t = Math.random() * 100;console.log('[insertRow] waiting', t);setTimeout(insertRow, t);- }+ },);}diff --git a/packages/loot-core/src/server/spreadsheet/util.js b/packages/loot-core/src/server/spreadsheet/util.jsindex fc0493a37a..21628179c9 100644--- a/packages/loot-core/src/server/spreadsheet/util.js+++ b/packages/loot-core/src/server/spreadsheet/util.js@@ -3,7 +3,7 @@ function unresolveName(name) {if (idx !== -1) {return {sheet: name.slice(0, idx),- name: name.slice(idx + 1)+ name: name.slice(idx + 1),};}return { sheet: null, name };@@ -42,5 +42,5 @@ module.exports = {unresolveName,resolveName,resolveNamesAsObjects,- resolveNamesAsArrays+ resolveNamesAsArrays,};diff --git a/packages/loot-core/src/server/sync/encoder.js b/packages/loot-core/src/server/sync/encoder.jsindex dd48ea8856..51f096e2ff 100644--- a/packages/loot-core/src/server/sync/encoder.js+++ b/packages/loot-core/src/server/sync/encoder.js@@ -40,7 +40,7 @@ export async function encode(groupId, fileId, since, messages) {result = await encryption.encrypt(binaryMsg, encryptKeyId);} catch (e) {throw new SyncError('encrypt-failure', {- isMissingKey: e.message === 'missing-key'+ isMissingKey: e.message === 'missing-key',});}@@ -81,7 +81,7 @@ export async function decode(data) {if (encrypted) {let binary = SyncPb.EncryptedData.deserializeBinary(- envelopePb.getContent()+ envelopePb.getContent(),);let decrypted;@@ -90,12 +90,12 @@ export async function decode(data) {keyId: encryptKeyId,algorithm: 'aes-256-gcm',iv: coerceBuffer(binary.getIv()),- authTag: coerceBuffer(binary.getAuthtag())+ authTag: coerceBuffer(binary.getAuthtag()),});} catch (e) {console.log(e);throw new SyncError('decrypt-failure', {- isMissingKey: e.message === 'missing-key'+ isMissingKey: e.message === 'missing-key',});}@@ -109,7 +109,7 @@ export async function decode(data) {dataset: msg.getDataset(),row: msg.getRow(),column: msg.getColumn(),- value: msg.getValue()+ value: msg.getValue(),});}diff --git a/packages/loot-core/src/server/sync/index.js b/packages/loot-core/src/server/sync/index.jsindex b62124ad98..5805ece55b 100644--- a/packages/loot-core/src/server/sync/index.js+++ b/packages/loot-core/src/server/sync/index.js@@ -9,7 +9,7 @@ import {deserializeClock,getClock,Timestamp,- merkle+ merkle,} from '../crdt';import * as db from '../db';import app from '../main-app';@@ -80,12 +80,12 @@ function apply(msg, prev) {if (prev) {query = {sql: db.cache(`UPDATE ${dataset} SET ${column} = ? WHERE id = ?`),- params: [value, row]+ params: [value, row],};} else {query = {sql: db.cache(`INSERT INTO ${dataset} (id, ${column}) VALUES (?, ?)`),- params: [row, value]+ params: [row, value],};}@@ -183,10 +183,10 @@ async function compareMessages(messages) {let res = db.runQuery(db.cache(- 'SELECT timestamp FROM messages_crdt WHERE dataset = ? AND row = ? AND column = ? AND timestamp >= ?'+ 'SELECT timestamp FROM messages_crdt WHERE dataset = ? AND row = ? AND column = ? AND timestamp >= ?',),[dataset, row, column, timestampStr],- true+ true,);// Returned message is any one that is "later" than this message,@@ -328,7 +328,7 @@ export const applyMessages = sequential(async messages => {db.runQuery(db.cache(`INSERT INTO messages_crdt (timestamp, dataset, row, column, value)VALUES (?, ?, ?, ?, ?)`),- [timestamp.toString(), dataset, row, column, serializeValue(value)]+ [timestamp.toString(), dataset, row, column, serializeValue(value)],);currentMerkle = merkle.insert(currentMerkle, msg.timestamp);@@ -342,9 +342,9 @@ export const applyMessages = sequential(async messages => {// exceptions)db.runQuery(db.cache(- 'INSERT OR REPLACE INTO messages_clock (id, clock) VALUES (1, ?)'+ 'INSERT OR REPLACE INTO messages_clock (id, clock) VALUES (1, ?)',),- [serializeClock({ ...clock, merkle: currentMerkle })]+ [serializeClock({ ...clock, merkle: currentMerkle })],);}});@@ -388,7 +388,7 @@ export const applyMessages = sequential(async messages => {type: 'applied',tables,data: newData,- prevData: oldData+ prevData: oldData,});return messages;@@ -414,7 +414,7 @@ async function _sendMessages(messages) {// message.app.events.emit('sync', {type: 'error',- subtype: 'apply-failure'+ subtype: 'apply-failure',});} else {app.events.emit('sync', { type: 'error' });@@ -464,7 +464,7 @@ export function getMessagesSince(since) {return db.runQuery('SELECT timestamp, dataset, row, column, value FROM messages_crdt WHERE timestamp > ?',[since],- true+ true,);}@@ -474,8 +474,8 @@ export async function syncAndReceiveMessages(messages, since) {messages.map(msg => ({...msg,value: deserializeValue(msg.value),- timestamp: Timestamp.parse(msg.timestamp)- }))+ timestamp: Timestamp.parse(msg.timestamp),+ })),);return localMessages;}@@ -544,12 +544,12 @@ export const fullSync = once(async function () {app.events.emit('sync', {type: 'error',- subtype: 'out-of-sync'+ subtype: 'out-of-sync',});} else if (e.reason === 'invalid-schema') {app.events.emit('sync', {type: 'error',- subtype: 'invalid-schema'+ subtype: 'invalid-schema',});} else if (e.reason === 'decrypt-failure' ||@@ -558,12 +558,12 @@ export const fullSync = once(async function () {app.events.emit('sync', {type: 'error',subtype: e.reason,- meta: e.meta+ meta: e.meta,});} else if (e.reason === 'beta-version') {app.events.emit('sync', {type: 'error',- subtype: e.reason+ subtype: e.reason,});} else {app.events.emit('sync', { type: 'error' });@@ -594,7 +594,7 @@ export const fullSync = once(async function () {app.events.emit('sync', {type: 'success',tables,- syncDisabled: checkSyncingMode('disabled')+ syncDisabled: checkSyncingMode('disabled'),});return { messages };});@@ -625,7 +625,7 @@ async function _fullSync(sinceTimestamp, count, prevDiffTime) {'Syncing since',since,messages.length,- '(attempt: ' + count + ')'+ '(attempt: ' + count + ')',);let buffer = await encoder.encode(groupId, cloudFileId, since, messages);@@ -635,7 +635,7 @@ async function _fullSync(sinceTimestamp, count, prevDiffTime) {// check the worst case here and make multiple requests if it's// really large.let resBuffer = await postBinary(getServer().SYNC_SERVER + '/sync', buffer, {- 'X-ACTUAL-TOKEN': userToken+ 'X-ACTUAL-TOKEN': userToken,});// Abort if the file is either no longer loaded, the group id has@@ -657,8 +657,8 @@ async function _fullSync(sinceTimestamp, count, prevDiffTime) {res.messages.map(msg => ({...msg,value: deserializeValue(msg.value),- timestamp: Timestamp.parse(msg.timestamp)- }))+ timestamp: Timestamp.parse(msg.timestamp),+ })),);}@@ -711,7 +711,7 @@ async function _fullSync(sinceTimestamp, count, prevDiffTime) {'server hash:',res.merkle.hash,'localTimeChanged:',- localTimeChanged+ localTimeChanged,);if (rebuiltMerkle.trie.hash === res.merkle.hash) {@@ -736,14 +736,14 @@ async function _fullSync(sinceTimestamp, count, prevDiffTime) {// but it was because the user kept changing stuff in the// middle of syncing.localTimeChanged ? 0 : count + 1,- diffTime- )+ diffTime,+ ),);} else {// All synced up, store the current time as a simple optimization// for the next syncawait prefs.savePrefs({- lastSyncedTimestamp: getClock().timestamp.toString()+ lastSyncedTimestamp: getClock().timestamp.toString(),});}diff --git a/packages/loot-core/src/server/sync/migrate.js b/packages/loot-core/src/server/sync/migrate.jsindex 4a79d73eb2..378d2f7c12 100644--- a/packages/loot-core/src/server/sync/migrate.js+++ b/packages/loot-core/src/server/sync/migrate.js@@ -20,7 +20,7 @@ function migrateParentIds(_oldValues, newValues) {row: newValue.id,column: 'parent_id',value: parentId,- timestamp: Timestamp.send()+ timestamp: Timestamp.send(),});}});diff --git a/packages/loot-core/src/server/sync/migrate.test.js b/packages/loot-core/src/server/sync/migrate.test.jsindex dac0ea262c..d1f58a626b 100644--- a/packages/loot-core/src/server/sync/migrate.test.js+++ b/packages/loot-core/src/server/sync/migrate.test.js@@ -35,7 +35,7 @@ let messageArb = fclet timestamp = fc.date({min: new Date('2020-01-01T00:00:00.000Z'),- max: new Date('2020-05-01T00:00:00.000Z')+ max: new Date('2020-05-01T00:00:00.000Z'),}).noBias().noShrink()@@ -49,9 +49,9 @@ let messageArb = fcfc.integer(0, 5).map(i => `id${i}`),fc.integer(0, 5).chain(i => {return fc.integer(0, 5).map(j => `id${i}/child${j}`);- })+ }),),- value: value+ value: value,});});@@ -67,7 +67,7 @@ describe('sync migrations', () => {await db.insert('transactions', {id: 'trans1/child1',isChild: 1,- amount: 4500+ amount: 4500,});tracer.expectNow('applied', ['trans1/child1']);await tracer.expectWait('applied', ['trans1/child1']);@@ -92,7 +92,7 @@ describe('sync migrations', () => {ts &&[...ts.values()].find(t =>- t.isChild === 1 && t.parent_id == null && t.id.includes('/')+ t.isChild === 1 && t.parent_id == null && t.id.includes('/'),)) {} else {@@ -106,7 +106,7 @@ describe('sync migrations', () => {let transactions = await db.all('SELECT * FROM transactions',[],- true+ true,);for (let trans of transactions) {let transMsgs = msgs@@ -148,7 +148,7 @@ describe('sync migrations', () => {}).beforeEach(() => {return db.execQuery(`DELETE FROM transactions`);- })+ }),);});});diff --git a/packages/loot-core/src/server/sync/repair.js b/packages/loot-core/src/server/sync/repair.jsindex 6a86aba0e7..7de86475eb 100644--- a/packages/loot-core/src/server/sync/repair.js+++ b/packages/loot-core/src/server/sync/repair.js@@ -11,7 +11,7 @@ export function rebuildMerkleHash() {return {numMessages: rows.length,- trie: trie+ trie: trie,};}@@ -25,6 +25,6 @@ export default async function repairSync() {// Persist it in the dbdb.runQuery(db.cache('INSERT OR REPLACE INTO messages_clock (id, clock) VALUES (1, ?)'),- [serializeClock(clock)]+ [serializeClock(clock)],);}diff --git a/packages/loot-core/src/server/sync/reset.js b/packages/loot-core/src/server/sync/reset.jsindex 266c0c13eb..e9d6477b91 100644--- a/packages/loot-core/src/server/sync/reset.js+++ b/packages/loot-core/src/server/sync/reset.js@@ -50,7 +50,7 @@ export default async function resetSync(keyState) {await prefs.savePrefs({groupId: null,lastSyncedTimestamp: null,- lastUploaded: null+ lastUploaded: null,});if (keyState) {diff --git a/packages/loot-core/src/server/sync/sync.property.test.js b/packages/loot-core/src/server/sync/sync.property.test.jsindex fc0695988a..ae9bedfd69 100644--- a/packages/loot-core/src/server/sync/sync.property.test.js+++ b/packages/loot-core/src/server/sync/sync.property.test.js@@ -10,7 +10,7 @@ import * as sync from './index';const jsc = require('jsverify');const uuidGenerator = jsc.integer(97, 122).smap(x => String.fromCharCode(x),- x => x.charCodeAt(x)+ x => x.charCodeAt(x),);const mockSyncServer = require('../tests/mockSyncServer');@@ -28,7 +28,7 @@ afterEach(() => {let schema = {spreadsheet_cells: {- expr: 'text'+ expr: 'text',},accounts: {account_id: 'text',@@ -43,7 +43,7 @@ let schema = {bank: 'text',offbudget: 'integer',closed: 'integer',- tombstone: 'integer'+ tombstone: 'integer',},transactions: {isParent: 'integer',@@ -62,35 +62,35 @@ let schema = {starting_balance_flag: 'integer',transferred_id: 'text',sort_order: 'real',- tombstone: 'integer'+ tombstone: 'integer',},categories: {name: 'text',is_income: 'integer',cat_group: 'text',sort_order: 'real',- tombstone: 'integer'+ tombstone: 'integer',},category_groups: {name: 'text',is_income: 'integer',sort_order: 'real',- tombstone: 'integer'+ tombstone: 'integer',},category_mapping: { transferId: 'text' },payees: {name: 'text',transfer_acct: 'text',category: 'text',- tombstone: 'integer'+ tombstone: 'integer',},payee_rules: {payee_id: 'text',type: 'text',value: 'text',- tombstone: 'integer'+ tombstone: 'integer',},- payee_mapping: { targetId: 'text' }+ payee_mapping: { targetId: 'text' },};// The base time is 2019-08-09T18:14:31.903Z@@ -117,8 +117,8 @@ function makeGen({ table, row, field, value }) {}return new Timestamp(baseTime + x, 0, clientId);},- x => x.millis - baseTime- )+ x => x.millis - baseTime,+ ),});}@@ -131,11 +131,11 @@ Object.keys(schema).forEach(table => {table,row: jsc.asciinestring.smap(x => 'sheet!' + x,- x => x+ x => x,),field: 'expr',- value: jsc.constant(JSON.stringify('fooooo'))- })+ value: jsc.constant(JSON.stringify('fooooo')),+ }),);return obj;}@@ -151,7 +151,7 @@ Object.keys(schema).forEach(table => {generators.push(makeGen({ table, field, value: jsc.uint8 }));} else {generators.push(- makeGen({ table, field, value: jsc.elements([0, 1]) })+ makeGen({ table, field, value: jsc.elements([0, 1]) }),);}break;@@ -214,7 +214,7 @@ async function run(msgs) {return acc;},- { firstMessages: [], secondMessages: [] }+ { firstMessages: [], secondMessages: [] },);prefs.loadPrefs();@@ -223,8 +223,8 @@ async function run(msgs) {lastSyncedTimestamp: new Timestamp(Date.now(),0,- '0000000000000000'- ).toString()+ '0000000000000000',+ ).toString(),});await global.emptyDatabase()();@@ -238,7 +238,7 @@ async function run(msgs) {let chunks = divide(res.firstMessages);let client1Sync = Promise.all(- chunks.slice(0, -1).map(slice => sync.receiveMessages(slice))+ chunks.slice(0, -1).map(slice => sync.receiveMessages(slice)),);await client1Sync;@@ -250,9 +250,9 @@ async function run(msgs) {res.secondMessages.map(x => ({...x,value: sync.serializeValue(x.value),- timestamp: x.timestamp.toString()- }))- )+ timestamp: x.timestamp.toString(),+ })),+ ),);let syncPromise = sync.fullSync();@@ -269,9 +269,9 @@ async function run(msgs) {res.secondMessages.map(x => ({...x,value: sync.serializeValue(x.value),- timestamp: x.timestamp.toString()- }))- )+ timestamp: x.timestamp.toString(),+ })),+ ),);let { error } = await syncPromise;@@ -331,9 +331,9 @@ describe('sync property test', () => {}return true;- }+ },),- { tests: 100, quiet: true }+ { tests: 100, quiet: true },);if (test.counterexample) {@@ -341,8 +341,8 @@ describe('sync property test', () => {console.log(test.counterexample[0].map(x => ({...x,- timestamp: x.timestamp.toString()- }))+ timestamp: x.timestamp.toString(),+ })),);throw new Error('property test failed');@@ -353,7 +353,7 @@ describe('sync property test', () => {function convert(data) {return data.map(x => ({...x,- timestamp: Timestamp.parse(x.timestamp)+ timestamp: Timestamp.parse(x.timestamp),}));}@@ -366,8 +366,8 @@ describe('sync property test', () => {row: 't',column: 'balance_limit',value: 0,- timestamp: '2019-08-09T18:14:34.545Z-0000-90xU1sd5124329ac'- }+ timestamp: '2019-08-09T18:14:34.545Z-0000-90xU1sd5124329ac',+ },// ...]);diff --git a/packages/loot-core/src/server/sync/sync.test.js b/packages/loot-core/src/server/sync/sync.test.jsindex ea8ccc1697..b6f98b0030 100644--- a/packages/loot-core/src/server/sync/sync.test.js+++ b/packages/loot-core/src/server/sync/sync.test.js@@ -32,8 +32,8 @@ describe('Sync', () => {row: 'foo',column: 'amount',value: 3200,- timestamp- }+ timestamp,+ },]);global.stepForwardInTime();@@ -45,8 +45,8 @@ describe('Sync', () => {row: 'foo',column: 'amount',value: 4200,- timestamp- }+ timestamp,+ },]);expect(getClock().timestamp.toString()).toEqual(timestamp.toString());@@ -68,15 +68,15 @@ describe('Sync', () => {row: 'foo',column: 'amount',value: 3200,- timestamp: Timestamp.send()+ timestamp: Timestamp.send(),},global.stepForwardInTime() || {dataset: 'transactions',row: 'foo',column: 'amount',value: 3200,- timestamp: Timestamp.send()- }+ timestamp: Timestamp.send(),+ },]);// Move the clock forward so that the above 2 messages are not@@ -96,7 +96,7 @@ describe('Sync', () => {prefs.loadPrefs();prefs.savePrefs({groupId: 'group',- lastSyncedTimestamp: Timestamp.zero().toString()+ lastSyncedTimestamp: Timestamp.zero().toString(),});await mockSyncServer.handlers['/sync/sync'](@@ -110,17 +110,17 @@ describe('Sync', () => {row: 'foo',column: 'amount',value: 'N:3200',- timestamp: '1970-01-02T05:17:36.789Z-0000-0000testinguuid2'+ timestamp: '1970-01-02T05:17:36.789Z-0000-0000testinguuid2',},{dataset: 'transactions',row: 'foo',column: 'amount',value: 'N:4200',- timestamp: '1970-01-02T10:17:36.999Z-0000-0000testinguuid2'- }- ]- )+ timestamp: '1970-01-02T10:17:36.999Z-0000-0000testinguuid2',+ },+ ],+ ),);await applyMessages([@@ -129,8 +129,8 @@ describe('Sync', () => {row: 'foo',column: 'amount',value: 5000,- timestamp: Timestamp.send()- }+ timestamp: Timestamp.send(),+ },]);const { messages } = await fullSync();@@ -151,7 +151,7 @@ async function asSecondClient(func) {prefs.loadPrefs();prefs.savePrefs({groupId: 'group',- lastSyncedTimestamp: Timestamp.zero().toString()+ lastSyncedTimestamp: Timestamp.zero().toString(),});await func();@@ -159,7 +159,7 @@ async function asSecondClient(func) {await global.emptyDatabase()();prefs.savePrefs({groupId: 'group',- lastSyncedTimestamp: Timestamp.zero().toString()+ lastSyncedTimestamp: Timestamp.zero().toString(),});}@@ -224,7 +224,7 @@ describe('Sync projections', () => {await sheet.loadSpreadsheet(db);await db.insertCategoryGroup({id: 'group1',- name: 'group1'+ name: 'group1',});fooId = await db.insertCategory({ name: 'foo', cat_group: 'group1' });await db.deleteCategory({ id: fooId });@@ -236,7 +236,7 @@ describe('Sync projections', () => {// Get all the messages. We'll apply them in two passeslet messages = mockSyncServer.getMessages().map(msg => ({...msg,- timestamp: Timestamp.parse(msg.timestamp)+ timestamp: Timestamp.parse(msg.timestamp),}));// Apply all but the last message (which deletes the category)@@ -277,7 +277,7 @@ describe('Sync projections', () => {await sheet.loadSpreadsheet(db);groupId = await db.insertCategoryGroup({id: 'group1',- name: 'group1'+ name: 'group1',});fooId = await db.insertCategory({ name: 'foo', cat_group: 'group1' });await db.deleteCategory({ id: fooId });@@ -290,7 +290,7 @@ describe('Sync projections', () => {// Get all the messages. We'll apply them in two passeslet messages = mockSyncServer.getMessages().map(msg => ({...msg,- timestamp: Timestamp.parse(msg.timestamp)+ timestamp: Timestamp.parse(msg.timestamp),}));let firstMessages = messages.filter(m => m.column !== 'tombstone');@@ -327,7 +327,7 @@ describe('Sync projections', () => {// Get all the messages. We'll apply them in two passeslet messages = mockSyncServer.getMessages().map(msg => ({...msg,- timestamp: Timestamp.parse(msg.timestamp)+ timestamp: Timestamp.parse(msg.timestamp),}));let firstMessages = messages.slice(0, -2);diff --git a/packages/loot-core/src/server/tests/mockSyncServer.js b/packages/loot-core/src/server/tests/mockSyncServer.jsindex 0920af059a..18e4995308 100644--- a/packages/loot-core/src/server/tests/mockSyncServer.js+++ b/packages/loot-core/src/server/tests/mockSyncServer.js@@ -41,12 +41,12 @@ handlers['/sync/sync'] = async data => {currentMessages.push({timestamp: msg.getTimestamp(),is_encrypted: msg.getIsencrypted(),- content: msg.getContent()+ content: msg.getContent(),});currentClock.merkle = merkle.insert(currentClock.merkle,- Timestamp.parse(msg.getTimestamp())+ Timestamp.parse(msg.getTimestamp()),);}});@@ -81,17 +81,17 @@ handlers['/plaid/transactions'] = ({start_date,end_date,count,- offset+ offset,}) => {const accounts = currentMockData.accounts;const transactions = currentMockData.transactions[account_id].filter(- t => t.date >= start_date && t.date <= end_date+ t => t.date >= start_date && t.date <= end_date,);return {accounts: accounts.filter(acct => acct.account_id === account_id),transactions: transactions.slice(offset, offset + count),- total_transactions: transactions.length+ total_transactions: transactions.length,};};@@ -120,7 +120,7 @@ module.exports.getMessages = () => {dataset: fields.getDataset(),row: fields.getRow(),column: fields.getColumn(),- value: deserializeValue(fields.getValue())+ value: deserializeValue(fields.getValue()),};});};diff --git a/packages/loot-core/src/server/tools/app.js b/packages/loot-core/src/server/tools/app.jsindex 1a533c0210..36d65470ea 100644--- a/packages/loot-core/src/server/tools/app.js+++ b/packages/loot-core/src/server/tools/app.js@@ -17,7 +17,7 @@ app.method('tools/fix-split-transactions', async () => {await runMutator(async () => {let updated = blankPayeeRows.map(row => ({id: row.id,- payee: row.parentPayee+ payee: row.parentPayee,}));await batchUpdateTransactions({ updated });});@@ -33,7 +33,7 @@ app.method('tools/fix-split-transactions', async () => {await runMutator(async () => {let updated = clearedRows.map(row => ({id: row.id,- cleared: row.cleared === 1+ cleared: row.cleared === 1,}));await batchUpdateTransactions({ updated });});@@ -54,7 +54,7 @@ app.method('tools/fix-split-transactions', async () => {return {numBlankPayees: blankPayeeRows.length,numCleared: clearedRows.length,- numDeleted: deletedRows.length+ numDeleted: deletedRows.length,};});diff --git a/packages/loot-core/src/server/undo.js b/packages/loot-core/src/server/undo.jsindex 7e654820bc..efdcb00d96 100644--- a/packages/loot-core/src/server/undo.js+++ b/packages/loot-core/src/server/undo.js@@ -35,7 +35,7 @@ export function appendMessages(messages, oldData) {type: 'messages',messages,oldData,- undoTag+ undoTag,});CURSOR++;}@@ -65,7 +65,7 @@ export function withUndo(func, meta) {return withMutatorContext({ undoListening: true, undoTag: context.undoTag },- func+ func,);}@@ -80,7 +80,7 @@ export function undoable(func) {async function applyUndoAction(messages, meta, undoTag) {await withMutatorContext({ undoListening: false }, () => {return sendMessages(- messages.map(msg => ({ ...msg, timestamp: Timestamp.send() }))+ messages.map(msg => ({ ...msg, timestamp: Timestamp.send() })),);});@@ -95,7 +95,7 @@ async function applyUndoAction(messages, meta, undoTag) {messages,tables,meta,- undoTag+ undoTag,});}@@ -111,7 +111,7 @@ export async function undo() {let meta = MESSAGE_HISTORY[CURSOR].meta;let start = Math.max(CURSOR, 0);let entries = MESSAGE_HISTORY.slice(start, end + 1).filter(- entry => entry.type === 'messages'+ entry => entry.type === 'messages',);if (entries.length > 0) {@@ -120,7 +120,7 @@ export async function undo() {return acc.concat(entry.messages.map(message => undoMessage(message, entry.oldData))- .filter(x => x)+ .filter(x => x),);}, []).reverse();@@ -193,7 +193,7 @@ export async function redo() {let end = CURSOR;let entries = MESSAGE_HISTORY.slice(start + 1, end + 1).filter(- entry => entry.type === 'messages'+ entry => entry.type === 'messages',);if (entries.length > 0) {@@ -222,7 +222,7 @@ function redoResurrections(messages, oldData) {'reflect_budgets','notes','category_mapping',- 'payee_mapping'+ 'payee_mapping',].includes(message.dataset)) {resurrect.add(message.dataset + '.' + message.row);@@ -236,7 +236,7 @@ function redoResurrections(messages, oldData) {row,column: 'tombstone',value: 0,- timestamp: Timestamp.send()+ timestamp: Timestamp.send(),};});}diff --git a/packages/loot-core/src/server/update.js b/packages/loot-core/src/server/update.jsindex c8e2f6a595..6be345e9e8 100644--- a/packages/loot-core/src/server/update.js+++ b/packages/loot-core/src/server/update.js@@ -13,7 +13,7 @@ async function runMigrations() {export async function updateViews() {let hashKey = 'view-hash';let row = await db.first('SELECT value FROM __meta__ WHERE key = ?', [- hashKey+ hashKey,]);let { value: hash } = row || {};@@ -24,7 +24,7 @@ export async function updateViews() {await db.execQuery(views);await db.runQuery('INSERT OR REPLACE INTO __meta__ (key, value) VALUES (?, ?)',- [hashKey, currentHash]+ [hashKey, currentHash],);}}diff --git a/packages/loot-core/src/shared/arithmetic.js b/packages/loot-core/src/shared/arithmetic.jsindex 4c6453103a..4dd2b8955a 100644--- a/packages/loot-core/src/shared/arithmetic.js+++ b/packages/loot-core/src/shared/arithmetic.js@@ -2,7 +2,7 @@ import { getNumberFormat } from './util';function fail(state, msg) {throw new Error(- msg + ': ' + JSON.stringify(state.str.slice(state.index, 10))+ msg + ': ' + JSON.stringify(state.str.slice(state.index, 10)),);}diff --git a/packages/loot-core/src/shared/async.js b/packages/loot-core/src/shared/async.jsindex 33dc897582..eb85c23449 100644--- a/packages/loot-core/src/shared/async.js+++ b/packages/loot-core/src/shared/async.js@@ -1,7 +1,7 @@export function sequential(fn) {let sequenceState = {running: null,- queue: []+ queue: [],};function pump() {@@ -24,7 +24,7 @@ export function sequential(fn) {err => {pump();reject(err);- }+ },);}diff --git a/packages/loot-core/src/shared/months.js b/packages/loot-core/src/shared/months.jsindex 70e81a9edf..20a5c7af36 100644--- a/packages/loot-core/src/shared/months.js+++ b/packages/loot-core/src/shared/months.js@@ -136,7 +136,7 @@ export function isAfter(month1, month2) {export function bounds(month) {return {start: parseInt(d.format(d.startOfMonth(_parse(month)), 'yyyyMMdd')),- end: parseInt(d.format(d.endOfMonth(_parse(month)), 'yyyyMMdd'))+ end: parseInt(d.format(d.endOfMonth(_parse(month)), 'yyyyMMdd')),};}@@ -223,7 +223,7 @@ export const getDateFormatRegex = memoizeOne(format => {format.replace(/d+/g, '\\d{1,2}').replace(/M+/g, '\\d{1,2}')- .replace(/y+/g, '\\d{4}')+ .replace(/y+/g, '\\d{4}'),);});diff --git a/packages/loot-core/src/shared/query.js b/packages/loot-core/src/shared/query.jsindex 316cd6f0b8..ad564dc725 100644--- a/packages/loot-core/src/shared/query.js+++ b/packages/loot-core/src/shared/query.js@@ -11,14 +11,14 @@ export class Query {validateRefs: true,limit: null,offset: null,- ...state+ ...state,};}filter(expr) {return new Query({...this.state,- filterExpressions: [...this.state.filterExpressions, expr]+ filterExpressions: [...this.state.filterExpressions, expr],});}@@ -27,8 +27,8 @@ export class Query {return new Query({...this.state,filterExpressions: this.state.filterExpressions.filter(- expr => !exprSet.has(Object.keys(expr)[0])- )+ expr => !exprSet.has(Object.keys(expr)[0]),+ ),});}@@ -55,7 +55,7 @@ export class Query {return new Query({...this.state,- groupExpressions: [...this.state.groupExpressions, ...exprs]+ groupExpressions: [...this.state.groupExpressions, ...exprs],});}@@ -66,7 +66,7 @@ export class Query {return new Query({...this.state,- orderExpressions: [...this.state.orderExpressions, ...exprs]+ orderExpressions: [...this.state.orderExpressions, ...exprs],});}diff --git a/packages/loot-core/src/shared/rules.js b/packages/loot-core/src/shared/rules.jsindex 62b2324189..a6823369fd 100644--- a/packages/loot-core/src/shared/rules.js+++ b/packages/loot-core/src/shared/rules.js@@ -5,24 +5,24 @@ import { integerToAmount, amountToInteger, currencyToAmount } from './util';export const TYPE_INFO = {date: {ops: ['is', 'isapprox', 'gt', 'gte', 'lt', 'lte'],- nullable: false+ nullable: false,},id: {ops: ['is', 'contains', 'oneOf'],- nullable: true+ nullable: true,},string: {ops: ['is', 'contains', 'oneOf'],- nullable: false+ nullable: false,},number: {ops: ['is', 'isapprox', 'isbetween', 'gt', 'gte', 'lt', 'lte'],- nullable: false+ nullable: false,},boolean: {ops: ['is'],- nullable: false- }+ nullable: false,+ },};export const FIELD_TYPES = new Map(@@ -36,8 +36,8 @@ export const FIELD_TYPES = new Map(amountOutfow: 'number',category: 'id',account: 'id',- cleared: 'boolean'- })+ cleared: 'boolean',+ }),);export function mapField(field, opts) {@@ -197,7 +197,7 @@ export function makeValue(value, cond) {return {...cond,error: null,- value: value ? currencyToAmount(value) || 0 : 0+ value: value ? currencyToAmount(value) || 0 : 0,};}break;diff --git a/packages/loot-core/src/shared/schedules.js b/packages/loot-core/src/shared/schedules.jsindex 6525a8b753..182236b481 100644--- a/packages/loot-core/src/shared/schedules.js+++ b/packages/loot-core/src/shared/schedules.js@@ -29,9 +29,9 @@ export function getHasTransactionsQuery(schedules) {$gte:dateCond && dateCond.op === 'is'? schedule.next_date- : monthUtils.subDays(schedule.next_date, 2)- }- }+ : monthUtils.subDays(schedule.next_date, 2),+ },+ },};});@@ -56,7 +56,7 @@ function prettyDayName(day) {WE: 'Wednesday',TH: 'Thursday',FR: 'Friday',- SA: 'Saturday'+ SA: 'Saturday',};return days[day];}@@ -155,7 +155,7 @@ export function recurConfigToRSchedule(config) {let base = {start: monthUtils.parseDate(config.start),frequency: config.frequency.toUpperCase(),- byHourOfDay: [12]+ byHourOfDay: [12],};if (config.interval) {@@ -177,8 +177,8 @@ export function recurConfigToRSchedule(config) {days.length > 0 && { ...base, byDayOfMonth: days.map(p => p.value) },dayNames.length > 0 && {...base,- byDayOfWeek: dayNames.map(p => [abbrevDay(p.type), p.value])- }+ byDayOfWeek: dayNames.map(p => [abbrevDay(p.type), p.value]),+ },].filter(Boolean);} else {// Nothing to do@@ -196,7 +196,7 @@ export function extractScheduleConds(conditions) {payee:conditions.find(cond => cond.op === 'is' && cond.field === 'payee') ||conditions.find(- cond => cond.op === 'is' && cond.field === 'description'+ cond => cond.op === 'is' && cond.field === 'description',) ||null,account:@@ -209,13 +209,13 @@ export function extractScheduleConds(conditions) {(cond.op === 'is' ||cond.op === 'isapprox' ||cond.op === 'isbetween') &&- cond.field === 'amount'+ cond.field === 'amount',) || null,date:conditions.find(cond =>- (cond.op === 'is' || cond.op === 'isapprox') && cond.field === 'date'- ) || null+ (cond.op === 'is' || cond.op === 'isapprox') && cond.field === 'date',+ ) || null,};}diff --git a/packages/loot-core/src/shared/schedules.test.js b/packages/loot-core/src/shared/schedules.test.jsindex a3733b4724..1c56c71b46 100644--- a/packages/loot-core/src/shared/schedules.test.js+++ b/packages/loot-core/src/shared/schedules.test.js@@ -9,37 +9,37 @@ describe('recurring date description', () => {it('describes weekly interval', () => {expect(- getRecurringDescription({ start: '2021-05-17', frequency: 'weekly' })+ getRecurringDescription({ start: '2021-05-17', frequency: 'weekly' }),).toBe('Every week on Monday');expect(getRecurringDescription({start: '2021-05-17',frequency: 'weekly',- interval: 2- })+ interval: 2,+ }),).toBe('Every 2 weeks on Monday');});it('describes monthly interval', () => {expect(- getRecurringDescription({ start: '2021-04-25', frequency: 'monthly' })+ getRecurringDescription({ start: '2021-04-25', frequency: 'monthly' }),).toBe('Every month on the 25th');expect(getRecurringDescription({start: '2021-04-25',frequency: 'monthly',- interval: 2- })+ interval: 2,+ }),).toBe('Every 2 months on the 25th');expect(getRecurringDescription({start: '2021-04-25',frequency: 'monthly',- patterns: [{ type: 'day', value: 25 }]- })+ patterns: [{ type: 'day', value: 25 }],+ }),).toBe('Every month on the 25th');expect(@@ -47,8 +47,8 @@ describe('recurring date description', () => {start: '2021-04-25',frequency: 'monthly',interval: 2,- patterns: [{ type: 'day', value: 25 }]- })+ patterns: [{ type: 'day', value: 25 }],+ }),).toBe('Every 2 months on the 25th');// Last day should work@@ -56,8 +56,8 @@ describe('recurring date description', () => {getRecurringDescription({start: '2021-04-25',frequency: 'monthly',- patterns: [{ type: 'day', value: 31 }]- })+ patterns: [{ type: 'day', value: 31 }],+ }),).toBe('Every month on the 31st');// -1 should work, representing the last day@@ -65,8 +65,8 @@ describe('recurring date description', () => {getRecurringDescription({start: '2021-04-25',frequency: 'monthly',- patterns: [{ type: 'day', value: -1 }]- })+ patterns: [{ type: 'day', value: -1 }],+ }),).toBe('Every month on the last day');// Day names should work@@ -74,16 +74,16 @@ describe('recurring date description', () => {getRecurringDescription({start: '2021-04-25',frequency: 'monthly',- patterns: [{ type: 'FR', value: 2 }]- })+ patterns: [{ type: 'FR', value: 2 }],+ }),).toBe('Every month on the 2nd Friday');expect(getRecurringDescription({start: '2021-04-25',frequency: 'monthly',- patterns: [{ type: 'FR', value: -1 }]- })+ patterns: [{ type: 'FR', value: -1 }],+ }),).toBe('Every month on the last Friday');});@@ -96,9 +96,9 @@ describe('recurring date description', () => {patterns: [{ type: 'day', value: 15 },{ type: 'day', value: 3 },- { type: 'day', value: 20 }- ]- })+ { type: 'day', value: 20 },+ ],+ }),).toBe('Every month on the 3rd, 15th, and 20th');expect(@@ -108,9 +108,9 @@ describe('recurring date description', () => {patterns: [{ type: 'day', value: 3 },{ type: 'day', value: -1 },- { type: 'day', value: 20 }- ]- })+ { type: 'day', value: 20 },+ ],+ }),).toBe('Every month on the 3rd, 20th, and last day');// Mix days and day names@@ -121,9 +121,9 @@ describe('recurring date description', () => {patterns: [{ type: 'day', value: 3 },{ type: 'day', value: -1 },- { type: 'FR', value: 2 }- ]- })+ { type: 'FR', value: 2 },+ ],+ }),).toBe('Every month on the 2nd Friday, 3rd, and last day');// When there is a mixture of types, day names should always come first@@ -135,23 +135,23 @@ describe('recurring date description', () => {{ type: 'SA', value: 1 },{ type: 'day', value: 2 },{ type: 'FR', value: 3 },- { type: 'day', value: 10 }- ]- })+ { type: 'day', value: 10 },+ ],+ }),).toBe('Every month on the 1st Saturday, 3rd Friday, 2nd, and 10th');});it('describes yearly interval', () => {expect(- getRecurringDescription({ start: '2021-05-17', frequency: 'yearly' })+ getRecurringDescription({ start: '2021-05-17', frequency: 'yearly' }),).toBe('Every year on May 17th');expect(getRecurringDescription({start: '2021-05-17',frequency: 'yearly',- interval: 2- })+ interval: 2,+ }),).toBe('Every 2 years on May 17th');});});diff --git a/packages/loot-core/src/shared/test-helpers.js b/packages/loot-core/src/shared/test-helpers.jsindex 4e4924809a..509bf6291a 100644--- a/packages/loot-core/src/shared/test-helpers.js+++ b/packages/loot-core/src/shared/test-helpers.js@@ -10,7 +10,7 @@ function timeout(promise, n) {clearTimeout(timer);return res;}),- timeoutPromise+ timeoutPromise,]);}@@ -37,15 +37,15 @@ export function execTracer() {if (ended) {throw new Error(`Tracer received event but didn't expect it: ${name} with data: ${JSON.stringify(- data- )}`+ data,+ )}`,);} else if (waitingFor) {if (waitingFor.name !== name) {waitingFor.reject(new Error(- `Event traced "${name}" but expected "${waitingFor.name}"`- )+ `Event traced "${name}" but expected "${waitingFor.name}"`,+ ),);} else {waitingFor.resolve(data);@@ -59,7 +59,7 @@ export function execTracer() {wait(name) {if (waitingFor) {throw new Error(- `Already waiting for ${waitingFor.name}, cannot wait for multiple events`+ `Already waiting for ${waitingFor.name}, cannot wait for multiple events`,);}@@ -105,7 +105,7 @@ export function execTracer() {if (queue.length === 0) {throw new Error(- `Expected event "${name}" but none found - has it happened yet?`+ `Expected event "${name}" but none found - has it happened yet?`,);} else if (queue[0].name === name) {let entry = queue.shift();@@ -117,7 +117,7 @@ export function execTracer() {}} else {throw new Error(- `Event traced "${queue[0].name}" but expected "${name}"`+ `Event traced "${queue[0].name}" but expected "${name}"`,);}},@@ -137,10 +137,10 @@ export function execTracer() {if (hasStarted && queue.length !== 0) {let str = queue.map(x => JSON.stringify(x));throw new Error(- 'Event tracer ended with existing events: ' + str.join('\n\n')+ 'Event tracer ended with existing events: ' + str.join('\n\n'),);}ended = true;- }+ },};}diff --git a/packages/loot-core/src/shared/transactions.js b/packages/loot-core/src/shared/transactions.jsindex a8d3cac689..d2ed3a083f 100644--- a/packages/loot-core/src/shared/transactions.js+++ b/packages/loot-core/src/shared/transactions.js@@ -17,7 +17,7 @@ function SplitTransactionError(total, parent) {return {type: 'SplitTransactionError',version: 1,- difference+ difference,};}@@ -38,7 +38,7 @@ export function makeChild(parent, data) {: null,is_child: true,parent_id: parent.id,- error: null+ error: null,};}@@ -47,12 +47,12 @@ export function recalculateSplit(trans) {// that it equals the parent amountconst total = trans.subtransactions.reduce((acc, t) => acc + num(t.amount),- 0+ 0,);return {...trans,error:- total === num(trans.amount) ? null : SplitTransactionError(total, trans)+ total === num(trans.amount) ? null : SplitTransactionError(total, trans),};}@@ -154,7 +154,7 @@ export function replaceTransactions(transactions, id, func) {return {data: transactionsCopy,newTransaction: grouped || { id: trans.id, _deleted: true },- diff: diffItems([trans], newTrans)+ diff: diffItems([trans], newTrans),};}}@@ -168,8 +168,8 @@ export function addSplitTransaction(transactions, id) {trans.subtransactions.push(makeChild(trans, {amount: 0,- sort_order: num(prevSub && prevSub.sort_order) - 1- })+ sort_order: num(prevSub && prevSub.sort_order) - 1,+ }),);return trans;});@@ -187,7 +187,7 @@ export function updateTransaction(transactions, transaction) {if (trans.id === transaction.id) {child = {...t,- payee: t.payee === trans.payee ? transaction.payee : t.payee+ payee: t.payee === trans.payee ? transaction.payee : t.payee,};} else if (t.id === transaction.id) {child = transaction;@@ -213,7 +213,7 @@ export function deleteTransaction(transactions, id) {...trans,subtransactions: null,is_parent: false,- error: null+ error: null,};} else {let sub = trans.subtransactions.filter(t => t.id !== id);@@ -235,7 +235,7 @@ export function splitTransaction(transactions, id) {...trans,is_parent: true,error: num(trans.amount) === 0 ? null : SplitTransactionError(0, trans),- subtransactions: [makeChild(trans, { amount: 0, sort_order: -1 })]+ subtransactions: [makeChild(trans, { amount: 0, sort_order: -1 })],};});}@@ -250,7 +250,7 @@ export function realizeTempTransactions(transactions) {...children.map(child => ({...child,id: uuid.v4Sync(),- parent_id: parent.id- }))+ parent_id: parent.id,+ })),];}diff --git a/packages/loot-core/src/shared/transactions.test.js b/packages/loot-core/src/shared/transactions.test.jsindex 743e553409..df37c6ba0c 100644--- a/packages/loot-core/src/shared/transactions.test.js+++ b/packages/loot-core/src/shared/transactions.test.js@@ -3,7 +3,7 @@ import {updateTransaction,deleteTransaction,addSplitTransaction,- makeChild+ makeChild,} from './transactions';const uuid = require('../platform/uuid');@@ -18,7 +18,7 @@ function makeTransaction(data) {amount: 2422,date: '2020-01-05',account: 'acct1',- ...data+ ...data,};}@@ -36,38 +36,38 @@ describe('Transactions', () => {let transactions = [makeTransaction({ amount: 5000 }),makeTransaction({ id: 't1', amount: 4000 }),- makeTransaction({ amount: 3000 })+ makeTransaction({ amount: 3000 }),];let { data, diff } = updateTransaction(transactions, {id: 't1',- amount: 5000+ amount: 5000,});expect(data.find(d => d.subtransactions)).toBeFalsy();expect(diff).toEqual({added: [],deleted: [],- updated: [{ id: 't1', amount: 5000 }]+ updated: [{ id: 't1', amount: 5000 }],});expect(data.map(t => ({ id: t.id, amount: t.amount })).sort()).toEqual([{ id: expect.any(String), amount: 5000 },{ id: 't1', amount: 5000 },- { id: expect.any(String), amount: 3000 }+ { id: expect.any(String), amount: 3000 },]);});test('updating does nothing if value not changed', () => {let transactions = [makeTransaction({ id: 't1', amount: 5000 }),- makeTransaction({ amount: 3000 })+ makeTransaction({ amount: 3000 }),];let { data, diff } = updateTransaction(transactions, {id: 't1',- amount: 5000+ amount: 5000,});expect(diff).toEqual({ added: [], deleted: [], updated: [] });expect(data.map(t => ({ id: t.id, amount: t.amount })).sort()).toEqual([{ id: expect.any(String), amount: 5000 },- { id: expect.any(String), amount: 3000 }+ { id: expect.any(String), amount: 3000 },]);});@@ -75,25 +75,25 @@ describe('Transactions', () => {let transactions = [makeTransaction({ amount: 5000 }),makeTransaction({ id: 't1', amount: 4000 }),- makeTransaction({ amount: 3000 })+ makeTransaction({ amount: 3000 }),];let { data, diff } = deleteTransaction(transactions, 't1');expect(diff).toEqual({added: [],deleted: [{ id: 't1' }],- updated: []+ updated: [],});expect(data.map(t => ({ id: t.id, amount: t.amount })).sort()).toEqual([{ id: expect.any(String), amount: 5000 },- { id: expect.any(String), amount: 3000 }+ { id: expect.any(String), amount: 3000 },]);});test('splitting a transaction works', () => {let transactions = [makeTransaction({ id: 't1', amount: 5000 }),- makeTransaction({ amount: 3000 })+ makeTransaction({ amount: 3000 }),];let { data, diff } = splitTransaction(transactions, 't1');expect(data.find(d => d.subtransactions)).toBeFalsy();@@ -105,18 +105,18 @@ describe('Transactions', () => {{id: 't1',is_parent: true,- error: splitError(5000)- }- ]+ error: splitError(5000),+ },+ ],});expect(data).toEqual([expect.objectContaining({id: 't1',amount: 5000,- error: splitError(5000)+ error: splitError(5000),}),expect.objectContaining({ parent_id: 't1', amount: 0 }),- expect.objectContaining({ amount: 3000 })+ expect.objectContaining({ amount: 3000 }),]);});@@ -125,9 +125,9 @@ describe('Transactions', () => {makeTransaction({ amount: 2001 }),...makeSplitTransaction({ id: 't1', amount: 2500 }, [{ id: 't2', amount: 2000 },- { id: 't3', amount: 500 }+ { id: 't3', amount: 500 },]),- makeTransaction({ amount: 3002 })+ makeTransaction({ amount: 3002 }),];expect(transactions.filter(t => t.parent_id === 't1').length).toBe(2);@@ -142,11 +142,11 @@ describe('Transactions', () => {expect.objectContaining({id: expect.any(String),amount: 0,- parent_id: 't1'- })+ parent_id: 't1',+ }),],deleted: [],- updated: []+ updated: [],});expect(data.length).toBe(6);});@@ -156,13 +156,13 @@ describe('Transactions', () => {makeTransaction({ amount: 2001 }),...makeSplitTransaction({ id: 't1', amount: 2500 }, [{ id: 't2', amount: 2000 },- { id: 't3', amount: 500 }+ { id: 't3', amount: 500 },]),- makeTransaction({ amount: 3002 })+ makeTransaction({ amount: 3002 }),];let { data, diff } = updateTransaction(transactions, {id: 't2',- amount: 2200+ amount: 2200,});expect(data.find(d => d.subtransactions)).toBeFalsy();expect(diff).toEqual({@@ -170,8 +170,8 @@ describe('Transactions', () => {deleted: [],updated: [{ id: 't1', error: splitError(-200) },- { id: 't2', amount: 2200 }- ]+ { id: 't2', amount: 2200 },+ ],});expect(data.length).toBe(5);});@@ -181,26 +181,26 @@ describe('Transactions', () => {makeTransaction({ amount: 2001 }),...makeSplitTransaction({ id: 't1', amount: 2500 }, [{ id: 't2', amount: 2000 },- { id: 't3', amount: 500 }+ { id: 't3', amount: 500 },]),- makeTransaction({ amount: 3002 })+ makeTransaction({ amount: 3002 }),];let { data, diff } = deleteTransaction(transactions, 't2');expect(diff).toEqual({added: [],deleted: [expect.objectContaining({ id: 't2' })],- updated: [{ id: 't1', error: splitError(2000) }]+ updated: [{ id: 't1', error: splitError(2000) }],});expect(data).toEqual([expect.objectContaining({ amount: 2001 }),expect.objectContaining({amount: 2500,is_parent: true,- error: splitError(2000)+ error: splitError(2000),}),expect.objectContaining({ amount: 500, parent_id: 't1' }),- expect.objectContaining({ amount: 3002 })+ expect.objectContaining({ amount: 3002 }),]);});});diff --git a/packages/loot-core/src/shared/util.js b/packages/loot-core/src/shared/util.jsindex abd6439796..0e7671466a 100644--- a/packages/loot-core/src/shared/util.js+++ b/packages/loot-core/src/shared/util.js@@ -90,7 +90,7 @@ export function applyChanges(changes, items) {const idx = items.findIndex(t => t.id === id);items[idx] = {...items[idx],- ...fields+ ...fields,};});}@@ -251,13 +251,13 @@ export function titleFirst(str) {export let numberFormats = [{ value: 'comma-dot', label: '1,000.33' },{ value: 'dot-comma', label: '1.000,33' },- { value: 'space-comma', label: '1 000,33' }+ { value: 'space-comma', label: '1 000,33' },];let numberFormat = {value: null,formatter: null,- regex: null+ regex: null,};export function setNumberFormat(format) {@@ -286,9 +286,9 @@ export function setNumberFormat(format) {separator,formatter: new Intl.NumberFormat(locale, {minimumFractionDigits: 2,- maximumFractionDigits: 2+ maximumFractionDigits: 2,}),- regex+ regex,};}@@ -313,12 +313,12 @@ const MIN_SAFE_NUMBER = -MAX_SAFE_NUMBER;export function safeNumber(value) {if (!Number.isInteger(value)) {throw new Error(- 'safeNumber: number is not an integer: ' + JSON.stringify(value)+ 'safeNumber: number is not an integer: ' + JSON.stringify(value),);}if (value > MAX_SAFE_NUMBER || value < MIN_SAFE_NUMBER) {throw new Error(- "safeNumber: can't safely perform arithmetic with number: " + value+ "safeNumber: can't safely perform arithmetic with number: " + value,);}return value;@@ -342,7 +342,7 @@ export function amountToCurrency(n) {export function currencyToAmount(str) {let amount = parseFloat(- str.replace(numberFormat.regex, '').replace(numberFormat.separator, '.')+ str.replace(numberFormat.regex, '').replace(numberFormat.separator, '.'),);return isNaN(amount) ? null : amount;}@@ -396,6 +396,6 @@ export function semverToNumber(str) {.map(x => {return ('000' + x.replace(/[^0-9]/g, '')).slice(-3);})- .join('')+ .join(''),);}diff --git a/packages/loot-design/src/components/AccountAutocomplete.js b/packages/loot-design/src/components/AccountAutocomplete.jsindex 4da50e4926..77acf23c4f 100644--- a/packages/loot-design/src/components/AccountAutocomplete.js+++ b/packages/loot-design/src/components/AccountAutocomplete.js@@ -11,7 +11,7 @@ export function AccountList({items,getItemProps,highlightedIndex,- embedded+ embedded,}) {let lastItem = null;@@ -20,7 +20,7 @@ export function AccountList({<Viewstyle={[{ overflow: 'auto', padding: '5px 0' },- !embedded && { maxHeight: 175 }+ !embedded && { maxHeight: 175 },]}>{items.map((item, idx) => {@@ -36,7 +36,7 @@ export function AccountList({key={group}style={{color: colors.y9,- padding: '4px 9px'+ padding: '4px 9px',}}data-testid="account-item-group">@@ -51,7 +51,7 @@ export function AccountList({highlightedIndex === idx ? colors.n4 : 'transparent',padding: 4,paddingLeft: 20,- borderRadius: embedded ? 4 : 0+ borderRadius: embedded ? 4 : 0,}}data-testid={'account-item' +@@ -59,7 +59,7 @@ export function AccountList({}>{item.name}- </div>+ </div>,];})}</View>diff --git a/packages/loot-design/src/components/Autocomplete.js b/packages/loot-design/src/components/Autocomplete.jsindex 5f3d69d10f..eca7f37aa3 100644--- a/packages/loot-design/src/components/Autocomplete.js+++ b/packages/loot-design/src/components/Autocomplete.js@@ -41,8 +41,8 @@ function getInitialState({embedded,isOpen = false,strict,- initialFilterSuggestions- }+ initialFilterSuggestions,+ },}) {let selectedItem = findItem(strict, suggestions, value);let filteredSuggestions = initialFilterSuggestions@@ -55,7 +55,7 @@ function getInitialState({originalItem: selectedItem,filteredSuggestions,highlightedIndex: null,- isOpen: embedded || isOpen+ isOpen: embedded || isOpen,};}@@ -66,7 +66,7 @@ function componentWillReceiveProps(bag, nextProps) {filterSuggestions = defaultFilterSuggestions,initialFilterSuggestions,value,- itemToString = defaultItemToString+ itemToString = defaultItemToString,} = nextProps;let { value: currValue } = bag.state;let updates = null;@@ -113,7 +113,7 @@ export function defaultFilterSuggestion(suggestion, value) {export function defaultFilterSuggestions(suggestions, value) {return suggestions.filter(suggestion =>- defaultFilterSuggestion(suggestion, value)+ defaultFilterSuggestion(suggestion, value),);}@@ -151,12 +151,12 @@ function onInputValueChange(highlightFirst,strict,filterSuggestions = defaultFilterSuggestions,- getHighlightedIndex+ getHighlightedIndex,},- state: { isOpen }+ state: { isOpen },},value,- changes+ changes,) {// OMG this is the dumbest thing ever. I need to remove Downshift// and build my own component. For some reason this is fired on blur@@ -188,14 +188,14 @@ function onInputValueChange(return {value,filteredSuggestions,- highlightedIndex: null+ highlightedIndex: null,};} else {let defaultGetHighlightedIndex = filteredSuggestions => {return highlightFirst && filteredSuggestions.length ? 0 : null;};let highlightedIndex = (getHighlightedIndex || defaultGetHighlightedIndex)(- filteredSuggestions+ filteredSuggestions,);if (changes.type !== Downshift.stateChangeTypes.clickItem) {@@ -204,14 +204,14 @@ function onInputValueChange(strict,filteredSuggestions,highlightedIndex,- value+ value,);}return {value,filteredSuggestions,- highlightedIndex+ highlightedIndex,};}}@@ -251,7 +251,7 @@ function onStateChange({ props, state, inst }, changes, stateAndHelpers) {newState.highlightedIndex != null? newState.highlightedIndex: state.highlightedIndex,- state.value+ state.value,);}@@ -261,7 +261,7 @@ function onStateChange({ props, state, inst }, changes, stateAndHelpers) {function onSelect({ props: { onSelect, clearAfterSelect, suggestions }, inst },- item+ item,) {if (onSelect) {// I AM NOT PROUD OF THIS OK??@@ -290,7 +290,7 @@ function onSelectAfter(suggestions, clearAfterSelect, inst) {value: '',selectedItem: null,highlightedIndex: null,- filteredSuggestions: suggestions+ filteredSuggestions: suggestions,};} else if (inst.input) {inst.input.setSelectionRange(0, 10000);@@ -313,7 +313,7 @@ function onKeyDown(onSelect,inputProps,shouldSaveFromKey = defaultShouldSaveFromKey,- strict+ strict,},state: {selectedItem,@@ -322,11 +322,11 @@ function onKeyDown(originalItem,isNulled,isOpen,- value+ value,},- inst+ inst,},- e+ e,) {let ENTER = 13;let ESC = 27;@@ -381,7 +381,7 @@ function onKeyDown(selectedItem: findItem(strict, suggestions, originalItem),filteredSuggestions,highlightedIndex: null,- isOpen: embedded ? true : false+ isOpen: embedded ? true : false,};}}@@ -402,7 +402,7 @@ function defaultRenderItems(items, getItemProps, highlightedIndex) {{...css({padding: 5,cursor: 'default',- backgroundColor: highlightedIndex === index ? colors.n4 : null+ backgroundColor: highlightedIndex === index ? colors.n4 : null,})}>{name}@@ -446,8 +446,8 @@ function onBlur({ inst, props, state: { selectedItem } }, e) {props: {...props,value,- originalValue: value- }+ originalValue: value,+ },});} else {return { isOpen: false };@@ -472,11 +472,11 @@ function _SingleAutocomplete({tooltipProps,renderInput = defaultRenderInput,renderItems = defaultRenderItems,- itemToString = defaultItemToString+ itemToString = defaultItemToString,},state: { value, selectedItem, filteredSuggestions, highlightedIndex, isOpen },updater,- inst+ inst,}) {const filtered = filteredSuggestions || suggestions;@@ -498,7 +498,7 @@ function _SingleAutocomplete({isOpen,inputValue,selectedItem,- highlightedIndex+ highlightedIndex,}) => (// Super annoying but it works best to return a div so we// can't use a View here, but we can fake it be using the@@ -514,8 +514,8 @@ function _SingleAutocomplete({onFocus: updater(onFocus),onBlur: updater(onBlur),onKeyDown: updater(onKeyDown),- onChange: updater(onChange)- })+ onChange: updater(onChange),+ }),)}{isOpen &&filtered.length > 0 &&@@ -525,7 +525,7 @@ function _SingleAutocomplete({filtered,getItemProps,highlightedIndex,- inputValue+ inputValue,)}</View>) : (@@ -536,7 +536,7 @@ function _SingleAutocomplete({padding: 0,backgroundColor: colors.n1,color: 'white',- ...tooltipStyle+ ...tooltipStyle,}}{...tooltipProps}data-testid="autocomplete"@@ -545,7 +545,7 @@ function _SingleAutocomplete({filtered,getItemProps,highlightedIndex,- inputValue+ inputValue,)}</Tooltip>))}@@ -557,7 +557,7 @@ function _SingleAutocomplete({const SingleAutocomplete = lively(_SingleAutocomplete, {getInitialState,- componentWillReceiveProps+ componentWillReceiveProps,});function MultiItem({ name, onRemove }) {@@ -569,7 +569,7 @@ function MultiItem({ name, onRemove }) {backgroundColor: colors.b9,padding: '2px 4px',margin: '2px',- borderRadius: 4+ borderRadius: 4,}}>{name}@@ -619,14 +619,14 @@ export function MultiAutocomplete({{...props}value={null}suggestions={suggestions.filter(- item => !selectedItems.includes(getItemId(item))+ item => !selectedItems.includes(getItemId(item)),)}onSelect={onAddItem}clearAfterSelecthighlightFirststrict={strict}tooltipProps={{- forceLayout: lastSelectedItems.current !== selectedItems+ forceLayout: lastSelectedItems.current !== selectedItems,}}renderInput={props => (<View@@ -638,12 +638,12 @@ export function MultiAutocomplete({alignItems: 'center',backgroundColor: 'white',borderRadius: 4,- border: '1px solid #d0d0d0'+ border: '1px solid #d0d0d0',},focused && {border: '1px solid ' + colors.b5,- boxShadow: '0 1px 1px ' + colors.b7- }+ boxShadow: '0 1px 1px ' + colors.b7,+ },]}>{selectedItems.map((item, idx) => {@@ -674,9 +674,9 @@ export function MultiAutocomplete({flex: 1,minWidth: 30,border: 0,- ':focus': { border: 0, boxShadow: 'none' }+ ':focus': { border: 0, boxShadow: 'none' },},- props.style+ props.style,]}/></View>@@ -689,7 +689,7 @@ export function AutocompleteFooterButton({title,style,hoveredStyle,- onClick+ onClick,}) {return (<Button@@ -698,13 +698,13 @@ export function AutocompleteFooterButton({fontSize: 12,color: colors.n10,backgroundColor: 'transparent',- borderColor: colors.n5+ borderColor: colors.n5,},- style+ style,]}hoveredStyle={[{ backgroundColor: 'rgba(200, 200, 200, .25)' },- hoveredStyle+ hoveredStyle,]}onClick={onClick}>@@ -719,7 +719,7 @@ export function AutocompleteFooter({ show = true, embedded, children }) {<Viewstyle={[{ flexShrink: 0 },- embedded ? { paddingTop: 5 } : { padding: 5 }+ embedded ? { paddingTop: 5 } : { padding: 5 },]}onMouseDown={e => e.preventDefault()}>diff --git a/packages/loot-design/src/components/Autocomplete.usage.js b/packages/loot-design/src/components/Autocomplete.usage.jsindex 68fa4aa63d..5a30440314 100644--- a/packages/loot-design/src/components/Autocomplete.usage.js+++ b/packages/loot-design/src/components/Autocomplete.usage.js@@ -14,7 +14,7 @@ let items = [{ id: 'five', name: 'Charlotte' },{ id: 'six', name: 'Fannie' },{ id: 'seven', name: 'Lily' },- { id: 'eight', name: 'Gray' }+ { id: 'eight', name: 'Gray' },];export default () => (diff --git a/packages/loot-design/src/components/CategorySelect.js b/packages/loot-design/src/components/CategorySelect.jsindex 82246304c1..35739b07b9 100644--- a/packages/loot-design/src/components/CategorySelect.js+++ b/packages/loot-design/src/components/CategorySelect.js@@ -22,7 +22,7 @@ export const NativeCategorySelect = React.forwardRef())}</Select>);- }+ },);export function CategoryList({@@ -30,7 +30,7 @@ export function CategoryList({getItemProps,highlightedIndex,embedded,- footer+ footer,}) {let lastGroup = null;@@ -40,9 +40,9 @@ export function CategoryList({style={[{overflow: 'auto',- padding: '5px 0'+ padding: '5px 0',},- !embedded && { maxHeight: 175 }+ !embedded && { maxHeight: 175 },]}>{items.map((item, idx) => {@@ -61,7 +61,7 @@ export function CategoryList({fontSize: 11,fontWeight: 500,color: colors.g8,- padding: '6px 8px'+ padding: '6px 8px',}}data-testid="split-transaction-button">@@ -85,7 +85,7 @@ export function CategoryList({<divstyle={{color: colors.y9,- padding: '4px 9px'+ padding: '4px 9px',}}data-testid="category-item-group">@@ -99,7 +99,7 @@ export function CategoryList({highlightedIndex === idx ? colors.n4 : 'transparent',padding: 4,paddingLeft: 20,- borderRadius: embedded ? 4 : 0+ borderRadius: embedded ? 4 : 0,}}data-testid={'category-item' +@@ -131,12 +131,12 @@ export default function CategoryAutocomplete({list.concat(group.categories.map(category => ({...category,- groupName: group.name- }))+ groupName: group.name,+ })),),- showSplitOption ? [{ id: 'split', name: '' }] : []+ showSplitOption ? [{ id: 'split', name: '' }] : [],),- [categoryGroups]+ [categoryGroups],);return (diff --git a/packages/loot-design/src/components/DateSelect.js b/packages/loot-design/src/components/DateSelect.jsindex 15639f9ce3..8b78ece85b 100644--- a/packages/loot-design/src/components/DateSelect.js+++ b/packages/loot-design/src/components/DateSelect.js@@ -4,7 +4,7 @@ import React, {useEffect,useLayoutEffect,useImperativeHandle,- useMemo+ useMemo,} from 'react';import * as d from 'date-fns';@@ -15,7 +15,7 @@ import {getDayMonthFormat,getDayMonthRegex,getShortYearFormat,- getShortYearRegex+ getShortYearRegex,} from 'loot-core/src/shared/months';import { colors } from '../style';@@ -30,39 +30,39 @@ let pickerStyles = {background: colors.n1,border: 'none',boxShadow: '0 0px 4px rgba(0, 0, 0, .25)',- borderRadius: 4+ borderRadius: 4,},'& .actual-date-picker': {'& .pika-lendar': {float: 'none',- width: 'auto'+ width: 'auto',},'& .pika-label': {- backgroundColor: colors.n1+ backgroundColor: colors.n1,},'& .pika-prev': {- backgroundImage: `url(${DateSelectLeft})`+ backgroundImage: `url(${DateSelectLeft})`,},'& .pika-next': {- backgroundImage: `url(${DateSelectRight})`+ backgroundImage: `url(${DateSelectRight})`,},'& .pika-table th': {color: colors.n11,- '& abbr': { textDecoration: 'none' }+ '& abbr': { textDecoration: 'none' },},'& .pika-button': {backgroundColor: colors.n2,- color: colors.n11+ color: colors.n11,},'& .is-today .pika-button': {- textDecoration: 'underline'+ textDecoration: 'underline',},'& .is-selected .pika-button': {backgroundColor: colors.n5,- boxShadow: 'none'- }- }+ boxShadow: 'none',+ },+ },};export let DatePicker = React.forwardRef(@@ -98,9 +98,9 @@ export let DatePicker = React.forwardRef(picker.current.setDate(newDate, true);onUpdate && onUpdate(newDate);}- }+ },}),- []+ [],);useLayoutEffect(() => {@@ -117,7 +117,7 @@ export let DatePicker = React.forwardRef(parse(dateString) {return d.parse(dateString, dateFormat, new Date());},- onSelect+ onSelect,});mountPoint.current.appendChild(picker.current.el);@@ -136,7 +136,7 @@ export let DatePicker = React.forwardRef(return (<View style={[pickerStyles, { flex: 1 }]} innerRef={mountPoint}></View>);- }+ },);function defaultShouldSaveFromKey(e) {@@ -158,7 +158,7 @@ export default function DateSelect({shouldSaveFromKey = defaultShouldSaveFromKey,tableBehavior,onUpdate,- onSelect+ onSelect,}) {let parsedDefaultValue = useMemo(() => {if (defaultValue) {@@ -348,7 +348,7 @@ export default function DateSelect({onSelect(d.format(date, 'yyyy-MM-dd'));setOpen(false);}}- />+ />,)}</View>);diff --git a/packages/loot-design/src/components/ElementQuery.js b/packages/loot-design/src/components/ElementQuery.jsindex d4952d8311..8ef6273b65 100644--- a/packages/loot-design/src/components/ElementQuery.js+++ b/packages/loot-design/src/components/ElementQuery.js@@ -33,5 +33,5 @@ export default lively(ElementQuery, {},componentWillUnmount({ inst }) {inst.observer.disconnect();- }+ },});diff --git a/packages/loot-design/src/components/FixedSizeList.js b/packages/loot-design/src/components/FixedSizeList.jsindex eaaa74719d..ea96ab165c 100644--- a/packages/loot-design/src/components/FixedSizeList.js+++ b/packages/loot-design/src/components/FixedSizeList.js@@ -24,7 +24,7 @@ export class FixedSizeList extends React.PureComponent {layout: 'vertical',overscanCount: 2,useIsScrolling: false,- headerHeight: 0+ headerHeight: 0,};constructor(props) {@@ -44,7 +44,7 @@ export class FixedSizeList extends React.PureComponent {typeof this.props.initialScrollOffset === 'number'? this.props.initialScrollOffset: 0,- scrollUpdateWasRequested: false+ scrollUpdateWasRequested: false,};}@@ -61,7 +61,7 @@ export class FixedSizeList extends React.PureComponent {scrollDirection:prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',scrollOffset: scrollOffset,- scrollUpdateWasRequested: true+ scrollUpdateWasRequested: true,};}, this._resetIsScrollingDebounced);}@@ -73,7 +73,7 @@ export class FixedSizeList extends React.PureComponent {index = Math.max(0, Math.min(index, itemCount - 1));this.scrollTo(- this.getOffsetForIndexAndAlignment(index, align, scrollOffset)+ this.getOffsetForIndexAndAlignment(index, align, scrollOffset),);}@@ -146,7 +146,7 @@ export class FixedSizeList extends React.PureComponent {outerTagName,style,useIsScrolling,- width+ width,} = this.props;const { isScrolling } = this.state;@@ -180,8 +180,8 @@ export class FixedSizeList extends React.PureComponent {key,style,isScrolling: useIsScrolling ? isScrolling : undefined,- isAnimating: animating- })+ isAnimating: animating,+ }),);}}@@ -206,7 +206,7 @@ export class FixedSizeList extends React.PureComponent {height,width,overflow: 'auto',- ...style+ ...style,}}><View innerRef={headerRef}>{header}</View>@@ -216,7 +216,7 @@ export class FixedSizeList extends React.PureComponent {position: 'relative',height: estimatedTotalSize,width: '100%',- pointerEvents: isScrolling ? 'none' : undefined+ pointerEvents: isScrolling ? 'none' : undefined,}}>{items}@@ -254,7 +254,7 @@ export class FixedSizeList extends React.PureComponent {this.anchored = {key,- offset: scrollOffset - this.getItemOffset(index)+ offset: scrollOffset - this.getItemOffset(index),};}@@ -274,12 +274,12 @@ export class FixedSizeList extends React.PureComponent {const size = this.props.height;const lastItemOffset = Math.max(0,- this.props.itemCount * this.props.itemSize - size+ this.props.itemCount * this.props.itemSize - size,);const maxOffset = Math.min(lastItemOffset, index * this.props.itemSize);const minOffset = Math.max(0,- index * this.props.itemSize - size + this.props.itemSize+ index * this.props.itemSize - size + this.props.itemSize,);if (align === 'smart') {@@ -302,7 +302,7 @@ export class FixedSizeList extends React.PureComponent {// "Centered" offset is usually the average of the min and max.// But near the edges of the list, this doesn't hold true.const middleOffset = Math.round(- minOffset + (maxOffset - minOffset) / 2+ minOffset + (maxOffset - minOffset) / 2,);if (middleOffset < Math.ceil(size / 2)) {return 0; // near the beginning@@ -329,22 +329,22 @@ export class FixedSizeList extends React.PureComponent {0,Math.min(this.props.itemCount - 1,- Math.floor(offset / this.props.itemSize)- )+ Math.floor(offset / this.props.itemSize),+ ),);getStopIndexForStartIndex = (startIndex, scrollOffset) => {const offset = startIndex * this.props.itemSize;const size = this.props.width;const numVisibleItems = Math.ceil(- (size + scrollOffset - offset) / this.props.itemSize+ (size + scrollOffset - offset) / this.props.itemSize,);return Math.max(0,Math.min(this.props.itemCount - 1,- startIndex + numVisibleItems - 1 // -1 is because stop index is inclusive- )+ startIndex + numVisibleItems - 1, // -1 is because stop index is inclusive+ ),);};@@ -353,14 +353,14 @@ export class FixedSizeList extends React.PureComponent {overscanStartIndex,overscanStopIndex,visibleStartIndex,- visibleStopIndex+ visibleStopIndex,) =>this.props.onItemsRendered({overscanStartIndex,overscanStopIndex,visibleStartIndex,- visibleStopIndex- })+ visibleStopIndex,+ }),);_callOnScroll = memoizeOne(@@ -368,8 +368,8 @@ export class FixedSizeList extends React.PureComponent {this.props.onScroll({scrollDirection,scrollOffset,- scrollUpdateWasRequested- })+ scrollUpdateWasRequested,+ }),);_callPropsCallbacks() {@@ -380,13 +380,13 @@ export class FixedSizeList extends React.PureComponent {overscanStartIndex,overscanStopIndex,visibleStartIndex,- visibleStopIndex+ visibleStopIndex,] = this._getRangeToRender();this._callOnItemsRendered(overscanStartIndex,overscanStopIndex,visibleStartIndex,- visibleStopIndex+ visibleStopIndex,);}}@@ -397,7 +397,7 @@ export class FixedSizeList extends React.PureComponent {this._callOnScroll(scrollDirection,scrollOffset,- scrollUpdateWasRequested+ scrollUpdateWasRequested,);}}@@ -423,7 +423,7 @@ export class FixedSizeList extends React.PureComponent {left: 0,top: offset,height: size,- width: '100%'+ width: '100%',};}@@ -463,7 +463,7 @@ export class FixedSizeList extends React.PureComponent {Math.max(0, startIndex - overscanBackward),Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)),startIndex,- stopIndex+ stopIndex,];}@@ -485,7 +485,7 @@ export class FixedSizeList extends React.PureComponent {scrollDirection:prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',scrollOffset,- scrollUpdateWasRequested: false+ scrollUpdateWasRequested: false,};}, this._resetIsScrollingDebounced);};@@ -513,7 +513,7 @@ export class FixedSizeList extends React.PureComponent {this._resetIsScrollingTimeoutId = setTimeout(this._resetIsScrolling,- IS_SCROLLING_DEBOUNCE_INTERVAL+ IS_SCROLLING_DEBOUNCE_INTERVAL,);};diff --git a/packages/loot-design/src/components/KeyHandlers.js b/packages/loot-design/src/components/KeyHandlers.jsindex dc31bbe5a3..a814aed692 100644--- a/packages/loot-design/src/components/KeyHandlers.js+++ b/packages/loot-design/src/components/KeyHandlers.js@@ -47,7 +47,7 @@ export function KeyHandler({ keyName, eventType = 'keydown', handler }) {hotkeys.unbind({key: keyName,scope,- method: _handler+ method: _handler,});};}, [keyName, handler, scope]);diff --git a/packages/loot-design/src/components/NotesButton.js b/packages/loot-design/src/components/NotesButton.jsindex ccd10f72f0..b0190bf7bd 100644--- a/packages/loot-design/src/components/NotesButton.js+++ b/packages/loot-design/src/components/NotesButton.js@@ -15,7 +15,7 @@ export function NotesTooltip({editable,defaultNotes,position = 'bottom-left',- onClose+ onClose,}) {let [notes, setNotes] = useState(defaultNotes);let inputRef = React.createRef();@@ -36,7 +36,7 @@ export function NotesTooltip({padding: 7,minWidth: 300,minHeight: 120,- outline: 'none'+ outline: 'none',})}value={notes || ''}onChange={e => setNotes(e.target.value)}@@ -48,7 +48,7 @@ export function NotesTooltip({maxWidth: 225,padding: 8,whiteSpace: 'pre-wrap',- overflowWrap: 'break-word'+ overflowWrap: 'break-word',})}>{notes}@@ -64,12 +64,12 @@ export default function NotesButton({height = 12,defaultColor = colors.n8,tooltipPosition,- style+ style,}) {let [hover, setHover] = useState(false);let tooltip = useTooltip();let { data } = useLiveQuery(- useMemo(() => q('notes').filter({ id }).select('*'), [id])+ useMemo(() => q('notes').filter({ id }).select('*'), [id]),);let note = data && data.length > 0 ? data[0].note : null;let hasNotes = note && note !== '';@@ -90,12 +90,12 @@ export default function NotesButton({'& button, & .hover-visible': {display: 'flex',opacity: 1,- color: colors.n1- }+ color: colors.n1,+ },},hasNotes && {- '& button, & .hover-visible': { display: 'flex', opacity: 1 }- }+ '& button, & .hover-visible': { display: 'flex', opacity: 1 },+ },]}onMouseEnter={() => setHover(true)}onMouseLeave={() => setHover(false)}diff --git a/packages/loot-design/src/components/PayeeAutocomplete.js b/packages/loot-design/src/components/PayeeAutocomplete.jsindex 2093559033..464f6ff613 100644--- a/packages/loot-design/src/components/PayeeAutocomplete.js+++ b/packages/loot-design/src/components/PayeeAutocomplete.js@@ -12,7 +12,7 @@ import Add from '../svg/v1/Add';import Autocomplete, {defaultFilterSuggestion,AutocompleteFooter,- AutocompleteFooterButton+ AutocompleteFooterButton,} from './Autocomplete';import { View } from './common';@@ -48,7 +48,7 @@ export function PayeeList({highlightedIndex,embedded,inputValue,- footer+ footer,}) {let isFiltered = items.filtered;let createNew = null;@@ -71,7 +71,7 @@ export function PayeeList({<Viewstyle={[{ overflow: 'auto', padding: '5px 0' },- !embedded && { maxHeight: 175 }+ !embedded && { maxHeight: 175 },]}>{createNew && (@@ -82,7 +82,7 @@ export function PayeeList({padding: '6px 9px',backgroundColor:highlightedIndex === 0 ? colors.n4 : 'transparent',- borderRadius: embedded ? 4 : 0+ borderRadius: embedded ? 4 : 0,}}><View@@ -91,7 +91,7 @@ export function PayeeList({color: colors.g8,borderRadius: 4,fontSize: 11,- fontWeight: 500+ fontWeight: 500,}}><Add@@ -100,7 +100,7 @@ export function PayeeList({style={{color: colors.g8,marginRight: 5,- display: 'inline-block'+ display: 'inline-block',}}/>Create Payee "{inputValue}"@@ -126,7 +126,7 @@ export function PayeeList({key={'title-' + idx}style={{color: colors.y9,- padding: '4px 9px'+ padding: '4px 9px',}}>{title}@@ -143,7 +143,7 @@ export function PayeeList({: 'transparent',borderRadius: embedded ? 4 : 0,padding: 4,- paddingLeft: 20+ paddingLeft: 20,}}>{item.name}@@ -155,7 +155,7 @@ export function PayeeList({fontSize: 11,padding: 5,color: colors.n5,- textAlign: 'center'+ textAlign: 'center',}}>More payees are available, search to find them@@ -187,14 +187,14 @@ export default function PayeeAutocomplete({let accounts = useCachedAccounts();let [focusTransferPayees, setFocusTransferPayees] = useState(- defaultFocusTransferPayees+ defaultFocusTransferPayees,);let payeeSuggestions = useMemo(() => [{ id: 'new', name: '' },- ...getPayeeSuggestions(payees, focusTransferPayees, accounts)+ ...getPayeeSuggestions(payees, focusTransferPayees, accounts),],- [payees, focusTransferPayees, accounts]+ [payees, focusTransferPayees, accounts],);let rawPayee = useRef('');@@ -240,7 +240,7 @@ export default function PayeeAutocomplete({...inputProps,onBlur: () => setPayeeFieldFocused(false),onFocus: () => setPayeeFieldFocused(true),- onChange: text => (rawPayee.current = text)+ onChange: text => (rawPayee.current = text),}}onUpdate={value => onUpdate && onUpdate(makeNew(value, rawPayee))}onSelect={handleSelect}@@ -338,13 +338,13 @@ export default function PayeeAutocomplete({focusTransferPayees && {backgroundColor: colors.y8,color: colors.g2,- borderColor: colors.y8- }+ borderColor: colors.y8,+ },]}hoveredStyle={focusTransferPayees && {backgroundColor: colors.y8,- colors: colors.y2+ colors: colors.y2,}}onClick={() => {diff --git a/packages/loot-design/src/components/RecurringSchedulePicker.js b/packages/loot-design/src/components/RecurringSchedulePicker.jsindex 737c115eae..537bd89869 100644--- a/packages/loot-design/src/components/RecurringSchedulePicker.js+++ b/packages/loot-design/src/components/RecurringSchedulePicker.js@@ -18,7 +18,7 @@ const MAX_DAY_OF_WEEK_INTERVAL = 5;const FREQUENCY_OPTIONS = [{ id: 'weekly', name: 'Weeks' },{ id: 'monthly', name: 'Months' },- { id: 'yearly', name: 'Years' }+ { id: 'yearly', name: 'Years' },];const DAY_OF_MONTH_OPTIONS = [...Array(31).keys()].map(day => day + 1);@@ -30,7 +30,7 @@ const DAY_OF_WEEK_OPTIONS = [{ id: 'WE', name: 'Wednesday' },{ id: 'TH', name: 'Thursday' },{ id: 'FR', name: 'Friday' },- { id: 'SA', name: 'Saturday' }+ { id: 'SA', name: 'Saturday' },];function parsePatternValue(value) {@@ -46,7 +46,7 @@ function parseConfig(config) {start: monthUtils.currentDay(),interval: 1,frequency: 'monthly',- patterns: [createMonthlyRecurrence(monthUtils.currentDay())]+ patterns: [createMonthlyRecurrence(monthUtils.currentDay())],});}@@ -54,14 +54,14 @@ function parseConfig(config) {function unparseConfig(parsed) {return {...parsed,- interval: validInterval(parsed.interval)+ interval: validInterval(parsed.interval),};}function createMonthlyRecurrence(startDate) {return {value: parseInt(monthUtils.format(startDate, 'd')),- type: 'day'+ type: 'day',};}@@ -90,8 +90,8 @@ function reducer(state, action) {...state.config,[action.field]: action.value,patterns:- state.config.frequency !== 'monthly' ? [] : state.config.patterns- }+ state.config.frequency !== 'monthly' ? [] : state.config.patterns,+ },};case 'update-recurrence':return {@@ -101,9 +101,9 @@ function reducer(state, action) {patterns: state.config.patterns.map(p =>p === action.recurrence? { ...action.recurrence, ...boundedRecurrence(action) }- : p- )- }+ : p,+ ),+ },};case 'add-recurrence':return {@@ -112,17 +112,17 @@ function reducer(state, action) {...state.config,patterns: [...(state.config.patterns || []),- createMonthlyRecurrence(state.config.start)- ]- }+ createMonthlyRecurrence(state.config.start),+ ],+ },};case 'remove-recurrence':return {...state,config: {...state.config,- patterns: state.config.patterns.filter(p => p !== action.recurrence)- }+ patterns: state.config.patterns.filter(p => p !== action.recurrence),+ },};default:return state;@@ -135,7 +135,7 @@ function SchedulePreview({ previewDates }) {}let dateFormat = useSelector(- state => state.prefs.local.dateFormat || 'MM/dd/yyyy'+ state => state.prefs.local.dateFormat || 'MM/dd/yyyy',);dateFormat = dateFormat.replace('MM', 'M').replace('dd', 'd');@@ -187,7 +187,7 @@ function MonthlyPatterns({ config, dispatch }) {key={idx}style={{display: 'flex',- flexDirection: 'row'+ flexDirection: 'row',}}><Select@@ -197,7 +197,7 @@ function MonthlyPatterns({ config, dispatch }) {updateRecurrence(recurrence,'value',- parsePatternValue(e.target.value)+ parsePatternValue(e.target.value),)}>@@ -228,7 +228,7 @@ function MonthlyPatterns({ config, dispatch }) {onClick={() =>dispatch({type: 'remove-recurrence',- recurrence: recurrence+ recurrence: recurrence,})}>@@ -251,17 +251,17 @@ function RecurringScheduleTooltip({ config: currentConfig, onClose, onSave }) {let [previewDates, setPreviewDates] = useState(null);let [state, dispatch] = useReducer(reducer, {- config: parseConfig(currentConfig)+ config: parseConfig(currentConfig),});let dateFormat = useSelector(- state => state.prefs.local.dateFormat || 'MM/dd/yyyy'+ state => state.prefs.local.dateFormat || 'MM/dd/yyyy',);useEffect(() => {dispatch({type: 'replace-config',- config: parseConfig(currentConfig)+ config: parseConfig(currentConfig),});}, [currentConfig]);@@ -274,7 +274,7 @@ function RecurringScheduleTooltip({ config: currentConfig, onClose, onSave }) {async function run() {let { data, error } = await sendCatch('schedule/get-upcoming-dates', {config: unparseConfig(config),- count: 4+ count: 4,});setPreviewDates(error ? 'Invalid rule' : data);}@@ -364,7 +364,7 @@ function RecurringScheduleTooltip({ config: currentConfig, onClose, onSave }) {export default function RecurringSchedulePicker({value,buttonStyle,- onChange+ onChange,}) {let { isOpen, close, getOpenEvents } = useTooltip();diff --git a/packages/loot-design/src/components/Stack.js b/packages/loot-design/src/components/Stack.jsindex a262281e2f..1c23ee2a86 100644--- a/packages/loot-design/src/components/Stack.js+++ b/packages/loot-design/src/components/Stack.js@@ -25,9 +25,9 @@ const Stack = React.forwardRef(spacing = 3,children,debug,- style+ style,},- ref+ ref,) => {const isReversed = direction.endsWith('reverse');const isHorizontal = direction.startsWith('row');@@ -39,9 +39,9 @@ const Stack = React.forwardRef({flexDirection: direction,alignItems: align,- justifyContent: justify+ justifyContent: justify,},- style+ style,]}innerRef={ref}>@@ -62,14 +62,14 @@ const Stack = React.forwardRef(style: [debug && { borderWidth: 1, borderColor: 'red' },isLastChild ? null : { [marginProp]: spacing * 5 },- child.props ? child.props.style : null- ]- }+ child.props ? child.props.style : null,+ ],+ },);})}</View>);- }+ },);export default Stack;diff --git a/packages/loot-design/src/components/TutorialPoint.js b/packages/loot-design/src/components/TutorialPoint.jsindex c581c366cc..c2884c1662 100644--- a/packages/loot-design/src/components/TutorialPoint.js+++ b/packages/loot-design/src/components/TutorialPoint.js@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';class TutorialPoint extends React.Component {static contextTypes = {- setTutorialNode: PropTypes.func+ setTutorialNode: PropTypes.func,};ref = el => {diff --git a/packages/loot-design/src/components/alerts.js b/packages/loot-design/src/components/alerts.jsindex 29797999fd..fa87b706c4 100644--- a/packages/loot-design/src/components/alerts.js+++ b/packages/loot-design/src/components/alerts.js@@ -19,10 +19,10 @@ export function Alert({ icon: Icon, color, backgroundColor, style, children }) {padding: 10,flexDirection: 'row','& a, & a:active, & a:visited': {- color: colors.b3- }+ color: colors.b3,+ },},- style+ style,]}><View@@ -31,7 +31,7 @@ export function Alert({ icon: Icon, color, backgroundColor, style, children }) {paddingTop: '.11em',alignSelf: 'stretch',flexShrink: 0,- marginRight: 5+ marginRight: 5,}}><Icon width={13} style={{ color, marginTop: 2 }} />diff --git a/packages/loot-design/src/components/budget/BalanceWithCarryover.js b/packages/loot-design/src/components/budget/BalanceWithCarryover.jsindex 31381c674a..e3e4d7f44b 100644--- a/packages/loot-design/src/components/budget/BalanceWithCarryover.js+++ b/packages/loot-design/src/components/budget/BalanceWithCarryover.js@@ -11,7 +11,7 @@ export default function BalanceWithCarryover({carryover,balance,category,- disabled+ disabled,}) {let carryoverValue = useSheetValue(carryover);let balanceValue = useSheetValue(balance);@@ -26,8 +26,8 @@ export default function BalanceWithCarryover({{ textAlign: 'right' },!disabled && {cursor: 'pointer',- ':hover': { textDecoration: 'underline' }- }+ ':hover': { textDecoration: 'underline' },+ },]}/>{carryoverValue === true && (@@ -39,14 +39,14 @@ export default function BalanceWithCarryover({right: -4,top: 0,bottom: 0,- justifyContent: 'center'+ justifyContent: 'center',}}><ArrowThinRightwidth={7}height={7}style={{- ...makeAmountStyle(balanceValue)+ ...makeAmountStyle(balanceValue),}}/></View>diff --git a/packages/loot-design/src/components/budget/BudgetSummaries.js b/packages/loot-design/src/components/budget/BudgetSummaries.jsindex 73cb943107..a901cbbeee 100644--- a/packages/loot-design/src/components/budget/BudgetSummaries.js+++ b/packages/loot-design/src/components/budget/BudgetSummaries.js@@ -3,7 +3,7 @@ import React, {useState,useRef,useCallback,- useLayoutEffect+ useLayoutEffect,} from 'react';import { css } from 'glamor';@@ -25,7 +25,7 @@ export default function BudgetSummaries({ SummaryComponent }) {let containerRef = useResizeObserver(useCallback(rect => {setWidthState(rect.width);- }, [])+ }, []),);let scrollerRef = useRef();@@ -46,7 +46,7 @@ export default function BudgetSummaries({ SummaryComponent }) {stiffness: 600,damping: 80,mass: 3,- fromValue: -monthWidth+ fromValue: -monthWidth,});spring.current.onUpdate(s => {@@ -84,8 +84,8 @@ export default function BudgetSummaries({ SummaryComponent }) {{ flex: 1, overflow: 'hidden' },months.length === 1 && {marginLeft: -4,- marginRight: -4- }+ marginRight: -4,+ },])}ref={containerRef}>@@ -93,7 +93,7 @@ export default function BudgetSummaries({ SummaryComponent }) {style={{flexDirection: 'row',width: widthState,- willChange: 'transform'+ willChange: 'transform',}}innerRef={scrollerRef}>@@ -103,7 +103,7 @@ export default function BudgetSummaries({ SummaryComponent }) {key={month}style={[{ flex: `0 0 ${monthWidth}px` },- { paddingLeft: 4, paddingRight: 4 }+ { paddingLeft: 4, paddingRight: 4 },]}><SummaryComponent month={month} />diff --git a/packages/loot-design/src/components/budget/DynamicBudgetTable.js b/packages/loot-design/src/components/budget/DynamicBudgetTable.jsindex e637e972ff..1d55cd6b8d 100644--- a/packages/loot-design/src/components/budget/DynamicBudgetTable.js+++ b/packages/loot-design/src/components/budget/DynamicBudgetTable.js@@ -40,7 +40,7 @@ const DynamicBudgetTableInner = React.forwardRef(onPreload,...props},- ref+ ref,) => {let { setDisplayMax } = useBudgetMonthCount();@@ -63,7 +63,7 @@ const DynamicBudgetTableInner = React.forwardRef(width,height,alignItems: 'center',- opacity: width <= 0 || height <= 0 ? 0 : 1+ opacity: width <= 0 || height <= 0 ? 0 : 1,}}><View style={{ width: '100%', maxWidth }}>@@ -86,7 +86,7 @@ const DynamicBudgetTableInner = React.forwardRef(</View></CategoryGroupsContext.Provider>);- }+ },);export default React.forwardRef((props, ref) => {diff --git a/packages/loot-design/src/components/budget/MonthsContext.js b/packages/loot-design/src/components/budget/MonthsContext.jsindex 102a75a8ac..cbddaac648 100644--- a/packages/loot-design/src/components/budget/MonthsContext.js+++ b/packages/loot-design/src/components/budget/MonthsContext.js@@ -5,7 +5,7 @@ import * as monthUtils from 'loot-core/src/shared/months';export function getValidMonthBounds(bounds, startMonth, endMonth) {return {start: startMonth < bounds.start ? bounds.start : startMonth,- end: endMonth > bounds.end ? bounds.end : endMonth+ end: endMonth > bounds.end ? bounds.end : endMonth,};}@@ -16,7 +16,7 @@ export function MonthsProvider({numMonths,monthBounds,type,- children+ children,}) {let endMonth = monthUtils.addMonths(startMonth, numMonths - 1);let bounds = getValidMonthBounds(monthBounds, startMonth, endMonth);diff --git a/packages/loot-design/src/components/budget/index.js b/packages/loot-design/src/components/budget/index.jsindex 5aa24b3a71..27b726422e 100644--- a/packages/loot-design/src/components/budget/index.js+++ b/packages/loot-design/src/components/budget/index.js@@ -15,7 +15,7 @@ import {Button,Tooltip,Menu,- IntersectionBoundary+ IntersectionBoundary,} from '../common';import ElementQuery from '../ElementQuery';import NotesButton from '../NotesButton';@@ -23,7 +23,7 @@ import {useDraggable,useDroppable,DropHighlight,- DropHighlightPosContext+ DropHighlightPosContext,} from '../sort.js';import NamespaceContext from '../spreadsheet/NamespaceContext';import { Row, InputCell, ROW_HEIGHT } from '../table';@@ -44,7 +44,7 @@ export class BudgetTable extends React.Component {this.state = {editing: null,- draggingState: null+ draggingState: null,};}@@ -73,7 +73,7 @@ export class BudgetTable extends React.Component {targetId:categories.length === 0 || dropPos === 'top'? null- : categories[0].id+ : categories[0].id,});}} else {@@ -89,7 +89,7 @@ export class BudgetTable extends React.Component {this.props.onReorderCategory({id,groupId: targetGroup.id,- ...findSortDown(targetGroup.categories, dropPos, targetId)+ ...findSortDown(targetGroup.categories, dropPos, targetId),});}};@@ -99,7 +99,7 @@ export class BudgetTable extends React.Component {this.props.onReorderGroup({id,- ...findSortDown(categoryGroups, dropPos, targetId)+ ...findSortDown(categoryGroups, dropPos, targetId),});};@@ -184,7 +184,7 @@ export class BudgetTable extends React.Component {onShowNewCategory,onHideNewCategory,onShowNewGroup,- onHideNewGroup+ onHideNewGroup,} = this.props;let { editing, draggingState } = this.state;@@ -194,12 +194,12 @@ export class BudgetTable extends React.Component {{ flex: 1 },styles.lightScrollbar && {'& ::-webkit-scrollbar': {- backgroundColor: 'transparent'+ backgroundColor: 'transparent',},'& ::-webkit-scrollbar-thumb:vertical': {- backgroundColor: 'white'- }- }+ backgroundColor: 'white',+ },+ },]}><View@@ -210,7 +210,7 @@ export class BudgetTable extends React.Component {// This is necessary to align with the table because the// table has this padding to allow the shadow to showpaddingLeft: 5,- paddingRight: 5 + getScrollbarWidth()+ paddingRight: 5 + getScrollbarWidth(),}}><View style={{ width: 200 }} />@@ -240,14 +240,14 @@ export class BudgetTable extends React.Component {overflowAnchor: 'none',flex: 1,paddingLeft: 5,- paddingRight: 5+ paddingRight: 5,}}innerRef={this.budgetCategoriesRef}><Viewstyle={{opacity: draggingState ? 0.5 : 1,- flexShrink: 0+ flexShrink: 0,}}onKeyDown={this.onKeyDown}innerRef={el => (this.budgetDataNode = el)}@@ -298,7 +298,7 @@ export function SidebarCategory({onEditName,onSave,onDelete,- onHideNewCategory+ onHideNewCategory,}) {const temporary = category.id === 'new';const [menuOpen, setMenuOpen] = useState(false);@@ -309,7 +309,7 @@ export function SidebarCategory({flexDirection: 'row',alignItems: 'center',userSelect: 'none',- WebkitUserSelect: 'none'+ WebkitUserSelect: 'none',}}><div@@ -317,7 +317,7 @@ export function SidebarCategory({textOverflow: 'ellipsis',whiteSpace: 'nowrap',overflow: 'hidden',- minWidth: 0+ minWidth: 0,}}>{category.name}@@ -355,7 +355,7 @@ export function SidebarCategory({}}items={[{ name: 'rename', text: 'Rename' },- { name: 'delete', text: 'Delete' }+ { name: 'delete', text: 'Delete' },]}/></Tooltip>@@ -375,11 +375,11 @@ export function SidebarCategory({style={[{width: 200,- '& button': { display: 'none' }+ '& button': { display: 'none' },},!dragging &&!dragPreview && {- '&:hover button': { display: 'flex', color: colors.n1 }+ '&:hover button': { display: 'flex', color: colors.n1 },},dragging && { color: colors.n8 },@@ -389,9 +389,9 @@ export function SidebarCategory({backgroundColor: 'white',zIndex: 10000,borderRadius: 6,- overflow: 'hidden'+ overflow: 'hidden',},- style+ style,]}onKeyDown={e => {const ENTER = 13;@@ -423,7 +423,7 @@ export function SidebarCategory({onBlur={() => onEditName(null)}style={[{ paddingLeft: 13 }, isLast && { borderBottomWidth: 0 }]}inputProps={{- placeholder: temporary ? 'New Category Name' : ''+ placeholder: temporary ? 'New Category Name' : '',}}/></View>@@ -443,7 +443,7 @@ export function SidebarGroup({onDelete,onShowNewCategory,onHideNewGroup,- onToggleCollapse+ onToggleCollapse,}) {const temporary = group.id === 'new';const [menuOpen, setMenuOpen] = useState(false);@@ -454,7 +454,7 @@ export function SidebarGroup({flexDirection: 'row',alignItems: 'center',userSelect: 'none',- WebkitUserSelect: 'none'+ WebkitUserSelect: 'none',}}onClick={e => {onToggleCollapse(group.id);@@ -469,7 +469,7 @@ export function SidebarGroup({marginLeft: 5,flexShrink: 0,transition: 'transform .1s',- transform: collapsed ? 'rotate(-90deg)' : ''+ transform: collapsed ? 'rotate(-90deg)' : '',}}/>)}@@ -478,7 +478,7 @@ export function SidebarGroup({textOverflow: 'ellipsis',whiteSpace: 'nowrap',overflow: 'hidden',- minWidth: 0+ minWidth: 0,}}>{dragPreview && <Text style={{ fontWeight: 500 }}>Group: </Text>}@@ -518,7 +518,7 @@ export function SidebarGroup({items={[{ name: 'add-category', text: 'Add category' },{ name: 'rename', text: 'Rename' },- onDelete && { name: 'delete', text: 'Delete' }+ onDelete && { name: 'delete', text: 'Delete' },]}/></Tooltip>@@ -540,14 +540,14 @@ export function SidebarGroup({width: 200,backgroundColor: colors.n11,'& button': { display: 'none' },- '&:hover button': { display: 'flex', color: colors.n1 }+ '&:hover button': { display: 'flex', color: colors.n1 },},dragPreview && {paddingLeft: 10,zIndex: 10000,borderRadius: 6,- overflow: 'hidden'- }+ overflow: 'hidden',+ },]}onKeyDown={e => {const ENTER = 13;@@ -578,7 +578,7 @@ export function SidebarGroup({style={{ fontWeight: 600 }}inputProps={{style: { marginLeft: 20 },- placeholder: temporary ? 'New Group Name' : ''+ placeholder: temporary ? 'New Group Name' : '',}}/></View>@@ -600,7 +600,7 @@ function RenderMonths({ component: Component, editingIndex, args, style }) {style={[{ flex: 1 },{ borderLeft: '1px solid ' + colors.border },- style+ style,]}><Component monthIndex={index} editing={editing} {...args} />@@ -621,7 +621,7 @@ const BudgetTotals = React.memo(function BudgetTotals({ MonthComponent }) {marginLeft: 5,marginRight: 5 + getScrollbarWidth(),borderRadius: '4px 4px 0 0',- borderBottom: '1px solid ' + colors.border+ borderBottom: '1px solid ' + colors.border,}}><View@@ -629,7 +629,7 @@ const BudgetTotals = React.memo(function BudgetTotals({ MonthComponent }) {width: 200,color: colors.n4,justifyContent: 'center',- paddingLeft: 18+ paddingLeft: 18,}}>Category@@ -653,7 +653,7 @@ function ExpenseGroup({onReorderGroup,onReorderCategory,onToggleCollapse,- onShowNewCategory+ onShowNewCategory,}) {let dragging = dragState && dragState.item === group;@@ -661,13 +661,13 @@ function ExpenseGroup({type: 'group',onDragChange,item: group,- canDrag: editingCell === null+ canDrag: editingCell === null,});let { dropRef, dropPos } = useDroppable({types: 'group',id: group.id,- onDrop: onReorderGroup+ onDrop: onReorderGroup,});let { dropRef: catDropRef, dropPos: catDropPos } = useDroppable({@@ -678,7 +678,7 @@ function ExpenseGroup({if (collapsed) {onToggleCollapse(group.id);}- }+ },});return (@@ -697,7 +697,7 @@ function ExpenseGroup({height: collapsed? ROW_HEIGHT - 1: (1 + group.categories.length) * (ROW_HEIGHT - 1) + 1,- zIndex: 10000+ zIndex: 10000,}}><DropHighlight pos={dropPos} offset={{ top: 1 }} />@@ -711,7 +711,7 @@ function ExpenseGroup({style={{flex: 1,flexDirection: 'row',- opacity: dragging && !dragState.preview ? 0.3 : 1+ opacity: dragging && !dragState.preview ? 0.3 : 1,}}><SidebarGroup@@ -749,7 +749,7 @@ function ExpenseCategory({onBudgetAction,onShowActivity,onDragChange,- onReorder+ onReorder,}) {let dragging = dragState && dragState.item === cat;@@ -761,13 +761,13 @@ function ExpenseCategory({type: 'category',onDragChange,item: cat,- canDrag: editingCell === null+ canDrag: editingCell === null,});let { dropRef, dropPos } = useDroppable({types: 'category',id: cat.id,- onDrop: onReorder+ onDrop: onReorder,});return (@@ -778,8 +778,8 @@ function ExpenseCategory({style={[{flex: 1,- flexDirection: 'row'- }+ flexDirection: 'row',+ },]}><SidebarCategory@@ -807,7 +807,7 @@ function ExpenseCategory({category: cat,onEdit: onEditMonth,onBudgetAction,- onShowActivity+ onShowActivity,}}/></View>@@ -823,7 +823,7 @@ function IncomeGroup({onEditName,onSave,onToggleCollapse,- onShowNewCategory+ onShowNewCategory,}) {return (<Row@@ -861,19 +861,19 @@ function IncomeCategory({onDragChange,onBudgetAction,onReorder,- onShowActivity+ onShowActivity,}) {let { dragRef } = useDraggable({type: 'income-category',onDragChange,item: cat,- canDrag: editingCell === null+ canDrag: editingCell === null,});let { dropRef, dropPos } = useDroppable({types: 'income-category',id: cat.id,- onDrop: onReorder+ onDrop: onReorder,});return (@@ -903,7 +903,7 @@ function IncomeCategory({onEdit: onEditMonth,isLast,onShowActivity,- onBudgetAction+ onBudgetAction,}}/></Row>@@ -932,7 +932,7 @@ const BudgetCategories = React.memo(onShowNewCategory,onHideNewCategory,onShowNewGroup,- onHideNewGroup+ onHideNewGroup,}) => {let items = useMemo(() => {let [expenseGroups, incomeGroup] = separateGroups(categoryGroups);@@ -951,11 +951,11 @@ const BudgetCategories = React.memo(...(collapsed.includes(group.id) ? [] : group.categories).map(cat => ({type: 'expense-category',- value: cat- })- )+ value: cat,+ }),+ ),];- })+ }),);if (isAddingGroup) {@@ -973,9 +973,9 @@ const BudgetCategories = React.memo(: incomeGroup.categories).map(cat => ({type: 'income-category',- value: cat- }))- ].filter(x => x)+ value: cat,+ })),+ ].filter(x => x),);}@@ -994,13 +994,13 @@ const BudgetCategories = React.memo(setDragState({type: newDragState.type,item: newDragState.item,- preview: true+ preview: true,});} else if (state === 'start') {if (dragState) {setDragState({...dragState,- preview: false+ preview: false,});setSavedCollapsed(collapsed);}@@ -1008,7 +1008,7 @@ const BudgetCategories = React.memo(setDragState({...dragState,hoveredId: newDragState.id,- hoveredPos: newDragState.pos+ hoveredPos: newDragState.pos,});} else if (state === 'end') {setDragState(null);@@ -1032,7 +1032,7 @@ const BudgetCategories = React.memo(overflow: 'hidden',boxShadow: MONTH_BOX_SHADOW,borderRadius: '0 0 4px 4px',- flex: 1+ flex: 1,}}>{items.map((item, idx) => {@@ -1061,7 +1061,7 @@ const BudgetCategories = React.memo(is_income:newCategoryForGroup ===categoryGroups.find(g => g.is_income).id,- id: 'new'+ id: 'new',}}editing={true}onSave={onSaveCategory}@@ -1114,7 +1114,7 @@ const BudgetCategories = React.memo(<Viewstyle={{height: INCOME_HEADER_HEIGHT,- backgroundColor: 'white'+ backgroundColor: 'white',}}><IncomeHeader@@ -1177,7 +1177,7 @@ const BudgetCategories = React.memo(<Viewstyle={!dragState && {- ':hover': { backgroundColor: '#fcfcfc' }+ ':hover': { backgroundColor: '#fcfcfc' },}}>@@ -1188,7 +1188,7 @@ const BudgetCategories = React.memo(})}</View>);- }+ },);function IncomeHeader({ MonthComponent, onShowNewGroup }) {@@ -1198,7 +1198,7 @@ function IncomeHeader({ MonthComponent, onShowNewGroup }) {style={{width: 200,alignItems: 'flex-start',- justifyContent: 'flex-start'+ justifyContent: 'flex-start',}}><Button onClick={onShowNewGroup} style={{ fontSize: 12, margin: 10 }}>@@ -1240,14 +1240,14 @@ export const BudgetPageHeader = React.memo(</View></View>);- }+ },);export const MonthPicker = scope(lively => {function getRangeForYear(year) {return monthUtils.rangeInclusive(monthUtils.getYearStart(year),- monthUtils.getYearEnd(year)+ monthUtils.getYearEnd(year),);}@@ -1270,7 +1270,7 @@ export const MonthPicker = scope(lively => {return {monthNames,- currentMonthName: getCurrentMonthName(startMonth, currentMonth)+ currentMonthName: getCurrentMonthName(startMonth, currentMonth),};}@@ -1282,15 +1282,15 @@ export const MonthPicker = scope(lively => {return {currentMonthName: getCurrentMonthName(nextProps.startMonth,- monthUtils.currentMonth()- )+ monthUtils.currentMonth(),+ ),};}}function MonthPicker({state: { monthNames, currentMonthName },- props: { startMonth, numDisplayed, monthBounds, style, onSelect }+ props: { startMonth, numDisplayed, monthBounds, style, onSelect },}) {const year = monthUtils.getYear(startMonth);const selectedIndex = monthUtils.getMonthIndex(startMonth);@@ -1301,9 +1301,9 @@ export const MonthPicker = scope(lively => {{flexDirection: 'row',alignItems: 'center',- justifyContent: 'space-between'+ justifyContent: 'space-between',},- style+ style,]}><View@@ -1312,7 +1312,7 @@ export const MonthPicker = scope(lively => {margin: '3px 0',fontWeight: 'bold',fontSize: 14,- flex: '0 0 40px'+ flex: '0 0 40px',}}>{monthUtils.format(year, 'yyyy')}@@ -1321,7 +1321,7 @@ export const MonthPicker = scope(lively => {sizes={[{ width: 320, size: 'small' },{ width: 400, size: 'medium' },- { size: 'big' }+ { size: 'big' },]}>{(matched, ref) => (@@ -1331,7 +1331,7 @@ export const MonthPicker = scope(lively => {flexDirection: 'row',flex: 1,alignItems: 'center',- justifyContent: 'center'+ justifyContent: 'center',}}>{monthNames.map((monthName, idx) => {@@ -1358,31 +1358,31 @@ export const MonthPicker = scope(lively => {borderRadius: 2,':hover': isMonthBudgeted && {backgroundColor: colors.p6,- color: 'white'- }+ color: 'white',+ },},!isMonthBudgeted && { color: colors.n7 },styles.smallText,selected && {backgroundColor: colors.p6,color: 'white',- borderRadius: 0+ borderRadius: 0,},idx === selectedIndex && {borderTopLeftRadius: 2,- borderBottomLeftRadius: 2+ borderBottomLeftRadius: 2,},idx === lastSelectedIndex - 1 && {borderTopRightRadius: 2,- borderBottomRightRadius: 2+ borderBottomRightRadius: 2,},idx >= selectedIndex &&idx < lastSelectedIndex - 1 && {marginRight: 0,borderRight: 'solid 1px',- borderColor: colors.p6+ borderColor: colors.p6,},- current && { textDecoration: 'underline' }+ current && { textDecoration: 'underline' },]}onClick={() => onSelect(month)}>@@ -1400,7 +1400,7 @@ export const MonthPicker = scope(lively => {flexDirection: 'row',alignItems: 'center',flex: '0 0 50px',- justifyContent: 'flex-end'+ justifyContent: 'flex-end',}}><Buttondiff --git a/packages/loot-design/src/components/budget/index.usage.js b/packages/loot-design/src/components/budget/index.usage.jsindex 61f562656f..81942ee6ea 100644--- a/packages/loot-design/src/components/budget/index.usage.js+++ b/packages/loot-design/src/components/budget/index.usage.js@@ -24,8 +24,8 @@ const categoryGroups = generateCategoryGroups([{ name: 'beer' },{ name: 'home' },{ name: 'general' },- { name: 'bills' }- ]+ { name: 'bills' },+ ],},{name: 'other stuff',@@ -36,28 +36,28 @@ const categoryGroups = generateCategoryGroups([{ name: 'general' },{ name: 'bills' },{ name: 'beer' },- { name: 'home' }- ]+ { name: 'home' },+ ],},{name: 'yet more stuff',- categories: [{ name: 'general' }, { name: 'bills' }]+ categories: [{ name: 'general' }, { name: 'bills' }],},{name: 'Income',is_income: true,categories: [{ name: 'income', is_income: true },- { name: 'salary', is_income: true }- ]- }+ { name: 'salary', is_income: true },+ ],+ },]);function makeLoadedSpreadsheet() {let spreadsheet = makeSpreadsheet();let months = monthUtils.rangeInclusive(monthUtils.subMonths('2017-01', 3),- '2017-10'+ '2017-10',);// Something random@@ -69,7 +69,7 @@ function makeLoadedSpreadsheet() {spreadsheet.set(monthUtils.sheetForMonth(month),name,- v || currentNumber+++ v || currentNumber++,);}@@ -83,7 +83,7 @@ function makeLoadedSpreadsheet() {value('from-last-month'),value('total-income'),value('total-spent'),- value('total-leftover')+ value('total-leftover'),];for (let group of categoryGroups) {@@ -97,7 +97,7 @@ function makeLoadedSpreadsheet() {values = values.concat([value(`group-budget-${group.id}`),value(`group-sum-amount-${group.id}`),- value(`group-leftover-${group.id}`)+ value(`group-leftover-${group.id}`),]);for (let cat of group.categories) {@@ -106,7 +106,7 @@ function makeLoadedSpreadsheet() {value(`budget-${cat.id}`),value(`sum-amount-${cat.id}`),value(`leftover-${cat.id}`, carryover ? -currentNumber : null),- value(`carryover-${cat.id}`, carryover)+ value(`carryover-${cat.id}`, carryover),]);}}@@ -121,7 +121,7 @@ export class LiveBudgetPage extends React.Component {startMonth: '2017-01',categoryGroups,collapsed: [],- newCategoryForGroup: false+ newCategoryForGroup: false,};render() {@@ -136,7 +136,7 @@ export class LiveBudgetPage extends React.Component {IncomeCategoryComponent: rollover.IncomeCategoryMonth,IncomeGroupComponent: rollover.IncomeGroupMonth,BudgetTotalsComponent: rollover.BudgetTotalsMonth,- IncomeHeaderComponent: rollover.IncomeHeaderMonth+ IncomeHeaderComponent: rollover.IncomeHeaderMonth,};return (@@ -149,7 +149,7 @@ export class LiveBudgetPage extends React.Component {style={{height: 800,backgroundColor: colors.n10,- overflow: 'hidden'+ overflow: 'hidden',}}><DynamicBudgetTable@@ -157,7 +157,7 @@ export class LiveBudgetPage extends React.Component {startMonth={startMonth}monthBounds={{start: monthUtils.subMonths('2017-01', 3),- end: '2017-10'+ end: '2017-10',}}maxMonths={maxMonths}onMonthSelect={month => {@@ -175,7 +175,7 @@ export class LiveBudgetPage extends React.Component {onShowNewCategory={groupId => {this.setState({newCategoryForGroup: groupId,- collapsed: collapsed.filter(c => c !== groupId)+ collapsed: collapsed.filter(c => c !== groupId),});}}onHideNewCategory={() => {@@ -190,12 +190,12 @@ export class LiveBudgetPage extends React.Component {if (group.id === cat.cat_group) {return {...group,- categories: group.categories.concat([cat])+ categories: group.categories.concat([cat]),};}return group;}),- newCategoryForGroup: null+ newCategoryForGroup: null,});} else {this.setState({@@ -204,20 +204,20 @@ export class LiveBudgetPage extends React.Component {return {...group,categories: group.categories.map(c =>- c.id === cat.id ? cat : c- )+ c.id === cat.id ? cat : c,+ ),};}return group;- })+ }),});}}}onSaveGroup={group => {this.setState({categoryGroups: categoryGroups.map(g =>- g.id === group.id ? group : g- )+ g.id === group.id ? group : g,+ ),});}}onDeleteCategory={id => {@@ -225,14 +225,14 @@ export class LiveBudgetPage extends React.Component {categoryGroups: categoryGroups.map(group => {return {...group,- categories: group.categories.filter(c => c.id !== id)+ categories: group.categories.filter(c => c.id !== id),};- })+ }),});}}onDeleteGroup={id =>this.setState({- categoryGroups: categoryGroups.filter(g => g.id !== id)+ categoryGroups: categoryGroups.filter(g => g.id !== id),})}onReorderCategory={sortInfo => {}}diff --git a/packages/loot-design/src/components/budget/report/BudgetSummary.js b/packages/loot-design/src/components/budget/report/BudgetSummary.jsindex 78911136b7..f5ec2b9539 100644--- a/packages/loot-design/src/components/budget/report/BudgetSummary.js+++ b/packages/loot-design/src/components/budget/report/BudgetSummary.js@@ -17,7 +17,7 @@ import {Menu,Stack,HoverTarget,- AlignedText+ AlignedText,} from '../../common';import NotesButton from '../../NotesButton';import CellValue from '../../spreadsheet/CellValue';@@ -123,9 +123,9 @@ function BudgetTotal({ title, current, target, ProgressComponent, style }) {lineHeight: 1.5,flexDirection: 'row',alignItems: 'center',- fontSize: 14+ fontSize: 14,},- style+ style,]}><ProgressComponent current={current} target={target} />@@ -228,8 +228,8 @@ function Saved({ projected, style }) {{...css([{fontSize: 25,- color: projected ? colors.y3 : isNegative ? colors.r4 : colors.p5- }+ color: projected ? colors.y3 : isNegative ? colors.r4 : colors.p5,+ },])}>{format(saved, 'financial')}@@ -244,7 +244,7 @@ export default React.memo(function BudgetSummary({ month }) {currentMonth,summaryCollapsed: collapsed,onBudgetAction,- onToggleSummaryCollapse+ onToggleSummaryCollapse,} = useReport();let [menuOpen, setMenuOpen] = useState(false);@@ -273,11 +273,11 @@ export default React.memo(function BudgetSummary({ month }) {overflow: 'hidden','& .hover-visible': {opacity: 0,- transition: 'opacity .25s'+ transition: 'opacity .25s',},'&:hover .hover-visible': {- opacity: 1- }+ opacity: 1,+ },}}><NamespaceContext.Provider@@ -286,14 +286,14 @@ export default React.memo(function BudgetSummary({ month }) {<Viewstyle={[{ padding: '0 13px' },- collapsed ? { margin: '10px 0' } : { marginTop: 16 }+ collapsed ? { margin: '10px 0' } : { marginTop: 16 },]}><Viewstyle={{position: 'absolute',left: 10,- top: 0+ top: 0,}}><Button@@ -317,9 +317,9 @@ export default React.memo(function BudgetSummary({ month }) {marginTop: 3,fontSize: 18,fontWeight: 500,- textDecorationSkip: 'ink'+ textDecorationSkip: 'ink',},- currentMonth === month && { textDecoration: 'underline' }+ currentMonth === month && { textDecoration: 'underline' },])}>{monthUtils.format(month, 'MMMM')}@@ -331,7 +331,7 @@ export default React.memo(function BudgetSummary({ month }) {right: 10,top: 0,flexDirection: 'row',- alignItems: 'center'+ alignItems: 'center',}}><View>@@ -368,8 +368,8 @@ export default React.memo(function BudgetSummary({ month }) {{ name: 'set-zero', text: 'Set budgets to zero' },{name: 'set-3-avg',- text: 'Set budgets to 3 month avg'- }+ text: 'Set budgets to 3 month avg',+ },]}/></Tooltip>@@ -386,7 +386,7 @@ export default React.memo(function BudgetSummary({ month }) {backgroundColor: colors.n11,borderRadius: 4,padding: '10px 15px',- marginTop: 13+ marginTop: 13,}}><IncomeTotal />@@ -401,7 +401,7 @@ export default React.memo(function BudgetSummary({ month }) {padding: '10px 20px',justifyContent: 'space-between',backgroundColor: colors.n11,- borderTop: '1px solid ' + colors.n10+ borderTop: '1px solid ' + colors.n10,}}><Saved projected={month >= currentMonth} />diff --git a/packages/loot-design/src/components/budget/report/ReportContext.js b/packages/loot-design/src/components/budget/report/ReportContext.jsindex 2f5057a624..2edbab4018 100644--- a/packages/loot-design/src/components/budget/report/ReportContext.js+++ b/packages/loot-design/src/components/budget/report/ReportContext.js@@ -8,7 +8,7 @@ export function ReportProvider({summaryCollapsed,onBudgetAction,onToggleSummaryCollapse,- children+ children,}) {let currentMonth = monthUtils.currentMonth();@@ -18,7 +18,7 @@ export function ReportProvider({currentMonth,summaryCollapsed,onBudgetAction,- onToggleSummaryCollapse+ onToggleSummaryCollapse,}}children={children}/>diff --git a/packages/loot-design/src/components/budget/report/components.js b/packages/loot-design/src/components/budget/report/components.jsindex 1327dfdadf..feb7f13834 100644--- a/packages/loot-design/src/components/budget/report/components.js+++ b/packages/loot-design/src/components/budget/report/components.js@@ -26,7 +26,7 @@ export const BudgetTotalsMonth = React.memo(function BudgetTotalsMonth() {flexDirection: 'row',marginRight: MONTH_RIGHT_PADDING,paddingTop: 10,- paddingBottom: 10+ paddingBottom: 10,}}><View style={headerLabelStyle}>@@ -66,7 +66,7 @@ export function IncomeHeaderMonth() {style={{flexDirection: 'row',marginRight: MONTH_RIGHT_PADDING,- paddingBottom: 5+ paddingBottom: 5,}}><View style={headerLabelStyle}>@@ -93,7 +93,7 @@ export const GroupMonth = React.memo(function ExpenseGroupMonth({ group }) {style={[{ fontWeight: 600 }, styles.tnum]}valueProps={{binding: reportBudget.groupBudgeted(id),- type: 'financial'+ type: 'financial',}}/><SheetCell@@ -104,7 +104,7 @@ export const GroupMonth = React.memo(function ExpenseGroupMonth({ group }) {style={[{ fontWeight: 600 }, styles.tnum]}valueProps={{binding: reportBudget.groupSumAmount(id),- type: 'financial'+ type: 'financial',}}/>{!group.is_income && (@@ -115,11 +115,11 @@ export const GroupMonth = React.memo(function ExpenseGroupMonth({ group }) {textAlign="right"style={[{ fontWeight: 600, paddingRight: MONTH_RIGHT_PADDING },- styles.tnum+ styles.tnum,]}valueProps={{binding: reportBudget.groupBalance(id),- type: 'financial'+ type: 'financial',}}/>)}@@ -141,7 +141,7 @@ function BalanceTooltip({ categoryId, tooltip, monthIndex, onBudgetAction }) {onMenuSelect={type => {onBudgetAction(monthIndex, 'carryover', {category: categoryId,- flag: !carryover+ flag: !carryover,});tooltip.close();}}@@ -150,8 +150,8 @@ function BalanceTooltip({ categoryId, tooltip, monthIndex, onBudgetAction }) {name: 'carryover',text: carryover? 'Remove overspending rollover'- : 'Rollover overspending'- }+ : 'Rollover overspending',+ },]}/></Tooltip>@@ -167,7 +167,7 @@ export const CategoryMonth = React.memo(function CategoryMonth({editing,onEdit,onBudgetAction,- onShowActivity+ onShowActivity,}) {let borderColor = colors.border;let balanceTooltip = useTooltip();@@ -188,14 +188,14 @@ export const CategoryMonth = React.memo(function CategoryMonth({cursor: 'default',margin: 1,padding: '0 4px',- borderRadius: 4+ borderRadius: 4,},{':hover': {boxShadow: 'inset 0 0 0 1px ' + colors.n7,- backgroundColor: 'white'- }- }+ backgroundColor: 'white',+ },+ },]}valueProps={{binding: reportBudget.catBudgeted(category.id),@@ -206,17 +206,17 @@ export const CategoryMonth = React.memo(function CategoryMonth({},unformatExpr: expr => {return amountToInteger(evalArithmetic(expr, 0));- }+ },}}inputProps={{onBlur: () => {onEdit(null);- }+ },}}onSave={amount => {onBudgetAction(monthIndex, 'budget-amount', {category: category.id,- amount+ amount,});}}/>@@ -237,8 +237,8 @@ export const CategoryMonth = React.memo(function CategoryMonth({style={{cursor: 'pointer',':hover': {- textDecoration: 'underline'- }+ textDecoration: 'underline',+ },}}/></span>diff --git a/packages/loot-design/src/components/budget/rollover/BudgetSummary.js b/packages/loot-design/src/components/budget/rollover/BudgetSummary.jsindex 42cab745d2..495d3385fa 100644--- a/packages/loot-design/src/components/budget/rollover/BudgetSummary.js+++ b/packages/loot-design/src/components/budget/rollover/BudgetSummary.js@@ -19,7 +19,7 @@ import {Tooltip,Menu,HoverTarget,- AlignedText+ AlignedText,} from '../../common';import NotesButton from '../../NotesButton';import CellValue from '../../spreadsheet/CellValue';@@ -39,7 +39,7 @@ function TotalsList({ prevMonthName, collapsed }) {{flexDirection: 'row',lineHeight: 1.5,- justifyContent: 'center'+ justifyContent: 'center',},!collapsed && {padding: '5px 0',@@ -47,19 +47,19 @@ function TotalsList({ prevMonthName, collapsed }) {backgroundColor: colors.n11,borderTopWidth: 1,borderBottomWidth: 1,- borderColor: colors.n9+ borderColor: colors.n9,},collapsed && {- padding: 7+ padding: 7,},- styles.smallText+ styles.smallText,]}><Viewstyle={{textAlign: 'right',marginRight: 10,- minWidth: 50+ minWidth: 50,}}><HoverTarget@@ -174,9 +174,9 @@ function ToBudget({ month, prevMonthName, collapsed, onBudgetAction }) {marginBottom: -1,borderBottom: '1px solid transparent',':hover': {- borderColor: isNegative ? colors.r4 : colors.p5- }- }+ borderColor: isNegative ? colors.r4 : colors.p5,+ },+ },])}>{format(num, 'financial')}@@ -201,16 +201,16 @@ function ToBudget({ month, prevMonthName, collapsed, onBudgetAction }) {items={[{name: 'transfer',- text: 'Move to a category'+ text: 'Move to a category',},{name: 'buffer',- text: 'Hold for next month'+ text: 'Hold for next month',},{name: 'reset-buffer',- text: "Reset next month's buffer"- }+ text: "Reset next month's buffer",+ },]}/></Tooltip>@@ -230,7 +230,7 @@ function ToBudget({ month, prevMonthName, collapsed, onBudgetAction }) {onSubmit={(amount, category) => {onBudgetAction(month, 'transfer-available', {amount,- category+ category,});}}/>@@ -250,7 +250,7 @@ function BudgetSummary({ month, localPrefs }) {currentMonth,summaryCollapsed: collapsed,onBudgetAction,- onToggleSummaryCollapse+ onToggleSummaryCollapse,} = useRollover();let [menuOpen, setMenuOpen] = useState(false);@@ -283,25 +283,25 @@ function BudgetSummary({ month, localPrefs }) {overflow: 'hidden','& .hover-visible': {opacity: 0,- transition: 'opacity .25s'+ transition: 'opacity .25s',},'&:hover .hover-visible': {- opacity: 1- }+ opacity: 1,+ },}}><NamespaceContext.Provider value={monthUtils.sheetForMonth(month)}><Viewstyle={[{ padding: '0 13px' },- collapsed ? { margin: '10px 0' } : { marginTop: 16 }+ collapsed ? { margin: '10px 0' } : { marginTop: 16 },]}><Viewstyle={{position: 'absolute',left: 10,- top: 0+ top: 0,}}><Button@@ -325,9 +325,9 @@ function BudgetSummary({ month, localPrefs }) {marginTop: 3,fontSize: 18,fontWeight: 500,- textDecorationSkip: 'ink'+ textDecorationSkip: 'ink',},- currentMonth === month && { textDecoration: 'underline' }+ currentMonth === month && { textDecoration: 'underline' },])}>{monthUtils.format(month, 'MMMM')}@@ -339,7 +339,7 @@ function BudgetSummary({ month, localPrefs }) {right: 10,top: 0,flexDirection: 'row',- alignItems: 'center'+ alignItems: 'center',}}><View>@@ -376,16 +376,16 @@ function BudgetSummary({ month, localPrefs }) {{ name: 'set-zero', text: 'Set budgets to zero' },{name: 'set-3-avg',- text: 'Set budgets to 3 month avg'+ text: 'Set budgets to 3 month avg',},goalTemplatesEnabled && {name: 'apply-goal-template',- text: 'Apply budget template'+ text: 'Apply budget template',},goalTemplatesEnabled && {name: 'overwrite-goal-template',- text: 'Overwrite with budget template'- }+ text: 'Overwrite with budget template',+ },]}/></Tooltip>@@ -401,7 +401,7 @@ function BudgetSummary({ month, localPrefs }) {padding: '10px 20px',justifyContent: 'space-between',backgroundColor: colors.n11,- borderTop: '1px solid ' + colors.n10+ borderTop: '1px solid ' + colors.n10,}}><ToBudget@@ -426,5 +426,5 @@ function BudgetSummary({ month, localPrefs }) {export default connect(state => ({ localPrefs: state.prefs.local }),- actions+ actions,)(BudgetSummary);diff --git a/packages/loot-design/src/components/budget/rollover/HoldTooltip.js b/packages/loot-design/src/components/budget/rollover/HoldTooltip.jsindex 941ec4f199..1aed2ea810 100644--- a/packages/loot-design/src/components/budget/rollover/HoldTooltip.js+++ b/packages/loot-design/src/components/budget/rollover/HoldTooltip.js@@ -53,7 +53,7 @@ export default function HoldTooltip({ onSubmit, onClose }) {<Viewstyle={{alignItems: 'flex-end',- marginTop: 10+ marginTop: 10,}}><Button@@ -61,7 +61,7 @@ export default function HoldTooltip({ onSubmit, onClose }) {style={{fontSize: 12,paddingTop: 3,- paddingBottom: 3+ paddingBottom: 3,}}onClick={submit}>diff --git a/packages/loot-design/src/components/budget/rollover/RolloverContext.js b/packages/loot-design/src/components/budget/rollover/RolloverContext.jsindex 2c3c406c53..fb7223c4e7 100644--- a/packages/loot-design/src/components/budget/rollover/RolloverContext.js+++ b/packages/loot-design/src/components/budget/rollover/RolloverContext.js@@ -9,7 +9,7 @@ export function RolloverContext({summaryCollapsed,onBudgetAction,onToggleSummaryCollapse,- children+ children,}) {let currentMonth = monthUtils.currentMonth();@@ -20,7 +20,7 @@ export function RolloverContext({categoryGroups,summaryCollapsed,onBudgetAction,- onToggleSummaryCollapse+ onToggleSummaryCollapse,}}children={children}/>diff --git a/packages/loot-design/src/components/budget/rollover/TransferTooltip.js b/packages/loot-design/src/components/budget/rollover/TransferTooltip.jsindex 2af821485f..897419b777 100644--- a/packages/loot-design/src/components/budget/rollover/TransferTooltip.js+++ b/packages/loot-design/src/components/budget/rollover/TransferTooltip.js@@ -15,7 +15,7 @@ export default function TransferTooltip({showToBeBudgeted,tooltipProps,onSubmit,- onClose+ onClose,}) {let spreadsheet = useContext(SpreadsheetContext);let sheetName = useContext(NamespaceContext);@@ -88,7 +88,7 @@ export default function TransferTooltip({<Viewstyle={{alignItems: 'flex-end',- marginTop: 10+ marginTop: 10,}}><Button@@ -96,7 +96,7 @@ export default function TransferTooltip({style={{fontSize: 12,paddingTop: 3,- paddingBottom: 3+ paddingBottom: 3,}}onClick={submit}>diff --git a/packages/loot-design/src/components/budget/rollover/rollover-components.js b/packages/loot-design/src/components/budget/rollover/rollover-components.jsindex 753197adcd..e580b0edf8 100644--- a/packages/loot-design/src/components/budget/rollover/rollover-components.js+++ b/packages/loot-design/src/components/budget/rollover/rollover-components.js@@ -13,7 +13,7 @@ import {InitialFocus,Tooltip,Button,- Menu+ Menu,} from '../../common';import CellValue from '../../spreadsheet/CellValue';import format from '../../spreadsheet/format';@@ -24,7 +24,7 @@ import { MONTH_RIGHT_PADDING } from '../constants';import {makeAmountGrey,addToBeBudgetedGroup,- CategoryGroupsContext+ CategoryGroupsContext,} from '../util';import TransferTooltip from './TransferTooltip';@@ -36,11 +36,11 @@ function CoverTooltip({inline,tooltipProps,onSubmit,- onClose+ onClose,}) {let categoryGroups = useContext(CategoryGroupsContext);categoryGroups = addToBeBudgetedGroup(- categoryGroups.filter(g => !g.is_income)+ categoryGroups.filter(g => !g.is_income),);let [category, setCategory] = useState(null);@@ -75,7 +75,7 @@ function CoverTooltip({if (e.keyCode === 13) {submit();}- }+ },}}/>)}@@ -84,14 +84,14 @@ function CoverTooltip({<Viewstyle={{alignItems: 'flex-end',- marginTop: 10+ marginTop: 10,}}><Buttonprimarystyle={{fontSize: 12,- paddingTop: 3+ paddingTop: 3,}}onClick={submit}>@@ -121,7 +121,7 @@ function BalanceTooltip({ categoryId, tooltip, monthIndex, onBudgetAction }) {if (type === 'carryover') {onBudgetAction(monthIndex, 'carryover', {category: categoryId,- flag: !carryover+ flag: !carryover,});tooltip.close();} else {@@ -131,18 +131,18 @@ function BalanceTooltip({ categoryId, tooltip, monthIndex, onBudgetAction }) {items={[{name: 'transfer',- text: 'Transfer to another category'+ text: 'Transfer to another category',},{name: 'carryover',text: carryover? 'Remove overspending rollover'- : 'Rollover overspending'+ : 'Rollover overspending',},balance < 0 && {name: 'cover',- text: 'Cover overspending'- }+ text: 'Cover overspending',+ },].filter(x => x)}/></Tooltip>@@ -157,7 +157,7 @@ function BalanceTooltip({ categoryId, tooltip, monthIndex, onBudgetAction }) {onBudgetAction(monthIndex, 'transfer-category', {amount,from: categoryId,- to: toCategory+ to: toCategory,});}}/>@@ -170,7 +170,7 @@ function BalanceTooltip({ categoryId, tooltip, monthIndex, onBudgetAction }) {onSubmit={fromCategory => {onBudgetAction(monthIndex, 'cover', {to: categoryId,- from: fromCategory+ from: fromCategory,});}}/>@@ -189,7 +189,7 @@ export const BudgetTotalsMonth = React.memo(function BudgetTotalsMonth() {flexDirection: 'row',marginRight: MONTH_RIGHT_PADDING,paddingTop: 10,- paddingBottom: 10+ paddingBottom: 10,}}><View style={headerLabelStyle}>@@ -229,7 +229,7 @@ export function IncomeHeaderMonth() {style={{color: colors.n4,alignItems: 'center',- paddingRight: 10+ paddingRight: 10,}}><View style={{ flex: 1, textAlign: 'right' }}>Received</View>@@ -238,7 +238,7 @@ export function IncomeHeaderMonth() {}export const ExpenseGroupMonth = React.memo(function ExpenseGroupMonth({- group+ group,}) {let borderColor = colors.border;let { id } = group;@@ -253,7 +253,7 @@ export const ExpenseGroupMonth = React.memo(function ExpenseGroupMonth({style={[{ fontWeight: 600 }, styles.tnum]}valueProps={{binding: rolloverBudget.groupBudgeted(id),- type: 'financial'+ type: 'financial',}}/><SheetCell@@ -264,7 +264,7 @@ export const ExpenseGroupMonth = React.memo(function ExpenseGroupMonth({style={[{ fontWeight: 600 }, styles.tnum]}valueProps={{binding: rolloverBudget.groupSumAmount(id),- type: 'financial'+ type: 'financial',}}/><SheetCell@@ -274,11 +274,11 @@ export const ExpenseGroupMonth = React.memo(function ExpenseGroupMonth({textAlign="right"style={[{ fontWeight: 600, paddingRight: MONTH_RIGHT_PADDING },- styles.tnum+ styles.tnum,]}valueProps={{binding: rolloverBudget.groupBalance(id),- type: 'financial'+ type: 'financial',}}/></View>@@ -291,7 +291,7 @@ export const ExpenseCategoryMonth = React.memo(function ExpenseCategoryMonth({editing,onEdit,onBudgetAction,- onShowActivity+ onShowActivity,}) {let borderColor = colors.border;let balanceTooltip = useTooltip();@@ -312,14 +312,14 @@ export const ExpenseCategoryMonth = React.memo(function ExpenseCategoryMonth({cursor: 'default',margin: 1,padding: '0 4px',- borderRadius: 4+ borderRadius: 4,},{':hover': {boxShadow: 'inset 0 0 0 1px ' + colors.n7,- backgroundColor: 'white'- }- }+ backgroundColor: 'white',+ },+ },]}valueProps={{binding: rolloverBudget.catBudgeted(category.id),@@ -330,17 +330,17 @@ export const ExpenseCategoryMonth = React.memo(function ExpenseCategoryMonth({},unformatExpr: expr => {return amountToInteger(evalArithmetic(expr, 0));- }+ },}}inputProps={{onBlur: () => {onEdit(null);- }+ },}}onSave={amount => {onBudgetAction(monthIndex, 'budget-amount', {category: category.id,- amount+ amount,});}}/>@@ -360,7 +360,7 @@ export const ExpenseCategoryMonth = React.memo(function ExpenseCategoryMonth({getStyle={makeAmountGrey}style={{cursor: 'pointer',- ':hover': { textDecoration: 'underline' }+ ':hover': { textDecoration: 'underline' },}}/></span>@@ -404,11 +404,11 @@ export function IncomeGroupMonth({ group }) {textAlign="right"style={[{ fontWeight: 600, paddingRight: MONTH_RIGHT_PADDING },- styles.tnum+ styles.tnum,]}valueProps={{binding: rolloverBudget.groupIncomeReceived,- type: 'financial'+ type: 'financial',}}/></View>@@ -419,7 +419,7 @@ export function IncomeCategoryMonth({category,isLast,monthIndex,- onShowActivity+ onShowActivity,}) {return (<View style={{ flex: 1 }}>@@ -429,7 +429,7 @@ export function IncomeCategoryMonth({borderColor={colors.border}style={[{ paddingRight: MONTH_RIGHT_PADDING, textAlign: 'right' },- isLast && { borderBottomWidth: 0 }+ isLast && { borderBottomWidth: 0 },]}><span@@ -440,7 +440,7 @@ export function IncomeCategoryMonth({type="financial"style={{cursor: 'pointer',- ':hover': { textDecoration: 'underline' }+ ':hover': { textDecoration: 'underline' },}}/></span>diff --git a/packages/loot-design/src/components/budget/util.js b/packages/loot-design/src/components/budget/util.jsindex 5f26fa853d..978c5a9313 100644--- a/packages/loot-design/src/components/budget/util.js+++ b/packages/loot-design/src/components/budget/util.js@@ -9,16 +9,16 @@ export function addToBeBudgetedGroup(groups) {{id: 'to-be-budgeted',name: 'To Be Budgeted',- categories: [{ id: 'to-be-budgeted', name: 'To Be Budgeted' }]+ categories: [{ id: 'to-be-budgeted', name: 'To Be Budgeted' }],},- ...groups+ ...groups,];}export function separateGroups(categoryGroups) {return [categoryGroups.filter(g => !g.is_income),- categoryGroups.find(g => g.is_income)+ categoryGroups.find(g => g.is_income),];}@@ -41,7 +41,7 @@ export function makeAmountStyle(value) {export function makeAmountFullStyle(value) {return {- color: value < 0 ? colors.r4 : value === 0 ? colors.n10 : colors.g4+ color: value < 0 ? colors.r4 : value === 0 ? colors.n10 : colors.g4,};}diff --git a/packages/loot-design/src/components/common.js b/packages/loot-design/src/components/common.jsindex 1cf92084e4..876bd6275c 100644--- a/packages/loot-design/src/components/common.js+++ b/packages/loot-design/src/components/common.js@@ -3,7 +3,7 @@ import React, {useEffect,useLayoutEffect,useState,- useCallback+ useCallback,} from 'react';import mergeRefs from 'react-merge-refs';import ReactModal from 'react-modal';@@ -14,7 +14,7 @@ import {ListboxButton,ListboxPopover,ListboxList,- ListboxOption+ ListboxOption,} from '@reach/listbox';import { css } from 'glamor';import hotkeys from 'hotkeys-js';@@ -47,7 +47,7 @@ export const useStableCallback = callback => {const callbackRef = useRef();const memoCallback = useCallback((...args) => callbackRef.current(...args),- []+ [],);useLayoutEffect(() => {callbackRef.current = callback;@@ -79,15 +79,15 @@ export const Card = React.forwardRef(({ children, ...props }, ref) => {borderRadius: 6,backgroundColor: 'white',borderColor: colors.p3,- boxShadow: '0 1px 2px #9594A8'+ boxShadow: '0 1px 2px #9594A8',},- props.style+ props.style,]}><Viewstyle={{borderRadius: 6,- overflow: 'hidden'+ overflow: 'hidden',}}>{children}@@ -109,11 +109,11 @@ export function Link({ style, children, ...nativeProps }) {padding: 0,font: 'inherit',':hover': {- textDecoration: 'underline'- }+ textDecoration: 'underline',+ },},styles.smallText,- style+ style,)}{...nativeProps}>@@ -155,7 +155,7 @@ export const ExternalLink = React.forwardRef({children}</Button>);- }+ },);function ButtonLink_({@@ -203,13 +203,13 @@ export const Button = React.forwardRef(as = 'button',...nativeProps},- ref+ ref,) => {hoveredStyle = [bare? { backgroundColor: 'rgba(100, 100, 100, .15)' }: { ...styles.shadow },- hoveredStyle+ hoveredStyle,];activeStyle = [bare@@ -221,9 +221,9 @@ export const Button = React.forwardRef((primary? '0 1px 4px 0 rgba(0,0,0,0.3)': '0 1px 4px 0 rgba(0,0,0,0.2)'),- transition: 'none'+ transition: 'none',},- activeStyle+ activeStyle,];let Component = as;@@ -250,13 +250,13 @@ export const Button = React.forwardRef((primary ? (disabled ? colors.n7 : colors.p5) : colors.n9),color: primary ? 'white' : disabled ? colors.n6 : colors.n1,transition: 'box-shadow .25s',- ...styles.smallText+ ...styles.smallText,},{ ':hover': !disabled && hoveredStyle },{ ':active': !disabled && activeStyle },hover && hoveredStyle,pressed && activeStyle,- style+ style,];return (@@ -271,7 +271,7 @@ export const Button = React.forwardRef({children}</Component>);- }+ },);export const ButtonWithLoading = React.forwardRef((props, ref) => {@@ -290,7 +290,7 @@ export const ButtonWithLoading = React.forwardRef((props, ref) => {right: 0,bottom: 0,alignItems: 'center',- justifyContent: 'center'+ justifyContent: 'center',}}><Loading@@ -303,7 +303,7 @@ export const ButtonWithLoading = React.forwardRef((props, ref) => {style={{opacity: loading ? 0 : 1,flexDirection: 'row',- alignItems: 'center'+ alignItems: 'center',}}>{children}@@ -318,7 +318,7 @@ const defaultInputStyle = {margin: 0,padding: 5,borderRadius: 4,- border: '1px solid #d0d0d0'+ border: '1px solid #d0d0d0',};export function Input({@@ -340,12 +340,12 @@ export function Input({{':focus': {border: '1px solid ' + colors.b5,- boxShadow: '0 1px 1px ' + colors.b7+ boxShadow: '0 1px 1px ' + colors.b7,},- '::placeholder': { color: colors.n7 }+ '::placeholder': { color: colors.n7 },},styles.smallText,- style+ style,)}{...nativeProps}onKeyDown={e => {@@ -383,14 +383,14 @@ export function InputWithContent({padding: 0,flex: 1,flexDirection: 'row',- alignItems: 'center'+ alignItems: 'center',},focused && {border: '1px solid ' + colors.b5,- boxShadow: '0 1px 1px ' + colors.b7+ boxShadow: '0 1px 1px ' + colors.b7,},style,- getStyle && getStyle(focused)+ getStyle && getStyle(focused),]}>{leftContent}@@ -404,9 +404,9 @@ export function InputWithContent({border: 0,backgroundColor: 'transparent',boxShadow: 'none',- color: 'inherit'- }- }+ color: 'inherit',+ },+ },]}onFocus={e => {setFocused(true);@@ -428,7 +428,7 @@ export function Search({onChange,placeholder,isInModal,- width = 350+ width = 350,}) {return (<Input@@ -444,8 +444,8 @@ export function Search({? null: {backgroundColor: 'white',- '::placeholder': { color: colors.n8 }- }+ '::placeholder': { color: colors.n8 },+ },}}/>);@@ -466,10 +466,10 @@ export function KeyboardButton({ highlighted, children, ...props }) {elevation: 4,borderWidth: 0,paddingLeft: 17,- paddingRight: 17+ paddingRight: 17,},highlighted && { backgroundColor: colors.p6 },- props.style+ props.style,]}textStyle={[highlighted && { color: 'white' }]}>@@ -495,17 +495,17 @@ export const Select = React.forwardRef(':focus': {border: '1px solid ' + colors.b5,boxShadow: '0 1px 1px ' + colors.b7,- outline: 'none'- }+ outline: 'none',+ },},- style+ style,)}{...nativeProps}>{children}</select>);- }+ },);export function CustomSelect({ options, value, onChange, style }) {@@ -550,7 +550,7 @@ export function Menu({ header, footer, items: allItems, onMenuSelect }) {const ENTER = 13;let filteredItems = items.filter(- item => item && item !== Menu.line && item.type !== Menu.label+ item => item && item !== Menu.line && item.type !== Menu.label,);let currentIndex = filteredItems.indexOf(items[hoveredIndex]);@@ -562,7 +562,7 @@ export function Menu({ header, footer, items: allItems, onMenuSelect }) {setHoveredIndex(hoveredIndex === null? 0- : transformIndex(Math.max(currentIndex - 1, 0))+ : transformIndex(Math.max(currentIndex - 1, 0)),);break;case DOWN:@@ -571,8 +571,8 @@ export function Menu({ header, footer, items: allItems, onMenuSelect }) {hoveredIndex === null? 0: transformIndex(- Math.min(currentIndex + 1, filteredItems.length - 1)- )+ Math.min(currentIndex + 1, filteredItems.length - 1),+ ),);break;case ENTER:@@ -614,7 +614,7 @@ export function Menu({ header, footer, items: allItems, onMenuSelect }) {fontSize: 11,lineHeight: '1em',textTransform: 'uppercase',- margin: '3px 9px'+ margin: '3px 9px',}}>{item.name}@@ -638,11 +638,11 @@ export function Menu({ header, footer, items: allItems, onMenuSelect }) {? 0: -3,flexDirection: 'row',- alignItems: 'center'+ alignItems: 'center',},item.disabled && { color: colors.n7 },!item.disabled &&- hoveredIndex === idx && { backgroundColor: colors.n10 }+ hoveredIndex === idx && { backgroundColor: colors.n10 },]}onMouseEnter={() => setHoveredIndex(idx)}onMouseLeave={() => setHoveredIndex(null)}@@ -656,7 +656,7 @@ export function Menu({ header, footer, items: allItems, onMenuSelect }) {React.createElement(item.icon, {width: item.iconSize || 10,height: item.iconSize || 10,- style: { marginRight: 7, width: 10 }+ style: { marginRight: 7, width: 10 },})}</Text><Text>{item.text}</Text>@@ -685,7 +685,7 @@ export function AlignedText({const truncateStyle = {textOverflow: 'ellipsis',whiteSpace: 'nowrap',- overflow: 'hidden'+ overflow: 'hidden',};return (@@ -697,7 +697,7 @@ export function AlignedText({style={[{ marginRight: 10 },truncate === 'left' && truncateStyle,- leftStyle+ leftStyle,]}>{left}@@ -706,7 +706,7 @@ export function AlignedText({style={[{ flex: 1, textAlign: 'right' },truncate === 'right' && truncateStyle,- rightStyle+ rightStyle,]}>{right}@@ -752,7 +752,7 @@ function ModalContent({noAnimation,isCurrent,stackIndex,- children+ children,}) {let contentRef = useRef(null);let mounted = useRef(false);@@ -809,7 +809,7 @@ function ModalContent({style={[style,size && { width: size.width, height: size.height },- noAnimation && !isCurrent && { display: 'none' }+ noAnimation && !isCurrent && { display: 'none' },]}>{children}@@ -836,7 +836,7 @@ export function Modal({contentStyle,overlayStyle,children,- onClose+ onClose,}) {useEffect(() => {// This deactivates any key handlers in the "app" scope. Ideally@@ -871,7 +871,7 @@ export function Modal({backgroundColor: 'transparent',padding: 0,pointerEvents: 'auto',- ...contentStyle+ ...contentStyle,},overlay: {zIndex: 3000,@@ -885,10 +885,10 @@ export function Modal({top: 0,left: 0,right: 0,- bottom: 0+ bottom: 0,}- : {})- }+ : {}),+ },}}><ModalContent@@ -904,12 +904,12 @@ export function Modal({backgroundColor: 'white',opacity: isHidden ? 0 : 1,[`@media (min-width: ${tokens.breakpoint_narrow})`]: {- minWidth: tokens.breakpoint_narrow- }+ minWidth: tokens.breakpoint_narrow,+ },},styles.shadowLarge,style,- styles.lightScrollbar+ styles.lightScrollbar,]}>{showHeader && (@@ -917,7 +917,7 @@ export function Modal({style={{padding: 20,position: 'relative',- flexShrink: 0+ flexShrink: 0,}}>{showTitle && (@@ -930,7 +930,7 @@ export function Modal({// We need to force a width for the text-overflow// ellipses to work because we are aligning center.// This effectively gives it a padding of 20px- width: 'calc(100% - 40px)'+ width: 'calc(100% - 40px)',}}><Text@@ -939,7 +939,7 @@ export function Modal({fontWeight: 700,whiteSpace: 'nowrap',overflow: 'hidden',- textOverflow: 'ellipsis'+ textOverflow: 'ellipsis',}}>{title}@@ -954,13 +954,13 @@ export function Modal({top: 0,bottom: 0,justifyContent: 'center',- alignItems: 'center'+ alignItems: 'center',}}><Viewstyle={{flexDirection: 'row',- marginRight: 15+ marginRight: 15,}}>{showClose && (@@ -991,7 +991,7 @@ export function Modal({backgroundColor: 'rgba(255, 255, 255, .6)',alignItems: 'center',justifyContent: 'center',- zIndex: 1000+ zIndex: 1000,}}><Loading style={{ width: 20, height: 20 }} color={colors.n1} />@@ -1006,14 +1006,14 @@ export function ModalButtons({style,leftContent,focusButton = false,- children+ children,}) {let containerRef = useRef(null);useEffect(() => {if (focusButton && containerRef.current) {let button = containerRef.current.querySelector(- 'button:not([data-hidden])'+ 'button:not([data-hidden])',);if (button) {@@ -1028,9 +1028,9 @@ export function ModalButtons({style={[{flexDirection: 'row',- marginTop: 30+ marginTop: 30,},- style+ style,]}>{leftContent}@@ -1049,16 +1049,16 @@ export function InlineField({ label, labelWidth, children, width, style }) {flexDirection: 'row',alignItems: 'center',margin: '7px 0',- width+ width,},- style+ style,)}><divstyle={{width: labelWidth || 75,textAlign: 'right',- paddingRight: 10+ paddingRight: 10,}}>{label}:@@ -1164,9 +1164,9 @@ export function Label({ title, style }) {color: colors.n2,textAlign: 'right',fontSize: 12,- marginBottom: 2+ marginBottom: 2,},- style+ style,]}>{title}diff --git a/packages/loot-design/src/components/common.usage.js b/packages/loot-design/src/components/common.usage.jsindex 0aeb039475..6df1b9b9f6 100644--- a/packages/loot-design/src/components/common.usage.js+++ b/packages/loot-design/src/components/common.usage.js@@ -34,7 +34,7 @@ export default () => {setState({ modalCount: state.modalCount - 1 }),isCurrent: i === state.modalCount - 1,stackIndex: i,- parent: node+ parent: node,};modals.push(@@ -60,7 +60,7 @@ export default () => {Pop modal</Button></View>- </Modal>+ </Modal>,);}diff --git a/packages/loot-design/src/components/forms.js b/packages/loot-design/src/components/forms.jsindex 09d0a3600e..86d02bd8f6 100644--- a/packages/loot-design/src/components/forms.js+++ b/packages/loot-design/src/components/forms.js@@ -15,9 +15,9 @@ export function SectionLabel({ title, style }) {textTransform: 'uppercase',color: colors.b3,marginBottom: 5,- lineHeight: '1em'+ lineHeight: '1em',},- style+ style,]}>{title}@@ -71,8 +71,8 @@ export function Checkbox(props) {' url(\'data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="white" d="M0 11l2-2 5 5L18 3l2 2L7 18z"/></svg>\') 9px 9px',width: 9,height: 9,- content: ' '- }+ content: ' ',+ },},'&.focus-visible:focus': {'::before': {@@ -83,12 +83,12 @@ export function Checkbox(props) {right: -5,border: '2px solid ' + colors.b5,borderRadius: 6,- content: ' '- }- }- }+ content: ' ',+ },+ },+ },],- props.style+ props.style,)}/>);diff --git a/packages/loot-design/src/components/icons.usage.js b/packages/loot-design/src/components/icons.usage.jsindex b57b2915e7..4425f4580b 100644--- a/packages/loot-design/src/components/icons.usage.js+++ b/packages/loot-design/src/components/icons.usage.js@@ -29,7 +29,7 @@ export default () => {display: 'grid',gridTemplateColumns: 'repeat(6, 1fr)',gridGap: 10,- width: 500+ width: 500,}}>{Object.keys(modules).map(path => {@@ -43,7 +43,7 @@ export default () => {height: 20,display: 'flex',justifyContent: 'center',- alignItems: 'center'+ alignItems: 'center',}}><Component width={25} />diff --git a/packages/loot-design/src/components/manager/BudgetList.js b/packages/loot-design/src/components/manager/BudgetList.jsindex e0ac19568e..c603dedb83 100644--- a/packages/loot-design/src/components/manager/BudgetList.js+++ b/packages/loot-design/src/components/manager/BudgetList.js@@ -12,7 +12,7 @@ import FileDouble from '../../svg/v1/FileDouble';import CloudUnknown from '../../svg/v2/CloudUnknown';import {isDevelopmentEnvironment,- isPreviewEnvironment+ isPreviewEnvironment,} from '../../util/environment';import { View, Text, Modal, Button, Tooltip, Menu } from '../common';@@ -114,7 +114,7 @@ function FileState({ file }) {color,alignItems: 'center',flexDirection: 'row',- marginTop: 8+ marginTop: 8,}}><Icon@@ -122,7 +122,7 @@ function FileState({ file }) {style={{width: 18,height: 18,- color: 'currentColor'+ color: 'currentColor',}}/>@@ -161,9 +161,9 @@ function File({ file, onSelect, onDelete }) {flexShrink: 0,cursor: 'pointer',':hover': {- backgroundColor: colors.hover- }- }+ backgroundColor: colors.hover,+ },+ },]}><View style={{ alignItems: 'flex-start' }}>@@ -181,7 +181,7 @@ function File({ file, onSelect, onDelete }) {width: 13,height: 13,marginRight: 8,- color: file.hasKey ? colors.b5 : colors.n8+ color: file.hasKey ? colors.b5 : colors.n8,}}/>)}@@ -202,7 +202,7 @@ class BudgetTable extends React.Component {flex: 1,maxHeight: 310,overflow: 'auto',- '& *': { userSelect: 'none' }+ '& *': { userSelect: 'none' },}}>{files.map((file, idx) => (@@ -272,7 +272,7 @@ class BudgetList extends React.Component {top: 0,bottom: 0,justifyContent: 'center',- marginRight: 5+ marginRight: 5,}}><RefreshButton@@ -300,14 +300,14 @@ class BudgetList extends React.Component {flexDirection: 'row',justifyContent: 'flex-end',padding: 25,- paddingLeft: 5+ paddingLeft: 5,}}><Buttonbarestyle={{marginLeft: 10,- color: colors.n4+ color: colors.n4,}}onClick={e => {e.preventDefault();diff --git a/packages/loot-design/src/components/manager/BudgetList.usage.js b/packages/loot-design/src/components/manager/BudgetList.usage.jsindex 4f42e70968..1f7cac0b73 100644--- a/packages/loot-design/src/components/manager/BudgetList.usage.js+++ b/packages/loot-design/src/components/manager/BudgetList.usage.js@@ -13,7 +13,7 @@ const files = [{ name: 'Finances 2', id: '5', state: 'synced' },{ name: 'Finances 2', id: '6', state: 'remote' },{ name: 'Shift Reset LLC', id: '7' },- { name: 'Shift Reset LLC', id: '8', state: 'unknown' }+ { name: 'Shift Reset LLC', id: '8', state: 'unknown' },];export default () => (diff --git a/packages/loot-design/src/components/manager/DeleteFile.js b/packages/loot-design/src/components/manager/DeleteFile.jsindex 42a4038e9f..b6618d1d9e 100644--- a/packages/loot-design/src/components/manager/DeleteFile.js+++ b/packages/loot-design/src/components/manager/DeleteFile.js@@ -42,7 +42,7 @@ export default function DeleteMenu({ modalProps, actions, file }) {paddingTop: 0,paddingBottom: 25,width: 500,- lineHeight: '1.5em'+ lineHeight: '1.5em',}}>{isRemote && (@@ -62,7 +62,7 @@ export default function DeleteMenu({ modalProps, actions, file }) {border: 0,marginTop: 10,padding: '10px 30px',- fontSize: 14+ fontSize: 14,}}onClick={onDeleteCloud}>@@ -108,17 +108,17 @@ export default function DeleteMenu({ modalProps, actions, file }) {alignSelf: 'center',marginTop: 10,padding: '10px 30px',- fontSize: 14+ fontSize: 14,},isRemote? {color: colors.r4,- borderColor: colors.r4+ borderColor: colors.r4,}: {border: 0,- backgroundColor: colors.r4- }+ backgroundColor: colors.r4,+ },]}onClick={onDeleteLocal}>diff --git a/packages/loot-design/src/components/manager/DeleteFile.usage.js b/packages/loot-design/src/components/manager/DeleteFile.usage.jsindex e2410f02f4..f8c18a73e4 100644--- a/packages/loot-design/src/components/manager/DeleteFile.usage.js+++ b/packages/loot-design/src/components/manager/DeleteFile.usage.js@@ -16,7 +16,7 @@ export default () => (name: 'Finances 2',id: 'msdfmsdf',cloudFileId: 'vxsfeqw',- state: 'synced'+ state: 'synced',}}actions={{}}/>diff --git a/packages/loot-design/src/components/manager/Import.js b/packages/loot-design/src/components/manager/Import.jsindex 64933def35..bcdb8731e3 100644--- a/packages/loot-design/src/components/manager/Import.js+++ b/packages/loot-design/src/components/manager/Import.js@@ -48,7 +48,7 @@ function Import({ modalProps, actions }) {border: '1px solid ' + colors.border,borderRadius: 6,marginBottom: 10,- display: 'block'+ display: 'block',};return (@@ -98,7 +98,7 @@ function Import({ modalProps, actions }) {style={{flexDirection: 'row',marginTop: 20,- alignItems: 'center'+ alignItems: 'center',}}><View style={{ flex: 1 }} />diff --git a/packages/loot-design/src/components/manager/ImportActual.js b/packages/loot-design/src/components/manager/ImportActual.jsindex 43a8349724..6466de6a08 100644--- a/packages/loot-design/src/components/manager/ImportActual.js+++ b/packages/loot-design/src/components/manager/ImportActual.js@@ -25,7 +25,7 @@ function Import({ modalProps, availableImports }) {async function onImport() {const res = await window.Actual.openFileDialog({properties: ['openFile'],- filters: [{ name: 'actual', extensions: ['zip'] }]+ filters: [{ name: 'actual', extensions: ['zip'] }],});if (res) {setImporting(true);@@ -77,7 +77,7 @@ function Import({ modalProps, availableImports }) {style={{flexDirection: 'row',marginTop: 20,- alignItems: 'center'+ alignItems: 'center',}}><View style={{ flex: 1 }} />diff --git a/packages/loot-design/src/components/manager/ImportYNAB4.js b/packages/loot-design/src/components/manager/ImportYNAB4.jsindex 1106bca548..1c68c739ca 100644--- a/packages/loot-design/src/components/manager/ImportYNAB4.js+++ b/packages/loot-design/src/components/manager/ImportYNAB4.js@@ -23,7 +23,7 @@ function Import({ modalProps, availableImports }) {async function onImport() {const res = await window.Actual.openFileDialog({properties: ['openFile'],- filters: [{ name: 'ynab', extensions: ['zip'] }]+ filters: [{ name: 'ynab', extensions: ['zip'] }],});if (res) {setImporting(true);@@ -78,7 +78,7 @@ function Import({ modalProps, availableImports }) {style={{flexDirection: 'row',marginTop: 20,- alignItems: 'center'+ alignItems: 'center',}}><View style={{ flex: 1 }} />diff --git a/packages/loot-design/src/components/manager/ImportYNAB5.js b/packages/loot-design/src/components/manager/ImportYNAB5.jsindex bdef781bb9..d066eb044b 100644--- a/packages/loot-design/src/components/manager/ImportYNAB5.js+++ b/packages/loot-design/src/components/manager/ImportYNAB5.js@@ -11,7 +11,7 @@ import {ButtonWithLoading,Button,P,- ExternalLink+ ExternalLink,} from '../common';function getErrorMessage(error) {@@ -33,7 +33,7 @@ function Import({ modalProps, availableImports }) {async function onImport() {const res = await window.Actual.openFileDialog({properties: ['openFile'],- filters: [{ name: 'ynab', extensions: ['json'] }]+ filters: [{ name: 'ynab', extensions: ['json'] }],});if (res) {setImporting(true);@@ -96,7 +96,7 @@ function Import({ modalProps, availableImports }) {style={{flexDirection: 'row',marginTop: 20,- alignItems: 'center'+ alignItems: 'center',}}><View style={{ flex: 1 }} />diff --git a/packages/loot-design/src/components/modals/BudgetSummary.js b/packages/loot-design/src/components/modals/BudgetSummary.jsindex a231471ee6..fe1c31ce3b 100644--- a/packages/loot-design/src/components/modals/BudgetSummary.js+++ b/packages/loot-design/src/components/modals/BudgetSummary.js@@ -22,7 +22,7 @@ function BudgetSummary({ month, modalProps }) {flexDirection: 'row',justifyContent: 'center',paddingTop: 15,- paddingBottom: 15+ paddingBottom: 15,}}><View@@ -31,8 +31,8 @@ function BudgetSummary({ month, modalProps }) {{fontWeight: '600',textAlign: 'right',- marginRight: 10- }+ marginRight: 10,+ },]}><CellValue@@ -59,8 +59,8 @@ function BudgetSummary({ month, modalProps }) {{display: 'flex',flexDirection: 'column',- textAlign: 'left'- }+ textAlign: 'left',+ },]}><Text>Available Funds</Text>@@ -84,8 +84,8 @@ function BudgetSummary({ month, modalProps }) {{fontWeight: '600',fontSize: 22,- color: amount < 0 ? colors.r4 : colors.n1- }+ color: amount < 0 ? colors.r4 : colors.n1,+ },]}>{format(amount, 'financial')}@@ -100,7 +100,7 @@ function BudgetSummary({ month, modalProps }) {style={{flexDirection: 'row',justifyContent: 'center',- paddingBottom: 15+ paddingBottom: 15,}}><Button style={{ marginRight: 10 }} onClick={modalProps.onClose}>diff --git a/packages/loot-design/src/components/modals/CloseAccount.js b/packages/loot-design/src/components/modals/CloseAccount.jsindex 7767406a8a..a1e08274dc 100644--- a/packages/loot-design/src/components/modals/CloseAccount.js+++ b/packages/loot-design/src/components/modals/CloseAccount.js@@ -40,7 +40,7 @@ function CloseAccount({balance,canDelete,actions,- modalProps+ modalProps,}) {let [loading, setLoading] = useState(false);@@ -94,7 +94,7 @@ function CloseAccount({.closeAccount(account.id,values.transfer || null,- values.category || null+ values.category || null,).then(() => {modalProps.onClose();@@ -109,7 +109,7 @@ function CloseAccount({handleBlur,handleSubmit,isSubmitting,- setFieldValue+ setFieldValue,}) => (<form onSubmit={handleSubmit}>{balance !== 0 && (@@ -203,7 +203,7 @@ function CloseAccount({<Viewstyle={{flexDirection: 'row',- justifyContent: 'flex-end'+ justifyContent: 'flex-end',}}><Buttondiff --git a/packages/loot-design/src/components/modals/CloseAccount.usage.js b/packages/loot-design/src/components/modals/CloseAccount.usage.jsindex c2fdaeee47..84cc67e703 100644--- a/packages/loot-design/src/components/modals/CloseAccount.usage.js+++ b/packages/loot-design/src/components/modals/CloseAccount.usage.js@@ -12,22 +12,22 @@ const accounts = [generateAccount('Wells Fargo', null, null, false),generateAccount('Ally', null, null, false),generateAccount('Savings', null, null, true),- generateAccount('Another', null, null, true)+ generateAccount('Another', null, null, true),];const categoryGroups = generateCategoryGroups([{name: 'Investments and Savings',- categories: [{ name: 'Savings' }]+ categories: [{ name: 'Savings' }],},{name: 'Usual Expenses',- categories: [{ name: 'Food' }, { name: 'General' }, { name: 'Home' }]+ categories: [{ name: 'Food' }, { name: 'General' }, { name: 'Home' }],},{name: 'Projects',- categories: [{ name: 'Big Projects' }, { name: 'Shed' }]- }+ categories: [{ name: 'Big Projects' }, { name: 'Shed' }],+ },]);export default () => (diff --git a/packages/loot-design/src/components/modals/ConfigureLinkedAccounts.js b/packages/loot-design/src/components/modals/ConfigureLinkedAccounts.jsindex 3342ac08f3..d829175eee 100644--- a/packages/loot-design/src/components/modals/ConfigureLinkedAccounts.js+++ b/packages/loot-design/src/components/modals/ConfigureLinkedAccounts.js@@ -3,7 +3,7 @@ import React, { useState } from 'react';import {fromPlaidAccountType,determineOffBudget,- prettyAccountType+ prettyAccountType,} from 'loot-core/src/shared/accounts';import Checkmark from 'loot-design/src/svg/v1/Checkmark';@@ -19,7 +19,7 @@ function Account({ account, offbudget, onSelect }) {<Viewstyle={[{ marginBottom: 8, flexShrink: 0, userSelect: 'none' },- styles.mediumText+ styles.mediumText,]}onClick={onSelect}>@@ -34,8 +34,8 @@ function Account({ account, offbudget, onSelect }) {borderRadius: 4,flexDirection: 'row',alignItems: 'center',- border: '1px solid ' + colors.n10- }+ border: '1px solid ' + colors.n10,+ },]}><View style={{ flex: 1 }}>@@ -44,11 +44,11 @@ function Account({ account, offbudget, onSelect }) {style={{fontSize: 13,color: colors.n5,- flexDirection: 'row'+ flexDirection: 'row',}}>{prettyAccountType(- fromPlaidAccountType(account.type, account.subtype)+ fromPlaidAccountType(account.type, account.subtype),)}<Text style={{ marginLeft: 4 }}>...@@ -76,12 +76,12 @@ export default function ConfigureLinkedAccounts({upgradingId,modalProps,accounts,- actions+ actions,}) {let [offbudgetAccounts, setOffbudgetAccounts] = useState(() =>accounts.filter(acct => determineOffBudget(fromPlaidAccountType(acct.type)))- .map(acct => acct.id)+ .map(acct => acct.id),);function toggleAccount(id) {@@ -97,7 +97,7 @@ export default function ConfigureLinkedAccounts({institution,publicToken,accounts.map(acct => acct.id),- offbudgetAccounts+ offbudgetAccounts,);actions.closeModal();@@ -131,7 +131,7 @@ export default function ConfigureLinkedAccounts({paddingLeft: 5,paddingRight: 5,marginLeft: -5,- marginRight: -5+ marginRight: -5,}}><View>@@ -158,7 +158,7 @@ export default function ConfigureLinkedAccounts({style={{flexDirection: 'row',justifyContent: 'flex-end',- marginTop: 30+ marginTop: 30,}}><Button style={{ marginRight: 10 }} onClick={modalProps.onBack}>diff --git a/packages/loot-design/src/components/modals/ConfigureLinkedAccounts.usage.js b/packages/loot-design/src/components/modals/ConfigureLinkedAccounts.usage.jsindex e5b70b07ef..8788ffdfee 100644--- a/packages/loot-design/src/components/modals/ConfigureLinkedAccounts.usage.js+++ b/packages/loot-design/src/components/modals/ConfigureLinkedAccounts.usage.js@@ -12,44 +12,44 @@ export default () => (<ConfigureLinkedAccountsmodalProps={{isCurrent: true,- parent: node+ parent: node,}}accounts={[{id: '1',name: 'Bank of America',- mask: '1111'+ mask: '1111',},{id: '2',name: 'Wells Fargo',- mask: '2222'+ mask: '2222',},{id: '3',name: 'Wells Fargo',- mask: '3333'+ mask: '3333',},{id: '4',name: 'Wells Fargo',- mask: '4444'+ mask: '4444',},{id: '5',name: 'Wells Fargo',- mask: '5555'+ mask: '5555',},{id: '6',name: 'Wells Fargo',- mask: '6666'+ mask: '6666',},{id: '7',name: 'Wells Fargo',- mask: '7777'- }+ mask: '7777',+ },]}/>)}diff --git a/packages/loot-design/src/components/modals/CreateLocalAccount.js b/packages/loot-design/src/components/modals/CreateLocalAccount.jsindex 734420a14e..73018b77b7 100644--- a/packages/loot-design/src/components/modals/CreateLocalAccount.js+++ b/packages/loot-design/src/components/modals/CreateLocalAccount.js@@ -14,7 +14,7 @@ import {Select,InlineField,FormError,- InitialFocus+ InitialFocus,} from '../common';function CreateLocalAccount({ modalProps, actions, history }) {@@ -27,7 +27,7 @@ function CreateLocalAccount({ modalProps, actions, history }) {initialValues={{name: '',type: 'checking',- balance: '0'+ balance: '0',}}validate={() => ({})}onSubmit={async (values, { setErrors }) => {@@ -49,7 +49,7 @@ function CreateLocalAccount({ modalProps, actions, history }) {values.name,values.type,toRelaxedNumber(values.balance),- values.offbudget+ values.offbudget,);history.push('/accounts/' + id);}@@ -62,7 +62,7 @@ function CreateLocalAccount({ modalProps, actions, history }) {handleBlur,handleSubmit,isSubmitting,- setFieldValue+ setFieldValue,}) => (<form onSubmit={handleSubmit}><InlineField label="Name" width="75%">@@ -89,7 +89,7 @@ function CreateLocalAccount({ modalProps, actions, history }) {onChange={e => {setFieldValue('offbudget',- determineOffBudget(e.target.value)+ determineOffBudget(e.target.value),);handleChange(e);}}@@ -114,7 +114,7 @@ function CreateLocalAccount({ modalProps, actions, history }) {style={{width: '75%',flexDirection: 'row',- justifyContent: 'flex-end'+ justifyContent: 'flex-end',}}><label style={{ userSelect: 'none' }}>diff --git a/packages/loot-design/src/components/modals/EditField.js b/packages/loot-design/src/components/modals/EditField.jsindex 992aa4aca3..6cc252305c 100644--- a/packages/loot-design/src/components/modals/EditField.js+++ b/packages/loot-design/src/components/modals/EditField.js@@ -25,7 +25,7 @@ function EditField({payees,onSubmit,dateFormat,- createPayee+ createPayee,}) {function onSelect(value) {// Process the value if needed@@ -41,7 +41,7 @@ function EditField({let inputStyle = { ':focus': { boxShadow: 0 } };let autocompleteProps = {inputProps: { style: inputStyle },- containerProps: { style: { height: 275 } }+ containerProps: { style: { height: 275 } },};switch (name) {@@ -159,9 +159,9 @@ function EditField({flex: 0,padding: '15px 10px',backgroundColor: colors.n1,- color: 'white'+ color: 'white',},- minWidth && { minWidth }+ minWidth && { minWidth },]}>{() => (@@ -171,7 +171,7 @@ function EditField({style={{alignSelf: 'center',color: colors.b10,- marginBottom: 10+ marginBottom: 10,}}/><View style={{ flex: 1 }}>{editor}</View>@@ -186,7 +186,7 @@ export default connect(dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy',categoryGroups: state.queries.categories.grouped,accounts: state.queries.accounts,- payees: state.queries.payees+ payees: state.queries.payees,}),- actions+ actions,)(EditField);diff --git a/packages/loot-design/src/components/modals/ImportTransactions.js b/packages/loot-design/src/components/modals/ImportTransactions.jsindex 9bd419aa73..290c1139bb 100644--- a/packages/loot-design/src/components/modals/ImportTransactions.js+++ b/packages/loot-design/src/components/modals/ImportTransactions.js@@ -8,7 +8,7 @@ import { format as formatDate_ } from 'loot-core/src/shared/months';import {amountToCurrency,amountToInteger,- looselyParseAmount+ looselyParseAmount,} from 'loot-core/src/shared/util';import { colors, styles } from '../../style';@@ -19,7 +19,7 @@ import {Modal,Select,Button,- ButtonWithLoading+ ButtonWithLoading,} from '../common';import { Checkbox, SectionLabel } from '../forms';import { TableHeader, TableWithNavigator, Row, Field } from '../table';@@ -30,7 +30,7 @@ let dateFormats = [{ format: 'mm dd yyyy', label: 'MM DD YYYY' },{ format: 'mm dd yy', label: 'MM DD YY' },{ format: 'dd mm yyyy', label: 'DD MM YYYY' },- { format: 'dd mm yy', label: 'DD MM YY' }+ { format: 'dd mm yy', label: 'DD MM YY' },];export function parseDate(str, order) {@@ -116,7 +116,7 @@ function ParsedDate({ parseDateFormat, showParsed, dateFormat, date }) {date &&formatDate(parseDateFormat ? parseDate(date, parseDateFormat) : date,- dateFormat+ dateFormat,);return (<Text>@@ -162,30 +162,30 @@ function getInitialMappings(transactions) {let dateField = key(fields.find(([name, value]) => name.toLowerCase().includes('date')) ||- fields.find(([name, value]) => value.match(/^\d+[-/]\d+[-/]\d+$/))+ fields.find(([name, value]) => value.match(/^\d+[-/]\d+[-/]\d+$/)),);let amountField = key(fields.find(([name, value]) => name.toLowerCase().includes('amount')) ||- fields.find(([name, value]) => value.match(/^-?[.,\d]+$/))+ fields.find(([name, value]) => value.match(/^-?[.,\d]+$/)),);let payeeField = key(- fields.find(([name, value]) => name !== dateField && name !== amountField)+ fields.find(([name, value]) => name !== dateField && name !== amountField),);let notesField = key(fields.find(([name, value]) =>- name !== dateField && name !== amountField && name !== payeeField- )+ name !== dateField && name !== amountField && name !== payeeField,+ ),);return {date: dateField,amount: amountField,payee: payeeField,- notes: notesField+ notes: notesField,};}@@ -221,13 +221,13 @@ function parseAmountFields(trans, splitMode, flipAmount) {return {amount: outflow || inflow,outflow,- inflow+ inflow,};}return {amount: parseAmount(trans.amount, n => (flipAmount ? n * -1 : n)),outflow: null,- inflow: null+ inflow: null,};}@@ -238,20 +238,20 @@ function Transaction({parseDateFormat,dateFormat,splitMode,- flipAmount+ flipAmount,}) {let transaction = useMemo(() =>fieldMappings? applyFieldMappings(rawTransaction, fieldMappings): rawTransaction,- [rawTransaction, fieldMappings]+ [rawTransaction, fieldMappings],);let { amount, outflow, inflow } = parseAmountFields(transaction,splitMode,- flipAmount+ flipAmount,);amount = amountToCurrency(amount);outflow = amountToCurrency(outflow);@@ -342,7 +342,7 @@ function DateFormatSelect({transactions,fieldMappings,parseDateFormat,- onChange+ onChange,}) {// We don't actually care about the delimiter, but we try to render// it based on the data we have so far. Look in a transaction and@@ -379,7 +379,7 @@ function FlipAmountOption({ value, disabled, onChange }) {flex: 1,flexDirection: 'row',alignItems: 'center',- userSelect: 'none'+ userSelect: 'none',}}><Checkbox@@ -405,7 +405,7 @@ function SplitOption({ value, onChange }) {flex: 1,flexDirection: 'row',alignItems: 'center',- userSelect: 'none'+ userSelect: 'none',}}><Checkbox id="form_split" checked={value} onChange={onChange} />@@ -508,7 +508,7 @@ export function ImportTransactions({parseTransactions,importTransactions,getPayees,- savePrefs+ savePrefs,}) {let [loadingState, setLoadingState] = useState('parsing');let [error, setError] = useState(null);@@ -526,7 +526,7 @@ export function ImportTransactions({// parsed different files without closing the modal, it wouldn't// re-read this.let [csvDelimiter, setCsvDelimiter] = useState(- prefs[`csv-delimiter-${accountId}`] || ','+ prefs[`csv-delimiter-${accountId}`] || ',',);let [parseDateFormat, setParseDateFormat] = useState(null);@@ -542,7 +542,7 @@ export function ImportTransactions({if (errors.length > 0) {setError({parsed: true,- message: errors[0].message || 'Internal error'+ message: errors[0].message || 'Internal error',});} else {let filetype = getFileType(filename);@@ -567,12 +567,12 @@ export function ImportTransactions({setParseDateFormat(prefs[`parse-date-${accountId}-${filetype}`] ||- getInitialDateFormat(transactions, mappings)+ getInitialDateFormat(transactions, mappings),);} else if (filetype === 'qif') {setParseDateFormat(prefs[`parse-date-${accountId}-${filetype}`] ||- getInitialDateFormat(transactions, { date: 'date' })+ getInitialDateFormat(transactions, { date: 'date' }),);} else {setFieldMappings(null);@@ -591,7 +591,7 @@ export function ImportTransactions({options.filename,getFileType(options.filename) === 'csv'? { delimiter: csvDelimiter }- : null+ : null,);}, [parseTransactions, options.filename]);@@ -611,12 +611,12 @@ export function ImportTransactions({? {amount: null,outflow: mappings.amount,- inflow: null+ inflow: null,}: {amount: mappings.amount,outflow: null,- inflow: null+ inflow: null,};setFieldMappings({ ...fieldMappings, ...newFieldMappings });}@@ -624,13 +624,13 @@ export function ImportTransactions({function onNewFile() {const res = window.Actual.openFileDialog({filters: [- { name: 'Financial Files', extensions: ['qif', 'ofx', 'qfx', 'csv'] }- ]+ { name: 'Financial Files', extensions: ['qif', 'ofx', 'qfx', 'csv'] },+ ],});parse(res[0],- getFileType(res[0]) === 'csv' ? { delimiter: csvDelimiter } : null+ getFileType(res[0]) === 'csv' ? { delimiter: csvDelimiter } : null,);}@@ -668,7 +668,7 @@ export function ImportTransactions({finalTransactions.push({...finalTransaction,date,- amount: amountToInteger(amount)+ amount: amountToInteger(amount),});}@@ -685,7 +685,7 @@ export function ImportTransactions({if (filetype === 'csv') {savePrefs({- [`csv-mappings-${accountId}`]: JSON.stringify(fieldMappings)+ [`csv-mappings-${accountId}`]: JSON.stringify(fieldMappings),});savePrefs({ [`csv-delimiter-${accountId}`]: csvDelimiter });}@@ -709,7 +709,7 @@ export function ImportTransactions({let headers = [{ name: 'Date', width: 200 },{ name: 'Payee', width: 'flex' },- { name: 'Notes', width: 'flex' }+ { name: 'Notes', width: 'flex' },];if (splitMode) {@@ -740,7 +740,7 @@ export function ImportTransactions({style={{flex: 'unset',height: 300,- border: '1px solid ' + colors.border+ border: '1px solid ' + colors.border,}}><TableHeader headers={headers} />@@ -757,7 +757,7 @@ export function ImportTransactions({textAlign: 'center',marginTop: 25,color: colors.n4,- fontStyle: 'italic'+ fontStyle: 'italic',}}>No transactions found@@ -785,7 +785,7 @@ export function ImportTransactions({style={{color: colors.r4,alignItems: 'center',- marginTop: 10+ marginTop: 10,}}><Text style={{ maxWidth: 450, marginBottom: 15 }}>@@ -860,7 +860,7 @@ export function ImportTransactions({style={{alignSelf: 'flex-end',flexDirection: 'row',- alignItems: 'center'+ alignItems: 'center',}}><ButtonWithLoading@@ -880,7 +880,7 @@ export function ImportTransactions({export default connect(state => ({dateFormat: state.prefs.local.dateFormat || 'MM/dd/yyyy',- prefs: state.prefs.local+ prefs: state.prefs.local,}),- actions+ actions,)(ImportTransactions);diff --git a/packages/loot-design/src/components/modals/ImportTransactions.test.js b/packages/loot-design/src/components/modals/ImportTransactions.test.jsindex bb502ae4a2..3283df1aee 100644--- a/packages/loot-design/src/components/modals/ImportTransactions.test.js+++ b/packages/loot-design/src/components/modals/ImportTransactions.test.js@@ -27,7 +27,7 @@ describe('Import transactions', function () {{ str: '11 31 2020', order: 'mm dd yyyy' },{ str: '2046 31 2020', order: 'mm dd yyyy' },{ str: '2011 31 2020', order: 'mm dd yy' },- { str: '2020', order: 'mm dd yy' }+ { str: '2020', order: 'mm dd yy' },];for (const { str, order } of invalidInputs) {@@ -46,8 +46,8 @@ describe('Import transactions', function () {'2020/12/24',' 2020 / 12 / 24','2020/12/24 ',- '2020 12-24 '- ]+ '2020 12-24 ',+ ],},{order: 'yy mm dd',@@ -58,8 +58,8 @@ describe('Import transactions', function () {'20/12/24','20/12/24','20/12/24 ',- '20 12-24 '- ]+ '20 12-24 ',+ ],},{order: 'mm dd yyyy',@@ -70,8 +70,8 @@ describe('Import transactions', function () {'12/24/2020',' 12/24/2020','12/24/2020',- '12 24-2020'- ]+ '12 24-2020',+ ],},{order: 'mm dd yy',@@ -82,8 +82,8 @@ describe('Import transactions', function () {'12/24/20',' 12/24/20','12/24/20',- '12 24-20'- ]+ '12 24-20',+ ],},{order: 'dd mm yyyy',@@ -94,8 +94,8 @@ describe('Import transactions', function () {'24/12/2020',' 24/12/2020','24/12/2020 ',- '24-12 2020'- ]+ '24-12 2020',+ ],},{order: 'dd mm yy',@@ -106,9 +106,9 @@ describe('Import transactions', function () {'24/12/20',' 24/12/20','24/12/20 ',- '24 12-20 '- ]- }+ '24 12-20 ',+ ],+ },];for (const { order, cases } of validInputs) {diff --git a/packages/loot-design/src/components/modals/ImportTransactions.usage.js b/packages/loot-design/src/components/modals/ImportTransactions.usage.jsindex 4fe61efc3b..c928e14112 100644--- a/packages/loot-design/src/components/modals/ImportTransactions.usage.js+++ b/packages/loot-design/src/components/modals/ImportTransactions.usage.js@@ -15,7 +15,7 @@ transactions = transactions.map(trans => ({date: trans.date,payee: trans.description,imported_payee: trans.description,- notes: trans.notes+ notes: trans.notes,}));export default () => (@@ -29,7 +29,7 @@ export default () => (options={{ filename: 'file.csv' }}parseTransactions={filename => ({errors: [],- transactions+ transactions,})}prefs={{}}/>diff --git a/packages/loot-design/src/components/modals/LoadBackup.js b/packages/loot-design/src/components/modals/LoadBackup.jsindex a325001ef3..d060ca082b 100644--- a/packages/loot-design/src/components/modals/LoadBackup.js+++ b/packages/loot-design/src/components/modals/LoadBackup.js@@ -46,7 +46,7 @@ function LoadBackup({backups,backupDisabled,actions,- modalProps+ modalProps,}) {const latestBackup = backups.find(backup => backup.isLatest);const previousBackups = backups.filter(backup => !backup.isLatest);@@ -60,7 +60,7 @@ function LoadBackup({margin: 20,marginTop: 0,marginBottom: 15,- lineHeight: 1.5+ lineHeight: 1.5,}}>{latestBackup ? (diff --git a/packages/loot-design/src/components/modals/LoadBackup.usage.js b/packages/loot-design/src/components/modals/LoadBackup.usage.jsindex b1c5403f8b..911fef1b7b 100644--- a/packages/loot-design/src/components/modals/LoadBackup.usage.js+++ b/packages/loot-design/src/components/modals/LoadBackup.usage.js@@ -8,7 +8,7 @@ import LoadBackup from './LoadBackup';const backups = [{ date: 'December 23, 2017 4:08 PM', id: 'sdflkj23' },{ date: 'January 21, 2018 4:20 PM', id: 'ds10dsm23rlk' },- { date: 'February 22, 2018 3:54 PM', id: 'k3dsjndlwe' }+ { date: 'February 22, 2018 3:54 PM', id: 'k3dsjndlwe' },];export default () => (diff --git a/packages/loot-design/src/components/modals/PlaidExternalMsg.js b/packages/loot-design/src/components/modals/PlaidExternalMsg.jsindex 25f124a145..c2cbdf68d1 100644--- a/packages/loot-design/src/components/modals/PlaidExternalMsg.js+++ b/packages/loot-design/src/components/modals/PlaidExternalMsg.js@@ -19,7 +19,7 @@ export default function PlaidExternalMsg({modalProps,onMoveExternal,onSuccess,- onClose: originalOnClose+ onClose: originalOnClose,}) {let [waiting, setWaiting] = useState(null);let [success, setSuccess] = useState(false);@@ -92,7 +92,7 @@ export default function PlaidExternalMsg({fontWeight: 600,marginTop: 10,backgroundColor: colors.g4,- borderColor: colors.g4+ borderColor: colors.g4,}}onClick={onContinue}>@@ -105,7 +105,7 @@ export default function PlaidExternalMsg({padding: '10px 0',fontSize: 15,fontWeight: 600,- marginTop: 10+ marginTop: 10,}}onClick={onJump}>@@ -123,8 +123,8 @@ export default function PlaidExternalMsg({color: colors.n5,fontSize: 13,'& a, & a:visited': {- color: colors.n5- }+ color: colors.n5,+ },}}>Typing your bank{"'"}s username and password is one of the mostdiff --git a/packages/loot-design/src/components/modals/PlaidExternalMsg.usage.js b/packages/loot-design/src/components/modals/PlaidExternalMsg.usage.jsindex 7a138258e4..a288ff677d 100644--- a/packages/loot-design/src/components/modals/PlaidExternalMsg.usage.js+++ b/packages/loot-design/src/components/modals/PlaidExternalMsg.usage.js@@ -12,7 +12,7 @@ export default () => (<PlaidExternalMsgmodalProps={{isCurrent: true,- parent: node+ parent: node,}}/>)}diff --git a/packages/loot-design/src/components/modals/SelectLinkedAccounts.js b/packages/loot-design/src/components/modals/SelectLinkedAccounts.jsindex 3522d4eb53..625409ca1f 100644--- a/packages/loot-design/src/components/modals/SelectLinkedAccounts.js+++ b/packages/loot-design/src/components/modals/SelectLinkedAccounts.js@@ -2,14 +2,14 @@ import React, { useState } from 'react';import {fromPlaidAccountType,- prettyAccountType+ prettyAccountType,} from 'loot-core/src/shared/accounts';import { styles, colors } from '../../style';import { View, Text, Modal, P, Button } from '../common';let selectedStyle = {- color: colors.n1+ color: colors.n1,};function EmptyMessage() {@@ -21,7 +21,7 @@ function Account({ account, selected, onSelect }) {<Viewstyle={[{ marginBottom: 8, flexShrink: 0, userSelect: 'none' },- styles.mediumText+ styles.mediumText,]}onClick={onSelect}>@@ -37,13 +37,13 @@ function Account({ account, selected, onSelect }) {flexDirection: 'row',alignItems: 'center',border: '1px solid ' + colors.n10,- ':hover': selectedStyle+ ':hover': selectedStyle,},selected && {...selectedStyle,borderColor: colors.b9,- backgroundColor: colors.b10- }+ backgroundColor: colors.b10,+ },]}><View>@@ -52,11 +52,11 @@ function Account({ account, selected, onSelect }) {style={{fontSize: 13,color: colors.n5,- flexDirection: 'row'+ flexDirection: 'row',}}>{prettyAccountType(- fromPlaidAccountType(account.type, account.subtype)+ fromPlaidAccountType(account.type, account.subtype),)}<Text style={{ marginLeft: 4 }}>...@@ -75,7 +75,7 @@ export default function SelectLinkedAccounts({upgradingId,modalProps,accounts,- actions+ actions,}) {let [selectedAccounts, setSelectedAccounts] = useState([]);@@ -98,7 +98,7 @@ export default function SelectLinkedAccounts({institution,publicToken,selectedAccounts[0],- upgradingId+ upgradingId,);actions.closeModal();} else {@@ -106,8 +106,8 @@ export default function SelectLinkedAccounts({institution,publicToken,accounts: selectedAccounts.map(id =>- accounts.find(acct => acct.id === id)- )+ accounts.find(acct => acct.id === id),+ ),});}}@@ -140,7 +140,7 @@ export default function SelectLinkedAccounts({paddingLeft: 5,paddingRight: 5,marginLeft: -5,- marginRight: -5+ marginRight: -5,}}><View>@@ -167,7 +167,7 @@ export default function SelectLinkedAccounts({style={{flexDirection: 'row',justifyContent: 'flex-end',- marginTop: 30+ marginTop: 30,}}><Button style={{ marginRight: 10 }} onClick={modalProps.onClose}>diff --git a/packages/loot-design/src/components/modals/SelectLinkedAccounts.usage.js b/packages/loot-design/src/components/modals/SelectLinkedAccounts.usage.jsindex fe3d4e2f35..2e56a6cd44 100644--- a/packages/loot-design/src/components/modals/SelectLinkedAccounts.usage.js+++ b/packages/loot-design/src/components/modals/SelectLinkedAccounts.usage.js@@ -12,44 +12,44 @@ export default () => (<SelectLinkedAccountsmodalProps={{isCurrent: true,- parent: node+ parent: node,}}accounts={[{id: '1',name: 'Bank of America',- mask: '1111'+ mask: '1111',},{id: '2',name: 'Wells Fargo',- mask: '2222'+ mask: '2222',},{id: '3',name: 'Wells Fargo',- mask: '3333'+ mask: '3333',},{id: '4',name: 'Wells Fargo',- mask: '4444'+ mask: '4444',},{id: '5',name: 'Wells Fargo',- mask: '5555'+ mask: '5555',},{id: '6',name: 'Wells Fargo',- mask: '6666'+ mask: '6666',},{id: '7',name: 'Wells Fargo',- mask: '7777'- }+ mask: '7777',+ },]}/>)}diff --git a/packages/loot-design/src/components/payees.js b/packages/loot-design/src/components/payees.jsindex 69edf68833..f964d308c8 100644--- a/packages/loot-design/src/components/payees.js+++ b/packages/loot-design/src/components/payees.js@@ -5,7 +5,7 @@ import React, {useRef,useMemo,useCallback,- useImperativeHandle+ useImperativeHandle,} from 'react';import Component from '@reactions/component';@@ -26,7 +26,7 @@ import {Input,Button,Tooltip,- Menu+ Menu,} from './common';import {Table,@@ -36,12 +36,12 @@ import {InputCell,SelectCell,CellButton,- useTableNavigator+ useTableNavigator,} from './table';import useSelected, {SelectedProvider,useSelectedItems,- useSelectedDispatch+ useSelectedDispatch,} from './useSelected';let getPayeesById = memoizeOne(payees => groupById(payees));@@ -66,7 +66,7 @@ function RuleButton({ ruleCount, focused, onEdit, onClick }) {backgroundColor: colors.g9,border: '1px solid ' + colors.g9,color: colors.g1,- fontSize: 12+ fontSize: 12,}}onEdit={onEdit}onSelect={onClick}@@ -103,7 +103,7 @@ let Payee = React.memo(onHover,onEdit,onUpdate,- ruleActions+ ruleActions,}) => {let { id } = payee;let dispatchSelected = useSelectedDispatch();@@ -121,12 +121,12 @@ let Payee = React.memo({ alignItems: 'stretch' },style,{- backgroundColor: hovered ? colors.hover : null+ backgroundColor: hovered ? colors.hover : null,},selected && {backgroundColor: colors.b9,- zIndex: 100- }+ zIndex: 100,+ },]}data-focus-key={payee.id}onMouseEnter={() => onHover && onHover(payee.id)}@@ -162,7 +162,7 @@ let Payee = React.memo(/></Row>);- }+ },);const PayeeTable = React.forwardRef(@@ -176,9 +176,9 @@ const PayeeTable = React.forwardRef(ruleActions,onUpdate,onViewRules,- onCreateRule+ onCreateRule,},- ref+ ref,) => {let [hovered, setHovered] = useState(null);let selectedItems = useSelectedItems();@@ -221,7 +221,7 @@ const PayeeTable = React.forwardRef(/></View>);- }+ },);function PayeeTableHeader() {@@ -237,7 +237,7 @@ function PayeeTableHeader() {backgroundColor: 'white',color: colors.n4,zIndex: 200,- userSelect: 'none'+ userSelect: 'none',}}collapsed={true}version="v2"@@ -263,9 +263,9 @@ function EmptyMessage({ text, style }) {color: colors.n7,fontStyle: 'italic',fontSize: 13,- marginTop: 5+ marginTop: 5,},- style+ style,]}>{text}@@ -276,7 +276,7 @@ function EmptyMessage({ text, style }) {function PayeeMenu({ payeesById, selectedPayees, onDelete, onMerge, onClose }) {// Transfer accounts are never editablelet isDisabled = [...selectedPayees].some(- id => payeesById[id] == null || payeesById[id].transfer_acct+ id => payeesById[id] == null || payeesById[id].transfer_acct,);return (@@ -305,7 +305,7 @@ function PayeeMenu({ payeesById, selectedPayees, onDelete, onMerge, onClose }) {padding: 3,fontSize: 11,fontStyle: 'italic',- color: colors.n7+ color: colors.n7,}}>{[...selectedPayees]@@ -319,16 +319,16 @@ function PayeeMenu({ payeesById, selectedPayees, onDelete, onMerge, onClose }) {icon: Delete,name: 'delete',text: 'Delete',- disabled: isDisabled+ disabled: isDisabled,},{icon: Merge,iconSize: 9,name: 'merge',text: 'Merge',- disabled: isDisabled || selectedPayees.size < 2+ disabled: isDisabled || selectedPayees.size < 2,},- Menu.line+ Menu.line,]}/></Tooltip>@@ -350,7 +350,7 @@ export const ManagePayees = React.forwardRef(onCreateRule,...props},- ref+ ref,) => {let [highlightedRows, setHighlightedRows] = useState(null);let [filter, setFilter] = useState('');@@ -363,9 +363,9 @@ export const ManagePayees = React.forwardRef(filter === ''? payees: payees.filter(p =>- p.name.toLowerCase().includes(filter.toLowerCase())+ p.name.toLowerCase().includes(filter.toLowerCase()),),- [payees, filter]+ [payees, filter],);let selected = useSelected('payees', filteredPayees, initialSelectedIds);@@ -410,7 +410,7 @@ export const ManagePayees = React.forwardRef(tableNavigator.onEdit(null);setHighlightedRows(new Set([id]));_scrollTo(id);- }+ },}));// `highlightedRows` should only ever be true once, and we@@ -466,7 +466,7 @@ export const ManagePayees = React.forwardRef(return true;}}),- tableNavigatorOpts+ tableNavigatorOpts,);let payeesById = getPayeesById(payees);@@ -477,7 +477,7 @@ export const ManagePayees = React.forwardRef(style={{flexDirection: 'row',alignItems: 'center',- padding: '0 10px 5px'+ padding: '0 10px 5px',}}><Component initialState={{ menuOpen: false }}>@@ -522,8 +522,8 @@ export const ManagePayees = React.forwardRef(backgroundColor: colors.n11,':focus': {backgroundColor: 'white',- '::placeholder': { color: colors.n8 }- }+ '::placeholder': { color: colors.n8 },+ },}}/></View>@@ -534,7 +534,7 @@ export const ManagePayees = React.forwardRef(flex: 1,border: '1px solid ' + colors.border,borderRadius: 4,- overflow: 'hidden'+ overflow: 'hidden',}}><PayeeTableHeader />@@ -557,5 +557,5 @@ export const ManagePayees = React.forwardRef(</SelectedProvider></View>);- }+ },);diff --git a/packages/loot-design/src/components/payees.usage.js b/packages/loot-design/src/components/payees.usage.jsindex 252826d016..6489f44173 100644--- a/packages/loot-design/src/components/payees.usage.js+++ b/packages/loot-design/src/components/payees.usage.js@@ -15,7 +15,7 @@ let categoryGroups = [name: 'Investments and Savings',is_income: 0,sort_order: 1,- categories: [{ id: 'savings', name: 'Savings' }]+ categories: [{ id: 'savings', name: 'Savings' }],},{id: 'usual',@@ -25,17 +25,17 @@ let categoryGroups = [categories: [{ id: 'food', name: 'Food' },{ id: 'general', name: 'General' },- { id: 'home', name: 'Home' }- ]+ { id: 'home', name: 'Home' },+ ],},{id: 'projects',name: 'Projects',categories: [{ id: 'big', name: 'Big Projects' },- { id: 'shed', name: 'Shed' }- ]- }+ { id: 'shed', name: 'Shed' },+ ],+ },];let payees = [@@ -44,7 +44,7 @@ let payees = [id: 'two',name: 'Lowes',category: categoryGroups[1].categories[1].id,- ruleCount: 1+ ruleCount: 1,},{ id: 'three', name: 'Publix', ruleCount: 1 },{ id: 'four', name: 'Verizon', ruleCount: 3 },@@ -67,7 +67,7 @@ let payees = [{ id: 'sixxx1', name: 'Aldi', ruleCount: 1 },{ id: 'five', name: 'T-Mobile', transfer_acct: 'one', ruleCount: 5 },{ id: 'six', name: 'Google', transfer_acct: 'one', ruleCount: 1 },- { id: 'seven', name: 'Sentry', transfer_acct: 'one', ruleCount: 1 }+ { id: 'seven', name: 'Sentry', transfer_acct: 'one', ruleCount: 1 },];for (let i = 0; i < 4; i++) {@@ -76,7 +76,7 @@ for (let i = 0; i < 4; i++) {let defaultRules = [{ id: '1', type: 'equals', value: 'target' },- { id: '2', type: 'contains', value: 'targ#' }+ { id: '2', type: 'contains', value: 'targ#' },];export default () => (@@ -96,13 +96,13 @@ export default () => (modalProps={{isCurrent: state.isCurrent,parent: node,- onClose: () => setState({ isCurrent: true })+ onClose: () => setState({ isCurrent: true }),}}payees={state.payees}ruleCounts={new Map([['three', 1],- ['tw', 3]+ ['tw', 3],])}categoryGroups={categoryGroups}@@ -119,7 +119,7 @@ export default () => (addRule: rule => {return { ...rule, id: Math.random().toString() };},- listenForUndo: () => {}+ listenForUndo: () => {},}}/>);diff --git a/packages/loot-design/src/components/sidebar.js b/packages/loot-design/src/components/sidebar.jsindex bf7d48010f..bf9002fedd 100644--- a/packages/loot-design/src/components/sidebar.js+++ b/packages/loot-design/src/components/sidebar.js@@ -24,7 +24,7 @@ import {AlignedText,AnchorLink,ButtonLink,- Button+ Button,} from './common';import { useDraggable, useDroppable, DropHighlight } from './sort.js';import CellValue from './spreadsheet/CellValue';@@ -44,15 +44,15 @@ function Item({onClick,button,forceHover = false,- forceActive = false+ forceActive = false,}) {const hoverStyle = {- backgroundColor: colors.n2+ backgroundColor: colors.n2,};const activeStyle = {borderLeft: '4px solid ' + colors.p8,paddingLeft: 19 + indent - 4,- color: colors.p8+ color: colors.p8,};const linkStyle = [{@@ -64,9 +64,9 @@ function Item({textDecoration: 'none',color: colors.n9,...(forceHover ? hoverStyle : {}),- ...(forceActive ? activeStyle : {})+ ...(forceActive ? activeStyle : {}),},- { ':hover': hoverStyle }+ { ':hover': hoverStyle },];const content = (@@ -74,7 +74,7 @@ function Item({style={{flexDirection: 'row',alignItems: 'center',- height: 20+ height: 20,}}><Icon width={15} height={15} style={{ color: 'inherit' }} />@@ -114,25 +114,25 @@ function SecondaryItem({exact,onClick,bold,- indent = 0+ indent = 0,}) {const hoverStyle = {- backgroundColor: colors.n2+ backgroundColor: colors.n2,};const activeStyle = {borderLeft: '4px solid ' + colors.p8,paddingLeft: 14 - 4 + indent,color: colors.p8,- fontWeight: bold ? fontWeight : null+ fontWeight: bold ? fontWeight : null,};const linkStyle = [accountNameStyle,{color: colors.n9,paddingLeft: 14 + indent,- fontWeight: bold ? fontWeight : null+ fontWeight: bold ? fontWeight : null,},- { ':hover': hoverStyle }+ { ':hover': hoverStyle },];const content = (@@ -140,7 +140,7 @@ function SecondaryItem({style={{flexDirection: 'row',alignItems: 'center',- height: 16+ height: 16,}}>{Icon && <Icon width={12} height={12} style={{ color: 'inherit' }} />}@@ -179,10 +179,10 @@ let accountNameStyle = [paddingRight: 15,paddingLeft: 10,textDecoration: 'none',- color: colors.n9+ color: colors.n9,},{ ':hover': { backgroundColor: colors.n2 } },- styles.smallText+ styles.smallText,];function Account({@@ -196,7 +196,7 @@ function Account({style,outerStyle,onDragChange,- onDrop+ onDrop,}) {let type = account? account.closed@@ -210,13 +210,13 @@ function Account({type,onDragChange,item: { id: account && account.id },- canDrag: account != null+ canDrag: account != null,});let { dropRef, dropPos } = useDroppable({types: account ? [type] : [],id: account && account.id,- onDrop: onDrop+ onDrop: onDrop,});return (@@ -230,7 +230,7 @@ function Account({accountNameStyle,style,{ position: 'relative', borderLeft: '4px solid transparent' },- updated && { fontWeight: 700 }+ updated && { fontWeight: 700 },]}activeStyle={{borderColor: colors.p8,@@ -243,8 +243,8 @@ function Account({fontWeight: (style && style.fontWeight) || 'normal','& .dot': {backgroundColor: colors.p8,- transform: 'translateX(-4.5px)'- }+ transform: 'translateX(-4.5px)',+ },}}><View@@ -254,7 +254,7 @@ function Account({top: 0,bottom: 0,flexDirection: 'row',- alignItems: 'center'+ alignItems: 'center',}}><div@@ -267,7 +267,7 @@ function Account({backgroundColor: failed ? colors.r7 : colors.g5,marginLeft: 2,transition: 'transform .3s',- opacity: connected ? 1 : 0+ opacity: connected ? 1 : 0,})}/></View>@@ -300,26 +300,26 @@ function Accounts({showClosedAccounts,onAddAccount,onToggleClosedAccounts,- onReorder+ onReorder,}) {let [isDragging, setIsDragging] = useState(false);let offbudgetAccounts = useMemo(() =>accounts.filter(- account => account.closed === 0 && account.offbudget === 1+ account => account.closed === 0 && account.offbudget === 1,),- [accounts]+ [accounts],);let budgetedAccounts = useMemo(() =>accounts.filter(- account => account.closed === 0 && account.offbudget === 0+ account => account.closed === 0 && account.offbudget === 0,),- [accounts]+ [accounts],);let closedAccounts = useMemo(() => accounts.filter(account => account.closed === 1),- [accounts]+ [accounts],);function onDragChange(drag) {@@ -330,7 +330,7 @@ function Accounts({if (i === 0) {return {paddingTop: isDragging ? 15 : 0,- marginTop: isDragging ? -15 : 0+ marginTop: isDragging ? -15 : 0,};}return null;@@ -420,7 +420,7 @@ function Accounts({<SecondaryItemstyle={{marginTop: 15,- marginBottom: 9+ marginBottom: 9,}}onClick={onAddAccount}Icon={Add}@@ -446,7 +446,7 @@ function Tools() {let location = useLocation();const isActive = ['/payees', '/rules', '/settings', '/tools'].some(route =>- location.pathname.startsWith(route)+ location.pathname.startsWith(route),);useEffect(() => {@@ -505,7 +505,7 @@ export function Sidebar({onFloat,onAddAccount,onToggleClosedAccounts,- onReorder+ onReorder,}) {let hasWindowButtons = !Platform.isBrowser && Platform.OS === 'mac';@@ -519,14 +519,14 @@ export function Sidebar({'& .float': {opacity: 0,transition: 'opacity .25s, width .25s',- width: hasWindowButtons ? null : 0+ width: hasWindowButtons ? null : 0,},'&:hover .float': {opacity: 1,- width: hasWindowButtons ? null : 'auto'- }+ width: hasWindowButtons ? null : 'auto',+ },},- style+ style,]}>{hasWindowButtons && (@@ -538,8 +538,8 @@ export function Sidebar({justifyContent: 'center',overflow: 'hidden',WebkitAppRegion: 'drag',- paddingRight: 8- }+ paddingRight: 8,+ },]}onFloat={onFloat}/>@@ -552,12 +552,12 @@ export function Sidebar({flexDirection: 'row',alignItems: 'center',margin: '0 8px 23px 20px',- transition: 'padding .4s'+ transition: 'padding .4s',},hasWindowButtons && {paddingTop: 20,- justifyContent: 'flex-start'- }+ justifyContent: 'flex-start',+ },]}>{budgetName}@@ -571,7 +571,7 @@ export function Sidebar({display: 'inherit',color: colors.n5,marginLeft: hasWindowButtons ? 0 : 5,- flexShrink: 0+ flexShrink: 0,}}activeStyle={{ color: colors.p7 }}>@@ -597,7 +597,7 @@ export function Sidebar({height: 1,backgroundColor: colors.n3,marginTop: 15,- flexShrink: 0+ flexShrink: 0,}}/>diff --git a/packages/loot-design/src/components/sidebar.usage.js b/packages/loot-design/src/components/sidebar.usage.jsindex 07706e03e2..5f813390b7 100644--- a/packages/loot-design/src/components/sidebar.usage.js+++ b/packages/loot-design/src/components/sidebar.usage.js@@ -23,7 +23,7 @@ const accounts = [generateAccount('Wells Fargo', true),generateAccount('Ally'),{ ...generateAccount('401k'), closed: 1 },- { ...generateAccount('Old Savings'), closed: 1 }+ { ...generateAccount('Old Savings'), closed: 1 },];function makeSidebar(selected) {diff --git a/packages/loot-design/src/components/sort.js b/packages/loot-design/src/components/sort.jsindex ecd84dfed9..e85ee646af 100644--- a/packages/loot-design/src/components/sort.js+++ b/packages/loot-design/src/components/sort.js@@ -4,7 +4,7 @@ import React, {useLayoutEffect,useMemo,useState,- useContext+ useContext,} from 'react';import { useDrag, useDrop } from 'react-dnd';@@ -34,7 +34,7 @@ export function useDraggable({makePreview,children,canDrag,- onDragChange+ onDragChange,}) {let _onDragChange = useRef(onDragChange);@@ -57,7 +57,7 @@ export function useDraggable({canDrag() {return canDrag;- }+ },});useLayoutEffect(() => {@@ -88,7 +88,7 @@ export function useDroppable({ types, id, onDrop, onLongHover }) {},collect(monitor) {return { isOver: monitor.isOver() };- }+ },});useEffect(() => {@@ -102,7 +102,7 @@ export function useDroppable({ types, id, onDrop, onLongHover }) {return {dropRef: useMergedRefs(dropRef, ref),- dropPos: isOver ? dropPos : null+ dropPos: isOver ? dropPos : null,};}@@ -131,9 +131,9 @@ export function DropHighlight({ pos, offset = {} }) {height: 3,background: `linear-gradient(90deg, ${colors.b4} 0%, ${colors.b5} 100%)`,zIndex: 10000,- pointerEvents: 'none'+ pointerEvents: 'none',},- posStyle+ posStyle,]}/>);diff --git a/packages/loot-design/src/components/spreadsheet/CellValue.js b/packages/loot-design/src/components/spreadsheet/CellValue.jsindex 8993423e75..4ae08b34dd 100644--- a/packages/loot-design/src/components/spreadsheet/CellValue.js+++ b/packages/loot-design/src/components/spreadsheet/CellValue.js@@ -15,7 +15,7 @@ function CellValue({ binding, type, formatter, style, getStyle, debug }) {style={[type === 'financial' && styles.tnum,style,- getStyle && getStyle(value)+ getStyle && getStyle(value),]}numberOfLines={1}data-testid={name}diff --git a/packages/loot-design/src/components/spreadsheet/SheetValue.js b/packages/loot-design/src/components/spreadsheet/SheetValue.jsindex 9f09f6c796..93b72ba288 100644--- a/packages/loot-design/src/components/spreadsheet/SheetValue.js+++ b/packages/loot-design/src/components/spreadsheet/SheetValue.js@@ -12,7 +12,7 @@ export default function SheetValue({binding,initialValue,children,- onChange+ onChange,}) {if (!binding) {throw new Error('SheetValue binding is required');@@ -34,7 +34,7 @@ export default function SheetValue({let [result, setResult] = useState({name: sheetName + '!' + binding.name,value: initialValue != null ? initialValue : binding.value,- query: binding.query+ query: binding.query,});let latestOnChange = useRef(onChange);let latestValue = useRef(result.value);diff --git a/packages/loot-design/src/components/spreadsheet/format.js b/packages/loot-design/src/components/spreadsheet/format.jsindex 59edf56ca4..918b1bdd26 100644--- a/packages/loot-design/src/components/spreadsheet/format.js+++ b/packages/loot-design/src/components/spreadsheet/format.js@@ -26,7 +26,7 @@ export default function format(value, type = 'string') {if (typeof value !== 'number') {throw new Error(- 'Value is not a number (' + typeof value + '): ' + value+ 'Value is not a number (' + typeof value + '): ' + value,);}diff --git a/packages/loot-design/src/components/spreadsheet/useSheetValue.js b/packages/loot-design/src/components/spreadsheet/useSheetValue.jsindex 9f3cf485ed..a90d89d15a 100644--- a/packages/loot-design/src/components/spreadsheet/useSheetValue.js+++ b/packages/loot-design/src/components/spreadsheet/useSheetValue.js@@ -8,7 +8,7 @@ function unresolveName(name) {if (idx !== -1) {return {sheet: name.slice(0, idx),- name: name.slice(idx + 1)+ name: name.slice(idx + 1),};}return { sheet: null, name };@@ -42,7 +42,7 @@ export default function useSheetValue(binding, onChange) {let [result, setResult] = useState({name: sheetName + '!' + binding.name,value: binding.value === undefined ? null : binding.value,- query: binding.query+ query: binding.query,});let latestOnChange = useRef(onChange);let latestValue = useRef(result.value);diff --git a/packages/loot-design/src/components/table.js b/packages/loot-design/src/components/table.jsindex 871817556f..782f91d771 100644--- a/packages/loot-design/src/components/table.js+++ b/packages/loot-design/src/components/table.js@@ -6,7 +6,7 @@ import React, {useLayoutEffect,useImperativeHandle,useContext,- useMemo+ useMemo,} from 'react';import { useStore } from 'react-redux';import AutoSizer from 'react-virtualized-auto-sizer';@@ -27,7 +27,7 @@ import {Input,Tooltip,IntersectionBoundary,- Menu+ Menu,} from './common';import DateSelect from './DateSelect';import { FixedSizeList } from './FixedSizeList';@@ -54,16 +54,16 @@ function fireBlur(onBlur, e) {const CellContext = React.createContext({backgroundColor: 'white',- borderColor: colors.n9+ borderColor: colors.n9,});function CellProvider({ backgroundColor, borderColor, children }) {let value = useMemo(() => ({backgroundColor,- borderColor+ borderColor,}),- [backgroundColor, borderColor]+ [backgroundColor, borderColor],);return <CellContext.Provider value={value}>{children}</CellContext.Provider>;@@ -80,7 +80,7 @@ export const Field = React.forwardRef(function Field(contentStyle,...props},- ref+ ref,) {let { backgroundColor, borderColor } = useContext(CellContext);@@ -101,10 +101,10 @@ export const Field = React.forwardRef(function Field(borderTopWidth: borderColor ? 1 : 0,borderBottomWidth: borderColor ? 1 : 0,borderColor,- backgroundColor+ backgroundColor,},styles.smallText,- style+ style,]}data-testid={name}>@@ -116,9 +116,9 @@ export const Field = React.forwardRef(function Field({flex: 1,padding: '0 5px',- justifyContent: 'center'+ justifyContent: 'center',},- contentStyle+ contentStyle,]}>{truncate ? (@@ -126,7 +126,7 @@ export const Field = React.forwardRef(function Field(style={{whiteSpace: 'nowrap',overflow: 'hidden',- textOverflow: 'ellipsis'+ textOverflow: 'ellipsis',}}>{children}@@ -176,7 +176,7 @@ export function Cell({borderTopWidth: borderColor ? 1 : 0,borderBottomWidth: borderColor ? 1 : 0,borderColor,- backgroundColor+ backgroundColor,};return (@@ -197,10 +197,10 @@ export function Cell({{flex: 1,padding: '0 5px',- justifyContent: 'center'+ justifyContent: 'center',},styles.smallText,- valueStyle+ valueStyle,]}// Can't use click because we only want to expose the cell if// the user does a direct click, not if they also drag the@@ -222,7 +222,7 @@ export function Cell({style={{whiteSpace: 'nowrap',overflow: 'hidden',- textOverflow: 'ellipsis'+ textOverflow: 'ellipsis',}}>{formatter ? formatter(value) : value}@@ -286,11 +286,11 @@ export function Row({flex: '0 0 ' + (height || ROW_HEIGHT) + 'px',userSelect: 'text','&.animated .animated-cell': {- transition: '.7s background-color'- }+ transition: '.7s background-color',+ },},collapsed && { marginTop: -1 },- style+ style,]}data-testid="row"{...nativeProps}@@ -306,12 +306,12 @@ export function Row({const inputCellStyle = {backgroundColor: 'white',padding: '5px 3px',- margin: '0 1px'+ margin: '0 1px',};const readonlyInputStyle = {backgroundColor: 'transparent',- '::selection': { backgroundColor: '#d9d9d9' }+ '::selection': { backgroundColor: '#d9d9d9' },};function InputValue({ value: defaultValue, onUpdate, onBlur, ...props }) {@@ -348,7 +348,7 @@ function InputValue({ value: defaultValue, onUpdate, onBlur, ...props }) {style={[inputCellStyle,props.readOnly ? readonlyInputStyle : null,- props.style+ props.style,]}/>);@@ -442,7 +442,7 @@ export function CustomCell({onUpdate && onUpdate(val);},shouldSaveFromKey,- inputStyle: inputCellStyle+ inputStyle: inputCellStyle,})}</Cell>@@ -457,7 +457,7 @@ export const DateSelectCell = scope(lively => {{...props}style={{zIndex: props.exposed ? 1 : 0,- ...props.style+ ...props.style,}}>{() => (@@ -467,7 +467,7 @@ export const DateSelectCell = scope(lively => {inputProps={{...inputProps,onBlur: e => fireBlur(inputProps && inputProps.onBlur, e),- style: [inputCellStyle, { zIndex: 300 }]+ style: [inputCellStyle, { zIndex: 300 }],}}/>)}@@ -531,10 +531,10 @@ export const CellButton = React.forwardRef(transition: 'box-shadow .15s',':focus': {outline: 0,- boxShadow: `0 0 0 3px white, 0 0 0 5px ${colors.b5}`- }+ boxShadow: `0 0 0 3px white, 0 0 0 5px ${colors.b5}`,+ },},- style+ style,]}onFocus={() => onEdit && onEdit()}data-testid="cell-button"@@ -552,7 +552,7 @@ export const CellButton = React.forwardRef({children}</View>);- }+ },);export function SelectCell({@@ -590,13 +590,13 @@ export function SelectCell({':focus': {border: '1px solid ' + colors.b5,- boxShadow: '0 1px 2px ' + colors.b5- }+ boxShadow: '0 1px 2px ' + colors.b5,+ },},selected && {backgroundColor: partial ? colors.b9 : colors.b5,- borderColor: partial ? colors.b9 : colors.b5- }+ borderColor: partial ? colors.b9 : colors.b5,+ },]}onEdit={onEdit}onSelect={onSelect}@@ -681,7 +681,7 @@ export const Highlight = scope(lively => {right: 0,bottom: 0,transition: 'background-color 1.8s',- backgroundColor: 'white'+ backgroundColor: 'white',}}/>);@@ -713,7 +713,7 @@ export const Highlight = scope(lively => {if (bag.props.active) {return activate(bag);}- }+ },});});@@ -724,7 +724,7 @@ export function TableHeader({ headers, children, version, ...rowProps }) {version === 'v2' && {borderRadius: '6px 6px 0 0',overflow: 'hidden',- flexShrink: 0+ flexShrink: 0,}}>@@ -738,7 +738,7 @@ export function TableHeader({ headers, children, version, ...rowProps }) {version === 'v2'? { color: colors.n4, fontWeight: 500 }: { color: colors.n4 },- rowProps.style+ rowProps.style,]}>{headers@@ -806,7 +806,7 @@ export const TableWithNavigator = React.forwardRef(({ fields, ...props }, ref) => {let navigator = useTableNavigator(props.items, fields);return <Table {...props} navigator={navigator} />;- }+ },);export const Table = React.forwardRef(@@ -833,14 +833,14 @@ export const Table = React.forwardRef(isSelected,...props},- ref+ ref,) => {if (!navigator) {navigator = {onEdit: () => {},editingId: null,focusedField: null,- getNavigatorProps: props => props+ getNavigatorProps: props => props,};}@@ -900,7 +900,7 @@ export const Table = React.forwardRef(isAnchored() {return list.current && list.current.isAnchored();- }+ },}));useLayoutEffect(() => {@@ -924,7 +924,7 @@ export const Table = React.forwardRef(focusedField: editing && focusedField,onEdit,index,- position: style.top+ position: style.top,});// TODO: Need to also apply zIndex if item is selected@@ -938,8 +938,8 @@ export const Table = React.forwardRef(rowStyle,{zIndex: editing || selected ? 101 : 'auto',- transform: 'translateY(var(--pos))'- }+ transform: 'translateY(var(--pos))',+ },]}nativeStyle={{ '--pos': `${style.top - 1}px` }}data-focus-key={item.id}@@ -978,7 +978,7 @@ export const Table = React.forwardRef(alignItems: 'center',fontStyle: 'italic',color: colors.n6,- flex: 1+ flex: 1,}}>{empty}@@ -994,8 +994,8 @@ export const Table = React.forwardRef(flex: 1,justifyContent: 'center',alignItems: 'center',- backgroundColor- }+ backgroundColor,+ },]}><AnimatedLoading width={25} color={colors.n1} />@@ -1011,9 +1011,9 @@ export const Table = React.forwardRef({flex: 1,outline: 'none',- '& .animated .animated-row': { transition: '.25s transform' }+ '& .animated .animated-row': { transition: '.25s transform' },},- style+ style,]}tabIndex="1"{...getNavigatorProps(props)}@@ -1077,7 +1077,7 @@ export const Table = React.forwardRef(</View></View>);- }+ },);export function useTableNavigator(data, fields, opts = {}) {@@ -1242,7 +1242,7 @@ export function useTableNavigator(data, fields, opts = {}) {: 'down': e.shiftKey? 'left'- : 'right'+ : 'right',);break;default:@@ -1275,7 +1275,7 @@ export function useTableNavigator(data, fields, opts = {}) {) {onEdit(null);}- }+ },};}diff --git a/packages/loot-design/src/components/table.usage.js b/packages/loot-design/src/components/table.usage.jsindex 0366211b4d..bea61a3f51 100644--- a/packages/loot-design/src/components/table.usage.js+++ b/packages/loot-design/src/components/table.usage.js@@ -8,7 +8,7 @@ import {Row,Cell,InputCell,- useTableNavigator+ useTableNavigator,} from './table';let uuid = require('loot-core/src/platform/uuid');@@ -58,7 +58,7 @@ let people = [{ id: 2, name: 'Sarah', poop: 1, age: 33, height: 5.6 },{ id: 3, name: 'Evy', age: 4, height: 3 },{ id: 4, name: 'Georgia', poop: 2, age: 3, height: 2.5 },- { id: 5, name: 'Charlotte', age: 0, height: 1.2 }+ { id: 5, name: 'Charlotte', age: 0, height: 1.2 },];let getFields = item =>@@ -130,7 +130,7 @@ export default () => (let lots = [];for (let i = 0; i < 100; i++) {lots = lots.concat(- people.map(person => ({ ...person, id: uuid.v4Sync() }))+ people.map(person => ({ ...person, id: uuid.v4Sync() })),);}return lots;diff --git a/packages/loot-design/src/components/tooltips.js b/packages/loot-design/src/components/tooltips.jsindex e1d3a39434..dcd9309af4 100644--- a/packages/loot-design/src/components/tooltips.js+++ b/packages/loot-design/src/components/tooltips.js@@ -16,10 +16,10 @@ export function useTooltip() {e.stopPropagation();events.onClick && events.onClick(e);setIsOpen(true);- }+ },}),isOpen,- close: () => setIsOpen(false)+ close: () => setIsOpen(false),};}@@ -140,7 +140,7 @@ export class Tooltip extends React.Component {top: anchorRect.top,left: anchorRect.left,width: anchorRect.width,- height: anchorRect.height+ height: anchorRect.height,};let container = this.getBoundsContainer();@@ -183,7 +183,7 @@ export class Tooltip extends React.Component {box,anchorRect,this.getContainer().getBoundingClientRect(),- offset+ offset,);contentEl.style.top = style.top;@@ -230,7 +230,7 @@ export class Tooltip extends React.Component {top: 'inherit',bottom: 'inherit',left: 'inherit',- right: 'inherit'+ right: 'inherit',};if (@@ -299,7 +299,7 @@ export class Tooltip extends React.Component {width,...styles.shadowLarge,borderRadius: 4,- backgroundColor: 'white'+ backgroundColor: 'white',// opacity: 0,// transition: 'transform .1s, opacity .1s',// transitionTimingFunction: 'ease-out'@@ -332,7 +332,7 @@ export class Tooltip extends React.Component {>{children}</div>,- this.getContainer()+ this.getContainer(),)}</div>);@@ -349,7 +349,7 @@ export function Pointer({style,innerStyle,pointerStyle,- children+ children,}) {return (<div {...css({ position: 'relative' }, style)}>@@ -362,7 +362,7 @@ export function Pointer({padding: 10,boxShadow: '0 2px 6px rgba(0, 0, 0, .25)',border: border && '1px solid ' + borderColor,- borderRadius: 2+ borderRadius: 2,},before({position: 'absolute',@@ -383,7 +383,7 @@ export function Pointer({? { left: 'calc(50% - 3.5px)' }: pointerPosition === 'left'? { left: 40 }- : { right: 40 })+ : { right: 40 }),}: pointerDirection === 'down'? {@@ -394,19 +394,19 @@ export function Pointer({? { left: 'calc(50% - 3.5px)' }: pointerPosition === 'left'? { left: 40 }- : { right: 40 })+ : { right: 40 }),}: pointerDirection === 'right'? {transform: 'rotate(45deg)',content: '" "',top: 'calc(50% - 3.5px)',- right: -3+ right: -3,}: {}),- ...pointerStyle+ ...pointerStyle,}),- innerStyle+ innerStyle,)}>{children}diff --git a/packages/loot-design/src/components/useProperFocus.js b/packages/loot-design/src/components/useProperFocus.jsindex f327fa4e40..20ac5a9e80 100644--- a/packages/loot-design/src/components/useProperFocus.js+++ b/packages/loot-design/src/components/useProperFocus.js@@ -38,9 +38,9 @@ export function AvoidRefocusScrollProvider({ children }) {keyRef,onKeyChange: key => {keyRef.current = key;- }+ },}),- [keyRef]+ [keyRef],);return (diff --git a/packages/loot-design/src/components/useSelected.js b/packages/loot-design/src/components/useSelected.jsindex 19ff370746..f2b9bc0e06 100644--- a/packages/loot-design/src/components/useSelected.js+++ b/packages/loot-design/src/components/useSelected.js@@ -3,7 +3,7 @@ import React, {useReducer,useCallback,useEffect,- useRef+ useRef,} from 'react';import { useSelector } from 'react-redux';@@ -74,8 +74,8 @@ export default function useSelected(name, items, initialSelectedIds) {selectedItems,selectedRange: {start: items[range.start].id,- end: items[range.end].id- }+ end: items[range.end].id,+ },};} else {let range = null;@@ -87,7 +87,7 @@ export default function useSelected(name, items, initialSelectedIds) {return {...state,selectedItems,- selectedRange: range+ selectedRange: range,};}}@@ -102,7 +102,7 @@ export default function useSelected(name, items, initialSelectedIds) {selectedRange:action.ids && action.ids.length === 1? { start: action.ids[0], end: null }- : null+ : null,};default:@@ -115,8 +115,8 @@ export default function useSelected(name, items, initialSelectedIds) {selectedRange:initialSelectedIds && initialSelectedIds.length === 1? { start: initialSelectedIds[0], end: null }- : null- })+ : null,+ }),);let prevItems = useRef(items);@@ -171,7 +171,7 @@ export default function useSelected(name, items, initialSelectedIds) {let deletedIds = new Set(messages.filter(msg => msg.column === 'tombstone' && msg.value === 1)- .map(msg => msg.row)+ .map(msg => msg.row),);if (@@ -182,7 +182,9 @@ export default function useSelected(name, items, initialSelectedIds) {dispatch({type: 'select-all',// Coerce the Set into an array- ids: [...tagged.selectedItems.items].filter(id => !deletedIds.has(id))+ ids: [...tagged.selectedItems.items].filter(+ id => !deletedIds.has(id),+ ),});}}@@ -197,7 +199,7 @@ export default function useSelected(name, items, initialSelectedIds) {return {items: state.selectedItems,setItems: state.setSelectedItems,- dispatch+ dispatch,};}@@ -228,7 +230,7 @@ export function SelectedProvider({ instance, fetchAllIds, children }) {if (fetchAllIds) {return instance.dispatch({type: 'select-all',- ids: await fetchAllIds()+ ids: await fetchAllIds(),});}return instance.dispatch({ type: 'select-all' });@@ -236,7 +238,7 @@ export function SelectedProvider({ instance, fetchAllIds, children }) {}return instance.dispatch(action);},- [instance.dispatch, fetchAllIds]+ [instance.dispatch, fetchAllIds],);return (@@ -256,7 +258,7 @@ export function SelectedProviderWithItems({initialSelectedIds,fetchAllIds,registerDispatch,- children+ children,}) {let selected = useSelected(name, items, initialSelectedIds);diff --git a/packages/loot-design/src/guide/components.js b/packages/loot-design/src/guide/components.jsindex 2d2e392b32..cf7e50d48a 100644--- a/packages/loot-design/src/guide/components.js+++ b/packages/loot-design/src/guide/components.js@@ -6,7 +6,7 @@ export function Section({children,style,contentStyle,- direction = 'vertical'+ direction = 'vertical',}) {const arr = React.Children.toArray(children);@@ -29,9 +29,9 @@ export function Section({{...css({display: 'flex',- flexDirection: direction === 'horizontal' ? 'row' : 'column'+ flexDirection: direction === 'horizontal' ? 'row' : 'column',},- style+ style,)}data-section="true">@@ -64,9 +64,9 @@ export function MobileSection({ style, headerComponent, children }) {border: '1px solid #f0f0f0',overflow: 'hidden',display: 'flex',- backgroundColor: '#fafafa'+ backgroundColor: '#fafafa',},- style+ style,]}>{children}@@ -82,9 +82,9 @@ export function WithHeader({ title, style, children }) {flex: 1,fontSize: 14,fontWeight: 500,- color: '#303030'+ color: '#303030',},- style+ style,])}><div {...css({ textAlign: 'center', paddingTop: 10, paddingBottom: 5 })}>@@ -102,7 +102,7 @@ export function MobileScreen({ children }) {width: 375,height: 667,overflow: 'hidden',- display: 'flex'+ display: 'flex',}}>{children}@@ -121,7 +121,7 @@ export function Note({ top, left, width, children }) {backgroundColor: '#fff971',padding: 5,fontSize: 12,- fontStyle: 'italic'+ fontStyle: 'italic',}}>{children}@@ -148,10 +148,10 @@ export class TestModal extends React.Component {width,height,position: 'relative',- backgroundColor: backgroundColor || '#f0f0f0'+ backgroundColor: backgroundColor || '#f0f0f0',}}/>,- parentNode && children(parentNode)+ parentNode && children(parentNode),];}}diff --git a/packages/loot-design/src/guide/document.js b/packages/loot-design/src/guide/document.jsindex 7614d2ac91..2c34d0102b 100644--- a/packages/loot-design/src/guide/document.js+++ b/packages/loot-design/src/guide/document.js@@ -7,7 +7,7 @@ import { TestProvider } from 'loot-core/src/mocks/redux';global.IS_DESIGN_MODE = true;window.Actual = {- IS_FAKE_WEB: true+ IS_FAKE_WEB: true,};const modules = {};@@ -22,7 +22,7 @@ function Usage({ name, render }) {<TestProvider><divstyle={{- margin: 40+ margin: 40,}}><h1>{name}</h1>@@ -51,7 +51,7 @@ export default async function render(rootNode) {return {path,name: pathToName(path),- key: path+ key: path,};}).filter(guide => guide.path.toLowerCase().includes(filter.toLowerCase()))@@ -79,12 +79,12 @@ export default async function render(rootNode) {</Text>{modules[key].default()}</View>,- mount+ mount,);} else {ReactDOM.render(<Usage name={name} render={modules[key].default} />,- mount+ mount,);}});@@ -124,7 +124,7 @@ function reloadUsage(path, module) {ReactDOM.unmountComponentAtNode(mount);ReactDOM.render(<Usage name={pathToName(path)} render={module.default} updated={true} />,- mount+ mount,);document.documentElement.scrollTop = scrollTop;} catch (e) {diff --git a/packages/loot-design/src/setupTests.js b/packages/loot-design/src/setupTests.jsindex 957c1cf05f..62079beb0b 100644--- a/packages/loot-design/src/setupTests.js+++ b/packages/loot-design/src/setupTests.js@@ -9,7 +9,7 @@ jest.mock('react-virtualized-auto-sizer',() =>({ children }) =>- children({ height: 1000, width: 600 })+ children({ height: 1000, width: 600 }),);// Why 2? There were already tests written assuming a specificdiff --git a/packages/loot-design/src/style.js b/packages/loot-design/src/style.jsindex 94d2fbf147..59c49939b3 100644--- a/packages/loot-design/src/style.js+++ b/packages/loot-design/src/style.js@@ -70,7 +70,7 @@ export const colors = {p8: '#B990FF',p9: '#DAC4FF',p10: '#F2EBFE',- p11: '#F9F6FE'+ p11: '#F9F6FE',};colors.border = colors.n10;@@ -89,25 +89,25 @@ colors.resolve = (name, offset) => {export const styles = {veryLargeText: {fontSize: 30,- fontWeight: 600+ fontWeight: 600,},largeText: {fontSize: 20,fontWeight: 700,- letterSpacing: 0.5+ letterSpacing: 0.5,},mediumText: {fontSize: 15,- fontWeight: 500+ fontWeight: 500,},smallText: {fontSize: 13,[`@media (min-width: ${tokens.breakpoint_medium})`]: {// lineHeight: 21 // TODO: This seems like trouble, but what's the right value?- }+ },},verySmallText: {- fontSize: 13+ fontSize: 13,},page: {// This is the height of the titlebar@@ -116,8 +116,8 @@ export const styles = {flex: 1,[`@media (min-width: ${tokens.breakpoint_medium})`]: {minWidth: 500,- paddingTop: 36- }+ paddingTop: 36,+ },},pageHeader: {fontSize: 25,@@ -129,34 +129,34 @@ export const styles = {color: colors.grey4,marginTop: 40,marginBottom: 20,- paddingBottom: 5+ paddingBottom: 5,},pageContent: {paddingLeft: 2,paddingRight: 2,[`@media (min-width: ${tokens.breakpoint_medium})`]: {paddingLeft: 20,- paddingRight: 20- }+ paddingRight: 20,+ },},settingsPageContent: {padding: 20,[`@media (min-width: ${tokens.breakpoint_medium})`]: {- padding: 'inherit'- }+ padding: 'inherit',+ },},staticText: {cursor: 'default',- userSelect: 'none'+ userSelect: 'none',},shadow: {- boxShadow: '0 2px 4px 0 rgba(0,0,0,0.1)'+ boxShadow: '0 2px 4px 0 rgba(0,0,0,0.1)',},shadowLarge: {- boxShadow: '0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08)'+ boxShadow: '0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08)',},tnum: {- fontFeatureSettings: '"tnum"'+ fontFeatureSettings: '"tnum"',},notFixed: { fontFeatureSettings: '' },header: {@@ -164,21 +164,21 @@ export const styles = {backgroundColor: 'white',borderBottomWidth: 1,borderBottomColor: colors.n9,- elevation: 0+ elevation: 0,},headerTintColor: colors.n1,headerTitleStyle: {color: colors.n1,fontSize: 15,- fontWeight: 600+ fontWeight: 600,},- headerBackTitle: null+ headerBackTitle: null,},text: {- fontSize: 16+ fontSize: 16,// lineHeight: 22.4 // TODO: This seems like trouble, but what's the right value?},- textColor: colors.n1+ textColor: colors.n1,};let hiddenScrollbars = false;@@ -187,27 +187,27 @@ function onScrollbarChange() {styles.lightScrollbar = !hiddenScrollbars && {'& ::-webkit-scrollbar': {width: 11,- backgroundColor: 'rgba(200, 200, 200, .2)'+ backgroundColor: 'rgba(200, 200, 200, .2)',},'& ::-webkit-scrollbar-thumb': {width: 7,borderRadius: 30,backgroundClip: 'padding-box',- border: '2px solid rgba(0, 0, 0, 0)'+ border: '2px solid rgba(0, 0, 0, 0)',},'& ::-webkit-scrollbar-thumb:vertical': {- backgroundColor: '#d0d0d0'- }+ backgroundColor: '#d0d0d0',+ },};styles.darkScrollbar = !hiddenScrollbars && {'& ::-webkit-scrollbar': {width: 7,- backgroundColor: 'rgba(0, 0, 0, 0)'+ backgroundColor: 'rgba(0, 0, 0, 0)',},'& ::-webkit-scrollbar-thumb:vertical': {- backgroundColor: 'rgba(200, 200, 200, .5)'- }+ backgroundColor: 'rgba(200, 200, 200, .5)',+ },};styles.scrollbarWidth = hiddenScrollbars ? 0 : 13;diff --git a/packages/loot-design/src/svg/AnimatedLoading.js b/packages/loot-design/src/svg/AnimatedLoading.jsindex 45b2afa866..027e99ace0 100644--- a/packages/loot-design/src/svg/AnimatedLoading.js+++ b/packages/loot-design/src/svg/AnimatedLoading.js@@ -6,7 +6,7 @@ import Loading from './Loading';const rotation = css.keyframes({'0%': { transform: 'rotate(-90deg)' },- '100%': { transform: 'rotate(666deg)' }+ '100%': { transform: 'rotate(666deg)' },});function AnimatedLoading(props) {@@ -17,7 +17,7 @@ function AnimatedLoading(props) {animationDuration: '1.6s',animationTimingFunction: 'cubic-bezier(0.17, 0.67, 0.83, 0.67)',animationIterationCount: 'infinite',- lineHeight: 0+ lineHeight: 0,})}><Loading {...props} />diff --git a/packages/loot-design/src/svg/add-attribute.js b/packages/loot-design/src/svg/add-attribute.jsindex 04acf48e41..ace9124659 100644--- a/packages/loot-design/src/svg/add-attribute.js+++ b/packages/loot-design/src/svg/add-attribute.js@@ -1,6 +1,6 @@const positionMethod = {start: 'unshiftContainer',- end: 'pushContainer'+ end: 'pushContainer',};const addJSXAttribute = ({ types: t, template }, opts) => {@@ -31,7 +31,7 @@ const addJSXAttribute = ({ types: t, template }, opts) => {return t.jsxAttribute(t.jsxIdentifier(name),- getAttributeValue({ value, literal })+ getAttributeValue({ value, literal }),);}@@ -46,7 +46,7 @@ const addJSXAttribute = ({ types: t, template }, opts) => {value = null,spread = false,literal = false,- position = 'end'+ position = 'end',}) => {const method = positionMethod[position];const newAttribute = getAttribute({ spread, name, value, literal });@@ -77,10 +77,10 @@ const addJSXAttribute = ({ types: t, template }, opts) => {if (!replaced) {path[method]('attributes', newAttribute);}- }+ },);- }- }+ },+ },};};diff --git a/packages/loot-design/src/svg/logo/Logo.js b/packages/loot-design/src/svg/logo/Logo.jsindex 3b5c1231d9..f799a1e254 100644--- a/packages/loot-design/src/svg/logo/Logo.js+++ b/packages/loot-design/src/svg/logo/Logo.js@@ -8,7 +8,7 @@ const SvgLogo = props => (viewBox="0 0 30 32"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v0/Add.js b/packages/loot-design/src/svg/v0/Add.jsindex 721bd7754a..9c1c459d4f 100644--- a/packages/loot-design/src/svg/v0/Add.js+++ b/packages/loot-design/src/svg/v0/Add.js@@ -7,7 +7,7 @@ const SvgAdd = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v0/Delete.js b/packages/loot-design/src/svg/v0/Delete.jsindex a9e23e08f2..0f6e35ed9f 100644--- a/packages/loot-design/src/svg/v0/Delete.js+++ b/packages/loot-design/src/svg/v0/Delete.js@@ -7,7 +7,7 @@ const SvgDelete = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v0/ExpandArrow.js b/packages/loot-design/src/svg/v0/ExpandArrow.jsindex b579e333aa..5f8dedbe9a 100644--- a/packages/loot-design/src/svg/v0/ExpandArrow.js+++ b/packages/loot-design/src/svg/v0/ExpandArrow.js@@ -7,7 +7,7 @@ const SvgExpandArrow = props => (viewBox="0 0 25 15"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v0/LeftArrow2.js b/packages/loot-design/src/svg/v0/LeftArrow2.jsindex 6e406cbdb2..1aa5fe352d 100644--- a/packages/loot-design/src/svg/v0/LeftArrow2.js+++ b/packages/loot-design/src/svg/v0/LeftArrow2.js@@ -7,7 +7,7 @@ const SvgLeftArrow2 = props => (viewBox="0 0 91 51"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v0/Math.js b/packages/loot-design/src/svg/v0/Math.jsindex 50d4a066a6..bda6b0525e 100644--- a/packages/loot-design/src/svg/v0/Math.js+++ b/packages/loot-design/src/svg/v0/Math.js@@ -7,7 +7,7 @@ const SvgMath = props => (viewBox="0 0 30 30"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v0/Merge.js b/packages/loot-design/src/svg/v0/Merge.jsindex 26f2b26f50..6b32bf803f 100644--- a/packages/loot-design/src/svg/v0/Merge.js+++ b/packages/loot-design/src/svg/v0/Merge.js@@ -8,7 +8,7 @@ const SvgMerge = props => (viewBox="0 0 32 32"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v0/RightArrow2.js b/packages/loot-design/src/svg/v0/RightArrow2.jsindex b641cba2d3..d3179e9db0 100644--- a/packages/loot-design/src/svg/v0/RightArrow2.js+++ b/packages/loot-design/src/svg/v0/RightArrow2.js@@ -7,7 +7,7 @@ const SvgRightArrow2 = props => (viewBox="0 0 91 51"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v0/Split.js b/packages/loot-design/src/svg/v0/Split.jsindex 3763ba73b2..acdfa8e662 100644--- a/packages/loot-design/src/svg/v0/Split.js+++ b/packages/loot-design/src/svg/v0/Split.js@@ -8,7 +8,7 @@ const SvgSplit = props => (viewBox="0 0 32 32"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v0/Subtract.js b/packages/loot-design/src/svg/v0/Subtract.jsindex d8878e99ac..456b8b9c20 100644--- a/packages/loot-design/src/svg/v0/Subtract.js+++ b/packages/loot-design/src/svg/v0/Subtract.js@@ -7,7 +7,7 @@ const SvgSubtract = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Add.js b/packages/loot-design/src/svg/v1/Add.jsindex 8071b07f33..36f9260b95 100644--- a/packages/loot-design/src/svg/v1/Add.js+++ b/packages/loot-design/src/svg/v1/Add.js@@ -7,7 +7,7 @@ const SvgAdd = props => (xmlns="http://www.w3.org/2000/svg"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/AddOutline.js b/packages/loot-design/src/svg/v1/AddOutline.jsindex 876b0ad12f..78847e7e91 100644--- a/packages/loot-design/src/svg/v1/AddOutline.js+++ b/packages/loot-design/src/svg/v1/AddOutline.js@@ -7,7 +7,7 @@ const SvgAddOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/AddSolid.js b/packages/loot-design/src/svg/v1/AddSolid.jsindex 91f9dcddbf..f6241a77ca 100644--- a/packages/loot-design/src/svg/v1/AddSolid.js+++ b/packages/loot-design/src/svg/v1/AddSolid.js@@ -7,7 +7,7 @@ const SvgAddSolid = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Adjust.js b/packages/loot-design/src/svg/v1/Adjust.jsindex dda72f91c0..3448a1502d 100644--- a/packages/loot-design/src/svg/v1/Adjust.js+++ b/packages/loot-design/src/svg/v1/Adjust.js@@ -7,7 +7,7 @@ const SvgAdjust = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Airplane.js b/packages/loot-design/src/svg/v1/Airplane.jsindex 61e9d547e6..a55bf58abd 100644--- a/packages/loot-design/src/svg/v1/Airplane.js+++ b/packages/loot-design/src/svg/v1/Airplane.js@@ -7,7 +7,7 @@ const SvgAirplane = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Album.js b/packages/loot-design/src/svg/v1/Album.jsindex c74720b939..7db0e87744 100644--- a/packages/loot-design/src/svg/v1/Album.js+++ b/packages/loot-design/src/svg/v1/Album.js@@ -7,7 +7,7 @@ const SvgAlbum = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/AlignCenter.js b/packages/loot-design/src/svg/v1/AlignCenter.jsindex 8ca1481af3..e61054b834 100644--- a/packages/loot-design/src/svg/v1/AlignCenter.js+++ b/packages/loot-design/src/svg/v1/AlignCenter.js@@ -7,7 +7,7 @@ const SvgAlignCenter = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/AlignJustified.js b/packages/loot-design/src/svg/v1/AlignJustified.jsindex 2d67d23a4e..4da892762b 100644--- a/packages/loot-design/src/svg/v1/AlignJustified.js+++ b/packages/loot-design/src/svg/v1/AlignJustified.js@@ -7,7 +7,7 @@ const SvgAlignJustified = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/AlignLeft.js b/packages/loot-design/src/svg/v1/AlignLeft.jsindex 9319a67ac5..4ba9b7a814 100644--- a/packages/loot-design/src/svg/v1/AlignLeft.js+++ b/packages/loot-design/src/svg/v1/AlignLeft.js@@ -7,7 +7,7 @@ const SvgAlignLeft = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/AlignRight.js b/packages/loot-design/src/svg/v1/AlignRight.jsindex 0104858205..46f99d97f4 100644--- a/packages/loot-design/src/svg/v1/AlignRight.js+++ b/packages/loot-design/src/svg/v1/AlignRight.js@@ -7,7 +7,7 @@ const SvgAlignRight = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Anchor.js b/packages/loot-design/src/svg/v1/Anchor.jsindex 0dfce9dc29..e2fe31e7f7 100644--- a/packages/loot-design/src/svg/v1/Anchor.js+++ b/packages/loot-design/src/svg/v1/Anchor.js@@ -7,7 +7,7 @@ const SvgAnchor = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Announcement.js b/packages/loot-design/src/svg/v1/Announcement.jsindex ccb602b7fe..dac8d96754 100644--- a/packages/loot-design/src/svg/v1/Announcement.js+++ b/packages/loot-design/src/svg/v1/Announcement.js@@ -7,7 +7,7 @@ const SvgAnnouncement = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Apparel.js b/packages/loot-design/src/svg/v1/Apparel.jsindex e1215d379e..9b2bddd0b4 100644--- a/packages/loot-design/src/svg/v1/Apparel.js+++ b/packages/loot-design/src/svg/v1/Apparel.js@@ -7,7 +7,7 @@ const SvgApparel = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowDown.js b/packages/loot-design/src/svg/v1/ArrowDown.jsindex 3c62d336d7..cbadb054df 100644--- a/packages/loot-design/src/svg/v1/ArrowDown.js+++ b/packages/loot-design/src/svg/v1/ArrowDown.js@@ -7,7 +7,7 @@ const SvgArrowDown = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowLeft.js b/packages/loot-design/src/svg/v1/ArrowLeft.jsindex ec6a9f71c5..1ec675997e 100644--- a/packages/loot-design/src/svg/v1/ArrowLeft.js+++ b/packages/loot-design/src/svg/v1/ArrowLeft.js@@ -7,7 +7,7 @@ const SvgArrowLeft = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowOutlineDown.js b/packages/loot-design/src/svg/v1/ArrowOutlineDown.jsindex 8959ea87e8..2013125824 100644--- a/packages/loot-design/src/svg/v1/ArrowOutlineDown.js+++ b/packages/loot-design/src/svg/v1/ArrowOutlineDown.js@@ -7,7 +7,7 @@ const SvgArrowOutlineDown = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowOutlineLeft.js b/packages/loot-design/src/svg/v1/ArrowOutlineLeft.jsindex 126f1df56c..5e6507db0f 100644--- a/packages/loot-design/src/svg/v1/ArrowOutlineLeft.js+++ b/packages/loot-design/src/svg/v1/ArrowOutlineLeft.js@@ -7,7 +7,7 @@ const SvgArrowOutlineLeft = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowOutlineRight.js b/packages/loot-design/src/svg/v1/ArrowOutlineRight.jsindex 7f0d9d6f93..e676c9f23d 100644--- a/packages/loot-design/src/svg/v1/ArrowOutlineRight.js+++ b/packages/loot-design/src/svg/v1/ArrowOutlineRight.js@@ -7,7 +7,7 @@ const SvgArrowOutlineRight = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowOutlineUp.js b/packages/loot-design/src/svg/v1/ArrowOutlineUp.jsindex 0398c1212b..374cf1188d 100644--- a/packages/loot-design/src/svg/v1/ArrowOutlineUp.js+++ b/packages/loot-design/src/svg/v1/ArrowOutlineUp.js@@ -7,7 +7,7 @@ const SvgArrowOutlineUp = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowRight.js b/packages/loot-design/src/svg/v1/ArrowRight.jsindex a994889181..a78863548a 100644--- a/packages/loot-design/src/svg/v1/ArrowRight.js+++ b/packages/loot-design/src/svg/v1/ArrowRight.js@@ -7,7 +7,7 @@ const SvgArrowRight = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowThickDown.js b/packages/loot-design/src/svg/v1/ArrowThickDown.jsindex 7a4b6a88e2..66a3672386 100644--- a/packages/loot-design/src/svg/v1/ArrowThickDown.js+++ b/packages/loot-design/src/svg/v1/ArrowThickDown.js@@ -7,7 +7,7 @@ const SvgArrowThickDown = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M7 10V2h6v8h5l-8 8-8-8h5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/ArrowThickLeft.js b/packages/loot-design/src/svg/v1/ArrowThickLeft.jsindex b85edca2c0..4ec9be4d23 100644--- a/packages/loot-design/src/svg/v1/ArrowThickLeft.js+++ b/packages/loot-design/src/svg/v1/ArrowThickLeft.js@@ -7,7 +7,7 @@ const SvgArrowThickLeft = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M10 13h8V7h-8V2l-8 8 8 8v-5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/ArrowThickRight.js b/packages/loot-design/src/svg/v1/ArrowThickRight.jsindex 72c2a64b72..62f72a5b6f 100644--- a/packages/loot-design/src/svg/v1/ArrowThickRight.js+++ b/packages/loot-design/src/svg/v1/ArrowThickRight.js@@ -7,7 +7,7 @@ const SvgArrowThickRight = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M10 7H2v6h8v5l8-8-8-8v5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/ArrowThickUp.js b/packages/loot-design/src/svg/v1/ArrowThickUp.jsindex 0d722a70e2..36ead7ca8b 100644--- a/packages/loot-design/src/svg/v1/ArrowThickUp.js+++ b/packages/loot-design/src/svg/v1/ArrowThickUp.js@@ -7,7 +7,7 @@ const SvgArrowThickUp = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M7 10v8h6v-8h5l-8-8-8 8h5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/ArrowThinDown.js b/packages/loot-design/src/svg/v1/ArrowThinDown.jsindex 44d7e32243..c738b49c98 100644--- a/packages/loot-design/src/svg/v1/ArrowThinDown.js+++ b/packages/loot-design/src/svg/v1/ArrowThinDown.js@@ -7,7 +7,7 @@ const SvgArrowThinDown = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowThinLeft.js b/packages/loot-design/src/svg/v1/ArrowThinLeft.jsindex 7ba23705ee..f98a581d68 100644--- a/packages/loot-design/src/svg/v1/ArrowThinLeft.js+++ b/packages/loot-design/src/svg/v1/ArrowThinLeft.js@@ -7,7 +7,7 @@ const SvgArrowThinLeft = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowThinRight.js b/packages/loot-design/src/svg/v1/ArrowThinRight.jsindex 7291e35e95..5cf3c8e96f 100644--- a/packages/loot-design/src/svg/v1/ArrowThinRight.js+++ b/packages/loot-design/src/svg/v1/ArrowThinRight.js@@ -7,7 +7,7 @@ const SvgArrowThinRight = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowThinUp.js b/packages/loot-design/src/svg/v1/ArrowThinUp.jsindex fff2cb43f7..508627a206 100644--- a/packages/loot-design/src/svg/v1/ArrowThinUp.js+++ b/packages/loot-design/src/svg/v1/ArrowThinUp.js@@ -7,7 +7,7 @@ const SvgArrowThinUp = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ArrowUp.js b/packages/loot-design/src/svg/v1/ArrowUp.jsindex 19ff8f9446..aa9b10e122 100644--- a/packages/loot-design/src/svg/v1/ArrowUp.js+++ b/packages/loot-design/src/svg/v1/ArrowUp.js@@ -7,7 +7,7 @@ const SvgArrowUp = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Artist.js b/packages/loot-design/src/svg/v1/Artist.jsindex 6138c430a2..c0e98a5bfc 100644--- a/packages/loot-design/src/svg/v1/Artist.js+++ b/packages/loot-design/src/svg/v1/Artist.js@@ -7,7 +7,7 @@ const SvgArtist = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/AtSymbol.js b/packages/loot-design/src/svg/v1/AtSymbol.jsindex b8864865d3..288fed788e 100644--- a/packages/loot-design/src/svg/v1/AtSymbol.js+++ b/packages/loot-design/src/svg/v1/AtSymbol.js@@ -7,7 +7,7 @@ const SvgAtSymbol = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Attachment.js b/packages/loot-design/src/svg/v1/Attachment.jsindex ae1c21c348..c4c9eeb040 100644--- a/packages/loot-design/src/svg/v1/Attachment.js+++ b/packages/loot-design/src/svg/v1/Attachment.js@@ -7,7 +7,7 @@ const SvgAttachment = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Backspace.js b/packages/loot-design/src/svg/v1/Backspace.jsindex 09f05a2d3a..4d554e36ce 100644--- a/packages/loot-design/src/svg/v1/Backspace.js+++ b/packages/loot-design/src/svg/v1/Backspace.js@@ -7,7 +7,7 @@ const SvgBackspace = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Backward.js b/packages/loot-design/src/svg/v1/Backward.jsindex 66c6ffd5dd..3663e7133e 100644--- a/packages/loot-design/src/svg/v1/Backward.js+++ b/packages/loot-design/src/svg/v1/Backward.js@@ -7,7 +7,7 @@ const SvgBackward = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M19 5v10l-9-5 9-5zm-9 0v10l-9-5 9-5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/BackwardStep.js b/packages/loot-design/src/svg/v1/BackwardStep.jsindex 06de029338..c7d0e852c0 100644--- a/packages/loot-design/src/svg/v1/BackwardStep.js+++ b/packages/loot-design/src/svg/v1/BackwardStep.js@@ -7,7 +7,7 @@ const SvgBackwardStep = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M4 5h3v10H4V5zm12 0v10l-9-5 9-5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/Badge.js b/packages/loot-design/src/svg/v1/Badge.jsindex 0c278bce4e..e8854fb721 100644--- a/packages/loot-design/src/svg/v1/Badge.js+++ b/packages/loot-design/src/svg/v1/Badge.js@@ -7,7 +7,7 @@ const SvgBadge = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BatteryFull.js b/packages/loot-design/src/svg/v1/BatteryFull.jsindex 704eb4a09c..b3215b554d 100644--- a/packages/loot-design/src/svg/v1/BatteryFull.js+++ b/packages/loot-design/src/svg/v1/BatteryFull.js@@ -7,7 +7,7 @@ const SvgBatteryFull = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BatteryHalf.js b/packages/loot-design/src/svg/v1/BatteryHalf.jsindex 5c768cdd05..47702d9fca 100644--- a/packages/loot-design/src/svg/v1/BatteryHalf.js+++ b/packages/loot-design/src/svg/v1/BatteryHalf.js@@ -7,7 +7,7 @@ const SvgBatteryHalf = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BatteryLow.js b/packages/loot-design/src/svg/v1/BatteryLow.jsindex 3d81c286a9..fdcb8ca32d 100644--- a/packages/loot-design/src/svg/v1/BatteryLow.js+++ b/packages/loot-design/src/svg/v1/BatteryLow.js@@ -7,7 +7,7 @@ const SvgBatteryLow = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Beverage.js b/packages/loot-design/src/svg/v1/Beverage.jsindex fd398c424a..015a16109b 100644--- a/packages/loot-design/src/svg/v1/Beverage.js+++ b/packages/loot-design/src/svg/v1/Beverage.js@@ -7,7 +7,7 @@ const SvgBeverage = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Block.js b/packages/loot-design/src/svg/v1/Block.jsindex 4130d13b89..1e6287dfde 100644--- a/packages/loot-design/src/svg/v1/Block.js+++ b/packages/loot-design/src/svg/v1/Block.js@@ -7,7 +7,7 @@ const SvgBlock = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Bluetooth.js b/packages/loot-design/src/svg/v1/Bluetooth.jsindex 5cac233e5c..c92349d3d9 100644--- a/packages/loot-design/src/svg/v1/Bluetooth.js+++ b/packages/loot-design/src/svg/v1/Bluetooth.js@@ -7,7 +7,7 @@ const SvgBluetooth = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Bolt.js b/packages/loot-design/src/svg/v1/Bolt.jsindex b9527f636b..a6454df584 100644--- a/packages/loot-design/src/svg/v1/Bolt.js+++ b/packages/loot-design/src/svg/v1/Bolt.js@@ -7,7 +7,7 @@ const SvgBolt = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M13 8V0L8.11 5.87 3 12h4v8L17 8h-4z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/BookReference.js b/packages/loot-design/src/svg/v1/BookReference.jsindex 24dd7a898f..93bdb0fcad 100644--- a/packages/loot-design/src/svg/v1/BookReference.js+++ b/packages/loot-design/src/svg/v1/BookReference.js@@ -7,7 +7,7 @@ const SvgBookReference = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Bookmark.js b/packages/loot-design/src/svg/v1/Bookmark.jsindex f5c85b3196..536e81fa46 100644--- a/packages/loot-design/src/svg/v1/Bookmark.js+++ b/packages/loot-design/src/svg/v1/Bookmark.js@@ -7,7 +7,7 @@ const SvgBookmark = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BookmarkCopy2.js b/packages/loot-design/src/svg/v1/BookmarkCopy2.jsindex e100e6f820..96ade81bf6 100644--- a/packages/loot-design/src/svg/v1/BookmarkCopy2.js+++ b/packages/loot-design/src/svg/v1/BookmarkCopy2.js@@ -7,7 +7,7 @@ const SvgBookmarkCopy2 = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M18 12v1H8v5l-6-6 6-6v5h8V2h2z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/BookmarkCopy3.js b/packages/loot-design/src/svg/v1/BookmarkCopy3.jsindex e3ccad7ae4..e6d49a0495 100644--- a/packages/loot-design/src/svg/v1/BookmarkCopy3.js+++ b/packages/loot-design/src/svg/v1/BookmarkCopy3.js@@ -7,7 +7,7 @@ const SvgBookmarkCopy3 = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M3.5 13H12v5l6-6-6-6v5H4V2H2v11z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/BookmarkOutline.js b/packages/loot-design/src/svg/v1/BookmarkOutline.jsindex 08bf96d8b8..5a6a97876d 100644--- a/packages/loot-design/src/svg/v1/BookmarkOutline.js+++ b/packages/loot-design/src/svg/v1/BookmarkOutline.js@@ -7,7 +7,7 @@ const SvgBookmarkOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BookmarkOutlineAdd.js b/packages/loot-design/src/svg/v1/BookmarkOutlineAdd.jsindex b406cd7921..c3d798eaf0 100644--- a/packages/loot-design/src/svg/v1/BookmarkOutlineAdd.js+++ b/packages/loot-design/src/svg/v1/BookmarkOutlineAdd.js@@ -7,7 +7,7 @@ const SvgBookmarkOutlineAdd = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BorderAll.js b/packages/loot-design/src/svg/v1/BorderAll.jsindex d917cd94f3..b64ef210c4 100644--- a/packages/loot-design/src/svg/v1/BorderAll.js+++ b/packages/loot-design/src/svg/v1/BorderAll.js@@ -7,7 +7,7 @@ const SvgBorderAll = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BorderBottom.js b/packages/loot-design/src/svg/v1/BorderBottom.jsindex 4307642399..28b74b92cf 100644--- a/packages/loot-design/src/svg/v1/BorderBottom.js+++ b/packages/loot-design/src/svg/v1/BorderBottom.js@@ -7,7 +7,7 @@ const SvgBorderBottom = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BorderHorizontal.js b/packages/loot-design/src/svg/v1/BorderHorizontal.jsindex d791fe8a91..dcd5a68cee 100644--- a/packages/loot-design/src/svg/v1/BorderHorizontal.js+++ b/packages/loot-design/src/svg/v1/BorderHorizontal.js@@ -7,7 +7,7 @@ const SvgBorderHorizontal = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BorderInner.js b/packages/loot-design/src/svg/v1/BorderInner.jsindex af0854dfef..cad6aafef6 100644--- a/packages/loot-design/src/svg/v1/BorderInner.js+++ b/packages/loot-design/src/svg/v1/BorderInner.js@@ -7,7 +7,7 @@ const SvgBorderInner = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BorderLeft.js b/packages/loot-design/src/svg/v1/BorderLeft.jsindex 71cd7b89b4..512b903090 100644--- a/packages/loot-design/src/svg/v1/BorderLeft.js+++ b/packages/loot-design/src/svg/v1/BorderLeft.js@@ -7,7 +7,7 @@ const SvgBorderLeft = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BorderNone.js b/packages/loot-design/src/svg/v1/BorderNone.jsindex d1abde369e..d7cd2d8560 100644--- a/packages/loot-design/src/svg/v1/BorderNone.js+++ b/packages/loot-design/src/svg/v1/BorderNone.js@@ -7,7 +7,7 @@ const SvgBorderNone = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BorderOuter.js b/packages/loot-design/src/svg/v1/BorderOuter.jsindex 3ba141ad7e..b72304cbcf 100644--- a/packages/loot-design/src/svg/v1/BorderOuter.js+++ b/packages/loot-design/src/svg/v1/BorderOuter.js@@ -7,7 +7,7 @@ const SvgBorderOuter = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BorderRight.js b/packages/loot-design/src/svg/v1/BorderRight.jsindex 618093c51a..b83bac8653 100644--- a/packages/loot-design/src/svg/v1/BorderRight.js+++ b/packages/loot-design/src/svg/v1/BorderRight.js@@ -7,7 +7,7 @@ const SvgBorderRight = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BorderTop.js b/packages/loot-design/src/svg/v1/BorderTop.jsindex b093a8bfea..c65a60bc6b 100644--- a/packages/loot-design/src/svg/v1/BorderTop.js+++ b/packages/loot-design/src/svg/v1/BorderTop.js@@ -7,7 +7,7 @@ const SvgBorderTop = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BorderVertical.js b/packages/loot-design/src/svg/v1/BorderVertical.jsindex 50058ee297..80b3c14d5a 100644--- a/packages/loot-design/src/svg/v1/BorderVertical.js+++ b/packages/loot-design/src/svg/v1/BorderVertical.js@@ -7,7 +7,7 @@ const SvgBorderVertical = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Box.js b/packages/loot-design/src/svg/v1/Box.jsindex e9235d3b0b..a99be93761 100644--- a/packages/loot-design/src/svg/v1/Box.js+++ b/packages/loot-design/src/svg/v1/Box.js@@ -7,7 +7,7 @@ const SvgBox = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BrightnessDown.js b/packages/loot-design/src/svg/v1/BrightnessDown.jsindex a09164eba9..39b1c80cf5 100644--- a/packages/loot-design/src/svg/v1/BrightnessDown.js+++ b/packages/loot-design/src/svg/v1/BrightnessDown.js@@ -7,7 +7,7 @@ const SvgBrightnessDown = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BrightnessUp.js b/packages/loot-design/src/svg/v1/BrightnessUp.jsindex 57833fcae7..d95c5448a0 100644--- a/packages/loot-design/src/svg/v1/BrightnessUp.js+++ b/packages/loot-design/src/svg/v1/BrightnessUp.js@@ -7,7 +7,7 @@ const SvgBrightnessUp = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BrowserWindow.js b/packages/loot-design/src/svg/v1/BrowserWindow.jsindex 2acf3386d1..ecf9c25cc6 100644--- a/packages/loot-design/src/svg/v1/BrowserWindow.js+++ b/packages/loot-design/src/svg/v1/BrowserWindow.js@@ -7,7 +7,7 @@ const SvgBrowserWindow = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BrowserWindowNew.js b/packages/loot-design/src/svg/v1/BrowserWindowNew.jsindex bd57e3deeb..d736ddbe18 100644--- a/packages/loot-design/src/svg/v1/BrowserWindowNew.js+++ b/packages/loot-design/src/svg/v1/BrowserWindowNew.js@@ -7,7 +7,7 @@ const SvgBrowserWindowNew = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/BrowserWindowOpen.js b/packages/loot-design/src/svg/v1/BrowserWindowOpen.jsindex ecf00fb41b..0c558d8c06 100644--- a/packages/loot-design/src/svg/v1/BrowserWindowOpen.js+++ b/packages/loot-design/src/svg/v1/BrowserWindowOpen.js@@ -7,7 +7,7 @@ const SvgBrowserWindowOpen = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Bug.js b/packages/loot-design/src/svg/v1/Bug.jsindex d699197d19..7061836121 100644--- a/packages/loot-design/src/svg/v1/Bug.js+++ b/packages/loot-design/src/svg/v1/Bug.js@@ -7,7 +7,7 @@ const SvgBug = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Buoy.js b/packages/loot-design/src/svg/v1/Buoy.jsindex a5c070fc2c..070ed609cb 100644--- a/packages/loot-design/src/svg/v1/Buoy.js+++ b/packages/loot-design/src/svg/v1/Buoy.js@@ -7,7 +7,7 @@ const SvgBuoy = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Calculator.js b/packages/loot-design/src/svg/v1/Calculator.jsindex 09f40db01a..836a8fcca7 100644--- a/packages/loot-design/src/svg/v1/Calculator.js+++ b/packages/loot-design/src/svg/v1/Calculator.js@@ -7,7 +7,7 @@ const SvgCalculator = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Calendar.js b/packages/loot-design/src/svg/v1/Calendar.jsindex bede4c69a7..6b2bd5545f 100644--- a/packages/loot-design/src/svg/v1/Calendar.js+++ b/packages/loot-design/src/svg/v1/Calendar.js@@ -7,7 +7,7 @@ const SvgCalendar = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Camera.js b/packages/loot-design/src/svg/v1/Camera.jsindex d912d28196..3beb55bfd7 100644--- a/packages/loot-design/src/svg/v1/Camera.js+++ b/packages/loot-design/src/svg/v1/Camera.js@@ -7,7 +7,7 @@ const SvgCamera = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Chart.js b/packages/loot-design/src/svg/v1/Chart.jsindex 12ae0a4fe9..55a10b5b09 100644--- a/packages/loot-design/src/svg/v1/Chart.js+++ b/packages/loot-design/src/svg/v1/Chart.js@@ -7,7 +7,7 @@ const SvgChart = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ChartBar.js b/packages/loot-design/src/svg/v1/ChartBar.jsindex db8922d00d..aa2ced8efe 100644--- a/packages/loot-design/src/svg/v1/ChartBar.js+++ b/packages/loot-design/src/svg/v1/ChartBar.js@@ -7,7 +7,7 @@ const SvgChartBar = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ChartPie.js b/packages/loot-design/src/svg/v1/ChartPie.jsindex 5e975f2663..dda1bb277f 100644--- a/packages/loot-design/src/svg/v1/ChartPie.js+++ b/packages/loot-design/src/svg/v1/ChartPie.js@@ -7,7 +7,7 @@ const SvgChartPie = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ChatBubbleDots.js b/packages/loot-design/src/svg/v1/ChatBubbleDots.jsindex 57772d0fc7..66e565eb26 100644--- a/packages/loot-design/src/svg/v1/ChatBubbleDots.js+++ b/packages/loot-design/src/svg/v1/ChatBubbleDots.js@@ -7,7 +7,7 @@ const SvgChatBubbleDots = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CheckAlternative.js b/packages/loot-design/src/svg/v1/CheckAlternative.jsindex a18c9949bd..1df0a20c63 100644--- a/packages/loot-design/src/svg/v1/CheckAlternative.js+++ b/packages/loot-design/src/svg/v1/CheckAlternative.js@@ -7,7 +7,7 @@ const SvgCheckAlternative = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Checkmark.js b/packages/loot-design/src/svg/v1/Checkmark.jsindex 403ceafc18..80d406972e 100644--- a/packages/loot-design/src/svg/v1/Checkmark.js+++ b/packages/loot-design/src/svg/v1/Checkmark.js@@ -7,7 +7,7 @@ const SvgCheckmark = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="m0 11 2-2 5 5L18 3l2 2L7 18z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/CheckmarkOutline.js b/packages/loot-design/src/svg/v1/CheckmarkOutline.jsindex 04e31e0ae0..4dcab0d0bd 100644--- a/packages/loot-design/src/svg/v1/CheckmarkOutline.js+++ b/packages/loot-design/src/svg/v1/CheckmarkOutline.js@@ -7,7 +7,7 @@ const SvgCheckmarkOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CheveronDown.js b/packages/loot-design/src/svg/v1/CheveronDown.jsindex 71482700c2..dd7d9c9e1e 100644--- a/packages/loot-design/src/svg/v1/CheveronDown.js+++ b/packages/loot-design/src/svg/v1/CheveronDown.js@@ -7,7 +7,7 @@ const SvgCheveronDown = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CheveronLeft.js b/packages/loot-design/src/svg/v1/CheveronLeft.jsindex 0076152608..802642772c 100644--- a/packages/loot-design/src/svg/v1/CheveronLeft.js+++ b/packages/loot-design/src/svg/v1/CheveronLeft.js@@ -7,7 +7,7 @@ const SvgCheveronLeft = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CheveronOutlineDown.js b/packages/loot-design/src/svg/v1/CheveronOutlineDown.jsindex e43db1da0d..88efc51465 100644--- a/packages/loot-design/src/svg/v1/CheveronOutlineDown.js+++ b/packages/loot-design/src/svg/v1/CheveronOutlineDown.js@@ -7,7 +7,7 @@ const SvgCheveronOutlineDown = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CheveronOutlineLeft.js b/packages/loot-design/src/svg/v1/CheveronOutlineLeft.jsindex f50794db45..0c6b24494f 100644--- a/packages/loot-design/src/svg/v1/CheveronOutlineLeft.js+++ b/packages/loot-design/src/svg/v1/CheveronOutlineLeft.js@@ -7,7 +7,7 @@ const SvgCheveronOutlineLeft = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CheveronOutlineRight.js b/packages/loot-design/src/svg/v1/CheveronOutlineRight.jsindex 5767e24fa1..78ba23bb53 100644--- a/packages/loot-design/src/svg/v1/CheveronOutlineRight.js+++ b/packages/loot-design/src/svg/v1/CheveronOutlineRight.js@@ -7,7 +7,7 @@ const SvgCheveronOutlineRight = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CheveronOutlineUp.js b/packages/loot-design/src/svg/v1/CheveronOutlineUp.jsindex f331913a26..313e93937f 100644--- a/packages/loot-design/src/svg/v1/CheveronOutlineUp.js+++ b/packages/loot-design/src/svg/v1/CheveronOutlineUp.js@@ -7,7 +7,7 @@ const SvgCheveronOutlineUp = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CheveronRight.js b/packages/loot-design/src/svg/v1/CheveronRight.jsindex b33e96060e..f205fbfda3 100644--- a/packages/loot-design/src/svg/v1/CheveronRight.js+++ b/packages/loot-design/src/svg/v1/CheveronRight.js@@ -7,7 +7,7 @@ const SvgCheveronRight = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CheveronUp.js b/packages/loot-design/src/svg/v1/CheveronUp.jsindex 282ebdd1fb..0ec4051413 100644--- a/packages/loot-design/src/svg/v1/CheveronUp.js+++ b/packages/loot-design/src/svg/v1/CheveronUp.js@@ -7,7 +7,7 @@ const SvgCheveronUp = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Clipboard.js b/packages/loot-design/src/svg/v1/Clipboard.jsindex a73980bce9..db91196c0a 100644--- a/packages/loot-design/src/svg/v1/Clipboard.js+++ b/packages/loot-design/src/svg/v1/Clipboard.js@@ -7,7 +7,7 @@ const SvgClipboard = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Close.js b/packages/loot-design/src/svg/v1/Close.jsindex caf5bb0c35..c47a8f7122 100644--- a/packages/loot-design/src/svg/v1/Close.js+++ b/packages/loot-design/src/svg/v1/Close.js@@ -7,7 +7,7 @@ const SvgClose = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CloseOutline.js b/packages/loot-design/src/svg/v1/CloseOutline.jsindex 18241fe12e..9811ead6dd 100644--- a/packages/loot-design/src/svg/v1/CloseOutline.js+++ b/packages/loot-design/src/svg/v1/CloseOutline.js@@ -7,7 +7,7 @@ const SvgCloseOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CloseSolid.js b/packages/loot-design/src/svg/v1/CloseSolid.jsindex 14c8c534ee..15bcee59e2 100644--- a/packages/loot-design/src/svg/v1/CloseSolid.js+++ b/packages/loot-design/src/svg/v1/CloseSolid.js@@ -7,7 +7,7 @@ const SvgCloseSolid = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Cloud.js b/packages/loot-design/src/svg/v1/Cloud.jsindex cb0543314a..4cb6e14b7b 100644--- a/packages/loot-design/src/svg/v1/Cloud.js+++ b/packages/loot-design/src/svg/v1/Cloud.js@@ -7,7 +7,7 @@ const SvgCloud = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CloudCheck.js b/packages/loot-design/src/svg/v1/CloudCheck.jsindex 9b6110c93e..a9e137e711 100644--- a/packages/loot-design/src/svg/v1/CloudCheck.js+++ b/packages/loot-design/src/svg/v1/CloudCheck.js@@ -7,7 +7,7 @@ const SvgCloudCheck = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CloudDownload.js b/packages/loot-design/src/svg/v1/CloudDownload.jsindex 752e875af4..0f29d175e2 100644--- a/packages/loot-design/src/svg/v1/CloudDownload.js+++ b/packages/loot-design/src/svg/v1/CloudDownload.js@@ -7,7 +7,7 @@ const SvgCloudDownload = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CloudUpload.js b/packages/loot-design/src/svg/v1/CloudUpload.jsindex 6f151a3635..34aef75c15 100644--- a/packages/loot-design/src/svg/v1/CloudUpload.js+++ b/packages/loot-design/src/svg/v1/CloudUpload.js@@ -7,7 +7,7 @@ const SvgCloudUpload = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CloudWarning.js b/packages/loot-design/src/svg/v1/CloudWarning.jsindex 0101ea7b0c..4afd4c5f77 100644--- a/packages/loot-design/src/svg/v1/CloudWarning.js+++ b/packages/loot-design/src/svg/v1/CloudWarning.js@@ -7,7 +7,7 @@ const SvgCloudWarning = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Code.js b/packages/loot-design/src/svg/v1/Code.jsindex ab4a15035d..c7c2d63897 100644--- a/packages/loot-design/src/svg/v1/Code.js+++ b/packages/loot-design/src/svg/v1/Code.js@@ -7,7 +7,7 @@ const SvgCode = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Coffee.js b/packages/loot-design/src/svg/v1/Coffee.jsindex 646234d246..516e961241 100644--- a/packages/loot-design/src/svg/v1/Coffee.js+++ b/packages/loot-design/src/svg/v1/Coffee.js@@ -7,7 +7,7 @@ const SvgCoffee = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Cog.js b/packages/loot-design/src/svg/v1/Cog.jsindex 805e863bf5..054ed004db 100644--- a/packages/loot-design/src/svg/v1/Cog.js+++ b/packages/loot-design/src/svg/v1/Cog.js@@ -7,7 +7,7 @@ const SvgCog = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ColorPalette.js b/packages/loot-design/src/svg/v1/ColorPalette.jsindex b32da3526b..2b79e39656 100644--- a/packages/loot-design/src/svg/v1/ColorPalette.js+++ b/packages/loot-design/src/svg/v1/ColorPalette.js@@ -7,7 +7,7 @@ const SvgColorPalette = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Compose.js b/packages/loot-design/src/svg/v1/Compose.jsindex 194f5662ce..ddaf659903 100644--- a/packages/loot-design/src/svg/v1/Compose.js+++ b/packages/loot-design/src/svg/v1/Compose.js@@ -7,7 +7,7 @@ const SvgCompose = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ComputerDesktop.js b/packages/loot-design/src/svg/v1/ComputerDesktop.jsindex 732fdb33c0..c4262a1f4f 100644--- a/packages/loot-design/src/svg/v1/ComputerDesktop.js+++ b/packages/loot-design/src/svg/v1/ComputerDesktop.js@@ -7,7 +7,7 @@ const SvgComputerDesktop = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ComputerLaptop.js b/packages/loot-design/src/svg/v1/ComputerLaptop.jsindex 5f8a811f70..5076f9d71d 100644--- a/packages/loot-design/src/svg/v1/ComputerLaptop.js+++ b/packages/loot-design/src/svg/v1/ComputerLaptop.js@@ -7,7 +7,7 @@ const SvgComputerLaptop = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Conversation.js b/packages/loot-design/src/svg/v1/Conversation.jsindex 1b89ea05a3..45b4bb8d41 100644--- a/packages/loot-design/src/svg/v1/Conversation.js+++ b/packages/loot-design/src/svg/v1/Conversation.js@@ -7,7 +7,7 @@ const SvgConversation = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Copy.js b/packages/loot-design/src/svg/v1/Copy.jsindex 9371772d37..13a11756a5 100644--- a/packages/loot-design/src/svg/v1/Copy.js+++ b/packages/loot-design/src/svg/v1/Copy.js@@ -7,7 +7,7 @@ const SvgCopy = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CreditCard.js b/packages/loot-design/src/svg/v1/CreditCard.jsindex c9f256a52d..185a544fb5 100644--- a/packages/loot-design/src/svg/v1/CreditCard.js+++ b/packages/loot-design/src/svg/v1/CreditCard.js@@ -7,7 +7,7 @@ const SvgCreditCard = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/CurrencyDollar.js b/packages/loot-design/src/svg/v1/CurrencyDollar.jsindex f742a76fde..0abae4d186 100644--- a/packages/loot-design/src/svg/v1/CurrencyDollar.js+++ b/packages/loot-design/src/svg/v1/CurrencyDollar.js@@ -7,7 +7,7 @@ const SvgCurrencyDollar = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Dashboard.js b/packages/loot-design/src/svg/v1/Dashboard.jsindex aed5430839..602df569c8 100644--- a/packages/loot-design/src/svg/v1/Dashboard.js+++ b/packages/loot-design/src/svg/v1/Dashboard.js@@ -7,7 +7,7 @@ const SvgDashboard = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/DateAdd.js b/packages/loot-design/src/svg/v1/DateAdd.jsindex cc2e3733bd..c49cd3df41 100644--- a/packages/loot-design/src/svg/v1/DateAdd.js+++ b/packages/loot-design/src/svg/v1/DateAdd.js@@ -7,7 +7,7 @@ const SvgDateAdd = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/DialPad.js b/packages/loot-design/src/svg/v1/DialPad.jsindex b0ee040f07..7c098bfa90 100644--- a/packages/loot-design/src/svg/v1/DialPad.js+++ b/packages/loot-design/src/svg/v1/DialPad.js@@ -7,7 +7,7 @@ const SvgDialPad = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Directions.js b/packages/loot-design/src/svg/v1/Directions.jsindex 125305b648..72b1097cb0 100644--- a/packages/loot-design/src/svg/v1/Directions.js+++ b/packages/loot-design/src/svg/v1/Directions.js@@ -7,7 +7,7 @@ const SvgDirections = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Document.js b/packages/loot-design/src/svg/v1/Document.jsindex 921539dfa1..29f5acb123 100644--- a/packages/loot-design/src/svg/v1/Document.js+++ b/packages/loot-design/src/svg/v1/Document.js@@ -7,7 +7,7 @@ const SvgDocument = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/DocumentAdd.js b/packages/loot-design/src/svg/v1/DocumentAdd.jsindex 2dbe89f312..179d05011f 100644--- a/packages/loot-design/src/svg/v1/DocumentAdd.js+++ b/packages/loot-design/src/svg/v1/DocumentAdd.js@@ -7,7 +7,7 @@ const SvgDocumentAdd = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/DotsHorizontalDouble.js b/packages/loot-design/src/svg/v1/DotsHorizontalDouble.jsindex 8f6b3e95fb..63d3ce133a 100644--- a/packages/loot-design/src/svg/v1/DotsHorizontalDouble.js+++ b/packages/loot-design/src/svg/v1/DotsHorizontalDouble.js@@ -7,7 +7,7 @@ const SvgDotsHorizontalDouble = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/DotsHorizontalTriple.js b/packages/loot-design/src/svg/v1/DotsHorizontalTriple.jsindex c83b7c2430..372e1dc71b 100644--- a/packages/loot-design/src/svg/v1/DotsHorizontalTriple.js+++ b/packages/loot-design/src/svg/v1/DotsHorizontalTriple.js@@ -7,7 +7,7 @@ const SvgDotsHorizontalTriple = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Download.js b/packages/loot-design/src/svg/v1/Download.jsindex 11241a93be..1a9d92f5c5 100644--- a/packages/loot-design/src/svg/v1/Download.js+++ b/packages/loot-design/src/svg/v1/Download.js@@ -7,7 +7,7 @@ const SvgDownload = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M13 8V2H7v6H2l8 8 8-8h-5zM0 18h20v2H0v-2z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/Duplicate.js b/packages/loot-design/src/svg/v1/Duplicate.jsindex a083c93a2d..bb489828c4 100644--- a/packages/loot-design/src/svg/v1/Duplicate.js+++ b/packages/loot-design/src/svg/v1/Duplicate.js@@ -7,7 +7,7 @@ const SvgDuplicate = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/EditCopy.js b/packages/loot-design/src/svg/v1/EditCopy.jsindex 202fb433b0..020fd38f92 100644--- a/packages/loot-design/src/svg/v1/EditCopy.js+++ b/packages/loot-design/src/svg/v1/EditCopy.js@@ -7,7 +7,7 @@ const SvgEditCopy = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/EditCrop.js b/packages/loot-design/src/svg/v1/EditCrop.jsindex 7fce885286..5acd2532c9 100644--- a/packages/loot-design/src/svg/v1/EditCrop.js+++ b/packages/loot-design/src/svg/v1/EditCrop.js@@ -7,7 +7,7 @@ const SvgEditCrop = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/EditCut.js b/packages/loot-design/src/svg/v1/EditCut.jsindex 8ea41d28a2..48327b27ad 100644--- a/packages/loot-design/src/svg/v1/EditCut.js+++ b/packages/loot-design/src/svg/v1/EditCut.js@@ -7,7 +7,7 @@ const SvgEditCut = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/EditPencil.js b/packages/loot-design/src/svg/v1/EditPencil.jsindex e09b1a16af..82b9f58723 100644--- a/packages/loot-design/src/svg/v1/EditPencil.js+++ b/packages/loot-design/src/svg/v1/EditPencil.js@@ -7,7 +7,7 @@ const SvgEditPencil = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Education.js b/packages/loot-design/src/svg/v1/Education.jsindex 7915ffe4f9..14237be280 100644--- a/packages/loot-design/src/svg/v1/Education.js+++ b/packages/loot-design/src/svg/v1/Education.js@@ -7,7 +7,7 @@ const SvgEducation = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Envelope.js b/packages/loot-design/src/svg/v1/Envelope.jsindex b881f7fb3e..c987048f08 100644--- a/packages/loot-design/src/svg/v1/Envelope.js+++ b/packages/loot-design/src/svg/v1/Envelope.js@@ -7,7 +7,7 @@ const SvgEnvelope = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Equals.js b/packages/loot-design/src/svg/v1/Equals.jsindex b84c9d2adc..b1f52accfc 100644--- a/packages/loot-design/src/svg/v1/Equals.js+++ b/packages/loot-design/src/svg/v1/Equals.js@@ -7,7 +7,7 @@ const SvgEquals = props => (xmlns="http://www.w3.org/2000/svg"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ExclamationOutline.js b/packages/loot-design/src/svg/v1/ExclamationOutline.jsindex 518d0c6ff9..ec4535cdf5 100644--- a/packages/loot-design/src/svg/v1/ExclamationOutline.js+++ b/packages/loot-design/src/svg/v1/ExclamationOutline.js@@ -7,7 +7,7 @@ const SvgExclamationOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ExclamationSolid.js b/packages/loot-design/src/svg/v1/ExclamationSolid.jsindex eaf9bccff2..f8bfb0838a 100644--- a/packages/loot-design/src/svg/v1/ExclamationSolid.js+++ b/packages/loot-design/src/svg/v1/ExclamationSolid.js@@ -7,7 +7,7 @@ const SvgExclamationSolid = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Explore.js b/packages/loot-design/src/svg/v1/Explore.jsindex 5e76bb83e1..f477a69036 100644--- a/packages/loot-design/src/svg/v1/Explore.js+++ b/packages/loot-design/src/svg/v1/Explore.js@@ -7,7 +7,7 @@ const SvgExplore = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Factory.js b/packages/loot-design/src/svg/v1/Factory.jsindex 1a5a46f0c0..11c6486bf5 100644--- a/packages/loot-design/src/svg/v1/Factory.js+++ b/packages/loot-design/src/svg/v1/Factory.js@@ -7,7 +7,7 @@ const SvgFactory = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/FastForward.js b/packages/loot-design/src/svg/v1/FastForward.jsindex b8ca952710..a5d6252a25 100644--- a/packages/loot-design/src/svg/v1/FastForward.js+++ b/packages/loot-design/src/svg/v1/FastForward.js@@ -7,7 +7,7 @@ const SvgFastForward = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="m1 5 9 5-9 5V5zm9 0 9 5-9 5V5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/FastRewind.js b/packages/loot-design/src/svg/v1/FastRewind.jsindex 701559d32c..c578a7d78c 100644--- a/packages/loot-design/src/svg/v1/FastRewind.js+++ b/packages/loot-design/src/svg/v1/FastRewind.js@@ -7,7 +7,7 @@ const SvgFastRewind = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M19 5v10l-9-5 9-5zm-9 0v10l-9-5 9-5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/FileDouble.js b/packages/loot-design/src/svg/v1/FileDouble.jsindex be6cd26a94..ac0a4f2f65 100644--- a/packages/loot-design/src/svg/v1/FileDouble.js+++ b/packages/loot-design/src/svg/v1/FileDouble.js@@ -7,7 +7,7 @@ const SvgFileDouble = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Film.js b/packages/loot-design/src/svg/v1/Film.jsindex 7eed330dd3..5c07dd9022 100644--- a/packages/loot-design/src/svg/v1/Film.js+++ b/packages/loot-design/src/svg/v1/Film.js@@ -7,7 +7,7 @@ const SvgFilm = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Filter.js b/packages/loot-design/src/svg/v1/Filter.jsindex 36fb541567..d3894fa76f 100644--- a/packages/loot-design/src/svg/v1/Filter.js+++ b/packages/loot-design/src/svg/v1/Filter.js@@ -7,7 +7,7 @@ const SvgFilter = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="m12 12 8-8V0H0v4l8 8v8l4-4v-4z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/Flag.js b/packages/loot-design/src/svg/v1/Flag.jsindex 09854e1593..e0835115f3 100644--- a/packages/loot-design/src/svg/v1/Flag.js+++ b/packages/loot-design/src/svg/v1/Flag.js@@ -7,7 +7,7 @@ const SvgFlag = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Flashlight.js b/packages/loot-design/src/svg/v1/Flashlight.jsindex 97e5c8ce4c..86e0edfb52 100644--- a/packages/loot-design/src/svg/v1/Flashlight.js+++ b/packages/loot-design/src/svg/v1/Flashlight.js@@ -7,7 +7,7 @@ const SvgFlashlight = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Folder.js b/packages/loot-design/src/svg/v1/Folder.jsindex 298c7b988a..ac3340641f 100644--- a/packages/loot-design/src/svg/v1/Folder.js+++ b/packages/loot-design/src/svg/v1/Folder.js@@ -7,7 +7,7 @@ const SvgFolder = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/FolderOutline.js b/packages/loot-design/src/svg/v1/FolderOutline.jsindex 9ff65ceebd..2aea40e33c 100644--- a/packages/loot-design/src/svg/v1/FolderOutline.js+++ b/packages/loot-design/src/svg/v1/FolderOutline.js@@ -7,7 +7,7 @@ const SvgFolderOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/FolderOutlineAdd.js b/packages/loot-design/src/svg/v1/FolderOutlineAdd.jsindex 3fb9f37de7..0fee8dc67c 100644--- a/packages/loot-design/src/svg/v1/FolderOutlineAdd.js+++ b/packages/loot-design/src/svg/v1/FolderOutlineAdd.js@@ -7,7 +7,7 @@ const SvgFolderOutlineAdd = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/FormatBold.js b/packages/loot-design/src/svg/v1/FormatBold.jsindex 66c85fa894..5905bd913f 100644--- a/packages/loot-design/src/svg/v1/FormatBold.js+++ b/packages/loot-design/src/svg/v1/FormatBold.js@@ -7,7 +7,7 @@ const SvgFormatBold = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/FormatFontSize.js b/packages/loot-design/src/svg/v1/FormatFontSize.jsindex 74d5c1c925..f762b8f67d 100644--- a/packages/loot-design/src/svg/v1/FormatFontSize.js+++ b/packages/loot-design/src/svg/v1/FormatFontSize.js@@ -7,7 +7,7 @@ const SvgFormatFontSize = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/FormatItalic.js b/packages/loot-design/src/svg/v1/FormatItalic.jsindex 19df60f04b..14b787b7be 100644--- a/packages/loot-design/src/svg/v1/FormatItalic.js+++ b/packages/loot-design/src/svg/v1/FormatItalic.js@@ -7,7 +7,7 @@ const SvgFormatItalic = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/FormatTextSize.js b/packages/loot-design/src/svg/v1/FormatTextSize.jsindex 52b5caf64d..ed8bcf8bf7 100644--- a/packages/loot-design/src/svg/v1/FormatTextSize.js+++ b/packages/loot-design/src/svg/v1/FormatTextSize.js@@ -7,7 +7,7 @@ const SvgFormatTextSize = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/FormatUnderline.js b/packages/loot-design/src/svg/v1/FormatUnderline.jsindex fec2866f6b..d9cf5e762b 100644--- a/packages/loot-design/src/svg/v1/FormatUnderline.js+++ b/packages/loot-design/src/svg/v1/FormatUnderline.js@@ -7,7 +7,7 @@ const SvgFormatUnderline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Forward.js b/packages/loot-design/src/svg/v1/Forward.jsindex 4510796445..7c231595e3 100644--- a/packages/loot-design/src/svg/v1/Forward.js+++ b/packages/loot-design/src/svg/v1/Forward.js@@ -7,7 +7,7 @@ const SvgForward = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="m1 5 9 5-9 5V5zm9 0 9 5-9 5V5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/ForwardStep.js b/packages/loot-design/src/svg/v1/ForwardStep.jsindex 3d0a8baf9a..8f1082c13e 100644--- a/packages/loot-design/src/svg/v1/ForwardStep.js+++ b/packages/loot-design/src/svg/v1/ForwardStep.js@@ -7,7 +7,7 @@ const SvgForwardStep = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M13 5h3v10h-3V5zM4 5l9 5-9 5V5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/Gift.js b/packages/loot-design/src/svg/v1/Gift.jsindex 1e4814f52b..4fedb579d9 100644--- a/packages/loot-design/src/svg/v1/Gift.js+++ b/packages/loot-design/src/svg/v1/Gift.js@@ -7,7 +7,7 @@ const SvgGift = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Globe.js b/packages/loot-design/src/svg/v1/Globe.jsindex 155bdea921..7734c8dfb9 100644--- a/packages/loot-design/src/svg/v1/Globe.js+++ b/packages/loot-design/src/svg/v1/Globe.js@@ -7,7 +7,7 @@ const SvgGlobe = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/HandStop.js b/packages/loot-design/src/svg/v1/HandStop.jsindex 832ea14dcb..8befb5c587 100644--- a/packages/loot-design/src/svg/v1/HandStop.js+++ b/packages/loot-design/src/svg/v1/HandStop.js@@ -7,7 +7,7 @@ const SvgHandStop = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/HardDrive.js b/packages/loot-design/src/svg/v1/HardDrive.jsindex 0f76120113..4c18cfa245 100644--- a/packages/loot-design/src/svg/v1/HardDrive.js+++ b/packages/loot-design/src/svg/v1/HardDrive.js@@ -7,7 +7,7 @@ const SvgHardDrive = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Headphones.js b/packages/loot-design/src/svg/v1/Headphones.jsindex 8c345fb7fc..0eeee8d0fa 100644--- a/packages/loot-design/src/svg/v1/Headphones.js+++ b/packages/loot-design/src/svg/v1/Headphones.js@@ -7,7 +7,7 @@ const SvgHeadphones = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Heart.js b/packages/loot-design/src/svg/v1/Heart.jsindex 35621a7cdc..3ffbcf0e54 100644--- a/packages/loot-design/src/svg/v1/Heart.js+++ b/packages/loot-design/src/svg/v1/Heart.js@@ -7,7 +7,7 @@ const SvgHeart = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Home.js b/packages/loot-design/src/svg/v1/Home.jsindex a5d7a92f22..42ff54836f 100644--- a/packages/loot-design/src/svg/v1/Home.js+++ b/packages/loot-design/src/svg/v1/Home.js@@ -7,7 +7,7 @@ const SvgHome = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M8 20H3V10H0L10 0l10 10h-3v10h-5v-6H8v6z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/Hot.js b/packages/loot-design/src/svg/v1/Hot.jsindex 092c6c5510..a72390f6f3 100644--- a/packages/loot-design/src/svg/v1/Hot.js+++ b/packages/loot-design/src/svg/v1/Hot.js@@ -7,7 +7,7 @@ const SvgHot = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/HourGlass.js b/packages/loot-design/src/svg/v1/HourGlass.jsindex 22f3feac7a..c9571fa11f 100644--- a/packages/loot-design/src/svg/v1/HourGlass.js+++ b/packages/loot-design/src/svg/v1/HourGlass.js@@ -7,7 +7,7 @@ const SvgHourGlass = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Inbox.js b/packages/loot-design/src/svg/v1/Inbox.jsindex 0145dd31b2..b7bec08985 100644--- a/packages/loot-design/src/svg/v1/Inbox.js+++ b/packages/loot-design/src/svg/v1/Inbox.js@@ -7,7 +7,7 @@ const SvgInbox = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/InboxCheck.js b/packages/loot-design/src/svg/v1/InboxCheck.jsindex 3e7d899885..2d8a922558 100644--- a/packages/loot-design/src/svg/v1/InboxCheck.js+++ b/packages/loot-design/src/svg/v1/InboxCheck.js@@ -7,7 +7,7 @@ const SvgInboxCheck = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/InboxDownload.js b/packages/loot-design/src/svg/v1/InboxDownload.jsindex a05c0476cc..e61c66c183 100644--- a/packages/loot-design/src/svg/v1/InboxDownload.js+++ b/packages/loot-design/src/svg/v1/InboxDownload.js@@ -7,7 +7,7 @@ const SvgInboxDownload = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/InboxFull.js b/packages/loot-design/src/svg/v1/InboxFull.jsindex 343ef34d68..a955e104eb 100644--- a/packages/loot-design/src/svg/v1/InboxFull.js+++ b/packages/loot-design/src/svg/v1/InboxFull.js@@ -7,7 +7,7 @@ const SvgInboxFull = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/IndentDecrease.js b/packages/loot-design/src/svg/v1/IndentDecrease.jsindex 7417d8337e..899225752b 100644--- a/packages/loot-design/src/svg/v1/IndentDecrease.js+++ b/packages/loot-design/src/svg/v1/IndentDecrease.js@@ -7,7 +7,7 @@ const SvgIndentDecrease = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/IndentIncrease.js b/packages/loot-design/src/svg/v1/IndentIncrease.jsindex 9ac2e14a9c..52b602b0d0 100644--- a/packages/loot-design/src/svg/v1/IndentIncrease.js+++ b/packages/loot-design/src/svg/v1/IndentIncrease.js@@ -7,7 +7,7 @@ const SvgIndentIncrease = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/InformationOutline.js b/packages/loot-design/src/svg/v1/InformationOutline.jsindex 9473376fa9..c5c204f1d5 100644--- a/packages/loot-design/src/svg/v1/InformationOutline.js+++ b/packages/loot-design/src/svg/v1/InformationOutline.js@@ -7,7 +7,7 @@ const SvgInformationOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/InformationSolid.js b/packages/loot-design/src/svg/v1/InformationSolid.jsindex 3561cb849d..26a28366a6 100644--- a/packages/loot-design/src/svg/v1/InformationSolid.js+++ b/packages/loot-design/src/svg/v1/InformationSolid.js@@ -7,7 +7,7 @@ const SvgInformationSolid = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Key.js b/packages/loot-design/src/svg/v1/Key.jsindex c62af86ab9..28cfe6863c 100644--- a/packages/loot-design/src/svg/v1/Key.js+++ b/packages/loot-design/src/svg/v1/Key.js@@ -7,7 +7,7 @@ const SvgKey = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Keyboard.js b/packages/loot-design/src/svg/v1/Keyboard.jsindex c3b9baa747..fc3fb55a5e 100644--- a/packages/loot-design/src/svg/v1/Keyboard.js+++ b/packages/loot-design/src/svg/v1/Keyboard.js@@ -7,7 +7,7 @@ const SvgKeyboard = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Layers.js b/packages/loot-design/src/svg/v1/Layers.jsindex c5be72c009..4e57c9f4a6 100644--- a/packages/loot-design/src/svg/v1/Layers.js+++ b/packages/loot-design/src/svg/v1/Layers.js@@ -7,7 +7,7 @@ const SvgLayers = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Library.js b/packages/loot-design/src/svg/v1/Library.jsindex 7dcb54a325..750752b05f 100644--- a/packages/loot-design/src/svg/v1/Library.js+++ b/packages/loot-design/src/svg/v1/Library.js@@ -7,7 +7,7 @@ const SvgLibrary = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/LightBulb.js b/packages/loot-design/src/svg/v1/LightBulb.jsindex 0c6046a9f8..62b93d64c0 100644--- a/packages/loot-design/src/svg/v1/LightBulb.js+++ b/packages/loot-design/src/svg/v1/LightBulb.js@@ -7,7 +7,7 @@ const SvgLightBulb = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Link.js b/packages/loot-design/src/svg/v1/Link.jsindex 60859bdfa6..958227ed6d 100644--- a/packages/loot-design/src/svg/v1/Link.js+++ b/packages/loot-design/src/svg/v1/Link.js@@ -7,7 +7,7 @@ const SvgLink = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/List.js b/packages/loot-design/src/svg/v1/List.jsindex 55252b1487..c37c1dbf22 100644--- a/packages/loot-design/src/svg/v1/List.js+++ b/packages/loot-design/src/svg/v1/List.js@@ -7,7 +7,7 @@ const SvgList = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ListAdd.js b/packages/loot-design/src/svg/v1/ListAdd.jsindex 8cdea8dee2..db259176ae 100644--- a/packages/loot-design/src/svg/v1/ListAdd.js+++ b/packages/loot-design/src/svg/v1/ListAdd.js@@ -7,7 +7,7 @@ const SvgListAdd = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ListBullet.js b/packages/loot-design/src/svg/v1/ListBullet.jsindex ec96adc5b9..6f54e6871e 100644--- a/packages/loot-design/src/svg/v1/ListBullet.js+++ b/packages/loot-design/src/svg/v1/ListBullet.js@@ -7,7 +7,7 @@ const SvgListBullet = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/LoadBalancer.js b/packages/loot-design/src/svg/v1/LoadBalancer.jsindex 08db7b8e4c..9f56ad5d4c 100644--- a/packages/loot-design/src/svg/v1/LoadBalancer.js+++ b/packages/loot-design/src/svg/v1/LoadBalancer.js@@ -7,7 +7,7 @@ const SvgLoadBalancer = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Location.js b/packages/loot-design/src/svg/v1/Location.jsindex fef513d083..f269ff8dfb 100644--- a/packages/loot-design/src/svg/v1/Location.js+++ b/packages/loot-design/src/svg/v1/Location.js@@ -7,7 +7,7 @@ const SvgLocation = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/LocationCurrent.js b/packages/loot-design/src/svg/v1/LocationCurrent.jsindex 81d944dddb..09884ce547 100644--- a/packages/loot-design/src/svg/v1/LocationCurrent.js+++ b/packages/loot-design/src/svg/v1/LocationCurrent.js@@ -7,7 +7,7 @@ const SvgLocationCurrent = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="m0 0 20 8-8 4-2 8z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/LocationFood.js b/packages/loot-design/src/svg/v1/LocationFood.jsindex f8f58702bc..9c57d196d2 100644--- a/packages/loot-design/src/svg/v1/LocationFood.js+++ b/packages/loot-design/src/svg/v1/LocationFood.js@@ -7,7 +7,7 @@ const SvgLocationFood = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/LocationGasStation.js b/packages/loot-design/src/svg/v1/LocationGasStation.jsindex 31c883701f..676894c1e8 100644--- a/packages/loot-design/src/svg/v1/LocationGasStation.js+++ b/packages/loot-design/src/svg/v1/LocationGasStation.js@@ -7,7 +7,7 @@ const SvgLocationGasStation = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/LocationHotel.js b/packages/loot-design/src/svg/v1/LocationHotel.jsindex 7ea31f0a81..37f5c929a7 100644--- a/packages/loot-design/src/svg/v1/LocationHotel.js+++ b/packages/loot-design/src/svg/v1/LocationHotel.js@@ -7,7 +7,7 @@ const SvgLocationHotel = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/LocationMarina.js b/packages/loot-design/src/svg/v1/LocationMarina.jsindex 962f0dd67c..36504dae1d 100644--- a/packages/loot-design/src/svg/v1/LocationMarina.js+++ b/packages/loot-design/src/svg/v1/LocationMarina.js@@ -7,7 +7,7 @@ const SvgLocationMarina = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/LocationPark.js b/packages/loot-design/src/svg/v1/LocationPark.jsindex bdfc1104fe..d329e30ecf 100644--- a/packages/loot-design/src/svg/v1/LocationPark.js+++ b/packages/loot-design/src/svg/v1/LocationPark.js@@ -7,7 +7,7 @@ const SvgLocationPark = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/LocationRestroom.js b/packages/loot-design/src/svg/v1/LocationRestroom.jsindex 19813b2fc8..67b8d5e4c0 100644--- a/packages/loot-design/src/svg/v1/LocationRestroom.js+++ b/packages/loot-design/src/svg/v1/LocationRestroom.js@@ -7,7 +7,7 @@ const SvgLocationRestroom = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/LocationShopping.js b/packages/loot-design/src/svg/v1/LocationShopping.jsindex b4cb5565b4..a051f9e175 100644--- a/packages/loot-design/src/svg/v1/LocationShopping.js+++ b/packages/loot-design/src/svg/v1/LocationShopping.js@@ -7,7 +7,7 @@ const SvgLocationShopping = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/LockClosed.js b/packages/loot-design/src/svg/v1/LockClosed.jsindex 43f5ff1c53..8eb18037c2 100644--- a/packages/loot-design/src/svg/v1/LockClosed.js+++ b/packages/loot-design/src/svg/v1/LockClosed.js@@ -7,7 +7,7 @@ const SvgLockClosed = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/LockOpen.js b/packages/loot-design/src/svg/v1/LockOpen.jsindex 55c081188b..cd591d452a 100644--- a/packages/loot-design/src/svg/v1/LockOpen.js+++ b/packages/loot-design/src/svg/v1/LockOpen.js@@ -7,7 +7,7 @@ const SvgLockOpen = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Map.js b/packages/loot-design/src/svg/v1/Map.jsindex 351bff61f0..0eab27db35 100644--- a/packages/loot-design/src/svg/v1/Map.js+++ b/packages/loot-design/src/svg/v1/Map.js@@ -7,7 +7,7 @@ const SvgMap = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Menu.js b/packages/loot-design/src/svg/v1/Menu.jsindex addb74a284..1f4bc702e9 100644--- a/packages/loot-design/src/svg/v1/Menu.js+++ b/packages/loot-design/src/svg/v1/Menu.js@@ -7,7 +7,7 @@ const SvgMenu = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/Mic.js b/packages/loot-design/src/svg/v1/Mic.jsindex 8b568e59df..e182ef50b4 100644--- a/packages/loot-design/src/svg/v1/Mic.js+++ b/packages/loot-design/src/svg/v1/Mic.js@@ -7,7 +7,7 @@ const SvgMic = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MinusOutline.js b/packages/loot-design/src/svg/v1/MinusOutline.jsindex 7f8f1b5046..609e5467aa 100644--- a/packages/loot-design/src/svg/v1/MinusOutline.js+++ b/packages/loot-design/src/svg/v1/MinusOutline.js@@ -7,7 +7,7 @@ const SvgMinusOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MinusSolid.js b/packages/loot-design/src/svg/v1/MinusSolid.jsindex c266822a08..5ab6d4da31 100644--- a/packages/loot-design/src/svg/v1/MinusSolid.js+++ b/packages/loot-design/src/svg/v1/MinusSolid.js@@ -7,7 +7,7 @@ const SvgMinusSolid = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MobileDevices.js b/packages/loot-design/src/svg/v1/MobileDevices.jsindex 79024fcbcb..88dcbb47a2 100644--- a/packages/loot-design/src/svg/v1/MobileDevices.js+++ b/packages/loot-design/src/svg/v1/MobileDevices.js@@ -7,7 +7,7 @@ const SvgMobileDevices = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MoneyBag.js b/packages/loot-design/src/svg/v1/MoneyBag.jsindex 76d8065f64..e3dd509888 100644--- a/packages/loot-design/src/svg/v1/MoneyBag.js+++ b/packages/loot-design/src/svg/v1/MoneyBag.js@@ -7,7 +7,7 @@ const SvgMoneyBag = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MoodHappyOutline.js b/packages/loot-design/src/svg/v1/MoodHappyOutline.jsindex 6df1486442..c1d7c41b97 100644--- a/packages/loot-design/src/svg/v1/MoodHappyOutline.js+++ b/packages/loot-design/src/svg/v1/MoodHappyOutline.js@@ -7,7 +7,7 @@ const SvgMoodHappyOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MoodHappySolid.js b/packages/loot-design/src/svg/v1/MoodHappySolid.jsindex 046bbfd697..3ce260d274 100644--- a/packages/loot-design/src/svg/v1/MoodHappySolid.js+++ b/packages/loot-design/src/svg/v1/MoodHappySolid.js@@ -7,7 +7,7 @@ const SvgMoodHappySolid = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MoodNeutralOutline.js b/packages/loot-design/src/svg/v1/MoodNeutralOutline.jsindex e0596f99f0..f329e2647b 100644--- a/packages/loot-design/src/svg/v1/MoodNeutralOutline.js+++ b/packages/loot-design/src/svg/v1/MoodNeutralOutline.js@@ -7,7 +7,7 @@ const SvgMoodNeutralOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MoodNeutralSolid.js b/packages/loot-design/src/svg/v1/MoodNeutralSolid.jsindex 8ab0107f3a..813be41a96 100644--- a/packages/loot-design/src/svg/v1/MoodNeutralSolid.js+++ b/packages/loot-design/src/svg/v1/MoodNeutralSolid.js@@ -7,7 +7,7 @@ const SvgMoodNeutralSolid = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MoodSadOutline.js b/packages/loot-design/src/svg/v1/MoodSadOutline.jsindex 46d562c003..9614815bb4 100644--- a/packages/loot-design/src/svg/v1/MoodSadOutline.js+++ b/packages/loot-design/src/svg/v1/MoodSadOutline.js@@ -7,7 +7,7 @@ const SvgMoodSadOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MoodSadSolid.js b/packages/loot-design/src/svg/v1/MoodSadSolid.jsindex 56b5218729..3da59b8416 100644--- a/packages/loot-design/src/svg/v1/MoodSadSolid.js+++ b/packages/loot-design/src/svg/v1/MoodSadSolid.js@@ -7,7 +7,7 @@ const SvgMoodSadSolid = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Mouse.js b/packages/loot-design/src/svg/v1/Mouse.jsindex c4034bde5d..8fdcb7382e 100644--- a/packages/loot-design/src/svg/v1/Mouse.js+++ b/packages/loot-design/src/svg/v1/Mouse.js@@ -7,7 +7,7 @@ const SvgMouse = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MoveBack.js b/packages/loot-design/src/svg/v1/MoveBack.jsindex aad1e8b125..67dd66140d 100644--- a/packages/loot-design/src/svg/v1/MoveBack.js+++ b/packages/loot-design/src/svg/v1/MoveBack.js@@ -7,7 +7,7 @@ const SvgMoveBack = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MusicAlbum.js b/packages/loot-design/src/svg/v1/MusicAlbum.jsindex 7260d01730..8474a48abc 100644--- a/packages/loot-design/src/svg/v1/MusicAlbum.js+++ b/packages/loot-design/src/svg/v1/MusicAlbum.js@@ -7,7 +7,7 @@ const SvgMusicAlbum = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MusicArtist.js b/packages/loot-design/src/svg/v1/MusicArtist.jsindex 503a8510db..ea208de562 100644--- a/packages/loot-design/src/svg/v1/MusicArtist.js+++ b/packages/loot-design/src/svg/v1/MusicArtist.js@@ -7,7 +7,7 @@ const SvgMusicArtist = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MusicNotes.js b/packages/loot-design/src/svg/v1/MusicNotes.jsindex f61fb431d4..f7f8d1b1b8 100644--- a/packages/loot-design/src/svg/v1/MusicNotes.js+++ b/packages/loot-design/src/svg/v1/MusicNotes.js@@ -7,7 +7,7 @@ const SvgMusicNotes = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/MusicPlaylist.js b/packages/loot-design/src/svg/v1/MusicPlaylist.jsindex 9a7363443f..8e0b04dc89 100644--- a/packages/loot-design/src/svg/v1/MusicPlaylist.js+++ b/packages/loot-design/src/svg/v1/MusicPlaylist.js@@ -7,7 +7,7 @@ const SvgMusicPlaylist = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/NavigationMore.js b/packages/loot-design/src/svg/v1/NavigationMore.jsindex 77798a20ed..a6012483e4 100644--- a/packages/loot-design/src/svg/v1/NavigationMore.js+++ b/packages/loot-design/src/svg/v1/NavigationMore.js@@ -7,7 +7,7 @@ const SvgNavigationMore = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Network.js b/packages/loot-design/src/svg/v1/Network.jsindex 56f010f48e..e303ed8818 100644--- a/packages/loot-design/src/svg/v1/Network.js+++ b/packages/loot-design/src/svg/v1/Network.js@@ -7,7 +7,7 @@ const SvgNetwork = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/NewsPaper.js b/packages/loot-design/src/svg/v1/NewsPaper.jsindex c970978426..2708e68f55 100644--- a/packages/loot-design/src/svg/v1/NewsPaper.js+++ b/packages/loot-design/src/svg/v1/NewsPaper.js@@ -7,7 +7,7 @@ const SvgNewsPaper = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Notification.js b/packages/loot-design/src/svg/v1/Notification.jsindex 2d93d84093..15167c0e48 100644--- a/packages/loot-design/src/svg/v1/Notification.js+++ b/packages/loot-design/src/svg/v1/Notification.js@@ -7,7 +7,7 @@ const SvgNotification = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Notifications.js b/packages/loot-design/src/svg/v1/Notifications.jsindex 416b35f0d3..c630d0136c 100644--- a/packages/loot-design/src/svg/v1/Notifications.js+++ b/packages/loot-design/src/svg/v1/Notifications.js@@ -7,7 +7,7 @@ const SvgNotifications = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/NotificationsOutline.js b/packages/loot-design/src/svg/v1/NotificationsOutline.jsindex 1f75801727..504535b715 100644--- a/packages/loot-design/src/svg/v1/NotificationsOutline.js+++ b/packages/loot-design/src/svg/v1/NotificationsOutline.js@@ -7,7 +7,7 @@ const SvgNotificationsOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Paste.js b/packages/loot-design/src/svg/v1/Paste.jsindex e4ed6c464d..241bcc2a83 100644--- a/packages/loot-design/src/svg/v1/Paste.js+++ b/packages/loot-design/src/svg/v1/Paste.js@@ -7,7 +7,7 @@ const SvgPaste = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Pause.js b/packages/loot-design/src/svg/v1/Pause.jsindex 7378bd9f0b..02bd814a74 100644--- a/packages/loot-design/src/svg/v1/Pause.js+++ b/packages/loot-design/src/svg/v1/Pause.js@@ -7,7 +7,7 @@ const SvgPause = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M5 4h3v12H5V4zm7 0h3v12h-3V4z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/PauseOutline.js b/packages/loot-design/src/svg/v1/PauseOutline.jsindex 9f83f9b3ad..3b6e14b317 100644--- a/packages/loot-design/src/svg/v1/PauseOutline.js+++ b/packages/loot-design/src/svg/v1/PauseOutline.js@@ -7,7 +7,7 @@ const SvgPauseOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/PauseSolid.js b/packages/loot-design/src/svg/v1/PauseSolid.jsindex 4d4d9cf360..0ddc3e3628 100644--- a/packages/loot-design/src/svg/v1/PauseSolid.js+++ b/packages/loot-design/src/svg/v1/PauseSolid.js@@ -7,7 +7,7 @@ const SvgPauseSolid = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/PenTool.js b/packages/loot-design/src/svg/v1/PenTool.jsindex fc640b808a..79a1bb746d 100644--- a/packages/loot-design/src/svg/v1/PenTool.js+++ b/packages/loot-design/src/svg/v1/PenTool.js@@ -7,7 +7,7 @@ const SvgPenTool = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/PencilWrite.js b/packages/loot-design/src/svg/v1/PencilWrite.jsindex 644401c3ba..0e0403274e 100644--- a/packages/loot-design/src/svg/v1/PencilWrite.js+++ b/packages/loot-design/src/svg/v1/PencilWrite.js@@ -7,7 +7,7 @@ const SvgPencilWrite = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Phone.js b/packages/loot-design/src/svg/v1/Phone.jsindex 00842c0656..70980886c3 100644--- a/packages/loot-design/src/svg/v1/Phone.js+++ b/packages/loot-design/src/svg/v1/Phone.js@@ -7,7 +7,7 @@ const SvgPhone = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Photo.js b/packages/loot-design/src/svg/v1/Photo.jsindex ce17b8e9db..bca4b6f231 100644--- a/packages/loot-design/src/svg/v1/Photo.js+++ b/packages/loot-design/src/svg/v1/Photo.js@@ -7,7 +7,7 @@ const SvgPhoto = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/PhpElephant.js b/packages/loot-design/src/svg/v1/PhpElephant.jsindex 1638760faa..0ebd484ca2 100644--- a/packages/loot-design/src/svg/v1/PhpElephant.js+++ b/packages/loot-design/src/svg/v1/PhpElephant.js@@ -7,7 +7,7 @@ const SvgPhpElephant = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/PiggyBank.js b/packages/loot-design/src/svg/v1/PiggyBank.jsindex 3f7f1f300b..27e769992d 100644--- a/packages/loot-design/src/svg/v1/PiggyBank.js+++ b/packages/loot-design/src/svg/v1/PiggyBank.js@@ -7,7 +7,7 @@ const SvgPiggyBank = props => (xmlns="http://www.w3.org/2000/svg"style={{color: '#242134',- ...props.style+ ...props.style,}}><g clipPath="url(#a)">diff --git a/packages/loot-design/src/svg/v1/Pin.js b/packages/loot-design/src/svg/v1/Pin.jsindex c6d652d251..f288708262 100644--- a/packages/loot-design/src/svg/v1/Pin.js+++ b/packages/loot-design/src/svg/v1/Pin.js@@ -7,7 +7,7 @@ const SvgPin = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Play.js b/packages/loot-design/src/svg/v1/Play.jsindex 0e4cec0460..5a8c5605d2 100644--- a/packages/loot-design/src/svg/v1/Play.js+++ b/packages/loot-design/src/svg/v1/Play.js@@ -7,7 +7,7 @@ const SvgPlay = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="m4 4 12 6-12 6z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/PlayOutline.js b/packages/loot-design/src/svg/v1/PlayOutline.jsindex 061a8630a9..67a1f650c0 100644--- a/packages/loot-design/src/svg/v1/PlayOutline.js+++ b/packages/loot-design/src/svg/v1/PlayOutline.js@@ -7,7 +7,7 @@ const SvgPlayOutline = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Playlist.js b/packages/loot-design/src/svg/v1/Playlist.jsindex b156ee81f1..426ee24ac7 100644--- a/packages/loot-design/src/svg/v1/Playlist.js+++ b/packages/loot-design/src/svg/v1/Playlist.js@@ -7,7 +7,7 @@ const SvgPlaylist = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Plugin.js b/packages/loot-design/src/svg/v1/Plugin.jsindex 8bcd4a01e4..a8e9848175 100644--- a/packages/loot-design/src/svg/v1/Plugin.js+++ b/packages/loot-design/src/svg/v1/Plugin.js@@ -7,7 +7,7 @@ const SvgPlugin = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Portfolio.js b/packages/loot-design/src/svg/v1/Portfolio.jsindex 9c62b19205..be08939841 100644--- a/packages/loot-design/src/svg/v1/Portfolio.js+++ b/packages/loot-design/src/svg/v1/Portfolio.js@@ -7,7 +7,7 @@ const SvgPortfolio = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Printer.js b/packages/loot-design/src/svg/v1/Printer.jsindex c2cb7a98ac..0e1027f0a1 100644--- a/packages/loot-design/src/svg/v1/Printer.js+++ b/packages/loot-design/src/svg/v1/Printer.js@@ -7,7 +7,7 @@ const SvgPrinter = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Pylon.js b/packages/loot-design/src/svg/v1/Pylon.jsindex 729fa8a66b..8e602f2705 100644--- a/packages/loot-design/src/svg/v1/Pylon.js+++ b/packages/loot-design/src/svg/v1/Pylon.js@@ -7,7 +7,7 @@ const SvgPylon = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Question.js b/packages/loot-design/src/svg/v1/Question.jsindex d0ea4ae462..70675fd803 100644--- a/packages/loot-design/src/svg/v1/Question.js+++ b/packages/loot-design/src/svg/v1/Question.js@@ -7,7 +7,7 @@ const SvgQuestion = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Queue.js b/packages/loot-design/src/svg/v1/Queue.jsindex 2a556fad7b..661be98a70 100644--- a/packages/loot-design/src/svg/v1/Queue.js+++ b/packages/loot-design/src/svg/v1/Queue.js@@ -7,7 +7,7 @@ const SvgQueue = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Radar.js b/packages/loot-design/src/svg/v1/Radar.jsindex 71ecc1ce2b..4f678d60e0 100644--- a/packages/loot-design/src/svg/v1/Radar.js+++ b/packages/loot-design/src/svg/v1/Radar.js@@ -7,7 +7,7 @@ const SvgRadar = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/RadarCopy2.js b/packages/loot-design/src/svg/v1/RadarCopy2.jsindex c7c217a707..ecd0c09ec3 100644--- a/packages/loot-design/src/svg/v1/RadarCopy2.js+++ b/packages/loot-design/src/svg/v1/RadarCopy2.js@@ -7,7 +7,7 @@ const SvgRadarCopy2 = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Radio.js b/packages/loot-design/src/svg/v1/Radio.jsindex 3691ac3b2f..0f58bce77a 100644--- a/packages/loot-design/src/svg/v1/Radio.js+++ b/packages/loot-design/src/svg/v1/Radio.js@@ -7,7 +7,7 @@ const SvgRadio = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Refresh.js b/packages/loot-design/src/svg/v1/Refresh.jsindex 07537a9624..44c4d11ede 100644--- a/packages/loot-design/src/svg/v1/Refresh.js+++ b/packages/loot-design/src/svg/v1/Refresh.js@@ -7,7 +7,7 @@ const SvgRefresh = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Reload.js b/packages/loot-design/src/svg/v1/Reload.jsindex 61f0eae0ff..5ce0bc4408 100644--- a/packages/loot-design/src/svg/v1/Reload.js+++ b/packages/loot-design/src/svg/v1/Reload.js@@ -7,7 +7,7 @@ const SvgReload = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Reply.js b/packages/loot-design/src/svg/v1/Reply.jsindex 940bd12437..2ee62712a7 100644--- a/packages/loot-design/src/svg/v1/Reply.js+++ b/packages/loot-design/src/svg/v1/Reply.js@@ -7,7 +7,7 @@ const SvgReply = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ReplyAll.js b/packages/loot-design/src/svg/v1/ReplyAll.jsindex ffaa887c8b..3ea9b2738b 100644--- a/packages/loot-design/src/svg/v1/ReplyAll.js+++ b/packages/loot-design/src/svg/v1/ReplyAll.js@@ -7,7 +7,7 @@ const SvgReplyAll = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Reports.js b/packages/loot-design/src/svg/v1/Reports.jsindex b934a1e2ac..bd57b87d49 100644--- a/packages/loot-design/src/svg/v1/Reports.js+++ b/packages/loot-design/src/svg/v1/Reports.js@@ -7,7 +7,7 @@ const SvgReports = props => (xmlns="http://www.w3.org/2000/svg"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Repost.js b/packages/loot-design/src/svg/v1/Repost.jsindex 6382e51c33..4e5578ba79 100644--- a/packages/loot-design/src/svg/v1/Repost.js+++ b/packages/loot-design/src/svg/v1/Repost.js@@ -7,7 +7,7 @@ const SvgRepost = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/SaveDisk.js b/packages/loot-design/src/svg/v1/SaveDisk.jsindex 9db802e422..a506724e5f 100644--- a/packages/loot-design/src/svg/v1/SaveDisk.js+++ b/packages/loot-design/src/svg/v1/SaveDisk.js@@ -7,7 +7,7 @@ const SvgSaveDisk = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ScreenFull.js b/packages/loot-design/src/svg/v1/ScreenFull.jsindex c67cb8a8b4..776a7a961f 100644--- a/packages/loot-design/src/svg/v1/ScreenFull.js+++ b/packages/loot-design/src/svg/v1/ScreenFull.js@@ -7,7 +7,7 @@ const SvgScreenFull = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Search.js b/packages/loot-design/src/svg/v1/Search.jsindex 2b4e67e2b4..2d02d68977 100644--- a/packages/loot-design/src/svg/v1/Search.js+++ b/packages/loot-design/src/svg/v1/Search.js@@ -7,7 +7,7 @@ const SvgSearch = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Send.js b/packages/loot-design/src/svg/v1/Send.jsindex e3f9c6d532..813080357f 100644--- a/packages/loot-design/src/svg/v1/Send.js+++ b/packages/loot-design/src/svg/v1/Send.js@@ -7,7 +7,7 @@ const SvgSend = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="m0 0 20 10L0 20V0zm0 8v4l10-2L0 8z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/Servers.js b/packages/loot-design/src/svg/v1/Servers.jsindex 111bb0b0df..f9e0c3aa23 100644--- a/packages/loot-design/src/svg/v1/Servers.js+++ b/packages/loot-design/src/svg/v1/Servers.js@@ -7,7 +7,7 @@ const SvgServers = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Share.js b/packages/loot-design/src/svg/v1/Share.jsindex a552c54e93..3e41b6816f 100644--- a/packages/loot-design/src/svg/v1/Share.js+++ b/packages/loot-design/src/svg/v1/Share.js@@ -7,7 +7,7 @@ const SvgShare = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Share01.js b/packages/loot-design/src/svg/v1/Share01.jsindex 9e72bee383..d2e72d645f 100644--- a/packages/loot-design/src/svg/v1/Share01.js+++ b/packages/loot-design/src/svg/v1/Share01.js@@ -7,7 +7,7 @@ const SvgShare01 = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ShareAlt.js b/packages/loot-design/src/svg/v1/ShareAlt.jsindex 70b527206f..ff4c6c8b57 100644--- a/packages/loot-design/src/svg/v1/ShareAlt.js+++ b/packages/loot-design/src/svg/v1/ShareAlt.js@@ -7,7 +7,7 @@ const SvgShareAlt = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Shield.js b/packages/loot-design/src/svg/v1/Shield.jsindex f602e8fe37..459f060d26 100644--- a/packages/loot-design/src/svg/v1/Shield.js+++ b/packages/loot-design/src/svg/v1/Shield.js@@ -7,7 +7,7 @@ const SvgShield = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ShoppingCart.js b/packages/loot-design/src/svg/v1/ShoppingCart.jsindex 2c9d019d76..783cb8c3f3 100644--- a/packages/loot-design/src/svg/v1/ShoppingCart.js+++ b/packages/loot-design/src/svg/v1/ShoppingCart.js@@ -7,7 +7,7 @@ const SvgShoppingCart = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ShowSidebar.js b/packages/loot-design/src/svg/v1/ShowSidebar.jsindex 50481677b9..f58998cc54 100644--- a/packages/loot-design/src/svg/v1/ShowSidebar.js+++ b/packages/loot-design/src/svg/v1/ShowSidebar.js@@ -7,7 +7,7 @@ const SvgShowSidebar = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Shuffle.js b/packages/loot-design/src/svg/v1/Shuffle.jsindex aa2b0c58c3..eec70e1141 100644--- a/packages/loot-design/src/svg/v1/Shuffle.js+++ b/packages/loot-design/src/svg/v1/Shuffle.js@@ -7,7 +7,7 @@ const SvgShuffle = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/StandBy.js b/packages/loot-design/src/svg/v1/StandBy.jsindex 54c0e9a41e..0b17f2d91b 100644--- a/packages/loot-design/src/svg/v1/StandBy.js+++ b/packages/loot-design/src/svg/v1/StandBy.js@@ -7,7 +7,7 @@ const SvgStandBy = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/StarFull.js b/packages/loot-design/src/svg/v1/StarFull.jsindex 3c64249ee0..7930ade2e5 100644--- a/packages/loot-design/src/svg/v1/StarFull.js+++ b/packages/loot-design/src/svg/v1/StarFull.js@@ -7,7 +7,7 @@ const SvgStarFull = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Station.js b/packages/loot-design/src/svg/v1/Station.jsindex 91aa933e8c..1bcc810217 100644--- a/packages/loot-design/src/svg/v1/Station.js+++ b/packages/loot-design/src/svg/v1/Station.js@@ -7,7 +7,7 @@ const SvgStation = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/StepBackward.js b/packages/loot-design/src/svg/v1/StepBackward.jsindex 76266ce618..f97c0d62ae 100644--- a/packages/loot-design/src/svg/v1/StepBackward.js+++ b/packages/loot-design/src/svg/v1/StepBackward.js@@ -7,7 +7,7 @@ const SvgStepBackward = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M4 5h3v10H4V5zm12 0v10l-9-5 9-5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/StepForward.js b/packages/loot-design/src/svg/v1/StepForward.jsindex dbee1507ac..33b9efc0f0 100644--- a/packages/loot-design/src/svg/v1/StepForward.js+++ b/packages/loot-design/src/svg/v1/StepForward.js@@ -7,7 +7,7 @@ const SvgStepForward = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M13 5h3v10h-3V5zM4 5l9 5-9 5V5z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/Stethoscope.js b/packages/loot-design/src/svg/v1/Stethoscope.jsindex 3b82c2b0cb..05874391af 100644--- a/packages/loot-design/src/svg/v1/Stethoscope.js+++ b/packages/loot-design/src/svg/v1/Stethoscope.js@@ -7,7 +7,7 @@ const SvgStethoscope = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/StoreFront.js b/packages/loot-design/src/svg/v1/StoreFront.jsindex 436ddbe7f3..4dd7a20004 100644--- a/packages/loot-design/src/svg/v1/StoreFront.js+++ b/packages/loot-design/src/svg/v1/StoreFront.js@@ -7,7 +7,7 @@ const SvgStoreFront = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/StrokeWidth.js b/packages/loot-design/src/svg/v1/StrokeWidth.jsindex 89b9767fff..8127a19c88 100644--- a/packages/loot-design/src/svg/v1/StrokeWidth.js+++ b/packages/loot-design/src/svg/v1/StrokeWidth.js@@ -7,7 +7,7 @@ const SvgStrokeWidth = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/SubdirectoryLeft.js b/packages/loot-design/src/svg/v1/SubdirectoryLeft.jsindex dcf94a783e..8802dbcd82 100644--- a/packages/loot-design/src/svg/v1/SubdirectoryLeft.js+++ b/packages/loot-design/src/svg/v1/SubdirectoryLeft.js@@ -7,7 +7,7 @@ const SvgSubdirectoryLeft = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M18 12v1H8v5l-6-6 6-6v5h8V2h2z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/SubdirectoryRight.js b/packages/loot-design/src/svg/v1/SubdirectoryRight.jsindex 130ef9c841..64d7e78c19 100644--- a/packages/loot-design/src/svg/v1/SubdirectoryRight.js+++ b/packages/loot-design/src/svg/v1/SubdirectoryRight.js@@ -7,7 +7,7 @@ const SvgSubdirectoryRight = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M3.5 13H12v5l6-6-6-6v5H4V2H2v11z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/Subtract.js b/packages/loot-design/src/svg/v1/Subtract.jsindex 9877ee54a1..49ab73bc23 100644--- a/packages/loot-design/src/svg/v1/Subtract.js+++ b/packages/loot-design/src/svg/v1/Subtract.js@@ -7,7 +7,7 @@ const SvgSubtract = props => (xmlns="http://www.w3.org/2000/svg"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Swap.js b/packages/loot-design/src/svg/v1/Swap.jsindex 1bd90fd9a1..b81bb8a0ca 100644--- a/packages/loot-design/src/svg/v1/Swap.js+++ b/packages/loot-design/src/svg/v1/Swap.js@@ -7,7 +7,7 @@ const SvgSwap = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Tablet.js b/packages/loot-design/src/svg/v1/Tablet.jsindex b0a3f907d9..173197282d 100644--- a/packages/loot-design/src/svg/v1/Tablet.js+++ b/packages/loot-design/src/svg/v1/Tablet.js@@ -7,7 +7,7 @@ const SvgTablet = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Tag.js b/packages/loot-design/src/svg/v1/Tag.jsindex 1f503b1d00..fedfcaed13 100644--- a/packages/loot-design/src/svg/v1/Tag.js+++ b/packages/loot-design/src/svg/v1/Tag.js@@ -7,7 +7,7 @@ const SvgTag = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Target.js b/packages/loot-design/src/svg/v1/Target.jsindex 1ce90f75d8..272d3d152e 100644--- a/packages/loot-design/src/svg/v1/Target.js+++ b/packages/loot-design/src/svg/v1/Target.js@@ -7,7 +7,7 @@ const SvgTarget = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/TextBox.js b/packages/loot-design/src/svg/v1/TextBox.jsindex 51a4d99d38..99c8048d15 100644--- a/packages/loot-design/src/svg/v1/TextBox.js+++ b/packages/loot-design/src/svg/v1/TextBox.js@@ -7,7 +7,7 @@ const SvgTextBox = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/TextDecoration.js b/packages/loot-design/src/svg/v1/TextDecoration.jsindex 6c7f620175..c6667e9f62 100644--- a/packages/loot-design/src/svg/v1/TextDecoration.js+++ b/packages/loot-design/src/svg/v1/TextDecoration.js@@ -7,7 +7,7 @@ const SvgTextDecoration = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Thermometer.js b/packages/loot-design/src/svg/v1/Thermometer.jsindex d07b864423..f66f3ecccf 100644--- a/packages/loot-design/src/svg/v1/Thermometer.js+++ b/packages/loot-design/src/svg/v1/Thermometer.js@@ -7,7 +7,7 @@ const SvgThermometer = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ThumbsDown.js b/packages/loot-design/src/svg/v1/ThumbsDown.jsindex 67e7eb350d..d3983e6e2e 100644--- a/packages/loot-design/src/svg/v1/ThumbsDown.js+++ b/packages/loot-design/src/svg/v1/ThumbsDown.js@@ -7,7 +7,7 @@ const SvgThumbsDown = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ThumbsUp.js b/packages/loot-design/src/svg/v1/ThumbsUp.jsindex ce092b2081..e242a3cf53 100644--- a/packages/loot-design/src/svg/v1/ThumbsUp.js+++ b/packages/loot-design/src/svg/v1/ThumbsUp.js@@ -7,7 +7,7 @@ const SvgThumbsUp = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Ticket.js b/packages/loot-design/src/svg/v1/Ticket.jsindex 5293d0756f..a63dcab9db 100644--- a/packages/loot-design/src/svg/v1/Ticket.js+++ b/packages/loot-design/src/svg/v1/Ticket.js@@ -7,7 +7,7 @@ const SvgTicket = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Time.js b/packages/loot-design/src/svg/v1/Time.jsindex 8d19b09128..b022ffa5f5 100644--- a/packages/loot-design/src/svg/v1/Time.js+++ b/packages/loot-design/src/svg/v1/Time.js@@ -7,7 +7,7 @@ const SvgTime = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Timer.js b/packages/loot-design/src/svg/v1/Timer.jsindex c699fed37a..9160dc5b2a 100644--- a/packages/loot-design/src/svg/v1/Timer.js+++ b/packages/loot-design/src/svg/v1/Timer.js@@ -7,7 +7,7 @@ const SvgTimer = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ToolsCopy.js b/packages/loot-design/src/svg/v1/ToolsCopy.jsindex 931ac52dec..52a3ebedfa 100644--- a/packages/loot-design/src/svg/v1/ToolsCopy.js+++ b/packages/loot-design/src/svg/v1/ToolsCopy.js@@ -7,7 +7,7 @@ const SvgToolsCopy = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Translate.js b/packages/loot-design/src/svg/v1/Translate.jsindex 83abacdc0b..38e86d4748 100644--- a/packages/loot-design/src/svg/v1/Translate.js+++ b/packages/loot-design/src/svg/v1/Translate.js@@ -7,7 +7,7 @@ const SvgTranslate = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Trash.js b/packages/loot-design/src/svg/v1/Trash.jsindex 384d9caf76..79cc672653 100644--- a/packages/loot-design/src/svg/v1/Trash.js+++ b/packages/loot-design/src/svg/v1/Trash.js@@ -7,7 +7,7 @@ const SvgTrash = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Travel.js b/packages/loot-design/src/svg/v1/Travel.jsindex 773de69302..a5b33f063c 100644--- a/packages/loot-design/src/svg/v1/Travel.js+++ b/packages/loot-design/src/svg/v1/Travel.js@@ -7,7 +7,7 @@ const SvgTravel = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/TravelBus.js b/packages/loot-design/src/svg/v1/TravelBus.jsindex 1928ea1a9a..21625bad8d 100644--- a/packages/loot-design/src/svg/v1/TravelBus.js+++ b/packages/loot-design/src/svg/v1/TravelBus.js@@ -7,7 +7,7 @@ const SvgTravelBus = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/TravelCar.js b/packages/loot-design/src/svg/v1/TravelCar.jsindex 2b7e3312fd..b4d6bc51bc 100644--- a/packages/loot-design/src/svg/v1/TravelCar.js+++ b/packages/loot-design/src/svg/v1/TravelCar.js@@ -7,7 +7,7 @@ const SvgTravelCar = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/TravelCase.js b/packages/loot-design/src/svg/v1/TravelCase.jsindex ba64e768e4..33e98ed118 100644--- a/packages/loot-design/src/svg/v1/TravelCase.js+++ b/packages/loot-design/src/svg/v1/TravelCase.js@@ -7,7 +7,7 @@ const SvgTravelCase = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/TravelTaxiCab.js b/packages/loot-design/src/svg/v1/TravelTaxiCab.jsindex 0caaf91d5c..e00bf8d9e8 100644--- a/packages/loot-design/src/svg/v1/TravelTaxiCab.js+++ b/packages/loot-design/src/svg/v1/TravelTaxiCab.js@@ -7,7 +7,7 @@ const SvgTravelTaxiCab = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/TravelTrain.js b/packages/loot-design/src/svg/v1/TravelTrain.jsindex 33e67a2e7e..af54254ec0 100644--- a/packages/loot-design/src/svg/v1/TravelTrain.js+++ b/packages/loot-design/src/svg/v1/TravelTrain.js@@ -7,7 +7,7 @@ const SvgTravelTrain = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/TravelWalk.js b/packages/loot-design/src/svg/v1/TravelWalk.jsindex eeec0a0720..f9690aca7c 100644--- a/packages/loot-design/src/svg/v1/TravelWalk.js+++ b/packages/loot-design/src/svg/v1/TravelWalk.js@@ -7,7 +7,7 @@ const SvgTravelWalk = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Trophy.js b/packages/loot-design/src/svg/v1/Trophy.jsindex 2f7d7a74c6..173b13ab9a 100644--- a/packages/loot-design/src/svg/v1/Trophy.js+++ b/packages/loot-design/src/svg/v1/Trophy.js@@ -7,7 +7,7 @@ const SvgTrophy = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Tuning.js b/packages/loot-design/src/svg/v1/Tuning.jsindex 12b05d6157..f6d7a6dc60 100644--- a/packages/loot-design/src/svg/v1/Tuning.js+++ b/packages/loot-design/src/svg/v1/Tuning.js@@ -7,7 +7,7 @@ const SvgTuning = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Upload.js b/packages/loot-design/src/svg/v1/Upload.jsindex 944c378f0a..52a5d8c676 100644--- a/packages/loot-design/src/svg/v1/Upload.js+++ b/packages/loot-design/src/svg/v1/Upload.js@@ -7,7 +7,7 @@ const SvgUpload = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M13 10v6H7v-6H2l8-8 8 8h-5zM0 18h20v2H0v-2z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/Usb.js b/packages/loot-design/src/svg/v1/Usb.jsindex d2a4b81703..b0fbf3a3b4 100644--- a/packages/loot-design/src/svg/v1/Usb.js+++ b/packages/loot-design/src/svg/v1/Usb.js@@ -7,7 +7,7 @@ const SvgUsb = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/User.js b/packages/loot-design/src/svg/v1/User.jsindex b7b75e766f..19334e3baa 100644--- a/packages/loot-design/src/svg/v1/User.js+++ b/packages/loot-design/src/svg/v1/User.js@@ -7,7 +7,7 @@ const SvgUser = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/UserAdd.js b/packages/loot-design/src/svg/v1/UserAdd.jsindex 25e29f6fc9..25da17f14c 100644--- a/packages/loot-design/src/svg/v1/UserAdd.js+++ b/packages/loot-design/src/svg/v1/UserAdd.js@@ -7,7 +7,7 @@ const SvgUserAdd = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/UserGroup.js b/packages/loot-design/src/svg/v1/UserGroup.jsindex df8fa6d803..c0249097cd 100644--- a/packages/loot-design/src/svg/v1/UserGroup.js+++ b/packages/loot-design/src/svg/v1/UserGroup.js@@ -7,7 +7,7 @@ const SvgUserGroup = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/UserSolidCircle.js b/packages/loot-design/src/svg/v1/UserSolidCircle.jsindex 7e0db196a9..217214e887 100644--- a/packages/loot-design/src/svg/v1/UserSolidCircle.js+++ b/packages/loot-design/src/svg/v1/UserSolidCircle.js@@ -7,7 +7,7 @@ const SvgUserSolidCircle = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/UserSolidSquare.js b/packages/loot-design/src/svg/v1/UserSolidSquare.jsindex 976b4027cc..47b03eb193 100644--- a/packages/loot-design/src/svg/v1/UserSolidSquare.js+++ b/packages/loot-design/src/svg/v1/UserSolidSquare.js@@ -7,7 +7,7 @@ const SvgUserSolidSquare = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Vector.js b/packages/loot-design/src/svg/v1/Vector.jsindex 8a37d0f041..ba4bf1bd78 100644--- a/packages/loot-design/src/svg/v1/Vector.js+++ b/packages/loot-design/src/svg/v1/Vector.js@@ -7,7 +7,7 @@ const SvgVector = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/VideoCamera.js b/packages/loot-design/src/svg/v1/VideoCamera.jsindex 7d7b532a2b..b925bbb30d 100644--- a/packages/loot-design/src/svg/v1/VideoCamera.js+++ b/packages/loot-design/src/svg/v1/VideoCamera.js@@ -7,7 +7,7 @@ const SvgVideoCamera = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ViewCarousel.js b/packages/loot-design/src/svg/v1/ViewCarousel.jsindex b76a572a08..8c1a2bbf32 100644--- a/packages/loot-design/src/svg/v1/ViewCarousel.js+++ b/packages/loot-design/src/svg/v1/ViewCarousel.js@@ -7,7 +7,7 @@ const SvgViewCarousel = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ViewColumn.js b/packages/loot-design/src/svg/v1/ViewColumn.jsindex 328d2d840b..6f89171707 100644--- a/packages/loot-design/src/svg/v1/ViewColumn.js+++ b/packages/loot-design/src/svg/v1/ViewColumn.js@@ -7,7 +7,7 @@ const SvgViewColumn = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ViewHide.js b/packages/loot-design/src/svg/v1/ViewHide.jsindex 658b1e28f8..b59b22c8af 100644--- a/packages/loot-design/src/svg/v1/ViewHide.js+++ b/packages/loot-design/src/svg/v1/ViewHide.js@@ -7,7 +7,7 @@ const SvgViewHide = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ViewList.js b/packages/loot-design/src/svg/v1/ViewList.jsindex c13d33239c..c2640ccb04 100644--- a/packages/loot-design/src/svg/v1/ViewList.js+++ b/packages/loot-design/src/svg/v1/ViewList.js@@ -7,7 +7,7 @@ const SvgViewList = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ViewShow.js b/packages/loot-design/src/svg/v1/ViewShow.jsindex 040706412f..cf90f8cc39 100644--- a/packages/loot-design/src/svg/v1/ViewShow.js+++ b/packages/loot-design/src/svg/v1/ViewShow.js@@ -7,7 +7,7 @@ const SvgViewShow = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ViewTile.js b/packages/loot-design/src/svg/v1/ViewTile.jsindex bbb0ecca00..b227f06e6e 100644--- a/packages/loot-design/src/svg/v1/ViewTile.js+++ b/packages/loot-design/src/svg/v1/ViewTile.js@@ -7,7 +7,7 @@ const SvgViewTile = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/VolumeDown.js b/packages/loot-design/src/svg/v1/VolumeDown.jsindex 90dd6d0fed..d766724ec9 100644--- a/packages/loot-design/src/svg/v1/VolumeDown.js+++ b/packages/loot-design/src/svg/v1/VolumeDown.js@@ -7,7 +7,7 @@ const SvgVolumeDown = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/VolumeMute.js b/packages/loot-design/src/svg/v1/VolumeMute.jsindex 009e967bf2..8068d8ae33 100644--- a/packages/loot-design/src/svg/v1/VolumeMute.js+++ b/packages/loot-design/src/svg/v1/VolumeMute.js@@ -7,7 +7,7 @@ const SvgVolumeMute = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><path d="M9 7H5v6h4l5 5V2L9 7z" fill="currentColor" />diff --git a/packages/loot-design/src/svg/v1/VolumeOff.js b/packages/loot-design/src/svg/v1/VolumeOff.jsindex 3686a5cef3..4b793eb949 100644--- a/packages/loot-design/src/svg/v1/VolumeOff.js+++ b/packages/loot-design/src/svg/v1/VolumeOff.js@@ -7,7 +7,7 @@ const SvgVolumeOff = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/VolumeUp.js b/packages/loot-design/src/svg/v1/VolumeUp.jsindex d5e3ef77de..6b2fb52552 100644--- a/packages/loot-design/src/svg/v1/VolumeUp.js+++ b/packages/loot-design/src/svg/v1/VolumeUp.js@@ -7,7 +7,7 @@ const SvgVolumeUp = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Wallet.js b/packages/loot-design/src/svg/v1/Wallet.jsindex 39e31f18d3..5d363b2ded 100644--- a/packages/loot-design/src/svg/v1/Wallet.js+++ b/packages/loot-design/src/svg/v1/Wallet.js@@ -7,7 +7,7 @@ const SvgWallet = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Watch.js b/packages/loot-design/src/svg/v1/Watch.jsindex 90664ce3ae..842400d6ce 100644--- a/packages/loot-design/src/svg/v1/Watch.js+++ b/packages/loot-design/src/svg/v1/Watch.js@@ -7,7 +7,7 @@ const SvgWatch = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Window.js b/packages/loot-design/src/svg/v1/Window.jsindex 0ebb3318b1..860fd038e9 100644--- a/packages/loot-design/src/svg/v1/Window.js+++ b/packages/loot-design/src/svg/v1/Window.js@@ -7,7 +7,7 @@ const SvgWindow = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/WindowNew.js b/packages/loot-design/src/svg/v1/WindowNew.jsindex 2de697d062..52c56b1fc0 100644--- a/packages/loot-design/src/svg/v1/WindowNew.js+++ b/packages/loot-design/src/svg/v1/WindowNew.js@@ -7,7 +7,7 @@ const SvgWindowNew = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/WindowOpen.js b/packages/loot-design/src/svg/v1/WindowOpen.jsindex f2d3e71076..141173b38a 100644--- a/packages/loot-design/src/svg/v1/WindowOpen.js+++ b/packages/loot-design/src/svg/v1/WindowOpen.js@@ -7,7 +7,7 @@ const SvgWindowOpen = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/Wrench.js b/packages/loot-design/src/svg/v1/Wrench.jsindex 2be7c11e59..6f08f05bda 100644--- a/packages/loot-design/src/svg/v1/Wrench.js+++ b/packages/loot-design/src/svg/v1/Wrench.js@@ -7,7 +7,7 @@ const SvgWrench = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/YinYang.js b/packages/loot-design/src/svg/v1/YinYang.jsindex 90617295a3..d2b294d551 100644--- a/packages/loot-design/src/svg/v1/YinYang.js+++ b/packages/loot-design/src/svg/v1/YinYang.js@@ -7,7 +7,7 @@ const SvgYinYang = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ZoomIn.js b/packages/loot-design/src/svg/v1/ZoomIn.jsindex 1a8e7294eb..fc0dd4f8a4 100644--- a/packages/loot-design/src/svg/v1/ZoomIn.js+++ b/packages/loot-design/src/svg/v1/ZoomIn.js@@ -7,7 +7,7 @@ const SvgZoomIn = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v1/ZoomOut.js b/packages/loot-design/src/svg/v1/ZoomOut.jsindex 0725122d1f..24980f95f1 100644--- a/packages/loot-design/src/svg/v1/ZoomOut.js+++ b/packages/loot-design/src/svg/v1/ZoomOut.js@@ -7,7 +7,7 @@ const SvgZoomOut = props => (viewBox="0 0 20 20"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/AlertTriangle.js b/packages/loot-design/src/svg/v2/AlertTriangle.jsindex 26d93e6f2d..2fa3e6b365 100644--- a/packages/loot-design/src/svg/v2/AlertTriangle.js+++ b/packages/loot-design/src/svg/v2/AlertTriangle.js@@ -7,7 +7,7 @@ const SvgAlertTriangle = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/ArrowButtonDown1.js b/packages/loot-design/src/svg/v2/ArrowButtonDown1.jsindex b373940f45..29392c9e56 100644--- a/packages/loot-design/src/svg/v2/ArrowButtonDown1.js+++ b/packages/loot-design/src/svg/v2/ArrowButtonDown1.js@@ -7,7 +7,7 @@ const SvgArrowButtonDown1 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/ArrowButtonLeft1.js b/packages/loot-design/src/svg/v2/ArrowButtonLeft1.jsindex f7f2d9ef24..dce92cd896 100644--- a/packages/loot-design/src/svg/v2/ArrowButtonLeft1.js+++ b/packages/loot-design/src/svg/v2/ArrowButtonLeft1.js@@ -7,7 +7,7 @@ const SvgArrowButtonLeft1 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/ArrowButtonRight1.js b/packages/loot-design/src/svg/v2/ArrowButtonRight1.jsindex 09b48c84a1..fa9b80c085 100644--- a/packages/loot-design/src/svg/v2/ArrowButtonRight1.js+++ b/packages/loot-design/src/svg/v2/ArrowButtonRight1.js@@ -7,7 +7,7 @@ const SvgArrowButtonRight1 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/ArrowButtonUp1.js b/packages/loot-design/src/svg/v2/ArrowButtonUp1.jsindex cbabb90dfb..9caae26ec6 100644--- a/packages/loot-design/src/svg/v2/ArrowButtonUp1.js+++ b/packages/loot-design/src/svg/v2/ArrowButtonUp1.js@@ -7,7 +7,7 @@ const SvgArrowButtonUp1 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/ArrowsExpand3.js b/packages/loot-design/src/svg/v2/ArrowsExpand3.jsindex 28cbb2c486..6fc7932679 100644--- a/packages/loot-design/src/svg/v2/ArrowsExpand3.js+++ b/packages/loot-design/src/svg/v2/ArrowsExpand3.js@@ -8,7 +8,7 @@ const SvgArrowsExpand3 = props => (xmlns="http://www.w3.org/2000/svg"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/ArrowsShrink3.js b/packages/loot-design/src/svg/v2/ArrowsShrink3.jsindex 4d6c444dab..9d1b68a9aa 100644--- a/packages/loot-design/src/svg/v2/ArrowsShrink3.js+++ b/packages/loot-design/src/svg/v2/ArrowsShrink3.js@@ -8,7 +8,7 @@ const SvgArrowsShrink3 = props => (xmlns="http://www.w3.org/2000/svg"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/ArrowsSynchronize.js b/packages/loot-design/src/svg/v2/ArrowsSynchronize.jsindex d7991a56fa..9d932be9d3 100644--- a/packages/loot-design/src/svg/v2/ArrowsSynchronize.js+++ b/packages/loot-design/src/svg/v2/ArrowsSynchronize.js@@ -7,7 +7,7 @@ const SvgArrowsSynchronize = props => (xmlns="http://www.w3.org/2000/svg"style={{color: '#242134',- ...props.style+ ...props.style,}}><g fill="#000">diff --git a/packages/loot-design/src/svg/v2/Calendar.js b/packages/loot-design/src/svg/v2/Calendar.jsindex b115b55e59..64b361172e 100644--- a/packages/loot-design/src/svg/v2/Calendar.js+++ b/packages/loot-design/src/svg/v2/Calendar.js@@ -7,7 +7,7 @@ const SvgCalendar = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/Calendar3.js b/packages/loot-design/src/svg/v2/Calendar3.jsindex c19e619a22..1435c78f42 100644--- a/packages/loot-design/src/svg/v2/Calendar3.js+++ b/packages/loot-design/src/svg/v2/Calendar3.js@@ -7,7 +7,7 @@ const SvgCalendar3 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/Check.js b/packages/loot-design/src/svg/v2/Check.jsindex 95db9fa5d0..f053674f4e 100644--- a/packages/loot-design/src/svg/v2/Check.js+++ b/packages/loot-design/src/svg/v2/Check.js@@ -7,7 +7,7 @@ const SvgCheck = props => (xmlns="http://www.w3.org/2000/svg"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/CheckCircle1.js b/packages/loot-design/src/svg/v2/CheckCircle1.jsindex 4846078528..73b9306da3 100644--- a/packages/loot-design/src/svg/v2/CheckCircle1.js+++ b/packages/loot-design/src/svg/v2/CheckCircle1.js@@ -7,7 +7,7 @@ const SvgCheckCircle1 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/CheckCircleHollow.js b/packages/loot-design/src/svg/v2/CheckCircleHollow.jsindex f2704b78c0..82a2561c0d 100644--- a/packages/loot-design/src/svg/v2/CheckCircleHollow.js+++ b/packages/loot-design/src/svg/v2/CheckCircleHollow.js@@ -7,7 +7,7 @@ const SvgCheckCircleHollow = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/CloudUnknown.js b/packages/loot-design/src/svg/v2/CloudUnknown.jsindex 0e51420235..ab0ba7cc9a 100644--- a/packages/loot-design/src/svg/v2/CloudUnknown.js+++ b/packages/loot-design/src/svg/v2/CloudUnknown.js@@ -7,7 +7,7 @@ const SvgCloudUnknown = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/CloudUpload.js b/packages/loot-design/src/svg/v2/CloudUpload.jsindex 798748ecfb..709a09589b 100644--- a/packages/loot-design/src/svg/v2/CloudUpload.js+++ b/packages/loot-design/src/svg/v2/CloudUpload.js@@ -7,7 +7,7 @@ const SvgCloudUpload = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/CustomNotesPaper.js b/packages/loot-design/src/svg/v2/CustomNotesPaper.jsindex b6813e8697..da2b893733 100644--- a/packages/loot-design/src/svg/v2/CustomNotesPaper.js+++ b/packages/loot-design/src/svg/v2/CustomNotesPaper.js@@ -7,7 +7,7 @@ const SvgCustomNotesPaper = props => (xmlns="http://www.w3.org/2000/svg"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/DownloadThickBottom.js b/packages/loot-design/src/svg/v2/DownloadThickBottom.jsindex 0300fb6273..388410e6ae 100644--- a/packages/loot-design/src/svg/v2/DownloadThickBottom.js+++ b/packages/loot-design/src/svg/v2/DownloadThickBottom.js@@ -7,7 +7,7 @@ const SvgDownloadThickBottom = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/EditSkull1.js b/packages/loot-design/src/svg/v2/EditSkull1.jsindex 233b0ec949..228adfdc92 100644--- a/packages/loot-design/src/svg/v2/EditSkull1.js+++ b/packages/loot-design/src/svg/v2/EditSkull1.js@@ -7,7 +7,7 @@ const SvgEditSkull1 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/FavoriteStar.js b/packages/loot-design/src/svg/v2/FavoriteStar.jsindex 63ca1547e4..b48815ed5f 100644--- a/packages/loot-design/src/svg/v2/FavoriteStar.js+++ b/packages/loot-design/src/svg/v2/FavoriteStar.js@@ -7,7 +7,7 @@ const SvgFavoriteStar = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/Filter2.js b/packages/loot-design/src/svg/v2/Filter2.jsindex 411f452df3..7434e71e70 100644--- a/packages/loot-design/src/svg/v2/Filter2.js+++ b/packages/loot-design/src/svg/v2/Filter2.js@@ -7,7 +7,7 @@ const SvgFilter2 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/Hyperlink2.js b/packages/loot-design/src/svg/v2/Hyperlink2.jsindex 4418e871e8..b32a4ce1b0 100644--- a/packages/loot-design/src/svg/v2/Hyperlink2.js+++ b/packages/loot-design/src/svg/v2/Hyperlink2.js@@ -7,7 +7,7 @@ const SvgHyperlink2 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/Hyperlink3.js b/packages/loot-design/src/svg/v2/Hyperlink3.jsindex b0ef80230d..32c94bcd9c 100644--- a/packages/loot-design/src/svg/v2/Hyperlink3.js+++ b/packages/loot-design/src/svg/v2/Hyperlink3.js@@ -7,7 +7,7 @@ const SvgHyperlink3 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/InformationCircle.js b/packages/loot-design/src/svg/v2/InformationCircle.jsindex 8a970905c7..74cc6d503f 100644--- a/packages/loot-design/src/svg/v2/InformationCircle.js+++ b/packages/loot-design/src/svg/v2/InformationCircle.js@@ -7,7 +7,7 @@ const SvgInformationCircle = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/Key.js b/packages/loot-design/src/svg/v2/Key.jsindex 117945e155..a9f2e0c656 100644--- a/packages/loot-design/src/svg/v2/Key.js+++ b/packages/loot-design/src/svg/v2/Key.js@@ -7,7 +7,7 @@ const SvgKey = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/NavigationMenu.js b/packages/loot-design/src/svg/v2/NavigationMenu.jsindex 5943b22524..0707f49de7 100644--- a/packages/loot-design/src/svg/v2/NavigationMenu.js+++ b/packages/loot-design/src/svg/v2/NavigationMenu.js@@ -7,7 +7,7 @@ const SvgNavigationMenu = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><rectdiff --git a/packages/loot-design/src/svg/v2/NotesPaper.js b/packages/loot-design/src/svg/v2/NotesPaper.jsindex 08d9392056..04b1b3c9b2 100644--- a/packages/loot-design/src/svg/v2/NotesPaper.js+++ b/packages/loot-design/src/svg/v2/NotesPaper.js@@ -7,7 +7,7 @@ const SvgNotesPaper = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/NotesPaperText.js b/packages/loot-design/src/svg/v2/NotesPaperText.jsindex 9c2f0aea4f..1ea8142e1c 100644--- a/packages/loot-design/src/svg/v2/NotesPaperText.js+++ b/packages/loot-design/src/svg/v2/NotesPaperText.js@@ -7,7 +7,7 @@ const SvgNotesPaperText = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/Pencil1.js b/packages/loot-design/src/svg/v2/Pencil1.jsindex 3884dd2aba..4b36a62540 100644--- a/packages/loot-design/src/svg/v2/Pencil1.js+++ b/packages/loot-design/src/svg/v2/Pencil1.js@@ -7,7 +7,7 @@ const SvgPencil1 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/PencilWriteAlternate.js b/packages/loot-design/src/svg/v2/PencilWriteAlternate.jsindex 08ff1d9bc2..5f37ae8a43 100644--- a/packages/loot-design/src/svg/v2/PencilWriteAlternate.js+++ b/packages/loot-design/src/svg/v2/PencilWriteAlternate.js@@ -7,7 +7,7 @@ const SvgPencilWriteAlternate = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/RefreshArrow.js b/packages/loot-design/src/svg/v2/RefreshArrow.jsindex c0c422e269..e3ef269ea1 100644--- a/packages/loot-design/src/svg/v2/RefreshArrow.js+++ b/packages/loot-design/src/svg/v2/RefreshArrow.js@@ -7,7 +7,7 @@ const SvgRefreshArrow = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/Remove.js b/packages/loot-design/src/svg/v2/Remove.jsindex 4031233709..cd0ac6b1e9 100644--- a/packages/loot-design/src/svg/v2/Remove.js+++ b/packages/loot-design/src/svg/v2/Remove.js@@ -7,7 +7,7 @@ const SvgRemove = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/RemoveAlternate.js b/packages/loot-design/src/svg/v2/RemoveAlternate.jsindex 66efe4e3ab..77e6389f76 100644--- a/packages/loot-design/src/svg/v2/RemoveAlternate.js+++ b/packages/loot-design/src/svg/v2/RemoveAlternate.js@@ -7,7 +7,7 @@ const SvgRemoveAlternate = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/Search1.js b/packages/loot-design/src/svg/v2/Search1.jsindex 60a0123d43..6afcd67f8a 100644--- a/packages/loot-design/src/svg/v2/Search1.js+++ b/packages/loot-design/src/svg/v2/Search1.js@@ -7,7 +7,7 @@ const SvgSearch1 = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/SearchAlternate.js b/packages/loot-design/src/svg/v2/SearchAlternate.jsindex fb72746db0..67efc3961c 100644--- a/packages/loot-design/src/svg/v2/SearchAlternate.js+++ b/packages/loot-design/src/svg/v2/SearchAlternate.js@@ -7,7 +7,7 @@ const SvgSearchAlternate = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/SettingsSliderAlternate.js b/packages/loot-design/src/svg/v2/SettingsSliderAlternate.jsindex da62ff84e8..9800a4fa56 100644--- a/packages/loot-design/src/svg/v2/SettingsSliderAlternate.js+++ b/packages/loot-design/src/svg/v2/SettingsSliderAlternate.js@@ -7,7 +7,7 @@ const SvgSettingsSliderAlternate = props => (xmlns="http://www.w3.org/2000/svg"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/Subtract.js b/packages/loot-design/src/svg/v2/Subtract.jsindex aa2521be26..1d38fa0a7c 100644--- a/packages/loot-design/src/svg/v2/Subtract.js+++ b/packages/loot-design/src/svg/v2/Subtract.js@@ -7,7 +7,7 @@ const SvgSubtract = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/UploadThickBottom.js b/packages/loot-design/src/svg/v2/UploadThickBottom.jsindex e7578c812a..579ad43dbf 100644--- a/packages/loot-design/src/svg/v2/UploadThickBottom.js+++ b/packages/loot-design/src/svg/v2/UploadThickBottom.js@@ -7,7 +7,7 @@ const SvgUploadThickBottom = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/svg/v2/ValidationCheck.js b/packages/loot-design/src/svg/v2/ValidationCheck.jsindex fca310106e..ea0e81b95f 100644--- a/packages/loot-design/src/svg/v2/ValidationCheck.js+++ b/packages/loot-design/src/svg/v2/ValidationCheck.js@@ -7,7 +7,7 @@ const SvgValidationCheck = props => (viewBox="0 0 24 24"style={{color: '#242134',- ...props.style+ ...props.style,}}><pathdiff --git a/packages/loot-design/src/tokens.js b/packages/loot-design/src/tokens.jsindex c24fcd88d5..ed2ce56313 100644--- a/packages/loot-design/src/tokens.js+++ b/packages/loot-design/src/tokens.js@@ -1,5 +1,5 @@export default {breakpoint_narrow: '512px',breakpoint_medium: '768px',- breakpoint_wide: '1024px'+ breakpoint_wide: '1024px',};diff --git a/packages/loot-design/src/util/keys.js b/packages/loot-design/src/util/keys.jsindex 18056789b9..b6f3a15900 100644--- a/packages/loot-design/src/util/keys.js+++ b/packages/loot-design/src/util/keys.js@@ -14,7 +14,7 @@ export const keys = {DOWN: 40,J: 74,K: 75,- X: 88+ X: 88,};let _keyHandlers = {};@@ -23,7 +23,7 @@ let _modifierState = {shift: false,ctrl: false,alt: false,- meta: false+ meta: false,};export function hasModifierKey(modifier) {