Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: upgrading to version 3 of prettier and reformating with the new default rules

Ilian Sapundshievd2a7c8763bb6
diff --git a/app/AppConfig.ts b/app/AppConfig.ts
index f211a6c0a..e6c3c9b6c 100644
--- a/app/AppConfig.ts
+++ b/app/AppConfig.ts
@@ -24,7 +24,7 @@ AppConfig.editableFiles = [
'rb',
'ini',
'sh',
- 'sql'
+ 'sql',
];
AppConfig.autoSaveInterval = 40000;
AppConfig.maxLoops = 2;
diff --git a/app/components/CommonIcons.tsx b/app/components/CommonIcons.tsx
index 91a7ebd04..0ee58905b 100644
--- a/app/components/CommonIcons.tsx
+++ b/app/components/CommonIcons.tsx
@@ -19,12 +19,12 @@
import React from 'react';
import KeyboardReturnIcon from '@mui/icons-material/KeyboardReturn';
-export const ParentFolderIcon = props => (
+export const ParentFolderIcon = (props) => (
<KeyboardReturnIcon style={{ transform: 'rotate(90deg)' }} />
// <ParentFolder {...props} />
);
-export const NavigateToFolderIcon = props => <KeyboardReturnIcon />;
+export const NavigateToFolderIcon = (props) => <KeyboardReturnIcon />;
export { default as InfoTooltipIcon } from '@mui/icons-material/InfoOutlined';
diff --git a/app/components/CustomDragLayer.tsx b/app/components/CustomDragLayer.tsx
index 3ca194839..77ac96452 100644
--- a/app/components/CustomDragLayer.tsx
+++ b/app/components/CustomDragLayer.tsx
@@ -11,17 +11,17 @@ const layerStyles: React.CSSProperties = {
left: 0,
top: 0,
width: '100%',
- height: '100%'
+ height: '100%',
};
function getItemStyles(
initialOffset: XYCoord | null,
currentOffset: XYCoord | null,
- clientOffset: XYCoord | null
+ clientOffset: XYCoord | null,
) {
if (!initialOffset || !currentOffset) {
return {
- display: 'none'
+ display: 'none',
};
}
@@ -30,27 +30,27 @@ function getItemStyles(
const transform = `translate(${x}px, ${y}px)`;
return {
transform,
- WebkitTransform: transform
+ WebkitTransform: transform,
};
}
export interface CustomDragLayerProps {}
-const CustomDragLayer: React.FC<CustomDragLayerProps> = props => {
+const CustomDragLayer: React.FC<CustomDragLayerProps> = (props) => {
const {
itemType,
isDragging,
item,
initialOffset,
currentOffset,
- clientOffset
- } = useDragLayer(monitor => ({
+ clientOffset,
+ } = useDragLayer((monitor) => ({
item: monitor.getItem(),
itemType: monitor.getItemType(),
initialOffset: monitor.getInitialSourceClientOffset(),
currentOffset: monitor.getSourceClientOffset(),
clientOffset: monitor.getClientOffset(),
- isDragging: monitor.isDragging()
+ isDragging: monitor.isDragging(),
}));
function renderItem() {
diff --git a/app/components/CustomLogo.tsx b/app/components/CustomLogo.tsx
index 607e2b540..6766be1de 100644
--- a/app/components/CustomLogo.tsx
+++ b/app/components/CustomLogo.tsx
@@ -42,8 +42,8 @@ const StyledAppVersionBadge = styled(Badge)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'light'
? theme.palette.grey[200]
- : theme.palette.grey[900]
- }
+ : theme.palette.grey[900],
+ },
}));
function CustomLogo() {
@@ -73,7 +73,7 @@ function CustomLogo() {
>
<img
style={{
- width: 40
+ width: 40,
}}
src={LogoIcon}
alt="TagSpaces Logo"
diff --git a/app/components/DirectoryListView.tsx b/app/components/DirectoryListView.tsx
index 8ae1e1313..a2f909493 100644
--- a/app/components/DirectoryListView.tsx
+++ b/app/components/DirectoryListView.tsx
@@ -34,7 +34,7 @@ function DirectoryListView(props: Props) {
const locations: Array<TS.Location> = useSelector(getLocations);
const showUnixHiddenEntries: boolean = useSelector(getShowUnixHiddenEntries);
const chosenLocationId = useRef<string>(
- currentLocation ? currentLocation.uuid : undefined
+ currentLocation ? currentLocation.uuid : undefined,
);
const chosenDirectory = useRef<string>(currentDirectoryPath);
const [directoryContent, setDirectoryContent] = useState<
@@ -43,7 +43,7 @@ function DirectoryListView(props: Props) {
useEffect(() => {
const chosenLocation = locations.find(
- location => location.uuid === chosenLocationId.current
+ (location) => location.uuid === chosenLocationId.current,
);
if (chosenLocation) {
const path =
@@ -61,7 +61,7 @@ function DirectoryListView(props: Props) {
const handleLocationChange = (event: React.ChangeEvent<HTMLInputElement>) => {
chosenLocationId.current = event.target.value;
const chosenLocation = locations.find(
- location => location.uuid === chosenLocationId.current
+ (location) => location.uuid === chosenLocationId.current,
);
if (chosenLocation) {
listDirectory(chosenLocation.path);
@@ -71,7 +71,7 @@ function DirectoryListView(props: Props) {
function getDirLocations() {
const chosenLocation = locations.find(
- location => location.uuid === chosenLocationId.current
+ (location) => location.uuid === chosenLocationId.current,
);
if (chosenLocation.type !== locationType.TYPE_LOCAL) {
return null;
@@ -83,7 +83,7 @@ function DirectoryListView(props: Props) {
value={chosenLocationId.current}
>
{locations
- .filter(loc => loc.type === locationType.TYPE_LOCAL)
+ .filter((loc) => loc.type === locationType.TYPE_LOCAL)
.map((location: TS.Location) => (
<MenuItem key={location.uuid} value={location.uuid}>
<span style={{ width: '100%' }}>{location.name}</span>
@@ -98,33 +98,33 @@ function DirectoryListView(props: Props) {
PlatformIO.listDirectoryPromise(
directoryPath,
[], // mode,
- []
+ [],
)
- .then(results => {
+ .then((results) => {
if (results !== undefined) {
setDirectoryContent(
- results.filter(entry => {
+ results.filter((entry) => {
return (
!entry.isFile &&
entry.name !== AppConfig.metaFolder &&
!entry.name.endsWith('/' + AppConfig.metaFolder) &&
!(!showUnixHiddenEntries && entry.name.startsWith('.'))
);
- })
+ }),
// .sort((a, b) => b.name - a.name)
);
// props.setTargetDir(directoryPath);
}
return true;
})
- .catch(error => {
+ .catch((error) => {
console.log('listDirectoryPromise', error);
});
}
function getFolderContent() {
if (directoryContent && directoryContent.length > 0) {
- return directoryContent.map(entry => (
+ return directoryContent.map((entry) => (
<ListItem
key={entry.path}
data-tid={'MoveTarget' + entry.name}
@@ -178,13 +178,13 @@ function DirectoryListView(props: Props) {
dispatch(
AppActions.toggleCreateDirectoryDialog({
rootDirPath: chosenDirectory.current,
- callback: newDirPath => {
+ callback: (newDirPath) => {
listDirectory(chosenDirectory.current);
setTargetDir(newDirPath);
//watchForChanges();
},
- reflect: false
- })
+ reflect: false,
+ }),
);
}}
>
@@ -195,7 +195,7 @@ function DirectoryListView(props: Props) {
style={{
borderRadius: 5,
maxHeight: 300,
- overflowY: 'auto'
+ overflowY: 'auto',
}}
>
{getFolderContent()}
diff --git a/app/components/DirectoryTreeView.tsx b/app/components/DirectoryTreeView.tsx
index a62a19905..46c09df48 100644
--- a/app/components/DirectoryTreeView.tsx
+++ b/app/components/DirectoryTreeView.tsx
@@ -64,7 +64,7 @@ const DirectoryTreeView = forwardRef(
.then(() => {
loadSubDirectories(location);
})
- .catch(error => {
+ .catch((error) => {
console.log('enableObjectStoreSupport', error);
});
} else if (location.type === locationType.TYPE_WEBDAV) {
@@ -81,7 +81,7 @@ const DirectoryTreeView = forwardRef(
if (isExpanded) {
setExpanded(false);
}
- }
+ },
/* removeLocation() {
setData(undefined);
} */
@@ -105,7 +105,7 @@ const DirectoryTreeView = forwardRef(
</td>
); */
- const renderBodyRow = props => {
+ const renderBodyRow = (props) => {
if (AppConfig.isElectron || location.type !== locationType.TYPE_CLOUD) {
// DnD to S3 location is not permitted in web browser without <input> element
return (
@@ -120,7 +120,7 @@ const DirectoryTreeView = forwardRef(
return <tr {...props} />;
};
- const renderNameColumnAction = field => {
+ const renderNameColumnAction = (field) => {
const children = (
<span style={{ fontSize: 15 }} title={field}>
<FolderIcon
@@ -128,7 +128,7 @@ const DirectoryTreeView = forwardRef(
marginTop: 0,
marginLeft: 3,
marginRight: 6,
- marginBottom: -8
+ marginBottom: -8,
}}
className={classes.icon}
/>
@@ -137,7 +137,7 @@ const DirectoryTreeView = forwardRef(
);
return {
children,
- props: {}
+ props: {},
};
};
@@ -147,7 +147,7 @@ const DirectoryTreeView = forwardRef(
}, */
onClick: () => {
onRowClick(record);
- }
+ },
/* onDoubleClick: (e) => {
this.onRowClick(record, index, e);
} */
@@ -161,7 +161,7 @@ const DirectoryTreeView = forwardRef(
}
};
- const onRowClick = subDir => {
+ const onRowClick = (subDir) => {
if (subDir.type === locationType.TYPE_CLOUD) {
PlatformIO.enableObjectStoreSupport(subDir)
.then(() => {
@@ -169,7 +169,7 @@ const DirectoryTreeView = forwardRef(
changeLocation(subDir);
return openDirectory(subDir.path);
})
- .catch(error => {
+ .catch((error) => {
console.log('enableObjectStoreSupport', error);
});
} else if (subDir.type === locationType.TYPE_LOCAL) {
@@ -187,8 +187,8 @@ const DirectoryTreeView = forwardRef(
key: 'name',
width: '80%',
render: renderNameColumnAction,
- onCell: handleCellClick
- }
+ onCell: handleCellClick,
+ },
];
const loadSubDirectories = (location: TS.Location) => {
@@ -198,15 +198,15 @@ const DirectoryTreeView = forwardRef(
...(location.region && { region: location.region }),
...(location.endpointURL && { endpointURL: location.endpointURL }),
...(location.secretAccessKey && {
- secretAccessKey: location.secretAccessKey
+ secretAccessKey: location.secretAccessKey,
}),
uuid: location.uuid,
name: location.name,
type: location.type,
- path: PlatformIO.getLocationPath(location)
+ path: PlatformIO.getLocationPath(location),
};
getDirectoriesTree(subFolder)
- .then(children => {
+ .then((children) => {
if (children instanceof Array) {
if (location.uuid) {
const dirsTree = {}; // this.state.dirs; (uncomment to allow open multiple Locations folders) //TODO set settings for this
@@ -232,7 +232,7 @@ const DirectoryTreeView = forwardRef(
}
return true;
})
- .catch(error => {
+ .catch((error) => {
console.log('loadSubDirectories', error);
});
};
@@ -254,11 +254,11 @@ const DirectoryTreeView = forwardRef(
// const { settings } = getState();
new Promise((resolve, reject) => {
PlatformIO.listDirectoryPromise(subFolder.path, [])
- .then(dirEntries => {
+ .then((dirEntries) => {
if (dirEntries !== undefined) {
// console.debug('listDirectoryPromise resolved:' + dirEntries.length);
const directoryContent = [];
- dirEntries.map(entry => {
+ dirEntries.map((entry) => {
if (
entry.name === AppConfig.metaFolder ||
entry.name.endsWith('/' + AppConfig.metaFolder) ||
@@ -294,7 +294,7 @@ const DirectoryTreeView = forwardRef(
resolve(directoryContent);
}
})
- .catch(error => {
+ .catch((error) => {
console.debug('getDirectoriesTree', error);
reject();
});
@@ -323,8 +323,8 @@ const DirectoryTreeView = forwardRef(
{
depth: 0,
element: arrSubDirs[a],
- propPath: ''
- }
+ propPath: '',
+ },
];
let stackItem = 0;
let current;
@@ -368,7 +368,7 @@ const DirectoryTreeView = forwardRef(
element: children[i],
depth: depth + 1,
propPath:
- (stackPath ? stackPath + '.' : '') + i + '.children'
+ (stackPath ? stackPath + '.' : '') + i + '.children',
});
}
}
@@ -386,7 +386,7 @@ const DirectoryTreeView = forwardRef(
// className={classes.locationListArea}
components={{
// header: { cell: this.renderHeaderRow },
- body: { row: renderBodyRow }
+ body: { row: renderBodyRow },
}}
showHeader={false}
// className="table"
@@ -401,13 +401,13 @@ const DirectoryTreeView = forwardRef(
onRow={(record, index) => ({
index,
location: record,
- handleFileMoveDrop: handleFileMoveDrop
+ handleFileMoveDrop: handleFileMoveDrop,
})}
/>
);
}
return null;
- }
+ },
);
export default DirectoryTreeView;
diff --git a/app/components/DnD.css.tsx b/app/components/DnD.css.tsx
index 0044481d7..38b4e5ace 100644
--- a/app/components/DnD.css.tsx
+++ b/app/components/DnD.css.tsx
@@ -20,7 +20,7 @@ import { styled } from '@mui/material/styles';
const PREFIX = 'DnD';
export const classes = {
- dropzone: `${PREFIX}-dropzone`
+ dropzone: `${PREFIX}-dropzone`,
};
export const DnD = styled('div')(({ theme }) => ({
@@ -40,6 +40,6 @@ export const DnD = styled('div')(({ theme }) => ({
textAlign: 'center',
fontSize: '40px',
fontWeight: 'bold',
- color: 'white'
- }
+ color: 'white',
+ },
}));
diff --git a/app/components/DragItemTypes.tsx b/app/components/DragItemTypes.tsx
index 3b98e74d2..247283526 100644
--- a/app/components/DragItemTypes.tsx
+++ b/app/components/DragItemTypes.tsx
@@ -19,5 +19,5 @@
export default {
TAG: 'tag',
TAG_GROUP: 'tag_group',
- FILE: 'file_move'
+ FILE: 'file_move',
};
diff --git a/app/components/EditDescription.tsx b/app/components/EditDescription.tsx
index 61c20c0da..b50258d3c 100644
--- a/app/components/EditDescription.tsx
+++ b/app/components/EditDescription.tsx
@@ -12,7 +12,7 @@ import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
const PREFIX = 'EditDescription';
const classes = {
- mdHelpers: `${PREFIX}-mdHelpers`
+ mdHelpers: `${PREFIX}-mdHelpers`,
};
const EditDescriptionRoot = styled('div')(({ theme }) => ({
@@ -21,8 +21,8 @@ const EditDescriptionRoot = styled('div')(({ theme }) => ({
borderRadius: '0.25rem',
paddingLeft: '0.25rem',
paddingRight: '0.25rem',
- backgroundColor: '#bcc0c561'
- }
+ backgroundColor: '#bcc0c561',
+ },
}));
function EditDescription() {
@@ -51,7 +51,7 @@ function EditDescription() {
const milkdownOnFocus = React.useCallback(
() => (descriptionFocus.current = true),
- []
+ [],
);
const milkdownListener = React.useCallback((markdown: string) => {
if (descriptionFocus.current && markdown !== description) {
@@ -86,7 +86,7 @@ function EditDescription() {
borderRadius: 5,
height: 'calc(100% - 40px)',
width: 'calc(100% - 8px)',
- overflowY: 'auto'
+ overflowY: 'auto',
}}
>
{noDescription && !editMode ? (
@@ -95,13 +95,13 @@ function EditDescription() {
style={{
color: theme.palette.text.primary,
padding: 10,
- lineHeight: 4
+ lineHeight: 4,
}}
>
{t(
openedFile.editMode
? 'core:editDisabled'
- : 'core:addMarkdownDescription'
+ : 'core:addMarkdownDescription',
)}
</Typography>
) : (
@@ -133,7 +133,7 @@ function EditDescription() {
<Typography
variant="caption"
style={{
- color: theme.palette.text.primary
+ color: theme.palette.text.primary,
}}
>
Markdown help: <i className={classes.mdHelpers}>_italic_</i>{' '}
diff --git a/app/components/EditDescriptionButtons.tsx b/app/components/EditDescriptionButtons.tsx
index 16c7491d3..d55ac34b6 100644
--- a/app/components/EditDescriptionButtons.tsx
+++ b/app/components/EditDescriptionButtons.tsx
@@ -12,7 +12,7 @@ import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
const PREFIX = 'EditDescriptionButtons';
const classes = {
- button: `${PREFIX}-button`
+ button: `${PREFIX}-button`,
};
const Root = styled('span')(({ theme }) => ({
@@ -20,8 +20,8 @@ const Root = styled('span')(({ theme }) => ({
[`& .${classes.button}`]: {
position: 'relative',
padding: '4px 10px 4px 10px',
- margin: '0'
- }
+ margin: '0',
+ },
}));
export interface DescriptionChangedRef {
@@ -37,22 +37,22 @@ type Props = {
const EditDescriptionButtons: React.FC<Props> = ({
buttonsRef,
editMode,
- setEditMode
+ setEditMode,
}) => {
const { t } = useTranslation();
const {
description,
isSaveDescriptionConfirmOpened,
setSaveDescriptionConfirmOpened,
- saveDescription
+ saveDescription,
} = useDescriptionContext();
const { currentDirectoryPath } = useDirectoryContentContext();
const [isDescriptionChanged, descriptionChanged] = useState<boolean>(false);
React.useImperativeHandle(buttonsRef, () => ({
- setDescriptionChanged: changed => {
+ setDescriptionChanged: (changed) => {
descriptionChanged(changed);
- }
+ },
}));
useEffect(() => {
@@ -68,7 +68,7 @@ const EditDescriptionButtons: React.FC<Props> = ({
const printWin = window.open('', 'PRINT', 'height=400,width=600');
printWin.document.write(
- '<html><head><title>' + currentDirectoryPath + ' description</title>'
+ '<html><head><title>' + currentDirectoryPath + ' description</title>',
);
printWin.document.write('</head><body >');
printWin.document.write(sanitizedDescription);
@@ -120,7 +120,7 @@ const EditDescriptionButtons: React.FC<Props> = ({
}}
title={t('core:confirm')}
content={t('core:saveFileBeforeClosingFile')}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
saveDescription();
} else {
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index 8fa8832c6..72e9a95f7 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -22,7 +22,7 @@ import React, {
useEffect,
useReducer,
useRef,
- useState
+ useState,
} from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { GlobalHotKeys } from 'react-hotkeys';
@@ -38,7 +38,7 @@ import AppConfig from '-/AppConfig';
import {
extractContainingDirectoryPath,
getBackupFileLocation,
- extractFileExtension
+ extractFileExtension,
} from '@tagspaces/tagspaces-common/paths';
import ConfirmDialog from '-/components/dialogs/ConfirmDialog';
import PlatformIO from '-/services/platform-facade';
@@ -47,7 +47,7 @@ import {
isDesktopMode,
getKeyBindingObject,
isRevisionsEnabled,
- getEntryContainerTab
+ getEntryContainerTab,
} from '-/reducers/settings';
import { OpenedEntry, AppDispatch } from '-/reducers/app';
import useEventListener from '-/utils/useEventListener';
@@ -87,24 +87,18 @@ function EntryContainer() {
openNextFile,
openPrevFile,
updateOpenedFile,
- reloadOpenedFile
+ reloadOpenedFile,
} = useOpenedEntryContext();
const { saveDescription } = useDescriptionContext();
- const {
- readOnlyMode,
- switchLocationTypeByID,
- switchCurrentLocationType
- } = useCurrentLocationContext();
+ const { readOnlyMode, switchLocationTypeByID, switchCurrentLocationType } =
+ useCurrentLocationContext();
const { openDirectory, currentDirectoryPath } = useDirectoryContentContext();
- const {
- copyFilePromiseOverwrite,
- copyFilePromise,
- saveTextFilePromise
- } = usePlatformFacadeContext();
+ const { copyFilePromiseOverwrite, copyFilePromise, saveTextFilePromise } =
+ usePlatformFacadeContext();
const { showNotification } = useNotificationContext();
const tabIndex = useSelector(getEntryContainerTab);
const fileEditHistoryKey = useSelector(
- (state: any) => state.settings[historyKeys.fileEditKey]
+ (state: any) => state.settings[historyKeys.fileEditKey],
);
const keyBindings = useSelector(getKeyBindingObject);
const desktopMode = useSelector(isDesktopMode);
@@ -118,10 +112,10 @@ function EntryContainer() {
const openedPanelStyle: React.CSSProperties = {
display: 'flex',
- flexDirection: 'column'
+ flexDirection: 'column',
};
const [isPanelOpened, setPanelOpened] = useState<boolean>(
- tabIndex !== undefined
+ tabIndex !== undefined,
);
/*const [isRevisionPanelVisible, setRevisionPanelVisible] = useState<boolean>(
@@ -129,37 +123,32 @@ function EntryContainer() {
);*/
const [isFullscreen, setFullscreen] = useState<boolean>(false);
// eslint-disable-next-line no-unused-vars
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
// const [editingSupported, setEditingSupported] = useState<boolean>(true);
const [
isSaveBeforeCloseConfirmDialogOpened,
- setSaveBeforeCloseConfirmDialogOpened
+ setSaveBeforeCloseConfirmDialogOpened,
] = useState<boolean>(false);
const [
isSaveBeforeReloadConfirmDialogOpened,
- setSaveBeforeReloadConfirmDialogOpened
+ setSaveBeforeReloadConfirmDialogOpened,
] = useState<boolean>(false);
- const [isEditTagsModalOpened, setEditTagsModalOpened] = useState<boolean>(
- false
- );
- const [isConflictDialogOpen, setConflictDialogOpen] = useState<boolean>(
- false
- );
+ const [isEditTagsModalOpened, setEditTagsModalOpened] =
+ useState<boolean>(false);
+ const [isConflictDialogOpen, setConflictDialogOpen] =
+ useState<boolean>(false);
const [isSavingInProgress, setSavingInProgress] = useState<boolean>(false);
- const [entryPropertiesHeight, setEntryPropertiesHeight] = useState<number>(
- 100
- );
- const fileViewer: MutableRefObject<HTMLIFrameElement> = useRef<
- HTMLIFrameElement
- >(null);
- const fileViewerContainer: MutableRefObject<HTMLDivElement> = useRef<
- HTMLDivElement
- >(null);
+ const [entryPropertiesHeight, setEntryPropertiesHeight] =
+ useState<number>(100);
+ const fileViewer: MutableRefObject<HTMLIFrameElement> =
+ useRef<HTMLIFrameElement>(null);
+ const fileViewerContainer: MutableRefObject<HTMLDivElement> =
+ useRef<HTMLDivElement>(null);
const fileChanged = useRef<boolean>(false);
const eventID = useRef<string>(getUuid());
// const firstRender = useFirstRender();
- useEventListener('message', e => {
+ useEventListener('message', (e) => {
if (typeof e.data === 'string') {
// console.log(e.data);
try {
@@ -170,13 +159,13 @@ function EntryContainer() {
} catch (ex) {
console.debug(
'useEventListener message:' + e.data + ' parse error:',
- ex
+ ex,
);
}
}
});
- const handleFullscreenChange = useCallback(e => {
+ const handleFullscreenChange = useCallback((e) => {
let change = '';
if (fscreen.fullscreenElement !== null) {
change = 'Entered fullscreen mode';
@@ -212,7 +201,7 @@ function EntryContainer() {
console.log(change, e);
}, []);
- const handleFullscreenError = useCallback(e => {
+ const handleFullscreenError = useCallback((e) => {
console.log('Fullscreen Error', e);
}, []);
@@ -238,7 +227,7 @@ function EntryContainer() {
fscreen.addEventListener(
'fullscreenchange',
handleFullscreenChange,
- false
+ false,
);
fscreen.addEventListener('fullscreenerror', handleFullscreenError, false);
return () => {
@@ -355,12 +344,12 @@ function EntryContainer() {
// textFilePath += '/index.html';
// }
switchLocationTypeByID(openedFile.locationId).then(
- currentLocationId => {
+ (currentLocationId) => {
PlatformIO.loadTextFilePromise(
textFilePath,
- data.preview ? data.preview : false
+ data.preview ? data.preview : false,
)
- .then(content => {
+ .then((content) => {
const UTF8_BOM = '\ufeff';
if (content.indexOf(UTF8_BOM) === 0) {
// eslint-disable-next-line no-param-reassign
@@ -368,14 +357,14 @@ function EntryContainer() {
}
let fileDirectory = extractContainingDirectoryPath(
textFilePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
if (AppConfig.isWeb) {
fileDirectory =
extractContainingDirectoryPath(
// eslint-disable-next-line no-restricted-globals
location.href,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
) +
'/' +
fileDirectory;
@@ -392,16 +381,16 @@ function EntryContainer() {
content,
fileDirectory,
!openedFile.editMode,
- theme.palette.mode
+ theme.palette.mode,
);
}
return switchCurrentLocationType();
})
- .catch(err => {
+ .catch((err) => {
console.warn('Error loading text content ' + err);
return switchCurrentLocationType();
});
- }
+ },
);
break;
case 'contentChangedInEditor': {
@@ -414,7 +403,7 @@ function EntryContainer() {
}
default:
console.log(
- 'Not recognized messaging command: ' + JSON.stringify(data)
+ 'Not recognized messaging command: ' + JSON.stringify(data),
);
break;
}
@@ -468,7 +457,7 @@ function EntryContainer() {
}
};
- const startClosingFile = event => {
+ const startClosingFile = (event) => {
if (event) {
event.preventDefault(); // Let's stop this event.
event.stopPropagation();
@@ -506,7 +495,7 @@ function EntryContainer() {
//check if file is changed
if (fileChanged.current || force) {
setSavingInProgress(true);
- saveFile().then(success => {
+ saveFile().then((success) => {
if (success) {
fileChanged.current = false;
// showNotification(
@@ -527,13 +516,12 @@ function EntryContainer() {
const override = (): Promise<boolean> => {
return switchLocationTypeByID(openedFile.locationId).then(() =>
- PlatformIO.getPropertiesPromise(
- openedFile.path
- ).then((entryProp: TS.FileSystemEntry) =>
- save({ ...openedFile, lmdt: entryProp.lmdt }).then(() =>
- switchCurrentLocationType()
- )
- )
+ PlatformIO.getPropertiesPromise(openedFile.path).then(
+ (entryProp: TS.FileSystemEntry) =>
+ save({ ...openedFile, lmdt: entryProp.lmdt }).then(() =>
+ switchCurrentLocationType(),
+ ),
+ ),
);
};
@@ -545,10 +533,10 @@ function EntryContainer() {
save({
...openedFile,
path: entryProp.path,
- lmdt: entryProp.lmdt
+ lmdt: entryProp.lmdt,
}).then(() => {
const openedFileDir = extractContainingDirectoryPath(
- entryProp.path
+ entryProp.path,
);
if (currentDirectoryPath === openedFileDir) {
openDirectory(openedFileDir);
@@ -560,15 +548,15 @@ function EntryContainer() {
});*/
}
return switchCurrentLocationType();
- })
- )
- )
+ }),
+ ),
+ ),
);
};
const saveFile = (): Promise<boolean> => {
return switchLocationTypeByID(openedFile.locationId).then(() =>
- save(openedFile).then(() => switchCurrentLocationType())
+ save(openedFile).then(() => switchCurrentLocationType()),
);
};
@@ -578,12 +566,12 @@ function EntryContainer() {
if (Pro && revisionsEnabled) {
const id = await Pro.MetaOperations.getMetadataID(
fileOpen.path,
- fileOpen.uuid
+ fileOpen.uuid,
);
const targetPath = getBackupFileLocation(
fileOpen.path,
id,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
try {
await copyFilePromiseOverwrite(fileOpen.path, targetPath); // todo test what happened if remove await?
@@ -594,7 +582,7 @@ function EntryContainer() {
return saveTextFilePromise(
{ path: fileOpen.path, lmdt: fileOpen.lmdt },
textContent,
- true
+ true,
)
.then(() => {
if (Pro) {
@@ -603,9 +591,9 @@ function EntryContainer() {
{
path: fileOpen.path,
url: fileOpen.url,
- lid: fileOpen.locationId
+ lid: fileOpen.locationId,
},
- fileEditHistoryKey
+ fileEditHistoryKey,
);
}
@@ -614,10 +602,10 @@ function EntryContainer() {
...fileOpen,
editMode: true,
//changed: false,
- shouldReload: undefined
+ shouldReload: undefined,
}).then(() => true);
})
- .catch(error => {
+ .catch((error) => {
setConflictDialogOpen(true);
console.log('Error saving file ' + fileOpen.path + ' - ' + error);
return false;
@@ -630,7 +618,7 @@ function EntryContainer() {
id: '',
...openedFile,
editMode: true,
- shouldReload: undefined
+ shouldReload: undefined,
}).then(() => switchCurrentLocationType());
});
};
@@ -674,7 +662,7 @@ function EntryContainer() {
const fileExtension = extractFileExtension(
openedFile.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const isEditable =
openedFile.isFile && AppConfig.editableFiles.includes(fileExtension);
@@ -682,15 +670,17 @@ function EntryContainer() {
const toggleAutoSave = (event: React.ChangeEvent<HTMLInputElement>) => {
const autoSave = event.target.checked;
if (Pro && Pro.MetaOperations) {
- switchLocationTypeByID(openedFile.locationId).then(currentLocationId => {
- Pro.MetaOperations.saveFsEntryMeta(openedFile.path, {
- autoSave
- }).then(entryMeta => {
- updateOpenedFile(openedFile.path, entryMeta).then(() =>
- switchCurrentLocationType()
- );
- });
- });
+ switchLocationTypeByID(openedFile.locationId).then(
+ (currentLocationId) => {
+ Pro.MetaOperations.saveFsEntryMeta(openedFile.path, {
+ autoSave,
+ }).then((entryMeta) => {
+ updateOpenedFile(openedFile.path, entryMeta).then(() =>
+ switchCurrentLocationType(),
+ );
+ });
+ },
+ );
} else {
showNotification(t('core:thisFunctionalityIsAvailableInPro'));
}
@@ -816,7 +806,7 @@ function EntryContainer() {
style={{
position: 'relative',
overflow: 'hidden',
- height: '100%'
+ height: '100%',
}}
>
{tabsComponent('160px')}
@@ -828,7 +818,7 @@ function EntryContainer() {
top: 8,
backgroundColor: theme.palette.background.default,
display: 'flex',
- alignItems: 'center'
+ alignItems: 'center',
}}
>
{autoSave}
@@ -850,7 +840,7 @@ function EntryContainer() {
editDocument: editOpenedFile,
nextDocument: openNextFileAction,
prevDocument: openPrevFileAction,
- toggleFullScreen
+ toggleFullScreen,
}}
keyMap={{
nextDocument: keyBindings.nextDocument,
@@ -858,13 +848,13 @@ function EntryContainer() {
closeViewer: keyBindings.closeViewer,
saveDocument: keyBindings.saveDocument,
editDocument: keyBindings.editDocument,
- toggleFullScreen: keyBindings.toggleFullScreen
+ toggleFullScreen: keyBindings.toggleFullScreen,
}}
>
<div
style={{
height: '100%',
- ...(isPanelOpened && openedPanelStyle)
+ ...(isPanelOpened && openedPanelStyle),
}}
>
<div
@@ -874,7 +864,7 @@ function EntryContainer() {
flex: '1 1 ' + entryPropertiesHeight + '%',
display: 'flex',
backgroundColor: theme.palette.background.default,
- overflow: 'hidden'
+ overflow: 'hidden',
}}
>
<Box
@@ -885,7 +875,7 @@ function EntryContainer() {
minHeight: 50,
display: 'flex',
flexDirection: 'row',
- justifyContent: 'flex-start'
+ justifyContent: 'flex-start',
}}
>
<EntryContainerTitle
@@ -907,7 +897,7 @@ function EntryContainer() {
maxHeight: 9,
minHeight: 9,
backgroundColor: theme.palette.background.default,
- borderBottom: '1px solid ' + theme.palette.divider
+ borderBottom: '1px solid ' + theme.palette.divider,
}}
onClick={toggleEntryPropertiesHeight}
>
@@ -915,7 +905,7 @@ function EntryContainer() {
style={{
width: '30%',
border: '1px solid ' + theme.palette.text.secondary,
- margin: '2px auto'
+ margin: '2px auto',
}}
></div>
</div>
@@ -943,7 +933,7 @@ function EntryContainer() {
}}
title={t('core:confirm')}
content={t('core:saveFileBeforeClosingFile')}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
startSavingFile();
} else {
@@ -964,7 +954,7 @@ function EntryContainer() {
}}
title={t('core:confirm')}
content="File was modified, do you want to save the changes?"
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
setSaveBeforeReloadConfirmDialogOpened(false);
startSavingFile();
@@ -975,7 +965,7 @@ function EntryContainer() {
...openedFile,
editMode: false,
// changed: false,
- shouldReload: true
+ shouldReload: true,
});
fileChanged.current = false;
}
diff --git a/app/components/EntryContainerMenu.tsx b/app/components/EntryContainerMenu.tsx
index b96053036..dbb4d7ec9 100644
--- a/app/components/EntryContainerMenu.tsx
+++ b/app/components/EntryContainerMenu.tsx
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
import {
baseName,
extractFileName,
- extractDirectoryName
+ extractDirectoryName,
} from '@tagspaces/tagspaces-common/paths';
import PlatformIO from '-/services/platform-facade';
import {
@@ -11,7 +11,7 @@ import {
Menu,
MenuItem,
MenuList,
- Divider
+ Divider,
} from '@mui/material';
import { OpenedEntry } from '-/reducers/app';
import { useSelector } from 'react-redux';
@@ -22,7 +22,7 @@ import {
NavigateToFolderIcon,
OpenNewWindowIcon,
ParentFolderIcon,
- ReloadIcon
+ ReloadIcon,
} from '-/components/CommonIcons';
import ExpandIcon from '@mui/icons-material/SettingsEthernet';
import OpenNativelyIcon from '@mui/icons-material/Launch';
@@ -31,7 +31,7 @@ import FileDownloadIcon from '@mui/icons-material/AssignmentReturned';
import ConfirmDialog from '-/components/dialogs/ConfirmDialog';
import {
getWarningOpeningFilesExternally,
- isDesktopMode
+ isDesktopMode,
} from '-/reducers/settings';
import { useTranslation } from 'react-i18next';
import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';
@@ -57,7 +57,7 @@ function EntryContainerMenu(props: Props) {
toggleFullScreen,
sharingLink,
sharingParentFolderLink,
- reloadDocument
+ reloadDocument,
} = props;
const { t } = useTranslation();
// const theme = useTheme();
@@ -67,17 +67,16 @@ function EntryContainerMenu(props: Props) {
const { showNotification } = useNotificationContext();
const desktopMode = useSelector(isDesktopMode);
const warningOpeningFilesExternally = useSelector(
- getWarningOpeningFilesExternally
+ getWarningOpeningFilesExternally,
);
- const [isDeleteEntryModalOpened, setDeleteEntryModalOpened] = useState<
- boolean
- >(false);
+ const [isDeleteEntryModalOpened, setDeleteEntryModalOpened] =
+ useState<boolean>(false);
const downloadCordova = (uri, filename) => {
const { Downloader } = window.plugins;
- const downloadSuccessCallback = result => {
+ const downloadSuccessCallback = (result) => {
// result is an object
/* {
path: "file:///storage/sdcard0/documents/My Pdf.pdf", // Returns full file path
@@ -87,7 +86,7 @@ function EntryContainerMenu(props: Props) {
console.log(result.file); // My Pdf.pdf
};
- const downloadErrorCallback = error => {
+ const downloadErrorCallback = (error) => {
console.log(error);
};
@@ -97,20 +96,20 @@ function EntryContainerMenu(props: Props) {
path: filename, // The File Name with extension
description: 'The file is downloading', // Download description Notification String
visible: true, // This download is visible and shows in the notifications while in progress and after completion.
- folder: 'documents' // Folder to save the downloaded file, if not exist it will be created
+ folder: 'documents', // Folder to save the downloaded file, if not exist it will be created
};
Downloader.download(
options,
downloadSuccessCallback,
- downloadErrorCallback
+ downloadErrorCallback,
);
};
function downloadFile() {
const entryName = `${baseName(
openedEntry.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)}`;
const fileName = extractFileName(entryName, PlatformIO.getDirSeparator());
@@ -199,7 +198,7 @@ function EntryContainerMenu(props: Props) {
<ReloadIcon />
</ListItemIcon>
<ListItemText primary={t('core:reloadFile')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -212,7 +211,7 @@ function EntryContainerMenu(props: Props) {
<FileDownloadIcon />
</ListItemIcon>
<ListItemText primary={t('core:downloadFile')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(<Divider key={'divider1'} />);
menuItems.push(
@@ -229,7 +228,7 @@ function EntryContainerMenu(props: Props) {
<FullScreenIcon />
</ListItemIcon>
<ListItemText primary={t('core:switchToFullscreen')} />
- </MenuItem>
+ </MenuItem>,
);
if (desktopMode) {
menuItems.push(
@@ -246,7 +245,7 @@ function EntryContainerMenu(props: Props) {
<ExpandIcon />
</ListItemIcon>
<ListItemText primary={t('core:openInFullWidth')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (!readOnlyMode) {
@@ -265,7 +264,7 @@ function EntryContainerMenu(props: Props) {
<DeleteIcon />
</ListItemIcon>
<ListItemText primary={t('core:deleteEntry')} />
- </MenuItem>
+ </MenuItem>,
);
}
menuItems.push(<Divider key={'divider2'} />);
@@ -280,7 +279,7 @@ function EntryContainerMenu(props: Props) {
<ParentFolderIcon />
</ListItemIcon>
<ListItemText primary={t('core:navigateToParentDirectory')} />
- </MenuItem>
+ </MenuItem>,
);
if (!AppConfig.isCordova) {
menuItems.push(
@@ -294,7 +293,7 @@ function EntryContainerMenu(props: Props) {
<OpenNewWindowIcon />
</ListItemIcon>
<ListItemText primary={t('core:openInWindow')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (AppConfig.isCordova) {
@@ -309,7 +308,7 @@ function EntryContainerMenu(props: Props) {
<LinkIcon />
</ListItemIcon>
<ListItemText primary={t('core:shareFile')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (
@@ -330,7 +329,7 @@ function EntryContainerMenu(props: Props) {
<OpenNativelyIcon />
</ListItemIcon>
<ListItemText primary={t('core:openFileExternally')} />
- </MenuItem>
+ </MenuItem>,
);
}
} else {
@@ -349,7 +348,7 @@ function EntryContainerMenu(props: Props) {
<ReloadIcon />
</ListItemIcon>
<ListItemText primary={t('core:reloadDirectory')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(<Divider key={'divider6'} />);
menuItems.push(
@@ -363,7 +362,7 @@ function EntryContainerMenu(props: Props) {
<NavigateToFolderIcon />
</ListItemIcon>
<ListItemText primary={t('core:openInMainArea')} />
- </MenuItem>
+ </MenuItem>,
);
if (!AppConfig.isCordova) {
menuItems.push(
@@ -377,7 +376,7 @@ function EntryContainerMenu(props: Props) {
<OpenNewWindowIcon />
</ListItemIcon>
<ListItemText primary={t('core:openInWindow')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (
@@ -398,7 +397,7 @@ function EntryContainerMenu(props: Props) {
<OpenNativelyIcon />
</ListItemIcon>
<ListItemText primary={t('core:openDirectoryExternally')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (desktopMode) {
@@ -416,7 +415,7 @@ function EntryContainerMenu(props: Props) {
<ExpandIcon />
</ListItemIcon>
<ListItemText primary={t('core:openInFullWidth')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (!readOnlyMode) {
@@ -435,7 +434,7 @@ function EntryContainerMenu(props: Props) {
<DeleteIcon />
</ListItemIcon>
<ListItemText primary={t('core:deleteDirectory')} />
- </MenuItem>
+ </MenuItem>,
);
}
}
@@ -449,11 +448,11 @@ function EntryContainerMenu(props: Props) {
onClose={handleClose}
anchorOrigin={{
vertical: 'bottom',
- horizontal: 'left'
+ horizontal: 'left',
}}
transformOrigin={{
vertical: 'top',
- horizontal: 'left'
+ horizontal: 'left',
}}
>
<MenuList>{menuItems}</MenuList>
@@ -476,12 +475,12 @@ function EntryContainerMenu(props: Props) {
dirPath: openedEntry.path
? extractDirectoryName(
openedEntry.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)
- : ''
+ : '',
})
}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
return deleteFile(openedEntry.path, openedEntry.uuid);
}
diff --git a/app/components/EntryContainerNav.tsx b/app/components/EntryContainerNav.tsx
index deeb93014..84a5d5bc2 100644
--- a/app/components/EntryContainerNav.tsx
+++ b/app/components/EntryContainerNav.tsx
@@ -26,7 +26,7 @@ function EntryContainerNav(props: Props) {
right: 0,
backgroundColor: theme.palette.background.default,
display: 'flex',
- alignItems: 'center'
+ alignItems: 'center',
}}
>
{isFile && (
diff --git a/app/components/EntryContainerTabs.tsx b/app/components/EntryContainerTabs.tsx
index d136f3eff..255972fed 100644
--- a/app/components/EntryContainerTabs.tsx
+++ b/app/components/EntryContainerTabs.tsx
@@ -29,12 +29,12 @@ import {
actions as SettingsActions,
getEntryContainerTab,
getMapTileServer,
- isDesktopMode
+ isDesktopMode,
} from '-/reducers/settings';
import {
FolderPropertiesIcon,
DescriptionIcon,
- RevisionIcon
+ RevisionIcon,
} from '-/components/CommonIcons';
import EditDescription from '-/components/EditDescription';
import { useTranslation } from 'react-i18next';
@@ -57,13 +57,13 @@ const StyledTabs = styled((props: StyledTabsProps) => (
'& .MuiTabs-indicator': {
display: 'flex',
justifyContent: 'center',
- backgroundColor: 'transparent'
+ backgroundColor: 'transparent',
},
'& .MuiTabs-indicatorSpan': {
maxWidth: 40,
width: '100%',
- backgroundColor: theme.palette.text.primary //theme.palette.background.default //'#635ee7',
- }
+ backgroundColor: theme.palette.text.primary, //theme.palette.background.default //'#635ee7',
+ },
}));
interface StyledTabProps {
@@ -80,13 +80,13 @@ const StyledTab = styled((props: StyledTabProps) => (
fontSize: theme.typography.pxToRem(15),
marginRight: theme.spacing(1),
minHeight: 50,
- maxHeight: 50
+ maxHeight: 50,
}));
function a11yProps(index: number) {
return {
id: `tab-${index}`,
- 'aria-controls': `simple-tabpanel-${index}`
+ 'aria-controls': `simple-tabpanel-${index}`,
};
}
@@ -112,7 +112,7 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {
toggleProperties,
marginRight,
isEditable,
- isPanelOpened
+ isPanelOpened,
} = props;
const { t } = useTranslation();
@@ -138,7 +138,7 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {
overflowX: 'hidden',
paddingTop: 5,
paddingLeft: 10,
- paddingRight: 10
+ paddingRight: 10,
}}
>
{value === index && children}
@@ -180,7 +180,7 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {
openedFile.isFile && !isPanelOpened
? '1px solid ' + theme.palette.divider
: 'none',
- minHeight: 53
+ minHeight: 53,
}}
>
<Box sx={{ ...(marginRight && { marginRight }) }}>
diff --git a/app/components/EntryContainerTitle.tsx b/app/components/EntryContainerTitle.tsx
index 644821da3..54b2315bf 100644
--- a/app/components/EntryContainerTitle.tsx
+++ b/app/components/EntryContainerTitle.tsx
@@ -22,7 +22,7 @@ import {
extractTitle,
extractFileExtension,
extractFileName,
- extractDirectoryName
+ extractDirectoryName,
} from '@tagspaces/tagspaces-common/paths';
import Tooltip from '-/components/Tooltip';
import PlatformIO from '-/services/platform-facade';
@@ -50,7 +50,7 @@ const FileBadge = styled('span')(({ theme }) => ({
textShadow: '1px 1px #8f8f8f',
fontSize: 13,
marginLeft: 3,
- borderRadius: 3
+ borderRadius: 3,
}));
interface Props {
@@ -63,16 +63,13 @@ function EntryContainerTitle(props: Props) {
const { isFileChanged, reloadDocument, toggleFullScreen } = props;
const { t } = useTranslation();
const theme = useTheme();
- const {
- openedEntries,
- sharingLink,
- sharingParentFolderLink
- } = useOpenedEntryContext();
+ const { openedEntries, sharingLink, sharingParentFolderLink } =
+ useOpenedEntryContext();
const { showNotification } = useNotificationContext();
const openedFile = openedEntries[0];
const locations = useSelector(getLocations);
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
const haveBookmark =
Pro && Pro.bookmarks && Pro.bookmarks.haveBookmark(openedFile.path);
@@ -89,7 +86,7 @@ function EntryContainerTitle(props: Props) {
showNotification(
t('core:toggleBookmark') +
' - ' +
- t('thisFunctionalityIsAvailableInPro')
+ t('thisFunctionalityIsAvailableInPro'),
);
}
};
@@ -98,7 +95,7 @@ function EntryContainerTitle(props: Props) {
? extractTitle(
openedFile.path,
!openedFile.isFile,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)
: '';
@@ -109,13 +106,13 @@ function EntryContainerTitle(props: Props) {
} else {
fileName = extractDirectoryName(
openedFile.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
}
}
if (!fileName) {
const currentLocation = locations.find(
- location => location.uuid === openedFile.locationId
+ (location) => location.uuid === openedFile.locationId,
);
if (currentLocation) {
fileName = currentLocation.name;
@@ -132,7 +129,7 @@ function EntryContainerTitle(props: Props) {
flexDirection: 'row',
flex: '1 1',
overflowX: 'auto',
- overflowY: 'hidden'
+ overflowY: 'hidden',
}}
>
{openedFile.isFile ? (
@@ -142,7 +139,7 @@ function EntryContainerTitle(props: Props) {
<span
style={{
color: theme.palette.text.primary,
- margin: 3
+ margin: 3,
}}
>
{String.fromCharCode(0x25cf)}
@@ -166,11 +163,16 @@ function EntryContainerTitle(props: Props) {
display: 'flex',
alignItems: 'center',
textTransform: 'uppercase',
- paddingLeft: 10
+ paddingLeft: 10,
}}
>
- {//'.' +
- extractFileExtension(openedFile.path, PlatformIO.getDirSeparator())}
+ {
+ //'.' +
+ extractFileExtension(
+ openedFile.path,
+ PlatformIO.getDirSeparator(),
+ )
+ }
<MoreMenuIcon style={{ fontSize: 20 }} />
</FileBadge>
</>
@@ -189,7 +191,7 @@ function EntryContainerTitle(props: Props) {
backgroundColor: AppConfig.defaultFolderColor,
display: 'flex',
alignItems: 'center',
- paddingLeft: 10
+ paddingLeft: 10,
}}
>
<FolderIcon style={{ fontSize: 20 }} />
@@ -206,7 +208,7 @@ function EntryContainerTitle(props: Props) {
marginLeft: 5,
maxHeight: 40,
overflowY: 'auto',
- overflowX: 'hidden'
+ overflowX: 'hidden',
}}
>
{fileTitle}
@@ -222,13 +224,13 @@ function EntryContainerTitle(props: Props) {
{haveBookmark ? (
<BookmarkIcon
style={{
- color: theme.palette.primary.main
+ color: theme.palette.primary.main,
}}
/>
) : (
<BookmarkAddIcon
style={{
- color: theme.palette.text.secondary
+ color: theme.palette.text.secondary,
}}
/>
)}
diff --git a/app/components/EntryIcon.tsx b/app/components/EntryIcon.tsx
index 3d40f18aa..b56237bd5 100644
--- a/app/components/EntryIcon.tsx
+++ b/app/components/EntryIcon.tsx
@@ -87,7 +87,7 @@ function EntryIcon(props: Props) {
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
- height: 150
+ height: 150,
}}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
diff --git a/app/components/EntryProperties.tsx b/app/components/EntryProperties.tsx
index 7df55c905..d467147b5 100644
--- a/app/components/EntryProperties.tsx
+++ b/app/components/EntryProperties.tsx
@@ -21,7 +21,7 @@ import React, {
useEffect,
useReducer,
useRef,
- useState
+ useState,
} from 'react';
import { styled, useTheme } from '@mui/material/styles';
import { getBgndFileLocationForDirectory } from '@tagspaces/tagspaces-common/paths';
@@ -33,7 +33,7 @@ import {
TextField,
inputBaseClasses,
Button,
- InputAdornment
+ InputAdornment,
} from '@mui/material';
import QRCodeIcon from '@mui/icons-material/QrCode';
import Tooltip from '-/components/Tooltip';
@@ -47,7 +47,7 @@ import {
LayerGroup,
Marker,
Popup,
- TileLayer
+ TileLayer,
} from 'react-leaflet';
import { ButtonGroup, IconButton } from '@mui/material';
import { formatBytes } from '@tagspaces/tagspaces-common/misc';
@@ -56,7 +56,7 @@ import {
getThumbFileLocationForFile,
getThumbFileLocationForDirectory,
extractFileName,
- extractDirectoryName
+ extractDirectoryName,
} from '@tagspaces/tagspaces-common/paths';
import TagDropContainer from './TagDropContainer';
import MoveCopyFilesDialog from './dialogs/MoveCopyFilesDialog';
@@ -64,7 +64,7 @@ import {
enhanceOpenedEntry,
fileNameValidation,
dirNameValidation,
- normalizeUrl
+ normalizeUrl,
} from '-/services/utils-io';
import { getUuid } from '@tagspaces/tagspaces-common/utils-io';
import { parseGeoLocation } from '-/utils/geo';
@@ -77,7 +77,7 @@ import { getTagDelimiter } from '-/reducers/settings';
import {
getLastBackgroundImageChange,
getLastThumbnailImageChange,
- OpenedEntry
+ OpenedEntry,
} from '-/reducers/app';
import { savePerspective } from '-/utils/metaoperations';
import MarkerIcon from '-/assets/icons/marker-icon.png';
@@ -117,7 +117,7 @@ const classes = {
actionPlaceholder: `${PREFIX}-actionPlaceholder`,
button: `${PREFIX}-button`,
mdHelpers: `${PREFIX}-mdHelpers`,
- formControl: `${PREFIX}-formControl`
+ formControl: `${PREFIX}-formControl`,
};
const Root = styled('div')(({ theme }) => ({
@@ -130,58 +130,59 @@ const Root = styled('div')(({ theme }) => ({
padding: '5px 5px 2px 2px',
margin: 6,
clear: 'both',
- boxShadow: '0 1px 1px 0 rgba(0,0,0,0.16),0 1px 1px 0 rgba(239,239,239,0.12)'
+ boxShadow:
+ '0 1px 1px 0 rgba(0,0,0,0.16),0 1px 1px 0 rgba(239,239,239,0.12)',
},
[`& .${classes.editTagsButton}`]: {
float: 'right',
- margin: '0 0 10px 0'
+ margin: '0 0 10px 0',
},
[`& .${classes.textField}`]: {
marginLeft: theme.spacing(1),
marginRight: theme.spacing(1),
- width: '100vh'
+ width: '100vh',
},
[`& .${classes.dropText}`]: {
display: 'flex',
width: '100%',
padding: '20px',
- color: '#728496'
+ color: '#728496',
},
[`& .${classes.propertyName}`]: {
- marginTop: 10
+ marginTop: 10,
},
[`& .${classes.actionPlaceholder}`]: {
- textAlign: 'end'
+ textAlign: 'end',
},
[`& .${classes.button}`]: {
position: 'relative',
padding: '8px 12px 6px 8px',
- margin: '0'
+ margin: '0',
},
[`& .${classes.mdHelpers}`]: {
borderRadius: '0.25rem',
paddingLeft: '0.25rem',
paddingRight: '0.25rem',
- backgroundColor: '#bcc0c561'
+ backgroundColor: '#bcc0c561',
},
[`& .${classes.formControl}`]: {
marginLeft: theme.spacing(0),
- width: '100%'
- }
+ width: '100%',
+ },
}));
const ThumbnailTextField = styled(TextField)(({ theme }) => ({
//[`& .MuiInputBase-root}`]: {
[`& .${inputBaseClasses.root}`]: {
- height: 220
- }
+ height: 220,
+ },
}));
const ThumbnailChooserDialog =
@@ -199,7 +200,7 @@ interface Props {
lastThumbnailImageChange: any;
setLastBackgroundColorChange: (
folderPath: string,
- lastBackgroundColorChange: number
+ lastBackgroundColorChange: number,
) => void;
}
@@ -207,29 +208,20 @@ const defaultBackgrounds = [
'linear-gradient(43deg, rgb(65, 88, 208) 0%, rgb(200, 80, 190) 45%, rgb(255, 204, 112) 100%)',
'linear-gradient( 102deg, rgba(253,189,85,1) 8%, rgba(249,131,255,1) 100% )',
'radial-gradient( circle farthest-corner at 1.4% 2.8%, rgba(240,249,249,1) 0%, rgba(182,199,226,1) 100% )',
- 'linear-gradient( 110deg, rgba(48,207,208,1) 11.2%, rgba(51,8,103,1) 90% )'
+ 'linear-gradient( 110deg, rgba(48,207,208,1) 11.2%, rgba(51,8,103,1) 90% )',
];
function EntryProperties(props: Props) {
const { t } = useTranslation();
const theme = useTheme();
- const {
- openedEntries,
- updateOpenedFile,
- sharingLink
- } = useOpenedEntryContext();
+ const { openedEntries, updateOpenedFile, sharingLink } =
+ useOpenedEntryContext();
const { renameDirectory, renameFile } = useFsActionsContext();
const { addTags, removeTags, removeAllTags } = useTaggingActionsContext();
- const {
- currentDirectoryPath,
- updateThumbnailUrl,
- setDirectoryMeta
- } = useDirectoryContentContext();
- const {
- switchLocationTypeByID,
- switchCurrentLocationType,
- readOnlyMode
- } = useCurrentLocationContext();
+ const { currentDirectoryPath, updateThumbnailUrl, setDirectoryMeta } =
+ useDirectoryContentContext();
+ const { switchLocationTypeByID, switchCurrentLocationType, readOnlyMode } =
+ useCurrentLocationContext();
const { showNotification } = useNotificationContext();
const fileNameRef = useRef<HTMLInputElement>(null);
@@ -250,31 +242,24 @@ function EntryProperties(props: Props) {
: extractDirectoryName(openedEntry.path, PlatformIO.getDirSeparator());
const currentEntry = useRef<OpenedEntry>(
- enhanceOpenedEntry(openedEntry, props.tagDelimiter)
+ enhanceOpenedEntry(openedEntry, props.tagDelimiter),
);
const [editName, setEditName] = useState<string>(undefined);
- const [isMoveCopyFilesDialogOpened, setMoveCopyFilesDialogOpened] = useState<
- boolean
- >(false);
- const [
- isConfirmResetColorDialogOpened,
- setConfirmResetColorDialogOpened
- ] = useState<boolean>(false);
- const [
- isFileThumbChooseDialogOpened,
- setFileThumbChooseDialogOpened
- ] = useState<boolean>(false);
- const [showSharingLinkDialog, setShowSharingLinkDialog] = useState<boolean>(
- false
- );
- const [isBgndImgChooseDialogOpened, setBgndImgChooseDialogOpened] = useState<
- boolean
- >(false);
+ const [isMoveCopyFilesDialogOpened, setMoveCopyFilesDialogOpened] =
+ useState<boolean>(false);
+ const [isConfirmResetColorDialogOpened, setConfirmResetColorDialogOpened] =
+ useState<boolean>(false);
+ const [isFileThumbChooseDialogOpened, setFileThumbChooseDialogOpened] =
+ useState<boolean>(false);
+ const [showSharingLinkDialog, setShowSharingLinkDialog] =
+ useState<boolean>(false);
+ const [isBgndImgChooseDialogOpened, setBgndImgChooseDialogOpened] =
+ useState<boolean>(false);
const [displayColorPicker, setDisplayColorPicker] = useState<boolean>(false);
const bgndUrl = useRef<string>(getBgndUrl());
const thumbUrl = useRef<string>(getThumbUrl());
const dirProps = useRef<TS.DirProp>();
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
const firstRender = useFirstRender();
useEffect(() => {
@@ -285,7 +270,7 @@ function EntryProperties(props: Props) {
currentEntry.current.size = dProps.totalSize;
forceUpdate();
})
- .catch(ex => console.debug('getDirProperties:', ex.message));
+ .catch((ex) => console.debug('getDirProperties:', ex.message));
}
}, []);
@@ -318,7 +303,7 @@ function EntryProperties(props: Props) {
// update description
currentEntry.current = enhanceOpenedEntry(
openedEntry,
- props.tagDelimiter
+ props.tagDelimiter,
);
forceUpdate();
// currentEntry.current.description = editDescription.current;
@@ -332,27 +317,29 @@ function EntryProperties(props: Props) {
if (editName !== undefined) {
const path = extractContainingDirectoryPath(
currentEntry.current.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const nextPath = path + PlatformIO.getDirSeparator() + editName;
- switchLocationTypeByID(openedEntry.locationId).then(currentLocationId => {
- if (currentEntry.current.isFile) {
- renameFile(currentEntry.current.path, nextPath)
- .then(() => switchCurrentLocationType())
- .catch(() => {
- switchCurrentLocationType();
- fileNameRef.current.value = entryName;
- });
- } else {
- renameDirectory(currentEntry.current.path, editName)
- .then(newDirPath => switchCurrentLocationType())
- .catch(() => {
- switchCurrentLocationType();
- fileNameRef.current.value = entryName;
- });
- }
- });
+ switchLocationTypeByID(openedEntry.locationId).then(
+ (currentLocationId) => {
+ if (currentEntry.current.isFile) {
+ renameFile(currentEntry.current.path, nextPath)
+ .then(() => switchCurrentLocationType())
+ .catch(() => {
+ switchCurrentLocationType();
+ fileNameRef.current.value = entryName;
+ });
+ } else {
+ renameDirectory(currentEntry.current.path, editName)
+ .then((newDirPath) => switchCurrentLocationType())
+ .catch(() => {
+ switchCurrentLocationType();
+ fileNameRef.current.value = entryName;
+ });
+ }
+ },
+ );
setEditName(undefined);
}
@@ -404,14 +391,14 @@ function EntryProperties(props: Props) {
const setThumb = (filePath, thumbFilePath) => {
if (filePath !== undefined) {
return switchLocationTypeByID(openedEntry.locationId).then(
- currentLocationId => {
+ (currentLocationId) => {
if (
PlatformIO.haveObjectStoreSupport() ||
PlatformIO.haveWebDavSupport()
) {
updateThumbnailUrl(
currentEntry.current.path,
- PlatformIO.getURLforPath(thumbFilePath)
+ PlatformIO.getURLforPath(thumbFilePath),
);
return true;
}
@@ -419,23 +406,23 @@ function EntryProperties(props: Props) {
.then(objUrl => {*/
updateThumbnailUrl(
currentEntry.current.path,
- thumbFilePath
+ thumbFilePath,
// objUrl.tmbPath
/*(props.lastThumbnailImageChange
? '?' + props.lastThumbnailImageChange
: '')*/
);
return switchCurrentLocationType();
- }
+ },
);
} else {
// reset Thumbnail
return getThumbnailURLPromise(currentEntry.current.path)
- .then(objUrl => {
+ .then((objUrl) => {
updateThumbnailUrl(currentEntry.current.path, objUrl.tmbPath);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Error getThumbnailURLPromise ' + err);
showNotification('Error reset Thumbnail');
});
@@ -457,26 +444,26 @@ function EntryProperties(props: Props) {
setDisplayColorPicker(!displayColorPicker);
};
- const handleChangeColor = color => {
+ const handleChangeColor = (color) => {
if (color === 'transparent0') {
// eslint-disable-next-line no-param-reassign
color = 'transparent';
}
currentEntry.current.color = color;
- switchLocationTypeByID(openedEntry.locationId).then(currentLocationId => {
+ switchLocationTypeByID(openedEntry.locationId).then((currentLocationId) => {
Pro.MetaOperations.saveFsEntryMeta(currentEntry.current.path, { color })
- .then(entryMeta => {
+ .then((entryMeta) => {
if (currentEntry.current.path === currentDirectoryPath) {
setDirectoryMeta(entryMeta);
}
// for KanBan
props.setLastBackgroundColorChange(
currentEntry.current.path,
- new Date().getTime()
+ new Date().getTime(),
);
// todo handle LastBackgroundColorChange and skip updateOpenedFile
updateOpenedFile(currentEntry.current.path, entryMeta).then(() =>
- switchCurrentLocationType()
+ switchCurrentLocationType(),
);
/* } else {
@@ -484,7 +471,7 @@ function EntryProperties(props: Props) {
} */
return true;
})
- .catch(error => {
+ .catch((error) => {
switchCurrentLocationType();
console.warn('Error saving color for folder ' + error);
showNotification(t('Error saving color for folder'));
@@ -522,26 +509,26 @@ function EntryProperties(props: Props) {
};*/
const handleChange = (name: string, value: Array<TS.Tag>, action: string) => {
- switchLocationTypeByID(openedEntry.locationId).then(currentLocationId => {
+ switchLocationTypeByID(openedEntry.locationId).then((currentLocationId) => {
if (action === 'remove-value') {
if (!value) {
// no tags left in the select element
removeAllTags([currentEntry.current.path]).then(() => {
updateOpenedFile(currentEntry.current.path, {
id: '',
- tags: []
+ tags: [],
}).then(() => {
switchCurrentLocationType();
});
});
} else {
removeTags([currentEntry.current.path], value).then(() =>
- switchCurrentLocationType()
+ switchCurrentLocationType(),
);
}
} else if (action === 'clear') {
removeAllTags([currentEntry.current.path]).then(() =>
- switchCurrentLocationType()
+ switchCurrentLocationType(),
);
} else {
// create-option or select-option
@@ -549,13 +536,13 @@ function EntryProperties(props: Props) {
currentEntry.current.tags === undefined
? value
: value.filter(
- tag =>
+ (tag) =>
!currentEntry.current.tags.some(
- obj => obj.title === tag.title
- )
+ (obj) => obj.title === tag.title,
+ ),
);
return addTags([currentEntry.current.path], tags).then(() =>
- switchCurrentLocationType()
+ switchCurrentLocationType(),
);
}
});
@@ -573,7 +560,7 @@ function EntryProperties(props: Props) {
if (!currentEntry.current.isFile) {
const bgndPath = getBgndFileLocationForDirectory(
currentEntry.current.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
if (bgndPath !== undefined) {
if (
@@ -600,12 +587,12 @@ function EntryProperties(props: Props) {
return getThumbFileLocationForFile(
currentEntry.current.path,
PlatformIO.getDirSeparator(),
- false
+ false,
);
}
return getThumbFileLocationForDirectory(
currentEntry.current.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
}
@@ -646,7 +633,7 @@ function EntryProperties(props: Props) {
updateOpenedFile(currentEntry.current.path, entryMeta);
return true;
})
- .catch(error => {
+ .catch((error) => {
console.warn('Error saving perspective for folder ' + error);
showNotification(t('Error saving perspective for folder'));
});
@@ -669,7 +656,7 @@ function EntryProperties(props: Props) {
shadowSize: [41, 41], // size of the shadow
iconAnchor: [12, 41], // point of the icon which will correspond to marker's location
shadowAnchor: [5, 41], // the same for the shadow
- popupAnchor: [1, -34] // point from which the popup should open relative to the iconAnchor
+ popupAnchor: [1, -34], // point from which the popup should open relative to the iconAnchor
});
function getGeoLocation(tags: Array<TS.Tag>) {
@@ -739,7 +726,7 @@ function EntryProperties(props: Props) {
</div>
)}
</InputAdornment>
- )
+ ),
}}
margin="dense"
name="name"
@@ -752,7 +739,7 @@ function EntryProperties(props: Props) {
activateEditNameField();
}
}}
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' && !fileNameError.current) {
renameEntry();
}
@@ -765,7 +752,7 @@ function EntryProperties(props: Props) {
'core:' +
(currentEntry.current.isFile
? 'fileNameHelp'
- : 'directoryNameHelp')
+ : 'directoryNameHelp'),
)}
</FormHelperText>
)}
@@ -799,7 +786,7 @@ function EntryProperties(props: Props) {
margin: 2,
marginTop: 8,
borderRadius: 5,
- border: '1px solid rgba(0, 0, 0, 0.38)'
+ border: '1px solid rgba(0, 0, 0, 0.38)',
}}
doubleClickZoom={true}
keyboard={false}
@@ -846,7 +833,7 @@ function EntryProperties(props: Props) {
'#map=14/' +
geoLocation.lat +
'/' +
- geoLocation.lng
+ geoLocation.lng,
);
}}
title="Open in OpenStreetMap"
@@ -869,7 +856,7 @@ function EntryProperties(props: Props) {
geoLocation.lat +
',' +
geoLocation.lng +
- '&z=15'
+ '&z=15',
);
}}
>
@@ -894,7 +881,7 @@ function EntryProperties(props: Props) {
value={ldtm}
label={t('core:fileLDTM')}
InputProps={{
- readOnly: true
+ readOnly: true,
}}
/>
</Grid>
@@ -922,12 +909,12 @@ function EntryProperties(props: Props) {
: t(
PlatformIO.haveObjectStoreSupport()
? 'core:notAvailable'
- : 'core:counting'
+ : 'core:counting',
)
}
label={t('core:fileSize')}
InputProps={{
- readOnly: true
+ readOnly: true,
}}
/>
</Tooltip>
@@ -973,7 +960,7 @@ function EntryProperties(props: Props) {
</Button>
)}
</InputAdornment>
- )
+ ),
}}
/>
</FormControl>
@@ -1015,9 +1002,8 @@ function EntryProperties(props: Props) {
data-tid="copyLinkToClipboardTID"
color="primary"
onClick={() => {
- const promise = navigator.clipboard.writeText(
- sharingLink
- );
+ const promise =
+ navigator.clipboard.writeText(sharingLink);
showNotification(t('core:linkCopied'));
}}
>
@@ -1025,7 +1011,7 @@ function EntryProperties(props: Props) {
</Button>
</Tooltip>
</InputAdornment>
- )
+ ),
}}
/>
</Grid>
@@ -1059,7 +1045,7 @@ function EntryProperties(props: Props) {
<span
style={{
overflow: 'hidden',
- textOverflow: 'ellipsis'
+ textOverflow: 'ellipsis',
}}
>
{t('core:generateDownloadLink')}
@@ -1067,7 +1053,7 @@ function EntryProperties(props: Props) {
</Button>
</Tooltip>
</InputAdornment>
- )
+ ),
}}
/>
</Grid>
@@ -1095,7 +1081,7 @@ function EntryProperties(props: Props) {
{t('core:backgroundColor')}
<InfoIcon
tooltip={t(
- 'The background color will not be visible if you have set a background image'
+ 'The background color will not be visible if you have set a background image',
)}
/>
</>
@@ -1111,7 +1097,7 @@ function EntryProperties(props: Props) {
fullWidth
style={{
width: 100,
- background: currentEntry.current.color
+ background: currentEntry.current.color,
}}
onClick={toggleBackgroundColorPicker}
>
@@ -1131,7 +1117,7 @@ function EntryProperties(props: Props) {
aria-label="fingerprint"
onClick={() => handleChangeColor(background)}
style={{
- backgroundImage: background
+ backgroundImage: background,
}}
>
<SetBackgroundIcon />
@@ -1159,7 +1145,7 @@ function EntryProperties(props: Props) {
)}
</Stack>
</InputAdornment>
- )
+ ),
}}
/>
</Grid>
@@ -1211,14 +1197,14 @@ function EntryProperties(props: Props) {
borderRadius: 8,
minHeight: 150,
minWidth: 150,
- marginBottom: 5
+ marginBottom: 5,
}}
onClick={toggleThumbFilesDialog}
/>
{/* </ProTooltip> */}
</Stack>
</InputAdornment>
- )
+ ),
}}
/>
</Grid>
@@ -1269,14 +1255,14 @@ function EntryProperties(props: Props) {
borderRadius: 8,
minHeight: 150,
minWidth: 150,
- marginBottom: 5
+ marginBottom: 5,
}}
onClick={toggleBgndImgDialog}
/>
{/* </ProTooltip> */}
</Stack>
</InputAdornment>
- )
+ ),
}}
/>
</Grid>
@@ -1292,7 +1278,7 @@ function EntryProperties(props: Props) {
}}
title={t('core:confirm')}
content={t('core:confirmResetColor')}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
handleChangeColor('transparent');
} else {
@@ -1314,8 +1300,8 @@ function EntryProperties(props: Props) {
...currentEntry.current,
isFile: currentEntry.current.isFile,
name: entryName,
- tags: []
- }
+ tags: [],
+ },
]}
/>
)}
@@ -1385,16 +1371,16 @@ function mapStateToProps(state) {
tagDelimiter: getTagDelimiter(state),
lastBackgroundImageChange: getLastBackgroundImageChange(state),
lastThumbnailImageChange: getLastThumbnailImageChange(state),
- locations: getLocations(state)
+ locations: getLocations(state),
};
}
function mapActionCreatorsToProps(dispatch) {
return bindActionCreators(
{
- setLastBackgroundColorChange: AppActions.setLastBackgroundColorChange
+ setLastBackgroundColorChange: AppActions.setLastBackgroundColorChange,
},
- dispatch
+ dispatch,
);
}
@@ -1406,8 +1392,8 @@ const areEqual = (prevProp: Props, nextProp: Props) =>
export default connect(
mapStateToProps,
- mapActionCreatorsToProps
+ mapActionCreatorsToProps,
)(
// @ts-ignore
- React.memo(EntryProperties, areEqual)
+ React.memo(EntryProperties, areEqual),
);
diff --git a/app/components/FileSourceDnd.tsx b/app/components/FileSourceDnd.tsx
index 7d02aa237..38fd80bb1 100644
--- a/app/components/FileSourceDnd.tsx
+++ b/app/components/FileSourceDnd.tsx
@@ -32,18 +32,18 @@ const boxSource = {
// console.log('beginDrag', props);
const entryPath = props.children.props.entryPath;
const selectedEntries = props.children.props.selectedEntries;
- if (!selectedEntries.some(entry => entry.path === entryPath)) {
+ if (!selectedEntries.some((entry) => entry.path === entryPath)) {
return {
path: entryPath,
- selectedEntries: [{ path: entryPath }]
+ selectedEntries: [{ path: entryPath }],
};
} else {
return {
path: entryPath,
- selectedEntries: selectedEntries
+ selectedEntries: selectedEntries,
};
}
- }
+ },
/* endDrag(props, monitor) {
const item = monitor.getItem();
@@ -68,7 +68,7 @@ const FileSourceDnd = (props: Props) => {
props.connectDragPreview(getEmptyImage(), {
// IE fallback: specify that we'd rather screenshot the node
// when it already knows it's being dragged so we can hide it with CSS.
- captureDraggingState: true
+ captureDraggingState: true,
});
// }
@@ -85,11 +85,11 @@ const collect = (connect, monitor) => ({
// You can ask the monitor about the current drag preview
connectDragPreview: connect.dragPreview(),
// You can ask the monitor about the current drag state:
- isDragging: monitor.isDragging()
+ isDragging: monitor.isDragging(),
});
export default DragSource(
DragItemTypes.FILE,
boxSource,
- collect
+ collect,
)(FileSourceDnd);
diff --git a/app/components/FileUploadContainer.tsx b/app/components/FileUploadContainer.tsx
index a6fda88c1..26fa283cf 100644
--- a/app/components/FileUploadContainer.tsx
+++ b/app/components/FileUploadContainer.tsx
@@ -40,10 +40,8 @@ const FileUploadContainer = forwardRef(
const { id, directoryPath } = props;
const { uploadFilesAPI } = useIOActionsContext();
const { setSelectedEntries } = useSelectedEntriesContext();
- const {
- currentDirectoryPath,
- addDirectoryEntries
- } = useDirectoryContentContext();
+ const { currentDirectoryPath, addDirectoryEntries } =
+ useDirectoryContentContext();
const onUploadProgress = (progress, abort, fileName) => {
dispatch(AppActions.onUploadProgress(progress, abort, fileName));
@@ -80,7 +78,7 @@ const FileUploadContainer = forwardRef(
} else { */
fileInput.current.click();
// }
- }
+ },
}));
/* if (AppConfig.isCordovaAndroid) {
@@ -97,7 +95,7 @@ const FileUploadContainer = forwardRef(
uploadFilesAPI(
Array.from(selection.currentTarget.files),
directoryPath,
- onUploadProgress
+ onUploadProgress,
)
.then((fsEntries: Array<TS.FileSystemEntry>) => {
if (directoryPath === currentDirectoryPath) {
@@ -107,7 +105,7 @@ const FileUploadContainer = forwardRef(
}
return true;
})
- .catch(error => {
+ .catch((error) => {
console.log('uploadFiles', error);
});
}
@@ -123,7 +121,7 @@ const FileUploadContainer = forwardRef(
onChange={handleFileInputChange}
/>
);
- }
+ },
);
export default FileUploadContainer;
diff --git a/app/components/FileView.tsx b/app/components/FileView.tsx
index 1d35ed11a..0f2c7e653 100644
--- a/app/components/FileView.tsx
+++ b/app/components/FileView.tsx
@@ -44,7 +44,7 @@ function FileView(props: Props) {
fileViewerContainer,
toggleFullScreen,
height,
- eventID
+ eventID,
} = props; // .openedFiles[0];
const { searchQuery } = useDirectoryContentContext();
@@ -76,17 +76,17 @@ function FileView(props: Props) {
const extPrimaryColor =
'&primecolor=' +
encodeURIComponent(
- primaryColor.startsWith('#') ? primaryColor : rgbToHex(primaryColor)
+ primaryColor.startsWith('#') ? primaryColor : rgbToHex(primaryColor),
);
const extTextColor =
'&textcolor=' +
encodeURIComponent(
- textColor.startsWith('#') ? textColor : rgbToHex(textColor)
+ textColor.startsWith('#') ? textColor : rgbToHex(textColor),
);
const extBgndColor =
'&bgndcolor=' +
encodeURIComponent(
- bgndColor.startsWith('#') ? bgndColor : rgbToHex(bgndColor)
+ bgndColor.startsWith('#') ? bgndColor : rgbToHex(bgndColor),
);
const event = eventID ? '&eventID=' + eventID : '';
@@ -137,7 +137,7 @@ function FileView(props: Props) {
height: height || '100%',
display: 'flex',
flex: '1 1 100%',
- backgroundColor: theme.palette.background.default
+ backgroundColor: theme.palette.background.default,
}}
>
{isFullscreen && (
@@ -149,7 +149,7 @@ function FileView(props: Props) {
top: 20,
right: 20,
zIndex: 10000,
- color: theme.palette.primary.main
+ color: theme.palette.primary.main,
}}
onClick={toggleFullScreen}
>
@@ -165,7 +165,7 @@ function FileView(props: Props) {
width: '100%',
height: '100%',
zIndex: 3,
- border: 0
+ border: 0,
}}
src={fileOpenerURL}
allowFullScreen
diff --git a/app/components/FolderContainer.tsx b/app/components/FolderContainer.tsx
index b6d002a0d..c927a9219 100644
--- a/app/components/FolderContainer.tsx
+++ b/app/components/FolderContainer.tsx
@@ -32,14 +32,14 @@ import AppConfig from '-/AppConfig';
import {
getMaxSearchResults,
getDesktopMode,
- getDefaultPerspective
+ getDefaultPerspective,
} from '-/reducers/settings';
import { actions as AppActions, getProgress } from '../reducers/app';
import {
GoBackIcon,
GoForwardIcon,
MainMenuIcon,
- SearchIcon
+ SearchIcon,
} from './CommonIcons';
import { Pro } from '../pro';
import RenameEntryDialog from '-/components/dialogs/RenameEntryDialog';
@@ -74,7 +74,7 @@ function FolderContainer(props: Props) {
isDesktopMode,
defaultPerspective,
goBack,
- goForward
+ goForward,
} = props;
const { t } = useTranslation();
@@ -87,7 +87,7 @@ function FolderContainer(props: Props) {
currentDirectoryPerspective,
setCurrentDirectoryPerspective,
enterSearchMode,
- isSearchMode
+ isSearchMode,
} = useDirectoryContentContext();
/**
@@ -110,9 +110,8 @@ function FolderContainer(props: Props) {
}
}, [props.editedEntryPaths]);*/
- const [isRenameEntryDialogOpened, setRenameEntryDialogOpened] = useState<
- boolean
- >(false);
+ const [isRenameEntryDialogOpened, setRenameEntryDialogOpened] =
+ useState<boolean>(false);
let currentPerspective =
currentDirectoryPerspective || defaultPerspective || PerspectiveIDs.GRID;
@@ -127,7 +126,7 @@ function FolderContainer(props: Props) {
const openRenameEntryDialog = useCallback(
() => setRenameEntryDialogOpened(true),
- []
+ [],
);
function CircularProgressWithLabel(prop) {
@@ -158,7 +157,8 @@ function FolderContainer(props: Props) {
const getProgressValue = () => {
const objProgress = props.progress.find(
- fileProgress => fileProgress.progress < 100 && fileProgress.progress > -1
+ (fileProgress) =>
+ fileProgress.progress < 100 && fileProgress.progress > -1,
);
if (objProgress !== undefined) {
return objProgress.progress;
@@ -183,7 +183,7 @@ function FolderContainer(props: Props) {
};
const perspectiveToggleButtons = [];
- AvailablePerspectives.forEach(perspective => {
+ AvailablePerspectives.forEach((perspective) => {
perspectiveToggleButtons.push(
<ToggleButton
value={perspective.id}
@@ -200,7 +200,7 @@ function FolderContainer(props: Props) {
>
<div style={{ display: 'flex' }}>{perspective.icon}</div>
</Tooltip>
- </ToggleButton>
+ </ToggleButton>,
);
});
@@ -224,7 +224,7 @@ function FolderContainer(props: Props) {
backgroundColor: theme.palette.background.default,
display: 'flex',
flexDirection: 'column',
- position: 'relative'
+ position: 'relative',
}}
data-tid="folderContainerTID"
>
@@ -234,7 +234,7 @@ function FolderContainer(props: Props) {
paddingRight: 5,
display: 'flex',
alignItems: 'center',
- minHeight: 50
+ minHeight: 50,
}}
>
<IconButton
@@ -280,7 +280,7 @@ function FolderContainer(props: Props) {
style={{
flex: '1 1 1%',
display: 'flex',
- flexDirection: 'column'
+ flexDirection: 'column',
}}
/>
{/* <MainSearchField
@@ -322,7 +322,7 @@ function FolderContainer(props: Props) {
style={{
position: 'relative',
padding: '8px 12px 6px 8px',
- margin: '0'
+ margin: '0',
}}
>
<CircularProgressWithLabel value={getProgressValue()} />
@@ -339,7 +339,7 @@ function FolderContainer(props: Props) {
<div
style={{
minHeight: '100%',
- width: '100%'
+ width: '100%',
}}
>
{/*<LoadingAnimation />*/}
@@ -365,7 +365,7 @@ function FolderContainer(props: Props) {
zIndex: 1000,
opacity: 0.9,
position: 'absolute',
- backgroundColor: theme.palette.background.default
+ backgroundColor: theme.palette.background.default,
}}
>
{perspectiveToggleButtons}
@@ -380,16 +380,16 @@ function mapStateToProps(state) {
maxSearchResults: getMaxSearchResults(state),
isDesktopMode: getDesktopMode(state),
progress: getProgress(state),
- defaultPerspective: getDefaultPerspective(state)
+ defaultPerspective: getDefaultPerspective(state),
};
}
function mapActionCreatorsToProps(dispatch) {
return bindActionCreators(
{
- toggleUploadDialog: AppActions.toggleUploadDialog
+ toggleUploadDialog: AppActions.toggleUploadDialog,
},
- dispatch
+ dispatch,
);
}
@@ -401,8 +401,8 @@ const areEqual = (prevProp: Props, nextProp: Props) =>
export default connect(
mapStateToProps,
- mapActionCreatorsToProps
+ mapActionCreatorsToProps,
)(
// @ts-ignore
- React.memo(FolderContainer, areEqual)
+ React.memo(FolderContainer, areEqual),
);
diff --git a/app/components/HelpFeedbackPanel.tsx b/app/components/HelpFeedbackPanel.tsx
index 09a57e2a0..b57f0bacd 100644
--- a/app/components/HelpFeedbackPanel.tsx
+++ b/app/components/HelpFeedbackPanel.tsx
@@ -61,7 +61,7 @@ function HelpFeedbackPanel(props: Props) {
toggleKeysDialog,
toggleOnboardingDialog,
toggleProTeaser,
- reduceHeightBy
+ reduceHeightBy,
} = props;
return (
@@ -69,7 +69,7 @@ function HelpFeedbackPanel(props: Props) {
style={{
display: 'flex',
flexDirection: 'column',
- marginLeft: 5
+ marginLeft: 5,
}}
>
<div className={classes.toolbar}>
@@ -88,7 +88,7 @@ function HelpFeedbackPanel(props: Props) {
style={{
height: 'calc(100% - ' + reduceHeightBy + 'px)',
overflowY: 'auto',
- marginRight: 5
+ marginRight: 5,
}}
>
<ListItem
diff --git a/app/components/HelperComponents.tsx b/app/components/HelperComponents.tsx
index 89636783d..e3d656a39 100644
--- a/app/components/HelperComponents.tsx
+++ b/app/components/HelperComponents.tsx
@@ -59,7 +59,7 @@ export function ProSign() {
fontSize: 10,
borderRadius: 4,
backgroundColor: '#1dd19f',
- padding: 3
+ padding: 3,
}}
>
PRO
diff --git a/app/components/HowToStart.tsx b/app/components/HowToStart.tsx
index 692594f79..649d8f3bd 100644
--- a/app/components/HowToStart.tsx
+++ b/app/components/HowToStart.tsx
@@ -21,7 +21,7 @@ import { useTranslation } from 'react-i18next';
}
});*/
-const selectByTID: any = tid =>
+const selectByTID: any = (tid) =>
document.querySelector('[data-tid="' + tid + '"]');
function clearHighlights() {
@@ -51,7 +51,7 @@ function HowToStart() {
features of this application. We suggest that first-time users utilize
this walk-through.
</>
- )
+ ),
},
{
label: 'Location Manager',
@@ -72,7 +72,7 @@ function HowToStart() {
action: () => {
selectByTID('locationManager').click();
selectByTID('locationList').classList.add('highlighterOn');
- }
+ },
},
{
label: 'Creating a Location',
@@ -92,7 +92,7 @@ function HowToStart() {
),
action: () => {
selectByTID('createNewFileTID').classList.add('highlighterOn');
- }
+ },
},
{
label: 'Tag Library',
@@ -115,7 +115,7 @@ function HowToStart() {
selectByTID('tagLibrary').classList.add('highlighterOn');
selectByTID('tagLibraryTagGroupList').classList.add('highlighterOn');
}, 2000);
- }
+ },
},
{
label: 'Quick access section',
@@ -152,7 +152,7 @@ function HowToStart() {
selectByTID('quickAccessButton').classList.add('highlighterOn');
selectByTID('quickAccessArea').classList.add('highlighterOn');
}, 2000);
- }
+ },
},
{
label: 'Perspectives Switcher',
@@ -189,9 +189,9 @@ function HowToStart() {
),
action: () => {
selectByTID('floatingPerspectiveSwitcher').classList.add(
- 'highlighterOn'
+ 'highlighterOn',
);
- }
+ },
},
{
label: 'Creating files',
@@ -222,7 +222,7 @@ function HowToStart() {
),
action: () => {
selectByTID('createNewFileTID').classList.add('highlighterOn');
- }
+ },
},
{
label: 'App Settings',
@@ -243,7 +243,7 @@ function HowToStart() {
action: () => {
selectByTID('locationManager').click();
selectByTID('settings').classList.add('highlighterOn');
- }
+ },
},
{
label: 'Start using TagSpaces',
@@ -257,8 +257,8 @@ function HowToStart() {
selectByTID('createNewFileTID').classList.add('highlighterOn');
selectByTID('locationList').classList.add('highlighterOn');
selectByTID('locationManager').click();
- }
- }
+ },
+ },
];
function SlideButton(props) {
@@ -284,7 +284,7 @@ function HowToStart() {
if (steps[nextStep] && steps[nextStep].action) {
steps[nextStep].action();
}
- setActiveStep(nextActiveStep => nextActiveStep + 1);
+ setActiveStep((nextActiveStep) => nextActiveStep + 1);
};
const handleBack = () => {
@@ -293,7 +293,7 @@ function HowToStart() {
if (steps[prevStep] && steps[prevStep].action) {
steps[prevStep].action();
}
- setActiveStep(prevActiveStep => prevActiveStep - 1);
+ setActiveStep((prevActiveStep) => prevActiveStep - 1);
};
const handleReset = () => {
@@ -322,7 +322,7 @@ function HowToStart() {
color: theme.palette.text.primary,
textTransform: 'uppercase',
textAlign: 'center',
- paddingTop: 20
+ paddingTop: 20,
}}
noWrap
>
diff --git a/app/components/LoadingLazy.tsx b/app/components/LoadingLazy.tsx
index 2ae553dbf..908e225e3 100644
--- a/app/components/LoadingLazy.tsx
+++ b/app/components/LoadingLazy.tsx
@@ -27,7 +27,7 @@ function LoadingLazy() {
width: 0,
height: 0,
backgroundColor: 'transparent',
- padding: 0
+ padding: 0,
}}
>
...
diff --git a/app/components/LocationManager.tsx b/app/components/LocationManager.tsx
index 28bd178b5..26e24b200 100644
--- a/app/components/LocationManager.tsx
+++ b/app/components/LocationManager.tsx
@@ -34,10 +34,11 @@ import { useTranslation } from 'react-i18next';
import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
import LocationContextMenu from '-/components/menus/LocationContextMenu';
-const CreateEditLocationDialog = React.lazy(() =>
- import(
- /* webpackChunkName: "CreateEditLocationDialog" */ './dialogs/CreateEditLocationDialog'
- )
+const CreateEditLocationDialog = React.lazy(
+ () =>
+ import(
+ /* webpackChunkName: "CreateEditLocationDialog" */ './dialogs/CreateEditLocationDialog'
+ ),
);
function CreateEditLocationDialogAsync(props) {
return (
@@ -67,24 +68,19 @@ function LocationManager(props: Props) {
addLocations,
editLocation,
selectedLocation,
- locationDirectoryContextMenuAnchorEl
+ locationDirectoryContextMenuAnchorEl,
} = useCurrentLocationContext();
const locations: Array<TS.Location> = useSelector(getLocations);
// const loading: boolean = useSelector(isLoading);
//const language: string = useSelector(getCurrentLanguage);
const fileInputRef = useRef<HTMLInputElement>(null);
//const selectedLocation = useRef<TS.Location>(null);
- const [isEditLocationDialogOpened, setEditLocationDialogOpened] = useState<
- boolean
- >(false);
- const [
- isDeleteLocationDialogOpened,
- setDeleteLocationDialogOpened
- ] = useState<boolean>(false);
- const [
- isExportLocationsDialogOpened,
- setExportLocationsDialogOpened
- ] = useState<boolean>(false);
+ const [isEditLocationDialogOpened, setEditLocationDialogOpened] =
+ useState<boolean>(false);
+ const [isDeleteLocationDialogOpened, setDeleteLocationDialogOpened] =
+ useState<boolean>(false);
+ const [isExportLocationsDialogOpened, setExportLocationsDialogOpened] =
+ useState<boolean>(false);
const [importFile, setImportFile] = useState<File>(undefined);
const ExportLocationsDialog =
@@ -103,14 +99,17 @@ function LocationManager(props: Props) {
target.value = null;
}
- const onDragEnd = result => {
+ const onDragEnd = (result) => {
// dropped outside the list
if (!result.destination) {
return;
}
dispatch(
- LocationActions.moveLocation(result.draggableId, result.destination.index)
+ LocationActions.moveLocation(
+ result.draggableId,
+ result.destination.index,
+ ),
);
};
@@ -119,15 +118,16 @@ function LocationManager(props: Props) {
<SidePanel
style={{
display: show ? 'flex' : 'none',
- flexDirection: 'column'
+ flexDirection: 'column',
}}
>
- {//loading &&
- (PlatformIO.haveObjectStoreSupport() ||
- PlatformIO.haveWebDavSupport()) && (
- <>
- <style>
- {`
+ {
+ //loading &&
+ (PlatformIO.haveObjectStoreSupport() ||
+ PlatformIO.haveWebDavSupport()) && (
+ <>
+ <style>
+ {`
@keyframes hide {
to {
width: 0;
@@ -135,22 +135,23 @@ function LocationManager(props: Props) {
}
}
`}
- </style>
- <div
- style={{
- position: 'absolute',
- zIndex: 1000,
- height: 'calc(100% - 180px)',
- width: 310,
- backdropFilter: 'grayscale(1)',
- animation: 'hide 1ms linear 5s 1 forwards'
- // backgroundColor: 'red'
- // backdropFilter: 'blur(2px)',
- // backgroundColor: '#fafafaAA' // red: '#eb585882' '#d9d9d980'
- }}
- />
- </>
- )}
+ </style>
+ <div
+ style={{
+ position: 'absolute',
+ zIndex: 1000,
+ height: 'calc(100% - 180px)',
+ width: 310,
+ backdropFilter: 'grayscale(1)',
+ animation: 'hide 1ms linear 5s 1 forwards',
+ // backgroundColor: 'red'
+ // backdropFilter: 'blur(2px)',
+ // backgroundColor: '#fafafaAA' // red: '#eb585882' '#d9d9d980'
+ }}
+ />
+ </>
+ )
+ }
<LocationManagerMenu
importLocations={() => {
fileInputRef.current.click();
@@ -175,7 +176,7 @@ function LocationManager(props: Props) {
style={{
height: 'calc(100% - ' + reduceHeightBy + 'px)',
borderRadius: 5,
- overflowY: 'auto'
+ overflowY: 'auto',
}}
>
<DragDropContext onDragEnd={onDragEnd}>
@@ -236,7 +237,7 @@ function LocationManager(props: Props) {
open={isEditLocationDialogOpened}
onClose={() => setEditLocationDialogOpened(false)}
/*location={selectedLocation.current}*/
- editLocation={location => editLocation(location)}
+ editLocation={(location) => editLocation(location)}
/>
)}
{isDeleteLocationDialogOpened && (
@@ -245,9 +246,9 @@ function LocationManager(props: Props) {
onClose={() => setDeleteLocationDialogOpened(false)}
title={t('core:deleteLocationTitleAlert')}
content={t('core:deleteLocationContentAlert', {
- locationName: selectedLocation ? selectedLocation.name : ''
+ locationName: selectedLocation ? selectedLocation.name : '',
})}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result && selectedLocation) {
dispatch(LocationActions.deleteLocation(selectedLocation));
}
@@ -260,7 +261,7 @@ function LocationManager(props: Props) {
<ExportLocationsDialog
open={isExportLocationsDialogOpened}
onClose={() => setExportLocationsDialogOpened(false)}
- locations={locations.filter(location => !location.isNotEditable)}
+ locations={locations.filter((location) => !location.isNotEditable)}
/>
)}
{ImportLocationsDialog && importFile && (
@@ -268,7 +269,7 @@ function LocationManager(props: Props) {
open={Boolean(importFile)}
onClose={() => setImportFile(undefined)}
importFile={importFile}
- addLocations={loc => addLocations(loc)}
+ addLocations={(loc) => addLocations(loc)}
locations={locations}
/>
)}
diff --git a/app/components/LocationView.tsx b/app/components/LocationView.tsx
index 860693309..07f0d8054 100644
--- a/app/components/LocationView.tsx
+++ b/app/components/LocationView.tsx
@@ -34,7 +34,7 @@ import PlatformIO from '../services/platform-facade';
import TargetMoveFileBox from './TargetMoveFileBox';
import DragItemTypes from './DragItemTypes';
import DirectoryTreeView, {
- DirectoryTreeViewRef
+ DirectoryTreeViewRef,
} from '-/components/DirectoryTreeView';
import LocationContextMenu from '-/components/menus/LocationContextMenu';
import { TS } from '-/tagspaces.namespace';
@@ -62,14 +62,11 @@ function LocationView(props: Props) {
currentLocation,
readOnlyMode,
setSelectedLocation,
- setLocationDirectoryContextMenuAnchorEl
+ setLocationDirectoryContextMenuAnchorEl,
} = useCurrentLocationContext();
const { setSelectedEntries } = useSelectedEntriesContext();
- const {
- currentDirectoryPath,
- addDirectoryEntries,
- openDirectory
- } = useDirectoryContentContext();
+ const { currentDirectoryPath, addDirectoryEntries, openDirectory } =
+ useDirectoryContentContext();
const { showNotification } = useNotificationContext();
const directoryTreeRef = useRef<DirectoryTreeViewRef>(null);
@@ -79,12 +76,12 @@ function LocationView(props: Props) {
location,
hideDrawer,
setEditLocationDialogOpened,
- setDeleteLocationDialogOpened
+ setDeleteLocationDialogOpened,
} = props;
const isCloudLocation = location.type === locationType.TYPE_CLOUD;
const handleLocationIconClick = (
- event: React.MouseEvent<HTMLSpanElement, MouseEvent>
+ event: React.MouseEvent<HTMLSpanElement, MouseEvent>,
) => {
event.preventDefault();
event.stopPropagation();
@@ -132,7 +129,7 @@ function LocationView(props: Props) {
const { path, selectedEntries } = monitor.getItem();
const arrPath = [];
if (selectedEntries && selectedEntries.length > 0) {
- selectedEntries.map(entry => {
+ selectedEntries.map((entry) => {
arrPath.push(entry.path);
return true;
});
@@ -175,12 +172,12 @@ function LocationView(props: Props) {
}
return true;
})
- .catch(error => {
+ .catch((error) => {
console.log('uploadFiles', error);
});
return true;
})
- .catch(error => {
+ .catch((error) => {
console.log('enableObjectStoreSupport', error);
});
} else if (targetLocation.type === locationType.TYPE_LOCAL) {
@@ -208,14 +205,14 @@ function LocationView(props: Props) {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
- maxWidth: 240
+ maxWidth: 240,
}}
>
<Typography
variant="inherit"
style={{
paddingLeft: 5,
- paddingRight: 5
+ paddingRight: 5,
}}
className={classes.header}
data-tid="locationTitleElement"
@@ -245,7 +242,9 @@ function LocationView(props: Props) {
: classes.listItem
}
onClick={handleLocationClick}
- onContextMenu={event => handleLocationContextMenuClick(event, location)}
+ onContextMenu={(event) =>
+ handleLocationContextMenuClick(event, location)
+ }
>
<ListItemIcon
// onClick={(e) => {
@@ -254,7 +253,7 @@ function LocationView(props: Props) {
// }}
style={{
minWidth: 'auto',
- cursor: 'pointer'
+ cursor: 'pointer',
}}
onClick={handleLocationIconClick}
>
@@ -262,14 +261,14 @@ function LocationView(props: Props) {
{isCloudLocation ? (
<CloudLocationIcon
style={{
- cursor: 'pointer'
+ cursor: 'pointer',
}}
className={classes.icon}
/>
) : (
<LocalLocationIcon
style={{
- cursor: 'pointer'
+ cursor: 'pointer',
}}
className={classes.icon}
/>
@@ -294,8 +293,8 @@ function LocationView(props: Props) {
aria-haspopup="true"
edge="end"
data-tid={'locationMoreButton_' + location.name}
- onClick={event => handleLocationContextMenuClick(event, location)}
- onContextMenu={event =>
+ onClick={(event) => handleLocationContextMenuClick(event, location)}
+ onContextMenu={(event) =>
handleLocationContextMenuClick(event, location)
}
size="large"
diff --git a/app/components/MainSearchField.tsx b/app/components/MainSearchField.tsx
index cb1899358..d5e8fe81d 100644
--- a/app/components/MainSearchField.tsx
+++ b/app/components/MainSearchField.tsx
@@ -23,12 +23,12 @@ import TextField from '@mui/material/TextField';
const MainSearchField = styled(TextField)(({ theme }) => ({
overflow: 'hidden',
'& input': {
- padding: 6
+ padding: 6,
},
'& .MuiInputBase-root': {
borderRadius: 7,
paddingRight: 5,
- paddingLeft: 5
+ paddingLeft: 5,
},
'& .Mui-focused': {
color:
@@ -38,7 +38,7 @@ const MainSearchField = styled(TextField)(({ theme }) => ({
backgroundColor:
theme.palette.mode === 'light'
? theme.palette.grey[200]
- : theme.palette.grey[900]
+ : theme.palette.grey[900],
// backgroundColor: 'gray',
// outline: '2px solid red',
// border: 'none',
@@ -49,9 +49,9 @@ const MainSearchField = styled(TextField)(({ theme }) => ({
// boxShadow: '0 0 0 4px rgba(21, 156, 228, 0.4)'
// },
'&:hover': {
- backgroundColor: theme.palette.background.paper
+ backgroundColor: theme.palette.background.paper,
// boxShadow: `${alpha(theme.palette.primary.main, 0.25)} 0 0 0 0.2rem`
- }
+ },
// '&:active': {
// backgroundColor: theme.palette.background.paper
// }
diff --git a/app/components/MobileNavigation.tsx b/app/components/MobileNavigation.tsx
index 37a5597a6..8b542863e 100644
--- a/app/components/MobileNavigation.tsx
+++ b/app/components/MobileNavigation.tsx
@@ -49,7 +49,7 @@ import {
isSearchPanelOpened,
isHelpFeedbackPanelOpened,
AppDispatch,
- currentUser
+ currentUser,
} from '../reducers/app';
import { actions as SettingsActions } from '-/reducers/settings';
import StoredSearches from '-/components/StoredSearches';
@@ -63,18 +63,18 @@ const PREFIX = 'MobileNavigation';
const classes = {
button: `${PREFIX}-button`,
- selectedButton: `${PREFIX}-selectedButton`
+ selectedButton: `${PREFIX}-selectedButton`,
};
const Root = styled(Box)(({ theme }) => ({
[`& .${classes.button}`]: {
position: 'relative',
padding: '11px', // '8px 12px 6px 8px',
- margin: '0'
+ margin: '0',
},
[`& .${classes.selectedButton}`]: {
- backgroundColor: theme.palette.primary.light
- }
+ backgroundColor: theme.palette.primary.light,
+ },
}));
interface Props {
@@ -87,12 +87,12 @@ function MobileNavigation(props: Props) {
const dispatch: AppDispatch = useDispatch();
const isLocationManagerPanelOpenedSelector = useSelector(
- isLocationManagerPanelOpened
+ isLocationManagerPanelOpened,
);
const isTagLibraryPanelOpenedSelector = useSelector(isTagLibraryPanelOpened);
const isSearchPanelOpenedSelector = useSelector(isSearchPanelOpened);
const isHelpFeedbackPanelOpenedSelector = useSelector(
- isHelpFeedbackPanelOpened
+ isHelpFeedbackPanelOpened,
);
const cognitoUser: CognitoUserInterface = useSelector(currentUser);
@@ -128,13 +128,13 @@ function MobileNavigation(props: Props) {
height: '100%',
overflow: 'hidden',
width: width || 320,
- maxWidth: width || 320
+ maxWidth: width || 320,
}}
>
<Box
style={{
overflow: 'hidden',
- height: showProTeaser ? 'calc(100% - 220px)' : 'calc(100% - 55px)'
+ height: showProTeaser ? 'calc(100% - 220px)' : 'calc(100% - 55px)',
}}
>
<CustomLogo />
@@ -145,7 +145,7 @@ function MobileNavigation(props: Props) {
display: 'block',
whiteSpace: 'nowrap',
marginBottom: 10,
- marginLeft: 15
+ marginLeft: 15,
}}
>
<Tooltip title={t('core:createFileTitle')}>
@@ -165,7 +165,7 @@ function MobileNavigation(props: Props) {
style={{
maxWidth: 180,
textOverflow: 'ellipsis',
- overflow: 'hidden'
+ overflow: 'hidden',
}}
>
{t('core:create')}
@@ -186,7 +186,7 @@ function MobileNavigation(props: Props) {
style={{
maxWidth: 180,
textOverflow: 'ellipsis',
- overflow: 'hidden'
+ overflow: 'hidden',
}}
>
{t('core:newWindow')}
@@ -213,7 +213,7 @@ function MobileNavigation(props: Props) {
</Box>
<Box
style={{
- textAlign: 'center'
+ textAlign: 'center',
}}
>
{showProTeaser && (
@@ -313,11 +313,11 @@ function MobileNavigation(props: Props) {
onClose={() => setAnchorUser(null)}
anchorOrigin={{
vertical: 'top',
- horizontal: 'center'
+ horizontal: 'center',
}}
transformOrigin={{
vertical: 'bottom',
- horizontal: 'center'
+ horizontal: 'center',
}}
>
<UserDetailsPopover onClose={() => setAnchorUser(null)} />
diff --git a/app/components/PathBreadcrumbs.tsx b/app/components/PathBreadcrumbs.tsx
index 593c79de1..396e0bfcb 100644
--- a/app/components/PathBreadcrumbs.tsx
+++ b/app/components/PathBreadcrumbs.tsx
@@ -26,7 +26,7 @@ import ExpandMoreIcon from '@mui/icons-material/MoreVert';
import PlatformIO from '../services/platform-facade';
import {
normalizePath,
- extractShortDirectoryName
+ extractShortDirectoryName,
} from '@tagspaces/tagspaces-common/paths';
import DirectoryMenu from './menus/DirectoryMenu';
import { LocalLocationIcon, CloudLocationIcon } from '-/components/CommonIcons';
@@ -47,15 +47,15 @@ const StyledBreadcrumb = styled(Chip)(({ theme }) => {
color: theme.palette.text.primary,
fontWeight: theme.typography.fontWeightRegular,
'&:hover, &:focus': {
- backgroundColor: emphasize(backgroundColor, 0.06)
+ backgroundColor: emphasize(backgroundColor, 0.06),
},
'&:active': {
boxShadow: theme.shadows[1],
- backgroundColor: emphasize(backgroundColor, 0.12)
+ backgroundColor: emphasize(backgroundColor, 0.12),
},
'& ol': {
- flexWrap: 'nowrap'
- }
+ flexWrap: 'nowrap',
+ },
};
}) as typeof Chip; // TypeScript only: need a type cast here because https://github.com/Microsoft/TypeScript/issues/26591
@@ -66,8 +66,8 @@ const StyledBreadcrumb = styled(Chip)(({ theme }) => {
const StyledBreadcrumbs = styled(Breadcrumbs)(({ theme }) => {
return {
'& ol': {
- flexWrap: 'nowrap'
- }
+ flexWrap: 'nowrap',
+ },
};
}) as typeof Breadcrumbs; // TypeScript only: need a type cast here because https://github.com/Microsoft/TypeScript/issues/26591
@@ -84,10 +84,8 @@ function PathBreadcrumbs(props: Props) {
const { setSelectedEntries } = useSelectedEntriesContext();
let pathParts: Array<string> = [];
- const [
- directoryContextMenuAnchorEl,
- setDirectoryContextMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
+ const [directoryContextMenuAnchorEl, setDirectoryContextMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
const { openRenameDirectoryDialog, isDesktopMode } = props;
@@ -135,11 +133,11 @@ function PathBreadcrumbs(props: Props) {
normalizedCurrentPath
.substring(PlatformIO.haveObjectStoreSupport() ? 2 : 1)
.split('/')
- .join(PlatformIO.getDirSeparator())
+ .join(PlatformIO.getDirSeparator()),
); // TODO: optimization needed
normalizedCurrentPath = normalizedCurrentPath.substring(
0,
- normalizedCurrentPath.lastIndexOf('/')
+ normalizedCurrentPath.lastIndexOf('/'),
);
}
@@ -153,7 +151,7 @@ function PathBreadcrumbs(props: Props) {
let currentFolderName = extractShortDirectoryName(
normalizePath(normalizedCurrentDirPath),
- '/'
+ '/',
);
if (currentLocation && (!currentFolderName || currentFolderName === '/')) {
currentFolderName = currentLocation.name;
@@ -165,7 +163,7 @@ function PathBreadcrumbs(props: Props) {
breadcrumbs = pathParts.map((pathPart, index) => {
const folderName = extractShortDirectoryName(
pathPart,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
return (
<Tooltip key={pathPart} title={t('core:navigateTo') + ' ' + pathPart}>
@@ -206,7 +204,7 @@ function PathBreadcrumbs(props: Props) {
<StyledBreadcrumbs
style={{
overflowX: 'scroll',
- marginTop: 8
+ marginTop: 8,
}}
maxItems={isDesktopMode ? 2 : 1}
itemsAfterCollapse={isDesktopMode ? 1 : 1}
@@ -216,7 +214,7 @@ function PathBreadcrumbs(props: Props) {
<span
style={{
marginLeft: -4,
- marginRight: -5
+ marginRight: -5,
}}
>
{'›'}
diff --git a/app/components/PerspectiveSelector.tsx b/app/components/PerspectiveSelector.tsx
index f3b64009d..3ecade862 100644
--- a/app/components/PerspectiveSelector.tsx
+++ b/app/components/PerspectiveSelector.tsx
@@ -53,10 +53,10 @@ function PerspectiveSelector(props: Props) {
</ListItemIcon>
<ListItemText>{t('core:unspecified')}</ListItemText>
</div>
- </MenuItem>
+ </MenuItem>,
);
- AvailablePerspectives.forEach(perspective => {
+ AvailablePerspectives.forEach((perspective) => {
let includePerspective = true;
if (!Pro && perspective.pro === true) {
includePerspective = false;
@@ -73,7 +73,7 @@ function PerspectiveSelector(props: Props) {
{perspective.beta && <BetaLabel />}
</ListItemText>
</div>
- </MenuItem>
+ </MenuItem>,
);
}
});
diff --git a/app/components/ProTeaser.tsx b/app/components/ProTeaser.tsx
index 02b774cc7..639d614f1 100644
--- a/app/components/ProTeaser.tsx
+++ b/app/components/ProTeaser.tsx
@@ -46,7 +46,7 @@ function ProTeaser(props: Props) {
style={{
padding: 5,
paddingBottom: 0,
- textAlign: 'center'
+ textAlign: 'center',
}}
>
<Typography color="textSecondary" variant="caption">
@@ -55,7 +55,7 @@ function ProTeaser(props: Props) {
style={{ right: 5, marginTop: -10, position: 'absolute' }}
size="small"
aria-label="close"
- onClick={event => {
+ onClick={(event) => {
event.preventDefault();
event.stopPropagation();
setShowTeaserBanner(false);
@@ -73,7 +73,7 @@ function ProTeaser(props: Props) {
style={{
flexDirection: 'row',
justifyContent: 'center',
- marginTop: -10
+ marginTop: -10,
}}
>
<Button
diff --git a/app/components/RenderHistory.tsx b/app/components/RenderHistory.tsx
index c0bea7ed0..24e812e7d 100644
--- a/app/components/RenderHistory.tsx
+++ b/app/components/RenderHistory.tsx
@@ -27,7 +27,7 @@ import { Pro } from '-/pro';
import BookmarkTwoToneIcon from '@mui/icons-material/BookmarkTwoTone';
import {
extractDirectoryName,
- extractFileName
+ extractFileName,
} from '@tagspaces/tagspaces-common/paths';
import IconButton from '@mui/material/IconButton';
import { RemoveIcon, HistoryIcon } from '-/components/CommonIcons';
@@ -50,12 +50,12 @@ function RenderHistory(props: Props) {
const { openLocationById, currentLocation } = useCurrentLocationContext();
const { historyKey, items, update, maxItems, showDelete = true } = props;
- const openLinkDispatch = link => openLink(link, { fullWidth: false });
+ const openLinkDispatch = (link) => openLink(link, { fullWidth: false });
return (
<>
{items &&
- items.slice(0, maxItems || items.length).map(item => {
+ items.slice(0, maxItems || items.length).map((item) => {
const itemName = item.path.endsWith(PlatformIO.getDirSeparator())
? extractDirectoryName(item.path, PlatformIO.getDirSeparator())
: extractFileName(item.path, PlatformIO.getDirSeparator());
@@ -71,7 +71,7 @@ function RenderHistory(props: Props) {
style={{
textTransform: 'none',
fontWeight: 'normal',
- justifyContent: 'start'
+ justifyContent: 'start',
}}
onClick={() =>
Pro.history.openItem(
@@ -79,7 +79,7 @@ function RenderHistory(props: Props) {
currentLocation && currentLocation.uuid,
openLinkDispatch,
openLocationById,
- openEntry
+ openEntry,
)
}
>
@@ -110,7 +110,7 @@ function RenderHistory(props: Props) {
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
overflow: 'hidden',
- maxWidth: 220
+ maxWidth: 220,
}}
>
{itemName}
diff --git a/app/components/RenderPerspective.tsx b/app/components/RenderPerspective.tsx
index 3e2b8144e..e30c19eda 100644
--- a/app/components/RenderPerspective.tsx
+++ b/app/components/RenderPerspective.tsx
@@ -30,10 +30,11 @@ import { SortedDirContextProvider } from '-/perspectives/grid-perspective/hooks/
import { PaginationContextProvider } from '-/hooks/PaginationContextProvider';
import { ThumbGenerationContextProvider } from '-/hooks/ThumbGenerationContextProvider';
-const GridPerspective = React.lazy(() =>
- import(
- /* webpackChunkName: "GridPerspective" */ '../perspectives/grid-perspective'
- )
+const GridPerspective = React.lazy(
+ () =>
+ import(
+ /* webpackChunkName: "GridPerspective" */ '../perspectives/grid-perspective'
+ ),
);
function GridPerspectiveAsync(props) {
return (
@@ -49,8 +50,9 @@ function GridPerspectiveAsync(props) {
);
}
-const ListPerspective = React.lazy(() =>
- import(/* webpackChunkName: "ListPerspective" */ '../perspectives/list')
+const ListPerspective = React.lazy(
+ () =>
+ import(/* webpackChunkName: "ListPerspective" */ '../perspectives/list'),
);
function ListPerspectiveAsync(props) {
return (
@@ -111,8 +113,8 @@ function KanBanPerspectiveAsync(props) {
);
}
-const WelcomePanel = React.lazy(() =>
- import(/* webpackChunkName: "WelcomePanel" */ './WelcomePanel')
+const WelcomePanel = React.lazy(
+ () => import(/* webpackChunkName: "WelcomePanel" */ './WelcomePanel'),
);
function WelcomePanelAsync(props) {
return (
@@ -131,7 +133,7 @@ function RenderPerspective(props: Props) {
const {
currentDirectoryEntries,
currentDirectoryPath,
- currentDirectoryPerspective
+ currentDirectoryPerspective,
} = useDirectoryContentContext();
const defaultPerspective = useSelector(getDefaultPerspective);
diff --git a/app/components/Revisions.tsx b/app/components/Revisions.tsx
index 02f35e979..a2ce4d62a 100644
--- a/app/components/Revisions.tsx
+++ b/app/components/Revisions.tsx
@@ -19,7 +19,7 @@
import React, { useEffect, useState } from 'react';
import {
getBackupFileLocation,
- extractContainingDirectoryPath
+ extractContainingDirectoryPath,
} from '@tagspaces/tagspaces-common/paths';
import Tooltip from '-/components/Tooltip';
import { OpenedEntry } from '-/reducers/app';
@@ -39,7 +39,7 @@ import {
TableContainer,
TableHead,
TablePagination,
- TableRow
+ TableRow,
} from '@mui/material';
import { Pro } from '-/pro';
import FilePreviewDialog from '-/components/dialogs/FilePreviewDialog';
@@ -56,9 +56,8 @@ function Revisions() {
const { copyFilePromiseOverwrite } = usePlatformFacadeContext();
const [rows, setRows] = useState<Array<TS.FileSystemEntry>>([]);
const [page, setPage] = useState<number>(0);
- const [rowsPerPage, setRowsPerPage] = React.useState<number>(
- initialRowsPerPage
- );
+ const [rowsPerPage, setRowsPerPage] =
+ React.useState<number>(initialRowsPerPage);
const [previewDialogEntry, setPreviewDialogEntry] = useState<
TS.FileSystemEntry | undefined
>(undefined);
@@ -75,21 +74,21 @@ function Revisions() {
function loadHistoryItems(openedFile: OpenedEntry) {
if (Pro) {
Pro.MetaOperations.getMetadataID(openedFile.path, openedFile.uuid).then(
- id => {
+ (id) => {
openedFile.uuid = id;
const backupFilePath = getBackupFileLocation(
openedFile.path,
openedFile.uuid,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const backupPath = extractContainingDirectoryPath(
backupFilePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
- PlatformIO.listDirectoryPromise(backupPath, []).then(h =>
- setRows(h.sort((a, b) => (a.lmdt < b.lmdt ? 1 : -1)))
+ PlatformIO.listDirectoryPromise(backupPath, []).then((h) =>
+ setRows(h.sort((a, b) => (a.lmdt < b.lmdt ? 1 : -1))),
);
- }
+ },
);
}
}
@@ -99,7 +98,7 @@ function Revisions() {
};
const handleChangeRowsPerPage = (
- event: React.ChangeEvent<HTMLInputElement>
+ event: React.ChangeEvent<HTMLInputElement>,
) => {
setRowsPerPage(parseInt(event.target.value, 10));
setPage(0);
@@ -107,14 +106,14 @@ function Revisions() {
function deleteRevision(path) {
PlatformIO.deleteFilePromise(path, true).then(() =>
- loadHistoryItems(openedEntries[0])
+ loadHistoryItems(openedEntries[0]),
);
}
function deleteRevisions() {
if (rows.length > 0) {
- const promises = rows.map(row =>
- PlatformIO.deleteFilePromise(row.path, true)
+ const promises = rows.map((row) =>
+ PlatformIO.deleteFilePromise(row.path, true),
);
Promise.all(promises).then(() => loadHistoryItems(openedEntries[0]));
}
@@ -125,7 +124,7 @@ function Revisions() {
const targetPath = getBackupFileLocation(
openedFile.path,
openedFile.uuid,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
return copyFilePromiseOverwrite(openedFile.path, targetPath).then(() =>
copyFilePromiseOverwrite(revisionPath, openedFile.path).then(() =>
@@ -133,9 +132,9 @@ function Revisions() {
id: '',
...openedFile,
editMode: false,
- shouldReload: !openedFile.shouldReload
- })
- )
+ shouldReload: !openedFile.shouldReload,
+ }),
+ ),
);
}
function titleFormat(lmdt) {
@@ -146,7 +145,7 @@ function Revisions() {
return lmdt
? formatDistanceToNow(lmdt, {
includeSeconds: true,
- addSuffix: true
+ addSuffix: true,
// locale: https://date-fns.org/v2.29.3/docs/formatDistanceToNow#usage
})
: '';
@@ -154,7 +153,7 @@ function Revisions() {
const paginatedRows = React.useMemo(
() => rows.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage),
- [rows, page, rowsPerPage]
+ [rows, page, rowsPerPage],
);
return (
@@ -176,7 +175,7 @@ function Revisions() {
component={Paper}
sx={{
maxHeight: '100%',
- overflowY: 'auto'
+ overflowY: 'auto',
}}
>
<Table
@@ -195,7 +194,7 @@ function Revisions() {
aria-label="delete all revisions"
onClick={() =>
confirm(
- 'The all revisions will be deleted. Do you want to continue?'
+ 'The all revisions will be deleted. Do you want to continue?',
) && deleteRevisions()
}
data-tid="deleteRevisionsTID"
@@ -210,7 +209,7 @@ function Revisions() {
</TableRow>
</TableHead>
<TableBody>
- {paginatedRows.map(row => (
+ {paginatedRows.map((row) => (
<TableRow
data-tid={openedEntries[0].uuid}
key={row.path}
diff --git a/app/components/SearchAutocomplete.tsx b/app/components/SearchAutocomplete.tsx
index 4102af851..de4eca70d 100644
--- a/app/components/SearchAutocomplete.tsx
+++ b/app/components/SearchAutocomplete.tsx
@@ -30,7 +30,7 @@ import DropDownIcon from '@mui/icons-material/ArrowDropDownOutlined';
import { actions as AppActions, AppDispatch } from '../reducers/app';
import {
getMaxSearchResults,
- getShowUnixHiddenEntries
+ getShowUnixHiddenEntries,
} from '-/reducers/settings';
import { FileTypeGroups, haveSearchFilters } from '-/services/search';
import { TS } from '-/tagspaces.namespace';
@@ -51,7 +51,7 @@ import {
ScopeType,
SearchActions,
SearchOptionType,
- SearchQueryComposition
+ SearchQueryComposition,
} from '-/components/SearchOptions';
import { getLocations } from '-/reducers/locations';
import CloseIcon from '@mui/icons-material/Close';
@@ -92,20 +92,20 @@ function SearchAutocomplete(props: Props) {
currentLocation,
changeLocationByID,
switchLocationTypeByID,
- openLocationById
+ openLocationById,
} = useCurrentLocationContext();
const {
currentDirectoryPath,
exitSearchMode,
openCurrentDirectory,
searchQuery,
- setSearchQuery
+ setSearchQuery,
} = useDirectoryContentContext();
const {
// watchForChanges,
isIndexing,
searchAllLocations,
- searchLocationIndex
+ searchLocationIndex,
} = useLocationIndexContext();
const dispatch: AppDispatch = useDispatch();
const maxSearchResults = useSelector(getMaxSearchResults);
@@ -117,17 +117,15 @@ function SearchAutocomplete(props: Props) {
const { setTextQuery, textQuery, open, setAnchorSearch } = props;
// const [, forceUpdate] = useReducer(x => x + 1, 0);
- const [
- openSavedSearches,
- setOpenSavedSearches
- ] = useState<null | HTMLElement>(null);
+ const [openSavedSearches, setOpenSavedSearches] =
+ useState<null | HTMLElement>(null);
const searchOptions = useRef<Array<SearchOptionType>>(getSearchOptions());
const currentOptions = useRef<string>(undefined);
// const textQueryMask = useRef<string>('');
const fileTypes = useRef<Array<string>>(
- searchQuery.fileTypes ? searchQuery.fileTypes : FileTypeGroups.any
+ searchQuery.fileTypes ? searchQuery.fileTypes : FileTypeGroups.any,
);
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
/*function parseSearchQuery(textQuery: string) {
if (textQuery) {
@@ -137,34 +135,34 @@ function SearchAutocomplete(props: Props) {
}*/
const actionValues = useRef<Array<SearchOptionType>>(
- [] //parseSearchQuery(textQueryMask.current)
+ [], //parseSearchQuery(textQueryMask.current)
);
const [searchBoxing, setSearchBoxing] = useState<ScopeType>(
- searchQuery.searchBoxing || 'location'
+ searchQuery.searchBoxing || 'location',
);
const searchType = useRef<'fuzzy' | 'semistrict' | 'strict'>(
- searchQuery.searchType ? searchQuery.searchType : 'fuzzy'
+ searchQuery.searchType ? searchQuery.searchType : 'fuzzy',
);
const lastModified = useRef<string>(
- searchQuery.lastModified ? searchQuery.lastModified : ''
+ searchQuery.lastModified ? searchQuery.lastModified : '',
);
const tagTimePeriod = useRef<string>('');
const tagTimePeriodHelper = useRef<string>(' ');
const tagTimePeriodFrom = useRef<number | null>(
- searchQuery.tagTimePeriodFrom ? searchQuery.tagTimePeriodFrom : null
+ searchQuery.tagTimePeriodFrom ? searchQuery.tagTimePeriodFrom : null,
);
const tagTimePeriodTo = useRef<number | null>(
- searchQuery.tagTimePeriodTo ? searchQuery.tagTimePeriodTo : null
+ searchQuery.tagTimePeriodTo ? searchQuery.tagTimePeriodTo : null,
);
const [tagPlaceLat, setTagPlaceLat] = useState<number | null>(null);
const [tagPlaceLong, setTagPlaceLong] = useState<number | null>(null);
// const [tagPlaceRadius, setTagPlaceRadius] = useState<number>(0);
const forceIndexing = useRef<boolean>(
- searchQuery.forceIndexing ? searchQuery.forceIndexing : false
+ searchQuery.forceIndexing ? searchQuery.forceIndexing : false,
);
const fileSize = useRef<string>(
- searchQuery.fileSize ? searchQuery.fileSize : ''
+ searchQuery.fileSize ? searchQuery.fileSize : '',
);
// const mainSearchField = useRef<HTMLInputElement>(null);
@@ -199,38 +197,38 @@ function SearchAutocomplete(props: Props) {
// textQueryMask.current = '';
if (searchQuery.tagsAND && searchQuery.tagsAND.length > 0) {
- searchQuery.tagsAND.forEach(tag => {
+ searchQuery.tagsAND.forEach((tag) => {
// textQueryMask.current += ' +' + tag.title;
actions.push({
action: SearchQueryComposition.TAG_AND.shortName,
label: SearchQueryComposition.TAG_AND.shortName + tag.title,
color: tag.color,
- textcolor: tag.textcolor
+ textcolor: tag.textcolor,
});
});
emptySearch = false;
}
if (searchQuery.tagsOR && searchQuery.tagsOR.length > 0) {
- searchQuery.tagsOR.forEach(tag => {
+ searchQuery.tagsOR.forEach((tag) => {
// textQueryMask.current += ' |' + tag.title;
actions.push({
action: SearchQueryComposition.TAG_OR.shortName,
label: SearchQueryComposition.TAG_OR.shortName + tag.title,
color: tag.color,
- textcolor: tag.textcolor
+ textcolor: tag.textcolor,
});
});
emptySearch = false;
}
if (searchQuery.tagsNOT && searchQuery.tagsNOT.length > 0) {
- searchQuery.tagsNOT.forEach(tag => {
+ searchQuery.tagsNOT.forEach((tag) => {
// textQueryMask.current += ' -' + tag.title;
actions.push({
action: SearchQueryComposition.TAG_NOT.shortName,
label: SearchQueryComposition.TAG_NOT.shortName + tag.title,
color: tag.color,
- textcolor: tag.textcolor
+ textcolor: tag.textcolor,
});
});
emptySearch = false;
@@ -255,7 +253,7 @@ function SearchAutocomplete(props: Props) {
label:
SearchQueryComposition.SCOPE.fullName +
' ' +
- searchQuery.searchBoxing
+ searchQuery.searchBoxing,
});
}
if (
@@ -276,7 +274,7 @@ function SearchAutocomplete(props: Props) {
label:
SearchQueryComposition.TYPE.fullName +
' ' +
- (keyFileType ? t('core:' + keyFileType) : searchQuery.fileTypes)
+ (keyFileType ? t('core:' + keyFileType) : searchQuery.fileTypes),
});
}
if (searchQuery.searchType) {
@@ -287,7 +285,7 @@ function SearchAutocomplete(props: Props) {
label:
SearchQueryComposition.ACCURACY.fullName +
' ' +
- t('core:' + searchQuery.searchType)
+ t('core:' + searchQuery.searchType),
});
}
if (searchQuery.lastModified) {
@@ -298,7 +296,7 @@ function SearchAutocomplete(props: Props) {
label:
SearchQueryComposition.LAST_MODIFIED.fullName +
' ' +
- t('core:' + searchQuery.lastModified)
+ t('core:' + searchQuery.lastModified),
});
}
if (searchQuery.tagTimePeriodFrom) {
@@ -320,7 +318,7 @@ function SearchAutocomplete(props: Props) {
label:
SearchQueryComposition.SIZE.fullName +
' ' +
- t('core:' + searchQuery.fileSize)
+ t('core:' + searchQuery.fileSize),
});
}
if (!emptySearch) {
@@ -328,7 +326,7 @@ function SearchAutocomplete(props: Props) {
actionValues.current = execActions(
actions, // todo set tag in actions
actionValues.current,
- false
+ false,
);
isOpen.current = false;
forceUpdate();
@@ -336,7 +334,7 @@ function SearchAutocomplete(props: Props) {
if (searchQuery.executeSearch) {
const sQuery = {
...searchQuery,
- textQuery: txtQuery
+ textQuery: txtQuery,
};
if (searchBoxing === 'global') {
searchAllLocations(sQuery);
@@ -374,7 +372,7 @@ function SearchAutocomplete(props: Props) {
executeSearch();
};
- const onKeyDownHandler = event => {
+ const onKeyDownHandler = (event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
if (!isOpen.current) {
executeSearch();
@@ -404,29 +402,29 @@ function SearchAutocomplete(props: Props) {
function resetValues(exceptions: Array<SearchOptionType>) {
setTextQuery('');
if (
- !exceptions.some(action =>
- isAction(action.action, SearchQueryComposition.SCOPE)
+ !exceptions.some((action) =>
+ isAction(action.action, SearchQueryComposition.SCOPE),
)
) {
setSearchBoxing('location');
}
if (
- !exceptions.some(action =>
- isAction(action.action, SearchQueryComposition.ACCURACY)
+ !exceptions.some((action) =>
+ isAction(action.action, SearchQueryComposition.ACCURACY),
)
) {
searchType.current = 'fuzzy';
}
if (
- !exceptions.some(action =>
- isAction(action.action, SearchQueryComposition.TYPE)
+ !exceptions.some((action) =>
+ isAction(action.action, SearchQueryComposition.TYPE),
)
) {
fileTypes.current = FileTypeGroups.any;
}
if (
- !exceptions.some(action =>
- isAction(action.action, SearchQueryComposition.LAST_MODIFIED)
+ !exceptions.some((action) =>
+ isAction(action.action, SearchQueryComposition.LAST_MODIFIED),
)
) {
lastModified.current = '';
@@ -439,8 +437,8 @@ function SearchAutocomplete(props: Props) {
setTagPlaceLong(null);
forceIndexing.current = false;
if (
- !exceptions.some(action =>
- isAction(action.action, SearchQueryComposition.SIZE)
+ !exceptions.some((action) =>
+ isAction(action.action, SearchQueryComposition.SIZE),
)
) {
fileSize.current = '';
@@ -456,12 +454,12 @@ function SearchAutocomplete(props: Props) {
function removeActionsFromQuery(
query: string,
- actions: Array<SearchOptionType>
+ actions: Array<SearchOptionType>,
) {
if (actions && actions.length > 0) {
const queryArr = query
.split(' ')
- .filter(q => actions.some(action => q !== action.label));
+ .filter((q) => actions.some((action) => q !== action.label));
return queryArr.join(' ');
}
return query;
@@ -490,7 +488,7 @@ function SearchAutocomplete(props: Props) {
};*/
const handleOpenSavedSearches = (
- event: React.MouseEvent<HTMLButtonElement>
+ event: React.MouseEvent<HTMLButtonElement>,
) => {
setOpenSavedSearches(event.currentTarget);
};
@@ -541,18 +539,18 @@ function SearchAutocomplete(props: Props) {
function getTags(
actions: Array<SearchOptionType>,
- action: ActionType
+ action: ActionType,
): TS.Tag[] {
if (actions.length > 0) {
- const actionsArr = actions.filter(a => isAction(a.action, action));
+ const actionsArr = actions.filter((a) => isAction(a.action, action));
if (actionsArr.length > 0) {
- return actionsArr.map(a => ({
+ return actionsArr.map((a) => ({
title:
a.label.indexOf(action.shortName) === 0
? a.label.substring(action.shortName.length)
: action.fullName && a.label.indexOf(action.fullName) === 0
? a.label.substring(action.fullName.length)
- : a.label
+ : a.label,
}));
}
}
@@ -561,8 +559,8 @@ function SearchAutocomplete(props: Props) {
const executeSearch = () => {
if (
- actionValues.current.some(action =>
- isAction(action.action, SearchActions.FILTER)
+ actionValues.current.some((action) =>
+ isAction(action.action, SearchActions.FILTER),
)
) {
// don't execute search on search filter
@@ -578,12 +576,12 @@ function SearchAutocomplete(props: Props) {
}
const tagsAND = getTags(
actionValues.current,
- SearchQueryComposition.TAG_AND
+ SearchQueryComposition.TAG_AND,
);
const tagsOR = getTags(actionValues.current, SearchQueryComposition.TAG_OR);
const tagsNOT = getTags(
actionValues.current,
- SearchQueryComposition.TAG_NOT
+ SearchQueryComposition.TAG_NOT,
);
// const tagsAND = parseTextQuery(textQuery.current, '+');
// query = removeTagsFromQuery(tagsAND, query, '+');
@@ -612,7 +610,7 @@ function SearchAutocomplete(props: Props) {
currentDirectory: currentDirectoryPath,
forceIndexing: forceIndexing.current,
showUnixHiddenEntries: showUnixHiddenEntries,
- executeSearch: true
+ executeSearch: true,
};
if (!haveSearchFilters(sQuery)) {
clearSearch();
@@ -646,7 +644,7 @@ function SearchAutocomplete(props: Props) {
function getHistoryOptions(
items: TS.HistoryItem[],
- group: string
+ group: string,
): SearchOptionType[] {
if (!items) {
return [];
@@ -655,14 +653,14 @@ function SearchAutocomplete(props: Props) {
id: item.lid,
descr: formatDistanceToNow(item.creationTimeStamp, {
includeSeconds: true,
- addSuffix: true
+ addSuffix: true,
// locale: https://date-fns.org/v2.29.3/docs/formatDistanceToNow#usage
}),
action: ExecActions.OPEN_HISTORY,
fullName: item.url,
label: item.path,
group: group,
- ...(item.searchQuery && { searchQuery: item.searchQuery })
+ ...(item.searchQuery && { searchQuery: item.searchQuery }),
}));
}
@@ -671,13 +669,13 @@ function SearchAutocomplete(props: Props) {
if (isAction(action, SearchActions.LOCATION)) {
if (currentOptions.current !== action) {
currentOptions.current = action;
- searchOptions.current = locations.map(location => {
+ searchOptions.current = locations.map((location) => {
return {
id: location.uuid,
descr: location.path,
action: ExecActions.OPEN_LOCATION,
label: location.name,
- filter
+ filter,
};
});
optionsChanged = true;
@@ -700,9 +698,9 @@ function SearchAutocomplete(props: Props) {
...getHistoryOptions(fileOpenHistoryItems, t('core:fileOpenHistory')),
...getHistoryOptions(
folderOpenHistoryItems,
- t('core:folderOpenHistory')
+ t('core:folderOpenHistory'),
),
- ...getHistoryOptions(fileEditHistoryItems, t('core:fileEditHistory'))
+ ...getHistoryOptions(fileEditHistoryItems, t('core:fileEditHistory')),
];
}
} else if (isAction(action, SearchActions.BOOK)) {
@@ -713,7 +711,7 @@ function SearchAutocomplete(props: Props) {
function getOptions(
items: TS.BookmarkItem[],
- group: string
+ group: string,
): SearchOptionType[] {
if (!items) {
return [];
@@ -726,13 +724,13 @@ function SearchAutocomplete(props: Props) {
fullName: item.url,
label: item.path,
group: group,
- filter
+ filter,
}));
}
searchOptions.current = getOptions(
bookmarks,
- t('core:searchBookmarks')
+ t('core:searchBookmarks'),
);
}
} else if (isAction(action, SearchActions.SEARCH_HISTORY)) {
@@ -741,7 +739,7 @@ function SearchAutocomplete(props: Props) {
: [];
searchOptions.current = getHistoryOptions(
searchHistoryItems,
- t('core:searchHistory')
+ t('core:searchHistory'),
);
} else if (isAction(action, SearchActions.SEARCH)) {
if (currentOptions.current !== action) {
@@ -749,7 +747,7 @@ function SearchAutocomplete(props: Props) {
function getOptions(
items: TS.SearchQuery[],
- group: string
+ group: string,
): SearchOptionType[] {
if (!items) {
return [];
@@ -760,13 +758,13 @@ function SearchAutocomplete(props: Props) {
label: item.title,
fullName: JSON.stringify(item),
group: group,
- filter
+ filter,
}));
}
searchOptions.current = getOptions(
searches,
- t('core:savedSearchesTitle')
+ t('core:savedSearchesTitle'),
);
}
} else if (
@@ -792,7 +790,7 @@ function SearchAutocomplete(props: Props) {
color: tag.color,
textcolor: tag.textcolor,
group: tagGroups[j].title,
- filter
+ filter,
});
});
}
@@ -808,7 +806,7 @@ function SearchAutocomplete(props: Props) {
action: ExecActions.TYPE_SEARCH,
label: t('core:' + key),
descr: value.join(', '),
- filter
+ filter,
});
});
searchOptions.current = options;
@@ -837,7 +835,7 @@ function SearchAutocomplete(props: Props) {
action: ExecActions.SIZE_SEARCH,
label: t('core:' + key),
descr: descr,
- filter
+ filter,
});
});
searchOptions.current = options;
@@ -856,7 +854,7 @@ function SearchAutocomplete(props: Props) {
id: key,
action: ExecActions.LAST_MODIFIED_SEARCH,
label: t('core:' + key),
- filter
+ filter,
});
});
searchOptions.current = options;
@@ -872,7 +870,7 @@ function SearchAutocomplete(props: Props) {
id: key,
action: ExecActions.SCOPE_SEARCH,
label: t('core:' + key),
- filter
+ filter,
});
});
searchOptions.current = options;
@@ -890,7 +888,7 @@ function SearchAutocomplete(props: Props) {
id: key,
action: ExecActions.ACCURACY_SEARCH,
label: t('core:' + key),
- filter
+ filter,
});
});
searchOptions.current = options;
@@ -901,7 +899,7 @@ function SearchAutocomplete(props: Props) {
const execActionsArr = Object.values(ExecActions);
if (execActionsArr.includes(action)) {
searchOptions.current = getSearchOptions().filter(
- option => option.group === 'query'
+ (option) => option.group === 'query',
);
optionsChanged = true;
} else {
@@ -919,13 +917,13 @@ function SearchAutocomplete(props: Props) {
options: Array<any>,
previousActions = [],
hasOptionsChanged = false,
- unique = false
+ unique = false,
) {
const actions: Array<SearchOptionType> = [];
function setActionLabel(key: ActionType, option: SearchOptionType): string {
if (actions.length > 0) {
- const action = actions.find(a => a.action === key.fullName); //[actions.length - 1];
+ const action = actions.find((a) => a.action === key.fullName); //[actions.length - 1];
if (isAction(action.action, key)) {
action.label = action.action + option.label;
action.fullName = action.action + option.label;
@@ -944,15 +942,15 @@ function SearchAutocomplete(props: Props) {
option = {
label: options[i],
fullName: action,
- action: action
+ action: action,
};
}
const prevAction = previousActions.find(
- obj =>
+ (obj) =>
obj.action === option.action &&
(unique ||
obj.label === option.label ||
- (obj.fullName && obj.fullName === option.fullName))
+ (obj.fullName && obj.fullName === option.fullName)),
);
if (!prevAction) {
if (isAction(option.action, SearchActions.LOCATION)) {
@@ -1008,14 +1006,14 @@ function SearchAutocomplete(props: Props) {
path: option.label,
url: option.fullName,
lid: option.id,
- creationTimeStamp: 0
+ creationTimeStamp: 0,
};
Pro.history.openItem(
item,
currentLocation && currentLocation.uuid,
openLinkDispatch,
openLocationById,
- openEntry
+ openEntry,
);
}
searchOptions.current = getSearchOptions();
@@ -1028,14 +1026,14 @@ function SearchAutocomplete(props: Props) {
path: option.label,
url: option.fullName,
lid: undefined,
- creationTimeStamp: 0
+ creationTimeStamp: 0,
};
Pro.history.openItem(
item,
currentLocation && currentLocation.uuid,
openLinkDispatch,
openLocationById,
- openEntry
+ openEntry,
);
}
searchOptions.current = getSearchOptions();
@@ -1072,7 +1070,7 @@ function SearchAutocomplete(props: Props) {
let prevAction;
if (unique) {
- prevAction = actions.find(a => a.action === searchAction);
+ prevAction = actions.find((a) => a.action === searchAction);
}
if (!prevAction) {
prevAction = actions[actions.length - 1];
@@ -1084,22 +1082,22 @@ function SearchAutocomplete(props: Props) {
}
const tagsAND = getTags(
actionValues.current,
- SearchQueryComposition.TAG_AND
+ SearchQueryComposition.TAG_AND,
);
const tagsOR = getTags(
actionValues.current,
- SearchQueryComposition.TAG_OR
+ SearchQueryComposition.TAG_OR,
);
const tagsNOT = getTags(
actionValues.current,
- SearchQueryComposition.TAG_NOT
+ SearchQueryComposition.TAG_NOT,
);
setSearchQuery({
...searchQuery,
tagsAND,
tagsOR,
tagsNOT,
- executeSearch: false
+ executeSearch: false,
});
setTextQuery('');
if (hasOptionsChanged) {
@@ -1117,7 +1115,7 @@ function SearchAutocomplete(props: Props) {
setSearchQuery({
...searchQuery,
fileTypes: fileTypes.current,
- executeSearch: false
+ executeSearch: false,
});
}
if (hasOptionsChanged) {
@@ -1136,7 +1134,7 @@ function SearchAutocomplete(props: Props) {
setSearchQuery({
...searchQuery,
fileSize: id,
- executeSearch: false
+ executeSearch: false,
});
}
if (hasOptionsChanged) {
@@ -1153,14 +1151,14 @@ function SearchAutocomplete(props: Props) {
} else if (option.action === ExecActions.LAST_MODIFIED_SEARCH) {
const id = setActionLabel(
SearchQueryComposition.LAST_MODIFIED,
- option
+ option,
);
if (id) {
lastModified.current = id;
setSearchQuery({
...searchQuery,
lastModified: id,
- executeSearch: false
+ executeSearch: false,
});
}
if (hasOptionsChanged) {
@@ -1179,7 +1177,7 @@ function SearchAutocomplete(props: Props) {
setSearchQuery({
...searchQuery,
searchBoxing: scope[id],
- executeSearch: false
+ executeSearch: false,
});
}
if (hasOptionsChanged) {
@@ -1197,7 +1195,7 @@ function SearchAutocomplete(props: Props) {
setSearchQuery({
...searchQuery,
searchType: accuracy[id],
- executeSearch: false
+ executeSearch: false,
});
}
if (hasOptionsChanged) {
@@ -1211,7 +1209,7 @@ function SearchAutocomplete(props: Props) {
const pAction = actions[actions.length - 1];
if (pAction && isAction(pAction.action, SearchActions.FILTER)) {
const filterArr = options.filter(
- o => !(typeof o === 'object') && o.action === undefined
+ (o) => !(typeof o === 'object') && o.action === undefined,
);
if (filterArr.length > 0) {
dispatch(AppActions.setSearchFilter(filterArr.join(' ')));
@@ -1235,10 +1233,10 @@ function SearchAutocomplete(props: Props) {
actionValues.current = execActions(
[...actionValues.current, ...valueArr],
actionValues.current,
- true
+ true,
);
const inputArr = valueArr.filter(
- action => !actionValues.current.some(v => v.label === action)
+ (action) => !actionValues.current.some((v) => v.label === action),
);
setTextQuery(inputArr.join(' '));
//textQuery.current += ' ' + inputValue.current;
@@ -1282,7 +1280,7 @@ function SearchAutocomplete(props: Props) {
if (action) {
actions.push({
label: option,
- action: toExecAction(action)
+ action: toExecAction(action),
});
} else {
actions.push(option);
@@ -1296,7 +1294,7 @@ function SearchAutocomplete(props: Props) {
forceUpdate();
} else if (reason === 'remove-value') {
actionValues.current = actionValues.current.filter(
- v => !(selected.includes(v.label) || selected.includes(v.fullName))
+ (v) => !(selected.includes(v.label) || selected.includes(v.fullName)),
);
resetActions(actionValues.current);
forceUpdate();
@@ -1336,7 +1334,7 @@ function SearchAutocomplete(props: Props) {
} else {
actionValues.current = execActions(actions, [], false);
searchOptions.current = getSearchOptions().filter(
- option => option.group === 'query'
+ (option) => option.group === 'query',
);
currentOptions.current = undefined;
}
@@ -1447,7 +1445,7 @@ function SearchAutocomplete(props: Props) {
width: '100%',
whiteSpace: 'nowrap',
display: 'flex',
- alignItems: 'center'
+ alignItems: 'center',
}}
>
<style>
@@ -1470,8 +1468,8 @@ function SearchAutocomplete(props: Props) {
autoComplete
handleHomeEndKeys
/*defaultValue={['one']}*/
- value={actionValues.current.map(v =>
- v.fullName ? v.fullName : v.label
+ value={actionValues.current.map((v) =>
+ v.fullName ? v.fullName : v.label,
)}
onChange={handleChange}
inputValue={textQuery}
@@ -1480,7 +1478,7 @@ function SearchAutocomplete(props: Props) {
/*onOpen={handleOpen}
onClose={handleClose}*/
filterOptions={(options: Array<SearchOptionType>, state: any) => {
- const filteredOptions = options.filter(option => {
+ const filteredOptions = options.filter((option) => {
if (option.filter === false) {
return true;
}
@@ -1495,10 +1493,10 @@ function SearchAutocomplete(props: Props) {
}
return filteredOptions;
}}
- renderTags={value =>
+ renderTags={(value) =>
value.map((option, index: number) => {
const action = actionValues.current.find(
- a => a.fullName === option || a.label === option
+ (a) => a.fullName === option || a.label === option,
);
return (
<Box
@@ -1517,8 +1515,8 @@ function SearchAutocomplete(props: Props) {
action.color && {
color: action.textcolor,
backgroundColor: action.color,
- border: 'none'
- })
+ border: 'none',
+ }),
}}
>
{isAction(action.action, SearchQueryComposition.TAG_AND) ||
@@ -1528,7 +1526,7 @@ function SearchAutocomplete(props: Props) {
style={{
fontSize: 13,
fontWeight: 'bold',
- display: 'inline'
+ display: 'inline',
}}
>
{option}
@@ -1542,7 +1540,7 @@ function SearchAutocomplete(props: Props) {
size="small"
style={{
backgroundColor: 'transparent',
- padding: 0
+ padding: 0,
}}
endIcon={<ArrowDropDownIcon />}
>
@@ -1553,7 +1551,7 @@ function SearchAutocomplete(props: Props) {
{!isAction(action.action, SearchQueryComposition.SCOPE) &&
!isAction(
action.action,
- SearchQueryComposition.ACCURACY
+ SearchQueryComposition.ACCURACY,
) && (
<IconButton
onClick={() => {
@@ -1575,15 +1573,15 @@ function SearchAutocomplete(props: Props) {
setInputValue(newInputValue);
}}*/
options={searchOptions.current}
- groupBy={option => option.group}
- renderGroup={params => (
+ groupBy={(option) => option.group}
+ renderGroup={(params) => (
<li key={params.key}>
<div
style={{
position: 'sticky',
top: '-8px',
padding: '4px 10px',
- backgroundColor: theme.palette.background.default
+ backgroundColor: theme.palette.background.default,
}}
>
{t(params.group)}
@@ -1608,7 +1606,7 @@ function SearchAutocomplete(props: Props) {
paddingBottom: 0,
paddingRight: 5,
paddingLeft: 5,
- borderRadius: 5
+ borderRadius: 5,
}}
>
{option.label}
@@ -1627,11 +1625,11 @@ function SearchAutocomplete(props: Props) {
sx={{ width: 'calc(100% - 80px)' }}
onKeyDown={onKeyDownHandler}
disableClearable={true}
- renderInput={params => {
+ renderInput={(params) => {
if (params.InputProps.endAdornment) {
params.InputProps.endAdornment = [
params.InputProps.endAdornment,
- endAdornment
+ endAdornment,
];
} else {
params.InputProps.endAdornment = [endAdornment];
@@ -1679,7 +1677,7 @@ function SearchAutocomplete(props: Props) {
style={{
marginRight: 10,
marginLeft: 10,
- marginTop: 3
+ marginTop: 3,
}}
color="primary"
onClick={clickSearchButton}
diff --git a/app/components/SearchBox.tsx b/app/components/SearchBox.tsx
index 56992bab2..e1400cba4 100644
--- a/app/components/SearchBox.tsx
+++ b/app/components/SearchBox.tsx
@@ -30,11 +30,11 @@ interface Props {
function SearchBox(props: Props) {
const { searchQuery } = useDirectoryContentContext();
const [anchorSearch, setAnchorSearch] = useState<HTMLButtonElement | null>(
- null
+ null,
);
const [textQuery, setTextQuery] = useState<string>(
- searchQuery.textQuery || ''
+ searchQuery.textQuery || '',
);
return (
@@ -53,17 +53,17 @@ function SearchBox(props: Props) {
onClose={() => setAnchorSearch(null)}
anchorOrigin={{
vertical: 'bottom',
- horizontal: 'right'
+ horizontal: 'right',
}}
PaperProps={{
style: {
overflow: 'hidden',
- height: 720
- }
+ height: 720,
+ },
}}
transformOrigin={{
vertical: 'top',
- horizontal: 'right'
+ horizontal: 'right',
}}
>
<SearchPopover
diff --git a/app/components/SearchOptions.ts b/app/components/SearchOptions.ts
index faf356c2f..86d53ba3c 100644
--- a/app/components/SearchOptions.ts
+++ b/app/components/SearchOptions.ts
@@ -17,35 +17,35 @@ export type ActionType = { shortName: string; fullName?: string };
export const SearchQueryComposition = {
TAG_AND: {
- shortName: '+'
+ shortName: '+',
},
TAG_NOT: {
- shortName: '-'
+ shortName: '-',
// fullName: '—'
},
TAG_OR: {
- shortName: '|'
+ shortName: '|',
},
TYPE: {
shortName: 't:',
- fullName: 'type:'
+ fullName: 'type:',
},
SIZE: {
shortName: 'si:',
- fullName: 'size:'
+ fullName: 'size:',
},
LAST_MODIFIED: {
shortName: 'lm:',
- fullName: 'modified:'
+ fullName: 'modified:',
},
SCOPE: {
shortName: 'sc:',
- fullName: 'scope:'
+ fullName: 'scope:',
},
ACCURACY: {
shortName: 'a:',
- fullName: 'accuracy:'
- }
+ fullName: 'accuracy:',
+ },
};
/*export const searchMode = {
@@ -57,28 +57,28 @@ export const SearchQueryComposition = {
export const SearchActions = {
LOCATION: {
shortName: 'l:',
- fullName: 'locations'
+ fullName: 'locations',
},
FILTER: {
shortName: 'f:',
- fullName: 'filter'
+ fullName: 'filter',
},
HISTORY: {
shortName: 'h:',
- fullName: 'history'
+ fullName: 'history',
},
BOOK: {
shortName: 'b:',
- fullName: 'bookmarks'
+ fullName: 'bookmarks',
},
SEARCH: {
shortName: 'q:',
- fullName: 'search-queries'
+ fullName: 'search-queries',
},
SEARCH_HISTORY: {
shortName: 's:',
- fullName: 'search-history'
- }
+ fullName: 'search-history',
+ },
};
/*export const SearchCommandFullNames = {
@@ -106,7 +106,7 @@ export const ExecActions = {
SIZE_SEARCH: 'size_search',
LAST_MODIFIED_SEARCH: 'last_modified_search',
SCOPE_SEARCH: 'scope_search',
- ACCURACY_SEARCH: 'accuracy_search'
+ ACCURACY_SEARCH: 'accuracy_search',
};
export const FileSize = {
@@ -116,7 +116,7 @@ export const FileSize = {
sizeSmall: 1000000, // 1MB
sizeMedium: 50000000, // 50 mB
sizeLarge: 1000000000, // 1GB
- sizeHuge: 1000000001 // over 1GB
+ sizeHuge: 1000000001, // over 1GB
};
export const LastModified = {
@@ -126,18 +126,18 @@ export const LastModified = {
past30Days: 2592000000, // 30 days
past6Months: 15778476000, // 6 months
pastYear: 31556952000, // 1 year
- moreThanYear: 31556952001 // over 1 year
+ moreThanYear: 31556952001, // over 1 year
};
export const scope = {
location: 'location',
folder: 'folder',
- global: 'global'
+ global: 'global',
};
export const accuracy = {
fuzzy: 'fuzzy',
semistrict: 'semistrict',
- strict: 'strict'
+ strict: 'strict',
};
export type ScopeType = 'location' | 'folder' | 'global';
@@ -164,12 +164,12 @@ export function isAction(action: string, actionType: ActionType): boolean {
export function findAction(option: string, equal = false): string {
const actions: Array<ActionType> = [
...Object.values(SearchQueryComposition),
- ...Object.values(SearchActions)
+ ...Object.values(SearchActions),
];
- let action = actions.find(a =>
+ let action = actions.find((a) =>
equal
? option === a.shortName || option === a.fullName
- : option.startsWith(a.shortName) || option.startsWith(a.fullName)
+ : option.startsWith(a.shortName) || option.startsWith(a.fullName),
);
if (action) {
return action.fullName ? action.fullName : action.shortName;
diff --git a/app/components/SearchOptionsMenu.ts b/app/components/SearchOptionsMenu.ts
index 893ef5e03..3a87093e1 100644
--- a/app/components/SearchOptionsMenu.ts
+++ b/app/components/SearchOptionsMenu.ts
@@ -2,7 +2,7 @@ import { Pro } from '-/pro';
import {
SearchActions,
SearchOptionType,
- SearchQueryComposition
+ SearchQueryComposition,
} from '-/components/SearchOptions';
export function getSearchOptions(): Array<SearchOptionType> {
@@ -14,7 +14,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
fullName: SearchActions.LOCATION.fullName,
action: SearchActions.LOCATION.shortName,
descr: 'find and open a location',
- group: 'actions'
+ group: 'actions',
});
options.push({
id: SearchActions.FILTER.shortName,
@@ -22,7 +22,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
fullName: SearchActions.FILTER.fullName,
action: SearchActions.FILTER.shortName,
descr: 'filter the entries from the current folder',
- group: 'actions'
+ group: 'actions',
});
if (Pro) {
options.push({
@@ -31,7 +31,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
fullName: SearchActions.HISTORY.fullName,
action: SearchActions.HISTORY.shortName,
descr: 'find recently used files and folders',
- group: 'actions'
+ group: 'actions',
});
}
if (Pro) {
@@ -41,7 +41,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
fullName: SearchActions.BOOK.fullName,
action: SearchActions.BOOK.shortName,
descr: 'find bookmarks',
- group: 'actions'
+ group: 'actions',
});
}
@@ -52,7 +52,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
fullName: SearchActions.SEARCH.fullName,
action: SearchActions.SEARCH.shortName,
descr: 'find and execute saved search queries',
- group: 'actions'
+ group: 'actions',
});
}
if (Pro) {
@@ -62,7 +62,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
fullName: SearchActions.SEARCH_HISTORY.fullName,
action: SearchActions.SEARCH_HISTORY.shortName,
descr: 'Execute search queries from history',
- group: 'actions'
+ group: 'actions',
});
}
options.push({
@@ -71,7 +71,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
action: SearchQueryComposition.TAG_AND.shortName,
descr:
'entries should have this tag to be included in the results (logical AND)',
- group: 'query'
+ group: 'query',
});
options.push({
id: SearchQueryComposition.TAG_NOT.shortName,
@@ -79,7 +79,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
action: SearchQueryComposition.TAG_NOT.shortName,
descr:
'entries should not have this tag to be included in the results (logical NOT)',
- group: 'query'
+ group: 'query',
});
options.push({
id: SearchQueryComposition.TAG_OR.shortName,
@@ -87,7 +87,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
action: SearchQueryComposition.TAG_OR.shortName,
descr:
'allows searching for entries having one tag or another (logical OR)',
- group: 'query'
+ group: 'query',
});
if (Pro) {
options.push({
@@ -96,7 +96,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
fullName: SearchQueryComposition.TYPE.fullName,
action: SearchQueryComposition.TYPE.shortName,
descr: 'filter by file type: document, video, files, folders',
- group: 'query'
+ group: 'query',
});
}
@@ -107,7 +107,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
fullName: SearchQueryComposition.SIZE.fullName,
action: SearchQueryComposition.SIZE.shortName,
descr: 'list sizes from advanced search',
- group: 'query'
+ group: 'query',
});
}
@@ -118,7 +118,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
fullName: SearchQueryComposition.LAST_MODIFIED.fullName,
action: SearchQueryComposition.LAST_MODIFIED.shortName,
descr: 'list last modified options from advanced search',
- group: 'query'
+ group: 'query',
});
}
@@ -128,7 +128,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
fullName: SearchQueryComposition.SCOPE.fullName,
action: SearchQueryComposition.SCOPE.shortName,
descr: 'scope of the search: location, folder, global',
- group: 'query'
+ group: 'query',
});
options.push({
id: SearchQueryComposition.ACCURACY.shortName,
@@ -136,7 +136,7 @@ export function getSearchOptions(): Array<SearchOptionType> {
fullName: SearchQueryComposition.ACCURACY.fullName,
action: SearchQueryComposition.ACCURACY.shortName,
descr: 'accuracy: fuzzy, semi strict, strict',
- group: 'query'
+ group: 'query',
});
return options;
}
diff --git a/app/components/SearchPopover.tsx b/app/components/SearchPopover.tsx
index b549bb566..33238f827 100644
--- a/app/components/SearchPopover.tsx
+++ b/app/components/SearchPopover.tsx
@@ -40,7 +40,7 @@ import { mergeWithExtractedTags } from '@tagspaces/tagspaces-common/misc';
import TagsSelect from './TagsSelect';
import {
getMaxSearchResults,
- getShowUnixHiddenEntries
+ getShowUnixHiddenEntries,
} from '-/reducers/settings';
import { FileTypeGroups, haveSearchFilters } from '-/services/search';
import { Pro } from '../pro';
@@ -65,7 +65,7 @@ import {
AudioIcon,
VideoIcon,
ArchiveIcon,
- CloseIcon
+ CloseIcon,
} from '-/components/CommonIcons';
import { openURLExternally } from '-/services/utils-io';
import { useTheme } from '@mui/material/styles';
@@ -92,17 +92,17 @@ function SearchPopover(props: Props) {
currentDirectoryPath,
searchQuery,
setSearchQuery,
- exitSearchMode
+ exitSearchMode,
} = useDirectoryContentContext();
const { getIndex, isIndexing } = useLocationIndexContext();
- const [, forceUpdate] = useReducer(x => x + 1, 0);
+ const [, forceUpdate] = useReducer((x) => x + 1, 0);
const maxSearchResults = useSelector(getMaxSearchResults);
const searches = useSelector(getSearches);
const showUnixHiddenEntries = useSelector(getShowUnixHiddenEntries);
// const textQuery = useRef<string>(searchQuery.textQuery);
// const tagsAND = useRef<Array<TS.Tag>>(searchQuery.tagsAND);
const fileTypes = useRef<Array<string>>(
- searchQuery.fileTypes ? searchQuery.fileTypes : FileTypeGroups.any
+ searchQuery.fileTypes ? searchQuery.fileTypes : FileTypeGroups.any,
);
const searchBoxing = searchQuery.searchBoxing
@@ -111,11 +111,10 @@ function SearchPopover(props: Props) {
// useRef<'fuzzy' | 'semistrict' | 'strict'>(
const searchType = searchQuery.searchType ? searchQuery.searchType : 'fuzzy';
const lastModified = useRef<string>(
- searchQuery.lastModified ? searchQuery.lastModified : ''
+ searchQuery.lastModified ? searchQuery.lastModified : '',
);
- const [saveSearchDialogOpened, setSaveSearchDialogOpened] = useState<
- TS.SearchQuery
- >(undefined);
+ const [saveSearchDialogOpened, setSaveSearchDialogOpened] =
+ useState<TS.SearchQuery>(undefined);
// const tagTimePeriod = useRef<string>('');
// const tagTimePeriodHelper = useRef<string>(' ');
const [tagPlace, setTagPlace] = useState<string>(' ');
@@ -130,10 +129,10 @@ function SearchPopover(props: Props) {
const [tagPlaceLong, setTagPlaceLong] = useState<number | null>(null);
// const [tagPlaceRadius, setTagPlaceRadius] = useState<number>(0);
const forceIndexing = useRef<boolean>(
- searchQuery.forceIndexing ? searchQuery.forceIndexing : false
+ searchQuery.forceIndexing ? searchQuery.forceIndexing : false,
);
const fileSize = useRef<string>(
- searchQuery.fileSize ? searchQuery.fileSize : ''
+ searchQuery.fileSize ? searchQuery.fileSize : '',
);
/*useEffect(() => {
@@ -152,7 +151,7 @@ function SearchPopover(props: Props) {
searchBoxing: searchBoxing,
fileTypes: types,
showUnixHiddenEntries,
- executeSearch: false
+ executeSearch: false,
});
}
};
@@ -169,13 +168,13 @@ function SearchPopover(props: Props) {
searchBoxing: searchBoxing,
fileSize: value,
showUnixHiddenEntries,
- executeSearch: false
+ executeSearch: false,
});
}
};
const handleLastModifiedChange = (
- event: React.ChangeEvent<HTMLInputElement>
+ event: React.ChangeEvent<HTMLInputElement>,
) => {
const { target } = event;
const { value, name } = target;
@@ -187,18 +186,18 @@ function SearchPopover(props: Props) {
searchBoxing: searchBoxing,
lastModified: value,
showUnixHiddenEntries,
- executeSearch: false
+ executeSearch: false,
});
}
};
const handleSavedSearchChange = (
- event: React.ChangeEvent<HTMLInputElement>
+ event: React.ChangeEvent<HTMLInputElement>,
) => {
const { target } = event;
const { value } = target;
- const savedSearch = searches.find(search => search.uuid === value);
+ const savedSearch = searches.find((search) => search.uuid === value);
if (!savedSearch) {
return true;
}
@@ -230,14 +229,14 @@ function SearchPopover(props: Props) {
...savedSearch,
tagTimePeriodFrom: savedSearch.tagTimePeriodFrom,
tagTimePeriodTo: savedSearch.tagTimePeriodTo,
- showUnixHiddenEntries
+ showUnixHiddenEntries,
});
};
function removeTags(tagsArray, removeTagsArray) {
// eslint-disable-next-line react/no-access-state-in-setstate
- return tagsArray.filter(tag =>
- removeTagsArray.some(valueTag => valueTag.title !== tag.title)
+ return tagsArray.filter((tag) =>
+ removeTagsArray.some((valueTag) => valueTag.title !== tag.title),
);
}
@@ -247,17 +246,17 @@ function SearchPopover(props: Props) {
if (name === 'tagsAND') {
searchQuery = {
...searchQuery,
- tagsAND: removeTags(searchQuery.tagsAND, value)
+ tagsAND: removeTags(searchQuery.tagsAND, value),
};
} else if (name === 'tagsNOT') {
searchQuery = {
...searchQuery,
- tagsNOT: removeTags(searchQuery.tagsNOT, value)
+ tagsNOT: removeTags(searchQuery.tagsNOT, value),
};
} else if (name === 'tagsOR') {
searchQuery = {
...searchQuery,
- tagsOR: removeTags(searchQuery.tagsOR, value)
+ tagsOR: removeTags(searchQuery.tagsOR, value),
};
}
} else {
@@ -277,12 +276,12 @@ function SearchPopover(props: Props) {
...searchQuery,
searchBoxing: searchBoxing,
showUnixHiddenEntries,
- executeSearch: false
+ executeSearch: false,
});
}
};
- const handleSearchTermChange = event => {
+ const handleSearchTermChange = (event) => {
const { target } = event;
const { value } = target;
props.setTextQuery(value);
@@ -311,7 +310,7 @@ function SearchPopover(props: Props) {
forceUpdate();
};*/
- const handlePlaceChange = event => {
+ const handlePlaceChange = (event) => {
const { target } = event;
const { value } = target;
let lat = null;
@@ -340,7 +339,7 @@ function SearchPopover(props: Props) {
setTagPlaceHelper(tagPHelper);
};
- const startSearch = event => {
+ const startSearch = (event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
if (props.hideDrawer) {
props.hideDrawer();
@@ -376,17 +375,17 @@ function SearchPopover(props: Props) {
const tagsAND = mergeWithExtractedTags(
props.textQuery,
searchQuery.tagsAND,
- '+'
+ '+',
);
const tagsOR = mergeWithExtractedTags(
props.textQuery,
searchQuery.tagsOR,
- '|'
+ '|',
);
const tagsNOT = mergeWithExtractedTags(
props.textQuery,
searchQuery.tagsNOT,
- '-'
+ '-',
);
setSaveSearchDialogOpened({
uuid: isNew ? undefined : searchQuery.uuid,
@@ -407,19 +406,19 @@ function SearchPopover(props: Props) {
// tagPlaceRadius,
maxSearchResults: maxSearchResults,
currentDirectory: currentDirectoryPath,
- forceIndexing: forceIndexing.current
+ forceIndexing: forceIndexing.current,
});
};
const switchSearchBoxing = (
event: React.MouseEvent<HTMLElement>,
- boxing: 'location' | 'folder' | 'global'
+ boxing: 'location' | 'folder' | 'global',
) => {
if (boxing !== null) {
setSearchQuery({
...searchQuery,
searchBoxing: boxing,
- executeSearch: false
+ executeSearch: false,
});
/*searchBoxing.current = boxing;
@@ -429,13 +428,13 @@ function SearchPopover(props: Props) {
const switchSearchType = (
event: React.MouseEvent<HTMLElement>,
- type: 'fuzzy' | 'semistrict' | 'strict'
+ type: 'fuzzy' | 'semistrict' | 'strict',
) => {
if (type !== null) {
setSearchQuery({
...searchQuery,
searchType: type,
- executeSearch: false
+ executeSearch: false,
});
/*searchType.current = type;
@@ -447,17 +446,17 @@ function SearchPopover(props: Props) {
const tagsAND = mergeWithExtractedTags(
props.textQuery,
searchQuery.tagsAND,
- '+'
+ '+',
);
const tagsOR = mergeWithExtractedTags(
props.textQuery,
searchQuery.tagsOR,
- '|'
+ '|',
);
const tagsNOT = mergeWithExtractedTags(
props.textQuery,
searchQuery.tagsNOT,
- '-'
+ '-',
);
const query: TS.SearchQuery = {
textQuery: props.textQuery,
@@ -478,7 +477,7 @@ function SearchPopover(props: Props) {
currentDirectory: currentDirectoryPath,
forceIndexing: forceIndexing.current,
showUnixHiddenEntries,
- executeSearch: true
+ executeSearch: true,
};
console.log('Search object: ' + JSON.stringify(searchQuery));
setSearchQuery(query);
@@ -490,7 +489,7 @@ function SearchPopover(props: Props) {
<SidePanel
style={{
maxWidth: 400,
- height: '100%'
+ height: '100%',
}}
>
<div className={classes.toolbar}>
@@ -523,7 +522,7 @@ function SearchPopover(props: Props) {
maxHeight: 'calc(100% - 90px)',
overflowX: 'hidden',
overflowY: 'auto',
- scrollbarGutter: 'stable'
+ scrollbarGutter: 'stable',
}}
data-tid="searchAdvancedTID"
>
@@ -560,7 +559,7 @@ function SearchPopover(props: Props) {
{searches.length < 1 && (
<MenuItem>{t('noSavedSearches')}</MenuItem>
)}
- {searches.map(search => (
+ {searches.map((search) => (
<MenuItem key={search.uuid} value={search.uuid}>
<span style={{ width: '100%' }}>{search.title}</span>
</MenuItem>
@@ -573,7 +572,7 @@ function SearchPopover(props: Props) {
<ButtonGroup
style={{
textAlign: 'center',
- width: '100%'
+ width: '100%',
}}
>
{searchQuery.uuid && (
@@ -947,11 +946,11 @@ function SearchPopover(props: Props) {
setSearchQuery({
...searchQuery,
tagTimePeriodFrom: fromDataTime.getTime(),
- executeSearch: false
+ executeSearch: false,
});
}
}}
- renderInput={params => <TextField {...params} />}
+ renderInput={(params) => <TextField {...params} />}
/>
<DatePicker
label={t('enterTagTimePeriodTo')}
@@ -963,11 +962,11 @@ function SearchPopover(props: Props) {
setSearchQuery({
...searchQuery,
tagTimePeriodTo: toDataTime.getTime(),
- executeSearch: false
+ executeSearch: false,
});
}
}}
- renderInput={params => (
+ renderInput={(params) => (
<TextField style={{ marginLeft: 5 }} {...params} />
)}
/>
@@ -1025,7 +1024,7 @@ function SearchPopover(props: Props) {
style={{
display: 'flex',
justifyContent: 'space-between',
- padding: 5
+ padding: 5,
}}
>
<Button
@@ -1066,7 +1065,7 @@ function SearchPopover(props: Props) {
if (searchQuery) {
setSearchQuery({
...searchQuery,
- showUnixHiddenEntries
+ showUnixHiddenEntries,
});
}
}}
diff --git a/app/components/SidePanels.css.tsx b/app/components/SidePanels.css.tsx
index 76cfdcb06..301e44a12 100644
--- a/app/components/SidePanels.css.tsx
+++ b/app/components/SidePanels.css.tsx
@@ -30,7 +30,7 @@ export const classes = {
toolbar: `${PREFIX}-toolbar`,
formControl: `${PREFIX}-formControl`,
mainActionButton: `${PREFIX}-mainActionButton`,
- leftIcon: `${PREFIX}-leftIcon`
+ leftIcon: `${PREFIX}-leftIcon`,
};
export const SidePanel = styled('div')(({ theme }) => ({
@@ -38,18 +38,18 @@ export const SidePanel = styled('div')(({ theme }) => ({
paddingLeft: 5,
paddingRight: 0,
[`& .${classes.fontIcon}`]: {
- color: theme.palette.text.primary
+ color: theme.palette.text.primary,
},
[`& .${classes.header}`]: {
- color: theme.palette.text.primary
+ color: theme.palette.text.primary,
},
[`& .${classes.icon}`]: {
- margin: theme.spacing(1)
+ margin: theme.spacing(1),
},
[`& .${classes.locationListArea}`]: {
paddingTop: 0,
marginTop: 0,
- overflowY: 'auto'
+ overflowY: 'auto',
},
[`& .${classes.listItem}`]: {
paddingLeft: 0,
@@ -57,7 +57,7 @@ export const SidePanel = styled('div')(({ theme }) => ({
paddingBottom: 2,
paddingRight: 0,
borderRadius: 5,
- backgroundColor: 'transparent'
+ backgroundColor: 'transparent',
},
[`& .${classes.listItemSelected}`]: {
paddingLeft: 0,
@@ -65,27 +65,27 @@ export const SidePanel = styled('div')(({ theme }) => ({
paddingTop: 2,
paddingBottom: 2,
borderRadius: 5,
- backgroundColor: theme.palette.primary.light
+ backgroundColor: theme.palette.primary.light,
},
[`& .${classes.panelTitle}`]: {
textTransform: 'uppercase',
flex: 1,
paddingLeft: 7,
- paddingTop: 12
+ paddingTop: 12,
},
[`& .${classes.toolbar}`]: {
- display: 'flex'
+ display: 'flex',
},
[`& .${classes.formControl}`]: {
width: '100%',
- marginBottom: 10
+ marginBottom: 10,
},
[`& .${classes.mainActionButton}`]: {
marginTop: 10,
marginLeft: 0,
- paddingLeft: 8
+ paddingLeft: 8,
},
[`& .${classes.leftIcon}`]: {
- marginRight: theme.spacing(1)
- }
+ marginRight: theme.spacing(1),
+ },
}));
diff --git a/app/components/SplitButton.tsx b/app/components/SplitButton.tsx
index 1847d85f6..c1d8746b0 100644
--- a/app/components/SplitButton.tsx
+++ b/app/components/SplitButton.tsx
@@ -25,7 +25,7 @@ export default function SplitButton(props: Props) {
const { options, selected, onChange } = props;
const [open, setOpen] = React.useState(false);
const anchorRef = React.useRef<HTMLDivElement>(null);
- const sel = options.findIndex(option => option.key === selected);
+ const sel = options.findIndex((option) => option.key === selected);
const [selectedIndex, setSelectedIndex] = React.useState(sel);
const handleClick = () => {
@@ -34,7 +34,7 @@ export default function SplitButton(props: Props) {
const handleMenuItemClick = (
event: React.MouseEvent<HTMLLIElement, MouseEvent>,
- index: number
+ index: number,
) => {
setSelectedIndex(index);
onChange(options[index].key);
@@ -42,7 +42,7 @@ export default function SplitButton(props: Props) {
};
const handleToggle = () => {
- setOpen(prevOpen => !prevOpen);
+ setOpen((prevOpen) => !prevOpen);
};
const handleClose = (event: React.MouseEvent<Document, MouseEvent>) => {
@@ -90,7 +90,7 @@ export default function SplitButton(props: Props) {
{...TransitionProps}
style={{
transformOrigin:
- placement === 'bottom' ? 'center top' : 'center bottom'
+ placement === 'bottom' ? 'center top' : 'center bottom',
}}
>
<Paper>
@@ -101,7 +101,7 @@ export default function SplitButton(props: Props) {
key={option.key}
disabled={index === 2}
selected={index === selectedIndex}
- onClick={event => handleMenuItemClick(event, index)}
+ onClick={(event) => handleMenuItemClick(event, index)}
>
{option.value}
</MenuItem>
diff --git a/app/components/StoredSearches.tsx b/app/components/StoredSearches.tsx
index b7c544e49..77d8fe55f 100644
--- a/app/components/StoredSearches.tsx
+++ b/app/components/StoredSearches.tsx
@@ -37,7 +37,7 @@ import {
getFolderOpenHistory,
getShowBookmarks,
getShowUnixHiddenEntries,
- getStoredSearchesVisible
+ getStoredSearchesVisible,
} from '-/reducers/settings';
import { Pro } from '../pro';
import { actions as SearchActions, getSearches } from '-/reducers/searches';
@@ -75,32 +75,23 @@ const historyKeys = Pro && Pro.history ? Pro.history.historyKeys : {};
function StoredSearches(props: Props) {
const { t } = useTranslation();
const { setSearchQuery, findFromSavedSearch } = useDirectoryContentContext();
- const [saveSearchDialogOpened, setSaveSearchDialogOpened] = useState<
- TS.SearchQuery
- >(undefined);
- const [
- searchMenuAnchorEl,
- setSearchMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [
- historyMenuAnchorEl,
- setHistoryMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
+ const [saveSearchDialogOpened, setSaveSearchDialogOpened] =
+ useState<TS.SearchQuery>(undefined);
+ const [searchMenuAnchorEl, setSearchMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [historyMenuAnchorEl, setHistoryMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
- const [
- bookmarksMenuAnchorEl,
- setBookmarksMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
+ const [bookmarksMenuAnchorEl, setBookmarksMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
- const [
- isExportSearchesDialogOpened,
- setExportSearchesDialogOpened
- ] = useState<boolean>(false);
+ const [isExportSearchesDialogOpened, setExportSearchesDialogOpened] =
+ useState<boolean>(false);
const [importFile, setImportFile] = useState<File>(undefined);
const fileInputRef = useRef<HTMLInputElement>(null);
const menuHistoryKey = useRef<string>(undefined);
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
const ExportSearchesDialog =
Pro && Pro.UI ? Pro.UI.ExportSearchesDialog : false;
@@ -116,7 +107,7 @@ function StoredSearches(props: Props) {
};
const editSearch = (uuid: string) => {
- const savedSearch = props.searches.find(search => search.uuid === uuid);
+ const savedSearch = props.searches.find((search) => search.uuid === uuid);
if (!savedSearch) {
return true;
}
@@ -166,7 +157,7 @@ function StoredSearches(props: Props) {
flexDirection: 'column',
borderRadius: 5,
marginLeft: 5,
- marginRight: 0
+ marginRight: 0,
}}
>
<div className={classes.toolbar}>
@@ -184,7 +175,7 @@ function StoredSearches(props: Props) {
marginTop: 0,
height: 'calc(100% - ' + reduceHeightBy + 'px)',
overflowY: 'auto',
- overflowX: 'hidden'
+ overflowX: 'hidden',
}}
>
<Grid container direction="row">
@@ -249,7 +240,7 @@ function StoredSearches(props: Props) {
)}
</Grid>
{props.storedSearchesVisible &&
- props.searches.map(search => (
+ props.searches.map((search) => (
<ListItem dense style={{ paddingLeft: 0 }} key={search.uuid}>
<Grid item xs={10} style={{ width: 250 }}>
<Button
@@ -260,7 +251,7 @@ function StoredSearches(props: Props) {
style={{
textTransform: 'none',
fontWeight: 'normal',
- justifyContent: 'start'
+ justifyContent: 'start',
}}
onClick={() => findFromSavedSearch(search.uuid)}
>
@@ -271,7 +262,7 @@ function StoredSearches(props: Props) {
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
overflow: 'hidden',
- maxWidth: 220
+ maxWidth: 220,
}}
>
{search.title}
@@ -515,7 +506,7 @@ function StoredSearches(props: Props) {
if (searchQuery) {
setSearchQuery({
...searchQuery,
- showUnixHiddenEntries: props.showUnixHiddenEntries
+ showUnixHiddenEntries: props.showUnixHiddenEntries,
});
/* if (searchQuery.searchBoxing === 'global') {
@@ -571,7 +562,7 @@ function mapStateToProps(state) {
showBookmarks: getShowBookmarks(state),
fileOpenHistory: getFileOpenHistory(state),
folderOpenHistory: getFolderOpenHistory(state),
- fileEditHistory: getFileEditHistory(state)
+ fileEditHistory: getFileEditHistory(state),
};
}
@@ -583,9 +574,9 @@ function mapDispatchToProps(dispatch) {
setShowBookmarks: SettingsActions.setShowBookmarks,
setFileOpenHistory: SettingsActions.setFileOpenHistory,
setFolderOpenHistory: SettingsActions.setFolderOpenHistory,
- setFileEditHistory: SettingsActions.setFileEditHistory
+ setFileEditHistory: SettingsActions.setFileEditHistory,
},
- dispatch
+ dispatch,
);
}
@@ -603,5 +594,5 @@ const areEqual = (prevProp, nextProp) =>
export default connect(
mapStateToProps,
- mapDispatchToProps
+ mapDispatchToProps,
)(React.memo(StoredSearches, areEqual));
diff --git a/app/components/TagContainer.tsx b/app/components/TagContainer.tsx
index 22b1e7bd5..18294d347 100644
--- a/app/components/TagContainer.tsx
+++ b/app/components/TagContainer.tsx
@@ -38,7 +38,7 @@ interface Props {
event: Object,
tag: TS.Tag,
tagGroup: TS.TagGroup | string,
- haveSelectedEntries: boolean
+ haveSelectedEntries: boolean,
) => void; // TODO refactor
handleRemoveTag?: (event: Object, tags: Array<TS.Tag>) => void;
isDragging?: boolean;
@@ -49,7 +49,7 @@ interface Props {
moveTag?: (
tagTitle: string,
fromTagGroupId: TS.Uuid,
- toTagGroupId: TS.Uuid
+ toTagGroupId: TS.Uuid,
) => void;
reorderTags?: boolean;
}
@@ -64,7 +64,7 @@ function TagContainer(props: Props) {
handleRemoveTag,
handleTagMenu,
addTags,
- tagMode
+ tagMode,
} = props;
let { title } = tag;
@@ -76,13 +76,13 @@ function TagContainer(props: Props) {
let isGeoSmartTag = false;
let textColor: string;
let backgroundColor: string;
- const isTagGeo = useMemo(() => !tagGroup && isGeoTag(title), [
- title,
- tagGroup
- ]);
+ const isTagGeo = useMemo(
+ () => !tagGroup && isGeoTag(title),
+ [title, tagGroup],
+ );
const isTagDate = useMemo(
() => !isTagGeo && !tagGroup && isDateTimeTag(title),
- [isTagGeo, title, tagGroup]
+ [isTagGeo, title, tagGroup],
);
if (tag.color && tag.textcolor) {
textColor = tag.textcolor;
@@ -91,7 +91,7 @@ function TagContainer(props: Props) {
const tagColors = getTagColors(
title,
defaultTextColor,
- defaultBackgroundColor
+ defaultBackgroundColor,
);
textColor = tagColors.textcolor;
backgroundColor = tagColors.color;
@@ -143,10 +143,10 @@ function TagContainer(props: Props) {
role="presentation"
data-tid={tid}
key={tag.id || (tagGroup ? tagGroup.uuid : '') + tid} // don't set unique uuidv1() here - menu anchorEl needs to be the same for the same TagContainer key (or TagMenu will be displayed in top left corner)
- onClick={event => {
+ onClick={(event) => {
if (event.ctrlKey && addTags) {
const selectedEntryPaths = [];
- selectedEntries.map(entry => selectedEntryPaths.push(entry.path));
+ selectedEntries.map((entry) => selectedEntryPaths.push(entry.path));
addTags(selectedEntryPaths, [tag]);
// Removing tags doesn't seem to work correctly here, yet. Using sidecar tagging, but the removeTagsFromEntry function in tagging.actions.js
// doesn't recignize it correctly, thinking it's a plain tag and thus tries to rename the files
@@ -159,33 +159,33 @@ function TagContainer(props: Props) {
event,
tag,
entryPath || tagGroup,
- selectedEntries && selectedEntries.length > 0
+ selectedEntries && selectedEntries.length > 0,
);
}
}}
- onContextMenu={event => {
+ onContextMenu={(event) => {
if (handleTagMenu) {
handleTagMenu(
event,
tag,
entryPath || tagGroup,
- selectedEntries && selectedEntries.length > 0
+ selectedEntries && selectedEntries.length > 0,
);
}
}}
- onDoubleClick={event => {
+ onDoubleClick={(event) => {
if (handleTagMenu) {
handleTagMenu(
event,
tag,
entryPath || tagGroup,
- selectedEntries && selectedEntries.length > 0
+ selectedEntries && selectedEntries.length > 0,
);
}
}}
style={{
backgroundColor: 'transparent',
- display: 'inline-block'
+ display: 'inline-block',
}}
>
<Tooltip title={tagTitle}>
@@ -204,7 +204,7 @@ function TagContainer(props: Props) {
paddingBottom: 0,
paddingRight: 0,
paddingLeft: 5,
- borderRadius: 5
+ borderRadius: 5,
}}
>
<span style={{ flexGrow: 1 }}>
@@ -215,7 +215,7 @@ function TagContainer(props: Props) {
height: 20,
marginBottom: -5,
marginLeft: -5,
- marginRight: 0
+ marginRight: 0,
}}
/>
)}
@@ -226,7 +226,7 @@ function TagContainer(props: Props) {
height: 20,
marginBottom: -5,
marginLeft: -5,
- marginRight: 0
+ marginRight: 0,
}}
/>
)}
diff --git a/app/components/TagContainerDnd.tsx b/app/components/TagContainerDnd.tsx
index e6f6070cb..e5156cc48 100644
--- a/app/components/TagContainerDnd.tsx
+++ b/app/components/TagContainerDnd.tsx
@@ -22,7 +22,7 @@ import {
DropTarget,
ConnectDragPreview,
ConnectDragSource,
- ConnectDropTarget
+ ConnectDropTarget,
} from 'react-dnd';
import { getEmptyImage } from 'react-dnd-html5-backend';
@@ -41,7 +41,7 @@ const boxSource = {
index: props.index,
// tagTitle: props.tag.title,
tag: props.tag,
- ...(props.tagGroup ? { sourceTagGroupId: props.tagGroup.uuid } : {})
+ ...(props.tagGroup ? { sourceTagGroupId: props.tagGroup.uuid } : {}),
};
},
@@ -61,7 +61,7 @@ const boxSource = {
props.moveTag(
item.tag.title,
item.sourceTagGroupId,
- dropResult.tagGroupId
+ dropResult.tagGroupId,
);
} else if (props.addTag) {
// add from file DnD to tagGroup
@@ -70,16 +70,20 @@ const boxSource = {
} else if (dropResult && dropResult.entryPath && props.addTags) {
// console.log(`Dropped item: ${item.tag.title} onto file: ${dropResult.entryPath}!`);
if (
- props.selectedEntries.some(entry => entry.path === dropResult.entryPath)
+ props.selectedEntries.some(
+ (entry) => entry.path === dropResult.entryPath,
+ )
) {
const selectedEntryPaths = [];
- props.selectedEntries.map(entry => selectedEntryPaths.push(entry.path));
+ props.selectedEntries.map((entry) =>
+ selectedEntryPaths.push(entry.path),
+ );
props.addTags(selectedEntryPaths, [item.tag]);
} else {
props.addTags([dropResult.entryPath], [item.tag]);
}
}
- }
+ },
};
const boxTarget = {
@@ -163,7 +167,7 @@ const boxTarget = {
const extractedTags = extractTags(
props.entryPath,
AppConfig.tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
if (
extractedTags.length > 0 &&
@@ -180,7 +184,7 @@ const boxTarget = {
dragItem.index = hoverIndex;
}
- }
+ },
};
interface Props {
@@ -191,7 +195,7 @@ interface Props {
event: Object,
tag: TS.Tag,
param: any,
- haveSelectedEntries: boolean
+ haveSelectedEntries: boolean,
) => void;
handleRemoveTag?: (event: Object, tag: TS.Tag) => void;
isDragging?: boolean;
@@ -202,12 +206,12 @@ interface Props {
moveTag?: (
tagTitle: string,
fromTagGroupId: TS.Uuid,
- toTagGroupId: TS.Uuid
+ toTagGroupId: TS.Uuid,
) => void;
changeTagOrder?: (
tagGroupUuid: TS.Uuid,
fromIndex: number,
- toIndex: number
+ toIndex: number,
) => void;
editTagForEntry?: (path: string, tag: TS.Tag) => void;
connectDragSource?: ConnectDragSource;
@@ -233,7 +237,7 @@ const TagContainerDnd = (props: Props) => {
tagMode,
tagContainerRef,
reorderTags,
- connectDragPreview
+ connectDragPreview,
} = props;
/* const [{ opacity }, dragRef] = useDrag(
@@ -252,7 +256,7 @@ const TagContainerDnd = (props: Props) => {
connectDragPreview(getEmptyImage(), {
// IE fallback: specify that we'd rather screenshot the node
// when it already knows it's being dragged so we can hide it with CSS.
- captureDraggingState: true
+ captureDraggingState: true,
});
return connectDropTarget(
@@ -269,8 +273,8 @@ const TagContainerDnd = (props: Props) => {
isDragging={isDragging}
reorderTags={reorderTags}
/>
- </span>
- )
+ </span>,
+ ),
);
};
@@ -284,17 +288,17 @@ const collectSource = (connect, monitor) => ({
// You can ask the monitor about the current drag preview
connectDragPreview: connect.dragPreview(),
// You can ask the monitor about the current drag state:
- isDragging: monitor.isDragging()
+ isDragging: monitor.isDragging(),
});
const collectTarget = (connect, monitor) => ({
connectDropTarget: connect.dropTarget(),
isOver: monitor.isOver(),
- canDrop: monitor.canDrop()
+ canDrop: monitor.canDrop(),
});
export default DragSource(
DragItemTypes.TAG,
boxSource,
- collectSource
+ collectSource,
)(DropTarget(DragItemTypes.TAG, boxTarget, collectTarget)(TagContainerDnd));
diff --git a/app/components/TagContainerMenu.tsx b/app/components/TagContainerMenu.tsx
index 4643ccd40..09d5e4129 100644
--- a/app/components/TagContainerMenu.tsx
+++ b/app/components/TagContainerMenu.tsx
@@ -42,9 +42,9 @@ function TagContainerMenu(props: Props) {
data-tid={'tagRemoveButton_' + tag.title.replace(/ /g, '_')}
style={{
color: tag.textcolor,
- fontSize: 20
+ fontSize: 20,
}}
- onClick={event => handleRemoveTag(event, [tag])}
+ onClick={(event) => handleRemoveTag(event, [tag])}
/>
)
) : (
@@ -55,7 +55,7 @@ function TagContainerMenu(props: Props) {
marginLeft: -5,
marginRight: -5,
height: 20,
- top: 0
+ top: 0,
}}
/>
);
diff --git a/app/components/TagDropContainer.tsx b/app/components/TagDropContainer.tsx
index 6192e96f8..b5ffe38d4 100644
--- a/app/components/TagDropContainer.tsx
+++ b/app/components/TagDropContainer.tsx
@@ -45,7 +45,7 @@ function TagDropContainer(props: Props) {
isActive,
canDrop: monitor.canDrop(),
selectedEntries: props.selectedEntries,
- entryPath: props.entryPath
+ entryPath: props.entryPath,
};
},
drop(item: DragItem, monitor: DropTargetMonitor) {
@@ -53,9 +53,9 @@ function TagDropContainer(props: Props) {
// console.log('DROP: ', monitor.canDrop());
return {
selectedEntries: collectedProps.selectedEntries,
- entryPath: collectedProps.entryPath
+ entryPath: collectedProps.entryPath,
};
- }
+ },
});
drop(ref);
@@ -76,7 +76,7 @@ function TagDropContainer(props: Props) {
border,
backgroundColor,
// paddingRight: 10,
- borderRadius: 5
+ borderRadius: 5,
}}
>
{props.children}
diff --git a/app/components/TagGroupContainer.tsx b/app/components/TagGroupContainer.tsx
index faa5afdb7..3b327dc11 100644
--- a/app/components/TagGroupContainer.tsx
+++ b/app/components/TagGroupContainer.tsx
@@ -37,14 +37,14 @@ function TagGroupContainer(props: Props) {
handlerId: monitor.getHandlerId(),
isActive,
canDrop: monitor.canDrop(),
- tagGroupId: props.taggroup.uuid
+ tagGroupId: props.taggroup.uuid,
};
},
drop() {
return {
- tagGroupId: collectedProps.tagGroupId
+ tagGroupId: collectedProps.tagGroupId,
};
- }
+ },
});
drop(ref);
@@ -70,7 +70,7 @@ function TagGroupContainer(props: Props) {
borderRadius: 5,
minHeight: 20,
border,
- backgroundColor
+ backgroundColor,
}}
data-tid={'tagGroupContainer_' + props.taggroup.title}
>
diff --git a/app/components/TagGroupTitleDnD.tsx b/app/components/TagGroupTitleDnD.tsx
index 8e6b9fec3..4c659f2c1 100644
--- a/app/components/TagGroupTitleDnD.tsx
+++ b/app/components/TagGroupTitleDnD.tsx
@@ -26,7 +26,7 @@ import {
ConnectDragSource,
ConnectDropTarget,
DragSource,
- DropTarget
+ DropTarget,
} from 'react-dnd';
import Grid from '@mui/material/Grid';
import { TS } from '-/tagspaces.namespace';
@@ -38,7 +38,7 @@ interface Props {
tagGroup: TS.TagGroup;
handleTagGroupMenu: (
event: React.ChangeEvent<HTMLInputElement>,
- tagGroup: TS.TagGroup
+ tagGroup: TS.TagGroup,
) => void;
toggleTagGroup: (uuid: string) => void;
moveTagGroup: (tagGroupUuid: TS.Uuid, position: number) => void;
@@ -57,7 +57,7 @@ function TagGroupTitleDnD(props: Props) {
function getLocationName(locationId: string) {
if (locationId) {
const location: TS.Location = props.locations.find(
- l => l.uuid === locationId
+ (l) => l.uuid === locationId,
);
if (location) {
return ' (' + location.name + ')';
@@ -66,12 +66,8 @@ function TagGroupTitleDnD(props: Props) {
return '';
}
- const {
- tagGroup,
- handleTagGroupMenu,
- connectDropTarget,
- connectDragSource
- } = props;
+ const { tagGroup, handleTagGroupMenu, connectDropTarget, connectDragSource } =
+ props;
const tagGroupTitle = (
<div>
@@ -125,7 +121,7 @@ function TagGroupTitleDnD(props: Props) {
whiteSpace: 'nowrap',
textAlign: 'center',
backgroundColor: '#bbbbbb',
- borderRadius: 10
+ borderRadius: 10,
}}
>
{tagGroup.children.length}
@@ -164,7 +160,7 @@ const boxSource = {
endDrag(props, monitor) {
const item = monitor.getItem();
const dropResult = monitor.getDropResult();
- } */
+ } */,
};
/**
@@ -177,7 +173,7 @@ const collectSource = (connect, monitor) => ({
// You can ask the monitor about the current drag preview
connectDragPreview: connect.dragPreview(),
// You can ask the monitor about the current drag state:
- isDragging: monitor.isDragging()
+ isDragging: monitor.isDragging(),
});
const boxTarget = {
@@ -200,22 +196,22 @@ const boxTarget = {
// but it's good here for the sake of performance
// to avoid expensive index searches.
dragItem.index = hoverIndex;
- }
+ },
};
const collectTarget = (connect, monitor) => ({
connectDropTarget: connect.dropTarget(),
isOver: monitor.isOver(),
- canDrop: monitor.canDrop()
+ canDrop: monitor.canDrop(),
});
export default DragSource(
DragItemTypes.TAG_GROUP,
boxSource,
- collectSource
+ collectSource,
)(
DropTarget(
DragItemTypes.TAG_GROUP,
boxTarget,
- collectTarget
- )(TagGroupTitleDnD)
+ collectTarget,
+ )(TagGroupTitleDnD),
);
diff --git a/app/components/TagLibrary.tsx b/app/components/TagLibrary.tsx
index adbbcf106..c8a84b034 100644
--- a/app/components/TagLibrary.tsx
+++ b/app/components/TagLibrary.tsx
@@ -39,7 +39,7 @@ import {
getSaveTagInLocation,
getTagColor,
getTagGroupCollapsed,
- getTagTextColor
+ getTagTextColor,
} from '../reducers/settings';
import { AppDispatch, isTagLibraryChanged } from '-/reducers/app';
import SmartTags from '../reducers/smart-tags';
@@ -63,7 +63,7 @@ import {
moveTagGroupDown,
moveTagGroupUp,
removeTagGroup,
- sortTagGroup
+ sortTagGroup,
} from '-/services/taglibrary-utils';
import useFirstRender from '-/utils/useFirstRender';
import { classes, SidePanel } from '-/components/SidePanels.css';
@@ -81,11 +81,8 @@ function TagLibrary(props: Props) {
const { t } = useTranslation();
const { addTags } = useTaggingActionsContext();
const { selectedEntries } = useSelectedEntriesContext();
- const {
- switchLocationTypeByID,
- switchCurrentLocationType,
- readOnlyMode
- } = useCurrentLocationContext();
+ const { switchLocationTypeByID, switchCurrentLocationType, readOnlyMode } =
+ useCurrentLocationContext();
const dispatch: AppDispatch = useDispatch();
const tagBackgroundColor = useSelector(getTagColor);
const tagTextColor = useSelector(getTagTextColor);
@@ -94,50 +91,37 @@ function TagLibrary(props: Props) {
const saveTagInLocation: boolean = useSelector(getSaveTagInLocation);
const tagLibraryChanged = useSelector(isTagLibraryChanged);
- const toggleTagGroupDispatch = uuid =>
+ const toggleTagGroupDispatch = (uuid) =>
dispatch(SettingsActions.toggleTagGroup(uuid));
const [tagGroups, setTagGroups] = useState<Array<TS.TagGroup>>(
- getTagLibrary()
+ getTagLibrary(),
);
// const tagLibrary: Array<TS.TagGroup> = getTagLibrary();
const tagContainerRef = useRef<HTMLSpanElement>(null);
- const [
- tagGroupMenuAnchorEl,
- setTagGroupMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
+ const [tagGroupMenuAnchorEl, setTagGroupMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
const [tagMenuAnchorEl, setTagMenuAnchorEl] = useState<null | HTMLElement>(
- null
+ null,
);
- const [
- tagLibraryMenuAnchorEl,
- setTagLibraryMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [selectedTagGroupEntry, setSelectedTagGroupEntry] = useState<
- TS.TagGroup
- >(null);
+ const [tagLibraryMenuAnchorEl, setTagLibraryMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [selectedTagGroupEntry, setSelectedTagGroupEntry] =
+ useState<TS.TagGroup>(null);
// const [selectedTagEntry, setSelectedTagEntry] = useState<TagGroup>(null);
const [selectedTag, setSelectedTag] = useState<TS.Tag>(null);
- const [
- isCreateTagGroupDialogOpened,
- setIsCreateTagGroupDialogOpened
- ] = useState<boolean>(false);
- const [isEditTagGroupDialogOpened, setIsEditTagGroupDialogOpened] = useState<
- boolean
- >(false);
- const [
- isDeleteTagGroupDialogOpened,
- setIsDeleteTagGroupDialogOpened
- ] = useState<boolean>(false);
- const [isCreateTagDialogOpened, setIsCreateTagDialogOpened] = useState<
- boolean
- >(false);
- const [isEditTagDialogOpened, setIsEditTagDialogOpened] = useState<boolean>(
- false
- );
- const [isDeleteTagDialogOpened, setIsDeleteTagDialogOpened] = useState<
- boolean
- >(false);
+ const [isCreateTagGroupDialogOpened, setIsCreateTagGroupDialogOpened] =
+ useState<boolean>(false);
+ const [isEditTagGroupDialogOpened, setIsEditTagGroupDialogOpened] =
+ useState<boolean>(false);
+ const [isDeleteTagGroupDialogOpened, setIsDeleteTagGroupDialogOpened] =
+ useState<boolean>(false);
+ const [isCreateTagDialogOpened, setIsCreateTagDialogOpened] =
+ useState<boolean>(false);
+ const [isEditTagDialogOpened, setIsEditTagDialogOpened] =
+ useState<boolean>(false);
+ const [isDeleteTagDialogOpened, setIsDeleteTagDialogOpened] =
+ useState<boolean>(false);
const firstRender = useFirstRender();
useEffect(() => {
@@ -153,13 +137,13 @@ function TagLibrary(props: Props) {
}, [tagLibraryChanged]);
const refreshTagsFromLocation = () => {
- locations.map(location =>
+ locations.map((location) =>
Pro.MetaOperations.getTagGroups(location.path)
.then((tg: Array<TS.TagGroup>) => {
if (tg && tg.length > 0) {
- const newGroups = tg.map(group => ({
+ const newGroups = tg.map((group) => ({
...group,
- locationId: location.uuid
+ locationId: location.uuid,
}));
const oldGroups = getTagLibrary();
if (checkTagGroupModified(location.uuid, newGroups, oldGroups)) {
@@ -170,26 +154,26 @@ function TagLibrary(props: Props) {
}*/
return true;
})
- .catch(err => {
+ .catch((err) => {
console.log(err);
- })
+ }),
);
};
function checkTagGroupModified(
locationId: string,
newGroups: Array<TS.TagGroup>,
- oldGroups: Array<TS.TagGroup>
+ oldGroups: Array<TS.TagGroup>,
) {
- if (!oldGroups.some(group => group.locationId === locationId)) {
+ if (!oldGroups.some((group) => group.locationId === locationId)) {
return true;
}
- return !oldGroups.some(group =>
+ return !oldGroups.some((group) =>
newGroups.some(
- newGroup =>
+ (newGroup) =>
newGroup.modified_date === group.modified_date &&
- newGroup.locationId === group.locationId
- )
+ newGroup.locationId === group.locationId,
+ ),
);
}
@@ -198,7 +182,7 @@ function TagLibrary(props: Props) {
const handleTagGroupMenu = (
event: React.ChangeEvent<HTMLInputElement>,
- tagGroup
+ tagGroup,
) => {
setTagGroupMenuAnchorEl(event.currentTarget);
setSelectedTagGroupEntry(tagGroup);
@@ -214,18 +198,18 @@ function TagLibrary(props: Props) {
event: React.ChangeEvent<HTMLInputElement>,
tag,
tagGroup: TS.TagGroup,
- haveSelectedEntries: boolean
+ haveSelectedEntries: boolean,
) => {
handleTagMenu(event, tag, tagGroup, haveSelectedEntries);
},
- []
+ [],
);
const handleTagMenu = (
event: React.ChangeEvent<HTMLInputElement>,
tag,
tagGroup: TS.TagGroup,
- haveSelectedEntries: boolean
+ haveSelectedEntries: boolean,
) => {
// if (!tagGroup.readOnly) { Smart Tags are readonly but needs to have TagMenu
const isSmartTag = tag.functionality && tag.functionality.length > 0;
@@ -323,29 +307,29 @@ function TagLibrary(props: Props) {
moveTag={(
tagTitle: string,
fromTagGroupId: TS.Uuid,
- toTagGroupId: TS.Uuid
+ toTagGroupId: TS.Uuid,
) =>
setTagGroups(
moveTag(
tagTitle,
fromTagGroupId,
toTagGroupId,
- tagGroups
- )
+ tagGroups,
+ ),
)
}
changeTagOrder={(
tagGroupUuid: TS.Uuid,
fromIndex: number,
- toIndex: number
+ toIndex: number,
) =>
setTagGroups(
changeTagOrder(
tagGroupUuid,
fromIndex,
toIndex,
- tagGroups
- )
+ tagGroups,
+ ),
)
}
selectedEntries={selectedEntries}
@@ -365,8 +349,8 @@ function TagLibrary(props: Props) {
selectedTag.title,
selectedTagGroupEntry.uuid,
tagGroups,
- locations
- )
+ locations,
+ ),
);
}
}
@@ -378,7 +362,7 @@ function TagLibrary(props: Props) {
<SidePanel
style={{
display: 'flex',
- flexDirection: 'column'
+ flexDirection: 'column',
}}
>
<div className={classes.toolbar}>
@@ -411,12 +395,16 @@ function TagLibrary(props: Props) {
onClose={() => setIsDeleteTagGroupDialogOpened(false)}
title={t('core:deleteTagGroup')}
content={t('core:deleteTagGroupContentConfirm', {
- tagGroup: selectedTagGroupEntry ? selectedTagGroupEntry.title : ''
+ tagGroup: selectedTagGroupEntry ? selectedTagGroupEntry.title : '',
})}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result && selectedTagGroupEntry) {
setTagGroups(
- removeTagGroup(selectedTagGroupEntry.uuid, tagGroups, locations)
+ removeTagGroup(
+ selectedTagGroupEntry.uuid,
+ tagGroups,
+ locations,
+ ),
);
}
}}
@@ -430,13 +418,15 @@ function TagLibrary(props: Props) {
onClose={() => setIsCreateTagGroupDialogOpened(false)}
createTagGroup={(entry: TS.TagGroup) => {
const location: TS.Location = locations.find(
- l => l.uuid === entry.locationId
+ (l) => l.uuid === entry.locationId,
);
if (location) {
- switchLocationTypeByID(location.uuid).then(currentLocationId => {
- setTagGroups(createTagGroup(entry, tagGroups, location));
- switchCurrentLocationType();
- });
+ switchLocationTypeByID(location.uuid).then(
+ (currentLocationId) => {
+ setTagGroups(createTagGroup(entry, tagGroups, location));
+ switchCurrentLocationType();
+ },
+ );
} else {
setTagGroups(createTagGroup(entry, tagGroups));
}
@@ -475,13 +465,13 @@ function TagLibrary(props: Props) {
showDeleteTagGroupDialog={showDeleteTagGroupDialog}
handleCloseTagGroupMenu={() => setTagGroupMenuAnchorEl(null)}
showEditTagGroupDialog={showEditTagGroupDialog}
- moveTagGroupUp={parentTagGroupUuid =>
+ moveTagGroupUp={(parentTagGroupUuid) =>
setTagGroups(moveTagGroupUp(parentTagGroupUuid, tagGroups))
}
- moveTagGroupDown={parentTagGroupUuid =>
+ moveTagGroupDown={(parentTagGroupUuid) =>
setTagGroups(moveTagGroupDown(parentTagGroupUuid, tagGroups))
}
- sortTagGroup={parentTagGroupUuid =>
+ sortTagGroup={(parentTagGroupUuid) =>
setTagGroups(sortTagGroup(parentTagGroupUuid, tagGroups))
}
/>
@@ -516,10 +506,10 @@ function TagLibrary(props: Props) {
editTag={(
tag: TS.Tag,
parentTagGroupUuid: TS.Uuid,
- origTitle: string
+ origTitle: string,
) =>
setTagGroups(
- editTag(tag, parentTagGroupUuid, origTitle, tagGroups, locations)
+ editTag(tag, parentTagGroupUuid, origTitle, tagGroups, locations),
)
}
selectedTagGroupEntry={selectedTagGroupEntry}
@@ -532,9 +522,9 @@ function TagLibrary(props: Props) {
onClose={() => setIsDeleteTagDialogOpened(false)}
title={t('core:deleteTagFromTagGroup')}
content={t('core:deleteTagFromTagGroupContentConfirm', {
- tagName: selectedTag ? selectedTag.title : ''
+ tagName: selectedTag ? selectedTag.title : '',
})}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
confirmDeleteTag();
}
@@ -549,7 +539,7 @@ function TagLibrary(props: Props) {
marginTop: 0,
borderRadius: 5,
height: 'calc(100% - ' + reduceHeightBy + 'px)',
- overflowY: 'auto'
+ overflowY: 'auto',
}}
data-tid="tagLibraryTagGroupList"
>
diff --git a/app/components/TagsPreview.tsx b/app/components/TagsPreview.tsx
index 6f002262d..ef59b8fc1 100644
--- a/app/components/TagsPreview.tsx
+++ b/app/components/TagsPreview.tsx
@@ -40,7 +40,7 @@ function TagsPreview(props: Props) {
return <></>;
}
let tagNames = t('core:searchTags') + ': ';
- tags.forEach(tag => {
+ tags.forEach((tag) => {
tagNames = tagNames + tag.title + ' ';
});
@@ -53,7 +53,7 @@ function TagsPreview(props: Props) {
const tagColors = getTagColors(
tags[0].title,
defaultTextColor,
- defaultBackgroundColor
+ defaultBackgroundColor,
);
firstTagColor = tagColors.color;
firstTagTextColor = tagColors.textcolor;
@@ -69,7 +69,7 @@ function TagsPreview(props: Props) {
const tag2Colors = getTagColors(
tags[1].title,
defaultTextColor,
- defaultBackgroundColor
+ defaultBackgroundColor,
);
secondTagColor = tag2Colors.color;
}
@@ -89,7 +89,7 @@ function TagsPreview(props: Props) {
fontSize: 11,
lineHeight: '16px',
color: firstTagTextColor || defaultTextColor, //tag1Colors.textcolor ,
- textAlign: 'center'
+ textAlign: 'center',
}}
>
{moreThanOne ? tags.length : '1'}
diff --git a/app/components/TagsSelect.tsx b/app/components/TagsSelect.tsx
index fb3935387..08261f6c5 100644
--- a/app/components/TagsSelect.tsx
+++ b/app/components/TagsSelect.tsx
@@ -85,7 +85,7 @@ interface Props {
function TagsSelect(props: Props) {
const { readOnlyMode } = useCurrentLocationContext();
const [tagMenuAnchorEl, setTagMenuAnchorEl] = useState<null | HTMLElement>(
- null
+ null,
);
const [selectedTag, setSelectedTag] = useState(undefined);
@@ -99,13 +99,13 @@ function TagsSelect(props: Props) {
selectedEntryPath,
autoFocus = false,
tags = [],
- tagMode
+ tagMode,
} = props;
function handleTagChange(
event: Object,
selectedTags: Array<TS.Tag>,
- reason: string
+ reason: string,
) {
if (!readOnlyMode) {
if (reason === 'selectOption') {
@@ -113,20 +113,17 @@ function TagsSelect(props: Props) {
} else if (reason === 'createOption') {
if (selectedTags && selectedTags.length) {
const tagsInput = '' + selectedTags[selectedTags.length - 1];
- let tags = tagsInput
- .split(' ')
- .join(',')
- .split(','); // handle spaces around commas
+ let tags = tagsInput.split(' ').join(',').split(','); // handle spaces around commas
tags = [...new Set(tags)]; // remove duplicates
- tags = tags.filter(tag => tag && tag.length > 0); // zero length tags
+ tags = tags.filter((tag) => tag && tag.length > 0); // zero length tags
const newTags = [];
- tags.map(tag => {
+ tags.map((tag) => {
const newTag: TS.Tag = {
id: getUuid(),
title: '' + tag,
color: defaultBackgroundColor,
- textcolor: defaultTextColor
+ textcolor: defaultTextColor,
};
if (isValidNewOption(newTag.title, selectedTags)) {
newTags.push(newTag);
@@ -154,7 +151,7 @@ function TagsSelect(props: Props) {
!trimmedInput.includes(' ') &&
!trimmedInput.includes('#') &&
!trimmedInput.includes(',') &&
- !selectOptions.find(option => option.title === inputValue)
+ !selectOptions.find((option) => option.title === inputValue)
);
}
@@ -209,7 +206,7 @@ function TagsSelect(props: Props) {
<TagContainer tag={option} tagMode={tagMode} />
</Box>
)}
- renderInput={params => (
+ renderInput={(params) => (
<TextField
{...params}
// variant="filled"
diff --git a/app/components/TargetFileBox.tsx b/app/components/TargetFileBox.tsx
index 29eda1e2c..7d13c8a41 100644
--- a/app/components/TargetFileBox.tsx
+++ b/app/components/TargetFileBox.tsx
@@ -48,10 +48,8 @@ function TargetFileBox(props: Props) {
const { uploadFilesAPI } = useIOActionsContext();
const { showNotification } = useNotificationContext();
const { setSelectedEntries } = useSelectedEntriesContext();
- const {
- currentDirectoryPath,
- addDirectoryEntries
- } = useDirectoryContentContext();
+ const { currentDirectoryPath, addDirectoryEntries } =
+ useDirectoryContentContext();
const ref = useRef<HTMLDivElement>(null);
const { setMoveCopyDialogOpened } = props;
@@ -70,12 +68,12 @@ function TargetFileBox(props: Props) {
showNotification(
'Importing files failed, because no folder is opened in TagSpaces!',
'error',
- true
+ true,
);
return Promise.reject(
new Error(
- 'Importing files failed, because no folder is opened in TagSpaces!'
- )
+ 'Importing files failed, because no folder is opened in TagSpaces!',
+ ),
);
}
dispatch(AppActions.resetProgress());
@@ -87,7 +85,7 @@ function TargetFileBox(props: Props) {
setSelectedEntries(fsEntries);
return true;
})
- .catch(error => {
+ .catch((error) => {
console.log('uploadFiles', error);
});
}
@@ -112,10 +110,10 @@ function TargetFileBox(props: Props) {
},
collect: (m: DropTargetMonitor) => ({
handlerId: m.getHandlerId(),
- isActive: m.isOver({ shallow: true }) && m.canDrop()
- })
+ isActive: m.isOver({ shallow: true }) && m.canDrop(),
+ }),
}),
- [currentDirectoryPath]
+ [currentDirectoryPath],
);
drop(ref);
@@ -124,9 +122,7 @@ function TargetFileBox(props: Props) {
const { children } = props;
const dragContent = isActive ? (
<div className={classes.dropzone}>{t('core:releaseToDrop')}</div>
- ) : (
- undefined
- );
+ ) : undefined;
return (
<DnD ref={ref} style={{ height: '100%' }}>
{dragContent}
diff --git a/app/components/TargetMoveFileBox.tsx b/app/components/TargetMoveFileBox.tsx
index 53b4cffe1..73c6e4166 100644
--- a/app/components/TargetMoveFileBox.tsx
+++ b/app/components/TargetMoveFileBox.tsx
@@ -32,14 +32,14 @@ const styles: any = () => ({
backgroundColor: '#1dd19f40',
zIndex: 1,
border: '3px dashed white',
- display: 'flex'
- }
+ display: 'flex',
+ },
});
const boxTarget = {
drop(props, monitor) {
return props.onDrop(props, monitor);
- }
+ },
};
interface Props {
@@ -58,23 +58,21 @@ const TargetMoveFileBox = (props: Props) => {
const dragContent =
canDrop && isOver ? (
<DnD className={classes.dropzone} /> /* {t('core:releaseToMoveDrop')} */
- ) : (
- undefined
- );
+ ) : undefined;
return connectDropTarget(
<div>
{dragContent}
{children}
- </div>
+ </div>,
);
};
export default DropTarget(
- props => props.accepts,
+ (props) => props.accepts,
boxTarget,
(connect, monitor) => ({
connectDropTarget: connect.dropTarget(),
isOver: monitor.isOver(),
- canDrop: monitor.canDrop()
- })
+ canDrop: monitor.canDrop(),
+ }),
)(TargetMoveFileBox);
diff --git a/app/components/TargetTableMoveFileBox.tsx b/app/components/TargetTableMoveFileBox.tsx
index 7b37c7517..c7cf5577e 100644
--- a/app/components/TargetTableMoveFileBox.tsx
+++ b/app/components/TargetTableMoveFileBox.tsx
@@ -22,7 +22,7 @@ import { DropTarget } from 'react-dnd';
const boxTarget = {
drop(props, monitor) {
return props.onDrop(props, monitor);
- }
+ },
};
interface Props {
@@ -44,11 +44,11 @@ const TargetTableMoveFileBox = (props: Props) => {
};
export default DropTarget(
- props => props.accepts,
+ (props) => props.accepts,
boxTarget,
(connect, monitor) => ({
connectDropTarget: connect.dropTarget(),
isOver: monitor.isOver(),
- canDrop: monitor.canDrop()
- })
+ canDrop: monitor.canDrop(),
+ }),
)(TargetTableMoveFileBox);
diff --git a/app/components/TransparentBackground.tsx b/app/components/TransparentBackground.tsx
index bc442dc76..cab471407 100644
--- a/app/components/TransparentBackground.tsx
+++ b/app/components/TransparentBackground.tsx
@@ -27,7 +27,7 @@ function TransparentBackground(props: Props) {
style={{
borderRadius: 5,
background:
- 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")'
+ 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")',
}}
>
{props.children}
diff --git a/app/components/UserDetailsPopover.tsx b/app/components/UserDetailsPopover.tsx
index aed6788be..2f261148f 100644
--- a/app/components/UserDetailsPopover.tsx
+++ b/app/components/UserDetailsPopover.tsx
@@ -41,7 +41,7 @@ const classes = {
panelTitle: `${PREFIX}-panelTitle`,
header: `${PREFIX}-header`,
mainActionButton: `${PREFIX}-mainActionButton`,
- leftIcon: `${PREFIX}-leftIcon`
+ leftIcon: `${PREFIX}-leftIcon`,
};
const Root = styled('div')(({ theme }) => ({
@@ -49,19 +49,19 @@ const Root = styled('div')(({ theme }) => ({
textTransform: 'uppercase',
flex: 1,
paddingLeft: 7,
- paddingTop: 12
+ paddingTop: 12,
},
[`& .${classes.header}`]: {
- color: theme.palette.text.primary
+ color: theme.palette.text.primary,
},
[`& .${classes.mainActionButton}`]: {
marginTop: 10,
marginLeft: 0,
- paddingLeft: 8
+ paddingLeft: 8,
},
[`& .${classes.leftIcon}`]: {
- marginRight: theme.spacing(1)
- }
+ marginRight: theme.spacing(1),
+ },
}));
interface Props {
@@ -101,7 +101,7 @@ function UserDetailsPopover(props: Props) {
<Root
style={{
maxWidth: 400,
- height: '100%'
+ height: '100%',
}}
>
<Typography
@@ -117,9 +117,9 @@ function UserDetailsPopover(props: Props) {
variant="rounded"
style={{
color: theme.palette.getContrastText(
- theme.palette.primary.light
+ theme.palette.primary.light,
),
- backgroundColor: theme.palette.primary.light
+ backgroundColor: theme.palette.primary.light,
}}
>
{initials}
@@ -133,7 +133,7 @@ function UserDetailsPopover(props: Props) {
<Box
style={{
width: '100%',
- textAlign: 'center'
+ textAlign: 'center',
}}
>
{isSetupTOTPOpened && (
@@ -141,7 +141,7 @@ function UserDetailsPopover(props: Props) {
open={isSetupTOTPOpened}
onClose={() => setSetupTOTPOpened(false)}
user={cognitoUser}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
window.location.reload(); // TODO SOFTWARE_TOKEN_MFA is not refreshed in signed user without window.reload()
}
@@ -195,7 +195,7 @@ function UserDetailsPopover(props: Props) {
style={{
width: '100%',
textAlign: 'center',
- marginBottom: 10
+ marginBottom: 10,
}}
>
<Button
diff --git a/app/components/WelcomePanel.tsx b/app/components/WelcomePanel.tsx
index e3d7c2f91..17ddcf7e2 100644
--- a/app/components/WelcomePanel.tsx
+++ b/app/components/WelcomePanel.tsx
@@ -40,7 +40,7 @@ import {
LocalLocationIcon,
OpenLinkIcon,
KeyShortcutsIcon,
- HelpIcon
+ HelpIcon,
} from '-/components/CommonIcons';
import { actions as AppActions, AppDispatch } from '-/reducers/app';
import { getDesktopMode } from '-/reducers/settings';
@@ -58,25 +58,25 @@ const PREFIX = 'WelcomePanel';
const classes = {
listItem: `${PREFIX}-listItem`,
recentTitle: `${PREFIX}-recentTitle`,
- noRecentItems: `${PREFIX}-noRecentItems`
+ noRecentItems: `${PREFIX}-noRecentItems`,
};
const Root = styled('div')(({ theme }) => ({
[`& .${classes.listItem}`]: {
color: theme.palette.text.primary,
textTransform: 'uppercase',
- marginTop: 10
+ marginTop: 10,
},
[`& .${classes.recentTitle}`]: {
color: theme.palette.text.primary,
textTransform: 'uppercase',
- textAlign: 'center'
+ textAlign: 'center',
},
[`& .${classes.noRecentItems}`]: {
color: theme.palette.text.primary,
padding: 30,
- alignSelf: 'center'
- }
+ alignSelf: 'center',
+ },
}));
function WelcomePanel() {
@@ -94,7 +94,7 @@ function WelcomePanel() {
const toggleKeysDialogDispatch = () =>
dispatch(AppActions.toggleKeysDialog());
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
const historyKeys = Pro && Pro.history ? Pro.history.historyKeys : {};
const fileOpenHistoryItems: Array<TS.HistoryItem> = Pro
@@ -123,7 +123,7 @@ function WelcomePanel() {
<Typography
variant="inherit"
style={{
- paddingTop: 20
+ paddingTop: 20,
}}
className={classes.recentTitle}
noWrap
@@ -197,7 +197,7 @@ function WelcomePanel() {
// @ts-ignore
overflowY: 'overlay',
overflowX: 'hidden',
- backgroundColor: theme.palette.background.default
+ backgroundColor: theme.palette.background.default,
}}
>
<div
@@ -352,7 +352,7 @@ function WelcomePanel() {
overflow: 'hidden',
position: 'relative',
paddingLeft: 20,
- height: '100%'
+ height: '100%',
}}
>
<div
@@ -365,13 +365,13 @@ function WelcomePanel() {
left: 0,
top: 0,
width: '100%',
- height: '100%'
+ height: '100%',
}}
/>
<Grid
style={{
position: 'relative',
- height: '100%'
+ height: '100%',
}}
container
spacing={3}
@@ -393,7 +393,7 @@ function WelcomePanel() {
// @ts-ignore
overflowY: 'overlay',
height: 'calc(100% - 50px)',
- backgroundColor: theme.palette.background.default
+ backgroundColor: theme.palette.background.default,
}}
>
<HowToStart />
@@ -410,7 +410,7 @@ function WelcomePanel() {
// @ts-ignore
overflowY: 'overlay',
height: 'calc(100% - 50px)',
- backgroundColor: theme.palette.background.default
+ backgroundColor: theme.palette.background.default,
}}
>
{renderRecentItems()}
diff --git a/app/components/dialogs/AboutDialog.tsx b/app/components/dialogs/AboutDialog.tsx
index 68634f85b..2287c8e3e 100644
--- a/app/components/dialogs/AboutDialog.tsx
+++ b/app/components/dialogs/AboutDialog.tsx
@@ -66,7 +66,7 @@ function AboutDialog(props: Props) {
openURLExternally(Links.links.downloadURL, true);
} else {
getLastVersionPromise()
- .then(lastVersion => {
+ .then((lastVersion) => {
console.log('Last version on server: ' + lastVersion);
const cleanedLastVersion = semver.coerce(lastVersion);
// const cleanedCurrentVersion = '3.0.2'
@@ -82,7 +82,7 @@ function AboutDialog(props: Props) {
}
return true;
})
- .catch(error => {
+ .catch((error) => {
console.warn('Error while checking for update: ' + error);
});
}
diff --git a/app/components/dialogs/AddRemoveTagsDialog.tsx b/app/components/dialogs/AddRemoveTagsDialog.tsx
index 1d909a537..9ebdb0024 100644
--- a/app/components/dialogs/AddRemoveTagsDialog.tsx
+++ b/app/components/dialogs/AddRemoveTagsDialog.tsx
@@ -33,7 +33,7 @@ import DraggablePaper from '-/components/DraggablePaper';
import TagsSelect from '../TagsSelect';
import {
extractFileName,
- extractDirectoryName
+ extractDirectoryName,
} from '@tagspaces/tagspaces-common/paths';
import PlatformIO from '-/services/platform-facade';
import { TS } from '-/tagspaces.namespace';
@@ -60,9 +60,9 @@ function AddRemoveTagsDialog(props: Props) {
const handleChange = (name: string, value: Array<TS.Tag>, action: string) => {
if (action === 'remove-value') {
- const tagsToRemove: Array<string> = value.map(tag => tag.title);
+ const tagsToRemove: Array<string> = value.map((tag) => tag.title);
setNewlyAddedTags(
- newlyAddedTags.filter(tag => !tagsToRemove.includes(tag.title))
+ newlyAddedTags.filter((tag) => !tagsToRemove.includes(tag.title)),
);
} else {
setNewlyAddedTags(value);
@@ -81,8 +81,8 @@ function AddRemoveTagsDialog(props: Props) {
const addTagsAction = () => {
if (selected && selected.length > 0) {
addTags(
- selected.map(entry => entry.path),
- newlyAddedTags
+ selected.map((entry) => entry.path),
+ newlyAddedTags,
);
}
onCloseDialog(true);
@@ -91,8 +91,8 @@ function AddRemoveTagsDialog(props: Props) {
const removeTagsAction = () => {
if (selected && selected.length > 0) {
removeTags(
- selected.map(entry => entry.path),
- newlyAddedTags
+ selected.map((entry) => entry.path),
+ newlyAddedTags,
);
}
onCloseDialog(true);
@@ -100,7 +100,7 @@ function AddRemoveTagsDialog(props: Props) {
const removeAllTagsAction = () => {
if (selected && selected.length > 0) {
- removeAllTags(selected.map(entry => entry.path));
+ removeAllTags(selected.map((entry) => entry.path));
}
onCloseDialog(true);
};
@@ -130,7 +130,7 @@ function AddRemoveTagsDialog(props: Props) {
minHeight: 330,
paddingTop: 10,
overflowY: 'auto',
- overflowX: 'hidden'
+ overflowX: 'hidden',
}}
>
<TagsSelect
@@ -147,7 +147,7 @@ function AddRemoveTagsDialog(props: Props) {
</Typography>
<List dense style={{ width: 550, marginLeft: -15 }}>
{selected.length > 0 &&
- selected.map(entry => (
+ selected.map((entry) => (
<ListItem key={entry.path} title={entry.path}>
<ListItemIcon>
{entry.isFile ? <FileIcon /> : <FolderIcon />}
@@ -156,11 +156,11 @@ function AddRemoveTagsDialog(props: Props) {
{entry.isFile
? extractFileName(
entry.path || '',
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)
: extractDirectoryName(
entry.path || '',
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)}
</Typography>
</ListItem>
diff --git a/app/components/dialogs/AddTagToTagGroupDialog.tsx b/app/components/dialogs/AddTagToTagGroupDialog.tsx
index 54c154866..864680339 100644
--- a/app/components/dialogs/AddTagToTagGroupDialog.tsx
+++ b/app/components/dialogs/AddTagToTagGroupDialog.tsx
@@ -77,7 +77,7 @@ function AddTagToTagGroupDialog(props: Props) {
// fullScreen={fullScreen}
keepMounted
scroll="paper"
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@@ -102,7 +102,7 @@ function AddTagToTagGroupDialog(props: Props) {
onChange={handleTagGroupChange}
input={<Input id="addTagToTagGroupInput" />}
>
- {getTagLibrary().map(tg => (
+ {getTagLibrary().map((tg) => (
<MenuItem value={tg.uuid}>{tg.title}</MenuItem>
))}
</Select>
diff --git a/app/components/dialogs/ColorPickerDialog.tsx b/app/components/dialogs/ColorPickerDialog.tsx
index dc7867fc9..2d5bda472 100644
--- a/app/components/dialogs/ColorPickerDialog.tsx
+++ b/app/components/dialogs/ColorPickerDialog.tsx
@@ -51,7 +51,7 @@ const presetColors = [
'#cca6ac',
'#f691b2',
'#cd74e6',
- '#a47ae2'
+ '#a47ae2',
];
interface Props {
@@ -87,7 +87,7 @@ function ColorPickerDialog(props: Props) {
onClose={onClose}
keepMounted
scroll="paper"
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@@ -104,14 +104,14 @@ function ColorPickerDialog(props: Props) {
style={{
marginLeft: 'auto',
marginRight: 'auto',
- overflowX: 'hidden'
+ overflowX: 'hidden',
}}
>
<SketchPicker
style={{
padding: '0 !important',
boxShadow: 'none !important',
- backgroundColor: 'transparent !important'
+ backgroundColor: 'transparent !important',
}}
name="color"
presetColors={props.presetColors ? props.presetColors : presetColors}
diff --git a/app/components/dialogs/ConfirmDialog.tsx b/app/components/dialogs/ConfirmDialog.tsx
index c6599176c..869df2c9c 100644
--- a/app/components/dialogs/ConfirmDialog.tsx
+++ b/app/components/dialogs/ConfirmDialog.tsx
@@ -74,7 +74,7 @@ function ConfirmDialog(props: Props) {
{props.content}
{props.list && (
<List dense>
- {props.list.map(listItem => (
+ {props.list.map((listItem) => (
<ListItem key={listItem.toString()}>
<ListItemIcon>
<BulletIcon />
@@ -110,7 +110,7 @@ ConfirmDialog.defaultProps = {
cancelDialogTID: 'confirmDialogCancelButton',
confirmDialogTID: 'confirmDialogOkButton',
confirmDialogContentTID: 'confirmDialogContentTID',
- list: []
+ list: [],
};
export default ConfirmDialog;
diff --git a/app/components/dialogs/CreateDirectoryDialog.tsx b/app/components/dialogs/CreateDirectoryDialog.tsx
index 20220044e..356300503 100644
--- a/app/components/dialogs/CreateDirectoryDialog.tsx
+++ b/app/components/dialogs/CreateDirectoryDialog.tsx
@@ -78,14 +78,14 @@ function CreateDirectoryDialog(props: Props) {
selectedDirectoryPath !== undefined
? selectedDirectoryPath
: currentDirectoryPath,
- name
+ name,
);
createDirectory(dirPath, reflect !== undefined ? reflect : true).then(
() => {
if (props.callback) {
props.callback(dirPath);
}
- }
+ },
);
resetState();
props.onClose();
@@ -112,7 +112,7 @@ function CreateDirectoryDialog(props: Props) {
// fullScreen={fullScreen}
keepMounted
scroll="paper"
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@@ -135,7 +135,7 @@ function CreateDirectoryDialog(props: Props) {
autoFocus
name="name"
label={t('core:createNewDirectoryTitleName')}
- onChange={event => {
+ onChange={(event) => {
const { target } = event;
setName(target.value);
}}
diff --git a/app/components/dialogs/CreateEditLocationDialog.tsx b/app/components/dialogs/CreateEditLocationDialog.tsx
index 8fbd21b83..a691a1d34 100644
--- a/app/components/dialogs/CreateEditLocationDialog.tsx
+++ b/app/components/dialogs/CreateEditLocationDialog.tsx
@@ -51,7 +51,7 @@ import {
AccordionSummary,
InputLabel,
MenuItem,
- Select
+ Select,
} from '@mui/material';
import { Pro } from '-/pro';
import ObjectStoreForm from './ObjectStoreForm';
@@ -81,14 +81,14 @@ import { useLocationIndexContext } from '-/hooks/useLocationIndexContext';
const PREFIX = 'CreateEditLocationDialog';
const classes = {
- formControl: `${PREFIX}-formControl`
+ formControl: `${PREFIX}-formControl`,
};
const StyledDialog = styled(Dialog)(({ theme }) => ({
[`& .${classes.formControl}`]: {
marginLeft: theme.spacing(0),
- width: '100%'
- }
+ width: '100%',
+ },
}));
interface Props {
@@ -109,24 +109,23 @@ function CreateEditLocationDialog(props: Props) {
const IgnorePatternDialog =
Pro && Pro.UI ? Pro.UI.IgnorePatternDialog : false;
/*const { location } = props;*/
- const [showSecretAccessKey, setShowSecretAccessKey] = useState<boolean>(
- false
- );
+ const [showSecretAccessKey, setShowSecretAccessKey] =
+ useState<boolean>(false);
const [showPassword, setShowPassword] = useState<boolean>(false);
const [errorTextPath, setErrorTextPath] = useState<boolean>(false);
const [errorTextName, setErrorTextName] = useState<boolean>(false);
const [name, setName] = useState<string>(
- selectedLocation && selectedLocation.name ? selectedLocation.name : ''
+ selectedLocation && selectedLocation.name ? selectedLocation.name : '',
);
const [username, setUserName] = useState<string>(
selectedLocation && selectedLocation.username
? selectedLocation.username
- : ''
+ : '',
);
const [password, setPassword] = useState<string>(
selectedLocation && selectedLocation.password
? selectedLocation.password
- : ''
+ : '',
);
let defaultIndexAge = AppConfig.maxIndexAge;
if (
@@ -150,58 +149,58 @@ function CreateEditLocationDialog(props: Props) {
}
const [maxLoops, setMaxLoops] = useState<number>(defaultMaxLoops);
const [storeName, setStoreName] = useState<string>(
- selectedLocation && selectedLocation.name ? selectedLocation.name : ''
+ selectedLocation && selectedLocation.name ? selectedLocation.name : '',
);
const [path, setPath] = useState<string>(
selectedLocation && (selectedLocation.path || selectedLocation.paths)
? selectedLocation.path || selectedLocation.paths[0]
- : ''
+ : '',
);
const [storePath, setStorePath] = useState<string>(
selectedLocation && (selectedLocation.path || selectedLocation.paths)
? selectedLocation.path || selectedLocation.paths[0]
- : ''
+ : '',
);
const [endpointURL, setEndpointURL] = useState<string>(
- selectedLocation ? selectedLocation.endpointURL : ''
+ selectedLocation ? selectedLocation.endpointURL : '',
);
const [authType, setAuthType] = useState<string>('password');
const [isDefault, setIsDefault] = useState<boolean>(
- selectedLocation ? selectedLocation.isDefault : false
+ selectedLocation ? selectedLocation.isDefault : false,
);
const [isReadOnly, setIsReadOnly] = useState<boolean>(
- selectedLocation ? selectedLocation.isReadOnly : false
+ selectedLocation ? selectedLocation.isReadOnly : false,
);
const [watchForChanges, setWatchForChanges] = useState<boolean>(
- selectedLocation ? selectedLocation.watchForChanges : false
+ selectedLocation ? selectedLocation.watchForChanges : false,
);
const [disableIndexing, setIndexDisable] = useState<boolean>(
- selectedLocation ? selectedLocation.disableIndexing : false
+ selectedLocation ? selectedLocation.disableIndexing : false,
);
const [fullTextIndex, setFullTextIndex] = useState<boolean>(
- selectedLocation ? selectedLocation.fullTextIndex : false
+ selectedLocation ? selectedLocation.fullTextIndex : false,
);
const [accessKeyId, setAccessKeyId] = useState<string>(
- selectedLocation ? selectedLocation.accessKeyId : ''
+ selectedLocation ? selectedLocation.accessKeyId : '',
);
const [secretAccessKey, setSecretAccessKey] = useState<string>(
- selectedLocation ? selectedLocation.secretAccessKey : ''
+ selectedLocation ? selectedLocation.secretAccessKey : '',
);
const [sessionToken, setSessionToken] = useState<string>(
- selectedLocation ? selectedLocation.sessionToken : undefined
+ selectedLocation ? selectedLocation.sessionToken : undefined,
);
const [bucketName, setBucketName] = useState<string>(
- selectedLocation ? selectedLocation.bucketName : ''
+ selectedLocation ? selectedLocation.bucketName : '',
);
const [persistTagsInSidecarFile, setPersistTagsInSidecarFile] = useState<
boolean | null
>(
selectedLocation && selectedLocation.persistTagsInSidecarFile !== undefined
? selectedLocation.persistTagsInSidecarFile
- : null // props.isPersistTagsInSidecar
+ : null, // props.isPersistTagsInSidecar
);
const [region, setRegion] = useState<string>(
- selectedLocation ? selectedLocation.region : ''
+ selectedLocation ? selectedLocation.region : '',
);
let defaultType;
if (selectedLocation) {
@@ -213,28 +212,25 @@ function CreateEditLocationDialog(props: Props) {
}
const [type, setType] = useState<string>(defaultType);
const [newuuid, setNewUuid] = useState<string>(
- selectedLocation ? selectedLocation.uuid : getUuid()
+ selectedLocation ? selectedLocation.uuid : getUuid(),
);
const [cloudErrorTextName, setCloudErrorTextName] = useState<boolean>(false);
const [webdavErrorUrl, setWebdavErrorUrl] = useState<boolean>(false);
- const [cloudErrorAccessKey, setCloudErrorAccessKey] = useState<boolean>(
- false
- );
- const [cloudErrorSecretAccessKey, setCloudErrorSecretAccessKey] = useState<
- boolean
- >(false);
+ const [cloudErrorAccessKey, setCloudErrorAccessKey] =
+ useState<boolean>(false);
+ const [cloudErrorSecretAccessKey, setCloudErrorSecretAccessKey] =
+ useState<boolean>(false);
const [ignorePatternPaths, setIgnorePatternPaths] = useState<Array<string>>(
- selectedLocation ? selectedLocation.ignorePatternPaths : undefined
+ selectedLocation ? selectedLocation.ignorePatternPaths : undefined,
);
- const [isIgnorePatternDialogOpen, setIgnorePatternDialogOpen] = useState<
- boolean
- >(false);
+ const [isIgnorePatternDialogOpen, setIgnorePatternDialogOpen] =
+ useState<boolean>(false);
const [
isFullTextIndexConfirmDialogOpened,
- setFullTextIndexConfirmDialogOpened
+ setFullTextIndexConfirmDialogOpened,
] = useState<boolean>(false);
const firstRender = useFirstRender();
@@ -269,18 +265,18 @@ function CreateEditLocationDialog(props: Props) {
loadLocationDataPromise(path, AppConfig.metaFolderFile)
.then((meta: TS.FileSystemEntryMeta) => {
if (meta && meta.id) {
- if (!locations.some(ln => ln.uuid === meta.id)) {
+ if (!locations.some((ln) => ln.uuid === meta.id)) {
setNewUuid(meta.id);
}
}
return true;
})
- .catch(err => {
+ .catch((err) => {
console.debug('no meta in location:' + path);
});
}
function setNewLocationID(newId: string) {
- if (!locations.some(ln => ln.uuid === newId)) {
+ if (!locations.some((ln) => ln.uuid === newId)) {
setNewUuid(newId);
} else {
showNotification('Location with this ID already exists', 'error');
@@ -383,7 +379,7 @@ function CreateEditLocationDialog(props: Props) {
fullTextIndex,
watchForChanges,
maxIndexAge,
- ignorePatternPaths
+ ignorePatternPaths,
};
} else if (type === locationType.TYPE_WEBDAV) {
loc = {
@@ -401,7 +397,7 @@ function CreateEditLocationDialog(props: Props) {
fullTextIndex,
watchForChanges,
maxIndexAge,
- ignorePatternPaths
+ ignorePatternPaths,
};
} else if (type === locationType.TYPE_CLOUD) {
loc = {
@@ -423,7 +419,7 @@ function CreateEditLocationDialog(props: Props) {
watchForChanges: false,
maxIndexAge,
maxLoops,
- ignorePatternPaths
+ ignorePatternPaths,
};
}
if (persistTagsInSidecarFile !== null) {
@@ -465,7 +461,7 @@ function CreateEditLocationDialog(props: Props) {
region={region}
endpointURL={endpointURL}
setStoreName={setStoreName}
- setStorePath={path => {
+ setStorePath={(path) => {
setStorePath(path);
setLocationId(path);
}}
@@ -504,7 +500,7 @@ function CreateEditLocationDialog(props: Props) {
errorTextPath={errorTextPath}
errorTextName={errorTextName}
setName={setName}
- setPath={path => {
+ setPath={(path) => {
setPath(path);
setLocationId(path);
}}
@@ -530,7 +526,7 @@ function CreateEditLocationDialog(props: Props) {
fullScreen={fullScreen}
keepMounted
scroll="paper"
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@@ -554,7 +550,7 @@ function CreateEditLocationDialog(props: Props) {
style={{
overflow: 'auto',
minHeight: 200,
- padding: 8
+ padding: 8,
}}
>
<Accordion defaultExpanded>
@@ -641,7 +637,7 @@ function CreateEditLocationDialog(props: Props) {
}}
title={t('core:confirm')}
content={t('core:fullTextIndexRegenerate')}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
createLocationIndex(selectedLocation);
} else {
@@ -701,7 +697,7 @@ function CreateEditLocationDialog(props: Props) {
fullWidth={true}
data-tid="newuuid"
placeholder="Unique location identifier"
- onChange={event => setNewLocationID(event.target.value)}
+ onChange={(event) => setNewLocationID(event.target.value)}
value={newuuid}
label={t('core:locationId')}
InputProps={{
@@ -711,7 +707,7 @@ function CreateEditLocationDialog(props: Props) {
<IconButton
onClick={() => {
const result = confirm(
- 'Changing the identifier of a location, will invalidate all the internal sharing links (tslinks) leading to files and folders in this location. Do you want to continue?'
+ 'Changing the identifier of a location, will invalidate all the internal sharing links (tslinks) leading to files and folders in this location. Do you want to continue?',
);
if (result) {
setNewLocationID(getUuid());
@@ -723,7 +719,7 @@ function CreateEditLocationDialog(props: Props) {
</IconButton>
</Tooltip>
</InputAdornment>
- )
+ ),
}}
/>
</FormControl>
@@ -781,13 +777,13 @@ function CreateEditLocationDialog(props: Props) {
style={{
maxWidth: 70,
marginLeft: 15,
- marginBottom: 15
+ marginBottom: 15,
}}
type="number"
data-tid="maxIndexAgeTID"
inputProps={{ min: 0 }}
value={maxIndexAge / (1000 * 60)}
- onChange={event => changeMaxIndexAge(event.target.value)}
+ onChange={(event) => changeMaxIndexAge(event.target.value)}
/>
}
label={
@@ -947,11 +943,11 @@ function CreateEditLocationDialog(props: Props) {
style={{
padding: 5,
backgroundColor: '#d3d3d34a',
- borderRadius: 10
+ borderRadius: 10,
}}
dense
>
- {ignorePatternPaths.map(ignorePatternPath => (
+ {ignorePatternPaths.map((ignorePatternPath) => (
<ListItem style={{ padding: 0 }}>
<ListItemText primary={ignorePatternPath} />
<ListItemIcon
diff --git a/app/components/dialogs/CreateTagGroupDialog.tsx b/app/components/dialogs/CreateTagGroupDialog.tsx
index 5048ac054..353875428 100644
--- a/app/components/dialogs/CreateTagGroupDialog.tsx
+++ b/app/components/dialogs/CreateTagGroupDialog.tsx
@@ -53,9 +53,8 @@ function CreateTagGroupDialog(props: Props) {
const saveTagsInLocation = useSelector(getSaveTagInLocation);
const [displayColorPicker, setDisplayColorPicker] = useState<boolean>(false);
- const [displayTextColorPicker, setDisplayTextColorPicker] = useState<boolean>(
- false
- );
+ const [displayTextColorPicker, setDisplayTextColorPicker] =
+ useState<boolean>(false);
const [inputError, setInputError] = useState<boolean>(false);
const title = useRef<string>('');
@@ -64,12 +63,12 @@ function CreateTagGroupDialog(props: Props) {
const textcolor = useRef<string>(props.textcolor);
const locationId = useRef<string>(defaultTagGroupLocation);
// eslint-disable-next-line no-unused-vars
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
const { open, onClose, createTagGroup } = props;
const handleTagGroupTitleChange = (
- event: React.ChangeEvent<HTMLInputElement>
+ event: React.ChangeEvent<HTMLInputElement>,
) => {
const { target } = event;
const { value, name } = target;
@@ -113,7 +112,7 @@ function CreateTagGroupDialog(props: Props) {
color: color.current,
textcolor: textcolor.current,
locationId: lId,
- children: []
+ children: [],
});
onClose();
}
@@ -143,7 +142,7 @@ function CreateTagGroupDialog(props: Props) {
borderWidth: 1,
borderStyle: 'solid',
borderColor: 'gray',
- background: color.current
+ background: color.current,
},
textcolor: {
width: '100%',
@@ -152,20 +151,20 @@ function CreateTagGroupDialog(props: Props) {
borderWidth: 1,
borderStyle: 'solid',
borderColor: 'gray',
- background: textcolor.current
+ background: textcolor.current,
},
swatch: {
padding: '5px',
borderRadius: '1px',
boxShadow: '0 0 0 1px rgba(0,0,0,.1)',
display: 'inline-block',
- cursor: 'pointer'
+ cursor: 'pointer',
},
helpText: {
marginTop: '15px',
marginBottom: '5px',
- fontSize: '1rem'
- }
+ fontSize: '1rem',
+ },
};
// const theme = useTheme();
@@ -177,7 +176,7 @@ function CreateTagGroupDialog(props: Props) {
// fullScreen={fullScreen}
keepMounted
scroll="paper"
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@@ -228,7 +227,7 @@ function CreateTagGroupDialog(props: Props) {
>
{t('tagLibrary')}
</MenuItem>
- {locations.map(location => (
+ {locations.map((location) => (
<MenuItem
key={location.uuid}
value={location.uuid}
diff --git a/app/components/dialogs/CreateTagsDialog.tsx b/app/components/dialogs/CreateTagsDialog.tsx
index 778544c16..fead3e09f 100644
--- a/app/components/dialogs/CreateTagsDialog.tsx
+++ b/app/components/dialogs/CreateTagsDialog.tsx
@@ -88,7 +88,7 @@ function CreateTagsDialog(props: Props) {
// fullScreen={fullScreen}
keepMounted
scroll="paper"
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
diff --git a/app/components/dialogs/DialogCloseButton.tsx b/app/components/dialogs/DialogCloseButton.tsx
index fc16e6d88..61c18320e 100644
--- a/app/components/dialogs/DialogCloseButton.tsx
+++ b/app/components/dialogs/DialogCloseButton.tsx
@@ -37,7 +37,7 @@ function DialogCloseButton(props: Props) {
style={{
position: 'absolute',
right: 5,
- top: 5
+ top: 5,
}}
data-tid={testId && testId}
onClick={onClose}
diff --git a/app/components/dialogs/Dialogs.css.tsx b/app/components/dialogs/Dialogs.css.tsx
index eb2cee96f..b32b772d3 100644
--- a/app/components/dialogs/Dialogs.css.tsx
+++ b/app/components/dialogs/Dialogs.css.tsx
@@ -22,6 +22,6 @@ export default (theme: any) => ({
maxHeight: '100%',
padding: 5,
overflowY: 'hidden',
- backgroundColor: theme.palette.background.default
- }
+ backgroundColor: theme.palette.background.default,
+ },
});
diff --git a/app/components/dialogs/EditEntryTagDialog.tsx b/app/components/dialogs/EditEntryTagDialog.tsx
index fdad74f4a..477113d3b 100644
--- a/app/components/dialogs/EditEntryTagDialog.tsx
+++ b/app/components/dialogs/EditEntryTagDialog.tsx
@@ -21,7 +21,7 @@ import React, {
useEffect,
useMemo,
ChangeEvent,
- useRef
+ useRef,
} from 'react';
import { styled } from '@mui/material/styles';
import { connect } from 'react-redux';
@@ -65,7 +65,7 @@ function EditEntryTagDialog(props: Props) {
const { editTagForEntry } = useTaggingActionsContext();
const [showAdvancedMode, setShowAdvancedMode] = useState<boolean>(false);
const [title, setTitle] = useState(
- props.selectedTag && props.selectedTag.title
+ props.selectedTag && props.selectedTag.title,
);
const titleRef = useRef<HTMLInputElement>(null);
const isShowDatePeriodEditor = useMemo(() => {
@@ -86,7 +86,7 @@ function EditEntryTagDialog(props: Props) {
return DateTagEditor && showDatePeriodEditor;
}, []);
const [editDisabled, setEditDisabled] = useState<boolean>(
- isShowDatePeriodEditor
+ isShowDatePeriodEditor,
);
const { setError, haveError } = useValidation();
const { onClose, open } = props;
@@ -137,7 +137,7 @@ function EditEntryTagDialog(props: Props) {
<DialogContent
data-tid="editEntryTagDialog"
style={{
- overflow: 'auto'
+ overflow: 'auto',
}}
>
<FormControl fullWidth={true} error={haveError('tag')}>
@@ -159,7 +159,7 @@ function EditEntryTagDialog(props: Props) {
InputProps={{
endAdornment: (
<EditIcon onClick={() => setEditDisabled(!editDisabled)} />
- )
+ ),
}}
/>
{haveError('tag') && (
@@ -192,7 +192,7 @@ function EditEntryTagDialog(props: Props) {
return (
<DialogActions
style={{
- justifyContent: 'space-between'
+ justifyContent: 'space-between',
}}
>
{GeoTagEditor && isGeoTag(title) ? (
@@ -235,9 +235,9 @@ function EditEntryTagDialog(props: Props) {
style={{
minWidth: 400,
height: '100%',
- marginBottom: 30
+ marginBottom: 30,
}}
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@@ -258,7 +258,7 @@ function mapStateToProps(state) {
return {
selectedTag: getSelectedTag(state),
tileServer: getMapTileServer(state),
- geoTaggingFormat: state.settings.geoTaggingFormat
+ geoTaggingFormat: state.settings.geoTaggingFormat,
};
}
@@ -266,5 +266,5 @@ const areEqual = (prevProp, nextProp) =>
JSON.stringify(nextProp.selectedTag) === JSON.stringify(prevProp.selectedTag);
export default connect(mapStateToProps)(
- React.memo(EditEntryTagDialog, areEqual)
+ React.memo(EditEntryTagDialog, areEqual),
);
diff --git a/app/components/dialogs/EditTagDialog.tsx b/app/components/dialogs/EditTagDialog.tsx
index 2493aa8a6..d10202541 100644
--- a/app/components/dialogs/EditTagDialog.tsx
+++ b/app/components/dialogs/EditTagDialog.tsx
@@ -43,14 +43,13 @@ interface Props {
function EditTagDialog(props: Props) {
const { t } = useTranslation();
const [displayColorPicker, setDisplayColorPicker] = useState<boolean>(false);
- const [displayTextColorPicker, setDisplayTextColorPicker] = useState<boolean>(
- false
- );
+ const [displayTextColorPicker, setDisplayTextColorPicker] =
+ useState<boolean>(false);
const [inputError, setInputError] = useState<boolean>(false);
const [title, setTitle] = useState<string>(props.selectedTag.title);
const [color, setColor] = useState<string>(props.selectedTag.color);
const [textcolor, setTextcolor] = useState<string>(
- props.selectedTag.textcolor
+ props.selectedTag.textcolor,
);
useEffect(() => {
@@ -87,10 +86,10 @@ function EditTagDialog(props: Props) {
...props.selectedTag,
title,
color,
- textcolor
+ textcolor,
},
props.selectedTagGroupEntry.uuid,
- props.selectedTag.title
+ props.selectedTag.title,
);
props.onClose();
}
@@ -106,7 +105,7 @@ function EditTagDialog(props: Props) {
borderStyle: 'solid',
borderColor: 'gray',
padding: '5px',
- background: color
+ background: color,
},
textcolor: {
width: '100%',
@@ -116,12 +115,12 @@ function EditTagDialog(props: Props) {
borderStyle: 'solid',
borderColor: 'gray',
padding: '5px',
- background: textcolor
+ background: textcolor,
},
helpText: {
marginBottom: '5px',
- fontSize: '1rem'
- }
+ fontSize: '1rem',
+ },
};
// const theme = useTheme();
@@ -133,7 +132,7 @@ function EditTagDialog(props: Props) {
onClose={onClose}
keepMounted
scroll="paper"
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@@ -161,7 +160,7 @@ function EditTagDialog(props: Props) {
fontSize: 12,
position: 'relative',
bottom: 20,
- color: '#808080'
+ color: '#808080',
}}
>
<span className="text" style={{ fontWeight: 600 }}>
@@ -170,7 +169,7 @@ function EditTagDialog(props: Props) {
<time>
{format(
new Date(props.selectedTag.modified_date),
- 'yyyy-MM-dd'
+ 'yyyy-MM-dd',
)}
</time>
</div>
@@ -209,7 +208,7 @@ function EditTagDialog(props: Props) {
{displayColorPicker && (
<ColorPickerDialog
open={displayColorPicker}
- setColor={value => setColor(value)}
+ setColor={(value) => setColor(value)}
onClose={() => setDisplayColorPicker(!displayColorPicker)}
color={color}
/>
@@ -232,7 +231,7 @@ function EditTagDialog(props: Props) {
{displayTextColorPicker && (
<ColorPickerDialog
open={displayTextColorPicker}
- setColor={txtcolor => setTextcolor(txtcolor)}
+ setColor={(txtcolor) => setTextcolor(txtcolor)}
onClose={() => setDisplayTextColorPicker(!displayTextColorPicker)}
color={textcolor}
/>
diff --git a/app/components/dialogs/EditTagGroupDialog.tsx b/app/components/dialogs/EditTagGroupDialog.tsx
index 0be39d5ab..50e09bf30 100644
--- a/app/components/dialogs/EditTagGroupDialog.tsx
+++ b/app/components/dialogs/EditTagGroupDialog.tsx
@@ -53,18 +53,17 @@ function EditTagGroupDialog(props: Props) {
const locations: Array<TS.Location> = useSelector(getLocations);
const saveTagInLocation: boolean = useSelector(getSaveTagInLocation);
const [displayColorPicker, setDisplayColorPicker] = useState<boolean>(false);
- const [displayTextColorPicker, setDisplayTextColorPicker] = useState<boolean>(
- false
- );
+ const [displayTextColorPicker, setDisplayTextColorPicker] =
+ useState<boolean>(false);
const [inputError, setInputError] = useState<boolean>(false);
const [applyChanges, setApplyChanges] = useState<boolean>(false);
const [locationId, setLocationId] = useState<string>(
- selectedTagGroupEntry.locationId ?? defaultTagGroupLocation
+ selectedTagGroupEntry.locationId ?? defaultTagGroupLocation,
);
const [title, setTitle] = useState<string>(selectedTagGroupEntry.title);
const [color, setColor] = useState<string>(selectedTagGroupEntry.color);
const [textcolor, setTextcolor] = useState<string>(
- selectedTagGroupEntry.textcolor
+ selectedTagGroupEntry.textcolor,
);
useEffect(() => {
@@ -72,7 +71,7 @@ function EditTagGroupDialog(props: Props) {
}, [title]);
const handleTagGroupTitleChange = (
- event: React.ChangeEvent<HTMLInputElement>
+ event: React.ChangeEvent<HTMLInputElement>,
) => {
const { target } = event;
const { value, name } = target;
@@ -100,12 +99,12 @@ function EditTagGroupDialog(props: Props) {
if (selectedTagGroupEntry && selectedTagGroupEntry.children) {
if (Pro && locationId !== selectedTagGroupEntry.locationId) {
const location: TS.Location = locations.find(
- l => l.uuid === selectedTagGroupEntry.locationId
+ (l) => l.uuid === selectedTagGroupEntry.locationId,
);
if (location) {
Pro.MetaOperations.removeTagGroup(
location.path,
- selectedTagGroupEntry.uuid
+ selectedTagGroupEntry.uuid,
);
}
}
@@ -115,12 +114,12 @@ function EditTagGroupDialog(props: Props) {
color,
textcolor,
locationId,
- children: selectedTagGroupEntry.children.map(tag => ({
+ children: selectedTagGroupEntry.children.map((tag) => ({
...tag,
color: applyChanges ? color : tag.color,
textcolor: applyChanges ? textcolor : tag.textcolor,
- style: tag.style
- }))
+ style: tag.style,
+ })),
});
onClose();
}
@@ -143,7 +142,7 @@ function EditTagGroupDialog(props: Props) {
borderStyle: 'solid',
borderColor: 'gray',
padding: '5px',
- background: color
+ background: color,
},
textcolor: {
width: '100%',
@@ -153,13 +152,13 @@ function EditTagGroupDialog(props: Props) {
borderStyle: 'solid',
borderColor: 'gray',
padding: '5px',
- background: textcolor
+ background: textcolor,
},
helpText: {
marginTop: '15px',
marginBottom: '5px',
- fontSize: '1rem'
- }
+ fontSize: '1rem',
+ },
};
return (
@@ -202,7 +201,7 @@ function EditTagGroupDialog(props: Props) {
>
{t('core:tagLibrary')}
</MenuItem>
- {locations.map(location => (
+ {locations.map((location) => (
<MenuItem key={location.uuid} value={location.uuid}>
{t('core:location') + ': ' + location.name}
</MenuItem>
@@ -226,7 +225,7 @@ function EditTagGroupDialog(props: Props) {
{displayColorPicker && (
<ColorPickerDialog
open={displayColorPicker}
- setColor={value => setColor(value)}
+ setColor={(value) => setColor(value)}
onClose={() => setDisplayColorPicker(false)}
color={color}
/>
@@ -249,7 +248,7 @@ function EditTagGroupDialog(props: Props) {
{displayTextColorPicker && (
<ColorPickerDialog
open={displayTextColorPicker}
- setColor={txtcolor => setTextcolor(txtcolor)}
+ setColor={(txtcolor) => setTextcolor(txtcolor)}
onClose={() => setDisplayTextColorPicker(!displayTextColorPicker)}
color={textcolor}
/>
@@ -291,7 +290,7 @@ function EditTagGroupDialog(props: Props) {
open={open}
// fullScreen={fullScreen}
onClose={onClose}
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
diff --git a/app/components/dialogs/FilePreviewDialog.tsx b/app/components/dialogs/FilePreviewDialog.tsx
index 50efdc62a..3ff668f9c 100644
--- a/app/components/dialogs/FilePreviewDialog.tsx
+++ b/app/components/dialogs/FilePreviewDialog.tsx
@@ -27,7 +27,7 @@ import DraggablePaper from '-/components/DraggablePaper';
import {
actions as AppActions,
AppDispatch,
- OpenedEntry
+ OpenedEntry,
} from '-/reducers/app';
import { TS } from '-/tagspaces.namespace';
import { findExtensionsForEntry } from '-/services/utils-io';
@@ -49,18 +49,14 @@ interface Props {
function FilePreviewDialog(props: Props) {
const { open = false, onClose, fsEntry } = props;
//const dispatch: AppDispatch = useDispatch();
- const {
- switchLocationTypeByID,
- switchCurrentLocationType
- } = useCurrentLocationContext();
+ const { switchLocationTypeByID, switchCurrentLocationType } =
+ useCurrentLocationContext();
const supportedFileTypes = useSelector(getSupportedFileTypes);
const currentTheme = useSelector(getCurrentTheme);
- const fileViewer: MutableRefObject<HTMLIFrameElement> = useRef<
- HTMLIFrameElement
- >(null);
- const fileViewerContainer: MutableRefObject<HTMLDivElement> = useRef<
- HTMLDivElement
- >(null);
+ const fileViewer: MutableRefObject<HTMLIFrameElement> =
+ useRef<HTMLIFrameElement>(null);
+ const fileViewerContainer: MutableRefObject<HTMLDivElement> =
+ useRef<HTMLDivElement>(null);
const eventID = useRef<string>(getUuid());
const openedFile: OpenedEntry = fsEntry
@@ -68,11 +64,11 @@ function FilePreviewDialog(props: Props) {
fsEntry.uuid,
supportedFileTypes,
fsEntry.path,
- fsEntry.isFile
+ fsEntry.isFile,
)
: undefined;
- useEventListener('message', e => {
+ useEventListener('message', (e) => {
if (typeof e.data === 'string') {
try {
const dataObj = JSON.parse(e.data);
@@ -82,7 +78,7 @@ function FilePreviewDialog(props: Props) {
} catch (ex) {
console.debug(
'useEventListener message:' + e.data + ' parse error:',
- ex
+ ex,
);
}
}
@@ -114,23 +110,23 @@ function FilePreviewDialog(props: Props) {
switchLocationTypeByID(openedFile.locationId).then(() => {
PlatformIO.loadTextFilePromise(
textFilePath,
- data.preview ? data.preview : false
+ data.preview ? data.preview : false,
)
- .then(content => {
+ .then((content) => {
const UTF8_BOM = '\ufeff';
if (content.indexOf(UTF8_BOM) === 0) {
content = content.substr(1);
}
let fileDirectory = extractContainingDirectoryPath(
textFilePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
if (AppConfig.isWeb) {
fileDirectory =
extractContainingDirectoryPath(
// eslint-disable-next-line no-restricted-globals
location.href,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
) +
'/' +
fileDirectory;
@@ -147,12 +143,12 @@ function FilePreviewDialog(props: Props) {
content,
fileDirectory,
!openedFile.editMode,
- currentTheme
+ currentTheme,
);
}
return switchCurrentLocationType();
})
- .catch(err => {
+ .catch((err) => {
console.warn('Error loading text content ' + err);
return switchCurrentLocationType();
});
@@ -192,7 +188,7 @@ function FilePreviewDialog(props: Props) {
marginRight: 'auto',
overflowY: 'hidden',
width: '90%',
- flexGrow: 1
+ flexGrow: 1,
}}
>
<p>{fsEntry.path}</p>
diff --git a/app/components/dialogs/FileUploadDialog.tsx b/app/components/dialogs/FileUploadDialog.tsx
index 67bb6cc7b..2783a1c11 100644
--- a/app/components/dialogs/FileUploadDialog.tsx
+++ b/app/components/dialogs/FileUploadDialog.tsx
@@ -34,7 +34,7 @@ import DraggablePaper from '-/components/DraggablePaper';
import {
actions as AppActions,
AppDispatch,
- getProgress
+ getProgress,
} from '-/reducers/app';
import { extractFileName } from '@tagspaces/tagspaces-common/paths';
import DialogCloseButton from '-/components/dialogs/DialogCloseButton';
@@ -57,7 +57,7 @@ function FileUploadDialog(props: Props) {
const {
loadDirectoryContent,
currentDirectoryPerspective,
- currentDirectoryPath
+ currentDirectoryPath,
} = useDirectoryContentContext();
const { currentLocation } = useCurrentLocationContext();
const progress = useSelector(getProgress);
@@ -81,7 +81,7 @@ function FileUploadDialog(props: Props) {
const stopAll = () => {
if (progress) {
- progress.map(fileProgress => {
+ progress.map((fileProgress) => {
const { abort } = fileProgress;
if (abort !== undefined && typeof abort === 'function') {
abort();
@@ -94,7 +94,7 @@ function FileUploadDialog(props: Props) {
let haveProgress = false;
function getTargetPath() {
- const pathProgress = progress.find(fileProgress => fileProgress.path);
+ const pathProgress = progress.find((fileProgress) => fileProgress.path);
if (pathProgress) {
return pathProgress.path;
}
@@ -163,14 +163,14 @@ function FileUploadDialog(props: Props) {
marginLeft: 'auto',
marginRight: 'auto',
width: '90%',
- flexGrow: 1
+ flexGrow: 1,
}}
>
<p>{t('core:moveCopyToPath') + ': ' + getTargetURL()}</p>
{progress &&
progress
.sort((a, b) => ('' + a.path).localeCompare(b.path))
- .map(fileProgress => {
+ .map((fileProgress) => {
const percentage = fileProgress.progress;
const { path, filePath } = fileProgress;
targetPath.current = path.split('?')[0];
@@ -194,14 +194,14 @@ function FileUploadDialog(props: Props) {
style={{
display: 'flex',
alignItems: 'center',
- wordBreak: 'break-word'
+ wordBreak: 'break-word',
}}
>
{filePath
? filePath
: extractFileName(
targetPath.current,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)}
{percentage === -1 && (
<Tooltip
diff --git a/app/components/dialogs/ImportExportTagGroupsDialog.tsx b/app/components/dialogs/ImportExportTagGroupsDialog.tsx
index 101a87a1b..12ebc9cae 100644
--- a/app/components/dialogs/ImportExportTagGroupsDialog.tsx
+++ b/app/components/dialogs/ImportExportTagGroupsDialog.tsx
@@ -50,32 +50,38 @@ function ImportExportTagGroupsDialog(props: Props) {
const { t } = useTranslation();
const selectedAll = useRef(true);
const [tagGroupList, setTagGroupList] = useState<Array<any>>(
- props.tagGroups.map(entry => ({ ...entry, selected: selectedAll.current }))
+ props.tagGroups.map((entry) => ({
+ ...entry,
+ selected: selectedAll.current,
+ })),
);
const handleToggleSelectAll = () => {
selectedAll.current = !selectedAll.current;
setTagGroupList(
- tagGroupList.map(entry => ({ ...entry, selected: selectedAll.current }))
+ tagGroupList.map((entry) => ({
+ ...entry,
+ selected: selectedAll.current,
+ })),
);
};
- const isSelected = () => tagGroupList.some(n => n.selected === true);
+ const isSelected = () => tagGroupList.some((n) => n.selected === true);
const handleTagGroup = (tagGroup: any, checked: boolean, index) => {
setTagGroupList([
...tagGroupList.slice(0, index),
{
...tagGroupList[index],
- selected: !checked
+ selected: !checked,
},
- ...tagGroupList.slice(index + 1)
+ ...tagGroupList.slice(index + 1),
]);
};
const onConfirm = () => {
const { showNotification } = props;
- const groupList = tagGroupList.filter(tagGroup => tagGroup.selected);
+ const groupList = tagGroupList.filter((tagGroup) => tagGroup.selected);
props.onClose();
if (props.dialogModeImport) {
props.importTagGroups(groupList);
@@ -99,7 +105,7 @@ function ImportExportTagGroupsDialog(props: Props) {
<Checkbox
id={tagGroup.uuid || tagGroup.key}
checked={tagGroup.selected}
- onClick={e => handleTagGroup(e, tagGroup.selected, index)}
+ onClick={(e) => handleTagGroup(e, tagGroup.selected, index)}
// onChange={e => handleChange(e)}
value={tagGroup.title}
name={tagGroup.title}
diff --git a/app/components/dialogs/IsTruncatedConfirmDialog.tsx b/app/components/dialogs/IsTruncatedConfirmDialog.tsx
index 5fb479422..dcb0c0a89 100644
--- a/app/components/dialogs/IsTruncatedConfirmDialog.tsx
+++ b/app/components/dialogs/IsTruncatedConfirmDialog.tsx
@@ -65,15 +65,15 @@ function IsTruncatedConfirmDialog(props: Props) {
editLocation(
{
...currentLocation,
- maxLoops: parseInt(loops, 10)
+ maxLoops: parseInt(loops, 10),
},
- false
+ false,
);
onClose();
if (currentLocation.type === locationType.TYPE_CLOUD) {
PlatformIO.enableObjectStoreSupport(currentLocation)
.then(() => openDirectory(currentDirectoryPath))
- .catch(error => {
+ .catch((error) => {
console.log('enableObjectStoreSupport', error);
});
}
diff --git a/app/components/dialogs/KeyboardDialog.tsx b/app/components/dialogs/KeyboardDialog.tsx
index db5882198..a0fa84f40 100644
--- a/app/components/dialogs/KeyboardDialog.tsx
+++ b/app/components/dialogs/KeyboardDialog.tsx
@@ -37,7 +37,7 @@ import { useTranslation } from 'react-i18next';
const PREFIX = 'KeyboardDialog';
const classes = {
- shortcutKey: `${PREFIX}-shortcutKey`
+ shortcutKey: `${PREFIX}-shortcutKey`,
};
const StyledDialog = styled(Dialog)(({ theme }) => ({
@@ -46,8 +46,8 @@ const StyledDialog = styled(Dialog)(({ theme }) => ({
font: 'Console',
fontFamily: 'monospace',
padding: '5px',
- borderRadius: '5px'
- }
+ borderRadius: '5px',
+ },
}));
interface Props {
@@ -78,12 +78,12 @@ function KeyboardDialog(props: Props) {
data-tid="keyboardShortCutsDialog"
style={{
minWidth: 350,
- overflow: 'auto'
+ overflow: 'auto',
}}
>
<List dense={false}>
{keyBindings &&
- Object.keys(keyBindings).map(shortcutKey => (
+ Object.keys(keyBindings).map((shortcutKey) => (
<ListItem key={shortcutKey}>
<ListItemText primary={t('core:' + shortcutKey)} />
<ListItemSecondaryAction className={classes.shortcutKey}>
diff --git a/app/components/dialogs/LinkGeneratorDialog.tsx b/app/components/dialogs/LinkGeneratorDialog.tsx
index c549ec553..f704dc964 100644
--- a/app/components/dialogs/LinkGeneratorDialog.tsx
+++ b/app/components/dialogs/LinkGeneratorDialog.tsx
@@ -42,16 +42,16 @@ import { useNotificationContext } from '-/hooks/useNotificationContext';
const PREFIX = 'LinkGeneratorDialog';
const classes = {
- root: `${PREFIX}-root`
+ root: `${PREFIX}-root`,
};
const StyledDialog = styled(Dialog)(({ theme: Theme }) => ({
[`& .${classes.root}`]: {
marginTop: 12,
'& .MuiInputBase-root': {
- height: 450
- }
- }
+ height: 450,
+ },
+ },
}));
interface Props {
@@ -67,13 +67,11 @@ function LinkGeneratorDialog(props: Props) {
const { open, onClose, path } = props;
const { t } = useTranslation();
const { showNotification } = useNotificationContext();
- const {
- switchLocationTypeByID,
- switchCurrentLocationType
- } = useCurrentLocationContext();
+ const { switchLocationTypeByID, switchCurrentLocationType } =
+ useCurrentLocationContext();
const linkValidityDuration = useRef<number>(60 * 15);
const signedLink = useRef<string>(undefined);
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
const theme = useTheme();
const fullScreen = useMediaQuery(theme.breakpoints.down('md'));
@@ -83,10 +81,10 @@ function LinkGeneratorDialog(props: Props) {
function setSignedLink() {
//if (switchLocationType) {
- switchLocationTypeByID(props.locationId).then(currentLocationId => {
+ switchLocationTypeByID(props.locationId).then((currentLocationId) => {
signedLink.current = PlatformIO.getURLforPath(
path,
- linkValidityDuration.current
+ linkValidityDuration.current,
);
forceUpdate();
return switchCurrentLocationType();
@@ -157,7 +155,7 @@ function LinkGeneratorDialog(props: Props) {
{t('core:copy')}
</Button>
</InputAdornment>
- )
+ ),
}}
label={
<>
@@ -191,17 +189,17 @@ function LinkGeneratorDialog(props: Props) {
// logoImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAMqElEQVR42u1ba3AV5RmOgL8cO23tHx0VrYqWjlOtWJ22o21n2k4vo9OpQAiEBHLhYhKSkCsXa4QmgXAxAZSABEICISGEcEu4g1xEQAQCAkqQcDMQciE5J+e2Z/ft857zfZmc2V1OC5yujnln3tndJOfsPs/33r9NWJ/0SZ/834WIems/6IAQa79e9/vWgb9PnH+/Vl9V1f4ulyfM7fYM1jStnIhKoSugy6El0GVClwotFvqh0EVCF0IXQIug7wudJ3Q29APoG70Itx681+vtb7d3h3V22R7FdWPHrS46f+GSerHpCn198d5p44VLisPhJEgh31e4g+Xg+7W2toc1N7c8hOuTN1vbaVLqDPewiCRlZFSqEjE65Z7oqOjJypv/HOc80XCW2BosJUCCVxRvv6SkGWFfnW96ANcHOjttlJaZp4yITKbY8VNobHzWPVP+vuGjJimnTn9Jwi0kAVaBV+7jgLdh4w5+iPrubidNmT5XCR81yfewY+Iy76nGjMsmtqoGPQGWgZepqNLt8VDOvxd4ho9MkuCtIiD04D0eH/j+fI5ov0T1qjRrzhJlWESiIXiYLz/8/6T4jGY9AXrwnOLkTTntFRCkaGGpMnSEBK9/aARCGgpyhsE6/luNHJvGJFhJgB58R0dnzw0Vr3cqQZYsWwPwCYbgY/HA4aOSaUbuQlpZvp6WLa+ikhVrb6f4m7VUWrZOQSBtHy1IsJQACV7eTLhAAkHKVtd63/KBz9aDByFYSbhGMSFTEItGwcULd4JoVdV1HrgUk2gFAebgXW73KIJU12z1YuU1PJQh+OEjJ1HOzAXkcrkFMC/BZXxHEMgqfxagHkUhlqrqLWQRAebgUYFx+anW1e/V4POm4FEDcDokm72bWFRNIxYNR9ZeAtCB115V9ROwro78QdUCAiRwEeUHQMPsdsfvcO3cvfcQIdWpojjR+TwqNpqcmUftHZ0BACVwfA8d+ayB9h/8jG60tMrfWUmAOXg8/ACYaRiqu5dwfevQp8cpPDJZFanNMNonprxHN260CvBqAMDzjU1cIjOBXNHRmNgM2rn7oPwbqwnQd3ac8trbbz2H6+bjJ84wQG80HtoIfOSYyTQ+YTpdudJsCJ59fnJGLskqkTUqJt1nMWiYpKtYRYC+s0NZG4aVfAzXF86eaySkJC8e2BA8fsdH7tQCwQO7Is7xHQw2ABBIYEBUU7tNZgDrCJDgFXR2N1rawpouX/sJrhvQgjJorwCpq/BACjSDvjhzPsCENagCBtyI9Cxnzl1gCwqI6nEggEGu37DdIgL09X2/nTv3hTWcOsud3SfXrl2n+InTFJi3Ifjo2ExCi0rHjp+WAPxHYfa5p85R+rFTxMK1QFpWPslegRWk4vOpdOnyNekuoSfAvL73+Dq7ktLq+3HcevNmOyUkv8v9vCF4HJHuUujgoc8NwZcg4A2q3U5Pw7zfPnyc2A6amq5SCuIAAqmIBdm0b/8R4yBYXRfCOkBf3/fu7KpuYZqTmp7rkT4bCN5PAEfxXXs+keAD8n3t5W/oWZj1kC276dX6vfQMSBgJoLe4AEJhdOzkGTpy9CQhwJqmwbXr6kNrARK80+nq6eygS7u7HZQ9rUDBKpk2Nxy4ttTtMQS/7Zsb9IvNu+glgGcC+PhK/R56DoT8bddBumx3yBihAy9dhaVsVa2vlI4JhQVI8Kjser4AOgeWQO/OKOKe3hQ8KkCUwfW9o30AATknz9LAmq0MWhAgSABhgzfuoNe3fUynxMp7VNWoD6CjxxpoTLzRPCCLY8jdTYQk+CtXm+WHudqbxnV5fkExenpj8GyKqP15ZXTgpci1nI+MAN9nAgJI+BVIeH7TTnq5bjcdFFUgMkUAeNQbHByh+pSLZ2C3UI7Dhfg2JgQEB1+zYQcf7+dz3DiRIIULV5j29PgZg+fW17B+h+gsobTxIsx+B/0SwF8G8N4kvAAXYSI2X232W4JIlQ3IGpxWWWMAXp91MrjPcCNr6Ai4o+YGaW80QYo/WuPr7MzBJ1LRolJdQ2Mkmqb2ZIJNl68yUAYM4IIEQQgTwwSVnr9ILKdhNUirDJ5N3STrJHs/PXyCIC2IXc8H2RcI2ta+yQu2ctV69a1wgDfr6eESs+cuIXYRSYCpqP6/UT5fSu4vNxPLgevX2eSZiAAShuB8yKZdNAixIg/BMWniVBppUm/gyGlTPfjJMYK0djscL8LSuFy/M/AIfr/H0cmpBuDVWNOePsk3zeHgGBy84vflc7XknPVDcs59mFxn1vlXt62dg58vCL4iSGDwL+7YT68hprwFn49mn9evPDTT131+7K8X2ru67EM0zd+l9sIVHLz8QJfNPoQ7u814EExzVOOePpsZp2n/mkf2bkdw8JpIhZf2k3PeI+R8/3G/zv4xuY5+SCyXbF30d6z0szD7V0HAC9v30W9X11I07h8H3x5j4POswwB+955DxM9ss9lfJQoC3oSEfmLlf4bjdRQwHE29CDSGqQ6+xpsbhIJIBL3g4LWW0+RcOAgEPEzOwiegA/2a/wNy7c0hljaXiyIwT3gKBLy2ZiNF8cYJVj7aBDyeUd2+8wBBurDt9hs/eLoz8AgaT+HYuO/AEV8wMerpcY22Ns030MAA1Bi8SfJzlf+ZHLkPkHPBM1j9x4QVgICiJ0HCg+SsS4B/eIidKQmmP4x3emL04FmxMBx41Tq4DcSO4ux1gcUAfHACZJVXBGWzdvEgM27CVMP5PfIvDy1kjy5LU3OR4672RnKV/Bpm/yOAfkoQILTop2TPfZC0DeHUcrmRsjPyaHR0Kvu8SbGVoG7asosgjm6H8w93BF6K3Kv/7NgpJqIClkAz8xZ5zHI+k8AdGp+LklNkgOAkqPYWWMJf2OwDSLDPH0jagkfpWt6TlBA/kcKjM8jM/Tgoi/bYBZf9092ClxuYPhKELkb+p3mFyxRYgmZW8kbBEtgdDh85EVCpmYcCQZLHQa6aSHLkPehb+e75T5Ba9Ag1FzxLyROTaWTsNIqNzzQFjzKb2XRjof6KY0/BJvTebGfBr/M4qhcvrVC4BjBKgzGi8uKOEIPQ25KgiThxckMDNZ+5Tizu+hQ2ex/4G3MGUerERIqImQrwGfqsI8Cvqdrsm6NglP6G+crf/YbmADH2ypCbG0yC2I8zLEJ4xr+5brfsAQJSoub1n5+uP0tLw1fS6glrQUIz+eRQPt2c8zSlv51AI2J45dMNUy7fv7xig8Zfj5rjH3cPPrg7yB2eOILA51SOuiL9mKUkqly7JYAEScRXexupJHIVrQL4lbGVVDq2gq6euEbdDhtlpk2Hz2camj3cD+Df1laU1ajMJYYyQw3MPjQbnPImMDe+qWf7jgMaV1wCtFl0puWl1QHd4MXDl6g0uoLK46uofJzQsVVUNqGSMjPzaURU2m3BYy+Qv4h3hEaEELyeBADvuRlSzR9xtKHWZp/3YsjJDYlpS7zwgzLu+hDvPFSRsI5WRK2G6VdTWXwlrY6HFYyrpMTYd1Hbp3AsMQGfoBV/VKGKIUhkiMEH7w9stu5XcLyJfpy3puUU2LQ7xPsApKgKtTV1+EhYHg0SxvtJSIrLoci4NIDPNgW/aHG5KlLsGAkeE+hQgzfvE2DSvP09mGeX5778mi2AX0pChDbvEjE9IofLSZ3NXVSTvolKY9ZQcvwMH/ixcSYrj9SL1tor3ChOLgJerAot+ODbYOoAdouWm22P4/oLHjpMSJiuRESlmG5/c8OUkT2LOu02arvSTilxM2hUHFpaE/A8c5hfWOLl8ho6QYJvbevQgbeKhP4dHbd4XPYQJzHe40uePFO+8WXcMoOErCmzaU7hRxRh7vPsNlrBvKWweF8GSZRmD9fTgbeUBN4WQzAMw3jqAR7y8guPWdMKTAelcl8wAiSNNQMfkajlzV6siIlvqgSPJsdq8Obv/olNEg6QlXhQftnBc9uXoEzA4zMaeg8FOZ4gGdLs0dvrwH8bSWDl62IGABM26x/MXpHRcmYWKeItkSkSfFfXHYO39HW4fA5eHywuV3QzRJNx2js57ysOdJ+QdyR4a83+7vuHTIKgdPWiihP9g3FgnPrOXIVdB/KeBI/2Vgf+O0cCrCJevCSl6x9kasyaWqAguhMktxf4+ywAH9L+Qanf9rE2TPQPcRMAPnISpWflK/zCNGS2BI+//06C12+kulw9JIhpjW3f/qO+V2cQ7XmW6EE1GbBrg8GG1eBD3z98iqlRevYsF8pZgiyQs0iHw1rwoe8fNJXdYTDOLyI2EI6LJHgLzN6a/gGZAfHB/XOcv7e+druvgLICvPX/JaY//17+n2CY1D7pkz7pE6vkP90Jgxz9IElIAAAAAElFTkSuQmCC"
/>
</InputAdornment>
- )
+ ),
}}
classes={{
- root: classes.root
+ root: classes.root,
}}
/>
</DialogContent>
<DialogActions
style={{
justifyContent: 'space-between',
- padding: fullScreen ? '10px 30px 30px 30px' : undefined
+ padding: fullScreen ? '10px 30px 30px 30px' : undefined,
}}
>
<Button
diff --git a/app/components/dialogs/LocalForm.tsx b/app/components/dialogs/LocalForm.tsx
index ec6feebbc..9a83821fc 100644
--- a/app/components/dialogs/LocalForm.tsx
+++ b/app/components/dialogs/LocalForm.tsx
@@ -45,19 +45,19 @@ function LocalForm(props: Props) {
const openDirectory = () => {
PlatformIO.selectDirectoryDialog()
- .then(selectedPaths => {
+ .then((selectedPaths) => {
const selectedPath = decodeURI(selectedPaths[0]);
setPath(selectedPath);
if (name.length < 1 && selectedPath.length > 0) {
const dirName = extractDirectoryName(
selectedPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
setName(dirName.charAt(0).toUpperCase() + dirName.slice(1));
}
return true;
})
- .catch(err => {
+ .catch((err) => {
console.log('selectDirectoryDialog failed with: ' + err);
});
};
@@ -72,7 +72,7 @@ function LocalForm(props: Props) {
margin="dense"
name="name"
inputProps={{ autoCorrect: 'off' }}
- onChange={event => setName(event.target.value)}
+ onChange={(event) => setName(event.target.value)}
value={name}
data-tid="locationName"
fullWidth={true}
@@ -90,7 +90,7 @@ function LocalForm(props: Props) {
fullWidth={true}
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
data-tid="locationPath"
- onChange={event => setPath(event.target.value)}
+ onChange={(event) => setPath(event.target.value)}
value={path}
// placeholder="Enter a folder path or select it with the button on the right"
InputProps={{
@@ -100,7 +100,7 @@ function LocalForm(props: Props) {
<FolderIcon />
</IconButton>
</InputAdornment>
- )
+ ),
}}
label={t('core:createLocationPath')}
/>
diff --git a/app/components/dialogs/MoveCopyFilesDialog.tsx b/app/components/dialogs/MoveCopyFilesDialog.tsx
index d8ab10b1b..eae010a74 100644
--- a/app/components/dialogs/MoveCopyFilesDialog.tsx
+++ b/app/components/dialogs/MoveCopyFilesDialog.tsx
@@ -25,7 +25,7 @@ import Tooltip from '-/components/Tooltip';
import ConfirmDialog from '-/components/dialogs/ConfirmDialog';
import {
checkDirsExistPromise,
- checkFilesExistPromise
+ checkFilesExistPromise,
} from '-/services/utils-io';
import { useTranslation } from 'react-i18next';
import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
@@ -47,23 +47,27 @@ function MoveCopyFilesDialog(props: Props) {
const { selectedEntries } = useSelectedEntriesContext();
const [targetPath, setTargetPath] = useState(
- currentDirectoryPath ? currentDirectoryPath : ''
+ currentDirectoryPath ? currentDirectoryPath : '',
);
const isCopy = useRef<boolean>(true);
const [entriesExistPath, setEntriesExistPath] = useState<string[]>(undefined);
const dirProp = useRef({});
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
const { open, entries, onClose } = props;
let allEntries = entries && entries.length > 0 ? entries : selectedEntries;
const selectedFiles = allEntries
- ? allEntries.filter(fsEntry => fsEntry.isFile).map(fsentry => fsentry.path)
+ ? allEntries
+ .filter((fsEntry) => fsEntry.isFile)
+ .map((fsentry) => fsentry.path)
: [];
const selectedDirs = allEntries
- ? allEntries.filter(fsEntry => !fsEntry.isFile).map(fsentry => fsentry.path)
+ ? allEntries
+ .filter((fsEntry) => !fsEntry.isFile)
+ .map((fsentry) => fsentry.path)
: [];
useEffect(() => {
@@ -74,9 +78,9 @@ function MoveCopyFilesDialog(props: Props) {
!PlatformIO.haveObjectStoreSupport() &&
!PlatformIO.haveWebDavSupport()
) {
- const promises = selectedDirs.map(dirPath => {
+ const promises = selectedDirs.map((dirPath) => {
try {
- return PlatformIO.getDirProperties(dirPath).then(prop => {
+ return PlatformIO.getDirProperties(dirPath).then((prop) => {
dirProp.current[dirPath] = prop;
return true;
});
@@ -101,7 +105,7 @@ function MoveCopyFilesDialog(props: Props) {
}*/
function getEntriesCount(dirPaths): Array<any> {
- return dirPaths.map(path => {
+ return dirPaths.map((path) => {
const currDirProp = dirProp.current[path];
let count = 0;
if (currDirProp) {
@@ -117,13 +121,13 @@ function MoveCopyFilesDialog(props: Props) {
function handleCopyMove(copy = true) {
if (selectedFiles.length > 0) {
- checkFilesExistPromise(selectedFiles, targetPath).then(exist =>
- handleEntryExist(copy, exist)
+ checkFilesExistPromise(selectedFiles, targetPath).then((exist) =>
+ handleEntryExist(copy, exist),
);
}
if (selectedDirs.length > 0) {
- checkDirsExistPromise(selectedDirs, targetPath).then(exist =>
- handleEntryExist(copy, exist)
+ checkDirsExistPromise(selectedDirs, targetPath).then((exist) =>
+ handleEntryExist(copy, exist),
);
}
}
@@ -214,11 +218,11 @@ function MoveCopyFilesDialog(props: Props) {
width: 550,
maxHeight: 200,
marginLeft: -15,
- marginBottom: 20
+ marginBottom: 20,
}}
>
{allEntries.length > 0 &&
- allEntries.map(entry => (
+ allEntries.map((entry) => (
<ListItem title={entry.path} key={entry.path}>
<ListItemIcon>
{entry.isFile ? <FileIcon /> : <FolderIcon />}
@@ -282,7 +286,7 @@ function MoveCopyFilesDialog(props: Props) {
formatFileExist(entriesExistPath) +
' exist do you want to override it?'
}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
if (isCopy.current) {
handleCopyFiles();
diff --git a/app/components/dialogs/MoveOrCopyFilesDialog.tsx b/app/components/dialogs/MoveOrCopyFilesDialog.tsx
index 716bbc8c6..bc5b757eb 100644
--- a/app/components/dialogs/MoveOrCopyFilesDialog.tsx
+++ b/app/components/dialogs/MoveOrCopyFilesDialog.tsx
@@ -67,29 +67,29 @@ function MoveOrCopyFilesDialog(props: Props) {
promises.push(
renameFilePromise(
file.path,
- currentDirectoryPath + AppConfig.dirSeparator + file.name
+ currentDirectoryPath + AppConfig.dirSeparator + file.name,
)
.then(() => true)
- .catch(error => {
+ .catch((error) => {
console.log('renameFilePromise', error);
- })
+ }),
);
} else {
promises.push(
copyFilePromise(
file.path,
- currentDirectoryPath + AppConfig.dirSeparator + file.name
+ currentDirectoryPath + AppConfig.dirSeparator + file.name,
)
.then(() => true)
- .catch(error => {
+ .catch((error) => {
console.log('copyFilePromise', error);
- })
+ }),
);
}
}
Promise.all(promises)
.then(() => openDirectory(currentDirectoryPath))
- .catch(error => {
+ .catch((error) => {
console.log('promises', error);
});
};
@@ -114,7 +114,7 @@ function MoveOrCopyFilesDialog(props: Props) {
<DialogContent
style={{
overflowX: 'hidden',
- overflowY: 'auto'
+ overflowY: 'auto',
}}
>
<Typography variant="subtitle2">{t('selectedFiles')}</Typography>
diff --git a/app/components/dialogs/NewAudioDialog.tsx b/app/components/dialogs/NewAudioDialog.tsx
index b88b02472..589f8f22f 100644
--- a/app/components/dialogs/NewAudioDialog.tsx
+++ b/app/components/dialogs/NewAudioDialog.tsx
@@ -62,7 +62,7 @@ function NewAudioDialog(props: Props) {
minWidth: 200,
minHeight: 200,
marginBottom: 20,
- overflow: 'overlay'
+ overflow: 'overlay',
}}
data-tid="keyboardShortCutsDialog"
>
diff --git a/app/components/dialogs/NewEntryDialog.tsx b/app/components/dialogs/NewEntryDialog.tsx
index fbdda94d6..d63017360 100644
--- a/app/components/dialogs/NewEntryDialog.tsx
+++ b/app/components/dialogs/NewEntryDialog.tsx
@@ -65,7 +65,7 @@ function NewEntryDialog(props: Props) {
minWidth: 200,
minHeight: 300,
marginBottom: 20,
- overflow: 'overlay'
+ overflow: 'overlay',
}}
data-tid="keyboardShortCutsDialog"
>
diff --git a/app/components/dialogs/NewFileDialog.tsx b/app/components/dialogs/NewFileDialog.tsx
index 90840a8ad..181d987e9 100644
--- a/app/components/dialogs/NewFileDialog.tsx
+++ b/app/components/dialogs/NewFileDialog.tsx
@@ -61,7 +61,7 @@ function NewFileDialog(props: Props) {
minWidth: 200,
minHeight: 200,
marginBottom: 20,
- overflow: 'overlay'
+ overflow: 'overlay',
}}
data-tid="keyboardShortCutsDialog"
>
diff --git a/app/components/dialogs/ObjectStoreForm.tsx b/app/components/dialogs/ObjectStoreForm.tsx
index f116221a8..f78252854 100644
--- a/app/components/dialogs/ObjectStoreForm.tsx
+++ b/app/components/dialogs/ObjectStoreForm.tsx
@@ -73,7 +73,7 @@ export const regions = [
'me-south-1',
// 'cn-north-1',
// 'cn-northwest-1',
- 'sa-east-1'
+ 'sa-east-1',
];
interface Props {
@@ -127,7 +127,7 @@ function ObjectStoreForm(props: Props) {
setSessionToken,
setBucketName,
setEndpointURL,
- setRegion
+ setRegion,
} = props;
const { t } = useTranslation();
@@ -154,7 +154,7 @@ function ObjectStoreForm(props: Props) {
inputProps={{ autoCorrect: 'off' }}
fullWidth={true}
data-tid="locationName"
- onChange={event => setStoreName(event.target.value)}
+ onChange={(event) => setStoreName(event.target.value)}
value={storeName}
label={t('core:createLocationName')}
/>
@@ -171,7 +171,7 @@ function ObjectStoreForm(props: Props) {
fullWidth={true}
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
data-tid="locationPath"
- onChange={event => setStorePath(event.target.value)}
+ onChange={(event) => setStorePath(event.target.value)}
value={storePath}
label={t('core:createLocationPath')}
/>
@@ -189,7 +189,7 @@ function ObjectStoreForm(props: Props) {
fullWidth={true}
data-tid="accessKeyId"
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
- onChange={event => setAccessKeyId(event.target.value)}
+ onChange={(event) => setAccessKeyId(event.target.value)}
value={accessKeyId}
label={t('core:accessKeyId')}
/>
@@ -208,7 +208,7 @@ function ObjectStoreForm(props: Props) {
fullWidth={true}
data-tid="secretAccessKey"
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
- onChange={event => setSecretAccessKey(event.target.value)}
+ onChange={(event) => setSecretAccessKey(event.target.value)}
value={secretAccessKey}
label={t('core:secretAccessKey')}
InputProps={{
@@ -222,7 +222,7 @@ function ObjectStoreForm(props: Props) {
{showSecretAccessKey ? <Visibility /> : <VisibilityOff />}
</IconButton>
</InputAdornment>
- )
+ ),
}}
/>
{/* {state.cloudErrorSecretAccessKey && (
@@ -240,7 +240,7 @@ function ObjectStoreForm(props: Props) {
fullWidth={true}
data-tid="sessionTokenTID"
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
- onChange={event => setSessionToken(event.target.value)}
+ onChange={(event) => setSessionToken(event.target.value)}
value={sessionToken}
label={t('core:sessionToken')}
/>
@@ -254,7 +254,7 @@ function ObjectStoreForm(props: Props) {
fullWidth={true}
data-tid="bucketName"
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
- onChange={event => setBucketName(event.target.value)}
+ onChange={(event) => setBucketName(event.target.value)}
value={bucketName}
label={t('core:bucketName')}
/>
@@ -273,7 +273,7 @@ function ObjectStoreForm(props: Props) {
fullWidth={true}
data-tid="endpointURL"
placeholder={t('s3serviceURL')}
- onChange={event => setEndpointURL(event.target.value)}
+ onChange={(event) => setEndpointURL(event.target.value)}
value={endpointURL}
label={t('core:endpointURL')}
/>
@@ -291,7 +291,7 @@ function ObjectStoreForm(props: Props) {
onChange={handleRegionChange}
onInputChange={handleRegionChange}
placeholder={t('core:regionSearch')}
- renderInput={params => (
+ renderInput={(params) => (
<TextField
{...params}
label={t('core:regionSearch')}
diff --git a/app/components/dialogs/OnboardingDialog.tsx b/app/components/dialogs/OnboardingDialog.tsx
index c222c11c1..228b3a301 100644
--- a/app/components/dialogs/OnboardingDialog.tsx
+++ b/app/components/dialogs/OnboardingDialog.tsx
@@ -37,7 +37,7 @@ import NewLook from '-/assets/images/desktop.svg';
import {
getCurrentTheme,
getPersistTagsInSidecarFile,
- actions as SettingsActions
+ actions as SettingsActions,
} from '-/reducers/settings';
import DialogCloseButton from '-/components/dialogs/DialogCloseButton';
import Links from '-/content/links';
@@ -80,14 +80,14 @@ function OnboardingDialog(props: Props) {
}
}, []);*/
- const setPersistTagsInSidecarFile = isPersistTagsInSidecar => {
+ const setPersistTagsInSidecarFile = (isPersistTagsInSidecar) => {
dispatch(
- SettingsActions.setPersistTagsInSidecarFile(isPersistTagsInSidecar)
+ SettingsActions.setPersistTagsInSidecarFile(isPersistTagsInSidecar),
);
};
//const maxSteps = 4;
- const setCurrentTheme = theme => {
+ const setCurrentTheme = (theme) => {
dispatch(SettingsActions.setCurrentTheme(theme));
};
@@ -112,7 +112,7 @@ function OnboardingDialog(props: Props) {
<DialogContent
style={{
marginTop: 20,
- overflowY: 'auto'
+ overflowY: 'auto',
}}
>
<style>
@@ -133,7 +133,7 @@ function OnboardingDialog(props: Props) {
slidesPerView={1}
navigation="true"
pagination={{
- clickable: true
+ clickable: true,
}}
modules={[Pagination, Navigation]}
>
@@ -142,7 +142,7 @@ function OnboardingDialog(props: Props) {
style={{
textAlign: 'center',
overflowX: 'hidden',
- padding: 50
+ padding: 50,
}}
>
<Typography variant="h5">
@@ -172,7 +172,7 @@ function OnboardingDialog(props: Props) {
<div
style={{
textAlign: 'center',
- padding: 50
+ padding: 50,
}}
>
<Typography variant="h5">
@@ -246,7 +246,7 @@ function OnboardingDialog(props: Props) {
<div
style={{
textAlign: 'center',
- padding: 50
+ padding: 50,
}}
>
<Typography variant="h5">
@@ -281,7 +281,7 @@ function OnboardingDialog(props: Props) {
<div
style={{
textAlign: 'center',
- padding: 50
+ padding: 50,
}}
>
<Typography variant="h5">
diff --git a/app/components/dialogs/OpenLinkDialog.tsx b/app/components/dialogs/OpenLinkDialog.tsx
index 6f952b354..2b130c17d 100644
--- a/app/components/dialogs/OpenLinkDialog.tsx
+++ b/app/components/dialogs/OpenLinkDialog.tsx
@@ -92,7 +92,7 @@ function OpenLinkDialog(props: Props) {
onClose={onClose}
style={{ minWidth: 300 }}
// fullScreen={fullScreen}
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@@ -112,7 +112,7 @@ function OpenLinkDialog(props: Props) {
autoFocus
name="name"
label={t('core:link')}
- onChange={event => {
+ onChange={(event) => {
const { target } = event;
setLinkURL(target.value);
}}
@@ -123,7 +123,7 @@ function OpenLinkDialog(props: Props) {
<InputAdornment position="start">
<InfoIcon tooltip="TagSpace links begin with ts://? and are used for internal sharing of files and folders" />
</InputAdornment>
- )
+ ),
}}
/>
</FormControl>
diff --git a/app/components/dialogs/ProTeaserDialog.tsx b/app/components/dialogs/ProTeaserDialog.tsx
index a89ec95e1..9602fd32c 100644
--- a/app/components/dialogs/ProTeaserDialog.tsx
+++ b/app/components/dialogs/ProTeaserDialog.tsx
@@ -65,14 +65,14 @@ function Slide(props: SlideProps) {
videoURL,
videoPosterUrl,
pictureHeight,
- pictureShadow
+ pictureShadow,
} = props;
return (
<swiper-slide>
<div
style={{
padding: 50,
- textAlign: 'left'
+ textAlign: 'left',
}}
>
<Typography
@@ -85,7 +85,7 @@ function Slide(props: SlideProps) {
<Typography variant="subtitle1">{description}</Typography>
)}
{items &&
- items.map(item => (
+ items.map((item) => (
<Typography variant="subtitle1">&#x2605;&nbsp;{item}</Typography>
))}
<Typography variant="subtitle1">&nbsp;</Typography>
@@ -106,7 +106,7 @@ function Slide(props: SlideProps) {
boxShadow: pictureShadow
? '2px 2px 13px 0 rgb(0 0 0 / 75%'
: 'none',
- maxWidth: '95%'
+ maxWidth: '95%',
}}
src={pictureURL}
alt=""
@@ -182,7 +182,7 @@ function ProTeaserDialog(props: Props) {
<DialogContent
style={{
paddingBottom: 0,
- overflowY: 'auto'
+ overflowY: 'auto',
}}
>
<style>
@@ -205,7 +205,7 @@ function ProTeaserDialog(props: Props) {
navigation={true}
/*scrollbar={true}*/
pagination={{
- clickable: true
+ clickable: true,
}}
cssMode={false}
/*keyboard={{
diff --git a/app/components/dialogs/ProgressDialog.tsx b/app/components/dialogs/ProgressDialog.tsx
index e35caf7b5..b4f92e05e 100644
--- a/app/components/dialogs/ProgressDialog.tsx
+++ b/app/components/dialogs/ProgressDialog.tsx
@@ -48,7 +48,7 @@ function ProgressDialog(props: Props) {
style={{
marginLeft: 'auto',
marginRight: 'auto',
- flexGrow: 1
+ flexGrow: 1,
}}
>
<CircularProgress size={24} />
diff --git a/app/components/dialogs/RenameEntryDialog.tsx b/app/components/dialogs/RenameEntryDialog.tsx
index e9ae35eab..601f77377 100644
--- a/app/components/dialogs/RenameEntryDialog.tsx
+++ b/app/components/dialogs/RenameEntryDialog.tsx
@@ -29,7 +29,7 @@ import Dialog from '@mui/material/Dialog';
import {
extractContainingDirectoryPath,
extractDirectoryName,
- extractFileName
+ extractFileName,
} from '@tagspaces/tagspaces-common/paths';
import DraggablePaper from '-/components/DraggablePaper';
import AppConfig from '-/AppConfig';
@@ -64,12 +64,12 @@ function RenameEntryDialog(props: Props) {
if (isFile) {
defaultName = extractFileName(
lastSelectedEntry.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
} else {
defaultName = extractDirectoryName(
lastSelectedEntry.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
}
originPath = lastSelectedEntry.path;
@@ -77,7 +77,7 @@ function RenameEntryDialog(props: Props) {
isFile = false;
defaultName = extractDirectoryName(
currentDirectoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
originPath = currentDirectoryPath;
} else {
@@ -90,9 +90,9 @@ function RenameEntryDialog(props: Props) {
const name = useRef<string>(defaultName);
// eslint-disable-next-line no-unused-vars
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
- const onInputFocus = event => {
+ const onInputFocus = (event) => {
if (name.current) {
event.preventDefault();
const { target } = event;
@@ -139,7 +139,7 @@ function RenameEntryDialog(props: Props) {
if (isFile) {
const fileDirectory = extractContainingDirectoryPath(
lastSelectedEntry.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const newFilePath =
fileDirectory + PlatformIO.getDirSeparator() + name.current;
@@ -158,7 +158,7 @@ function RenameEntryDialog(props: Props) {
scroll="paper"
aria-labelledby="draggable-dialog-title"
PaperComponent={DraggablePaper}
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@@ -182,7 +182,7 @@ function RenameEntryDialog(props: Props) {
name="entryName"
label={t(
'core:' +
- (isFile ? 'renameNewFileName' : 'createNewDirectoryTitleName')
+ (isFile ? 'renameNewFileName' : 'createNewDirectoryTitleName'),
)}
onChange={handleInputChange}
onFocus={onInputFocus}
diff --git a/app/components/dialogs/ResolveConflictDialog.tsx b/app/components/dialogs/ResolveConflictDialog.tsx
index 86cf04377..543df31ed 100644
--- a/app/components/dialogs/ResolveConflictDialog.tsx
+++ b/app/components/dialogs/ResolveConflictDialog.tsx
@@ -30,7 +30,7 @@ import { OpenedEntry } from '-/reducers/app';
import {
extractContainingDirectoryPath,
extractFileExtension,
- extractFileName
+ extractFileName,
} from '@tagspaces/tagspaces-common/paths';
import PlatformFacade from '-/services/platform-facade';
import AppConfig from '-/AppConfig';
@@ -75,7 +75,7 @@ function ResolveConflictDialog(props: Props) {
<DialogContent
style={{
overflow: 'auto',
- minWidth: 400
+ minWidth: 400,
}}
>
{isSaveAs ? (
@@ -118,7 +118,7 @@ function ResolveConflictDialog(props: Props) {
.saveAs(
extractContainingDirectoryPath(props.file.path) +
PlatformFacade.getDirSeparator() +
- copyFileName.current
+ copyFileName.current,
)
.then(() => {
onClose();
diff --git a/app/components/dialogs/WebdavForm.tsx b/app/components/dialogs/WebdavForm.tsx
index 6447fa247..ad11fb1f4 100644
--- a/app/components/dialogs/WebdavForm.tsx
+++ b/app/components/dialogs/WebdavForm.tsx
@@ -26,7 +26,7 @@ import {
IconButton,
InputAdornment,
MenuItem,
- Select
+ Select,
} from '@mui/material';
import { Visibility, VisibilityOff } from '@mui/icons-material';
import { useTranslation } from 'react-i18next';
@@ -67,7 +67,7 @@ function WebdavForm(props: Props) {
authType,
setAuthType,
secretAccessKey,
- setSecretAccessKey
+ setSecretAccessKey,
} = props;
const { t } = useTranslation();
@@ -75,7 +75,7 @@ function WebdavForm(props: Props) {
None: 'none',
Basic: 'password',
Digest: 'digest',
- Token: 'token'
+ Token: 'token',
};
return (
@@ -87,7 +87,7 @@ function WebdavForm(props: Props) {
margin="dense"
name="name"
inputProps={{ autoCorrect: 'off' }}
- onChange={event => setName(event.target.value)}
+ onChange={(event) => setName(event.target.value)}
value={name}
label={t('core:createLocationName')}
data-tid="locationName"
@@ -107,7 +107,7 @@ function WebdavForm(props: Props) {
setAuthType(event.target.value)
}
>
- {Object.keys(AuthTypes).map(auth => (
+ {Object.keys(AuthTypes).map((auth) => (
<MenuItem key={auth} value={AuthTypes[auth]}>
{auth}
</MenuItem>
@@ -125,7 +125,7 @@ function WebdavForm(props: Props) {
fullWidth={true}
data-tid="userNameIdTID"
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
- onChange={event => setUserName(event.target.value)}
+ onChange={(event) => setUserName(event.target.value)}
label={t('core:userName')}
value={userName}
/>
@@ -140,7 +140,7 @@ function WebdavForm(props: Props) {
fullWidth={true}
data-tid="passwordTID"
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
- onChange={event => setPassword(event.target.value)}
+ onChange={(event) => setPassword(event.target.value)}
value={password}
label={t('core:password')}
InputProps={{
@@ -154,7 +154,7 @@ function WebdavForm(props: Props) {
{showPassword ? <Visibility /> : <VisibilityOff />}
</IconButton>
</InputAdornment>
- )
+ ),
}}
/>
</FormControl>
@@ -171,7 +171,7 @@ function WebdavForm(props: Props) {
fullWidth={true}
data-tid="webDavToken"
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
- onChange={event => setSecretAccessKey(event.target.value)}
+ onChange={(event) => setSecretAccessKey(event.target.value)}
value={secretAccessKey}
label={t('core:webDavToken')}
InputProps={{
@@ -185,7 +185,7 @@ function WebdavForm(props: Props) {
{showPassword ? <Visibility /> : <VisibilityOff />}
</IconButton>
</InputAdornment>
- )
+ ),
}}
/>
</FormControl>
@@ -199,7 +199,7 @@ function WebdavForm(props: Props) {
fullWidth={true}
data-tid="endpointURL"
placeholder={t('webdavServiceURL')}
- onChange={event => setEndpointURL(event.target.value)}
+ onChange={(event) => setEndpointURL(event.target.value)}
value={endpointURL}
label={t('core:endpointURL')}
/>
diff --git a/app/components/dialogs/components/CreateDirectory.tsx b/app/components/dialogs/components/CreateDirectory.tsx
index 5cdeb34b6..a98014884 100644
--- a/app/components/dialogs/components/CreateDirectory.tsx
+++ b/app/components/dialogs/components/CreateDirectory.tsx
@@ -31,7 +31,7 @@ import TextField from '@mui/material/TextField';
import { useTargetPathContext } from '-/components/dialogs/hooks/useTargetPathContext';
import Typography from '@mui/material/Typography';
import FileUploadContainer, {
- FileUploadContainerRef
+ FileUploadContainerRef,
} from '-/components/FileUploadContainer';
import { useTranslation } from 'react-i18next';
import { useIOActionsContext } from '-/hooks/useIOActionsContext';
@@ -40,14 +40,14 @@ import { useNotificationContext } from '-/hooks/useNotificationContext';
const PREFIX = 'CreateDirectory';
const classes = {
- createButton: `${PREFIX}-createButton`
+ createButton: `${PREFIX}-createButton`,
};
const Root = styled('div')(() => ({
[`& .${classes.createButton}`]: {
width: '100%',
- textAlign: 'center'
- }
+ textAlign: 'center',
+ },
}));
interface Props {
@@ -125,7 +125,7 @@ function CreateDirectory(props: Props) {
targetDirectoryPath +
PlatformIO.getDirSeparator() +
decodeURIComponent(fileName),
- onUploadProgress
+ onUploadProgress,
)
.then(() => {
if (PlatformIO.haveObjectStoreSupport()) {
@@ -133,10 +133,14 @@ function CreateDirectory(props: Props) {
dispatch(AppActions.setProgress(fileUrl.current, 100));
}
})
- .catch(e => {
+ .catch((e) => {
console.log('downloadFile error:', e);
dispatch(
- AppActions.setProgress(fileUrl.current, -1, t('core:errorCORS'))
+ AppActions.setProgress(
+ fileUrl.current,
+ -1,
+ t('core:errorCORS'),
+ ),
);
showNotification('downloadFile error' + e.message, 'error', true);
});
@@ -212,7 +216,7 @@ function CreateDirectory(props: Props) {
name="name"
fullWidth={true}
data-tid={tid('newUrlTID')}
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter') {
downloadURL();
}
@@ -224,7 +228,7 @@ function CreateDirectory(props: Props) {
<ButtonGroup
style={{
textAlign: 'center',
- width: '100%'
+ width: '100%',
}}
>
<Button
diff --git a/app/components/dialogs/components/CreateFile.tsx b/app/components/dialogs/components/CreateFile.tsx
index e58956227..7c805e12c 100644
--- a/app/components/dialogs/components/CreateFile.tsx
+++ b/app/components/dialogs/components/CreateFile.tsx
@@ -40,14 +40,14 @@ import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
const PREFIX = 'CreateFile';
const classes = {
- createButton: `${PREFIX}-createButton`
+ createButton: `${PREFIX}-createButton`,
};
const StyledGrid = styled(Grid)(() => ({
[`& .${classes.createButton}`]: {
width: '100%',
- textAlign: 'center'
- }
+ textAlign: 'center',
+ },
}));
interface Props {
@@ -71,12 +71,12 @@ function CreateFile(props: Props) {
'note' +
AppConfig.beginTagContainer +
formatDateTime4Tag(new Date(), true) +
- AppConfig.endTagContainer
+ AppConfig.endTagContainer,
);
const [inputError, setInputError] = useState<boolean>(false);
const { createFileAdvanced } = useOpenedEntryContext();
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0, undefined);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0, undefined);
const fileContent = '';
const noSuitableLocation = !targetDirectoryPath;
@@ -101,7 +101,7 @@ function CreateFile(props: Props) {
targetDirectoryPath,
fileName.current,
fileContent,
- 'html'
+ 'html',
);
onClose();
}
@@ -114,7 +114,7 @@ function CreateFile(props: Props) {
targetDirectoryPath,
fileName.current,
fileContent,
- 'txt'
+ 'txt',
);
onClose();
}
@@ -127,13 +127,13 @@ function CreateFile(props: Props) {
targetDirectoryPath,
fileName.current,
fileContent,
- 'md'
+ 'md',
);
onClose();
}
}
- const onInputFocus = event => {
+ const onInputFocus = (event) => {
if (fileName.current) {
event.preventDefault();
const { target } = event;
@@ -180,7 +180,7 @@ function CreateFile(props: Props) {
label={t('core:newFileName')}
onChange={handleInputChange}
onFocus={onInputFocus}
- onKeyDown={event => {
+ onKeyDown={(event) => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
event.stopPropagation();
@@ -201,7 +201,7 @@ function CreateFile(props: Props) {
<ButtonGroup
style={{
textAlign: 'center',
- width: '100%'
+ width: '100%',
}}
>
<Button
diff --git a/app/components/dialogs/hooks/TargetPathContextProvider.tsx b/app/components/dialogs/hooks/TargetPathContextProvider.tsx
index 140b70b3e..a15ae1f6d 100644
--- a/app/components/dialogs/hooks/TargetPathContextProvider.tsx
+++ b/app/components/dialogs/hooks/TargetPathContextProvider.tsx
@@ -28,7 +28,7 @@ type TargetPathContextData = {
};
export const TargetPathContext = createContext<TargetPathContextData>({
- targetDirectoryPath: undefined
+ targetDirectoryPath: undefined,
});
export type TargetPathContextProviderProps = {
@@ -36,13 +36,11 @@ export type TargetPathContextProviderProps = {
};
export const TargetPathContextProvider = ({
- children
+ children,
}: TargetPathContextProviderProps) => {
const { selectedEntries } = useSelectedEntriesContext();
- const {
- currentDirectoryPerspective,
- currentDirectoryPath
- } = useDirectoryContentContext();
+ const { currentDirectoryPerspective, currentDirectoryPath } =
+ useDirectoryContentContext();
const firstRWLocation = useSelector(getFirstRWLocation);
@@ -61,13 +59,13 @@ export const TargetPathContextProvider = ({
targetDirectoryPath = firstRWLocation.path;
}
return {
- targetDirectoryPath
+ targetDirectoryPath,
};
}, [
firstRWLocation,
selectedEntries,
currentDirectoryPath,
- currentDirectoryPerspective
+ currentDirectoryPerspective,
]);
return (
diff --git a/app/components/dialogs/settings/MapTileServerDialog.tsx b/app/components/dialogs/settings/MapTileServerDialog.tsx
index f690b74b8..9c2ab4401 100644
--- a/app/components/dialogs/settings/MapTileServerDialog.tsx
+++ b/app/components/dialogs/settings/MapTileServerDialog.tsx
@@ -55,7 +55,7 @@ function MapTileServerDialog(props: Props) {
{t(
props.tileServer.uuid
? 'core:tileServerDialogEdit'
- : 'core:tileServerDialogAdd'
+ : 'core:tileServerDialogAdd',
)}
<DialogCloseButton testId="closeMapTileServerTID" onClose={onClose} />
</DialogTitle>
@@ -79,10 +79,10 @@ function MapTileServerDialog(props: Props) {
uuid: props.tileServer.uuid,
name: name.current,
serverInfo: serverInfo.current,
- serverURL: serverURL.current
+ serverURL: serverURL.current,
},
- isDefault.current
- )
+ isDefault.current,
+ ),
);
} else {
dispatch(
@@ -91,10 +91,10 @@ function MapTileServerDialog(props: Props) {
uuid: props.tileServer.uuid,
name: name.current,
serverInfo: serverInfo.current,
- serverURL: serverURL.current
+ serverURL: serverURL.current,
},
- isDefault.current
- )
+ isDefault.current,
+ ),
);
}
props.onClose();
@@ -111,7 +111,7 @@ function MapTileServerDialog(props: Props) {
autoFocus
name="name"
label={t('core:tileServerNameTitle')}
- onChange={event => {
+ onChange={(event) => {
const { target } = event;
name.current = target.value;
validateForm();
@@ -126,7 +126,7 @@ function MapTileServerDialog(props: Props) {
margin="dense"
name="serverURL"
label={t('core:tileServerUrlTitle')}
- onChange={event => {
+ onChange={(event) => {
const { target } = event;
serverURL.current = target.value;
}}
@@ -141,7 +141,7 @@ function MapTileServerDialog(props: Props) {
margin="dense"
name="serverInfo"
label={t('core:tileServerInfoTitle')}
- onChange={event => {
+ onChange={(event) => {
const { target } = event;
serverInfo.current = target.value;
}}
@@ -165,13 +165,13 @@ function MapTileServerDialog(props: Props) {
const renderActions = () => (
<DialogActions
style={{
- justifyContent: props.tileServer.uuid ? 'space-between' : 'flex-end'
+ justifyContent: props.tileServer.uuid ? 'space-between' : 'flex-end',
}}
>
{props.tileServer.uuid && (
<Button
style={{
- marginLeft: 10
+ marginLeft: 10,
}}
data-tid="deleteTileServerTID"
onClick={() => {
diff --git a/app/components/dialogs/settings/SettingsAdvanced.tsx b/app/components/dialogs/settings/SettingsAdvanced.tsx
index 82fd1a70e..bb2b746f7 100644
--- a/app/components/dialogs/settings/SettingsAdvanced.tsx
+++ b/app/components/dialogs/settings/SettingsAdvanced.tsx
@@ -36,7 +36,7 @@ import {
actions as SettingsActions,
getSettings,
getMapTileServers,
- isDevMode
+ isDevMode,
} from '-/reducers/settings';
import { TS } from '-/tagspaces.namespace';
import MapTileServerDialog from '-/components/dialogs/settings/MapTileServerDialog';
@@ -56,24 +56,24 @@ const classes = {
root: `${PREFIX}-root`,
listItem: `${PREFIX}-listItem`,
pro: `${PREFIX}-pro`,
- colorChooserButton: `${PREFIX}-colorChooserButton`
+ colorChooserButton: `${PREFIX}-colorChooserButton`,
};
const Root = styled('div')(({ theme }) => ({
[`& .${classes.root}`]: {
- overflowX: 'hidden'
+ overflowX: 'hidden',
},
[`& .${classes.listItem}`]: {
paddingLeft: 0,
- paddingRight: 0
+ paddingRight: 0,
},
[`& .${classes.pro}`]: {
- backgroundColor: '#1DD19F'
+ backgroundColor: '#1DD19F',
},
[`& .${classes.colorChooserButton}`]: {
minHeight: 30,
- border: '1px solid lightgray'
- }
+ border: '1px solid lightgray',
+ },
}));
interface Props {
@@ -101,34 +101,34 @@ function SettingsAdvanced(props: Props) {
const geoTaggingFormatDisabled = AppConfig.geoTaggingFormat !== undefined;
- const setDesktopMode = desktopMode =>
+ const setDesktopMode = (desktopMode) =>
dispatch(SettingsActions.setDesktopMode(desktopMode));
- const setDevMode = devMode => dispatch(SettingsActions.setDevMode(devMode));
+ const setDevMode = (devMode) => dispatch(SettingsActions.setDevMode(devMode));
- const setEnableWS = enableWS =>
+ const setEnableWS = (enableWS) =>
dispatch(SettingsActions.setEnableWS(enableWS));
- const setWarningOpeningFilesExternally = warningOpeningFilesExternally =>
+ const setWarningOpeningFilesExternally = (warningOpeningFilesExternally) =>
dispatch(
SettingsActions.setWarningOpeningFilesExternally(
- warningOpeningFilesExternally
- )
+ warningOpeningFilesExternally,
+ ),
);
- const setSaveTagInLocation = saveTagInLocation =>
+ const setSaveTagInLocation = (saveTagInLocation) =>
dispatch(SettingsActions.setSaveTagInLocation(saveTagInLocation));
- const setRevisionsEnabled = enabled =>
+ const setRevisionsEnabled = (enabled) =>
dispatch(SettingsActions.setRevisionsEnabled(enabled));
- const setGeoTaggingFormat = geoTaggingFormat =>
+ const setGeoTaggingFormat = (geoTaggingFormat) =>
dispatch(SettingsActions.setGeoTaggingFormat(geoTaggingFormat));
const setHistory = (key, value) =>
dispatch(SettingsActions.setHistory(key, value));
- const setPrefixTagContainer = prefix =>
+ const setPrefixTagContainer = (prefix) =>
dispatch(SettingsActions.setPrefixTagContainer(prefix));
return (
@@ -185,7 +185,7 @@ function SettingsAdvanced(props: Props) {
data-tid="warningOpeningFilesExternally"
onClick={() =>
setWarningOpeningFilesExternally(
- !settings.warningOpeningFilesExternally
+ !settings.warningOpeningFilesExternally,
)
}
checked={settings.warningOpeningFilesExternally}
@@ -197,7 +197,7 @@ function SettingsAdvanced(props: Props) {
style={{ maxWidth: '100px' }}
data-tid="prefixTagContainerTID"
value={settings.prefixTagContainer}
- onChange={event => setPrefixTagContainer(event.target.value)}
+ onChange={(event) => setPrefixTagContainer(event.target.value)}
/>
</ListItem>
{Pro && (
@@ -220,7 +220,7 @@ function SettingsAdvanced(props: Props) {
data-tid="fileOpenTID"
title={t('core:fileOpenHistoryTitle')}
value={settings[historyKeys.fileOpenKey]}
- onChange={event =>
+ onChange={(event) =>
setHistory(historyKeys.fileOpenKey, event.target.value)
}
input={<Input id="fileOpenSelector" />}
@@ -329,7 +329,7 @@ function SettingsAdvanced(props: Props) {
}}
title="Confirm"
content={t('core:confirm' + confirmDialogKey + 'Deletion')}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
Pro.history.delAllHistory(confirmDialogKey);
}
@@ -394,7 +394,7 @@ function SettingsAdvanced(props: Props) {
onChange={(event: any) => setGeoTaggingFormat(event.target.value)}
input={<Input id="geoTaggingFormatSelector" />}
>
- {settings.supportedGeoTagging.map(geoTagging => (
+ {settings.supportedGeoTagging.map((geoTagging) => (
<MenuItem key={geoTagging} value={geoTagging}>
{geoTagging.toUpperCase()}
</MenuItem>
@@ -406,7 +406,7 @@ function SettingsAdvanced(props: Props) {
<ListItemSecondaryAction style={{ right: 0 }}>
<Button
color="primary"
- onClick={event => handleEditTileServerClick(event, {}, true)}
+ onClick={(event) => handleEditTileServerClick(event, {}, true)}
>
{t('tileServerDialogAdd')}
</Button>
@@ -417,7 +417,7 @@ function SettingsAdvanced(props: Props) {
padding: 5,
paddingLeft: 10,
backgroundColor: '#d3d3d34a',
- borderRadius: 10
+ borderRadius: 10,
}}
dense
>
@@ -443,7 +443,7 @@ function SettingsAdvanced(props: Props) {
aria-haspopup="true"
edge="end"
data-tid={'tileServerEdit_' + tileServer.name}
- onClick={event =>
+ onClick={(event) =>
handleEditTileServerClick(event, tileServer, index === 0)
}
size="large"
diff --git a/app/components/dialogs/settings/SettingsDialog.tsx b/app/components/dialogs/settings/SettingsDialog.tsx
index bd1930e82..9d6615813 100644
--- a/app/components/dialogs/settings/SettingsDialog.tsx
+++ b/app/components/dialogs/settings/SettingsDialog.tsx
@@ -44,14 +44,14 @@ import { useTranslation } from 'react-i18next';
const PREFIX = 'SettingsDialog';
const classes = {
- mainContent: `${PREFIX}-mainContent`
+ mainContent: `${PREFIX}-mainContent`,
};
const StyledDialog = styled(Dialog)(() => ({
[`& .${classes.mainContent}`]: {
overflowY: 'auto',
- overflowX: 'hidden'
- }
+ overflowX: 'hidden',
+ },
}));
interface Props {
@@ -63,10 +63,8 @@ interface Props {
function SettingsDialog(props: Props) {
const { t } = useTranslation();
const [currentTab, setCurrentTab] = useState<number>(0);
- const [
- isResetSettingsDialogOpened,
- setIsResetSettingsDialogOpened
- ] = useState<boolean>(false);
+ const [isResetSettingsDialogOpened, setIsResetSettingsDialogOpened] =
+ useState<boolean>(false);
const handleTabClick = (event, tab) => {
setCurrentTab(tab);
@@ -118,7 +116,7 @@ function SettingsDialog(props: Props) {
}}
title="Confirm"
content={t('core:confirmResetSettings')}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
clearAllURLParams();
localStorage.clear();
@@ -155,7 +153,7 @@ function SettingsDialog(props: Props) {
<DialogActions
style={{
justifyContent: 'space-between',
- padding: fullScreen ? '10px 30px 30px 30px' : undefined
+ padding: fullScreen ? '10px 30px 30px 30px' : undefined,
}}
>
<Button
diff --git a/app/components/dialogs/settings/SettingsExtensions.tsx b/app/components/dialogs/settings/SettingsExtensions.tsx
index 59a63da56..1de646567 100644
--- a/app/components/dialogs/settings/SettingsExtensions.tsx
+++ b/app/components/dialogs/settings/SettingsExtensions.tsx
@@ -33,7 +33,7 @@ import { actions as SettingsActions, isDevMode } from '-/reducers/settings';
import {
actions as AppActions,
AppDispatch,
- getExtensions
+ getExtensions,
} from '-/reducers/app';
import { TS } from '-/tagspaces.namespace';
import PlatformIO from '-/services/platform-facade';
@@ -48,9 +48,8 @@ function SettingsExtensions() {
const { switchCurrentLocationType } = useCurrentLocationContext();
const { uploadFilesAPI } = useIOActionsContext();
const fileInputRef = useRef<HTMLInputElement>(null);
- const [removeExtDialogOpened, setRemoveExtDialogOpened] = useState<
- TS.Extension
- >(undefined);
+ const [removeExtDialogOpened, setRemoveExtDialogOpened] =
+ useState<TS.Extension>(undefined);
const extension = useSelector(getExtensions);
const devMode = useSelector(isDevMode);
@@ -62,7 +61,7 @@ function SettingsExtensions() {
const handleFileInputChange = (selection: any) => {
const files: File[] = Array.from(selection.currentTarget.files);
- PlatformIO.getUserDataDir().then(dataDir => {
+ PlatformIO.getUserDataDir().then((dataDir) => {
dispatch(AppActions.resetProgress());
dispatch(AppActions.toggleUploadDialog());
PlatformIO.disableObjectStoreSupport();
@@ -77,16 +76,16 @@ function SettingsExtensions() {
'@tagspaces' +
PlatformIO.getDirSeparator() +
'extensions';
- const promises = fsEntries.map(fsEntry =>
- PlatformIO.unZip(fsEntry.path, targetPath)
+ const promises = fsEntries.map((fsEntry) =>
+ PlatformIO.unZip(fsEntry.path, targetPath),
);
- return Promise.all(promises).then(paths => {
+ return Promise.all(promises).then((paths) => {
PlatformIO.loadExtensions();
- paths.forEach(path => PlatformIO.deleteFilePromise(path));
+ paths.forEach((path) => PlatformIO.deleteFilePromise(path));
return switchCurrentLocationType();
});
})
- .catch(error => {
+ .catch((error) => {
console.log('uploadFiles', error);
return switchCurrentLocationType();
});
@@ -110,8 +109,8 @@ function SettingsExtensions() {
<List>
{extension &&
extension
- .filter(ext => !ext.extensionExternal)
- .map(ext => (
+ .filter((ext) => !ext.extensionExternal)
+ .map((ext) => (
<ListItem key={ext.extensionId} disablePadding>
{ext.extensionName} ({ext.version})
</ListItem>
@@ -134,8 +133,8 @@ function SettingsExtensions() {
<List>
{extension &&
extension
- .filter(ext => ext.extensionExternal)
- .map(ext => (
+ .filter((ext) => ext.extensionExternal)
+ .map((ext) => (
<ListItem key={ext.extensionId} disablePadding>
{ext.extensionName} ({ext.version})
<Switch
@@ -147,33 +146,33 @@ function SettingsExtensions() {
dispatch(
AppActions.updateExtension({
...ext,
- extensionEnabled: true
- })
+ extensionEnabled: true,
+ }),
);
dispatch(
SettingsActions.enableExtension(
ext.extensionId,
- true
- )
+ true,
+ ),
);
PlatformIO.loadExtensions();
} else {
dispatch(
AppActions.updateExtension({
...ext,
- extensionEnabled: false
- })
+ extensionEnabled: false,
+ }),
);
dispatch(
SettingsActions.enableExtension(
ext.extensionId,
- false
- )
+ false,
+ ),
);
dispatch(
SettingsActions.removeSupportedFileTypes(
- ext.extensionId
- )
+ ext.extensionId,
+ ),
);
}
}}
@@ -200,17 +199,17 @@ function SettingsExtensions() {
content={t('core:removeExtensionTooltip', {
extensionName: removeExtDialogOpened
? removeExtDialogOpened.extensionName
- : ''
+ : '',
})}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
dispatch(
- AppActions.removeExtension(removeExtDialogOpened.extensionId)
+ AppActions.removeExtension(removeExtDialogOpened.extensionId),
);
dispatch(
SettingsActions.removeSupportedFileTypes(
- removeExtDialogOpened.extensionId
- )
+ removeExtDialogOpened.extensionId,
+ ),
);
PlatformIO.removeExtension(removeExtDialogOpened.extensionId);
}
@@ -220,7 +219,7 @@ function SettingsExtensions() {
confirmDialogContentTID="confirmRemoveExtDialogContentTID"
/>
{extension &&
- extension.filter(ext => ext.extensionExternal).length < 1 && (
+ extension.filter((ext) => ext.extensionExternal).length < 1 && (
<Typography variant="subtitle1">No extensions found</Typography>
)}
{devMode && (
diff --git a/app/components/dialogs/settings/SettingsFileTypes.tsx b/app/components/dialogs/settings/SettingsFileTypes.tsx
index 68a846158..317fa278c 100644
--- a/app/components/dialogs/settings/SettingsFileTypes.tsx
+++ b/app/components/dialogs/settings/SettingsFileTypes.tsx
@@ -37,7 +37,7 @@ import Paper from '@mui/material/Paper';
import {
TableVirtuoso,
TableComponents,
- TableVirtuosoHandle
+ TableVirtuosoHandle,
} from 'react-virtuoso';
import Tooltip from '-/components/Tooltip';
import ColorPickerDialog from '-/components/dialogs/ColorPickerDialog';
@@ -46,7 +46,7 @@ import { TS } from '-/tagspaces.namespace';
import {
actions as SettingsActions,
getSupportedFileTypes,
- isDevMode
+ isDevMode,
} from '-/reducers/settings';
import ConfirmDialog from '-/components/dialogs/ConfirmDialog';
import PlatformFacade from '-/services/platform-facade';
@@ -60,27 +60,27 @@ const PREFIX = 'SettingsFileTypes';
const classes = {
fileTypeColorDialog: `${PREFIX}-fileTypeColorDialog`,
colorChooserButton: `${PREFIX}-colorChooserButton`,
- fileExtRemove: `${PREFIX}-fileExtRemove`
+ fileExtRemove: `${PREFIX}-fileExtRemove`,
};
const Root = styled('div')(({ theme: any }) => ({
[`& .${classes.fileTypeColorDialog}`]: {
width: 60,
- padding: '0 12px 0 0'
+ padding: '0 12px 0 0',
},
[`& .${classes.colorChooserButton}`]: {
maxWidth: 30,
width: 30,
- border: '1px solid lightgray'
+ border: '1px solid lightgray',
},
[`& .${classes.fileExtRemove}`]: {
height: '38px',
cursor: 'pointer',
marginLeft: 10,
- padding: '0'
- }
+ padding: '0',
+ },
}));
function SettingsFileTypes() {
@@ -89,15 +89,13 @@ function SettingsFileTypes() {
const items = useRef<Array<TS.FileTypes>>(supportedFileTypes);
const selectedItem = useRef<TS.FileTypes>(undefined);
const isValidationInProgress = useRef<boolean>(false);
- const [isConfirmDialogOpened, setIsConfirmDialogOpened] = useState<boolean>(
- false
- );
- const [isColorPickerVisible, setColorPickerVisible] = useState<boolean>(
- false
- );
+ const [isConfirmDialogOpened, setIsConfirmDialogOpened] =
+ useState<boolean>(false);
+ const [isColorPickerVisible, setColorPickerVisible] =
+ useState<boolean>(false);
const settingsFileTypeRef = useRef<TableVirtuosoHandle>(null);
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
const firstRender = useFirstRender();
const extensions = useSelector(getExtensions);
@@ -127,10 +125,10 @@ function SettingsFileTypes() {
function scrollToItem(item: TS.FileTypes) {
if (item) {
const index = items.current.findIndex(
- element => element.type === item.type
+ (element) => element.type === item.type,
);
if (index > -1) {
- return setTimeout(function() {
+ return setTimeout(function () {
scrollToIndex({ index: index });
}, 50);
}
@@ -142,7 +140,7 @@ function SettingsFileTypes() {
if (settingsFileTypeRef.current) {
settingsFileTypeRef.current.scrollToIndex({
index,
- align
+ align,
});
}
}
@@ -151,7 +149,7 @@ function SettingsFileTypes() {
fileType: TS.FileTypes,
targetKey,
targetValue,
- disableSave = false
+ disableSave = false,
) => {
let identifierKey;
let identifierValue;
@@ -164,14 +162,14 @@ function SettingsFileTypes() {
}
let isSaveable = false;
let hasViewer = false;
- const modifiedItems = items.current.map(item => {
+ const modifiedItems = items.current.map((item) => {
if (item[identifierKey] === identifierValue) {
isSaveable =
item.type !== '' || (targetKey === 'type' && targetValue !== '');
hasViewer = item.viewer !== '';
const itemUpdated = {
...item,
- [targetKey]: targetValue
+ [targetKey]: targetValue,
};
selectedItem.current = itemUpdated;
return itemUpdated;
@@ -190,7 +188,7 @@ function SettingsFileTypes() {
}
};
- const saveFileTypes = newItems => {
+ const saveFileTypes = (newItems) => {
isValidationInProgress.current = true;
const isValid = validateSelectedFileTypes(newItems);
@@ -202,12 +200,12 @@ function SettingsFileTypes() {
dispatch(SettingsActions.setSupportedFileTypes(newItems));
};
- const validateSelectedFileTypes = newItems => {
+ const validateSelectedFileTypes = (newItems) => {
let isValid = true;
- newItems.map(item => {
+ newItems.map((item) => {
const hasDuplicates =
- items.current.filter(targetItem => targetItem.type === item.type)
+ items.current.filter((targetItem) => targetItem.type === item.type)
.length > 1;
if (
@@ -222,7 +220,7 @@ function SettingsFileTypes() {
return isValid;
};
- const openColorPicker = selected => {
+ const openColorPicker = (selected) => {
setColorPickerVisible(true);
selectedItem.current = selected;
scrollToItem(selected);
@@ -233,11 +231,11 @@ function SettingsFileTypes() {
// selectedItem.current = undefined;
};
- const handleChangeColor = color => {
+ const handleChangeColor = (color) => {
updateItems(selectedItem.current, 'color', color);
};
- const sanitizeFileTypeInput = fileTypeInput =>
+ const sanitizeFileTypeInput = (fileTypeInput) =>
fileTypeInput.replace(/[^a-zA-Z0-9 ]/g, '');
interface ColumnData {
@@ -250,30 +248,30 @@ function SettingsFileTypes() {
{
width: 60,
label: t('core:fileExtension'),
- dataKey: 'type'
+ dataKey: 'type',
},
{
width: 170,
label: t('core:fileOpener'),
- dataKey: 'viewer'
+ dataKey: 'viewer',
},
{
width: 170,
label: t('core:fileEditor'),
- dataKey: 'editor'
+ dataKey: 'editor',
},
{
width: 80,
label: t('core:actions'),
- dataKey: 'color'
- }
+ dataKey: 'color',
+ },
];
const VirtuosoTableComponents: TableComponents<TS.FileTypes> = {
Scroller: React.forwardRef<HTMLDivElement>((props, ref) => (
<TableContainer component={Paper} {...props} ref={ref} />
)),
- Table: props => (
+ Table: (props) => (
<Table
{...props}
sx={{ borderCollapse: 'separate', tableLayout: 'fixed' }}
@@ -283,7 +281,7 @@ function SettingsFileTypes() {
TableRow: ({ item: _item, ...props }) => <TableRow {...props} />,
TableBody: React.forwardRef<HTMLTableSectionElement>((props, ref) => (
<TableBody {...props} ref={ref} />
- ))
+ )),
};
const onAddFileType = () => {
@@ -292,20 +290,20 @@ function SettingsFileTypes() {
type: '',
viewer: '',
editor: '',
- color: '#2196f3'
+ color: '#2196f3',
};
items.current = [defaultFileTypeObject, ...items.current];
forceUpdate();
};
- const onRemoveItem = item => {
+ const onRemoveItem = (item) => {
selectedItem.current = item;
setIsConfirmDialogOpened(true);
};
const removeItem = (itemForRemoval: any) => {
const filteredItems = items.current.filter(
- item => item.type !== itemForRemoval.type
+ (item) => item.type !== itemForRemoval.type,
);
items.current = filteredItems;
saveFileTypes(filteredItems);
@@ -314,7 +312,7 @@ function SettingsFileTypes() {
function fixedHeaderContent() {
return (
<TableRow>
- {columns.map(column => (
+ {columns.map((column) => (
<TableCell
key={column.dataKey}
variant="head"
@@ -323,7 +321,7 @@ function SettingsFileTypes() {
width: column.width,
padding: 0,
paddingLeft: 2,
- backgroundColor: 'background.paper'
+ backgroundColor: 'background.paper',
}}
>
{column.label}
@@ -340,8 +338,9 @@ function SettingsFileTypes() {
<FormControl
error={
(isValidationInProgress.current && item.type === '') ||
- items.current.filter(targetItem => targetItem.type === item.type)
- .length > 1
+ items.current.filter(
+ (targetItem) => targetItem.type === item.type,
+ ).length > 1
}
>
<Input
@@ -349,10 +348,10 @@ function SettingsFileTypes() {
error={
(isValidationInProgress.current && item.type === '') ||
items.current.filter(
- targetItem => targetItem.type === item.type
+ (targetItem) => targetItem.type === item.type,
).length > 1
}
- onBlur={event => {
+ onBlur={(event) => {
const nextValue = event.target.value;
const withoutSpecialChars = sanitizeFileTypeInput(nextValue);
updateItems(item, 'type', withoutSpecialChars);
@@ -369,18 +368,18 @@ function SettingsFileTypes() {
value={item.viewer}
sx={{ width: 180 }}
input={<Input id="" />}
- onChange={event => {
+ onChange={(event) => {
const extension: TS.Extension = extensions.find(
- ext => ext.extensionId === event.target.value
+ (ext) => ext.extensionId === event.target.value,
);
if (extension.extensionExternal) {
- PlatformFacade.getUserDataDir().then(dataDir => {
+ PlatformFacade.getUserDataDir().then((dataDir) => {
const externalExtensionPath =
dataDir + PlatformFacade.getDirSeparator() + 'tsplugins';
updateItems(
item,
'extensionExternalPath',
- externalExtensionPath
+ externalExtensionPath,
);
});
}
@@ -389,7 +388,7 @@ function SettingsFileTypes() {
>
<MenuItem value="" />
{extensions.map(
- extension =>
+ (extension) =>
(extension.extensionTypes.includes('viewer') ||
extension.extensionTypes.includes('editor')) && (
<MenuItem
@@ -398,7 +397,7 @@ function SettingsFileTypes() {
>
{extension.extensionName} ({extension.version})
</MenuItem>
- )
+ ),
)}
</Select>
</FormControl>
@@ -408,16 +407,18 @@ function SettingsFileTypes() {
value={item.editor}
input={<Input id="" />}
sx={{ width: 180 }}
- onChange={event => updateItems(item, 'editor', event.target.value)}
+ onChange={(event) =>
+ updateItems(item, 'editor', event.target.value)
+ }
>
<MenuItem value="">{t('clearEditor')}</MenuItem>
{extensions
.filter(
- extension =>
+ (extension) =>
extension.extensionTypes &&
- extension.extensionTypes.includes('editor')
+ extension.extensionTypes.includes('editor'),
)
- .map(extension => (
+ .map((extension) => (
<MenuItem
key={extension.extensionName}
value={extension.extensionId}
@@ -437,7 +438,7 @@ function SettingsFileTypes() {
backgroundColor: `${item.color}`,
minWidth: 50,
maxWidth: 50,
- cursor: 'pointer'
+ cursor: 'pointer',
}}
onClick={() => {
openColorPicker(item);
@@ -470,7 +471,7 @@ function SettingsFileTypes() {
height: 600,
width: '100%',
minWidth: 550,
- overflow: 'hidden'
+ overflow: 'hidden',
}}
>
<Button
@@ -488,7 +489,7 @@ function SettingsFileTypes() {
selectedItem.current = undefined;
items.current = defaultSupportedFileTypes;
dispatch(
- SettingsActions.setSupportedFileTypes(supportedFileTypes)
+ SettingsActions.setSupportedFileTypes(supportedFileTypes),
);
}}
color="secondary"
@@ -505,7 +506,7 @@ function SettingsFileTypes() {
}}
title="Confirm"
content={t('core:confirmFileTypeDeletion')}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
removeItem(selectedItem.current);
}
@@ -519,7 +520,7 @@ function SettingsFileTypes() {
style={{
overflowX: 'hidden',
height: 'calc(100% - 30px)',
- overflowY: 'auto'
+ overflowY: 'auto',
}}
data={items.current}
components={VirtuosoTableComponents}
diff --git a/app/components/dialogs/settings/SettingsGeneral.tsx b/app/components/dialogs/settings/SettingsGeneral.tsx
index 70a35b62e..86834fb27 100644
--- a/app/components/dialogs/settings/SettingsGeneral.tsx
+++ b/app/components/dialogs/settings/SettingsGeneral.tsx
@@ -38,7 +38,7 @@ import {
actions as SettingsActions,
getPersistTagsInSidecarFile,
//getCurrentLanguage,
- getSettings
+ getSettings,
} from '-/reducers/settings';
import ColorPickerDialog from '-/components/dialogs/ColorPickerDialog';
import PerspectiveSelector from '-/components/PerspectiveSelector';
@@ -57,33 +57,32 @@ const classes = {
root: `${PREFIX}-root`,
listItem: `${PREFIX}-listItem`,
pro: `${PREFIX}-pro`,
- colorChooserButton: `${PREFIX}-colorChooserButton`
+ colorChooserButton: `${PREFIX}-colorChooserButton`,
};
const Root = styled('div')(({ theme }) => ({
[`& .${classes.root}`]: {
- overflowX: 'hidden'
+ overflowX: 'hidden',
},
[`& .${classes.listItem}`]: {
paddingLeft: 0,
- paddingRight: 0
+ paddingRight: 0,
},
[`& .${classes.pro}`]: {
- backgroundColor: '#1DD19F'
+ backgroundColor: '#1DD19F',
},
[`& .${classes.colorChooserButton}`]: {
minHeight: 30,
- border: '1px solid lightgray'
- }
+ border: '1px solid lightgray',
+ },
}));
function SettingsGeneral() {
const { i18n, t } = useTranslation();
const { openCurrentDirectory } = useDirectoryContentContext();
const [displayColorPicker, setDisplayColorPicker] = useState<boolean>(false);
- const [displayTextColorPicker, setDisplayTextColorPicker] = useState<boolean>(
- false
- );
+ const [displayTextColorPicker, setDisplayTextColorPicker] =
+ useState<boolean>(false);
const dispatch: AppDispatch = useDispatch();
const settings = useSelector(getSettings);
const persistTagsInSidecarFile = useSelector(getPersistTagsInSidecarFile);
@@ -104,7 +103,7 @@ function SettingsGeneral() {
this.props.setTagDelimiter(event.target.value);
}; */
- const handleMaxSearchResult = event => {
+ const handleMaxSearchResult = (event) => {
dispatch(SettingsActions.setMaxSearchResult(event.target.value));
};
@@ -135,7 +134,7 @@ function SettingsGeneral() {
}}
input={<Input id="languageSelector" />}
>
- {settings.supportedLanguages.map(language => (
+ {settings.supportedLanguages.map((language) => (
<MenuItem key={language.iso} value={language.iso}>
{language.title}
</MenuItem>
@@ -152,7 +151,7 @@ function SettingsGeneral() {
}
input={<Input id="themeSelector" />}
>
- {settings.supportedThemes.map(theme => (
+ {settings.supportedThemes.map((theme) => (
<MenuItem key={theme} value={theme}>
{theme === 'light' && t('core:regularScheme')}
{theme === 'dark' && t('core:darkScheme')}
@@ -168,12 +167,12 @@ function SettingsGeneral() {
value={settings.currentRegularTheme}
onChange={(event: any) =>
dispatch(
- SettingsActions.setCurrentRegularTheme(event.target.value)
+ SettingsActions.setCurrentRegularTheme(event.target.value),
)
}
input={<Input id="themeRegularSelector" />}
>
- {settings.supportedRegularThemes.map(theme => (
+ {settings.supportedRegularThemes.map((theme) => (
<MenuItem key={theme} value={theme}>
{theme.charAt(0).toUpperCase() + theme.slice(1)}
</MenuItem>
@@ -190,7 +189,7 @@ function SettingsGeneral() {
}
input={<Input id="themeDarkSelector" />}
>
- {settings.supportedDarkThemes.map(theme => (
+ {settings.supportedDarkThemes.map((theme) => (
<MenuItem key={theme} value={theme}>
{theme.charAt(0).toUpperCase() + theme.slice(1)}
</MenuItem>
@@ -277,7 +276,7 @@ function SettingsGeneral() {
data-tid="settingsSetCheckForUpdates"
onClick={() =>
dispatch(
- SettingsActions.setCheckForUpdates(!settings.checkForUpdates)
+ SettingsActions.setCheckForUpdates(!settings.checkForUpdates),
)
}
checked={settings.checkForUpdates}
@@ -306,7 +305,7 @@ function SettingsGeneral() {
data-tid="settingsSetAddTagsToLibrary"
onClick={() =>
dispatch(
- SettingsActions.setAddTagsToLibrary(!settings.addTagsToLibrary)
+ SettingsActions.setAddTagsToLibrary(!settings.addTagsToLibrary),
)
}
checked={settings.addTagsToLibrary}
@@ -320,8 +319,8 @@ function SettingsGeneral() {
onClick={() =>
dispatch(
SettingsActions.setUseGenerateThumbnails(
- !settings.useGenerateThumbnails
- )
+ !settings.useGenerateThumbnails,
+ ),
)
}
checked={
@@ -339,7 +338,7 @@ function SettingsGeneral() {
className={classes.colorChooserButton}
size="small"
style={{
- backgroundColor: settings.tagBackgroundColor
+ backgroundColor: settings.tagBackgroundColor,
}}
onClick={toggleDefaultTagBackgroundColorPicker}
>
@@ -349,7 +348,7 @@ function SettingsGeneral() {
{displayColorPicker && (
<ColorPickerDialog
open={displayColorPicker}
- setColor={color => {
+ setColor={(color) => {
dispatch(SettingsActions.setTagColor(color));
}}
onClose={toggleDefaultTagBackgroundColorPicker}
@@ -373,7 +372,7 @@ function SettingsGeneral() {
{displayTextColorPicker && (
<ColorPickerDialog
open={displayTextColorPicker}
- setColor={color => {
+ setColor={(color) => {
dispatch(SettingsActions.setTagTextColor(color));
}}
onClose={toggleDefaultTagTextColorPicker}
diff --git a/app/components/dialogs/settings/SettingsKeyBindings.tsx b/app/components/dialogs/settings/SettingsKeyBindings.tsx
index 8f4a2b2a2..5cd9107d3 100644
--- a/app/components/dialogs/settings/SettingsKeyBindings.tsx
+++ b/app/components/dialogs/settings/SettingsKeyBindings.tsx
@@ -28,7 +28,7 @@ import PlatformIO from '-/services/platform-facade';
import {
actions as SettingsActions,
getKeyBindings,
- isGlobalKeyBindingEnabled
+ isGlobalKeyBindingEnabled,
} from '-/reducers/settings';
import DefaultSettings from '-/reducers/settings-default';
import { AppDispatch } from '-/reducers/app';
@@ -37,14 +37,14 @@ import { useTranslation } from 'react-i18next';
const PREFIX = 'SettingsKeyBindings';
const classes = {
- keyBinding: `${PREFIX}-keyBinding`
+ keyBinding: `${PREFIX}-keyBinding`,
};
const Root = styled('form')(({ theme }) => ({
[`& .${classes.keyBinding}`]: {
marginTop: 10,
- marginBottom: 10
- }
+ marginBottom: 10,
+ },
}));
function SettingsKeyBindings() {
@@ -57,7 +57,7 @@ function SettingsKeyBindings() {
dispatch(SettingsActions.setKeyBinding(kbName, kbCommand));
};
- const setGlobalKeyBinding = value => {
+ const setGlobalKeyBinding = (value) => {
dispatch(SettingsActions.setGlobalKeyBinding(value));
PlatformIO.setGlobalShortcuts(value);
};
@@ -73,9 +73,9 @@ function SettingsKeyBindings() {
checked={globalKeyBindingEnabled}
/>
</ListItem>
- {keyBindings.map(keyBinding => {
+ {keyBindings.map((keyBinding) => {
const defaultBinding = DefaultSettings.keyBindings.filter(
- kb => kb.name === keyBinding.name
+ (kb) => kb.name === keyBinding.name,
)[0];
return (
<TextField
@@ -83,7 +83,9 @@ function SettingsKeyBindings() {
key={keyBinding.name}
InputLabelProps={{ shrink: true }}
fullWidth
- onBlur={event => setKeyBinding(keyBinding.name, event.target.value)}
+ onBlur={(event) =>
+ setKeyBinding(keyBinding.name, event.target.value)
+ }
label={t('core:' + keyBinding.name)}
placeholder={
'suggested binding: ' +
diff --git a/app/components/menus/BookmarksMenu.tsx b/app/components/menus/BookmarksMenu.tsx
index 979d9a62b..399d4db0c 100644
--- a/app/components/menus/BookmarksMenu.tsx
+++ b/app/components/menus/BookmarksMenu.tsx
@@ -50,7 +50,7 @@ function BookmarksMenu(props: Props) {
<ReloadIcon />
</ListItemIcon>
<ListItemText primary={<>{t('core:refresh')}</>} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -66,7 +66,7 @@ function BookmarksMenu(props: Props) {
<DeleteIcon />
</ListItemIcon>
<ListItemText primary={<>{t('core:deleteBookmarks')}</>} />
- </MenuItem>
+ </MenuItem>,
);
return (
diff --git a/app/components/menus/DirectoryMenu.tsx b/app/components/menus/DirectoryMenu.tsx
index 9653e1511..14212eab7 100644
--- a/app/components/menus/DirectoryMenu.tsx
+++ b/app/components/menus/DirectoryMenu.tsx
@@ -26,13 +26,13 @@ import {
extractDirectoryName,
getThumbFileLocationForDirectory,
normalizePath,
- generateSharingLink
+ generateSharingLink,
} from '@tagspaces/tagspaces-common/paths';
import { Pro } from '-/pro';
import PlatformIO from '-/services/platform-facade';
import { actions as AppActions, AppDispatch } from '-/reducers/app';
import FileUploadContainer, {
- FileUploadContainerRef
+ FileUploadContainerRef,
} from '-/components/FileUploadContainer';
import { TS } from '-/tagspaces.namespace';
import { getRelativeEntryPath, toFsEntry } from '-/services/utils-io';
@@ -76,7 +76,7 @@ function DirectoryMenu(props: Props) {
openDirectory,
currentDirectoryPath,
setCurrentDirectoryPerspective,
- openCurrentDirectory
+ openCurrentDirectory,
} = useDirectoryContentContext();
const { reflectCreateEntry } = useLocationIndexContext();
const { copyFilePromise, renameFilePromise } = usePlatformFacadeContext();
@@ -91,7 +91,7 @@ function DirectoryMenu(props: Props) {
openMoveCopyFilesDialog,
openRenameDirectoryDialog,
switchPerspective,
- perspectiveMode
+ perspectiveMode,
} = props;
const directoryPath = props.directoryPath || currentDirectoryPath;
const locations: Array<TS.Location> = useSelector(getLocations);
@@ -113,7 +113,7 @@ function DirectoryMenu(props: Props) {
dispatch(AppActions.toggleDeleteMultipleEntriesDialog());
};
- const toggleProTeaser = slidePage => {
+ const toggleProTeaser = (slidePage) => {
dispatch(AppActions.toggleProTeaser(slidePage));
};
@@ -126,7 +126,7 @@ function DirectoryMenu(props: Props) {
}
entryPath = selectedEntries[0].path;
}
- const tmpLoc = locations.find(location => location.uuid === locationID);
+ const tmpLoc = locations.find((location) => location.uuid === locationID);
const relativePath = getRelativeEntryPath(tmpLoc, entryPath);
return generateSharingLink(locationID, undefined, relativePath);
}
@@ -201,7 +201,7 @@ function DirectoryMenu(props: Props) {
}
function showDeleteDirectoryDialog() {
- if (!selectedEntries.some(entry => entry.path === directoryPath)) {
+ if (!selectedEntries.some((entry) => entry.path === directoryPath)) {
setSelectedEntries([
{
isFile: false,
@@ -209,8 +209,8 @@ function DirectoryMenu(props: Props) {
path: directoryPath,
tags: [],
size: 0,
- lmdt: 0
- }
+ lmdt: 0,
+ },
]);
}
toggleDeleteMultipleEntriesDialog();
@@ -257,15 +257,15 @@ Do you want to continue?`)
}
toggleProgressDialog();
- const entryCallback = entry => {
+ const entryCallback = (entry) => {
PlatformFacade.readMacOSTags(entry.path)
- .then(tags => {
+ .then((tags) => {
if (tags.length > 0) {
addTags([entry.path], tags, true);
}
return tags;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Error creating tags: ' + err);
});
};
@@ -276,11 +276,11 @@ Do you want to continue?`)
showNotification(
'Tags from ' + directoryPath + ' are imported successfully.',
'default',
- true
+ true,
);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Error importing tags: ' + err);
toggleProgressDialog();
});
@@ -288,7 +288,7 @@ Do you want to continue?`)
showNotification(
t('core:thisFunctionalityIsAvailableInPro'),
'default',
- true
+ true,
);
return true;
}
@@ -301,12 +301,12 @@ Do you want to continue?`)
function onCameraSuccess(imageURL) {
window.resolveLocalFileSystemURL(
imageURL,
- fp => {
+ (fp) => {
moveFile(fp.nativeURL);
},
() => {
console.log('Failed to get filesystem url');
- }
+ },
);
}
@@ -325,19 +325,19 @@ Do you want to continue?`)
showNotification(
'File ' + newFilePath + ' successfully imported.',
'default',
- true
+ true,
);
reflectCreateEntry(toFsEntry(newFilePath, true));
dispatch(AppActions.reflectCreateEntry(newFilePath, true));
return true;
})
- .catch(error => {
+ .catch((error) => {
// TODO showAlertDialog("Saving " + filePath + " failed.");
console.log('Save to file ' + newFilePath + ' failed ' + error);
showNotification(
'Importing file ' + newFilePath + ' failed.',
'error',
- true
+ true,
);
return true;
});
@@ -359,40 +359,40 @@ Do you want to continue?`)
destinationType: Camera.DestinationType.FILE_URI, // DATA_URL, // Return base64 encoded string
// encodingType: Camera.EncodingType.JPEG,
// @ts-ignore
- mediaType: Camera.MediaType.PICTURE // ALLMEDIA
+ mediaType: Camera.MediaType.PICTURE, // ALLMEDIA
});
}
function setFolderThumbnail() {
const parentDirectoryPath = extractContainingDirectoryPath(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const parentDirectoryName = extractDirectoryName(
parentDirectoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
copyFilePromise(
getThumbFileLocationForDirectory(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
),
getThumbFileLocationForDirectory(
parentDirectoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
),
- t('core:thumbAlreadyExists', { directoryName: parentDirectoryName })
+ t('core:thumbAlreadyExists', { directoryName: parentDirectoryName }),
)
.then(() => {
showNotification(
'Thumbnail created for: ' + parentDirectoryPath,
'default',
- true
+ true,
);
return true;
})
- .catch(error => {
+ .catch((error) => {
showNotification('Thumbnail creation failed.', 'default', true);
console.warn('Error setting Thumb for entry: ' + directoryPath, error);
return true;
@@ -423,7 +423,7 @@ Do you want to continue?`)
showProperties,
cameraTakePicture,
openAddRemoveTagsDialog,
- openInNewWindow
+ openInNewWindow,
);
return (
diff --git a/app/components/menus/EntryTagMenu.tsx b/app/components/menus/EntryTagMenu.tsx
index aa48aac14..4cd4c0835 100644
--- a/app/components/menus/EntryTagMenu.tsx
+++ b/app/components/menus/EntryTagMenu.tsx
@@ -53,7 +53,7 @@ function EntryTagMenu(props: Props) {
anchorEl,
selectedTag,
currentEntryPath,
- setIsAddTagDialogOpened
+ setIsAddTagDialogOpened,
} = props;
const removeTagsProps = props.removeTags;
const { t } = useTranslation();
@@ -65,7 +65,7 @@ function EntryTagMenu(props: Props) {
const dispatch: AppDispatch = useDispatch();
const maxSearchResults: number = useSelector(getMaxSearchResults);
- const toggleEditTagDialog = tag => {
+ const toggleEditTagDialog = (tag) => {
dispatch(AppActions.toggleEditTagDialog(tag));
};
@@ -91,7 +91,7 @@ function EntryTagMenu(props: Props) {
setSearchQuery({
tagsAND: [selectedTag],
maxSearchResults: maxSearchResults,
- executeSearch: true
+ executeSearch: true,
});
}
onClose();
@@ -106,7 +106,7 @@ function EntryTagMenu(props: Props) {
removeTagsProps([currentEntryPath], [selectedTag]);
} else {
removeTags([currentEntryPath], [selectedTag]).then(() =>
- handleCloseDialogs()
+ handleCloseDialogs(),
);
}
}
@@ -121,7 +121,7 @@ function EntryTagMenu(props: Props) {
<ShowEntriesWithTagIcon />
</ListItemIcon>
<ListItemText primary={t('core:showFilesWithThisTag')} />
- </MenuItem>
+ </MenuItem>,
];
if (!readOnlyMode) {
if (setIsAddTagDialogOpened) {
@@ -135,7 +135,7 @@ function EntryTagMenu(props: Props) {
<AddIcon />
</ListItemIcon>
<ListItemText primary={t('core:addTagToTagGroup')} />
- </MenuItem>
+ </MenuItem>,
);
}
menuItems.push(
@@ -148,7 +148,7 @@ function EntryTagMenu(props: Props) {
<EditIcon />
</ListItemIcon>
<ListItemText primary={t('core:editTagTitle')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -160,7 +160,7 @@ function EntryTagMenu(props: Props) {
<DeleteIcon />
</ListItemIcon>
<ListItemText primary={t('core:removeTag')} />
- </MenuItem>
+ </MenuItem>,
);
}
@@ -174,7 +174,7 @@ function EntryTagMenu(props: Props) {
onClose={handleCloseDialogs}
title={t('core:removeTag')}
content={t('core:removeTagTooltip')}
- confirmCallback={result => {
+ confirmCallback={(result) => {
if (result) {
confirmRemoveTag();
}
diff --git a/app/components/menus/FileMenu.tsx b/app/components/menus/FileMenu.tsx
index b649b8126..ea4ddc7b6 100644
--- a/app/components/menus/FileMenu.tsx
+++ b/app/components/menus/FileMenu.tsx
@@ -41,13 +41,13 @@ import {
extractFileName,
extractParentDirectoryPath,
extractTags,
- generateSharingLink
+ generateSharingLink,
} from '@tagspaces/tagspaces-common/paths';
import PlatformIO from '-/services/platform-facade';
import {
generateFileName,
setFolderBackgroundPromise,
- getRelativeEntryPath
+ getRelativeEntryPath,
} from '-/services/utils-io';
import { Pro } from '-/pro';
import { actions as AppActions, AppDispatch } from '-/reducers/app';
@@ -55,12 +55,12 @@ import { useSelector, useDispatch } from 'react-redux';
import { supportedImgs } from '-/services/thumbsgenerator';
import {
getPrefixTagContainer,
- getWarningOpeningFilesExternally
+ getWarningOpeningFilesExternally,
} from '-/reducers/settings';
import {
OpenNewWindowIcon,
DeleteIcon,
- LinkIcon
+ LinkIcon,
} from '-/components/CommonIcons';
import PropertiesIcon from '@mui/icons-material/Info';
import { useTranslation } from 'react-i18next';
@@ -103,7 +103,7 @@ function FileMenu(props: Props) {
mouseY,
open,
onClose,
- selectedFilePath
+ selectedFilePath,
} = props;
const { t } = useTranslation();
@@ -112,15 +112,13 @@ function FileMenu(props: Props) {
const { openEntry } = useOpenedEntryContext();
const { openDirectory } = useDirectoryContentContext();
const { showNotification } = useNotificationContext();
- const {
- copyFilePromise,
- setFolderThumbnailPromise
- } = usePlatformFacadeContext();
+ const { copyFilePromise, setFolderThumbnailPromise } =
+ usePlatformFacadeContext();
const { currentLocation, readOnlyMode } = useCurrentLocationContext();
//const locations: Array<TS.Location> = useSelector(getLocations);
const prefixTagContainer = useSelector(getPrefixTagContainer);
const warningOpeningFilesExternally = useSelector(
- getWarningOpeningFilesExternally
+ getWarningOpeningFilesExternally,
);
function generateFileLink() {
@@ -185,11 +183,11 @@ function FileMenu(props: Props) {
showNotification('Thumbnail created for: ' + directoryPath);
return true;
})
- .catch(error => {
+ .catch((error) => {
showNotification('Thumbnail creation failed.');
console.warn(
'Error setting Thumb for entry: ' + selectedFilePath,
- error
+ error,
);
return true;
});
@@ -204,22 +202,22 @@ function FileMenu(props: Props) {
const directoryPath = extractContainingDirectoryPath(
selectedFilePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
setFolderBackgroundPromise(path, directoryPath)
.then((directoryPath: string) => {
dispatch(
- AppActions.setLastBackgroundImageChange(path, new Date().getTime())
+ AppActions.setLastBackgroundImageChange(path, new Date().getTime()),
);
showNotification('Background created for: ' + directoryPath);
return true;
})
- .catch(error => {
+ .catch((error) => {
showNotification('Background creation failed.');
console.warn(
'Error setting Background for entry: ' + selectedFilePath,
- error
+ error,
);
return true;
});
@@ -235,18 +233,18 @@ function FileMenu(props: Props) {
if (selectedFilePath) {
const dirPath = extractContainingDirectoryPath(
selectedFilePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const fileName = extractFileName(
selectedFilePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const extractedTags = extractTags(
selectedFilePath,
AppConfig.tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
extractedTags.push('copy');
extractedTags.push(formatDateTime4Tag(new Date(), true));
@@ -257,7 +255,7 @@ function FileMenu(props: Props) {
fileName,
extractedTags,
AppConfig.tagDelimiter,
- prefixTagContainer
+ prefixTagContainer,
);
copyFilePromise(selectedFilePath, newFilePath)
@@ -269,7 +267,7 @@ function FileMenu(props: Props) {
}
return true;
})
- .catch(error => {
+ .catch((error) => {
showNotification('Error creating duplicate: ', error);
});
}
@@ -280,7 +278,7 @@ function FileMenu(props: Props) {
if (selectedFilePath) {
const parentFolder = extractParentDirectoryPath(
selectedFilePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
return openDirectory(parentFolder);
}
@@ -306,8 +304,8 @@ function FileMenu(props: Props) {
const menuItems = [];
const pathLowerCase = selectedFilePath.toLowerCase();
- const isImageFile = supportedImgs.some(ext =>
- pathLowerCase.endsWith('.' + ext)
+ const isImageFile = supportedImgs.some((ext) =>
+ pathLowerCase.endsWith('.' + ext),
);
if (selectedEntries.length < 2) {
@@ -321,7 +319,7 @@ function FileMenu(props: Props) {
<OpenFile />
</ListItemIcon>
<ListItemText primary={t('core:openFile')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -333,7 +331,7 @@ function FileMenu(props: Props) {
<OpenNewWindowIcon />
</ListItemIcon>
<ListItemText primary={t('core:openInWindow')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -345,7 +343,7 @@ function FileMenu(props: Props) {
<ParentFolderIcon />
</ListItemIcon>
<ListItemText primary={t('core:openParentFolder')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (
@@ -365,7 +363,7 @@ function FileMenu(props: Props) {
if (selectedFilePath) {
PlatformIO.openFile(
selectedFilePath,
- warningOpeningFilesExternally
+ warningOpeningFilesExternally,
);
// openFileNatively(selectedFilePath);
}
@@ -375,7 +373,7 @@ function FileMenu(props: Props) {
<OpenFileNatively />
</ListItemIcon>
<ListItemText primary={t('core:openFileNatively')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -392,7 +390,7 @@ function FileMenu(props: Props) {
<OpenFolderInternally />
</ListItemIcon>
<ListItemText primary={t('core:showInFileManager')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(<Divider key="fmDivider" />);
}
@@ -407,7 +405,7 @@ function FileMenu(props: Props) {
<AddRemoveTags />
</ListItemIcon>
<ListItemText primary={t('core:addRemoveTags')} />
- </MenuItem>
+ </MenuItem>,
);
if (reorderTop) {
menuItems.push(
@@ -423,7 +421,7 @@ function FileMenu(props: Props) {
<MoveToTopIcon />
</ListItemIcon>
<ListItemText primary={t('core:moveToTop')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (reorderBottom) {
@@ -440,7 +438,7 @@ function FileMenu(props: Props) {
<MoveToBottomIcon />
</ListItemIcon>
<ListItemText primary={t('core:moveToBottom')} />
- </MenuItem>
+ </MenuItem>,
);
}
menuItems.push(<Divider key="fmDivider1" />);
@@ -454,7 +452,7 @@ function FileMenu(props: Props) {
<RenameFile />
</ListItemIcon>
<ListItemText primary={t('core:renameFile')} />
- </MenuItem>
+ </MenuItem>,
);
if (selectedEntries.length < 2) {
menuItems.push(
@@ -467,7 +465,7 @@ function FileMenu(props: Props) {
<DuplicateFile />
</ListItemIcon>
<ListItemText primary={t('core:duplicateFile')} />
- </MenuItem>
+ </MenuItem>,
);
}
@@ -482,7 +480,7 @@ function FileMenu(props: Props) {
<ShareIcon />
</ListItemIcon>
<ListItemText primary={t('core:shareFiles')} />
- </MenuItem>
+ </MenuItem>,
);
}
menuItems.push(
@@ -495,7 +493,7 @@ function FileMenu(props: Props) {
<MoveCopy />
</ListItemIcon>
<ListItemText primary={t('core:moveCopyFile')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -507,7 +505,7 @@ function FileMenu(props: Props) {
<DeleteIcon />
</ListItemIcon>
<ListItemText primary={t('core:deleteEntry')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(<Divider key="fmDivider2" />);
if (Pro && selectedEntries.length < 2) {
@@ -521,7 +519,7 @@ function FileMenu(props: Props) {
<ImageIcon />
</ListItemIcon>
<ListItemText primary={t('core:setAsThumbnail')} />
- </MenuItem>
+ </MenuItem>,
);
if (isImageFile) {
menuItems.push(
@@ -534,7 +532,7 @@ function FileMenu(props: Props) {
<ImageIcon />
</ListItemIcon>
<ListItemText primary={t('core:setAsBackground')} />
- </MenuItem>
+ </MenuItem>,
);
}
}
@@ -551,7 +549,7 @@ function FileMenu(props: Props) {
<LinkIcon />
</ListItemIcon>
<ListItemText primary={t('core:copySharingLink')} />
- </MenuItem>
+ </MenuItem>,
);
}
@@ -567,7 +565,7 @@ function FileMenu(props: Props) {
<PropertiesIcon />
</ListItemIcon>
<ListItemText primary={t('core:filePropertiesTitle')} />
- </MenuItem>
+ </MenuItem>,
);
}
diff --git a/app/components/menus/HistoryMenu.tsx b/app/components/menus/HistoryMenu.tsx
index d133e7e50..29681c9c1 100644
--- a/app/components/menus/HistoryMenu.tsx
+++ b/app/components/menus/HistoryMenu.tsx
@@ -52,7 +52,7 @@ function HistoryMenu(props: Props) {
<RefreshIcon />
</ListItemIcon>
<ListItemText primary={<>{t('core:refresh')}</>} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -68,7 +68,7 @@ function HistoryMenu(props: Props) {
<DeleteIcon />
</ListItemIcon>
<ListItemText primary={<>{t('core:clearHistory')}</>} />
- </MenuItem>
+ </MenuItem>,
);
return (
diff --git a/app/components/menus/LocationContextMenu.tsx b/app/components/menus/LocationContextMenu.tsx
index 29b4b1440..5b53e4356 100644
--- a/app/components/menus/LocationContextMenu.tsx
+++ b/app/components/menus/LocationContextMenu.tsx
@@ -51,7 +51,7 @@ interface Props {
function LocationContextMenu(props: Props) {
const {
setEditLocationDialogOpened,
- setDeleteLocationDialogOpened
+ setDeleteLocationDialogOpened,
//closeLocationTree
} = props;
const { t } = useTranslation();
@@ -62,16 +62,16 @@ function LocationContextMenu(props: Props) {
getLocationPosition,
selectedLocation,
locationDirectoryContextMenuAnchorEl,
- setLocationDirectoryContextMenuAnchorEl
+ setLocationDirectoryContextMenuAnchorEl,
} = useCurrentLocationContext();
const { createLocationIndex } = useLocationIndexContext();
const dispatch: AppDispatch = useDispatch();
- const moveLocationUp = locationId => {
+ const moveLocationUp = (locationId) => {
dispatch(LocationActions.moveLocationUp(locationId));
};
- const moveLocationDown = locationId => {
+ const moveLocationDown = (locationId) => {
dispatch(LocationActions.moveLocationDown(locationId));
};
@@ -92,10 +92,10 @@ function LocationContextMenu(props: Props) {
...selectedLocation,
uuid: getUuid(),
name: selectedLocation.name + ' (copy)',
- isDefault: false
+ isDefault: false,
},
false,
- locationPosition + 1
+ locationPosition + 1,
);
setLocationDirectoryContextMenuAnchorEl(null);
};
@@ -136,7 +136,7 @@ function LocationContextMenu(props: Props) {
setLocationDirectoryContextMenuAnchorEl(null);
const sharingLink = generateSharingLink(selectedLocation.uuid);
PlatformIO.createNewInstance(
- window.location.href.split('?')[0] + '?' + sharingLink.split('?')[1]
+ window.location.href.split('?')[0] + '?' + sharingLink.split('?')[1],
);
};
@@ -152,7 +152,7 @@ function LocationContextMenu(props: Props) {
<EditIcon />
</ListItemIcon>
<ListItemText primary={t('core:editLocationTitle')} />
- </MenuItem>
+ </MenuItem>,
);
}
menuItems.push(
@@ -165,7 +165,7 @@ function LocationContextMenu(props: Props) {
<OpenNewWindowIcon />
</ListItemIcon>
<ListItemText primary={t('core:openInWindow')} />
- </MenuItem>
+ </MenuItem>,
);
if (selectedLocation.type === locationType.TYPE_LOCAL) {
menuItems.push(
@@ -178,7 +178,7 @@ function LocationContextMenu(props: Props) {
<OpenFolderNativelyIcon />
</ListItemIcon>
<ListItemText primary={t('core:showInFileManager')} />
- </MenuItem>
+ </MenuItem>,
);
}
menuItems.push(<Divider />);
@@ -192,7 +192,7 @@ function LocationContextMenu(props: Props) {
<ContentCopyIcon />
</ListItemIcon>
<ListItemText primary={t('core:duplicateLocationTitle')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -204,7 +204,7 @@ function LocationContextMenu(props: Props) {
<RefreshIcon />
</ListItemIcon>
<ListItemText primary={t('core:indexLocation')} />
- </MenuItem>
+ </MenuItem>,
);
if (!AppConfig.locationsReadOnly) {
menuItems.push(<Divider />);
@@ -218,7 +218,7 @@ function LocationContextMenu(props: Props) {
<ArrowUpwardIcon />
</ListItemIcon>
<ListItemText primary={t('core:moveUp')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -230,7 +230,7 @@ function LocationContextMenu(props: Props) {
<ArrowDownwardIcon />
</ListItemIcon>
<ListItemText primary={t('core:moveDown')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(<Divider />);
menuItems.push(
@@ -243,7 +243,7 @@ function LocationContextMenu(props: Props) {
<DeleteIcon />
</ListItemIcon>
<ListItemText primary={t('core:removeLocation')} />
- </MenuItem>
+ </MenuItem>,
);
}
menuItems.push(
@@ -256,7 +256,7 @@ function LocationContextMenu(props: Props) {
<CloseIcon />
</ListItemIcon>
<ListItemText primary={t('core:closeLocation')} />
- </MenuItem>
+ </MenuItem>,
);
return (
diff --git a/app/components/menus/LocationManagerMenu.tsx b/app/components/menus/LocationManagerMenu.tsx
index d56ecd307..18129374c 100644
--- a/app/components/menus/LocationManagerMenu.tsx
+++ b/app/components/menus/LocationManagerMenu.tsx
@@ -55,16 +55,14 @@ function LocationManagerMenu(props: Props) {
exportLocations,
importLocations,
showCreateLocationDialog,
- toggleOpenLinkDialog
+ toggleOpenLinkDialog,
} = props;
const { t } = useTranslation();
const { createLocationsIndexes } = useLocationIndexContext();
const { closeAllLocations } = useCurrentLocationContext();
- const [
- locationManagerMenuAnchorEl,
- setLocationManagerMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
+ const [locationManagerMenuAnchorEl, setLocationManagerMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
const dispatch: AppDispatch = useDispatch();
const menuItems = [];
if (!AppConfig.locationsReadOnly) {
@@ -81,7 +79,7 @@ function LocationManagerMenu(props: Props) {
<CreateLocationIcon />
</ListItemIcon>
<ListItemText primary={t('core:createLocationTitle')} />
- </MenuItem>
+ </MenuItem>,
);
}
@@ -98,7 +96,7 @@ function LocationManagerMenu(props: Props) {
<OpenLinkIcon />
</ListItemIcon>
<ListItemText primary={t('core:openLink')} />
- </MenuItem>
+ </MenuItem>,
);
if (!AppConfig.locationsReadOnly) {
@@ -124,7 +122,7 @@ function LocationManagerMenu(props: Props) {
</>
}
/>
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -147,7 +145,7 @@ function LocationManagerMenu(props: Props) {
</>
}
/>
- </MenuItem>
+ </MenuItem>,
);
}
@@ -164,7 +162,7 @@ function LocationManagerMenu(props: Props) {
<CloseIcon />
</ListItemIcon>
<ListItemText primary={t('core:closeAllLocations')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
@@ -180,7 +178,7 @@ function LocationManagerMenu(props: Props) {
<UpdateIndexIcon />
</ListItemIcon>
<ListItemText primary={t('core:updateAllLocationIndexes')} />
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
@@ -196,7 +194,7 @@ function LocationManagerMenu(props: Props) {
<HelpIcon />
</ListItemIcon>
<ListItemText primary={t('core:help')} />
- </MenuItem>
+ </MenuItem>,
);
return (
@@ -210,7 +208,9 @@ function LocationManagerMenu(props: Props) {
</Typography>
<IconButton
data-tid="locationManagerMenu"
- onClick={event => setLocationManagerMenuAnchorEl(event.currentTarget)}
+ onClick={(event) =>
+ setLocationManagerMenuAnchorEl(event.currentTarget)
+ }
size="large"
>
<MoreVertIcon />
diff --git a/app/components/menus/LocationMenu.tsx b/app/components/menus/LocationMenu.tsx
index 24e2bb310..164470371 100644
--- a/app/components/menus/LocationMenu.tsx
+++ b/app/components/menus/LocationMenu.tsx
@@ -44,10 +44,8 @@ function LocationMenu(props: Props) {
const { openLocation, currentLocation } = useCurrentLocationContext();
//const dispatch: AppDispatch = useDispatch();
const locations: Array<TS.Location> = useSelector(getLocations);
- const [
- locationChooserMenuAnchorEl,
- setLocationChooserMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
+ const [locationChooserMenuAnchorEl, setLocationChooserMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
const locationIcon =
currentLocation && currentLocation.type === locationType.TYPE_CLOUD ? (
@@ -59,7 +57,7 @@ function LocationMenu(props: Props) {
return (
<div
style={{
- backgroundColor: theme.palette.background.default
+ backgroundColor: theme.palette.background.default,
}}
>
<Tooltip
@@ -72,11 +70,13 @@ function LocationMenu(props: Props) {
<IconButton
data-tid="folderContainerLocationChooser"
id="locationMenuButton"
- onClick={event => setLocationChooserMenuAnchorEl(event.currentTarget)}
+ onClick={(event) =>
+ setLocationChooserMenuAnchorEl(event.currentTarget)
+ }
style={{
padding: 5,
fontSize: theme.typography.fontSize,
- borderRadius: 10
+ borderRadius: 10,
}}
size="large"
>
@@ -93,13 +93,13 @@ function LocationMenu(props: Props) {
PaperProps={{
style: {
maxHeight: 48 * 6.5,
- width: 300
- }
+ width: 300,
+ },
}}
>
<ListSubHeader
style={{
- backgroundColor: theme.palette.background.default
+ backgroundColor: theme.palette.background.default,
}}
>
{t('core:chooseLocation')}
diff --git a/app/components/menus/SavedSearchesMenu.tsx b/app/components/menus/SavedSearchesMenu.tsx
index b0bbba392..a6cae6958 100644
--- a/app/components/menus/SavedSearchesMenu.tsx
+++ b/app/components/menus/SavedSearchesMenu.tsx
@@ -37,10 +37,10 @@ function SavedSearchesMenu(props: Props) {
const { open, onClose, anchorEl } = props;
const { t } = useTranslation();
const { findFromSavedSearch } = useDirectoryContentContext();
- const searches = useSelector(state => getSearches(state));
+ const searches = useSelector((state) => getSearches(state));
const menuItems = searches.length ? (
- searches.map(search => (
+ searches.map((search) => (
<MenuItem
key={search.uuid}
onClick={() => {
@@ -63,7 +63,7 @@ function SavedSearchesMenu(props: Props) {
onClose={onClose}
id="search-menu"
MenuListProps={{
- 'aria-labelledby': 'basic-button'
+ 'aria-labelledby': 'basic-button',
}}
// onClick={() => setOpenSavedSearches(null)}
PaperProps={{
@@ -76,7 +76,7 @@ function SavedSearchesMenu(props: Props) {
width: 32,
height: 32,
ml: -0.5,
- mr: 1
+ mr: 1,
},
'&:before': {
content: '""',
@@ -88,9 +88,9 @@ function SavedSearchesMenu(props: Props) {
height: 10,
bgcolor: 'background.paper',
transform: 'translateY(-50%) rotate(45deg)',
- zIndex: 0
- }
- }
+ zIndex: 0,
+ },
+ },
}}
transformOrigin={{ horizontal: 'right', vertical: 'top' }}
anchorOrigin={{ horizontal: 'right', vertical: 'bottom' }}
diff --git a/app/components/menus/SearchMenu.tsx b/app/components/menus/SearchMenu.tsx
index bd42a35b6..49edf6e27 100644
--- a/app/components/menus/SearchMenu.tsx
+++ b/app/components/menus/SearchMenu.tsx
@@ -62,7 +62,7 @@ function SearchMenu(props: Props) {
</>
}
/>
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -85,7 +85,7 @@ function SearchMenu(props: Props) {
</>
}
/>
- </MenuItem>
+ </MenuItem>,
);
menuItems.push(
<MenuItem
@@ -100,7 +100,7 @@ function SearchMenu(props: Props) {
<HelpIcon />
</ListItemIcon>
<ListItemText primary={t('core:help')} />
- </MenuItem>
+ </MenuItem>,
);
return (
diff --git a/app/components/menus/TagGroupMenu.tsx b/app/components/menus/TagGroupMenu.tsx
index f4f34bdff..0facc1d4b 100644
--- a/app/components/menus/TagGroupMenu.tsx
+++ b/app/components/menus/TagGroupMenu.tsx
@@ -67,7 +67,7 @@ function TagGroupMenu(props: Props) {
anchorEl,
showCreateTagsDialog,
showEditTagGroupDialog,
- showDeleteTagGroupDialog
+ showDeleteTagGroupDialog,
} = props;
const { t } = useTranslation();
@@ -113,7 +113,7 @@ function TagGroupMenu(props: Props) {
setSearchQuery({
tagsOR: selectedTagGroupEntry.children,
maxSearchResults: maxSearchResults,
- executeSearch: true
+ executeSearch: true,
});
}
handleCloseTagGroupMenu();
diff --git a/app/components/menus/TagLibraryMenu.tsx b/app/components/menus/TagLibraryMenu.tsx
index 3cdcac830..9a74936d6 100644
--- a/app/components/menus/TagLibraryMenu.tsx
+++ b/app/components/menus/TagLibraryMenu.tsx
@@ -57,7 +57,7 @@ function TagLibraryMenu(props: Props) {
// const [tagGroups, setTagGroups] = useState(null);
const [
isImportExportTagGroupDialogOpened,
- setIsImportExportTagGroupDialogOpened
+ setIsImportExportTagGroupDialogOpened,
] = useState(false);
const [dialogModeImport, setDialogModeImport] = useState(false);
diff --git a/app/components/menus/TagMenu.tsx b/app/components/menus/TagMenu.tsx
index 572c26258..f8de0d55b 100644
--- a/app/components/menus/TagMenu.tsx
+++ b/app/components/menus/TagMenu.tsx
@@ -53,7 +53,7 @@ function TagMenu(props: Props) {
showEditTagDialog,
showDeleteTagDialog,
anchorEl,
- open
+ open,
} = props;
const { t } = useTranslation();
@@ -68,7 +68,7 @@ function TagMenu(props: Props) {
setSearchQuery({
tagsAND: [selectedTag],
maxSearchResults: maxSearchResults,
- executeSearch: true
+ executeSearch: true,
});
}
onClose();
@@ -85,7 +85,7 @@ function TagMenu(props: Props) {
}
function applyTag() {
- const selectedEntryPaths = selectedEntries.map(entry => entry.path);
+ const selectedEntryPaths = selectedEntries.map((entry) => entry.path);
addTags(selectedEntryPaths, [selectedTag]);
onClose();
}
diff --git a/app/containers/App.tsx b/app/containers/App.tsx
index 8500b5317..ea5dbb885 100644
--- a/app/containers/App.tsx
+++ b/app/containers/App.tsx
@@ -22,14 +22,14 @@ import { I18nextProvider, useTranslation } from 'react-i18next'; // as we build
import {
createTheme,
ThemeProvider,
- StyledEngineProvider
+ StyledEngineProvider,
} from '@mui/material/styles';
import useMediaQuery from '@mui/material/useMediaQuery';
import AppConfig from '-/AppConfig';
import {
getCurrentTheme,
getDefaultRegularTheme,
- getDefaultDarkTheme
+ getDefaultDarkTheme,
} from '-/reducers/settings';
declare module '@mui/material/styles' {
@@ -44,13 +44,13 @@ const legacyTheme = createTheme({
primary: {
light: AppConfig.lightThemeLightColor,
main: AppConfig.lightThemeMainColor,
- dark: AppConfig.lightThemeMainColor
+ dark: AppConfig.lightThemeMainColor,
},
secondary: {
- main: AppConfig.lightThemeMainColor
+ main: AppConfig.lightThemeMainColor,
},
- divider: '#ddd'
- }
+ divider: '#ddd',
+ },
});
const newlightTheme = createTheme({
@@ -59,13 +59,13 @@ const newlightTheme = createTheme({
primary: {
light: '#a6def4',
main: '#3bc8ff',
- dark: '#3bc8ff'
+ dark: '#3bc8ff',
},
secondary: {
- main: '#3bc8ff'
+ main: '#3bc8ff',
},
- divider: '#ddd'
- }
+ divider: '#ddd',
+ },
});
// https://mui.com/material-ui/customization/dark-mode/
@@ -75,13 +75,13 @@ const darklegacyTheme = createTheme({
primary: {
light: AppConfig.darkThemeLightColor,
main: AppConfig.darkThemeMainColor,
- dark: AppConfig.darkThemeMainColor
+ dark: AppConfig.darkThemeMainColor,
},
secondary: {
- main: AppConfig.darkThemeMainColor
+ main: AppConfig.darkThemeMainColor,
},
- divider: '#555'
- }
+ divider: '#555',
+ },
});
const darkblueTheme = createTheme({
@@ -90,16 +90,16 @@ const darkblueTheme = createTheme({
primary: {
light: '#a6def4',
main: '#3bc8ff',
- dark: '#3bc8ff'
+ dark: '#3bc8ff',
},
secondary: {
- main: '#3bc8ff'
+ main: '#3bc8ff',
},
background: {
- default: '#001E3C'
+ default: '#001E3C',
},
- divider: '#555'
- }
+ divider: '#555',
+ },
});
const draculaTheme = createTheme({
@@ -108,19 +108,19 @@ const draculaTheme = createTheme({
primary: {
light: '#503d50',
main: '#BD93F9',
- dark: '#BD93F9'
+ dark: '#BD93F9',
},
secondary: {
- main: '#BD93F9'
+ main: '#BD93F9',
},
divider: '#555',
background: {
- default: '#282A36'
+ default: '#282A36',
},
text: {
- primary: '#f8f8f2'
- }
- }
+ primary: '#f8f8f2',
+ },
+ },
});
interface Props {
diff --git a/app/containers/MainPage.tsx b/app/containers/MainPage.tsx
index 67820b9d8..bd33f759a 100644
--- a/app/containers/MainPage.tsx
+++ b/app/containers/MainPage.tsx
@@ -39,7 +39,7 @@ import {
getDesktopMode,
getKeyBindingObject,
getMainVerticalSplitSize,
- actions as SettingsActions
+ actions as SettingsActions,
} from '../reducers/settings';
import {
actions as AppActions,
@@ -66,7 +66,7 @@ import {
isLocationDialogOpened,
isProTeaserVisible,
isTruncatedConfirmDialogOpened,
- isNewAudioDialogOpened
+ isNewAudioDialogOpened,
} from '../reducers/app';
import TargetFileBox from '../components/TargetFileBox';
import LoadingLazy from '../components/LoadingLazy';
@@ -99,7 +99,7 @@ const drawerWidth = 320;
const body = document.getElementsByTagName('body')[0];
const bufferedLeftSplitResize = buffer({
timeout: 300,
- id: 'buffered-leftsplit-resize'
+ id: 'buffered-leftsplit-resize',
});
const KanBanImportDialog = Pro && Pro.UI ? Pro.UI.KanBanImportDialog : false;
@@ -108,7 +108,7 @@ const PREFIX = 'MainPage';
const classes = {
content: `${PREFIX}-content`,
- contentShift: `${PREFIX}-contentShift`
+ contentShift: `${PREFIX}-contentShift`,
};
const Root = styled('div')(({ theme }) => ({
@@ -120,18 +120,18 @@ const Root = styled('div')(({ theme }) => ({
paddingLeft: drawerWidth,
transition: theme.transitions.create('margin', {
easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.leavingScreen
- })
+ duration: theme.transitions.duration.leavingScreen,
+ }),
},
[`& .${classes.contentShift}`]: {
height: '100%',
padding: 0,
transition: theme.transitions.create('margin', {
easing: theme.transitions.easing.easeOut,
- duration: theme.transitions.duration.enteringScreen
+ duration: theme.transitions.duration.enteringScreen,
}),
- marginLeft: 0
- }
+ marginLeft: 0,
+ },
}));
interface Props {
@@ -202,10 +202,11 @@ interface Props {
user: CognitoUserInterface;
}
-const CreateEditLocationDialog = React.lazy(() =>
- import(
- /* webpackChunkName: "CreateEditLocationDialog" */ '../components/dialogs/CreateEditLocationDialog'
- )
+const CreateEditLocationDialog = React.lazy(
+ () =>
+ import(
+ /* webpackChunkName: "CreateEditLocationDialog" */ '../components/dialogs/CreateEditLocationDialog'
+ ),
);
function CreateEditLocationDialogAsync(props) {
return (
@@ -215,10 +216,11 @@ function CreateEditLocationDialogAsync(props) {
);
}
-const AboutDialog = React.lazy(() =>
- import(
- /* webpackChunkName: "AboutDialog" */ '../components/dialogs/AboutDialog'
- )
+const AboutDialog = React.lazy(
+ () =>
+ import(
+ /* webpackChunkName: "AboutDialog" */ '../components/dialogs/AboutDialog'
+ ),
);
function AboutDialogAsync(props) {
return (
@@ -228,10 +230,11 @@ function AboutDialogAsync(props) {
);
}
-const LicenseDialog = React.lazy(() =>
- import(
- /* webpackChunkName: "LicenseDialog" */ '../components/dialogs/LicenseDialog'
- )
+const LicenseDialog = React.lazy(
+ () =>
+ import(
+ /* webpackChunkName: "LicenseDialog" */ '../components/dialogs/LicenseDialog'
+ ),
);
function LicenseDialogAsync(props) {
return (
@@ -241,10 +244,11 @@ function LicenseDialogAsync(props) {
);
}
-const KeyboardDialog = React.lazy(() =>
- import(
- /* webpackChunkName: "KeyboardDialog" */ '../components/dialogs/KeyboardDialog'
- )
+const KeyboardDialog = React.lazy(
+ () =>
+ import(
+ /* webpackChunkName: "KeyboardDialog" */ '../components/dialogs/KeyboardDialog'
+ ),
);
function KeyboardDialogAsync(props) {
return (
@@ -254,10 +258,11 @@ function KeyboardDialogAsync(props) {
);
}
-const ThirdPartyLibsDialog = React.lazy(() =>
- import(
- /* webpackChunkName: "ThirdPartyLibsDialog" */ '../components/dialogs/ThirdPartyLibsDialog'
- )
+const ThirdPartyLibsDialog = React.lazy(
+ () =>
+ import(
+ /* webpackChunkName: "ThirdPartyLibsDialog" */ '../components/dialogs/ThirdPartyLibsDialog'
+ ),
);
function ThirdPartyLibsDialogAsync(props) {
return (
@@ -267,10 +272,11 @@ function ThirdPartyLibsDialogAsync(props) {
);
}
-const OnboardingDialog = React.lazy(() =>
- import(
- /* webpackChunkName: "OnboardingDialog" */ '../components/dialogs/OnboardingDialog'
- )
+const OnboardingDialog = React.lazy(
+ () =>
+ import(
+ /* webpackChunkName: "OnboardingDialog" */ '../components/dialogs/OnboardingDialog'
+ ),
);
function OnboardingDialogAsync(props) {
return (
@@ -280,10 +286,11 @@ function OnboardingDialogAsync(props) {
);
}
-const EditEntryTagDialog = React.lazy(() =>
- import(
- /* webpackChunkName: "EditEntryTagDialog" */ '../components/dialogs/EditEntryTagDialog'
- )
+const EditEntryTagDialog = React.lazy(
+ () =>
+ import(
+ /* webpackChunkName: "EditEntryTagDialog" */ '../components/dialogs/EditEntryTagDialog'
+ ),
);
function EditEntryTagDialogAsync(props) {
return (
@@ -293,10 +300,11 @@ function EditEntryTagDialogAsync(props) {
);
}
-const OpenLinkDialog = React.lazy(() =>
- import(
- /* webpackChunkName: "OpenLinkDialog" */ '../components/dialogs/OpenLinkDialog'
- )
+const OpenLinkDialog = React.lazy(
+ () =>
+ import(
+ /* webpackChunkName: "OpenLinkDialog" */ '../components/dialogs/OpenLinkDialog'
+ ),
);
function OpenLinkDialogAsync(props) {
return (
@@ -306,10 +314,11 @@ function OpenLinkDialogAsync(props) {
);
}
-const ProTeaserDialog = React.lazy(() =>
- import(
- /* webpackChunkName: "ProTeaserDialog" */ '../components/dialogs/ProTeaserDialog'
- )
+const ProTeaserDialog = React.lazy(
+ () =>
+ import(
+ /* webpackChunkName: "ProTeaserDialog" */ '../components/dialogs/ProTeaserDialog'
+ ),
);
function ProTeaserDialogAsync(props) {
return (
@@ -330,19 +339,19 @@ function MainPage(props: Props) {
openFsEntry,
setEntryInFullWidth,
openNextFile,
- openPrevFile
+ openPrevFile,
} = useOpenedEntryContext();
const {
loadParentDirectoryContent,
enterSearchMode,
exitSearchMode,
- setSearchQuery
+ setSearchQuery,
} = useDirectoryContentContext();
const { showNotification } = useNotificationContext();
const theme = useTheme();
const percent = useRef<number | undefined>(undefined);
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0);
const width =
window.innerWidth ||
@@ -354,15 +363,14 @@ function MainPage(props: Props) {
body.clientHeight;
const [dimensions, setDimensions] = useState<any>({
width,
- height
+ height,
});
const [drawerOpened, setDrawerOpened] = useState<boolean>(true);
- const [moveCopyDialogOpened, setMoveCopyDialogOpened] = useState<any>(
- undefined
- );
+ const [moveCopyDialogOpened, setMoveCopyDialogOpened] =
+ useState<any>(undefined);
- useEventListener('message', e => {
+ useEventListener('message', (e) => {
if (typeof e.data === 'string') {
// console.log(e.data);
try {
@@ -373,7 +381,7 @@ function MainPage(props: Props) {
} catch (ex) {
console.debug(
'useEventListener message:' + e.data + ' parse error:',
- ex
+ ex,
);
}
}
@@ -386,7 +394,7 @@ function MainPage(props: Props) {
() => {
openLink(window.location.href, { fullWidth: false });
},
- { once: true }
+ { once: true },
);
}
@@ -403,7 +411,7 @@ function MainPage(props: Props) {
// '>>> last href: ' + decodeURIComponent(window.location.href)
// );
},
- { once: true }
+ { once: true },
);
}
@@ -418,7 +426,7 @@ function MainPage(props: Props) {
openFsEntry,
openNextFile,
openPrevFile,
- setSearchQuery
+ setSearchQuery,
});
}, []);
@@ -461,7 +469,7 @@ function MainPage(props: Props) {
};
const toggleDrawer = () => {
- setDrawerOpened(prevOpen => !prevOpen);
+ setDrawerOpened((prevOpen) => !prevOpen);
};
const keyBindingHandlers = {
@@ -480,7 +488,7 @@ function MainPage(props: Props) {
showHelp: () => {
props.openHelpFeedbackPanel();
setDrawerOpened(true);
- }
+ },
};
const keyMap = {
@@ -490,7 +498,7 @@ function MainPage(props: Props) {
showTagLibrary: props.keyBindings.showTagLibrary,
openSearch: props.keyBindings.openSearch,
closeSearch: props.keyBindings.Escape,
- showHelp: props.keyBindings.showHelp
+ showHelp: props.keyBindings.showHelp,
};
const {
@@ -511,7 +519,7 @@ function MainPage(props: Props) {
toggleOpenLinkDialog,
toggleProTeaser,
setFirstRun,
- mainSplitSize
+ mainSplitSize,
} = props;
const { FILE } = NativeTypes;
@@ -539,7 +547,7 @@ function MainPage(props: Props) {
percent.current = undefined;
initialPrimarySize = '100%';
minSecondarySize = '0%';
- renderSplitter = function() {
+ renderSplitter = function () {
return null;
};
}
@@ -547,7 +555,7 @@ function MainPage(props: Props) {
percent.current = undefined;
initialPrimarySize = '0%';
minPrimarySize = '0%';
- renderSplitter = function() {
+ renderSplitter = function () {
return null;
};
}
@@ -715,22 +723,22 @@ function MainPage(props: Props) {
onClose={() => props.toggleDeleteMultipleEntriesDialog()}
title={t('core:deleteConfirmationTitle')}
content={t('core:deleteConfirmationContent')}
- list={selectedEntries.map(fsEntry => fsEntry.name)}
- confirmCallback={result => {
+ list={selectedEntries.map((fsEntry) => fsEntry.name)}
+ confirmCallback={(result) => {
if (result && selectedEntries) {
deleteEntries(selectedEntries).then(
- success =>
+ (success) =>
success &&
selectedEntries.length > 1 &&
showNotification(
t('core:deletingEntriesSuccessful', {
dirPath: selectedEntries
- .map(fsEntry => fsEntry.name)
- .toString()
+ .map((fsEntry) => fsEntry.name)
+ .toString(),
}),
'default',
- true
- )
+ true,
+ ),
);
}
}}
@@ -743,7 +751,7 @@ function MainPage(props: Props) {
<div
style={{
backgroundColor: theme.palette.background.default,
- height: '100%'
+ height: '100%',
}}
>
<style>
@@ -785,7 +793,7 @@ function MainPage(props: Props) {
</Drawer>
<main
className={clsx(classes.content, {
- [classes.contentShift]: !drawerOpened
+ [classes.contentShift]: !drawerOpened,
})}
>
{renderContainers()}
@@ -841,11 +849,10 @@ function mapStateToProps(state) {
isTagLibraryPanelOpened: isTagLibraryPanelOpened(state),
isSearchPanelOpened: isSearchPanelOpened(state),
isHelpFeedbackPanelOpened: isHelpFeedbackPanelOpened(state),
- isDeleteMultipleEntriesDialogOpened: isDeleteMultipleEntriesDialogOpened(
- state
- ),
+ isDeleteMultipleEntriesDialogOpened:
+ isDeleteMultipleEntriesDialogOpened(state),
isImportKanBanDialogOpened: isImportKanBanDialogOpened(state),
- user: currentUser(state)
+ user: currentUser(state),
};
}
@@ -888,9 +895,9 @@ function mapDispatchToProps(dispatch) {
AppActions.toggleDeleteMultipleEntriesDialog,
setFirstRun: SettingsActions.setFirstRun,
addExtensions: AppActions.addExtensions,
- addSupportedFileTypes: SettingsActions.addSupportedFileTypes
+ addSupportedFileTypes: SettingsActions.addSupportedFileTypes,
},
- dispatch
+ dispatch,
);
}
@@ -929,5 +936,5 @@ const areEqual = (prevProp, nextProp) =>
nextProp.isImportKanBanDialogOpened === prevProp.isImportKanBanDialogOpened;
export default withDnDContext(
- connect(mapStateToProps, mapDispatchToProps)(React.memo(MainPage, areEqual)) //translate(['core'], { wait: true })(React.memo(MainPage, areEqual)))
+ connect(mapStateToProps, mapDispatchToProps)(React.memo(MainPage, areEqual)), //translate(['core'], { wait: true })(React.memo(MainPage, areEqual)))
);
diff --git a/app/containers/PageNotification.tsx b/app/containers/PageNotification.tsx
index 39d7372b7..d98acfc24 100644
--- a/app/containers/PageNotification.tsx
+++ b/app/containers/PageNotification.tsx
@@ -28,7 +28,7 @@ import { getLastPublishedVersion } from '-/reducers/settings';
import {
actions as AppActions,
AppDispatch,
- isUpdateAvailable
+ isUpdateAvailable,
} from '../reducers/app';
import { Pro } from '../pro';
import Links from '-/content/links';
@@ -41,9 +41,9 @@ const TSNotification = styled(Snackbar)(({ theme }) => {
return {
root: {
'& .MuiSnackbarContent-root': {
- borderRadius: 10
- }
- }
+ borderRadius: 10,
+ },
+ },
};
}) as typeof Snackbar;
@@ -55,7 +55,7 @@ function PageNotification() {
setGeneratingThumbs,
notificationStatus,
showNotification,
- hideNotifications
+ hideNotifications,
} = useNotificationContext();
const { isIndexing, cancelDirectoryIndexing } = useLocationIndexContext();
const updateAvailable = useSelector(isUpdateAvailable);
@@ -97,7 +97,7 @@ function PageNotification() {
size="large"
>
<CloseIcon />
- </IconButton>
+ </IconButton>,
]}
/>
{isGeneratingThumbs && (
@@ -115,7 +115,7 @@ function PageNotification() {
size="large"
>
<CloseIcon />
- </IconButton>
+ </IconButton>,
]}
/>
)}
@@ -133,7 +133,7 @@ function PageNotification() {
data-tid="cancelDirectoryIndexing"
>
{t('core:cancelIndexing')}
- </Button>
+ </Button>,
]}
/>
<TSNotification
@@ -165,7 +165,7 @@ function PageNotification() {
onClick={getLatestVersion}
>
{t('core:getItNow')}
- </Button>
+ </Button>,
]}
/>
</>
diff --git a/app/containers/Root.tsx b/app/containers/Root.tsx
index 1c8aec399..3bed9d171 100644
--- a/app/containers/Root.tsx
+++ b/app/containers/Root.tsx
@@ -36,7 +36,7 @@ import { TaggingActionsContextProvider } from '-/hooks/TaggingActionsContextProv
import { LocationIndexContextProvider } from '-/hooks/LocationIndexContextProvider';
import {
SelectedEntryContext,
- SelectedEntryContextProvider
+ SelectedEntryContextProvider,
} from '-/hooks/SelectedEntryContextProvider';
import { FSWatcherContextProvider } from '-/hooks/FSWatcherContextProvider';
import { PlatformFacadeContextProvider } from '-/hooks/PlatformFacadeContextProvider';
diff --git a/app/containers/TsAuth.tsx b/app/containers/TsAuth.tsx
index 9889edf28..4f5259c49 100644
--- a/app/containers/TsAuth.tsx
+++ b/app/containers/TsAuth.tsx
@@ -21,14 +21,14 @@ import {
AmplifyAuthenticator,
AmplifySignIn,
AmplifySignUp,
- AmplifyTotpSetup
+ AmplifyTotpSetup,
} from '@aws-amplify/ui-react';
import { Amplify } from 'aws-amplify';
import HandleAuth from '-/utils/HandleAuth';
import LogoIcon from '-/assets/images/icon100x100.svg';
import { useTranslation } from 'react-i18next';
-const TsAuth: React.FC<any> = props => {
+const TsAuth: React.FC<any> = (props) => {
const { t } = useTranslation();
let awsconfig;
try {
@@ -37,7 +37,7 @@ const TsAuth: React.FC<any> = props => {
} catch (e) {
if (e && e.code && e.code === 'MODULE_NOT_FOUND') {
console.debug(
- 'Auth functionality not available aws-exports.js is missing. Are you sure that you have run "amplitude init"?'
+ 'Auth functionality not available aws-exports.js is missing. Are you sure that you have run "amplitude init"?',
);
return props.children;
}
@@ -55,7 +55,7 @@ const TsAuth: React.FC<any> = props => {
// @ts-ignore
'--amplify-primary-color': '#1dd19f',
'--amplify-primary-tint': '#1dd19f',
- '--amplify-primary-shade': '#4A5568'
+ '--amplify-primary-shade': '#4A5568',
}}
>
<AmplifyTotpSetup
@@ -72,14 +72,14 @@ const TsAuth: React.FC<any> = props => {
type: 'email',
label: 'Email',
placeholder: 'Enter your email',
- required: true
+ required: true,
},
{
type: 'password',
label: 'Password',
placeholder: 'Enter your password',
- required: true
- }
+ required: true,
+ },
]}
/>
<AmplifySignIn
diff --git a/app/containers/withDnDContext.tsx b/app/containers/withDnDContext.tsx
index 9cc780323..53ece4874 100644
--- a/app/containers/withDnDContext.tsx
+++ b/app/containers/withDnDContext.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { DndProvider } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
-export default Component =>
- function(props) {
+export default (Component) =>
+ function (props) {
return (
<DndProvider backend={HTML5Backend}>
<Component {...props} />
diff --git a/app/content/ProTeaserSlides.tsx b/app/content/ProTeaserSlides.tsx
index 2d349610c..1c447e51d 100644
--- a/app/content/ProTeaserSlides.tsx
+++ b/app/content/ProTeaserSlides.tsx
@@ -20,14 +20,14 @@ export const slidesNames = [
'revisions',
'search',
'folderColor',
- 'enterprise'
+ 'enterprise',
];
export function getProTeaserSlideIndex(slideName: string): number {
if (!slideName) {
return -1;
}
- return slidesNames.findIndex(key => key === slideName);
+ return slidesNames.findIndex((key) => key === slideName);
}
export function getProTeaserSlides(t) {
@@ -52,7 +52,7 @@ export function getProTeaserSlides(t) {
</>
),
pictureURL: ProTeaserImage,
- pictureHeight: 150
+ pictureHeight: 150,
};
slidesEN[slidesNames[1]] = {
title: 'TagSpaces Pro - Kanban Perspectives',
@@ -71,7 +71,7 @@ export function getProTeaserSlides(t) {
ctaTitle: t('showMeMore'),
pictureURL: KanbanImage,
pictureShadow: true,
- pictureHeight: 300
+ pictureHeight: 300,
};
slidesEN[slidesNames[2]] = {
title: 'TagSpaces Pro - Gallery Perspectives',
@@ -88,7 +88,7 @@ export function getProTeaserSlides(t) {
ctaTitle: t('showMeMore'),
pictureURL: GalleryImage,
pictureShadow: true,
- pictureHeight: 300
+ pictureHeight: 300,
};
slidesEN[slidesNames[3]] = {
title: 'TagSpaces Pro - Mapique Perspective & Geo tagging',
@@ -112,7 +112,7 @@ export function getProTeaserSlides(t) {
ctaTitle: t('showMeMore'),
pictureURL: MapImage,
pictureShadow: true,
- pictureHeight: 300
+ pictureHeight: 300,
};
slidesEN[slidesNames[4]] = {
title: 'Annotate and link your files and folders',
@@ -139,13 +139,13 @@ export function getProTeaserSlides(t) {
<>
You can also set a <b>custom thumbnail</b> for every file or folder,
allowing you to emphasize visually its content.
- </>
+ </>,
],
ctaURL: Links.links.productProFileFolderMeta,
ctaTitle: t('showMeMore'),
pictureURL: EntryDescription,
pictureShadow: true,
- pictureHeight: 300
+ pictureHeight: 300,
};
slidesEN[slidesNames[5]] = {
title: 'Revisions and auto-save for editable files',
@@ -170,7 +170,7 @@ export function getProTeaserSlides(t) {
ctaTitle: t('showMeMore'),
pictureURL: RevisionsAutosave,
pictureShadow: true,
- pictureHeight: 400
+ pictureHeight: 400,
};
slidesEN[slidesNames[6]] = {
title: 'Extended Search',
@@ -196,12 +196,12 @@ export function getProTeaserSlides(t) {
archives, bookmarks, ebooks, ...
</>,
<>Filter for files, folders or untagged files</>,
- <>Filter by size and date</>
+ <>Filter by size and date</>,
],
ctaURL: Links.links.productProAdvancedSearch,
ctaTitle: t('showMeMore'),
pictureURL: SearchImage,
- pictureHeight: 150
+ pictureHeight: 150,
};
slidesEN[slidesNames[7]] = {
title: 'Folders with custom backgrounds',
@@ -219,7 +219,7 @@ export function getProTeaserSlides(t) {
ctaTitle: t('showMeMore'),
pictureURL: CustomFolderColor,
pictureShadow: true,
- pictureHeight: 300
+ pictureHeight: 300,
};
slidesEN[slidesNames[8]] = {
title: 'TagSpaces Web Pro & Enterprise',
@@ -246,12 +246,12 @@ export function getProTeaserSlides(t) {
<>
Development of custom <b>file viewers</b> or <b>perspectives</b>
</>,
- <>Premium technical support</>
+ <>Premium technical support</>,
],
ctaURL: Links.links.emailContact,
ctaTitle: t('contactUs'),
pictureURL: EnterpriseImage,
- pictureHeight: 200
+ pictureHeight: 200,
};
return slidesEN;
}
diff --git a/app/content/links.ts b/app/content/links.ts
index 77cdf249d..5fc4811d9 100644
--- a/app/content/links.ts
+++ b/app/content/links.ts
@@ -57,7 +57,7 @@ const Links = {
facebook: 'https://www.facebook.com/tagspacesapp',
emailContact: 'mailto:[email protected]?subject=App',
cancelSubscription:
- 'mailto:[email protected]?subject=Cancel%20subscription&body=Please%20enter%20here%20you%20order%20ID%20or%20the%20email%20with%20which%20the%20purchase%20was%20made.' // 'https://fastspring.com/consumer-support-form/?ulCase.Primary_Category__c=Cancel%20/%20Refund&Case.Category__c=Cancel%20Subscription'
+ 'mailto:[email protected]?subject=Cancel%20subscription&body=Please%20enter%20here%20you%20order%20ID%20or%20the%20email%20with%20which%20the%20purchase%20was%20made.', // 'https://fastspring.com/consumer-support-form/?ulCase.Primary_Category__c=Cancel%20/%20Refund&Case.Category__c=Cancel%20Subscription'
},
documentationLinks: {
general: 'https://docs.tagspaces.org/' + urlParams,
@@ -79,8 +79,8 @@ const Links = {
search: 'https://docs.tagspaces.org/search' + urlParams,
settings: 'https://docs.tagspaces.org/ui/settings' + urlParams,
sharing: 'https://docs.tagspaces.org/sharing' + urlParams,
- creatingFiles: 'https://docs.tagspaces.org/creating-files' + urlParams
- }
+ creatingFiles: 'https://docs.tagspaces.org/creating-files' + urlParams,
+ },
};
export default Links;
diff --git a/app/electron-tray-menu.ts b/app/electron-tray-menu.ts
index 0408c67c9..797970097 100644
--- a/app/electron-tray-menu.ts
+++ b/app/electron-tray-menu.ts
@@ -47,51 +47,51 @@ export default function buildTrayIconMenu(mainPageProps: any, i18n, isMacLike) {
const trayMenuTemplate = [
{
label: i18n.t('newWindow'),
- click: () => mainPageProps.createNewWindowInstance()
+ click: () => mainPageProps.createNewWindowInstance(),
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('showTagSpaces') + cKey + '+Shift+W',
- click: mainPageProps.showTagSpaces
+ click: mainPageProps.showTagSpaces,
},
{
label: i18n.t('showSearch') + cKey + '+Shift+F',
- click: mainPageProps.openSearch
+ click: mainPageProps.openSearch,
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('newFileNote') + cKey + '+Shift+N',
- click: mainPageProps.toggleNewFileDialog
+ click: mainPageProps.toggleNewFileDialog,
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('openNextFileTooltip') + cKey + '+Shift+D',
- click: openNextFile
+ click: openNextFile,
},
{
label: i18n.t('openPrevFileTooltip') + cKey + '+Shift+A',
- click: openPrevFile
+ click: openPrevFile,
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('pauseResumePlayback') + cKey + '+Shift+P',
- click: playResumePlayback
+ click: playResumePlayback,
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('quitTagSpaces') + cKey + '+Q',
- click: quitApp
- }
+ click: quitApp,
+ },
];
let icon = nativeImage.createFromDataURL(icon2x);
@@ -100,7 +100,7 @@ export default function buildTrayIconMenu(mainPageProps: any, i18n, isMacLike) {
icon = nativeImage.createFromDataURL(icon1x);
icon.addRepresentation({
scaleFactor: 2.0,
- dataURL: icon2x
+ dataURL: icon2x,
});
}
tray = new Tray(icon);
diff --git a/app/hooks/CurrentLocationContextProvider.tsx b/app/hooks/CurrentLocationContextProvider.tsx
index 2ddfb4694..8d8368411 100644
--- a/app/hooks/CurrentLocationContextProvider.tsx
+++ b/app/hooks/CurrentLocationContextProvider.tsx
@@ -21,7 +21,7 @@ import React, {
useEffect,
useMemo,
useRef,
- useState
+ useState,
} from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { actions as AppActions, AppDispatch } from '-/reducers/app';
@@ -30,7 +30,7 @@ import { useTranslation } from 'react-i18next';
import {
actions as LocationActions,
getDefaultLocationId,
- getLocations
+ getLocations,
} from '-/reducers/locations';
import PlatformIO from '-/services/platform-facade';
import { setLocationType } from '-/services/utils-io';
@@ -52,7 +52,7 @@ type CurrentLocationContextData = {
addLocation: (
location: TS.Location,
openAfterCreate?: boolean,
- locationPosition?: number
+ locationPosition?: number,
) => void;
addLocations: (arrLocations: Array<TS.Location>, override?: boolean) => void;
openLocation: (location: TS.Location, skipInitialDirList?: boolean) => void;
@@ -90,8 +90,8 @@ export const CurrentLocationContext = createContext<CurrentLocationContextData>(
setSelectedLocation: () => {},
getLocationPosition: () => 0,
locationDirectoryContextMenuAnchorEl: undefined,
- setLocationDirectoryContextMenuAnchorEl: () => {}
- }
+ setLocationDirectoryContextMenuAnchorEl: () => {},
+ },
);
export type CurrentLocationContextProviderProps = {
@@ -99,25 +99,24 @@ export type CurrentLocationContextProviderProps = {
};
export const CurrentLocationContextProvider = ({
- children
+ children,
}: CurrentLocationContextProviderProps) => {
const dispatch: AppDispatch = useDispatch();
const { t } = useTranslation();
const { showNotification } = useNotificationContext();
- const [currentLocation, setCurrentLocation] = useState<TS.Location>(
- undefined
- );
+ const [currentLocation, setCurrentLocation] =
+ useState<TS.Location>(undefined);
const selectedLocation = useRef<TS.Location>(undefined);
const skipInitialDirList = useRef<boolean>(false);
const [
locationDirectoryContextMenuAnchorEl,
- setLocationDirectoryContextMenuAnchorEl
+ setLocationDirectoryContextMenuAnchorEl,
] = useState<null | HTMLElement>(null);
const locations: TS.Location[] = useSelector(getLocations);
const defaultLocationId = useSelector(getDefaultLocationId);
const settingsPersistTagsInSidecarFile: boolean = useSelector(
- getPersistTagsInSidecarFile
+ getPersistTagsInSidecarFile,
);
useEffect(() => {
@@ -141,7 +140,7 @@ export const CurrentLocationContextProvider = ({
// check if current location exist (or is removed)
if (currentLocation) {
const location = locations.find(
- location => location.uuid === currentLocation.uuid
+ (location) => location.uuid === currentLocation.uuid,
);
if (!location) {
closeLocation(currentLocation.uuid);
@@ -156,9 +155,9 @@ export const CurrentLocationContextProvider = ({
function setDefaultLocations() {
PlatformIO.getDevicePaths()
- .then(devicePaths => {
+ .then((devicePaths) => {
if (devicePaths) {
- Object.keys(devicePaths).forEach(key => {
+ Object.keys(devicePaths).forEach((key) => {
addLocation(
{
uuid: getUuid(),
@@ -167,21 +166,21 @@ export const CurrentLocationContextProvider = ({
path: devicePaths[key] as string,
isDefault: false, // AppConfig.isWeb && devicePaths[key] === '/files/', // Used for the web ts demo
isReadOnly: false,
- disableIndexing: false
+ disableIndexing: false,
},
- false
+ false,
);
});
}
return true;
})
- .catch(ex => console.log(ex));
+ .catch((ex) => console.log(ex));
}
function addLocation(
location: TS.Location,
openAfterCreate = true,
- locationPosition: number = undefined
+ locationPosition: number = undefined,
) {
dispatch(LocationActions.createLocation(location, locationPosition));
if (openAfterCreate) {
@@ -195,7 +194,7 @@ export const CurrentLocationContextProvider = ({
function addLocations(arrLocations: Array<TS.Location>, override = true) {
arrLocations.forEach((newLocation: TS.Location, idx, array) => {
const locationExist: boolean = locations.some(
- location => location.uuid === newLocation.uuid
+ (location) => location.uuid === newLocation.uuid,
);
const isLast = idx === array.length - 1;
if (!locationExist) {
@@ -235,7 +234,7 @@ export const CurrentLocationContextProvider = ({
const readOnlyMode: boolean = useMemo(
() => currentLocation && currentLocation.isReadOnly,
- [currentLocation]
+ [currentLocation],
);
const persistTagsInSidecarFile: boolean = useMemo(() => {
@@ -255,7 +254,9 @@ export const CurrentLocationContextProvider = ({
function changeLocationByID(locationId: string) {
if (!currentLocation || locationId !== currentLocation.uuid) {
- const location = locations.find(location => location.uuid === locationId);
+ const location = locations.find(
+ (location) => location.uuid === locationId,
+ );
if (location) {
setCurrentLocation(location);
}
@@ -263,7 +264,7 @@ export const CurrentLocationContextProvider = ({
}
function switchLocationTypeByID(locationId: string) {
- const location = locations.find(location => location.uuid === locationId);
+ const location = locations.find((location) => location.uuid === locationId);
return switchLocationType(location);
}
@@ -292,7 +293,7 @@ export const CurrentLocationContextProvider = ({
}
function openLocationById(locationId: string, skipInitDirList?: boolean) {
- const location = locations.find(location => location.uuid === locationId);
+ const location = locations.find((location) => location.uuid === locationId);
if (location) {
openLocation(location, skipInitDirList);
}
@@ -300,7 +301,7 @@ export const CurrentLocationContextProvider = ({
function openLocation(
location: TS.Location,
- skipInitDirList: boolean = false
+ skipInitDirList: boolean = false,
) {
// stopWatching();
skipInitialDirList.current = skipInitDirList;
@@ -310,18 +311,18 @@ export const CurrentLocationContextProvider = ({
showNotification(
t('core:connectedtoObjectStore' as any) as string,
'default',
- true
+ true,
);
//dispatch(AppActions.setReadOnlyMode(location.isReadOnly || false));
changeLocation(location);
return true;
})
- .catch(e => {
+ .catch((e) => {
console.log('connectedtoObjectStoreFailed', e);
showNotification(
t('core:connectedtoObjectStoreFailed' as any) as string,
'warning',
- true
+ true,
);
PlatformIO.disableObjectStoreSupport();
});
@@ -339,7 +340,7 @@ export const CurrentLocationContextProvider = ({
function closeLocation(locationId: string) {
if (currentLocation && currentLocation.uuid === locationId) {
- locations.map(location => {
+ locations.map((location) => {
if (location.uuid === locationId) {
// location needed evtl. to unwatch many loc. root folders if available
setCurrentLocation(undefined);
@@ -358,7 +359,7 @@ export const CurrentLocationContextProvider = ({
}
function getLocationPosition(locationId: string): number {
- return locations.findIndex(location => location.uuid === locationId);
+ return locations.findIndex((location) => location.uuid === locationId);
}
function isCurrentLocation(uuid: string) {
@@ -386,13 +387,13 @@ export const CurrentLocationContextProvider = ({
locationDirectoryContextMenuAnchorEl,
setLocationDirectoryContextMenuAnchorEl,
setSelectedLocation,
- getLocationPosition
+ getLocationPosition,
};
}, [
currentLocation,
persistTagsInSidecarFile,
skipInitialDirList.current,
- locationDirectoryContextMenuAnchorEl
+ locationDirectoryContextMenuAnchorEl,
]);
return (
diff --git a/app/hooks/DescriptionContextProvider.tsx b/app/hooks/DescriptionContextProvider.tsx
index 4195aaefd..f14c1d299 100644
--- a/app/hooks/DescriptionContextProvider.tsx
+++ b/app/hooks/DescriptionContextProvider.tsx
@@ -21,13 +21,13 @@ import React, {
useEffect,
useMemo,
useRef,
- useState
+ useState,
} from 'react';
import { useDispatch, useSelector } from 'react-redux';
import {
actions as AppActions,
AppDispatch,
- OpenedEntry
+ OpenedEntry,
} from '-/reducers/app';
import { Pro } from '-/pro';
import { useTranslation } from 'react-i18next';
@@ -50,7 +50,7 @@ export const DescriptionContext = createContext<DescriptionContextData>({
isSaveDescriptionConfirmOpened: false,
setSaveDescriptionConfirmOpened: () => {},
setDescription: () => {},
- saveDescription: () => {}
+ saveDescription: () => {},
});
export type DescriptionContextProviderProps = {
@@ -58,7 +58,7 @@ export type DescriptionContextProviderProps = {
};
export const DescriptionContextProvider = ({
- children
+ children,
}: DescriptionContextProviderProps) => {
const { t } = useTranslation();
const { setSelectedEntries } = useSelectedEntriesContext();
@@ -66,21 +66,16 @@ export const DescriptionContextProvider = ({
openedEntries,
addToEntryContainer,
updateOpenedFile,
- reloadOpenedFile
+ reloadOpenedFile,
} = useOpenedEntryContext();
- const {
- switchLocationTypeByID,
- switchCurrentLocationType,
- readOnlyMode
- } = useCurrentLocationContext();
+ const { switchLocationTypeByID, switchCurrentLocationType, readOnlyMode } =
+ useCurrentLocationContext();
const { updateCurrentDirEntry } = useDirectoryContentContext();
const { showNotification } = useNotificationContext();
const openedFile = useRef<OpenedEntry>(openedEntries[0]);
const isChanged = useRef<boolean>(false);
- const [
- isSaveDescriptionConfirmOpened,
- saveDescriptionConfirmOpened
- ] = useState<boolean>(false);
+ const [isSaveDescriptionConfirmOpened, saveDescriptionConfirmOpened] =
+ useState<boolean>(false);
useEffect(() => {
if (openedEntries && openedEntries.length > 0) {
@@ -119,22 +114,22 @@ export const DescriptionContextProvider = ({
//setDescriptionChanged(false);
if (openedFile.current.locationId) {
switchLocationTypeByID(openedFile.current.locationId).then(
- currentLocationId => {
+ (currentLocationId) => {
saveMetaData()
.then(() => switchCurrentLocationType())
- .catch(error => {
+ .catch((error) => {
console.warn('Error saving description ' + error);
switchCurrentLocationType().then(() =>
- showNotification(t('Error saving description'))
+ showNotification(t('Error saving description')),
);
});
- }
+ },
);
} else {
console.debug(
'openedFile:' +
openedFile.current.path +
- ' dont have locationId! Current Location can be changed. Trying to save opened file in current location'
+ ' dont have locationId! Current Location can be changed. Trying to save opened file in current location',
);
saveMetaData();
}
@@ -143,11 +138,11 @@ export const DescriptionContextProvider = ({
function saveMetaData() {
return Pro.MetaOperations.saveFsEntryMeta(openedFile.current.path, {
- description: openedFile.current.description
- }).then(entryMeta => {
+ description: openedFile.current.description,
+ }).then((entryMeta) => {
// @ts-ignore
updateCurrentDirEntry(openedFile.current.path, {
- description: entryMeta.description
+ description: entryMeta.description,
});
openedFile.current.description = undefined;
isChanged.current = false;
@@ -174,7 +169,7 @@ export const DescriptionContextProvider = ({
isSaveDescriptionConfirmOpened,
setSaveDescriptionConfirmOpened,
setDescription,
- saveDescription
+ saveDescription,
};
}, [openedFile.current, isSaveDescriptionConfirmOpened]);
diff --git a/app/hooks/DirectoryContentContextProvider.tsx b/app/hooks/DirectoryContentContextProvider.tsx
index 3b6614a13..e44a8af87 100644
--- a/app/hooks/DirectoryContentContextProvider.tsx
+++ b/app/hooks/DirectoryContentContextProvider.tsx
@@ -22,14 +22,14 @@ import React, {
useMemo,
useReducer,
useRef,
- useState
+ useState,
} from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { locationType } from '@tagspaces/tagspaces-common/misc';
import {
actions as AppActions,
AppDispatch,
- getEditedEntryPaths
+ getEditedEntryPaths,
} from '-/reducers/app';
import { TS } from '-/tagspaces.namespace';
import { useTranslation } from 'react-i18next';
@@ -41,7 +41,7 @@ import {
extractParentDirectoryPath,
getMetaFileLocationForDir,
normalizePath,
- getMetaDirectoryPath
+ getMetaDirectoryPath,
} from '@tagspaces/tagspaces-common/paths';
import PlatformIO from '-/services/platform-facade';
import { loadJSONFile, merge, updateFsEntries } from '-/services/utils-io';
@@ -51,7 +51,7 @@ import { updateHistory } from '-/utils/dom';
import {
getShowUnixHiddenEntries,
getTagColor,
- getTagTextColor
+ getTagTextColor,
} from '-/reducers/settings';
import { enhanceEntry, getUuid } from '@tagspaces/tagspaces-common/utils-io';
import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
@@ -88,7 +88,7 @@ type DirectoryContentContextData = {
loadDirectoryContent: (
directoryPath: string,
loadDirMeta?: boolean,
- showHiddenEntries?: boolean
+ showHiddenEntries?: boolean,
) => Promise<TS.FileSystemEntry[]>;
enhanceDirectoryContent: (
dirEntries,
@@ -96,11 +96,11 @@ type DirectoryContentContextData = {
showDirs?: boolean,
limit?: number,
getDirMeta?: boolean,
- generateThumbnails?: boolean
+ generateThumbnails?: boolean,
) => any;
openDirectory: (
dirPath: string,
- showHiddenEntries?: boolean
+ showHiddenEntries?: boolean,
) => Promise<boolean>;
openCurrentDirectory: (showHiddenEntries?: boolean) => Promise<boolean>;
clearDirectoryContent: () => void;
@@ -119,57 +119,53 @@ type DirectoryContentContextData = {
findFromSavedSearch: (uuid: string) => void;
};
-export const DirectoryContentContext = createContext<
- DirectoryContentContextData
->({
- currentDirectoryEntries: [],
- directoryMeta: undefined,
- currentDirectoryPerspective: undefined,
- currentDirectoryPath: undefined,
- currentDirectoryFiles: [],
- currentDirectoryDirs: [],
- //isMetaLoaded: undefined,
- //isMetaFolderExist: false,
- searchQuery: {},
- isSearchMode: false,
- addDirectoryEntries: undefined,
- removeDirectoryEntries: undefined,
- setSearchQuery: () => {},
- loadParentDirectoryContent: () => {},
- loadDirectoryContent: undefined,
- enhanceDirectoryContent: () => {},
- openDirectory: undefined,
- openCurrentDirectory: undefined,
- clearDirectoryContent: () => {},
- setCurrentDirectoryPerspective: () => {},
- setCurrentDirectoryColor: () => {},
- setCurrentDirectoryDirs: () => {},
- setCurrentDirectoryFiles: () => {},
- updateCurrentDirEntry: () => {},
- updateCurrentDirEntries: () => {},
- updateThumbnailUrl: () => {},
- setDirectoryMeta: () => {},
- setSearchResults: () => {},
- appendSearchResults: () => {},
- enterSearchMode: () => {},
- exitSearchMode: () => {},
- findFromSavedSearch: () => {}
-});
+export const DirectoryContentContext =
+ createContext<DirectoryContentContextData>({
+ currentDirectoryEntries: [],
+ directoryMeta: undefined,
+ currentDirectoryPerspective: undefined,
+ currentDirectoryPath: undefined,
+ currentDirectoryFiles: [],
+ currentDirectoryDirs: [],
+ //isMetaLoaded: undefined,
+ //isMetaFolderExist: false,
+ searchQuery: {},
+ isSearchMode: false,
+ addDirectoryEntries: undefined,
+ removeDirectoryEntries: undefined,
+ setSearchQuery: () => {},
+ loadParentDirectoryContent: () => {},
+ loadDirectoryContent: undefined,
+ enhanceDirectoryContent: () => {},
+ openDirectory: undefined,
+ openCurrentDirectory: undefined,
+ clearDirectoryContent: () => {},
+ setCurrentDirectoryPerspective: () => {},
+ setCurrentDirectoryColor: () => {},
+ setCurrentDirectoryDirs: () => {},
+ setCurrentDirectoryFiles: () => {},
+ updateCurrentDirEntry: () => {},
+ updateCurrentDirEntries: () => {},
+ updateThumbnailUrl: () => {},
+ setDirectoryMeta: () => {},
+ setSearchResults: () => {},
+ appendSearchResults: () => {},
+ enterSearchMode: () => {},
+ exitSearchMode: () => {},
+ findFromSavedSearch: () => {},
+ });
export type DirectoryContentContextProviderProps = {
children: React.ReactNode;
};
export const DirectoryContentContextProvider = ({
- children
+ children,
}: DirectoryContentContextProviderProps) => {
const dispatch: AppDispatch = useDispatch();
const { t } = useTranslation();
- const {
- closeAllLocations,
- currentLocation,
- skipInitialDirList
- } = useCurrentLocationContext();
+ const { closeAllLocations, currentLocation, skipInitialDirList } =
+ useCurrentLocationContext();
const { showNotification, hideNotifications } = useNotificationContext();
const { selectedEntries, setSelectedEntries } = useSelectedEntriesContext();
@@ -180,7 +176,7 @@ export const DirectoryContentContextProvider = ({
const defaultBackgroundColor = useSelector(getTagColor);
const defaultTextColor = useSelector(getTagTextColor);
const searchHistoryKey = useSelector((state: any) =>
- Pro ? state.settings[Pro.history.historyKeys.searchHistoryKey] : undefined
+ Pro ? state.settings[Pro.history.historyKeys.searchHistoryKey] : undefined,
);
//const enableWS = useSelector(getEnableWS);
@@ -207,7 +203,7 @@ export const DirectoryContentContextProvider = ({
const currentDirectoryFiles = useRef<TS.OrderVisibilitySettings[]>([]);
const currentDirectoryDirs = useRef<TS.OrderVisibilitySettings[]>([]);
const firstRender = useFirstRender();
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0, undefined);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0, undefined);
useEffect(() => {
if (currentLocation) {
@@ -232,13 +228,15 @@ export const DirectoryContentContextProvider = ({
if (action === 'rename') {
const oldFilePath = editedEntryPaths[0].path;
const newFilePath = editedEntryPaths[1].path;
- const entry = currentDirectoryEntries.find(e => e.path === oldFilePath);
+ const entry = currentDirectoryEntries.find(
+ (e) => e.path === oldFilePath,
+ );
if (entry) {
const fileNameTags = entry.isFile
? extractTagsAsObjects(
newFilePath,
AppConfig.tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)
: []; // dirs dont have tags in filename
const newEntry = {
@@ -247,15 +245,15 @@ export const DirectoryContentContextProvider = ({
name: extractFileName(newFilePath, PlatformIO.getDirSeparator()),
extension: extractFileExtension(
newFilePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
),
tags: [
- ...entry.tags.filter(tag => tag.type !== 'plain'), //'sidecar'), // add only sidecar tags
- ...fileNameTags
- ]
+ ...entry.tags.filter((tag) => tag.type !== 'plain'), //'sidecar'), // add only sidecar tags
+ ...fileNameTags,
+ ],
};
- const newDirectoryEntries = currentDirectoryEntries.map(entry =>
- entry.path === oldFilePath ? newEntry : entry
+ const newDirectoryEntries = currentDirectoryEntries.map((entry) =>
+ entry.path === oldFilePath ? newEntry : entry,
);
/*if (searchMode.current) {
GlobalSearch.getInstance().setResults(newDirectoryEntries);
@@ -290,8 +288,8 @@ export const DirectoryContentContextProvider = ({
function appendSearchResults(searchResults: TS.FileSystemEntry[]) {
const newSearchResults = searchResults.filter(
- result =>
- !currentDirectoryEntries.some(entry => entry.path === result.path)
+ (result) =>
+ !currentDirectoryEntries.some((entry) => entry.path === result.path),
);
if (newSearchResults.length > 0) {
setSearchResults([...currentDirectoryEntries, ...newSearchResults]);
@@ -303,7 +301,7 @@ export const DirectoryContentContextProvider = ({
exitSearchMode();
}
const currentLocationPath = normalizePath(
- PlatformIO.getLocationPath(currentLocation)
+ PlatformIO.getLocationPath(currentLocation),
);
// dispatch(actions.setIsLoading(true));
@@ -311,13 +309,13 @@ export const DirectoryContentContextProvider = ({
if (currentDirectoryPath.current !== undefined) {
const parentDirectory = extractParentDirectoryPath(
currentDirectoryPath.current,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
console.log(
'parentDirectory: ' +
parentDirectory +
' - currentLocationPath: ' +
- currentLocationPath
+ currentLocationPath,
);
if (parentDirectory.includes(currentLocationPath)) {
openDirectory(parentDirectory);
@@ -342,21 +340,21 @@ export const DirectoryContentContextProvider = ({
GlobalSearch.getInstance().setResults(results);
} else {*/
setCurrentDirectoryEntries(
- updateFsEntries(currentDirectoryEntries, [entryUpdated])
+ updateFsEntries(currentDirectoryEntries, [entryUpdated]),
);
};
}, [currentDirectoryEntries]);
const getMergedEntries = (entries1, entries2) => {
if (entries1 && entries1.length > 0) {
- return entries1.map(currentEntry => {
+ return entries1.map((currentEntry) => {
const updatedEntries = entries2.filter(
- newEntry => newEntry && newEntry.path === currentEntry.path
+ (newEntry) => newEntry && newEntry.path === currentEntry.path,
);
if (updatedEntries && updatedEntries.length > 0) {
const updatedEntry = updatedEntries.reduce(
(prevValue, currentValue) =>
- merge(currentValue, prevValue) as TS.FileSystemEntry
+ merge(currentValue, prevValue) as TS.FileSystemEntry,
);
return merge(updatedEntry, currentEntry);
}
@@ -368,10 +366,10 @@ export const DirectoryContentContextProvider = ({
function updateCurrentDirEntries(
dirEntries: TS.FileSystemEntry[],
- currentDirEntries?: TS.FileSystemEntry[]
+ currentDirEntries?: TS.FileSystemEntry[],
) {
if (dirEntries) {
- const entries = dirEntries.filter(e => e !== undefined);
+ const entries = dirEntries.filter((e) => e !== undefined);
if (entries.length > 0) {
const currDirEntries = currentDirEntries
? currentDirEntries
@@ -386,7 +384,7 @@ export const DirectoryContentContextProvider = ({
}
function updateThumbnailUrl(filePath: string, thumbUrl: string) {
- const dirEntries = currentDirectoryEntries.map(entry => {
+ const dirEntries = currentDirectoryEntries.map((entry) => {
if (entry.path === filePath) {
return { ...entry, thumbPath: thumbUrl };
}
@@ -398,7 +396,7 @@ export const DirectoryContentContextProvider = ({
function loadDirectoryContent(
directoryPath: string,
loadDirMeta = false,
- showHiddenEntries = undefined
+ showHiddenEntries = undefined,
): Promise<TS.FileSystemEntry[]> {
// console.debug('loadDirectoryContent:' + directoryPath);
window.walkCanceled = false;
@@ -410,31 +408,31 @@ export const DirectoryContentContextProvider = ({
}
if (loadDirMeta) {
const metaDirectory = getMetaDirectoryPath(directoryPath);
- return PlatformIO.checkDirExist(metaDirectory).then(exist => {
+ return PlatformIO.checkDirExist(metaDirectory).then((exist) => {
if (exist) {
//isMetaFolderExist.current = true;
const metaFilePath = getMetaFileLocationForDir(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
return loadJSONFile(metaFilePath)
- .then(fsEntryMeta => {
+ .then((fsEntryMeta) => {
isMetaLoaded.current = true;
return loadDirectoryContentInt(
directoryPath,
fsEntryMeta,
- showHiddenEntries
+ showHiddenEntries,
);
})
- .catch(err => {
+ .catch((err) => {
console.debug(
- 'Error loading meta of:' + directoryPath + ' ' + err
+ 'Error loading meta of:' + directoryPath + ' ' + err,
);
isMetaLoaded.current = false;
return loadDirectoryContentInt(
directoryPath,
undefined,
- showHiddenEntries
+ showHiddenEntries,
);
});
} else {
@@ -442,7 +440,7 @@ export const DirectoryContentContextProvider = ({
return loadDirectoryContentInt(
directoryPath,
undefined,
- showHiddenEntries
+ showHiddenEntries,
);
}
});
@@ -451,7 +449,7 @@ export const DirectoryContentContextProvider = ({
return loadDirectoryContentInt(
directoryPath,
undefined,
- showHiddenEntries
+ showHiddenEntries,
);
}
}
@@ -459,7 +457,7 @@ export const DirectoryContentContextProvider = ({
function loadDirectoryContentInt(
directoryPath: string,
fsEntryMeta?: TS.FileSystemEntryMeta,
- showHiddenEntries = undefined
+ showHiddenEntries = undefined,
): Promise<TS.FileSystemEntry[]> {
showNotification(t('core:loading'), 'info', false);
const resultsLimit = {
@@ -467,7 +465,7 @@ export const DirectoryContentContextProvider = ({
currentLocation && currentLocation.maxLoops
? currentLocation.maxLoops
: AppConfig.maxLoops,
- IsTruncated: false
+ IsTruncated: false,
};
return PlatformIO.listDirectoryPromise(
directoryPath,
@@ -479,9 +477,9 @@ export const DirectoryContentContextProvider = ({
? [] //'extractThumbPath']
: [], // mode,*/
currentLocation ? currentLocation.ignorePatternPaths : [],
- resultsLimit
+ resultsLimit,
)
- .then(results => {
+ .then((results) => {
if (resultsLimit.IsTruncated) {
//OPEN ISTRUNCATED dialog
dispatch(AppActions.toggleTruncatedConfirmDialog());
@@ -493,7 +491,7 @@ export const DirectoryContentContextProvider = ({
directoryPath,
results,
fsEntryMeta,
- showHiddenEntries
+ showHiddenEntries,
);
}
/*dispatch(
@@ -503,7 +501,7 @@ export const DirectoryContentContextProvider = ({
);*/
return [];
})
- .catch(error => {
+ .catch((error) => {
// console.timeEnd('listDirectoryPromise');
return loadDirectoryFailure(error);
/*dispatch(
@@ -520,7 +518,7 @@ export const DirectoryContentContextProvider = ({
}
function openCurrentDirectory(
- showHiddenEntries = undefined
+ showHiddenEntries = undefined,
): Promise<boolean> {
if (currentDirectoryPath.current !== undefined) {
return openDirectory(currentDirectoryPath.current, showHiddenEntries);
@@ -530,18 +528,18 @@ export const DirectoryContentContextProvider = ({
function openDirectory(
dirPath: string,
- showHiddenEntries = undefined
+ showHiddenEntries = undefined,
): Promise<boolean> {
if (dirPath !== undefined) {
return loadDirectoryContent(dirPath, true, showHiddenEntries).then(
- dirEntries => {
+ (dirEntries) => {
if (dirEntries) {
- return loadCurrentDirMeta(dirPath, dirEntries).then(entries => {
+ return loadCurrentDirMeta(dirPath, dirEntries).then((entries) => {
updateCurrentDirEntries(entries, dirEntries);
return true;
});
}
- }
+ },
);
}
return Promise.resolve(false);
@@ -551,7 +549,7 @@ export const DirectoryContentContextProvider = ({
directoryPath: string,
dirEntries: TS.FileSystemEntry[],
dirMeta?: TS.FileSystemEntryMeta,
- showHiddenEntries = undefined
+ showHiddenEntries = undefined,
): TS.FileSystemEntry[] {
hideNotifications(['error']);
@@ -578,7 +576,7 @@ export const DirectoryContentContextProvider = ({
currentLocation && currentLocation.type === locationType.TYPE_CLOUD,
true,
undefined,
- showHiddenEntries
+ showHiddenEntries,
);
isSearchMode.current = false;
@@ -605,7 +603,7 @@ export const DirectoryContentContextProvider = ({
showNotification(
t('core:errorLoadingFolder') + ': ' + error.message,
'warning',
- false
+ false,
);
closeAllLocations();
return [];
@@ -623,14 +621,14 @@ export const DirectoryContentContextProvider = ({
isCloudLocation,
showDirs = true,
limit = undefined,
- showHiddenEntries = undefined
+ showHiddenEntries = undefined,
) => {
const directoryContent = [];
const showHidden =
showHiddenEntries !== undefined
? showHiddenEntries
: showUnixHiddenEntries;
- dirEntries.map(entry => {
+ dirEntries.map((entry) => {
if (!showHidden && entry.name.startsWith('.')) {
return true;
}
@@ -646,7 +644,7 @@ export const DirectoryContentContextProvider = ({
const enhancedEntry: TS.FileSystemEntry = enhanceEntry(
entry,
AppConfig.tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
directoryContent.push(enhancedEntry);
return true;
@@ -658,7 +656,7 @@ export const DirectoryContentContextProvider = ({
function setCurrentDirectoryPerspective(
perspective: string,
- reload: boolean = true
+ reload: boolean = true,
) {
currentPerspective.current = perspective;
setSelectedEntries([]);
@@ -694,17 +692,17 @@ export const DirectoryContentContextProvider = ({
const removeDirectoryEntries = useMemo(() => {
return (entryPaths: string[]) => {
- if (entryPaths.some(ePath => ePath === currentDirectoryPath.current)) {
+ if (entryPaths.some((ePath) => ePath === currentDirectoryPath.current)) {
//handle currentDirectoryPath deleted
return openDirectory(
extractContainingDirectoryPath(
currentDirectoryPath.current,
- PlatformIO.getDirSeparator()
- )
+ PlatformIO.getDirSeparator(),
+ ),
);
} else {
const entries = currentDirectoryEntries.filter(
- entry => !entryPaths.includes(entry.path)
+ (entry) => !entryPaths.includes(entry.path),
);
setCurrentDirectoryEntries(entries);
}
@@ -738,9 +736,9 @@ export const DirectoryContentContextProvider = ({
: currentLocation.name),
url: '/',
lid: currentLocation.uuid,
- searchQuery: sQuery
+ searchQuery: sQuery,
},
- searchHistoryKey
+ searchHistoryKey,
);
}
}
@@ -749,21 +747,21 @@ export const DirectoryContentContextProvider = ({
}
function updateTagColors(tags: TS.Tag[]) {
- return tags.map(tag => {
+ return tags.map((tag) => {
const tagColors = getTagColors(
tag.title,
defaultTextColor,
- defaultBackgroundColor
+ defaultBackgroundColor,
);
return {
...tag,
- ...tagColors
+ ...tagColors,
};
});
}
function findFromSavedSearch(uuid: string) {
- const savedSearch = searches.find(search => search.uuid === uuid);
+ const savedSearch = searches.find((search) => search.uuid === uuid);
if (!savedSearch) {
return true;
}
@@ -771,16 +769,16 @@ export const DirectoryContentContextProvider = ({
setSearchQuery({
...savedSearch,
...(savedSearch.tagsAND && {
- tagsAND: updateTagColors(savedSearch.tagsAND)
+ tagsAND: updateTagColors(savedSearch.tagsAND),
}),
...(savedSearch.tagsNOT && {
- tagsNOT: updateTagColors(savedSearch.tagsNOT)
+ tagsNOT: updateTagColors(savedSearch.tagsNOT),
}),
...(savedSearch.tagsOR && {
- tagsOR: updateTagColors(savedSearch.tagsOR)
+ tagsOR: updateTagColors(savedSearch.tagsOR),
}),
showUnixHiddenEntries,
- executeSearch: true
+ executeSearch: true,
});
}
@@ -817,7 +815,7 @@ export const DirectoryContentContextProvider = ({
appendSearchResults,
enterSearchMode,
exitSearchMode,
- findFromSavedSearch
+ findFromSavedSearch,
};
}, [
currentLocation,
@@ -829,7 +827,7 @@ export const DirectoryContentContextProvider = ({
currentDirectoryFiles.current,
currentDirectoryDirs.current,
isSearchMode.current,
- searchQuery.current
+ searchQuery.current,
]);
return (
diff --git a/app/hooks/FSWatcherContextProvider.tsx b/app/hooks/FSWatcherContextProvider.tsx
index 1374daf0d..1b0c7a16d 100644
--- a/app/hooks/FSWatcherContextProvider.tsx
+++ b/app/hooks/FSWatcherContextProvider.tsx
@@ -21,7 +21,7 @@ import React, {
useEffect,
useMemo,
useRef,
- useState
+ useState,
} from 'react';
import { FSWatcher } from 'chokidar';
import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
@@ -29,7 +29,7 @@ import PlatformIO from '-/services/platform-facade';
import AppConfig from '-/AppConfig';
import {
extractContainingDirectoryPath,
- getFileLocationFromMetaFile
+ getFileLocationFromMetaFile,
} from '@tagspaces/tagspaces-common/paths';
import { locationType } from '@tagspaces/tagspaces-common/misc';
import { PerspectiveIDs } from '-/perspectives';
@@ -58,7 +58,7 @@ export const FSWatcherContext = createContext<FSWatcherContextData>({
addToIgnored: undefined,
removeFromIgnored: undefined,
ignoreByWatcher: undefined,
- deignoreByWatcher: undefined
+ deignoreByWatcher: undefined,
});
export type FSWatcherContextProviderProps = {
@@ -66,7 +66,7 @@ export type FSWatcherContextProviderProps = {
};
export const FSWatcherContextProvider = ({
- children
+ children,
}: FSWatcherContextProviderProps) => {
const { currentLocation } = useCurrentLocationContext();
const {
@@ -74,7 +74,7 @@ export const FSWatcherContextProvider = ({
currentDirectoryPath,
currentDirectoryPerspective,
addDirectoryEntries,
- removeDirectoryEntries
+ removeDirectoryEntries,
} = useDirectoryContentContext();
const { reflectDeleteEntry, reflectCreateEntry } = useLocationIndexContext();
const [watcher, setWatcher] = useState<FSWatcher>(undefined);
@@ -90,7 +90,7 @@ export const FSWatcherContextProvider = ({
const depth =
currentDirectoryPerspective === PerspectiveIDs.KANBAN ? 3 : 1;
setWatcher(
- watchFolder(PlatformIO.getLocationPath(currentLocation), depth)
+ watchFolder(PlatformIO.getLocationPath(currentLocation), depth),
);
} else {
stopWatching();
@@ -121,7 +121,7 @@ export const FSWatcherContextProvider = ({
// /(^|[\/\\])\../.test(path) || path.includes('.ts'), // ignoring .dotfiles // ignoring .ts folder
// (stats && stats.isDirectory()), // ignoring directories
ignoreInitial: true,
- depth
+ depth,
});
}
@@ -161,7 +161,7 @@ export const FSWatcherContextProvider = ({
const entry = toFsEntry(path, true);
const dirPath = extractContainingDirectoryPath(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
if (currentDirectoryPath === dirPath) {
addDirectoryEntries([entry]);
@@ -175,7 +175,7 @@ export const FSWatcherContextProvider = ({
const entry = toFsEntry(path, false);
const dirPath = extractContainingDirectoryPath(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
if (currentDirectoryPath === dirPath) {
addDirectoryEntries([entry]);
@@ -192,29 +192,29 @@ export const FSWatcherContextProvider = ({
if (path.endsWith(AppConfig.metaFileExt)) {
const directoryPath = getFileLocationFromMetaFile(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
loadDirectoryContent(
extractContainingDirectoryPath(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
),
false,
- true
+ true,
);
}
if (path.endsWith(AppConfig.metaFolderFile)) {
const directoryPath = getFileLocationFromMetaFile(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
loadDirectoryContent(
extractContainingDirectoryPath(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
),
false,
- true
+ true,
);
}
}
@@ -251,7 +251,7 @@ export const FSWatcherContextProvider = ({
setTimeout(() => {
for (let i = 0; i < ignored.current.length; i++) {
const pathParts = ignored.current[i].split(
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
if (path.startsWith(ignored.current[i]) || pathParts.includes(path)) {
ignored.current.splice(i, 1);
@@ -289,7 +289,7 @@ export const FSWatcherContextProvider = ({
addToIgnored,
removeFromIgnored,
ignoreByWatcher,
- deignoreByWatcher
+ deignoreByWatcher,
};
}, [watcher, ignored.current]);
diff --git a/app/hooks/FsActionsContextProvider.tsx b/app/hooks/FsActionsContextProvider.tsx
index c82563db6..112151494 100644
--- a/app/hooks/FsActionsContextProvider.tsx
+++ b/app/hooks/FsActionsContextProvider.tsx
@@ -24,7 +24,7 @@ import PlatformIO from '-/services/platform-facade';
import {
extractDirectoryName,
getMetaFileLocationForFile,
- getThumbFileLocationForFile
+ getThumbFileLocationForFile,
} from '@tagspaces/tagspaces-common/paths';
import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';
import { getWarningOpeningFilesExternally } from '-/reducers/settings';
@@ -38,7 +38,7 @@ import { useFSWatcherContext } from '-/hooks/useFSWatcherContext';
type FsActionsContextData = {
renameDirectory: (
directoryPath: string,
- newDirectoryName: string
+ newDirectoryName: string,
) => Promise<string>;
renameFile: (filePath: string, newFilePath: string) => Promise<boolean>;
openFileNatively: (selectedFile?: string) => void;
@@ -47,7 +47,7 @@ type FsActionsContextData = {
export const FsActionsContext = createContext<FsActionsContextData>({
renameDirectory: () => Promise.resolve(''),
renameFile: () => Promise.resolve(false),
- openFileNatively: undefined
+ openFileNatively: undefined,
});
export type FsActionsContextProviderProps = {
@@ -55,7 +55,7 @@ export type FsActionsContextProviderProps = {
};
export const FsActionsContextProvider = ({
- children
+ children,
}: FsActionsContextProviderProps) => {
const { t } = useTranslation();
const { setSelectedEntries, selectedEntries } = useSelectedEntriesContext();
@@ -64,19 +64,16 @@ export const FsActionsContextProvider = ({
const { reflectRenameEntry } = useLocationIndexContext();
const { showNotification } = useNotificationContext();
const { watcher } = useFSWatcherContext();
- const {
- renameFilePromise,
- renameFilesPromise,
- renameDirectoryPromise
- } = usePlatformFacadeContext();
+ const { renameFilePromise, renameFilesPromise, renameDirectoryPromise } =
+ usePlatformFacadeContext();
const dispatch: AppDispatch = useDispatch();
const warningOpeningFilesExternally = useSelector(
- getWarningOpeningFilesExternally
+ getWarningOpeningFilesExternally,
);
function renameDirectory(directoryPath: string, newDirectoryName: string) {
return renameDirectoryPromise(directoryPath, newDirectoryName)
- .then(newDirPath => {
+ .then((newDirPath) => {
if (currentDirectoryPath === directoryPath) {
openDirectory(newDirPath).then(() => {
reflectRenameDirectory(directoryPath, newDirPath);
@@ -91,22 +88,22 @@ export const FsActionsContextProvider = ({
showNotification(
`Renaming directory ${extractDirectoryName(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)} successful.`,
'default',
- true
+ true,
);
return newDirPath;
})
- .catch(error => {
+ .catch((error) => {
console.warn('Error while renaming directory: ' + error);
showNotification(
`Error renaming directory '${extractDirectoryName(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)}'`,
'error',
- true
+ true,
);
throw error;
});
@@ -114,7 +111,7 @@ export const FsActionsContextProvider = ({
function renameFile(filePath: string, newFilePath: string): Promise<boolean> {
return renameFilePromise(filePath, newFilePath)
- .then(result => {
+ .then((result) => {
const newFilePathFromPromise = result[1];
console.info('File renamed ' + filePath + ' to ' + newFilePath);
showNotification(t('core:renamingSuccessfully'), 'default', true);
@@ -124,40 +121,40 @@ export const FsActionsContextProvider = ({
getMetaFileLocationForFile(filePath, PlatformIO.getDirSeparator()),
getMetaFileLocationForFile(
newFilePath,
- PlatformIO.getDirSeparator()
- )
+ PlatformIO.getDirSeparator(),
+ ),
],
[
getThumbFileLocationForFile(
filePath,
PlatformIO.getDirSeparator(),
- false
+ false,
),
getThumbFileLocationForFile(
newFilePath,
PlatformIO.getDirSeparator(),
- false
- )
- ]
+ false,
+ ),
+ ],
])
.then(() => {
reflectRenameEntry(filePath, newFilePathFromPromise);
dispatch(
- AppActions.reflectRenameEntry(filePath, newFilePathFromPromise)
+ AppActions.reflectRenameEntry(filePath, newFilePathFromPromise),
);
setSelectedEntries([]);
console.info(
'Renaming meta file and thumb successful from ' +
filePath +
' to:' +
- newFilePath
+ newFilePath,
);
return true;
})
- .catch(err => {
+ .catch((err) => {
reflectRenameEntry(filePath, newFilePathFromPromise);
dispatch(
- AppActions.reflectRenameEntry(filePath, newFilePathFromPromise)
+ AppActions.reflectRenameEntry(filePath, newFilePathFromPromise),
);
setSelectedEntries([]);
console.warn(
@@ -165,17 +162,17 @@ export const FsActionsContextProvider = ({
filePath +
' to:' +
newFilePath,
- err
+ err,
);
return false;
});
})
- .catch(error => {
+ .catch((error) => {
console.log(`Error while renaming file ${filePath}`, error);
showNotification(
`Error while renaming file ${filePath}`,
'error',
- true
+ true,
);
return false;
});
@@ -201,7 +198,7 @@ export const FsActionsContextProvider = ({
return {
renameDirectory,
renameFile,
- openFileNatively
+ openFileNatively,
};
}, [openedEntries, watcher]);
diff --git a/app/hooks/IOActionsContextProvider.tsx b/app/hooks/IOActionsContextProvider.tsx
index 2849c905b..3d83d85ac 100644
--- a/app/hooks/IOActionsContextProvider.tsx
+++ b/app/hooks/IOActionsContextProvider.tsx
@@ -31,7 +31,7 @@ import {
getMetaFileLocationForFile,
getThumbFileLocationForFile,
joinPaths,
- normalizePath
+ normalizePath,
} from '@tagspaces/tagspaces-common/paths';
import PlatformIO from '-/services/platform-facade';
import { actions as AppActions, AppDispatch } from '-/reducers/app';
@@ -39,7 +39,7 @@ import { useDispatch, useSelector } from 'react-redux';
import {
getThumbPath,
loadFileMetaDataPromise,
- toFsEntry
+ toFsEntry,
} from '-/services/utils-io';
import { TS } from '-/tagspaces.namespace';
import { Progress } from 'aws-sdk/clients/s3';
@@ -48,7 +48,7 @@ import { generateThumbnailPromise } from '-/services/thumbsgenerator';
import { base64ToArrayBuffer } from '-/utils/dom';
import {
enhanceEntry,
- loadJSONString
+ loadJSONString,
} from '@tagspaces/tagspaces-common/utils-io';
import { useLocationIndexContext } from '-/hooks/useLocationIndexContext';
import { useSelectedEntriesContext } from '-/hooks/useSelectedEntriesContext';
@@ -71,39 +71,39 @@ type IOActionsContextData = {
moveDirs: (
dirPaths: Array<string>,
targetPath: string,
- onProgress?
+ onProgress?,
) => Promise<boolean>;
moveFiles: (
paths: Array<string>,
targetPath: string,
- onProgress?
+ onProgress?,
) => Promise<boolean>;
copyDirs: (
dirPaths: Array<any>,
targetPath: string,
- onProgress?
+ onProgress?,
) => Promise<boolean>;
copyFiles: (
paths: Array<string>,
targetPath: string,
- onProgress?
+ onProgress?,
) => Promise<boolean>;
downloadFile: (
url: string,
targetPath: string,
- onDownloadProgress?: (progress: Progress, abort, fileName?) => void
+ onDownloadProgress?: (progress: Progress, abort, fileName?) => void,
) => Promise<TS.FileSystemEntry>;
uploadFilesAPI: (
files: Array<File>,
targetPath: string,
onUploadProgress?: (progress: Progress, abort, fileName?) => void,
- uploadMeta?: boolean
+ uploadMeta?: boolean,
) => Promise<TS.FileSystemEntry[]>;
uploadFiles: (
paths: Array<string>,
targetPath: string,
onUploadProgress?: (progress: Progress, abort, fileName?) => void,
- uploadMeta?: boolean
+ uploadMeta?: boolean,
) => Promise<TS.FileSystemEntry[]>;
//reloadDirectory: (dirPath?: string) => Promise<boolean>;
};
@@ -120,7 +120,7 @@ export const IOActionsContext = createContext<IOActionsContextData>({
copyFiles: () => Promise.resolve(false),
downloadFile: () => Promise.resolve(undefined),
uploadFilesAPI: () => Promise.resolve([]),
- uploadFiles: () => Promise.resolve([])
+ uploadFiles: () => Promise.resolve([]),
//reloadDirectory: () => Promise.resolve(false)
});
@@ -129,15 +129,13 @@ export type IOActionsContextProviderProps = {
};
export const IOActionsContextProvider = ({
- children
+ children,
}: IOActionsContextProviderProps) => {
const { t } = useTranslation();
const dispatch: AppDispatch = useDispatch();
const { showNotification, hideNotifications } = useNotificationContext();
- const {
- copyFilesWithProgress,
- deleteFilesPromise
- } = usePlatformFacadeContext();
+ const { copyFilesWithProgress, deleteFilesPromise } =
+ usePlatformFacadeContext();
const {
createDirectoryPromise,
renameFilesPromise,
@@ -146,7 +144,7 @@ export const IOActionsContextProvider = ({
saveFilePromise,
saveBinaryFilePromise,
deleteFilePromise,
- deleteDirectoryPromise
+ deleteDirectoryPromise,
} = usePlatformFacadeContext();
const { reflectDeleteDirectory, reflectDeleteFile } = useOpenedEntryContext();
const {
@@ -154,14 +152,11 @@ export const IOActionsContextProvider = ({
currentDirectoryPath,
loadParentDirectoryContent,
addDirectoryEntries,
- removeDirectoryEntries
+ removeDirectoryEntries,
} = useDirectoryContentContext();
const { setSelectedEntries } = useSelectedEntriesContext();
- const {
- reflectDeleteEntry,
- reflectCreateEntry,
- reflectDeleteEntries
- } = useLocationIndexContext();
+ const { reflectDeleteEntry, reflectCreateEntry, reflectDeleteEntries } =
+ useLocationIndexContext();
const useTrashCan = useSelector(getUseTrashCan);
function extractContent(
@@ -169,9 +164,9 @@ export const IOActionsContextProvider = ({
EXIFGeo: true,
EXIFDateTime: true,
IPTCDescription: true,
- IPTCTags: true
+ IPTCTags: true,
},
- addTags?
+ addTags?,
): Promise<boolean> {
if (!Pro || !Pro.ContentExtractor) {
showNotification(t('core:thisFunctionalityIsAvailableInPro'));
@@ -181,8 +176,8 @@ export const IOActionsContextProvider = ({
Pro.ContentExtractor.extractContent(
currentDirectoryEntries,
addTags,
- options
- ).then(success => {
+ options,
+ ).then((success) => {
hideNotifications();
return success;
});
@@ -191,7 +186,7 @@ export const IOActionsContextProvider = ({
const createDirectory = useMemo(() => {
return (directoryPath: string, reflect = true) =>
createDirectoryPromise(directoryPath)
- .then(result => {
+ .then((result) => {
if (result !== undefined && result.dirPath !== undefined) {
// eslint-disable-next-line no-param-reassign
directoryPath = result.dirPath;
@@ -207,22 +202,22 @@ export const IOActionsContextProvider = ({
showNotification(
`Creating directory ${extractDirectoryName(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)} successful.`,
'default',
- true
+ true,
);
return true;
})
- .catch(error => {
+ .catch((error) => {
console.warn('Error creating directory: ' + error);
showNotification(
`Error creating directory '${extractDirectoryName(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)}'`,
'error',
- true
+ true,
);
return false;
// dispatch stopLoadingAnimation
@@ -231,14 +226,14 @@ export const IOActionsContextProvider = ({
const deleteEntries = useMemo(() => {
return (entries: TS.FileSystemEntry[]) => {
- const deletePromises = entries.map(fsEntry => {
+ const deletePromises = entries.map((fsEntry) => {
if (fsEntry.isFile) {
return deleteFile(fsEntry.path, fsEntry.uuid, false);
}
return deleteDirectory(fsEntry.path, false);
});
return Promise.all(deletePromises)
- .then(delResult => {
+ .then((delResult) => {
const notDeletedEntries = [];
const deletedEntries = [];
for (let i = 0; i < delResult.length; i++) {
@@ -258,13 +253,13 @@ export const IOActionsContextProvider = ({
dispatch(AppActions.reflectDeleteEntries(deletedEntries));
removeDirectoryEntries(
entries
- .filter(e => !notDeletedEntries.some(n => n.path === e.path))
- .map(e => e.path)
+ .filter((e) => !notDeletedEntries.some((n) => n.path === e.path))
+ .map((e) => e.path),
);
setSelectedEntries(notDeletedEntries);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Deleting file failed', err);
return false;
});
@@ -293,16 +288,16 @@ export const IOActionsContextProvider = ({
{
dirPath: extractDirectoryName(
directoryPath,
- PlatformIO.getDirSeparator()
- )
- } as any
+ PlatformIO.getDirSeparator(),
+ ),
+ } as any,
) as string,
'default',
- true
+ true,
);
return true;
})
- .catch(error => {
+ .catch((error) => {
console.warn('Error while deleting directory: ' + error);
showNotification(
t(
@@ -310,12 +305,12 @@ export const IOActionsContextProvider = ({
{
dirPath: extractDirectoryName(
directoryPath,
- PlatformIO.getDirSeparator()
- )
- } as any
+ PlatformIO.getDirSeparator(),
+ ),
+ } as any,
) as string,
'error',
- true
+ true,
);
return false;
// dispatch stopLoadingAnimation
@@ -337,24 +332,24 @@ export const IOActionsContextProvider = ({
showNotification(
`Deleting file ${filePath} successful.`,
'default',
- true
+ true,
);
// Delete revisions
const backupFilePath = getBackupFileLocation(
filePath,
uuid,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const backupPath = extractContainingDirectoryPath(
backupFilePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
PlatformIO.deleteDirectoryPromise(backupPath)
.then(() => {
console.log('Cleaning revisions successful for ' + filePath);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Cleaning revisions failed ', err);
});
// Delete sidecar file and thumb
@@ -363,26 +358,26 @@ export const IOActionsContextProvider = ({
getThumbFileLocationForFile(
filePath,
PlatformIO.getDirSeparator(),
- false
- )
+ false,
+ ),
])
.then(() => {
console.log(
- 'Cleaning meta file and thumb successful for ' + filePath
+ 'Cleaning meta file and thumb successful for ' + filePath,
);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Cleaning meta file and thumb failed with ' + err);
});
return true;
})
- .catch(error => {
+ .catch((error) => {
console.warn('Error while deleting file: ' + error);
showNotification(
`Error while deleting file ${filePath}`,
'error',
- true
+ true,
);
return false;
});
@@ -391,14 +386,14 @@ export const IOActionsContextProvider = ({
function moveDirs(
dirPaths: Array<any>,
targetPath: string,
- onProgress = undefined
+ onProgress = undefined,
): Promise<boolean> {
const promises = dirPaths.map(({ path, count }) => {
const dirName = extractDirectoryName(path, PlatformIO.getDirSeparator());
return moveDirectoryPromise(
{ path: path, total: count },
joinPaths(PlatformIO.getDirSeparator(), targetPath, dirName),
- onProgress
+ onProgress,
)
.then(() => {
removeDirectoryEntries([path]);
@@ -407,7 +402,7 @@ export const IOActionsContextProvider = ({
dispatch(AppActions.reflectDeleteEntry(path));
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Moving dirs failed ', err);
showNotification(t('core:copyingFoldersFailed'));
});
@@ -418,13 +413,13 @@ export const IOActionsContextProvider = ({
function moveFiles(
paths: Array<string>,
targetPath: string,
- onProgress = undefined
+ onProgress = undefined,
): Promise<boolean> {
- const moveJobs = paths.map(path => [
+ const moveJobs = paths.map((path) => [
path,
normalizePath(targetPath) +
PlatformIO.getDirSeparator() +
- extractFileName(path, PlatformIO.getDirSeparator())
+ extractFileName(path, PlatformIO.getDirSeparator()),
]);
return renameFilesPromise(moveJobs, onProgress)
.then(() => {
@@ -435,7 +430,7 @@ export const IOActionsContextProvider = ({
dispatch(AppActions.reflectDeleteEntries(paths));
const moveMetaJobs = [];
- moveJobs.map(job => {
+ moveJobs.map((job) => {
// Move revisions
loadFileMetaDataPromise(job[0])
.then((fsEntryMeta: TS.FileSystemEntryMeta) => {
@@ -443,51 +438,51 @@ export const IOActionsContextProvider = ({
const backupDir = getBackupFileDir(
job[0],
fsEntryMeta.id,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const newBackupDir = getBackupFileDir(
job[1],
fsEntryMeta.id,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
return PlatformIO.moveDirectoryPromise(
{ path: backupDir },
- newBackupDir
+ newBackupDir,
)
.then(() => {
console.log(
'Moving revisions successful from ' +
backupDir +
' to ' +
- newBackupDir
+ newBackupDir,
);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Moving revisions failed ', err);
});
}
})
- .catch(err => {
+ .catch((err) => {
console.warn('loadFileMetaDataPromise', err);
});
// move meta
moveMetaJobs.push([
getMetaFileLocationForFile(job[0], PlatformIO.getDirSeparator()),
- getMetaFileLocationForFile(job[1], PlatformIO.getDirSeparator())
+ getMetaFileLocationForFile(job[1], PlatformIO.getDirSeparator()),
]);
moveMetaJobs.push([
getThumbFileLocationForFile(
job[0],
PlatformIO.getDirSeparator(),
- false
+ false,
),
getThumbFileLocationForFile(
job[1],
PlatformIO.getDirSeparator(),
- false
- )
+ false,
+ ),
]);
return true;
});
@@ -496,12 +491,12 @@ export const IOActionsContextProvider = ({
console.log('Moving meta and thumbs successful');
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('At least one meta or thumb was not moved ' + err);
});
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Moving files failed with ' + err);
showNotification(t('core:copyingFilesFailed'));
return false;
@@ -511,20 +506,20 @@ export const IOActionsContextProvider = ({
function copyDirs(
dirPaths: Array<any>,
targetPath: string,
- onProgress = undefined
+ onProgress = undefined,
): Promise<boolean> {
const promises = dirPaths.map(({ path, count }) => {
const dirName = extractDirectoryName(path, PlatformIO.getDirSeparator());
return copyDirectoryPromise(
{ path: path, total: count },
joinPaths(PlatformIO.getDirSeparator(), targetPath, dirName),
- onProgress
+ onProgress,
)
.then(() => {
console.log('Copy dir from ' + path + ' to ' + targetPath);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Copy dirs failed ', err);
showNotification(t('core:copyingFoldersFailed'));
});
@@ -535,32 +530,36 @@ export const IOActionsContextProvider = ({
function copyFiles(
paths: Array<string>,
targetPath: string,
- onProgress
+ onProgress,
): Promise<boolean> {
return copyFilesWithProgress(paths, targetPath, onProgress)
.then(() => {
// todo return only copied paths
showNotification(t('core:filesCopiedSuccessful'));
- const metaPaths = paths.flatMap(path => [
+ const metaPaths = paths.flatMap((path) => [
getMetaFileLocationForFile(path, PlatformIO.getDirSeparator()),
- getThumbFileLocationForFile(path, PlatformIO.getDirSeparator(), false)
+ getThumbFileLocationForFile(
+ path,
+ PlatformIO.getDirSeparator(),
+ false,
+ ),
]);
return copyFilesWithProgress(
metaPaths,
getMetaDirectoryPath(targetPath),
- onProgress
+ onProgress,
)
.then(() => {
console.log('Copy meta and thumbs successful');
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('At least one meta or thumb was not copied ' + err);
return true;
});
})
- .catch(err => {
+ .catch((err) => {
console.warn('Moving files failed with ' + err);
showNotification(t('core:copyingFilesFailed'));
return false;
@@ -576,7 +575,7 @@ export const IOActionsContextProvider = ({
function downloadFile(
url: string,
targetPath: string,
- onDownloadProgress?: (progress: Progress, abort, fileName?) => void
+ onDownloadProgress?: (progress: Progress, abort, fileName?) => void,
): Promise<TS.FileSystemEntry> {
function saveFile(response: Response): Promise<TS.FileSystemEntry> {
if (AppConfig.isElectron && !PlatformIO.haveObjectStoreSupport()) {
@@ -584,20 +583,20 @@ export const IOActionsContextProvider = ({
{ path: targetPath },
response.body,
true,
- onDownloadProgress
+ onDownloadProgress,
);
}
- return response.arrayBuffer().then(arrayBuffer => {
+ return response.arrayBuffer().then((arrayBuffer) => {
return saveFilePromise({ path: targetPath }, arrayBuffer, true);
});
}
return fetch(url)
- .then(response => saveFile(response))
+ .then((response) => saveFile(response))
.then((fsEntry: TS.FileSystemEntry) => {
return generateThumbnailPromise(
PlatformIO.haveObjectStoreSupport() ? url : fsEntry.path,
- fsEntry.size
- ).then(dataURL => {
+ fsEntry.size,
+ ).then((dataURL) => {
if (dataURL && dataURL.length > 6) {
const baseString = dataURL.split(',').pop();
const fileContent = base64ToArrayBuffer(baseString);
@@ -606,14 +605,14 @@ export const IOActionsContextProvider = ({
path: getThumbFileLocationForFile(
targetPath,
PlatformIO.getDirSeparator(),
- false
- )
+ false,
+ ),
},
fileContent,
- true
+ true,
).then((thumb: TS.FileSystemEntry) => ({
...fsEntry,
- thumbPath: getThumbPath(thumb.path)
+ thumbPath: getThumbPath(thumb.path),
}));
}
return fsEntry;
@@ -642,7 +641,7 @@ export const IOActionsContextProvider = ({
files: Array<File>,
targetPath: string,
onUploadProgress?: (progress: Progress, abort, fileName?) => void,
- uploadMeta = true
+ uploadMeta = true,
): Promise<TS.FileSystemEntry[]> {
if (AppConfig.isElectron || AppConfig.isCordovaiOS) {
const arrFiles = [];
@@ -652,7 +651,7 @@ export const IOActionsContextProvider = ({
return uploadFiles(arrFiles, targetPath, onUploadProgress, uploadMeta);
}
- return new Promise(async resolve => {
+ return new Promise(async (resolve) => {
const fsEntries = [];
// -> cannot upload meta data (for every upload in web browser its need to have <input> element)
await setupReader(0);
@@ -686,14 +685,13 @@ export const IOActionsContextProvider = ({
}
async function readerLoaded(event, index, fileTargetPath) {
- const entryProps = await PlatformIO.getPropertiesPromise(
- fileTargetPath
- );
+ const entryProps =
+ await PlatformIO.getPropertiesPromise(fileTargetPath);
if (entryProps) {
showNotification(
'File with the same name already exist, importing skipped!',
'warning',
- true
+ true,
);
} else {
const result = event.currentTarget
@@ -704,32 +702,32 @@ export const IOActionsContextProvider = ({
{ path: fileTargetPath },
new Uint8Array(result),
true,
- onUploadProgress
+ onUploadProgress,
);
if (fsEntry) {
// Generate Thumbnail
const thumbPath = await generateThumbnailPromise(
PlatformIO.getURLforPath(fileTargetPath),
- fsEntry.size
+ fsEntry.size,
)
- .then(dataURL => {
+ .then((dataURL) => {
if (dataURL && dataURL.length > 6) {
const baseString = dataURL.split(',').pop();
const fileContent = base64ToArrayBuffer(baseString);
const thumbPath = getThumbFileLocationForFile(
fileTargetPath,
PlatformIO.getDirSeparator(),
- false
+ false,
);
return PlatformIO.saveBinaryFilePromise(
{ path: thumbPath },
fileContent,
- true
+ true,
).then(() => thumbPath);
}
return undefined;
})
- .catch(err => {
+ .catch((err) => {
console.log('error generateThumbnail:', err);
});
if (thumbPath) {
@@ -739,18 +737,18 @@ export const IOActionsContextProvider = ({
showNotification(
'File ' + fileTargetPath + ' successfully imported.',
'default',
- true
+ true,
);
// dispatch(AppActions.reflectCreateEntry(fileTargetPath, true));
}
} catch (error) {
console.log(
- 'Uploading ' + fileTargetPath + ' failed with ' + error
+ 'Uploading ' + fileTargetPath + ' failed with ' + error,
);
showNotification(
'Importing file ' + fileTargetPath + ' failed.',
'error',
- true
+ true,
);
}
}
@@ -777,21 +775,21 @@ export const IOActionsContextProvider = ({
paths: Array<string>,
targetPath: string,
onUploadProgress?: (progress: Progress, response: any) => void,
- uploadMeta = true
+ uploadMeta = true,
): Promise<TS.FileSystemEntry[]> {
return new Promise((resolve, reject) => {
function uploadFile(
filePath: string,
fileType: string,
- fileContent: any
+ fileContent: any,
) {
return PlatformIO.getPropertiesPromise(filePath)
- .then(entryProps => {
+ .then((entryProps) => {
if (entryProps) {
showNotification(
'File with the same name already exist, importing skipped!',
'warning',
- true
+ true,
);
dispatch(AppActions.setProgress(filePath, -1, undefined));
} else {
@@ -800,7 +798,7 @@ export const IOActionsContextProvider = ({
{ path: filePath },
fileContent,
true,
- onUploadProgress
+ onUploadProgress,
)
.then((fsEntry: TS.FileSystemEntry) => {
// handle meta files
@@ -818,25 +816,25 @@ export const IOActionsContextProvider = ({
return fsEntry;
})
- .catch(err => {
+ .catch((err) => {
console.log('Importing file ' + filePath + ' failed ', err);
showNotification(
'Importing file ' + filePath + ' failed.',
'error',
- true
+ true,
);
return undefined;
});
}
return undefined;
})
- .catch(err => {
+ .catch((err) => {
console.log('Error getting properties', err);
});
}
const uploadJobs = [];
- paths.map(path => {
+ paths.map((path) => {
let target =
normalizePath(targetPath) +
AppConfig.dirSeparator +
@@ -854,18 +852,18 @@ export const IOActionsContextProvider = ({
uploadJobs.push([
getMetaFileLocationForFile(path, AppConfig.dirSeparator),
getMetaFileLocationForFile(target, AppConfig.dirSeparator),
- 'meta'
+ 'meta',
]);
uploadJobs.push([
getThumbFileLocationForFile(path, AppConfig.dirSeparator),
getThumbFileLocationForFile(target, AppConfig.dirSeparator),
'thumb',
- path
+ path,
]);
}
return true;
});
- const jobsPromises = uploadJobs.map(job => {
+ const jobsPromises = uploadJobs.map((job) => {
// console.log("Selected File: "+JSON.stringify(selection.currentTarget.files[0]));
// const file = selection.currentTarget.files[0];
const filePath = job[1];
@@ -875,11 +873,11 @@ export const IOActionsContextProvider = ({
if (AppConfig.isElectron) {
// for AWS location getFileContentPromise cannot load with io-objectore
return PlatformIO.getLocalFileContentPromise(job[0])
- .then(fileContent => uploadFile(filePath, fileType, fileContent))
- .catch(err => {
+ .then((fileContent) => uploadFile(filePath, fileType, fileContent))
+ .catch((err) => {
// console.log('Error getting file:' + job[0] + ' ' + err);
if (fileType === 'thumb' && job[3]) {
- return generateThumbnailPromise(job[3], 0).then(dataURL => {
+ return generateThumbnailPromise(job[3], 0).then((dataURL) => {
if (dataURL && dataURL.length > 6) {
const baseString = dataURL.split(',').pop();
const fileContent = base64ToArrayBuffer(baseString);
@@ -894,12 +892,12 @@ export const IOActionsContextProvider = ({
return undefined;
});
Promise.allSettled(jobsPromises)
- .then(filesProm => {
+ .then((filesProm) => {
const arrFiles: Array<TS.FileSystemEntry> = [];
const arrMeta: Array<TS.FileSystemEntry> = [];
const arrThumb: Array<TS.FileSystemEntry> = [];
- filesProm.map(result => {
+ filesProm.map((result) => {
if (result.status !== 'rejected') {
const file = result.value;
if (file) {
@@ -922,7 +920,7 @@ export const IOActionsContextProvider = ({
// arrFiles.map(file => file.name).toString() +
// ' successfully imported.',
'default',
- true
+ true,
);
// Enhance entries
@@ -930,7 +928,7 @@ export const IOActionsContextProvider = ({
arrFiles.map((file: TS.FileSystemEntry) => {
const metaFilePath = getMetaFileLocationForFile(
file.path,
- AppConfig.dirSeparator
+ AppConfig.dirSeparator,
);
if (metaFilePath !== undefined) {
for (let i = 0; i < arrMeta.length; i += 1) {
@@ -946,7 +944,7 @@ export const IOActionsContextProvider = ({
}
const thumbFilePath = getThumbFileLocationForFile(
file.path,
- AppConfig.dirSeparator
+ AppConfig.dirSeparator,
);
if (thumbFilePath !== undefined) {
for (let i = 0; i < arrThumb.length; i += 1) {
@@ -957,7 +955,7 @@ export const IOActionsContextProvider = ({
) {
// eslint-disable-next-line no-param-reassign
file.thumbPath = PlatformIO.getURLforPath(
- thumbFile.thumbPath
+ thumbFile.thumbPath,
);
}
}
@@ -966,11 +964,11 @@ export const IOActionsContextProvider = ({
return enhanceEntry(
file,
AppConfig.tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
}
return file;
- })
+ }),
);
} else {
// eslint-disable-next-line prefer-promise-reject-errors
@@ -978,7 +976,7 @@ export const IOActionsContextProvider = ({
}
return true;
})
- .catch(err => {
+ .catch((err) => {
console.log('Error import fs: ' + err);
reject(err);
});
@@ -1004,7 +1002,7 @@ export const IOActionsContextProvider = ({
copyFiles,
downloadFile,
uploadFilesAPI,
- uploadFiles
+ uploadFiles,
};
}, [createDirectory, deleteEntries, deleteDirectory, deleteFile]);
diff --git a/app/hooks/LocationIndexContextProvider.tsx b/app/hooks/LocationIndexContextProvider.tsx
index 687da68a9..02e6ded3a 100644
--- a/app/hooks/LocationIndexContextProvider.tsx
+++ b/app/hooks/LocationIndexContextProvider.tsx
@@ -34,7 +34,7 @@ import {
extractFileExtension,
extractFileName,
extractTagsAsObjects,
- getThumbFileLocationForFile
+ getThumbFileLocationForFile,
} from '@tagspaces/tagspaces-common/paths';
import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
import { useNotificationContext } from '-/hooks/useNotificationContext';
@@ -78,7 +78,7 @@ export const LocationIndexContext = createContext<LocationIndexContextData>({
reflectCreateEntry: () => {},
reflectRenameEntry: () => {},
indexUpdateSidecarTags: () => {},
- reflectUpdateSidecarMeta: () => {}
+ reflectUpdateSidecarMeta: () => {},
});
export type LocationIndexContextProviderProps = {
@@ -86,7 +86,7 @@ export type LocationIndexContextProviderProps = {
};
export const LocationIndexContextProvider = ({
- children
+ children,
}: LocationIndexContextProviderProps) => {
const { t } = useTranslation();
const dispatch: AppDispatch = useDispatch();
@@ -98,7 +98,7 @@ export const LocationIndexContextProvider = ({
loadDirectoryContent,
currentDirectoryPerspective,
addDirectoryEntries,
- removeDirectoryEntries
+ removeDirectoryEntries,
} = useDirectoryContentContext();
const { showNotification, hideNotifications } = useNotificationContext();
@@ -156,7 +156,7 @@ export const LocationIndexContextProvider = ({
return;
}
for (let i = 0; i < index.current.length; i += 1) {
- if (paths.some(path => index.current[i].path === path)) {
+ if (paths.some((path) => index.current[i].path === path)) {
index.current = index.current.splice(i, 1);
i -= 1;
}
@@ -167,7 +167,9 @@ export const LocationIndexContextProvider = ({
if (!index.current || index.current.length < 1) {
return;
}
- let entryFound = index.current.some(entry => entry.path === newEntry.path);
+ let entryFound = index.current.some(
+ (entry) => entry.path === newEntry.path,
+ );
if (!entryFound) {
index.current = [...index.current, newEntry];
}
@@ -183,19 +185,19 @@ export const LocationIndexContextProvider = ({
index.current[i].path = newPath;
index.current[i].name = extractFileName(
newPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
index.current[i].extension = extractFileExtension(
newPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
index.current[i].tags = [
- ...index.current[i].tags.filter(tag => tag.type === 'sidecar'), // add only sidecar tags
+ ...index.current[i].tags.filter((tag) => tag.type === 'sidecar'), // add only sidecar tags
...extractTagsAsObjects(
newPath,
AppConfig.tagDelimiter,
- PlatformIO.getDirSeparator()
- )
+ PlatformIO.getDirSeparator(),
+ ),
];
}
}
@@ -208,8 +210,8 @@ export const LocationIndexContextProvider = ({
for (let i = 0; i < index.current.length; i += 1) {
if (index.current[i].path === path) {
index.current[i].tags = [
- ...index.current[i].tags.filter(tag => tag.type === 'plain'),
- ...tags
+ ...index.current[i].tags.filter((tag) => tag.type === 'plain'),
+ ...tags,
];
}
}
@@ -223,7 +225,7 @@ export const LocationIndexContextProvider = ({
if (index.current[i].path === path) {
index.current[i] = {
...index.current[i],
- ...entryMeta
+ ...entryMeta,
};
}
}
@@ -239,16 +241,16 @@ export const LocationIndexContextProvider = ({
extractText: boolean,
isCurrentLocation = true,
locationID: string = undefined,
- ignorePatterns: Array<string> = []
+ ignorePatterns: Array<string> = [],
): Promise<boolean> {
isIndexing.current = true;
return createDirectoryIndex(
{ path: directoryPath, locationID },
extractText,
ignorePatterns,
- enableWS
+ enableWS,
)
- .then(directoryIndex => {
+ .then((directoryIndex) => {
if (isCurrentLocation) {
// Load index only if current location
setIndex(directoryIndex);
@@ -263,7 +265,7 @@ export const LocationIndexContextProvider = ({
} */
return true;
})
- .catch(err => {
+ .catch((err) => {
isIndexing.current = false;
lastError.current = err;
return false;
@@ -281,8 +283,8 @@ export const LocationIndexContextProvider = ({
PlatformIO.getLocationPath(location),
location.fullTextIndex,
isCurrentLocation,
- location.uuid
- )
+ location.uuid,
+ ),
)
.catch(() => {
PlatformIO.disableObjectStoreSupport();
@@ -294,7 +296,7 @@ export const LocationIndexContextProvider = ({
PlatformIO.getLocationPath(location),
location.fullTextIndex,
isCurrentLocation,
- location.uuid
+ location.uuid,
);
} else if (location.type === locationType.TYPE_LOCAL) {
PlatformIO.disableObjectStoreSupport();
@@ -302,7 +304,7 @@ export const LocationIndexContextProvider = ({
PlatformIO.getLocationPath(location),
location.fullTextIndex,
isCurrentLocation,
- location.uuid
+ location.uuid,
);
}
}
@@ -318,7 +320,7 @@ export const LocationIndexContextProvider = ({
{ path: nextPath, location: location.uuid },
extractText,
location.ignorePatternPaths,
- enableWS
+ enableWS,
)
/* .then(directoryIndex => {
if (Pro && Pro.Indexer) {
@@ -330,7 +332,7 @@ export const LocationIndexContextProvider = ({
}
return true;
}) */
- .catch(err => {
+ .catch((err) => {
isIndexing.current = false;
lastError.current = err;
})
@@ -338,12 +340,12 @@ export const LocationIndexContextProvider = ({
});
return Promise.all(promises)
- .then(e => {
+ .then((e) => {
isIndexing.current = false;
console.log('Resolution is complete!', e);
return true;
})
- .catch(e => {
+ .catch((e) => {
console.warn('Resolution is failed!', e);
return false;
});
@@ -392,11 +394,11 @@ export const LocationIndexContextProvider = ({
{
path: currentPath,
locationID: currentLocation.uuid,
- ...(isCloudLocation && { bucketName: currentLocation.bucketName })
+ ...(isCloudLocation && { bucketName: currentLocation.bucketName }),
},
currentLocation.fullTextIndex,
currentLocation.ignorePatternPaths,
- enableWS
+ enableWS,
);
setIndex(newIndex);
} else if (isCloudLocation || !index || index.length === 0) {
@@ -404,15 +406,15 @@ export const LocationIndexContextProvider = ({
{
path: PlatformIO.getLocationPath(currentLocation),
locationID: currentLocation.uuid,
- ...(isCloudLocation && { bucketName: currentLocation.bucketName })
+ ...(isCloudLocation && { bucketName: currentLocation.bucketName }),
},
PlatformIO.getDirSeparator(),
- PlatformIO.loadTextFilePromise
+ PlatformIO.loadTextFilePromise,
);
setIndex(newIndex);
}
Search.searchLocationIndex(getIndex(), searchQuery)
- .then(searchResults => {
+ .then((searchResults) => {
if (isCloudLocation) {
searchResults.forEach((entry: TS.FileSystemEntry) => {
if (
@@ -427,8 +429,8 @@ export const LocationIndexContextProvider = ({
entry.thumbPath = PlatformIO.getURLforPath(
getThumbFileLocationForFile(
thumbPath,
- PlatformIO.getDirSeparator()
- )
+ PlatformIO.getDirSeparator(),
+ ),
);
}
});
@@ -437,14 +439,14 @@ export const LocationIndexContextProvider = ({
hideNotifications();
return true;
})
- .catch(err => {
+ .catch((err) => {
setSearchResults([]);
// dispatch(AppActions.hideNotifications());
console.log('Searching Index failed: ', err);
showNotification(
t('core:searchingFailed') + ' ' + err.message,
'warning',
- true
+ true,
);
});
}, 50);
@@ -480,7 +482,7 @@ export const LocationIndexContextProvider = ({
t('core:searching') + ' ' + location.name,
'default',
true,
- 'TIDSearching'
+ 'TIDSearching',
);
if (isCloudLocation) {
await PlatformIO.enableObjectStoreSupport(location);
@@ -488,7 +490,7 @@ export const LocationIndexContextProvider = ({
// if (Pro && Pro.Indexer && Pro.Indexer.hasIndex) {
indexExist = await hasIndex(
nextPath,
- PlatformIO.getPropertiesPromise
+ PlatformIO.getPropertiesPromise,
); // , PlatformIO.getDirSeparator());
if (
@@ -500,11 +502,11 @@ export const LocationIndexContextProvider = ({
{
path: nextPath,
locationID: location.uuid,
- ...(isCloudLocation && { bucketName: location.bucketName })
+ ...(isCloudLocation && { bucketName: location.bucketName }),
},
location.fullTextIndex,
location.ignorePatternPaths,
- enableWS
+ enableWS,
);
/* if (Pro && Pro.Indexer && Pro.Indexer.persistIndex) {
Pro.Indexer.persistIndex(
@@ -521,11 +523,11 @@ export const LocationIndexContextProvider = ({
path: nextPath,
locationID: location.uuid,
...(isCloudLocation && {
- bucketName: currentLocation.bucketName
- })
+ bucketName: currentLocation.bucketName,
+ }),
},
PlatformIO.getDirSeparator(),
- PlatformIO.loadTextFilePromise
+ PlatformIO.loadTextFilePromise,
);
}
return Search.searchLocationIndex(directoryIndex, searchQuery)
@@ -534,7 +536,7 @@ export const LocationIndexContextProvider = ({
if (isCloudLocation) {
enhancedSearchResult = searchResults
// Excluding s3 folders from global search
- .filter(entry => entry && entry.isFile)
+ .filter((entry) => entry && entry.isFile)
.map((entry: TS.FileSystemEntry) => {
const cleanedPath = entry.path.startsWith('/')
? entry.path.substr(1)
@@ -560,7 +562,7 @@ export const LocationIndexContextProvider = ({
}
return true;
})
- .catch(e => {
+ .catch((e) => {
if (isCloudLocation) {
PlatformIO.disableObjectStoreSupport();
}
@@ -570,11 +572,11 @@ export const LocationIndexContextProvider = ({
showNotification(
t('core:searchingFailed') + ' ' + e.message,
'warning',
- true
+ true,
);
});
}),
- Promise.resolve()
+ Promise.resolve(),
);
result
@@ -586,7 +588,7 @@ export const LocationIndexContextProvider = ({
searchResultCount +
' entries are listed.',
'default',
- true
+ true,
);
} else {
showNotification(t('Global search completed'), 'default', true);
@@ -600,7 +602,7 @@ export const LocationIndexContextProvider = ({
}
return true;
})
- .catch(e => {
+ .catch((e) => {
if (
currentLocation &&
currentLocation.type === locationType.TYPE_CLOUD
@@ -630,14 +632,14 @@ export const LocationIndexContextProvider = ({
reflectCreateEntry,
reflectRenameEntry,
indexUpdateSidecarTags,
- reflectUpdateSidecarMeta
+ reflectUpdateSidecarMeta,
};
}, [
currentLocation,
index,
isIndexing.current,
addDirectoryEntries,
- removeDirectoryEntries
+ removeDirectoryEntries,
]);
return (
diff --git a/app/hooks/NotificationContextProvider.tsx b/app/hooks/NotificationContextProvider.tsx
index 94a3614ff..b1a0edd5d 100644
--- a/app/hooks/NotificationContextProvider.tsx
+++ b/app/hooks/NotificationContextProvider.tsx
@@ -32,7 +32,7 @@ type NotificationContextData = {
text: string,
notificationType?: 'default' | 'info' | 'warning' | 'error',
autohide?: boolean,
- tid?: string
+ tid?: string,
) => void;
hideNotifications: (excludeTypes?: string[]) => void;
isGeneratingThumbs: boolean;
@@ -45,7 +45,7 @@ export const NotificationContext = createContext<NotificationContextData>({
showNotification: () => {},
hideNotifications: () => {},
isGeneratingThumbs: false,
- setGeneratingThumbs: () => {}
+ setGeneratingThumbs: () => {},
//NotificationTypes: 'default'
});
@@ -54,13 +54,13 @@ export type NotificationContextProviderProps = {
};
export const NotificationContextProvider = ({
- children
+ children,
}: NotificationContextProviderProps) => {
const [notificationStatus, setNotificationStatus] = useState<any>({
visible: false,
text: null,
notificationType: 'default',
- autohide: true
+ autohide: true,
});
const [isGeneratingThumbs, setGeneratingThumbs] = useState<boolean>(false);
@@ -68,26 +68,26 @@ export const NotificationContextProvider = ({
text: string,
notificationType = 'default',
autohide = true,
- tid = 'notificationTID'
+ tid = 'notificationTID',
) {
setNotificationStatus({
visible: true,
text,
tid,
notificationType,
- autohide
+ autohide,
});
}
function hideNotifications(excludeTypes = []) {
if (
- !excludeTypes.some(type => type === notificationStatus.notificationType)
+ !excludeTypes.some((type) => type === notificationStatus.notificationType)
) {
setNotificationStatus({
visible: false,
text: null,
notificationType: 'default',
- autohide: true
+ autohide: true,
});
}
}
@@ -102,7 +102,7 @@ export const NotificationContextProvider = ({
isGeneratingThumbs,
setGeneratingThumbs,
showNotification,
- hideNotifications
+ hideNotifications,
};
}, [notificationStatus, isGeneratingThumbs]);
diff --git a/app/hooks/OpenedEntryContextProvider.tsx b/app/hooks/OpenedEntryContextProvider.tsx
index 9e6e7654c..4fafb0489 100644
--- a/app/hooks/OpenedEntryContextProvider.tsx
+++ b/app/hooks/OpenedEntryContextProvider.tsx
@@ -21,14 +21,14 @@ import React, {
useEffect,
useMemo,
useRef,
- useState
+ useState,
} from 'react';
import { useDispatch, useSelector } from 'react-redux';
import {
actions as AppActions,
AppDispatch,
getEditedEntryPaths,
- OpenedEntry
+ OpenedEntry,
} from '-/reducers/app';
import { Pro } from '-/pro';
import { TS } from '-/tagspaces.namespace';
@@ -42,12 +42,12 @@ import {
getRelativeEntryPath,
loadJSONFile,
openURLExternally,
- toFsEntry
+ toFsEntry,
} from '-/services/utils-io';
import {
actions as SettingsActions,
getNewHTMLFileContent,
- getSupportedFileTypes
+ getSupportedFileTypes,
} from '-/reducers/settings';
import { getLocations } from '-/reducers/locations';
import { clearURLParam, getURLParameter, updateHistory } from '-/utils/dom';
@@ -58,11 +58,11 @@ import {
generateSharingLink,
getMetaFileLocationForDir,
getMetaFileLocationForFile,
- normalizePath
+ normalizePath,
} from '@tagspaces/tagspaces-common/paths';
import {
formatDateTime4Tag,
- locationType
+ locationType,
} from '@tagspaces/tagspaces-common/misc';
import { useTranslation } from 'react-i18next';
import versionMeta from '-/version.json';
@@ -87,7 +87,7 @@ type OpenedEntryContextData = {
reloadOpenedFile: () => void;
updateOpenedFile: (
entryPath: string,
- fsEntryMeta: TS.FileSystemEntryMeta
+ fsEntryMeta: TS.FileSystemEntryMeta,
) => Promise<boolean>;
openEntry: (path?: string, showDetails?) => void;
openFsEntry: (fsEntry?: TS.FileSystemEntry, showDetails?) => void;
@@ -99,7 +99,7 @@ type OpenedEntryContextData = {
targetPath: string,
fileName: string,
content: string,
- fileType: 'md' | 'txt' | 'html'
+ fileType: 'md' | 'txt' | 'html',
) => void;
createFile: () => void;
reflectRenameDirectory: (directoryPath: string, newDirPath: string) => void;
@@ -128,7 +128,7 @@ export const OpenedEntryContext = createContext<OpenedEntryContextData>({
createFileAdvanced: () => {},
reflectRenameDirectory: () => {},
reflectDeleteDirectory: undefined,
- reflectDeleteFile: undefined
+ reflectDeleteFile: undefined,
});
export type OpenedEntryContextProviderProps = {
@@ -136,7 +136,7 @@ export type OpenedEntryContextProviderProps = {
};
export const OpenedEntryContextProvider = ({
- children
+ children,
}: OpenedEntryContextProviderProps) => {
const dispatch: AppDispatch = useDispatch();
const { t } = useTranslation();
@@ -145,7 +145,7 @@ export const OpenedEntryContextProvider = ({
currentDirectoryEntries,
currentDirectoryPath,
openDirectory,
- addDirectoryEntries
+ addDirectoryEntries,
} = useDirectoryContentContext();
const { selectedEntries, setSelectedEntries } = useSelectedEntriesContext();
@@ -158,10 +158,10 @@ export const OpenedEntryContextProvider = ({
const locations: TS.Location[] = useSelector(getLocations);
const historyKeys = Pro && Pro.history ? Pro.history.historyKeys : {};
const fileOpenHistory = useSelector(
- (state: any) => state.settings[historyKeys.fileOpenKey]
+ (state: any) => state.settings[historyKeys.fileOpenKey],
);
const folderOpenHistory = useSelector(
- (state: any) => state.settings[historyKeys.folderOpenKey]
+ (state: any) => state.settings[historyKeys.folderOpenKey],
);
const newHTMLFileContent = useSelector(getNewHTMLFileContent);
//const initOpenLink = useSelector(getOpenLink);
@@ -196,7 +196,7 @@ export const OpenedEntryContextProvider = ({
openLink(
// window.location.href.split('?')[0] +
'ts://?cmdopen=' + cmdOpen,
- { fullWidth: true }
+ { fullWidth: true },
);
}, 1000);
}
@@ -249,14 +249,14 @@ export const OpenedEntryContextProvider = ({
const oldFilePath = editedEntryPaths[0].path;
const newFilePath = editedEntryPaths[1].path;
- if (openedEntries.some(entry => entry.path === oldFilePath)) {
+ if (openedEntries.some((entry) => entry.path === oldFilePath)) {
const extractedTags = extractTagsAsObjects(
newFilePath,
AppConfig.tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
- const newEntries = openedEntries.map(entry => {
+ const newEntries = openedEntries.map((entry) => {
if (entry.path !== oldFilePath) {
return entry;
}
@@ -264,15 +264,15 @@ export const OpenedEntryContextProvider = ({
// const { url, ...rest } = entry;
const sidecarTags =
entry.tags && entry.tags.length > 0
- ? entry.tags.filter(tag => tag.type !== 'plain')
+ ? entry.tags.filter((tag) => tag.type !== 'plain')
: [];
return {
...entry,
path: newFilePath, // TODO handle change extension case
tags: [
...sidecarTags, // add only sidecar tags
- ...fileNameTags
- ]
+ ...fileNameTags,
+ ],
// shouldReload: true
};
});
@@ -302,7 +302,7 @@ export const OpenedEntryContextProvider = ({
//if (params.has('tsdpath')) {
// const folderPath2 = params.get('tsdpath');
const folderLocation = locations.find(
- location => location.uuid === locationId
+ (location) => location.uuid === locationId,
);
const folderPath = extractContainingDirectoryPath(openedFile.path);
if (folderPath.indexOf(folderLocation.path) === 0) {
@@ -312,8 +312,8 @@ export const OpenedEntryContextProvider = ({
cleanRootPath(
folderPath,
folderLocation.path,
- PlatformIO.getDirSeparator()
- )
+ PlatformIO.getDirSeparator(),
+ ),
);
}
@@ -327,20 +327,20 @@ export const OpenedEntryContextProvider = ({
sharingLink.current = generateSharingLink(
locationId,
entryPath,
- dirPath
+ dirPath,
);
} else {
sharingLink.current = generateSharingLink(
locationId,
undefined,
- entryPath
+ entryPath,
);
}
} else if (params.has('tsdpath')) {
sharingLink.current = generateSharingLink(
locationId,
undefined,
- params.get('tsdpath')
+ params.get('tsdpath'),
);
} else {
sharingLink.current = generateSharingLink(locationId);
@@ -434,7 +434,7 @@ export const OpenedEntryContextProvider = ({
function reflectUpdateOpenedFileContent(entryPath: string) {
if (openedEntries && openedEntries.length > 0) {
const openedFile: OpenedEntry = openedEntries.find(
- obj => obj.path === entryPath
+ (obj) => obj.path === entryPath,
);
if (openedFile) {
openedFile.shouldReload = true;
@@ -449,33 +449,33 @@ export const OpenedEntryContextProvider = ({
const metaFilePath = openedFile.isFile
? getMetaFileLocationForFile(
openedFile.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
)
: getMetaFileLocationForDir(
openedFile.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
try {
return loadJSONFile(metaFilePath)
- .then(fsEntryMeta => {
+ .then((fsEntryMeta) => {
return updateOpenedFile(openedFile.path, {
...fsEntryMeta,
editMode: false,
- shouldReload: !openedFile.shouldReload
+ shouldReload: !openedFile.shouldReload,
});
})
.catch(() =>
updateOpenedFile(openedFile.path, {
...openedFile,
editMode: false,
- shouldReload: !openedFile.shouldReload
- })
+ shouldReload: !openedFile.shouldReload,
+ }),
);
} catch (e) {
return updateOpenedFile(openedFile.path, {
...openedFile,
editMode: false,
- shouldReload: !openedFile.shouldReload
+ shouldReload: !openedFile.shouldReload,
});
}
}
@@ -484,19 +484,19 @@ export const OpenedEntryContextProvider = ({
function updateOpenedFile(
entryPath: string,
- fsEntryMeta: TS.FileSystemEntryMeta
+ fsEntryMeta: TS.FileSystemEntryMeta,
): Promise<boolean> {
if (
openedEntries &&
openedEntries.length > 0 &&
- openedEntries.some(obj => obj.path === entryPath)
+ openedEntries.some((obj) => obj.path === entryPath)
) {
return PlatformIO.getPropertiesPromise(entryPath)
- .then(entryProps => {
+ .then((entryProps) => {
if (entryProps) {
let entryForOpening: OpenedEntry;
const entryExist = openedEntries.find(
- obj => obj.path === entryPath
+ (obj) => obj.path === entryPath,
);
if (!entryExist) {
@@ -504,7 +504,7 @@ export const OpenedEntryContextProvider = ({
fsEntryMeta.id, //|| fsEntryMeta.uuid,
supportedFileTypes,
entryPath,
- entryProps.isFile
+ entryProps.isFile,
);
} else {
entryForOpening = { ...entryExist };
@@ -542,7 +542,7 @@ export const OpenedEntryContextProvider = ({
}
return true;
})
- .catch(err => {
+ .catch((err) => {
console.log('updateOpenedFile ' + entryPath + ' not exist ' + err);
return Promise.resolve(false);
});
@@ -556,10 +556,10 @@ export const OpenedEntryContextProvider = ({
}
return getAllPropertiesPromise(path)
.then((fsEntry: TS.FileSystemEntry) => openFsEntry(fsEntry, showDetails))
- .catch(error =>
+ .catch((error) =>
console.warn(
- 'Error getting properties for entry: ' + path + ' - ' + error
- )
+ 'Error getting properties for entry: ' + path + ' - ' + error,
+ ),
);
}
@@ -588,13 +588,13 @@ export const OpenedEntryContextProvider = ({
shouldReload:
openFile.shouldReload !== undefined
? !openFile.shouldReload
- : undefined
+ : undefined,
}; // false };
addToEntryContainer(entryForOpening);
showNotification(
`You can't open another file, because '${openFile.path}' is opened for editing`,
'default',
- true
+ true,
);
return false;
}
@@ -604,7 +604,7 @@ export const OpenedEntryContextProvider = ({
fsEntry.uuid,
supportedFileTypes,
fsEntry.path,
- fsEntry.isFile
+ fsEntry.isFile,
);
if (PlatformIO.haveObjectStoreSupport() || PlatformIO.haveWebDavSupport()) {
const cleanedPath = fsEntry.path.startsWith('/')
@@ -655,7 +655,7 @@ export const OpenedEntryContextProvider = ({
if (Pro) {
const relEntryPath = getRelativeEntryPath(
currentLocation,
- fsEntry.path
+ fsEntry.path,
);
const historyKeys = Pro.history.historyKeys;
if (fsEntry.isFile) {
@@ -664,9 +664,9 @@ export const OpenedEntryContextProvider = ({
{
path: fsEntry.path,
url: generateSharingLink(currentLocation.uuid, relEntryPath),
- lid: currentLocation.uuid
+ lid: currentLocation.uuid,
},
- fileOpenHistory
+ fileOpenHistory,
);
} else {
Pro.history.saveHistory(
@@ -676,11 +676,11 @@ export const OpenedEntryContextProvider = ({
url: generateSharingLink(
currentLocation.uuid,
relEntryPath,
- relEntryPath
+ relEntryPath,
),
- lid: currentLocation.uuid
+ lid: currentLocation.uuid,
},
- folderOpenHistory
+ folderOpenHistory,
);
}
}
@@ -693,7 +693,7 @@ export const OpenedEntryContextProvider = ({
selectedEntries && selectedEntries.length > 0
? selectedEntries[selectedEntries.length - 1].path
: undefined,
- currentDirectoryEntries
+ currentDirectoryEntries,
);
if (nextFile !== undefined) {
openFsEntry(nextFile);
@@ -709,7 +709,7 @@ export const OpenedEntryContextProvider = ({
selectedEntries && selectedEntries.length > 0
? selectedEntries[selectedEntries.length - 1].path
: undefined,
- currentDirectoryEntries
+ currentDirectoryEntries,
);
if (prevFile !== undefined) {
openFsEntry(prevFile);
@@ -741,7 +741,7 @@ export const OpenedEntryContextProvider = ({
}
return true;
})
- .catch(err => {
+ .catch((err) => {
// console.log('Error opening from cmd ' + JSON.stringify(err));
showNotification(t('Missing file or folder'), 'warning', true);
});
@@ -755,7 +755,7 @@ export const OpenedEntryContextProvider = ({
}
// Check for relative paths
const targetLocation: TS.Location = locations.find(
- location => location.uuid === locationId
+ (location) => location.uuid === locationId,
);
if (targetLocation) {
let openLocationTimer = 1000;
@@ -778,7 +778,7 @@ export const OpenedEntryContextProvider = ({
if (directoryPath && directoryPath.length > 0) {
const newRelDir = getRelativeEntryPath(
targetLocation,
- directoryPath
+ directoryPath,
);
const dirFullPath =
locationPath.length > 0
@@ -801,7 +801,7 @@ export const OpenedEntryContextProvider = ({
return true;
})
.catch(() =>
- showNotification(t('core:invalidLink'), 'warning', true)
+ showNotification(t('core:invalidLink'), 'warning', true),
);
}
// });
@@ -840,7 +840,7 @@ export const OpenedEntryContextProvider = ({
return true;
})
.catch(() =>
- showNotification(t('core:invalidLink'), 'warning', true)
+ showNotification(t('core:invalidLink'), 'warning', true),
);
}
}
@@ -883,7 +883,7 @@ export const OpenedEntryContextProvider = ({
openEntry(filePath);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('File creation failed with ' + err);
showNotification(t('core:errorCreatingFile'), 'warning', true);
});
@@ -896,7 +896,7 @@ export const OpenedEntryContextProvider = ({
targetPath: string,
fileName: string,
content: string,
- fileType: 'md' | 'txt' | 'html'
+ fileType: 'md' | 'txt' | 'html',
) {
const creationDate = new Date().toISOString();
const fileNameAndExt = fileName + '.' + fileType;
@@ -935,12 +935,12 @@ export const OpenedEntryContextProvider = ({
showNotification(`File '${fileNameAndExt}' created.`, 'default', true);
return true;
})
- .catch(error => {
+ .catch((error) => {
console.warn('Error creating file: ' + error);
showNotification(
`Error creating file '${fileNameAndExt}'`,
'error',
- true
+ true,
);
});
}
@@ -961,7 +961,7 @@ export const OpenedEntryContextProvider = ({
openedEntries &&
openedEntries.length > 0 &&
openedEntries.some(
- file => file.path.startsWith(directoryPath)
+ (file) => file.path.startsWith(directoryPath),
/*extractContainingDirectoryPath(
file.path,
PlatformIO.getDirSeparator()
@@ -978,7 +978,7 @@ export const OpenedEntryContextProvider = ({
if (
openedEntries &&
openedEntries.length > 0 &&
- openedEntries.some(file => file.path === filePath)
+ openedEntries.some((file) => file.path === filePath)
) {
closeAllFiles();
}
@@ -1007,7 +1007,7 @@ export const OpenedEntryContextProvider = ({
createFileAdvanced,
reflectRenameDirectory,
reflectDeleteDirectory,
- reflectDeleteFile
+ reflectDeleteFile,
};
}, [
openedEntries,
@@ -1015,7 +1015,7 @@ export const OpenedEntryContextProvider = ({
currentLocation,
currentDirectoryPath,
fileOpenHistory,
- folderOpenHistory
+ folderOpenHistory,
]);
return (
diff --git a/app/hooks/PaginationContextProvider.tsx b/app/hooks/PaginationContextProvider.tsx
index 1cb4459eb..75c26401e 100644
--- a/app/hooks/PaginationContextProvider.tsx
+++ b/app/hooks/PaginationContextProvider.tsx
@@ -32,7 +32,7 @@ type PaginationContextData = {
export const PaginationContext = createContext<PaginationContextData>({
page: 1,
pageFiles: [],
- setCurrentPage: undefined
+ setCurrentPage: undefined,
});
export type PaginationContextProviderProps = {
@@ -40,13 +40,13 @@ export type PaginationContextProviderProps = {
};
export const PaginationContextProvider = ({
- children
+ children,
}: PaginationContextProviderProps) => {
const initPage = 1;
const {
currentDirectoryPath,
currentDirectoryEntries,
- updateCurrentDirEntries
+ updateCurrentDirEntries,
} = useDirectoryContentContext();
const { settings, sortedDirContent } = useSortedDirContext();
@@ -75,7 +75,7 @@ export const PaginationContextProvider = ({
settings && settings.gridPageLimit
? settings.gridPageLimit
: defaultSettings.gridPageLimit;
- const files = dirContent.filter(entry => entry && entry.isFile);
+ const files = dirContent.filter((entry) => entry && entry.isFile);
const showPagination = gridPageLimit && files.length > gridPageLimit;
if (showPagination) {
const start = (currentPage - 1) * gridPageLimit;
@@ -103,7 +103,7 @@ export const PaginationContextProvider = ({
return {
page,
pageFiles,
- setCurrentPage
+ setCurrentPage,
};
}, [page, pageFiles, currentDirectoryPath]);
diff --git a/app/hooks/PlatformFacadeContextProvider.tsx b/app/hooks/PlatformFacadeContextProvider.tsx
index 0710f6c99..9d64aeb9b 100644
--- a/app/hooks/PlatformFacadeContextProvider.tsx
+++ b/app/hooks/PlatformFacadeContextProvider.tsx
@@ -26,7 +26,7 @@ import {
extractFileName,
getThumbFileLocationForDirectory,
getThumbFileLocationForFile,
- normalizePath
+ normalizePath,
} from '@tagspaces/tagspaces-common/paths';
import PlatformIO from '-/services/platform-facade';
import { useTranslation } from 'react-i18next';
@@ -38,46 +38,46 @@ type PlatformFacadeContextData = {
copyFilePromise: (
sourceFilePath: string,
targetFilePath: string,
- confirmMessage?: string
+ confirmMessage?: string,
) => Promise<any>;
copyFilesWithProgress: (
paths: Array<string>,
targetPath: string,
- onProgress?
+ onProgress?,
) => Promise<any>;
copyFilePromiseOverwrite: (
sourceFilePath: string,
- targetFilePath: string
+ targetFilePath: string,
) => Promise<any>;
renameFilePromise: (
filePath: string,
newFilePath: string,
- onProgress?
+ onProgress?,
) => Promise<any>;
renameFilesPromise: (
renameJobs: Array<Array<string>>,
- onProgress?
+ onProgress?,
) => Promise<any>;
renameDirectoryPromise: (dirPath: string, newDirName: string) => Promise<any>;
copyDirectoryPromise: (
param: any,
newDirPath: string,
- onProgress?
+ onProgress?,
) => Promise<any>;
moveDirectoryPromise: (
param: any,
newDirPath: string,
- onProgress?
+ onProgress?,
) => Promise<any>;
saveFilePromise: (
param: any,
content: any,
- overwrite: boolean
+ overwrite: boolean,
) => Promise<any>;
saveTextFilePromise: (
param: any,
content: string,
- overwrite: boolean
+ overwrite: boolean,
) => Promise<any>;
saveBinaryFilePromise: (
param: any,
@@ -85,8 +85,8 @@ type PlatformFacadeContextData = {
overwrite: boolean,
onUploadProgress?: (
progress: any, // ManagedUpload.Progress,
- response: any // AWS.Response<AWS.S3.PutObjectOutput, AWS.AWSError>
- ) => void
+ response: any, // AWS.Response<AWS.S3.PutObjectOutput, AWS.AWSError>
+ ) => void,
) => Promise<TS.FileSystemEntry>;
deleteFilePromise: (path: string, useTrash?: boolean) => Promise<any>;
deleteFilesPromise: (filePathList: Array<string>) => Promise<any>;
@@ -110,7 +110,7 @@ export const PlatformFacadeContext = createContext<PlatformFacadeContextData>({
deleteFilePromise: undefined,
deleteFilesPromise: undefined,
deleteDirectoryPromise: undefined,
- setFolderThumbnailPromise: undefined
+ setFolderThumbnailPromise: undefined,
});
export type PlatformFacadeContextProviderProps = {
@@ -118,14 +118,10 @@ export type PlatformFacadeContextProviderProps = {
};
export const PlatformFacadeContextProvider = ({
- children
+ children,
}: PlatformFacadeContextProviderProps) => {
- const {
- ignoreByWatcher,
- deignoreByWatcher,
- ignored,
- watcher
- } = useFSWatcherContext();
+ const { ignoreByWatcher, deignoreByWatcher, ignored, watcher } =
+ useFSWatcherContext();
const { t } = useTranslation();
const dispatch: AppDispatch = useDispatch();
@@ -161,7 +157,7 @@ export const PlatformFacadeContextProvider = ({
function createDirectoryPromise(path: string): Promise<any> {
ignoreByWatcher(path);
- return PlatformFacade.createDirectoryPromise(path).then(result => {
+ return PlatformFacade.createDirectoryPromise(path).then((result) => {
deignoreByWatcher(path);
return result;
});
@@ -174,27 +170,27 @@ export const PlatformFacadeContextProvider = ({
function setFolderThumbnailPromise(filePath: string): Promise<string> {
const directoryPath = extractContainingDirectoryPath(
filePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const directoryName = extractDirectoryName(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const sourceThumbPath = getThumbFileLocationForFile(
filePath,
PlatformIO.getDirSeparator(),
- false
+ false,
);
const destThumbPath = getThumbFileLocationForDirectory(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
return copyFilePromise(
sourceThumbPath,
destThumbPath,
- t('core:thumbAlreadyExists', { directoryName })
+ t('core:thumbAlreadyExists', { directoryName }),
).then(() => {
dispatch(AppActions.setLastThumbnailImageChange(destThumbPath));
return directoryPath;
@@ -206,10 +202,10 @@ export const PlatformFacadeContextProvider = ({
targetFilePath: string,
confirmMessage: string = 'File ' +
targetFilePath +
- ' exist do you want to override it?'
+ ' exist do you want to override it?',
): Promise<any> {
return PlatformFacade.getPropertiesPromise(targetFilePath).then(
- isTargetExist => {
+ (isTargetExist) => {
if (isTargetExist) {
// eslint-disable-next-line no-alert
const confirmOverwrite = window && window.confirm(confirmMessage);
@@ -218,44 +214,44 @@ export const PlatformFacadeContextProvider = ({
}
// eslint-disable-next-line prefer-promise-reject-errors
return Promise.reject(
- 'File "' + targetFilePath + '" exists. Copying failed.'
+ 'File "' + targetFilePath + '" exists. Copying failed.',
);
}
return copyFilePromiseOverwrite(sourceFilePath, targetFilePath);
- }
+ },
);
}
function copyFilesWithProgress(
paths: Array<string>,
targetPath: string,
- onProgress = undefined
+ onProgress = undefined,
) {
const controller = new AbortController();
const signal = controller.signal;
- const ioJobPromises = paths.map(path => {
+ const ioJobPromises = paths.map((path) => {
const targetFile =
normalizePath(targetPath) +
PlatformIO.getDirSeparator() +
extractFileName(path, PlatformIO.getDirSeparator());
return {
promise: copyFilePromiseOverwrite(path, targetFile),
- path: path
+ path: path,
};
});
const progress = (completed, path) => {
const progress = {
loaded: completed, //processedSize,
total: ioJobPromises.length,
- key: targetPath
+ key: targetPath,
};
onProgress(
progress,
() => {
controller.abort();
},
- path
+ path,
);
};
return trackProgress(ioJobPromises, signal, progress);
@@ -278,19 +274,19 @@ export const PlatformFacadeContextProvider = ({
}
}
})
- .catch(err => {
+ .catch((err) => {
completed++;
if (progress) {
progress(completed, path);
}
console.warn('Promise ' + path + ' error:', err);
- })
+ }),
);
// Use Promise.race() to wait for all progress promises to resolve
return Promise.race(progressPromises)
.then(() => Promise.all(promises))
- .catch(err => {
+ .catch((err) => {
if (abortSignal.aborted) {
aborted = true;
console.warn('Promise execution aborted');
@@ -302,13 +298,13 @@ export const PlatformFacadeContextProvider = ({
function copyFilePromiseOverwrite(
sourceFilePath: string,
- targetFilePath: string
+ targetFilePath: string,
): Promise<any> {
ignoreByWatcher(targetFilePath);
return PlatformFacade.copyFilePromiseOverwrite(
sourceFilePath,
- targetFilePath
- ).then(result => {
+ targetFilePath,
+ ).then((result) => {
deignoreByWatcher(targetFilePath);
return result;
});
@@ -317,14 +313,14 @@ export const PlatformFacadeContextProvider = ({
function renameFilePromise(
filePath: string,
newFilePath: string,
- onProgress = undefined
+ onProgress = undefined,
): Promise<any> {
ignoreByWatcher(filePath, newFilePath);
return PlatformFacade.renameFilePromise(
filePath,
newFilePath,
- onProgress
- ).then(result => {
+ onProgress,
+ ).then((result) => {
deignoreByWatcher(filePath, newFilePath);
return result;
});
@@ -332,48 +328,48 @@ export const PlatformFacadeContextProvider = ({
function renameFilesPromise(
renameJobs: Array<Array<string>>,
- onProgress = undefined
+ onProgress = undefined,
): Promise<any> {
return Promise.all(
- renameJobs.map(async renameJob => {
+ renameJobs.map(async (renameJob) => {
try {
return await PlatformIO.renameFilePromise(
renameJob[0],
renameJob[1],
- onProgress
+ onProgress,
);
} catch (err) {
console.warn('Error rename file:', err);
return false;
}
- })
+ }),
);
}
function renameDirectoryPromise(
dirPath: string,
- newDirName: string
+ newDirName: string,
): Promise<any> {
ignoreByWatcher(dirPath, newDirName);
return PlatformFacade.renameDirectoryPromise(dirPath, newDirName).then(
- result => {
+ (result) => {
deignoreByWatcher(dirPath, newDirName);
return result;
- }
+ },
);
}
function copyDirectoryPromise(
param: any,
newDirPath: string,
- onProgress = undefined
+ onProgress = undefined,
): Promise<any> {
ignoreByWatcher(param.path, newDirPath);
return PlatformFacade.copyDirectoryPromise(
param,
newDirPath,
- onProgress
- ).then(result => {
+ onProgress,
+ ).then((result) => {
deignoreByWatcher(param.path, newDirPath);
return result;
});
@@ -382,14 +378,14 @@ export const PlatformFacadeContextProvider = ({
function moveDirectoryPromise(
param: any,
newDirPath: string,
- onProgress = undefined
+ onProgress = undefined,
): Promise<any> {
ignoreByWatcher(param.path, newDirPath);
return PlatformFacade.moveDirectoryPromise(
param,
newDirPath,
- onProgress
- ).then(result => {
+ onProgress,
+ ).then((result) => {
deignoreByWatcher(param.path, newDirPath);
return result;
});
@@ -397,28 +393,28 @@ export const PlatformFacadeContextProvider = ({
function saveFilePromise(
param: any,
content: any,
- overwrite: boolean
+ overwrite: boolean,
): Promise<any> {
ignoreByWatcher(param.path);
return PlatformFacade.saveFilePromise(param, content, overwrite).then(
- result => {
+ (result) => {
deignoreByWatcher(param.path);
return result;
- }
+ },
);
}
function saveTextFilePromise(
param: any,
content: string,
- overwrite: boolean
+ overwrite: boolean,
): Promise<any> {
ignoreByWatcher(param.path);
return PlatformFacade.saveTextFilePromise(param, content, overwrite).then(
- result => {
+ (result) => {
deignoreByWatcher(param.path);
return result;
- }
+ },
);
}
@@ -428,16 +424,16 @@ export const PlatformFacadeContextProvider = ({
overwrite: boolean,
onUploadProgress?: (
progress: any, // ManagedUpload.Progress,
- response: any // AWS.Response<AWS.S3.PutObjectOutput, AWS.AWSError>
- ) => void
+ response: any, // AWS.Response<AWS.S3.PutObjectOutput, AWS.AWSError>
+ ) => void,
): Promise<TS.FileSystemEntry> {
ignoreByWatcher(param.path);
return PlatformFacade.saveBinaryFilePromise(
param,
content,
overwrite,
- onUploadProgress
- ).then(result => {
+ onUploadProgress,
+ ).then((result) => {
deignoreByWatcher(param.path);
return result;
});
@@ -446,7 +442,7 @@ export const PlatformFacadeContextProvider = ({
function deleteFilePromise(path: string, useTrash?: boolean): Promise<any> {
ignoreByWatcher(path);
- return PlatformFacade.deleteFilePromise(path, useTrash).then(result => {
+ return PlatformFacade.deleteFilePromise(path, useTrash).then((result) => {
deignoreByWatcher(path);
return result;
});
@@ -454,7 +450,7 @@ export const PlatformFacadeContextProvider = ({
function deleteFilesPromise(filePathList: Array<string>) {
const fileDeletionPromises = [];
- filePathList.forEach(filePath => {
+ filePathList.forEach((filePath) => {
fileDeletionPromises.push(deleteFilePromise(filePath));
});
return Promise.all(fileDeletionPromises);
@@ -462,15 +458,15 @@ export const PlatformFacadeContextProvider = ({
function deleteDirectoryPromise(
path: string,
- useTrash?: boolean
+ useTrash?: boolean,
): Promise<any> {
ignoreByWatcher(path);
return PlatformFacade.deleteDirectoryPromise(path, useTrash).then(
- result => {
+ (result) => {
deignoreByWatcher(path);
return result;
- }
+ },
);
}
@@ -491,7 +487,7 @@ export const PlatformFacadeContextProvider = ({
deleteFilePromise,
deleteFilesPromise,
deleteDirectoryPromise,
- setFolderThumbnailPromise
+ setFolderThumbnailPromise,
};
}, [watcher, ignored]);
diff --git a/app/hooks/SelectedEntryContextProvider.tsx b/app/hooks/SelectedEntryContextProvider.tsx
index 26d53c1a5..b9fb18a95 100644
--- a/app/hooks/SelectedEntryContextProvider.tsx
+++ b/app/hooks/SelectedEntryContextProvider.tsx
@@ -30,7 +30,7 @@ type SelectedEntryContextData = {
export const SelectedEntryContext = createContext<SelectedEntryContextData>({
selectedEntries: undefined,
lastSelectedEntryPath: undefined,
- setSelectedEntries: undefined
+ setSelectedEntries: undefined,
});
export type SelectedEntryContextProviderProps = {
@@ -38,11 +38,11 @@ export type SelectedEntryContextProviderProps = {
};
export const SelectedEntryContextProvider = ({
- children
+ children,
}: SelectedEntryContextProviderProps) => {
const { currentLocation } = useCurrentLocationContext();
const [selectedEntries, setSelectedEntries] = useState<TS.FileSystemEntry[]>(
- []
+ [],
);
const firstRender = useFirstRender();
@@ -81,7 +81,7 @@ export const SelectedEntryContextProvider = ({
selectedEntries,
//lastSelectedEntry: lastSelectedEntry.current,
lastSelectedEntryPath,
- setSelectedEntries
+ setSelectedEntries,
};
}, [selectedEntries]);
diff --git a/app/hooks/TaggingActionsContextProvider.tsx b/app/hooks/TaggingActionsContextProvider.tsx
index 48f2a4114..d8b38f980 100644
--- a/app/hooks/TaggingActionsContextProvider.tsx
+++ b/app/hooks/TaggingActionsContextProvider.tsx
@@ -34,7 +34,7 @@ import {
getPrefixTagContainer,
getTagColor,
getTagDelimiter,
- getTagTextColor
+ getTagTextColor,
} from '-/reducers/settings';
import PlatformIO from '-/services/platform-facade';
import {
@@ -42,12 +42,12 @@ import {
loadDirMetaDataPromise,
loadFileMetaDataPromise,
loadMetaDataPromise,
- saveMetaDataPromise
+ saveMetaDataPromise,
} from '-/services/utils-io';
import {
extractContainingDirectoryPath,
extractFileName,
- extractTags
+ extractTags,
} from '@tagspaces/tagspaces-common/paths';
import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';
import { getLocations } from '-/reducers/locations';
@@ -61,12 +61,12 @@ type TaggingActionsContextData = {
addTags: (
paths: Array<string>,
tags: Array<TS.Tag>,
- updateIndex?: boolean
+ updateIndex?: boolean,
) => Promise<boolean>;
addTagsToEntry: (
path: string,
tags: Array<TS.Tag>,
- updateIndex?: boolean
+ updateIndex?: boolean,
) => Promise<boolean>;
editTagForEntry: (path: string, tag: TS.Tag, newTagTitle?: string) => void;
removeTags: (paths: Array<string>, tags?: Array<TS.Tag>) => Promise<boolean>;
@@ -82,7 +82,7 @@ export const TaggingActionsContext = createContext<TaggingActionsContextData>({
removeTags: () => Promise.resolve(false),
removeTagsFromEntry: () => Promise.resolve(false),
removeAllTags: () => Promise.resolve(false),
- collectTagsFromLocation: () => {}
+ collectTagsFromLocation: () => {},
});
export type TaggingActionsContextProviderProps = {
@@ -90,7 +90,7 @@ export type TaggingActionsContextProviderProps = {
};
export const TaggingActionsContextProvider = ({
- children
+ children,
}: TaggingActionsContextProviderProps) => {
const { t } = useTranslation();
const { openedEntries, updateOpenedFile } = useOpenedEntryContext();
@@ -111,7 +111,7 @@ export const TaggingActionsContextProvider = ({
function addTags(
paths: Array<string>,
tags: Array<TS.Tag>,
- updateIndex = true
+ updateIndex = true,
): Promise<boolean> {
let defaultTagLocation;
if (geoTaggingFormat.toLowerCase() === 'mgrs') {
@@ -121,7 +121,7 @@ export const TaggingActionsContextProvider = ({
}
const processedTags = [];
- tags.map(pTag => {
+ tags.map((pTag) => {
const tag = { ...pTag };
tag.type = 'sidecar';
if (tag.id) {
@@ -140,7 +140,7 @@ export const TaggingActionsContextProvider = ({
dispatch(AppActions.toggleEditTagDialog(tag));
} else {
showNotification(
- t('core:thisFunctionalityIsAvailableInPro' as any) as string
+ t('core:thisFunctionalityIsAvailableInPro' as any) as string,
);
}
} else if (tag.functionality === 'dateTagging') {
@@ -151,7 +151,7 @@ export const TaggingActionsContextProvider = ({
dispatch(AppActions.toggleEditTagDialog(tag));
} else {
showNotification(
- t('core:thisFunctionalityIsAvailableInPro' as any) as string
+ t('core:thisFunctionalityIsAvailableInPro' as any) as string,
);
}
} else {
@@ -166,20 +166,21 @@ export const TaggingActionsContextProvider = ({
});
if (processedTags.length > 0) {
- const promises = paths.map(path =>
- addTagsToEntry(path, processedTags, updateIndex)
+ const promises = paths.map((path) =>
+ addTagsToEntry(path, processedTags, updateIndex),
);
if (addTagsToLibrary) {
// collecting tags
// filter existed in tagLibrary
const uniqueTags: TS.Tag[] = [];
- processedTags.map(tag => {
+ processedTags.map((tag) => {
if (
getTagLibrary().findIndex(
- tagGroup =>
- tagGroup.children.findIndex(obj => obj.title === tag.title) !==
- -1
+ (tagGroup) =>
+ tagGroup.children.findIndex(
+ (obj) => obj.title === tag.title,
+ ) !== -1,
) === -1 &&
!/^(?:\d+~\d+|\d+)$/.test(tag.title) && // skip adding of tag containing only digits
!isGeoTag(tag.title) // skip adding of tag containing geo information
@@ -187,7 +188,7 @@ export const TaggingActionsContextProvider = ({
uniqueTags.push({
...tag,
color: tag.color || tagBackgroundColor,
- textcolor: tag.textcolor || tagTextColor
+ textcolor: tag.textcolor || tagTextColor,
});
}
return true;
@@ -200,7 +201,7 @@ export const TaggingActionsContextProvider = ({
textcolor: tagTextColor,
children: uniqueTags,
created_date: new Date().getTime(),
- modified_date: new Date().getTime()
+ modified_date: new Date().getTime(),
};
mergeTagGroup(tagGroup, getTagLibrary());
dispatch(AppActions.tagLibraryChanged());
@@ -256,7 +257,7 @@ export const TaggingActionsContextProvider = ({
async function addTagsToEntry(
path: string,
tags: Array<TS.Tag>,
- updateIndex = true
+ updateIndex = true,
): Promise<boolean> {
const entryProperties = await PlatformIO.getPropertiesPromise(path);
let fsEntryMeta;
@@ -274,13 +275,13 @@ export const TaggingActionsContextProvider = ({
const uniqueTags = getNonExistingTags(
tags,
extractTags(path, tagDelimiter, PlatformIO.getDirSeparator()),
- fsEntryMeta.tags
+ fsEntryMeta.tags,
);
if (uniqueTags.length > 0) {
const newTags: TS.Tag[] = [...fsEntryMeta.tags, ...uniqueTags];
const updatedFsEntryMeta = {
...fsEntryMeta,
- tags: newTags
+ tags: newTags,
};
return saveMetaDataPromise(path, updatedFsEntryMeta)
.then(() => {
@@ -288,16 +289,16 @@ export const TaggingActionsContextProvider = ({
reflectUpdateSidecarTags(path, newTags, updateIndex);
updateOpenedFile(path, {
id: 'opened_entry_id',
- tags: newTags
+ tags: newTags,
});
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Error adding tags for ' + path + ' with ' + err);
showNotification(
t('core:addingTagsFailed' as any) as string,
'error',
- true
+ true,
);
return false;
});
@@ -310,12 +311,12 @@ export const TaggingActionsContextProvider = ({
reflectUpdateSidecarTags(path, tags, updateIndex);
return updateOpenedFile(path, { id: '', tags }); //, changed: true });
})
- .catch(error => {
+ .catch((error) => {
console.warn('Error adding tags for ' + path + ' with ' + error);
showNotification(
t('core:addingTagsFailed' as any) as string,
'error',
- true
+ true,
);
return true;
});
@@ -325,18 +326,18 @@ export const TaggingActionsContextProvider = ({
const extractedTags = extractTags(
path,
tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const uniqueTags = getNonExistingTags(
tags,
extractedTags,
- fsEntryMeta.tags
+ fsEntryMeta.tags,
);
if (uniqueTags.length > 0) {
const fileName = extractFileName(path, PlatformIO.getDirSeparator());
const containingDirectoryPath = extractContainingDirectoryPath(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
for (let i = 0; i < uniqueTags.length; i += 1) {
@@ -350,7 +351,7 @@ export const TaggingActionsContextProvider = ({
fileName,
extractedTags,
tagDelimiter,
- prefixTagContainer
+ prefixTagContainer,
);
return renameFile(path, newFilePath);
}
@@ -359,12 +360,12 @@ export const TaggingActionsContextProvider = ({
const fileName = extractFileName(path, PlatformIO.getDirSeparator());
const containingDirectoryPath = extractContainingDirectoryPath(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const extractedTags = extractTags(
path,
tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
for (let i = 0; i < tags.length; i += 1) {
// check if tag is already in the tag array
@@ -381,7 +382,7 @@ export const TaggingActionsContextProvider = ({
fileName,
extractedTags,
tagDelimiter,
- prefixTagContainer
+ prefixTagContainer,
);
if (path !== newFilePath) {
return renameFile(path, newFilePath);
@@ -392,7 +393,7 @@ export const TaggingActionsContextProvider = ({
function getNonExistingTags(
newTagsArray: Array<TS.Tag>,
fileTagsArray: string[],
- sideCarTagsArray: Array<TS.Tag>
+ sideCarTagsArray: Array<TS.Tag>,
) {
const newTags = [];
for (let i = 0; i < newTagsArray.length; i += 1) {
@@ -401,7 +402,7 @@ export const TaggingActionsContextProvider = ({
// check if tag is already in the sideCarTagsArray
if (
sideCarTagsArray.findIndex(
- sideCarTag => sideCarTag.title === newTagsArray[i].title
+ (sideCarTag) => sideCarTag.title === newTagsArray[i].title,
) === -1
) {
newTags.push(newTagsArray[i]);
@@ -422,7 +423,7 @@ export const TaggingActionsContextProvider = ({
async function editTagForEntry(
path: string,
tag: TS.Tag,
- newTagTitle?: string
+ newTagTitle?: string,
) {
if (newTagTitle === undefined) {
// eslint-disable-next-line no-param-reassign
@@ -447,7 +448,7 @@ export const TaggingActionsContextProvider = ({
const extractedTags: string[] = extractTags(
path,
tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
// TODO: Handle adding already added tags
if (extractedTags.includes(tag.title)) {
@@ -455,7 +456,7 @@ export const TaggingActionsContextProvider = ({
const fileName = extractFileName(path, PlatformIO.getDirSeparator());
const containingDirectoryPath = extractContainingDirectoryPath(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
let tagFoundPosition = -1;
@@ -479,25 +480,25 @@ export const TaggingActionsContextProvider = ({
fileName,
extractedTags,
tagDelimiter,
- prefixTagContainer
+ prefixTagContainer,
);
if (newFileName !== fileName) {
await renameFile(
path,
- containingDirectoryPath + PlatformIO.getDirSeparator() + newFileName
+ containingDirectoryPath + PlatformIO.getDirSeparator() + newFileName,
);
}
} else {
//if (tag.type === 'sidecar') {
loadMetaDataPromise(path)
- .then(fsEntryMeta => {
+ .then((fsEntryMeta) => {
let tagFoundPosition = -1;
let newTagsArray = fsEntryMeta.tags.map((sidecarTag, index) => {
if (sidecarTag.title === tag.title) {
tagFoundPosition = index;
return {
...sidecarTag,
- title: newTagTitle
+ title: newTagTitle,
};
}
return sidecarTag;
@@ -515,35 +516,35 @@ export const TaggingActionsContextProvider = ({
// clear duplicates
newTagsArray = newTagsArray.filter(
(item, pos, array) =>
- array.findIndex(el => el.title === item.title) === pos
+ array.findIndex((el) => el.title === item.title) === pos,
);
saveMetaDataPromise(path, {
...fsEntryMeta,
- tags: newTagsArray
+ tags: newTagsArray,
})
.then(() => {
updateOpenedFile(path, {
id: '',
- tags: newTagsArray
+ tags: newTagsArray,
});
// TODO rethink this updateCurrentDirEntry and not need for KanBan
reflectUpdateSidecarTags(path, newTagsArray, true);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Error adding tags for ' + path + ' with ' + err);
showNotification(
t('core:addingTagsFailed' as any) as string,
'error',
- true
+ true,
);
});
return true;
})
- .catch(error => {
+ .catch((error) => {
// json metadata not exist -create the new one
console.warn(
- 'json metadata not exist create new ' + path + ' with ' + error
+ 'json metadata not exist create new ' + path + ' with ' + error,
);
// dispatch(AppActions.showNotification(t('core:addingTagsFailed'), 'error', true));
// eslint-disable-next-line no-param-reassign
@@ -553,18 +554,18 @@ export const TaggingActionsContextProvider = ({
.then(() => {
updateOpenedFile(path, {
id: '',
- tags: fsEntryMeta.tags
+ tags: fsEntryMeta.tags,
});
// TODO rethink this updateCurrentDirEntry and not need for KanBan
reflectUpdateSidecarTags(path, fsEntryMeta.tags);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Error adding tags for ' + path + ' with ' + err);
showNotification(
t('core:addingTagsFailed' as any) as string,
'error',
- true
+ true,
);
});
});
@@ -576,8 +577,9 @@ export const TaggingActionsContextProvider = ({
const uniqueTags = [];
if (
getTagLibrary().findIndex(
- tagGroup =>
- tagGroup.children.findIndex(obj => obj.title === newTagTitle) !== -1
+ (tagGroup) =>
+ tagGroup.children.findIndex((obj) => obj.title === newTagTitle) !==
+ -1,
) === -1 &&
!/^(?:\d+~\d+|\d+)$/.test(newTagTitle) &&
!isGeoTag(newTagTitle) // skip adding of tag containing only digits or geo tags
@@ -586,7 +588,7 @@ export const TaggingActionsContextProvider = ({
...tag,
title: newTagTitle,
color: tag.color || tagBackgroundColor,
- textcolor: tag.textcolor || tagTextColor
+ textcolor: tag.textcolor || tagTextColor,
});
}
if (uniqueTags.length > 0) {
@@ -597,7 +599,7 @@ export const TaggingActionsContextProvider = ({
textcolor: tagTextColor,
children: uniqueTags,
created_date: new Date().getTime(),
- modified_date: new Date().getTime()
+ modified_date: new Date().getTime(),
};
mergeTagGroup(tagGroup, getTagLibrary());
dispatch(AppActions.tagLibraryChanged());
@@ -607,9 +609,9 @@ export const TaggingActionsContextProvider = ({
async function removeTags(
paths: Array<string>,
- tags?: Array<TS.Tag>
+ tags?: Array<TS.Tag>,
): Promise<boolean> {
- const promises = paths.map(path => removeTagsFromEntry(path, tags));
+ const promises = paths.map((path) => removeTagsFromEntry(path, tags));
return Promise.all(promises).then(() => true);
}
@@ -619,30 +621,36 @@ export const TaggingActionsContextProvider = ({
*/
function removeTagsFromEntry(
path: string,
- tags?: Array<TS.Tag>
+ tags?: Array<TS.Tag>,
): Promise<boolean> {
- const tagTitlesForRemoving = tags ? tags.map(tag => tag.title) : undefined;
+ const tagTitlesForRemoving = tags
+ ? tags.map((tag) => tag.title)
+ : undefined;
return loadMetaDataPromise(path)
.then((fsEntryMeta: TS.FileSystemEntryMeta) => {
const newTags = tagTitlesForRemoving
? fsEntryMeta.tags.filter(
- sidecarTag => !tagTitlesForRemoving.includes(sidecarTag.title)
+ (sidecarTag) => !tagTitlesForRemoving.includes(sidecarTag.title),
)
: [];
- return removeTagsFromFilename(fsEntryMeta.isFile).then(newFilePath => {
- return removeTagsFromSideCar(fsEntryMeta, newTags, newFilePath).then(
- () => {
+ return removeTagsFromFilename(fsEntryMeta.isFile).then(
+ (newFilePath) => {
+ return removeTagsFromSideCar(
+ fsEntryMeta,
+ newTags,
+ newFilePath,
+ ).then(() => {
// dispatch(AppActions.reflectEditedEntryPaths([newFilePath]));
return updateOpenedFile(path, {
id: '',
- tags: newTags
+ tags: newTags,
});
- }
- );
- });
+ });
+ },
+ );
})
- .catch(error => {
+ .catch((error) => {
console.warn('Error removing tags for ' + path + ' with ' + error);
// dispatch(AppActions.showNotification(t('core:removingSidecarTagsFailed'), 'error', true));
return removeTagsFromFilename().then(() => true);
@@ -651,27 +659,27 @@ export const TaggingActionsContextProvider = ({
function removeTagsFromSideCar(
fsEntryMeta: TS.FileSystemEntryMeta,
newTags,
- newFilePath
+ newFilePath,
): Promise<boolean> {
if (newFilePath === path) {
// no file rename - only sidecar tags removed
const updatedFsEntryMeta = {
...fsEntryMeta,
- tags: newTags
+ tags: newTags,
};
return saveMetaDataPromise(path, updatedFsEntryMeta)
.then(() => {
reflectUpdateSidecarTags(newFilePath, newTags);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn(
- 'Removing sidecar tags failed ' + path + ' with ' + err
+ 'Removing sidecar tags failed ' + path + ' with ' + err,
);
showNotification(
t('core:removingSidecarTagsFailed' as any) as string,
'error',
- true
+ true,
);
return false;
});
@@ -690,20 +698,20 @@ export const TaggingActionsContextProvider = ({
let extractedTags = extractTags(
path,
tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
if (extractedTags.length > 0) {
const fileName = extractFileName(path, PlatformIO.getDirSeparator());
const containingDirectoryPath = extractContainingDirectoryPath(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
if (tagTitlesForRemoving) {
for (let i = 0; i < tagTitlesForRemoving.length; i += 1) {
const tagLoc = extractedTags.indexOf(tagTitlesForRemoving[i]);
if (tagLoc < 0) {
console.log(
- 'The tag cannot be removed because it is not part of the file name.'
+ 'The tag cannot be removed because it is not part of the file name.',
);
} else {
extractedTags.splice(tagLoc, 1);
@@ -720,7 +728,7 @@ export const TaggingActionsContextProvider = ({
fileName,
extractedTags,
tagDelimiter,
- prefixTagContainer
+ prefixTagContainer,
);
if (path !== newFilePath) {
const success = await renameFile(path, newFilePath);
@@ -752,7 +760,7 @@ export const TaggingActionsContextProvider = ({
const changedTagGroup = {
...tagGroup,
children: uniqueTags,
- modified_date: new Date().getTime()
+ modified_date: new Date().getTime(),
};
mergeTagGroup(changedTagGroup, getTagLibrary(), locations);
// dispatch(TagLibraryActions.mergeTagGroup(changedTagGroup));
@@ -763,19 +771,19 @@ export const TaggingActionsContextProvider = ({
const uniqueTags = [];
const defaultTagColor = tagBackgroundColor;
const defaultTagTextColor = tagTextColor;
- locationIndex.map(entry => {
+ locationIndex.map((entry) => {
if (entry.tags && entry.tags.length > 0) {
- entry.tags.map(tag => {
+ entry.tags.map((tag) => {
if (
- uniqueTags.findIndex(obj => obj.title === tag.title) < 0 && // element not already added
- tagGroup.children.findIndex(obj => obj.title === tag.title) < 0 && // element not already added
+ uniqueTags.findIndex((obj) => obj.title === tag.title) < 0 && // element not already added
+ tagGroup.children.findIndex((obj) => obj.title === tag.title) < 0 && // element not already added
!/^(?:\d+~\d+|\d+)$/.test(tag.title) && // skip adding of tag containing only digits
!isGeoTag(tag.title) // skip adding of tag containing geo information
) {
uniqueTags.push({
...tag,
color: tag.color || defaultTagColor,
- textcolor: tag.textcolor || defaultTagTextColor
+ textcolor: tag.textcolor || defaultTagTextColor,
});
}
return true;
@@ -791,7 +799,7 @@ export const TaggingActionsContextProvider = ({
// to reload cell in KanBan if add/remove sidecar tags
// @ts-ignore
const action: TS.EditedEntryAction = `edit${tags
- .map(tag => tag.title)
+ .map((tag) => tag.title)
.join()}`;
dispatch(AppActions.reflectEditedEntryPaths([{ action, path }])); //[{ [path]: tags }]));
// @ts-ignore
@@ -811,13 +819,13 @@ export const TaggingActionsContextProvider = ({
removeTags,
removeTagsFromEntry,
removeAllTags,
- collectTagsFromLocation
+ collectTagsFromLocation,
};
}, [
openedEntries,
persistTagsInSidecarFile,
addTagsToLibrary,
- reflectUpdateSidecarTags
+ reflectUpdateSidecarTags,
]);
return (
diff --git a/app/hooks/ThumbGenerationContextProvider.tsx b/app/hooks/ThumbGenerationContextProvider.tsx
index 103d7f3e7..b04e245d8 100644
--- a/app/hooks/ThumbGenerationContextProvider.tsx
+++ b/app/hooks/ThumbGenerationContextProvider.tsx
@@ -21,7 +21,7 @@ import { useSelector } from 'react-redux';
import {
getEnableWS,
getShowUnixHiddenEntries,
- getUseGenerateThumbnails
+ getUseGenerateThumbnails,
} from '-/reducers/settings';
import PlatformIO from '-/services/platform-facade';
import { TS } from '-/tagspaces.namespace';
@@ -32,7 +32,7 @@ import {
supportedImgs,
supportedMisc,
supportedText,
- supportedVideos
+ supportedVideos,
} from '-/services/thumbsgenerator';
import { usePaginationContext } from '-/hooks/usePaginationContext';
import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
@@ -47,8 +47,8 @@ type ThumbGenerationContextData = {
export const ThumbGenerationContext = createContext<ThumbGenerationContextData>(
{
- generateThumbnails: undefined
- }
+ generateThumbnails: undefined,
+ },
);
export type ThumbGenerationContextProviderProps = {
@@ -56,12 +56,12 @@ export type ThumbGenerationContextProviderProps = {
};
export const ThumbGenerationContextProvider = ({
- children
+ children,
}: ThumbGenerationContextProviderProps) => {
const {
currentDirectoryPath,
currentDirectoryEntries,
- updateCurrentDirEntries
+ updateCurrentDirEntries,
} = useDirectoryContentContext();
const { currentLocation } = useCurrentLocationContext();
const { pageFiles, page } = usePaginationContext();
@@ -88,7 +88,7 @@ export const ThumbGenerationContextProvider = ({
'tiff',
'ico',
'webp',
- 'avif'
+ 'avif',
// 'bmp' currently electron main processed: https://github.com/lovell/sharp/issues/806
];
@@ -107,8 +107,8 @@ export const ThumbGenerationContextProvider = ({
loadCurrentDirMeta(
currentDirectoryPath,
currentDirectoryEntries,
- entries.filter(entry => entry.isFile)
- ).then(entries => updateCurrentDirEntries(entries));
+ entries.filter((entry) => entry.isFile),
+ ).then((entries) => updateCurrentDirEntries(entries));
// }
return true;
});
@@ -120,10 +120,10 @@ export const ThumbGenerationContextProvider = ({
if (
!currentDirectoryPath ||
currentDirectoryPath.endsWith(
- AppConfig.dirSeparator + AppConfig.metaFolder
+ AppConfig.dirSeparator + AppConfig.metaFolder,
) ||
currentDirectoryPath.endsWith(
- AppConfig.dirSeparator + AppConfig.metaFolder + AppConfig.dirSeparator
+ AppConfig.dirSeparator + AppConfig.metaFolder + AppConfig.dirSeparator,
)
) {
return false; // dont generate thumbnails in meta folder
@@ -138,7 +138,7 @@ export const ThumbGenerationContextProvider = ({
}
function generateThumbnails(
- dirEntries: TS.FileSystemEntry[]
+ dirEntries: TS.FileSystemEntry[],
): Promise<boolean> {
if (
AppConfig.isWeb || // not in web mode
@@ -152,7 +152,7 @@ export const ThumbGenerationContextProvider = ({
const isWorkerAvailable = enableWS && PlatformIO.isWorkerAvailable();
const workerEntries: string[] = [];
const mainEntries: string[] = [];
- dirEntries.map(entry => {
+ dirEntries.map((entry) => {
if (!entry.isFile) {
return true;
}
@@ -182,14 +182,14 @@ export const ThumbGenerationContextProvider = ({
thumbnailMainGeneration(mainEntries).then(() => {
setGenThumbs(false);
return true;
- })
+ }),
)
- .catch(e => {
+ .catch((e) => {
// WS error handle let process thumbgeneration in Main process Generator
console.log('createThumbnailsInWorker', e);
return thumbnailMainGeneration([
...workerEntries,
- ...mainEntries
+ ...mainEntries,
]).then(() => {
setGenThumbs(false);
return true;
@@ -208,14 +208,14 @@ export const ThumbGenerationContextProvider = ({
function thumbnailMainGeneration(mainEntries: string[]): Promise<boolean> {
const maxExecutionTime = 9000;
- const promises = mainEntries.map(tmbPath =>
- getThumbnailURLPromise(tmbPath)
+ const promises = mainEntries.map((tmbPath) =>
+ getThumbnailURLPromise(tmbPath),
);
- const promisesWithTimeout = promises.map(promise => {
+ const promisesWithTimeout = promises.map((promise) => {
const timeoutPromise = new Promise((resolve, reject) => {
setTimeout(() => {
reject(
- new Error('Maximum execution time exceeded' + maxExecutionTime)
+ new Error('Maximum execution time exceeded' + maxExecutionTime),
);
}, maxExecutionTime);
});
@@ -227,7 +227,7 @@ export const ThumbGenerationContextProvider = ({
.then(() => {
return true;
})
- .catch(e => {
+ .catch((e) => {
console.log('thumbnailMainGeneration', e);
return false;
});
@@ -235,7 +235,7 @@ export const ThumbGenerationContextProvider = ({
const context = useMemo(() => {
return {
- generateThumbnails
+ generateThumbnails,
};
}, []);
diff --git a/app/index.tsx b/app/index.tsx
index 3bd8d65ff..2eada461b 100644
--- a/app/index.tsx
+++ b/app/index.tsx
@@ -25,7 +25,7 @@ import './app.global.css';
const { store, persistor } = configureStore({});
-document.addEventListener('contextmenu', event => event.preventDefault());
+document.addEventListener('contextmenu', (event) => event.preventDefault());
if (process.env.NODE_ENV === 'production') {
console.log = () => {};
@@ -36,7 +36,7 @@ if (process.env.NODE_ENV === 'production') {
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
/*<AppContainer>*/
- <Root store={store} persistor={persistor} />
+ <Root store={store} persistor={persistor} />,
/*</AppContainer>*/
);
diff --git a/app/main.dev.babel.js b/app/main.dev.babel.js
index 31dd89107..23a45ace9 100644
--- a/app/main.dev.babel.js
+++ b/app/main.dev.babel.js
@@ -1,7 +1,7 @@
const register = require('@babel/register').default;
register({
- extensions: ['.ts', '.tsx', '.js', '.json']
+ extensions: ['.ts', '.tsx', '.js', '.json'],
});
require('./main.dev.ts');
diff --git a/app/main.dev.ts b/app/main.dev.ts
index 4bf79414f..579061237 100644
--- a/app/main.dev.ts
+++ b/app/main.dev.ts
@@ -22,7 +22,7 @@ import {
dialog,
globalShortcut,
ipcMain,
- shell
+ shell,
} from 'electron';
import windowStateKeeper from 'electron-window-state';
import path from 'path';
@@ -46,7 +46,7 @@ contextMenu({
showInspectElement: false,
showSearchWithGoogle: false,
showLookUpSelection: false,
- showServices: false
+ showServices: false,
});
const isMac = process.platform === 'darwin';
@@ -69,9 +69,9 @@ if (process.env.NODE_ENV === 'production') {
fs.mkdirSync(dir, { recursive: true });
}
const logFile = fs.createWriteStream(path.join(dir, 'log.txt'), {
- flags: 'a' // 'w'
+ flags: 'a', // 'w'
});
- console.error = function(d, ex) {
+ console.error = function (d, ex) {
logFile.write(d + '\n');
if (ex) {
logFile.write(ex.stack + '\n');
@@ -155,18 +155,18 @@ const installExtensions = () => {
const {
default: installExtension,
REACT_DEVELOPER_TOOLS,
- REDUX_DEVTOOLS
+ REDUX_DEVTOOLS,
} = require('electron-devtools-installer'); // eslint-disable-line
// const forceDownload = !!process.env.UPGRADE_EXTENSIONS; // temp fix for electron-devtools-installer issue
const extensions = [REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS];
const extOptions = {
loadExtensionOptions: { allowFileAccess: true },
- forceDownload: false
+ forceDownload: false,
};
return Promise.all(
- extensions.map(async name => await installExtension(name.id, extOptions))
+ extensions.map(async (name) => await installExtension(name.id, extOptions)),
).catch(console.log);
};
@@ -334,7 +334,7 @@ function reloadApp() {
function createNewWindowInstance(url?) {
const mainWindowState = windowStateKeeper({
defaultWidth: 1280,
- defaultHeight: 800
+ defaultHeight: 800,
});
const mainWindowInstance = new BrowserWindow({
@@ -346,8 +346,8 @@ function createNewWindowInstance(url?) {
spellcheck: true,
nodeIntegration: true,
webviewTag: true,
- contextIsolation: false
- }
+ contextIsolation: false,
+ },
});
mainWindowInstance.setMenuBarVisibility(false);
@@ -382,10 +382,10 @@ function buildTrayMenu(i18n) {
toggleNewFileDialog: newTextFile,
openNextFile: getNextFile,
openPrevFile: getPreviousFile,
- quitApp: reloadApp
+ quitApp: reloadApp,
},
i18n,
- isMac
+ isMac,
);
}
@@ -416,9 +416,9 @@ function buildAppMenu(i18n) {
toggleLicenseDialog,
toggleThirdPartyLibsDialog,
toggleAboutDialog,
- createNewWindowInstance
+ createNewWindowInstance,
},
- i18n
+ i18n,
);
}
@@ -430,7 +430,7 @@ async function startWS() {
if (devMode || testMode) {
filepath = path.join(
__dirname,
- 'node_modules/@tagspaces/tagspaces-ws/build'
+ 'node_modules/@tagspaces/tagspaces-ws/build',
);
script = 'index.js';
envPath = path.join(__dirname, '.env');
@@ -450,7 +450,7 @@ async function startWS() {
script, // Script to be run
cwd: filepath, // './node_modules/tagspaces-ws', // './process1', cwd: '/path/to/npm/module/',
args: ['-p', freePort, '-k', properties.get('KEY')],
- restartAt: []
+ restartAt: [],
// log: path.join(process.cwd(), 'thumbGen.log')
},
(err, pid) => {
@@ -464,16 +464,16 @@ async function startWS() {
usedWsPort = freePort;
if (mainWindow) {
mainWindow.webContents.send('start_ws', {
- port: freePort
+ port: freePort,
});
}
resolve(
- `Starting ${pid.name} on ${pid.cwd} - pid (${pid.child.pid})`
+ `Starting ${pid.name} on ${pid.cwd} - pid (${pid.child.pid})`,
);
}
- }
+ },
);
- }
+ },
);
});
console.debug(results);
@@ -495,7 +495,7 @@ async function createAppWindow() {
const mainWindowState = windowStateKeeper({
defaultWidth: 1280,
- defaultHeight: 800
+ defaultHeight: 800,
});
mainWindow = new BrowserWindow({
@@ -509,8 +509,8 @@ async function createAppWindow() {
spellcheck: true,
nodeIntegration: true,
webviewTag: true,
- contextIsolation: false
- }
+ contextIsolation: false,
+ },
});
const winUserAgent =
@@ -519,14 +519,14 @@ async function createAppWindow() {
await mainWindow.loadURL(
mainHTML + startupParameter,
- testWinOnUnix ? { userAgent: winUserAgent } : {}
+ testWinOnUnix ? { userAgent: winUserAgent } : {},
);
mainWindow.setMenuBarVisibility(false);
mainWindow.setAutoHideMenuBar(true);
mainWindowState.manage(mainWindow);
mainWindow.webContents.send('start_ws', {
- port: usedWsPort
+ port: usedWsPort,
});
mainWindow.webContents.on('did-finish-load', () => {
@@ -557,7 +557,7 @@ async function createAppWindow() {
pm2.stopAll();
globalShortcut.unregisterAll();
app.quit();
- }
+ },
);
}
@@ -594,7 +594,7 @@ app.on('ready', async () => {
console.log('buildMenus', ex);
}
- i18n.on('languageChanged', lng => {
+ i18n.on('languageChanged', (lng) => {
try {
console.log('languageChanged:' + lng);
buildAppMenu(i18n);
@@ -623,12 +623,12 @@ app.on('ready', async () => {
if (mainWindow) {
mainWindow.webContents.send('set_extensions', {
extensions,
- supportedFileTypes
+ supportedFileTypes,
});
// mainWindow.webContents.send('set_supported_file_types', supportedFileTypes);
}
})
- .catch(err => console.error('load-extensions', err));
+ .catch((err) => console.error('load-extensions', err));
});
ipcMain.on('remove-extension', (e, extensionId) => {
@@ -640,11 +640,11 @@ app.on('ready', async () => {
'tsplugins',
extBuildIndex > -1
? extensionId.substring(0, extBuildIndex)
- : extensionId
+ : extensionId,
),
{
- recursive: true
- }
+ recursive: true,
+ },
);
} catch (e) {
console.debug(e);
@@ -668,7 +668,7 @@ app.on('ready', async () => {
downloadsFolder: app.getPath('downloads'),
musicFolder: app.getPath('music'),
picturesFolder: app.getPath('pictures'),
- videosFolder: app.getPath('videos')
+ videosFolder: app.getPath('videos'),
};
if (isMac) {
paths.iCloudFolder =
@@ -677,7 +677,7 @@ app.on('ready', async () => {
return paths;
});
- ipcMain.on('get-user-home-path', event => {
+ ipcMain.on('get-user-home-path', (event) => {
event.returnValue = app.getPath('home');
});
@@ -689,7 +689,7 @@ app.on('ready', async () => {
ipcMain.handle('select-directory-dialog', async () => {
const options = {
- properties: ['openDirectory', 'createDirectory']
+ properties: ['openDirectory', 'createDirectory'],
};
// @ts-ignore
const resultObject = await dialog.showOpenDialog(options);
@@ -703,17 +703,17 @@ app.on('ready', async () => {
// end electron-io
- ipcMain.on('app-data-path-request', event => {
+ ipcMain.on('app-data-path-request', (event) => {
event.returnValue = app.getPath('appData'); // eslint-disable-line
});
- ipcMain.on('app-version-request', event => {
+ ipcMain.on('app-version-request', (event) => {
event.returnValue = app.getVersion(); // eslint-disable-line
});
ipcMain.handle('move-to-trash', async (event, files) => {
const result = [];
- files.forEach(fullPath => {
+ files.forEach((fullPath) => {
// console.debug('Trash:' + fullPath);
result.push(shell.trashItem(fullPath));
});
@@ -768,7 +768,7 @@ app.on('ready', async () => {
app.quit();
});
- process.on('uncaughtException', error => {
+ process.on('uncaughtException', (error) => {
if (error.stack) {
console.error('error:', error.stack);
throw new Error(error.stack);
diff --git a/app/perspectives/common/DirectoryMenuItems.tsx b/app/perspectives/common/DirectoryMenuItems.tsx
index f5114f7d2..61eee848a 100644
--- a/app/perspectives/common/DirectoryMenuItems.tsx
+++ b/app/perspectives/common/DirectoryMenuItems.tsx
@@ -24,7 +24,7 @@ import {
AudioRecordIcon,
NewFileIcon,
NewFolderIcon,
- AddExistingFileIcon
+ AddExistingFileIcon,
} from '-/components/CommonIcons';
import { TS } from '-/tagspaces.namespace';
@@ -52,7 +52,7 @@ export function getDirectoryMenuItems(
showProperties?: () => void,
cameraTakePicture?: () => void,
showAddRemoveTagsDialog?: () => void,
- openInNewWindow?: () => void
+ openInNewWindow?: () => void,
) {
const menuItems = [];
if (selectedEntriesLength < 2) {
@@ -71,7 +71,7 @@ export function getDirectoryMenuItems(
<OpenFolderIcon />
</ListItemIcon>
<ListItemText primary={t('core:openDirectory')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (openInNewWindow) {
@@ -88,7 +88,7 @@ export function getDirectoryMenuItems(
<OpenNewWindowIcon />
</ListItemIcon>
<ListItemText primary={t('core:openInWindow')} />
- </MenuItem>
+ </MenuItem>,
);
}
} else if (reloadDirectory) {
@@ -105,7 +105,7 @@ export function getDirectoryMenuItems(
<ReloadIcon />
</ListItemIcon>
<ListItemText primary={t('core:reloadDirectory')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (!isReadOnlyMode && showRenameDirectoryDialog) {
@@ -122,7 +122,7 @@ export function getDirectoryMenuItems(
<RenameFolderIcon />
</ListItemIcon>
<ListItemText primary={t('core:renameDirectory')} />
- </MenuItem>
+ </MenuItem>,
);
}
}
@@ -146,7 +146,7 @@ export function getDirectoryMenuItems(
<MoveCopy />
</ListItemIcon>
<ListItemText primary={t('core:moveCopyDirectory')} />
- </MenuItem>
+ </MenuItem>,
);
}
@@ -164,7 +164,7 @@ export function getDirectoryMenuItems(
<DeleteIcon />
</ListItemIcon>
<ListItemText primary={t('core:deleteDirectory')} />
- </MenuItem>
+ </MenuItem>,
);
}
@@ -190,7 +190,7 @@ export function getDirectoryMenuItems(
<OpenFolderNativelyIcon />
</ListItemIcon>
<ListItemText primary={t('core:showInFileManager')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (!isReadOnlyMode && !perspectiveMode) {
@@ -209,7 +209,7 @@ export function getDirectoryMenuItems(
<NewFileIcon />
</ListItemIcon>
<ListItemText primary={t('core:newFileNote')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (Pro && createNewAudio) {
@@ -233,7 +233,7 @@ export function getDirectoryMenuItems(
</>
}
/>
- </MenuItem>
+ </MenuItem>,
);
}
if (showCreateDirectoryDialog) {
@@ -250,7 +250,7 @@ export function getDirectoryMenuItems(
<NewFolderIcon />
</ListItemIcon>
<ListItemText primary={t('core:newSubdirectory')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (addExistingFile) {
@@ -267,7 +267,7 @@ export function getDirectoryMenuItems(
<AddExistingFileIcon />
</ListItemIcon>
<ListItemText primary={t('core:addFiles')} />
- </MenuItem>
+ </MenuItem>,
);
}
}
@@ -291,7 +291,7 @@ export function getDirectoryMenuItems(
<ImageIcon />
</ListItemIcon>
<ListItemText primary={t('core:setAsParentFolderThumbnail')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (selectedEntriesLength === 1 && copySharingLink) {
@@ -308,7 +308,7 @@ export function getDirectoryMenuItems(
<LinkIcon />
</ListItemIcon>
<ListItemText primary={t('core:copySharingLink')} />
- </MenuItem>
+ </MenuItem>,
);
}
@@ -326,7 +326,7 @@ export function getDirectoryMenuItems(
<AddRemoveTags />
</ListItemIcon>
<ListItemText primary={t('core:addRemoveTags')} />
- </MenuItem>
+ </MenuItem>,
);
}
@@ -356,7 +356,7 @@ export function getDirectoryMenuItems(
</>
}
/>
- </MenuItem>
+ </MenuItem>,
);
}
@@ -375,12 +375,12 @@ export function getDirectoryMenuItems(
<AddExistingFileIcon />
</ListItemIcon>
<ListItemText primary={t('core:cameraTakePicture')} />
- </MenuItem>
+ </MenuItem>,
);
}
if (!perspectiveMode && switchPerspective) {
menuItems.push(<Divider key="divider2" />);
- AvailablePerspectives.forEach(perspective => {
+ AvailablePerspectives.forEach((perspective) => {
let badge = <></>;
if (!Pro && perspective.pro) {
badge = <ProLabel />;
@@ -409,7 +409,7 @@ export function getDirectoryMenuItems(
</>
}
/>
- </MenuItem>
+ </MenuItem>,
);
});
}
@@ -429,7 +429,7 @@ export function getDirectoryMenuItems(
<PropertiesIcon />
</ListItemIcon>
<ListItemText primary={t('core:directoryPropertiesTitle')} />
- </MenuItem>
+ </MenuItem>,
);
}
return menuItems;
diff --git a/app/perspectives/common/main-container.tsx b/app/perspectives/common/main-container.tsx
index e99cea2bb..d8e556273 100644
--- a/app/perspectives/common/main-container.tsx
+++ b/app/perspectives/common/main-container.tsx
@@ -8,22 +8,22 @@ import PlatformIO from '-/services/platform-facade';
import AppConfig from '-/AppConfig';
import TagDropContainer from '-/components/TagDropContainer';
-export const fileOperationsEnabled = selectedEntries => {
+export const fileOperationsEnabled = (selectedEntries) => {
let selectionContainsDirectories = false;
if (selectedEntries && selectedEntries.length > 0) {
selectionContainsDirectories = selectedEntries.some(
- entry => entry !== undefined && !entry.isFile
+ (entry) => entry !== undefined && !entry.isFile,
);
return !selectionContainsDirectories;
}
return false;
};
-export const folderOperationsEnabled = selectedEntries => {
+export const folderOperationsEnabled = (selectedEntries) => {
let selectionContainsFiles = false;
if (selectedEntries && selectedEntries.length > 0) {
selectionContainsFiles = selectedEntries.some(
- entry => entry !== undefined && entry.isFile
+ (entry) => entry !== undefined && entry.isFile,
);
}
return !selectionContainsFiles;
@@ -38,11 +38,11 @@ export const renderCell = (
index: number,
handleGridContextMenu: (
event: React.MouseEvent<HTMLDivElement>,
- fsEntry: TS.FileSystemEntry
+ fsEntry: TS.FileSystemEntry,
) => void,
handleGridCellClick,
handleGridCellDblClick,
- isLast?: boolean
+ isLast?: boolean,
) => any,
showDirectories: boolean,
isReadOnlyMode: boolean,
@@ -61,11 +61,11 @@ export const renderCell = (
showNotification: (
text: string,
notificationType: string,
- autohide: boolean
+ autohide: boolean,
) => void,
moveFiles: (files: Array<string>, destination: string) => Promise<boolean>,
clearSelection: () => void,
- isLast?: boolean
+ isLast?: boolean,
) => {
if (!fsEntry.isFile && !showDirectories) {
return;
@@ -77,7 +77,7 @@ export const renderCell = (
// setMouseX(event.clientX);
// setMouseY(event.clientY);
const isEntryExist = selectedEntries.some(
- entry => entry.uuid === fsEntry.uuid
+ (entry) => entry.uuid === fsEntry.uuid,
);
if (fsEntry.isFile) {
if (!desktopMode) {
@@ -100,8 +100,8 @@ export const renderCell = (
} else if (isEntryExist) {
// update selected entry
setSelectedEntries([
- ...selectedEntries.filter(entry => entry.uuid !== fsEntry.uuid),
- fsEntry
+ ...selectedEntries.filter((entry) => entry.uuid !== fsEntry.uuid),
+ fsEntry,
]);
} else {
setSelectedEntries([fsEntry]);
@@ -116,8 +116,8 @@ export const renderCell = (
} else if (isEntryExist) {
// update selected entry
setSelectedEntries([
- ...selectedEntries.filter(entry => entry.uuid !== fsEntry.uuid),
- fsEntry
+ ...selectedEntries.filter((entry) => entry.uuid !== fsEntry.uuid),
+ fsEntry,
]);
} else {
setSelectedEntries([fsEntry]);
@@ -146,7 +146,7 @@ export const renderCell = (
openLocation(fsEntry);
return true;
})
- .catch(error => {
+ .catch((error) => {
console.log('enableObjectStoreSupport', error);
});
} else if (currentLocation.type === locationType.TYPE_WEBDAV) {
@@ -171,11 +171,11 @@ export const renderCell = (
let lastSelectedIndex;
if (lastSelectedEntryPath) {
lastSelectedIndex = directoryContent.findIndex(
- entry => entry.path === lastSelectedEntryPath
+ (entry) => entry.path === lastSelectedEntryPath,
);
}
const currentSelectedIndex = directoryContent.findIndex(
- entry => entry.path === fsEntry.path
+ (entry) => entry.path === fsEntry.path,
);
if (lastSelectedIndex < 0) {
lastSelectedIndex = currentSelectedIndex;
@@ -186,7 +186,7 @@ export const renderCell = (
if (currentSelectedIndex > lastSelectedIndex) {
entriesToSelect = directoryContent.slice(
lastSelectedIndex,
- currentSelectedIndex + 1
+ currentSelectedIndex + 1,
);
} else if (currentSelectedIndex < lastSelectedIndex) {
entriesToSelect = directoryContent
@@ -200,11 +200,11 @@ export const renderCell = (
} else if (event.type === 'drag') {
if (
selectedEntries &&
- selectedEntries.some(entry => entry.path === fsEntry.path)
+ selectedEntries.some((entry) => entry.path === fsEntry.path)
) {
} else {
const currentSelectedEntry = directoryContent.find(
- entry => entry.path === fsEntry.path
+ (entry) => entry.path === fsEntry.path,
);
if (currentSelectedEntry) {
// in KanBan directoryContent not content dragging entry from subfolder
@@ -214,10 +214,10 @@ export const renderCell = (
} else if (selectHelperKey) {
if (
selectedEntries &&
- selectedEntries.some(entry => entry.path === fsEntry.path)
+ selectedEntries.some((entry) => entry.path === fsEntry.path)
) {
setSelectedEntries(
- selectedEntries.filter(entry => entry.path !== fsEntry.path)
+ selectedEntries.filter((entry) => entry.path !== fsEntry.path),
); // deselect selected entry
} else {
setSelectedEntries([...selectedEntries, fsEntry]);
@@ -239,7 +239,7 @@ export const renderCell = (
showNotification(
'Importing files is disabled because the location is in read-only mode.',
'error',
- true
+ true,
); //i18n.t('core:dndDisabledReadOnlyMode')
return;
}
@@ -248,9 +248,9 @@ export const renderCell = (
let arrPath;
if (mItem.selectedEntries && mItem.selectedEntries.length > 0) {
const arrSelected = mItem.selectedEntries
- .map(entry => entry.path)
+ .map((entry) => entry.path)
// remove target folder selection
- .filter(epath => epath !== item.path);
+ .filter((epath) => epath !== item.path);
if (arrSelected.length > 0) {
arrPath = arrSelected;
} else {
@@ -277,7 +277,7 @@ export const renderCell = (
handleGridContextMenu,
handleGridCellClick,
handleGridCellDblClick,
- isLast
+ isLast,
)}
</FileSourceDnd>
);
@@ -286,7 +286,7 @@ export const renderCell = (
return (
<div
style={{
- position: 'relative'
+ position: 'relative',
}}
key={key}
>
@@ -302,7 +302,7 @@ export const renderCell = (
handleGridContextMenu,
handleGridCellClick,
handleGridCellDblClick,
- isLast
+ isLast,
)}
</TargetMoveFileBox>
</div>
@@ -313,7 +313,7 @@ export const renderCellPlaceholder = () => {
return (
<div
style={{
- position: 'relative'
+ position: 'relative',
}}
>
<TagDropContainer entryPath="">
diff --git a/app/perspectives/grid-perspective/components/CellContent.tsx b/app/perspectives/grid-perspective/components/CellContent.tsx
index 43533af30..f149b7e72 100644
--- a/app/perspectives/grid-perspective/components/CellContent.tsx
+++ b/app/perspectives/grid-perspective/components/CellContent.tsx
@@ -29,17 +29,17 @@ import IconButton from '@mui/material/IconButton';
import { SelectedIcon, UnSelectedIcon } from '-/components/CommonIcons';
import {
formatFileSize,
- formatDateTime
+ formatDateTime,
} from '@tagspaces/tagspaces-common/misc';
import {
extractTagsAsObjects,
- extractTitle
+ extractTitle,
} from '@tagspaces/tagspaces-common/paths';
import AppConfig from '-/AppConfig';
import {
findBackgroundColorForFolder,
findColorForEntry,
- getDescriptionPreview
+ getDescriptionPreview,
} from '-/services/utils-io';
import TagContainerDnd from '-/components/TagContainerDnd';
import TagContainer from '-/components/TagContainer';
@@ -50,18 +50,18 @@ import { TS } from '-/tagspaces.namespace';
import {
actions as AppActions,
AppDispatch,
- getLastThumbnailImageChange
+ getLastThumbnailImageChange,
} from '-/reducers/app';
import { FolderIcon } from '-/components/CommonIcons';
import { dataTidFormat } from '-/services/test';
import {
getSupportedFileTypes,
isDesktopMode,
- isReorderTags
+ isReorderTags,
} from '-/reducers/settings';
import {
classes,
- GridStyles
+ GridStyles,
} from '-/perspectives/grid-perspective/components/styles.css';
import { useTranslation } from 'react-i18next';
import { useTaggingActionsContext } from '-/hooks/useTaggingActionsContext';
@@ -103,7 +103,7 @@ function CellContent(props: Props) {
showTags,
selectEntry,
deselectEntry,
- isLast
+ isLast,
} = props;
const { t } = useTranslation();
@@ -125,7 +125,7 @@ function CellContent(props: Props) {
const handleAddTags = (
paths: Array<string>,
tags: Array<TS.Tag>,
- updateIndex?
+ updateIndex?,
) => {
addTags(paths, tags, updateIndex);
};
@@ -136,13 +136,13 @@ function CellContent(props: Props) {
// remove isNewFile on Cell click it will open file in editMode
const fSystemEntry: TS.FileSystemEntry = (({ isNewFile, ...o }) => o)(
- fsEntry
+ fsEntry,
);
const entryTitle = extractTitle(
fSystemEntry.name,
!fSystemEntry.isFile,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
let description;
@@ -151,7 +151,7 @@ function CellContent(props: Props) {
if (description && description.length > maxDescriptionPreviewLength) {
description = getDescriptionPreview(
description,
- maxDescriptionPreviewLength
+ maxDescriptionPreviewLength,
);
}
@@ -162,7 +162,7 @@ function CellContent(props: Props) {
const fileSystemEntryColor = findColorForEntry(
fSystemEntry,
- supportedFileTypes
+ supportedFileTypes,
);
const fileSystemEntryBgColor = findBackgroundColorForFolder(fSystemEntry);
@@ -171,15 +171,15 @@ function CellContent(props: Props) {
fileNameTags = extractTagsAsObjects(
fSystemEntry.name,
AppConfig.tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
}
const fileSystemEntryTags = fSystemEntry.tags ? fSystemEntry.tags : [];
- const sideCarTagsTitles = fileSystemEntryTags.map(tag => tag.title);
+ const sideCarTagsTitles = fileSystemEntryTags.map((tag) => tag.title);
const entryTags = [
...fileSystemEntryTags,
- ...fileNameTags.filter(tag => !sideCarTagsTitles.includes(tag.title))
+ ...fileNameTags.filter((tag) => !sideCarTagsTitles.includes(tag.title)),
];
const entrySizeFormatted =
@@ -201,7 +201,7 @@ function CellContent(props: Props) {
let tagTitles = '';
if (entryTags) {
- entryTags.map(tag => {
+ entryTags.map((tag) => {
tagTitles += tag.title + ', ';
return true;
});
@@ -219,7 +219,7 @@ function CellContent(props: Props) {
data-tid={'fsEntryName_' + dataTidFormat(fSystemEntry.name)}
style={{
background: fileSystemEntryBgColor,
- borderRadius: 5
+ borderRadius: 5,
// opacity: fileSystemEntry.isIgnored ? 0.3 : 1
}}
>
@@ -227,7 +227,7 @@ function CellContent(props: Props) {
className={classes.gridCellThumb}
style={{
position: 'relative',
- height: 150
+ height: 150,
}}
>
{fSystemEntry.thumbPath ? (
@@ -245,13 +245,13 @@ function CellContent(props: Props) {
: '')
}
// @ts-ignore
- onError={i => (i.target.style.display = 'none')}
+ onError={(i) => (i.target.style.display = 'none')}
loading="lazy"
style={{
objectFit: thumbnailMode,
position: 'absolute',
width: '100%',
- height: 150
+ height: 150,
}}
/>
) : (
@@ -264,17 +264,17 @@ function CellContent(props: Props) {
<IconButton
style={{
opacity: selected ? 1 : 0.5,
- padding: desktopMode ? 5 : 8
+ padding: desktopMode ? 5 : 8,
}}
- onMouseLeave={e => {
+ onMouseLeave={(e) => {
//@ts-ignore
e.target.style.opacity = selected ? 1 : 0.5;
}}
- onMouseOver={e => {
+ onMouseOver={(e) => {
//@ts-ignore
e.target.style.opacity = 1;
}}
- onClick={e => {
+ onClick={(e) => {
e.stopPropagation();
if (selected) {
deselectEntry(fSystemEntry);
@@ -288,7 +288,7 @@ function CellContent(props: Props) {
style={{
opacity: 1,
borderRadius: 15,
- backgroundColor: '#d7d7d7'
+ backgroundColor: '#d7d7d7',
}}
/>
) : (
@@ -296,7 +296,7 @@ function CellContent(props: Props) {
style={{
opacity: 0.7,
borderRadius: 15,
- backgroundColor: 'd7d7d7'
+ backgroundColor: 'd7d7d7',
}}
/>
)}
@@ -326,7 +326,7 @@ function CellContent(props: Props) {
backgroundColor: fileSystemEntryColor,
textShadow: '1px 1px #8f8f8f',
textOverflow: 'unset',
- maxWidth: fSystemEntry.isFile ? 50 : 100
+ maxWidth: fSystemEntry.isFile ? 50 : 100,
}}
noWrap={true}
variant="button"
@@ -379,7 +379,7 @@ function CellContent(props: Props) {
padding: 3,
marginRight: 5,
textAlign: 'left',
- display: 'flex'
+ display: 'flex',
}}
>
<div
@@ -399,10 +399,10 @@ function CellContent(props: Props) {
overflow: 'hidden',
textOverflow: 'ellipsis',
backgroundColor: fileSystemEntryColor,
- alignItems: 'center'
+ alignItems: 'center',
}}
role="button"
- onClick={e => {
+ onClick={(e) => {
e.stopPropagation();
if (selected) {
deselectEntry(fSystemEntry);
@@ -418,7 +418,7 @@ function CellContent(props: Props) {
width: '100%',
marginTop: isSmall ? 0 : 10,
textShadow: '1px 1px #8f8f8f',
- overflowWrap: 'anywhere'
+ overflowWrap: 'anywhere',
}}
>
{fSystemEntry.extension}
@@ -434,7 +434,7 @@ function CellContent(props: Props) {
xs
zeroMinWidth
style={{
- display: 'flex'
+ display: 'flex',
}}
>
<Typography style={{ wordBreak: 'break-all', alignSelf: 'center' }}>
@@ -455,7 +455,7 @@ function CellContent(props: Props) {
{showTags && entryTags ? renderTags : tagPlaceholder}
<Typography
style={{
- color: 'gray'
+ color: 'gray',
}}
variant="body2"
>
@@ -493,14 +493,14 @@ function CellContent(props: Props) {
: '')
}
// @ts-ignore
- onError={i => (i.target.style.display = 'none')}
+ onError={(i) => (i.target.style.display = 'none')}
loading="lazy"
style={{
objectFit: thumbnailMode,
paddingRight: 4,
paddingTop: 4,
height: tmbSize,
- width: tmbSize
+ width: tmbSize,
}}
/>
</Grid>
@@ -562,24 +562,24 @@ function CellContent(props: Props) {
layoutType === 'grid' && classes.gridCell,
layoutType === 'row' && classes.rowCell,
selected && layoutType === 'grid' && classes.selectedGridCell,
- selected && layoutType === 'row' && classes.selectedRowCell
+ selected && layoutType === 'row' && classes.selectedRowCell,
)}
style={{
minHeight: layoutType === 'row' ? entryHeight : 'auto',
marginBottom: isLast ? 40 : 'auto',
- backgroundColor: theme.palette.background.default
+ backgroundColor: theme.palette.background.default,
}}
- onContextMenu={event => handleGridContextMenu(event, fSystemEntry)}
- onDoubleClick={event => {
+ onContextMenu={(event) => handleGridContextMenu(event, fSystemEntry)}
+ onDoubleClick={(event) => {
handleGridCellDblClick(event, fSystemEntry);
}}
- onClick={event => {
+ onClick={(event) => {
event.stopPropagation();
AppConfig.isCordovaiOS // TODO DoubleClick not fired in Cordova IOS
? handleGridCellDblClick(event, fSystemEntry)
: handleGridCellClick(event, fSystemEntry);
}}
- onDrag={event => {
+ onDrag={(event) => {
handleGridCellClick(event, fSystemEntry);
}}
>
diff --git a/app/perspectives/grid-perspective/components/GridOptionsMenu.tsx b/app/perspectives/grid-perspective/components/GridOptionsMenu.tsx
index 8bba980e9..125e481f1 100644
--- a/app/perspectives/grid-perspective/components/GridOptionsMenu.tsx
+++ b/app/perspectives/grid-perspective/components/GridOptionsMenu.tsx
@@ -66,7 +66,7 @@ function GridOptionsMenu(props: Props) {
entrySize,
singleClickAction,
openHelpWebPage,
- openSettings
+ openSettings,
} = props;
const { t } = useTranslation();
diff --git a/app/perspectives/grid-perspective/components/GridPagination.tsx b/app/perspectives/grid-perspective/components/GridPagination.tsx
index 42b61799b..f8288e2b9 100644
--- a/app/perspectives/grid-perspective/components/GridPagination.tsx
+++ b/app/perspectives/grid-perspective/components/GridPagination.tsx
@@ -29,7 +29,7 @@ import AppConfig from '-/AppConfig';
import { extractDirectoryName } from '@tagspaces/tagspaces-common/paths';
import {
getLastBackgroundImageChange,
- getLastThumbnailImageChange
+ getLastThumbnailImageChange,
} from '-/reducers/app';
import EntryIcon from '-/components/EntryIcon';
import TagsPreview from '-/components/TagsPreview';
@@ -38,7 +38,7 @@ import { TS } from '-/tagspaces.namespace';
import {
getDescriptionPreview,
getFolderThumbPath,
- getFolderBgndPath
+ getFolderBgndPath,
} from '-/services/utils-io';
import PlatformIO from '-/services/platform-facade';
import { MilkdownEditor } from '@tagspaces/tagspaces-md';
@@ -74,7 +74,7 @@ interface Props {
handleGridContextMenu,
handleGridCellClick,
handleGridCellDblClick,
- isLast?: boolean
+ isLast?: boolean,
) => void;
gridPageLimit: number;
currentDirectoryPath: string;
@@ -117,7 +117,7 @@ function GridPagination(props: Props) {
selectedEntries,
setSelectedEntries,
clearSelection,
- files
+ files,
} = props;
const { lastSelectedEntryPath } = useSelectedEntriesContext();
const { openEntry } = useOpenedEntryContext();
@@ -125,11 +125,8 @@ function GridPagination(props: Props) {
const { openFileNatively } = useFsActionsContext();
const { showNotification } = useNotificationContext();
const { readOnlyMode, currentLocation } = useCurrentLocationContext();
- const {
- currentDirectoryEntries,
- openDirectory,
- directoryMeta
- } = useDirectoryContentContext();
+ const { currentDirectoryEntries, openDirectory, directoryMeta } =
+ useDirectoryContentContext();
const { page, pageFiles, setCurrentPage } = usePaginationContext();
if (!showDirectories) {
directories = [];
@@ -143,19 +140,19 @@ function GridPagination(props: Props) {
const containerEl = useRef(null);
const folderTmbPath = useRef<string>(
- getFolderThumbPath(currentDirectoryPath, lastThumbnailImageChange)
+ getFolderThumbPath(currentDirectoryPath, lastThumbnailImageChange),
);
const folderBgndPath = useRef<string>(
- getFolderBgndPath(currentDirectoryPath, lastBackgroundImageChange)
+ getFolderBgndPath(currentDirectoryPath, lastBackgroundImageChange),
);
- const [, forceUpdate] = useReducer(x => x + 1, 0);
+ const [, forceUpdate] = useReducer((x) => x + 1, 0);
// TODO move in DirectoryContentContextProvider
useEffect(() => {
folderTmbPath.current = getFolderThumbPath(
props.currentDirectoryPath,
- props.lastThumbnailImageChange
+ props.lastThumbnailImageChange,
);
forceUpdate();
}, [props.currentDirectoryPath, props.lastThumbnailImageChange]);
@@ -163,7 +160,7 @@ function GridPagination(props: Props) {
useEffect(() => {
folderBgndPath.current = getFolderBgndPath(
props.currentDirectoryPath,
- props.lastBackgroundImageChange
+ props.lastBackgroundImageChange,
);
forceUpdate();
}, [props.currentDirectoryPath, props.lastBackgroundImageChange]);
@@ -183,7 +180,7 @@ function GridPagination(props: Props) {
const folderName = extractDirectoryName(
props.currentDirectoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const dirColor = directoryMeta.color || 'transparent';
@@ -201,7 +198,7 @@ function GridPagination(props: Props) {
<div
style={{
height: '100%',
- background: `${dirColor}`
+ background: `${dirColor}`,
}}
>
<div
@@ -217,7 +214,7 @@ function GridPagination(props: Props) {
overflowY: 'auto',
backgroundImage: 'url("' + folderBgndPath.current + '")',
backgroundSize: 'cover',
- backgroundRepeat: 'no-repeat'
+ backgroundRepeat: 'no-repeat',
}}
>
<Grid container spacing={2}>
@@ -232,7 +229,7 @@ function GridPagination(props: Props) {
marginBottom: 0,
height:
!showDescription && directoryMeta.description ? 150 : 110,
- position: 'relative'
+ position: 'relative',
}}
>
{((folderName && folderName.length > 0) ||
@@ -249,7 +246,7 @@ function GridPagination(props: Props) {
width: 'fit-content',
background: theme.palette.background.default,
borderRadius: 8,
- color: theme.palette.text.primary
+ color: theme.palette.text.primary,
}}
>
<Tooltip
@@ -288,12 +285,12 @@ function GridPagination(props: Props) {
padding: 10,
borderRadius: 10,
width: 'fit-content',
- color: theme.palette.text.primary
+ color: theme.palette.text.primary,
}}
>
<Typography
style={{
- fontSize: '0.9rem'
+ fontSize: '0.9rem',
}}
>
{folderSummary}
@@ -304,7 +301,7 @@ function GridPagination(props: Props) {
fontSize: '0.8rem',
wordBreak: 'break-all',
height: 45,
- overflowY: 'auto'
+ overflowY: 'auto',
}}
>
{getDescriptionPreview(directoryMeta.description, 200)}
@@ -323,7 +320,7 @@ function GridPagination(props: Props) {
backgroundPosition: 'center center',
position: 'absolute',
top: 0,
- right: 0
+ right: 0,
}}
></div>
{/* </Tooltip> */}
@@ -340,7 +337,7 @@ function GridPagination(props: Props) {
marginLeft: 25,
marginRight: 10,
padding: 10,
- borderRadius: 10
+ borderRadius: 10,
}}
>
<MilkdownEditor
@@ -376,8 +373,8 @@ function GridPagination(props: Props) {
setDirContextMenuAnchorEl,
showNotification,
moveFiles,
- clearSelection
- )
+ clearSelection,
+ ),
)}
{pageFiles.map((entry, index, dArray) =>
renderCell(
@@ -401,8 +398,8 @@ function GridPagination(props: Props) {
showNotification,
moveFiles,
clearSelection,
- index === dArray.length - 1
- )
+ index === dArray.length - 1,
+ ),
)}
{pageFiles.length < 1 && directories.length < 1 && (
<div style={{ textAlign: 'center' }}>
@@ -423,25 +420,27 @@ function GridPagination(props: Props) {
)}
</div>
)}
- {pageFiles.length < 1 && directories.length >= 1 && !showDirectories && (
- <div style={{ textAlign: 'center' }}>
- {!showDescription && directoryMeta.description && (
- <div style={{ position: 'relative', marginBottom: 150 }}>
- <EntryIcon isFile={false} />
- </div>
- )}
- <Typography
- style={{ padding: 15, color: theme.palette.text.secondary }}
- >
- {t('core:noFileButFoldersFound')}
- </Typography>
- {!AppConfig.isCordova && (
- <Typography style={{ color: theme.palette.text.secondary }}>
- {t('core:dragAndDropToImport')}
+ {pageFiles.length < 1 &&
+ directories.length >= 1 &&
+ !showDirectories && (
+ <div style={{ textAlign: 'center' }}>
+ {!showDescription && directoryMeta.description && (
+ <div style={{ position: 'relative', marginBottom: 150 }}>
+ <EntryIcon isFile={false} />
+ </div>
+ )}
+ <Typography
+ style={{ padding: 15, color: theme.palette.text.secondary }}
+ >
+ {t('core:noFileButFoldersFound')}
</Typography>
- )}
- </div>
- )}
+ {!AppConfig.isCordova && (
+ <Typography style={{ color: theme.palette.text.secondary }}>
+ {t('core:dragAndDropToImport')}
+ </Typography>
+ )}
+ </div>
+ )}
</div>
{showPagination && (
<Tooltip title={folderSummary}>
@@ -455,7 +454,7 @@ function GridPagination(props: Props) {
opacity: 0.97,
border: '1px solid lightgray',
borderRadius: 5,
- padding: 3
+ padding: 3,
}}
count={paginationCount}
page={page}
@@ -470,7 +469,7 @@ function GridPagination(props: Props) {
<Typography
style={{
fontSize: '0.9rem',
- color: theme.palette.text.primary
+ color: theme.palette.text.primary,
}}
>
{folderSummary}
@@ -485,7 +484,7 @@ function GridPagination(props: Props) {
function mapStateToProps(state) {
return {
lastBackgroundImageChange: getLastBackgroundImageChange(state),
- lastThumbnailImageChange: getLastThumbnailImageChange(state)
+ lastThumbnailImageChange: getLastThumbnailImageChange(state),
};
}
diff --git a/app/perspectives/grid-perspective/components/GridSettingsDialog.tsx b/app/perspectives/grid-perspective/components/GridSettingsDialog.tsx
index e854f77f5..bfb14951c 100644
--- a/app/perspectives/grid-perspective/components/GridSettingsDialog.tsx
+++ b/app/perspectives/grid-perspective/components/GridSettingsDialog.tsx
@@ -33,7 +33,7 @@ import {
Button,
FormHelperText,
Typography,
- TextField
+ TextField,
} from '@mui/material';
import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
@@ -118,13 +118,13 @@ function GridSettingsDialog(props: Props) {
toggleThumbnailsMode,
changeEntrySize,
changeSingleClickAction,
- openHelpWebPage
+ openHelpWebPage,
} = props;
let newGridPageLimit = gridPageLimit;
const handleGridPaginationLimit = (
- event: React.ChangeEvent<HTMLInputElement>
+ event: React.ChangeEvent<HTMLInputElement>,
) => {
const { target } = event;
const { value, name } = target;
@@ -263,7 +263,7 @@ function GridSettingsDialog(props: Props) {
data-tid="sortByMenuTID"
title={t('core:sortBy')}
aria-label={t('core:sortBy')}
- onClick={e => {
+ onClick={(e) => {
props.handleSortingMenu(e);
}}
>
diff --git a/app/perspectives/grid-perspective/components/MainContainer.tsx b/app/perspectives/grid-perspective/components/MainContainer.tsx
index 3600ed9ec..b7bcf59bd 100644
--- a/app/perspectives/grid-perspective/components/MainContainer.tsx
+++ b/app/perspectives/grid-perspective/components/MainContainer.tsx
@@ -73,27 +73,16 @@ function GridPerspective(props: Props) {
const { openRenameEntryDialog } = props;
const { openEntry, openPrevFile, openNextFile } = useOpenedEntryContext();
- const {
- directoryMeta,
- currentDirectoryPath,
- setDirectoryMeta
- } = useDirectoryContentContext();
+ const { directoryMeta, currentDirectoryPath, setDirectoryMeta } =
+ useDirectoryContentContext();
const { openFileNatively } = useFsActionsContext();
const dispatch: AppDispatch = useDispatch();
- const {
- sortedDirContent,
- sortBy,
- orderBy,
- setSortBy,
- setOrderBy
- } = useSortedDirContext();
+ const { sortedDirContent, sortBy, orderBy, setSortBy, setOrderBy } =
+ useSortedDirContext();
const desktopMode = useSelector(getDesktopMode);
- const {
- selectedEntries,
- setSelectedEntries,
- lastSelectedEntryPath
- } = useSelectedEntriesContext();
+ const { selectedEntries, setSelectedEntries, lastSelectedEntryPath } =
+ useSelectedEntriesContext();
const keyBindings = useSelector(getKeyBindingObject);
//const searchFilter: string = useSelector(getSearchFilter);
/*const editedEntryPaths: Array<TS.EditedEntryPath> = useSelector(
@@ -104,7 +93,7 @@ function GridPerspective(props: Props) {
const handleSetSelectedEntries = (entries: Array<TS.FileSystemEntry>) => {
const selected = showDirectories.current
? entries
- : entries.filter(entry => entry.isFile);
+ : entries.filter((entry) => entry.isFile);
setSelectedEntries(selected);
};
@@ -123,29 +112,18 @@ function GridPerspective(props: Props) {
const selectedEntryPath = useRef<string>(undefined);
const selectedTag = useRef<TS.Tag | null>(null);
const perspectiveMode = useRef<boolean>(true);
- const [
- fileContextMenuAnchorEl,
- setFileContextMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [
- dirContextMenuAnchorEl,
- setDirContextMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [
- tagContextMenuAnchorEl,
- setTagContextMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [
- sortingContextMenuAnchorEl,
- setSortingContextMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [
- optionsContextMenuAnchorEl,
- setOptionsContextMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [isAddTagDialogOpened, setIsAddTagDialogOpened] = useState<TS.Tag>(
- undefined
- );
+ const [fileContextMenuAnchorEl, setFileContextMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [dirContextMenuAnchorEl, setDirContextMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [tagContextMenuAnchorEl, setTagContextMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [sortingContextMenuAnchorEl, setSortingContextMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [optionsContextMenuAnchorEl, setOptionsContextMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [isAddTagDialogOpened, setIsAddTagDialogOpened] =
+ useState<TS.Tag>(undefined);
/*const sortBy = useRef<string>(
settings && settings.sortBy ? settings.sortBy : defaultSettings.sortBy
);
@@ -157,70 +135,64 @@ function GridPerspective(props: Props) {
const layoutType = useRef<string>(
settings && settings.layoutType
? settings.layoutType
- : defaultSettings.layoutType
+ : defaultSettings.layoutType,
);
const singleClickAction = useRef<string>(
settings && settings.singleClickAction
? settings.singleClickAction
- : defaultSettings.singleClickAction
+ : defaultSettings.singleClickAction,
);
const entrySize = useRef<string>(
settings && settings.entrySize
? settings.entrySize
- : defaultSettings.entrySize
+ : defaultSettings.entrySize,
);
const thumbnailMode = useRef<string>(
settings && settings.thumbnailMode
? settings.thumbnailMode
- : defaultSettings.thumbnailMode
+ : defaultSettings.thumbnailMode,
);
const showDirectories = useRef<boolean>(
settings && typeof settings.showDirectories !== 'undefined'
? settings.showDirectories
- : defaultSettings.showDirectories
+ : defaultSettings.showDirectories,
);
const showDetails = useRef<boolean>(
settings && typeof settings.showDetails !== 'undefined'
? settings.showDetails
- : defaultSettings.showDetails
+ : defaultSettings.showDetails,
);
const showDescription = useRef<boolean>(
settings && typeof settings.showDescription !== 'undefined'
? settings.showDescription
- : defaultSettings.showDescription
+ : defaultSettings.showDescription,
);
const showEntriesDescription = useRef<boolean>(
settings && typeof settings.showEntriesDescription !== 'undefined'
? settings.showEntriesDescription
- : defaultSettings.showEntriesDescription
+ : defaultSettings.showEntriesDescription,
);
const showTags = useRef<boolean>(
settings && typeof settings.showTags !== 'undefined'
? settings.showTags
- : defaultSettings.showTags
+ : defaultSettings.showTags,
);
- const [
- isMoveCopyFilesDialogOpened,
- setIsMoveCopyFilesDialogOpened
- ] = useState<boolean>(false);
- const [isShareFilesDialogOpened, setIsShareFilesDialogOpened] = useState<
- boolean
- >(false);
- const [
- isAddRemoveTagsDialogOpened,
- setIsAddRemoveTagsDialogOpened
- ] = useState<boolean>(false);
- const [isGridSettingsDialogOpened, setIsGridSettingsDialogOpened] = useState<
- boolean
- >(false);
+ const [isMoveCopyFilesDialogOpened, setIsMoveCopyFilesDialogOpened] =
+ useState<boolean>(false);
+ const [isShareFilesDialogOpened, setIsShareFilesDialogOpened] =
+ useState<boolean>(false);
+ const [isAddRemoveTagsDialogOpened, setIsAddRemoveTagsDialogOpened] =
+ useState<boolean>(false);
+ const [isGridSettingsDialogOpened, setIsGridSettingsDialogOpened] =
+ useState<boolean>(false);
const gridPageLimit = useRef<number>(
settings && settings.gridPageLimit
? settings.gridPageLimit
- : defaultSettings.gridPageLimit
+ : defaultSettings.gridPageLimit,
);
// true: save in default settings; false: save per folder settings; undefined - dont save changes
const isDefaultSetting = useRef<boolean>(undefined);
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0, undefined);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0, undefined);
const firstRender = useFirstRender();
useEffect(() => {
@@ -257,12 +229,12 @@ function GridPerspective(props: Props) {
setOrderBy(
perspectiveSettings && perspectiveSettings.orderBy !== undefined
? perspectiveSettings.orderBy
- : defaultSettings.orderBy
+ : defaultSettings.orderBy,
);
setSortBy(
perspectiveSettings && perspectiveSettings.sortBy !== undefined
? perspectiveSettings.sortBy
- : defaultSettings.sortBy
+ : defaultSettings.sortBy,
);
singleClickAction.current =
perspectiveSettings &&
@@ -299,20 +271,20 @@ function GridPerspective(props: Props) {
singleClickAction: singleClickAction.current,
entrySize: entrySize.current,
thumbnailMode: thumbnailMode.current,
- gridPageLimit: gridPageLimit.current
+ gridPageLimit: gridPageLimit.current,
};
if (Pro && !isDefaultSetting.current) {
Pro.MetaOperations.savePerspectiveSettings(
currentDirectoryPath,
PerspectiveIDs.GRID,
- perspectiveSettings
+ perspectiveSettings,
).then((fsEntryMeta: TS.FileSystemEntryMeta) => {
setDirectoryMeta(fsEntryMeta);
});
} else {
localStorage.setItem(
defaultSettings.settingsKey,
- JSON.stringify(perspectiveSettings)
+ JSON.stringify(perspectiveSettings),
);
forceUpdate();
}
@@ -331,7 +303,7 @@ function GridPerspective(props: Props) {
singleClickAction.current,
entrySize.current,
thumbnailMode.current,
- gridPageLimit.current
+ gridPageLimit.current,
]);
/*if ( // for debugging skip first re-renders
@@ -345,7 +317,7 @@ function GridPerspective(props: Props) {
if (selectedEntries && selectedEntries.length > 0) {
try {
const firstSelectedElement = document.querySelector(
- '[data-entry-id="' + selectedEntries[0].uuid + '"]'
+ '[data-entry-id="' + selectedEntries[0].uuid + '"]',
);
if (
isObj(firstSelectedElement) &&
@@ -369,7 +341,7 @@ function GridPerspective(props: Props) {
// forceUpdate();
};
- const handleSortBy = handleSort => {
+ const handleSortBy = (handleSort) => {
if (sortBy !== handleSort) {
setSortBy(handleSort);
} else {
@@ -379,7 +351,7 @@ function GridPerspective(props: Props) {
setSortingContextMenuAnchorEl(null);
};
- const handleSortingMenu = event => {
+ const handleSortingMenu = (event) => {
const anchor = event ? event.currentTarget : null;
setSortingContextMenuAnchorEl(anchor);
};
@@ -442,13 +414,13 @@ function GridPerspective(props: Props) {
return thumbMode;
};
- const changeEntrySize = size => {
+ const changeEntrySize = (size) => {
closeOptionsMenu();
entrySize.current = size;
// forceUpdate();
};
- const changeSingleClickAction = singleClick => {
+ const changeSingleClickAction = (singleClick) => {
closeOptionsMenu();
singleClickAction.current = singleClick;
// forceUpdate();
@@ -467,7 +439,7 @@ function GridPerspective(props: Props) {
const handleTagMenu = (
event: React.ChangeEvent<HTMLInputElement>,
tag: TS.Tag,
- entryPath: string
+ entryPath: string,
) => {
event.preventDefault();
event.stopPropagation();
@@ -505,7 +477,7 @@ function GridPerspective(props: Props) {
addRemoveTags: keyBindings.addRemoveTags,
renameFile: keyBindings.renameFile,
openEntry: keyBindings.openEntry,
- openFileExternally: keyBindings.openFileExternally
+ openFileExternally: keyBindings.openFileExternally,
};
const onContextMenu = (event: React.MouseEvent<HTMLDivElement>) => {
@@ -543,17 +515,17 @@ function GridPerspective(props: Props) {
renameFile: () => {
openRenameEntryDialog();
},
- openEntry: e => {
+ openEntry: (e) => {
e.preventDefault();
openEntry();
},
openFileExternally: () => {
openFileNatively();
- }
+ },
};
- const sortedDirectories = sortedDirContent.filter(entry => !entry.isFile);
- const sortedFiles = sortedDirContent.filter(entry => entry.isFile);
+ const sortedDirectories = sortedDirContent.filter((entry) => !entry.isFile);
+ const sortedFiles = sortedDirContent.filter((entry) => entry.isFile);
/*const locationPath = currentLocation
? PlatformIO.getLocationPath(currentLocation)
: '';*/
@@ -572,16 +544,16 @@ function GridPerspective(props: Props) {
index: number,
handleGridContextMenu: (
event: React.MouseEvent<HTMLDivElement>,
- fsEntry: TS.FileSystemEntry
+ fsEntry: TS.FileSystemEntry,
) => void,
handleGridCellClick,
handleGridCellDblClick,
- isLast?: boolean
+ isLast?: boolean,
) => {
let selected = false;
if (
selectedEntries &&
- selectedEntries.some(entry => entry.path === fsEntry.path)
+ selectedEntries.some((entry) => entry.path === fsEntry.path)
) {
selected = true;
}
@@ -591,7 +563,7 @@ function GridPerspective(props: Props) {
const deselectEntry = (fsEntry: TS.FileSystemEntry) => {
const newSelection = selectedEntries.filter(
- data => data.path !== fsEntry.path
+ (data) => data.path !== fsEntry.path,
);
handleSetSelectedEntries(newSelection);
};
@@ -616,7 +588,7 @@ function GridPerspective(props: Props) {
showTags={showTags.current}
handleGridContextMenu={(
event: React.MouseEvent<HTMLDivElement>,
- fsEntry: TS.FileSystemEntry
+ fsEntry: TS.FileSystemEntry,
) => {
setMouseX(event.clientX);
setMouseY(event.clientY);
@@ -632,7 +604,7 @@ function GridPerspective(props: Props) {
return (
<div
style={{
- height: '100%' // 'calc(100% - 47px)'
+ height: '100%', // 'calc(100% - 47px)'
}}
data-tid={defaultSettings.testID}
>
@@ -662,7 +634,7 @@ function GridPerspective(props: Props) {
padding: 5,
paddingBottom: 70,
gridTemplateColumns:
- 'repeat(auto-fit,minmax(' + entryWidth + 'px,1fr))'
+ 'repeat(auto-fit,minmax(' + entryWidth + 'px,1fr))',
}}
directories={sortedDirectories}
showDetails={showDetails.current}
@@ -704,7 +676,7 @@ function GridPerspective(props: Props) {
{isGridSettingsDialogOpened && (
<GridSettingsDialog
open={isGridSettingsDialogOpened}
- onClose={isDefault => {
+ onClose={(isDefault) => {
setIsGridSettingsDialogOpened(false);
isDefaultSetting.current = isDefault;
}}
@@ -732,7 +704,7 @@ function GridPerspective(props: Props) {
resetLocalSettings={() => {
Pro.MetaOperations.savePerspectiveSettings(
currentDirectoryPath,
- PerspectiveIDs.GRID
+ PerspectiveIDs.GRID,
).then((fsEntryMeta: TS.FileSystemEntryMeta) => {
setDirectoryMeta(fsEntryMeta);
setIsGridSettingsDialogOpened(false);
diff --git a/app/perspectives/grid-perspective/components/MainToolbar.tsx b/app/perspectives/grid-perspective/components/MainToolbar.tsx
index 25029b38a..056eba6df 100644
--- a/app/perspectives/grid-perspective/components/MainToolbar.tsx
+++ b/app/perspectives/grid-perspective/components/MainToolbar.tsx
@@ -31,7 +31,7 @@ import ExportIcon from '@mui/icons-material/AssignmentReturn';
import {
ParentFolderIcon,
FolderPropertiesIcon,
- PerspectiveSettingsIcon
+ PerspectiveSettingsIcon,
} from '-/components/CommonIcons';
import AppConfig from '-/AppConfig';
import { Pro } from '-/pro';
@@ -41,7 +41,7 @@ import { TS } from '-/tagspaces.namespace';
import { actions as AppActions, AppDispatch } from '-/reducers/app';
import {
classes,
- GridStyles
+ GridStyles,
} from '-/perspectives/grid-perspective/components/styles.css';
import { useTranslation } from 'react-i18next';
import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';
@@ -70,15 +70,13 @@ function MainToolbar(props: Props) {
handleSortingMenu,
handleExportCsvMenu,
openSettings,
- openShareFilesDialog
+ openShareFilesDialog,
} = props;
const { t } = useTranslation();
const { openEntry } = useOpenedEntryContext();
- const {
- loadParentDirectoryContent,
- currentDirectoryPath
- } = useDirectoryContentContext();
+ const { loadParentDirectoryContent, currentDirectoryPath } =
+ useDirectoryContentContext();
const { selectedEntries } = useSelectedEntriesContext();
const keyBindings = useSelector(getKeyBindingObject);
const dispatch: AppDispatch = useDispatch();
@@ -224,7 +222,7 @@ function MainToolbar(props: Props) {
// title={t('core:sort')}
aria-label={t('core:sort')}
data-tid={prefixDataTID + 'PerspectiveSortMenu'}
- onClick={e => {
+ onClick={(e) => {
handleSortingMenu(e);
}}
size="large"
@@ -233,7 +231,7 @@ function MainToolbar(props: Props) {
</IconButton>
</Tooltip>
{Pro &&
- !AppConfig.isCordovaAndroid && ( // https://trello.com/c/z6ESlqxz/697-exports-to-json-or-csv-do-not-work-on-android
+ !AppConfig.isCordovaAndroid && ( // https://trello.com/c/z6ESlqxz/697-exports-to-json-or-csv-do-not-work-on-android
<Tooltip title={t('core:exportCsv')}>
<IconButton
data-tid={prefixDataTID + 'PerspectiveExportCsvMenuTID'}
diff --git a/app/perspectives/grid-perspective/components/styles.css.tsx b/app/perspectives/grid-perspective/components/styles.css.tsx
index 9384b6746..aa3d72b50 100644
--- a/app/perspectives/grid-perspective/components/styles.css.tsx
+++ b/app/perspectives/grid-perspective/components/styles.css.tsx
@@ -32,7 +32,7 @@ export const classes = {
gridSizeDate: `${PREFIX}-gridSizeDate`,
gridDetails: `${PREFIX}-gridDetails`,
gridFolder: `${PREFIX}-gridFolder`,
- topToolbar: `${PREFIX}-topToolbar`
+ topToolbar: `${PREFIX}-topToolbar`,
};
export const GridStyles = styled('div')(({ theme }) => ({
@@ -48,7 +48,7 @@ export const GridStyles = styled('div')(({ theme }) => ({
marginTop: 1,
marginLeft: 2,
marginBottom: 1,
- marginRight: 1
+ marginRight: 1,
},
[`& .${classes.rowCell}`]: {
boxShadow: 'none',
@@ -58,25 +58,25 @@ export const GridStyles = styled('div')(({ theme }) => ({
borderBottom: '1px solid ' + theme.palette.divider,
margin: 0,
marginTop: 0,
- marginBottom: 0
+ marginBottom: 0,
},
[`& .${classes.rowHover}`]: {
'&:hover': {
- backgroundColor: theme.palette.divider + ' !important'
- }
+ backgroundColor: theme.palette.divider + ' !important',
+ },
},
[`& .${classes.selectedGridCell}`]: {
border: '2px solid' + theme.palette.primary.main,
- backgroundColor: theme.palette.primary.light + ' !important'
+ backgroundColor: theme.palette.primary.light + ' !important',
},
[`& .${classes.selectedRowCell}`]: {
- border: '1px solid' + theme.palette.primary.main + ' !important'
+ border: '1px solid' + theme.palette.primary.main + ' !important',
},
[`& .${classes.gridCellThumb}`]: {
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
borderRadius: 5,
- marginBottom: 5
+ marginBottom: 5,
},
[`& .${classes.gridCellTitle}`]: {
padding: '0px 5px 0 5px',
@@ -85,7 +85,7 @@ export const GridStyles = styled('div')(({ theme }) => ({
WebkitLineClamp: 2,
WebkitBoxOrient: 'vertical',
textOverflow: 'ellipsis',
- overflow: 'hidden'
+ overflow: 'hidden',
},
[`& .${classes.gridCellTags}`]: {
padding: 0,
@@ -93,7 +93,7 @@ export const GridStyles = styled('div')(({ theme }) => ({
height: 100,
overflowY: 'auto',
overflowX: 'hidden',
- position: 'relative'
+ position: 'relative',
},
[`& .${classes.gridCellDescription}`]: {
padding: 2,
@@ -102,7 +102,7 @@ export const GridStyles = styled('div')(({ theme }) => ({
borderRadius: 5,
opacity: 0.6,
wordBreak: 'break-word',
- display: 'block'
+ display: 'block',
},
[`& .${classes.gridFileExtension}`]: {
paddingTop: 1,
@@ -116,25 +116,25 @@ export const GridStyles = styled('div')(({ theme }) => ({
height: 16,
color: 'white',
borderRadius: 3,
- textAlign: 'center'
+ textAlign: 'center',
},
[`& .${classes.gridSizeDate}`]: {
overflow: 'hidden',
whiteSpace: 'nowrap',
marginRight: 5,
marginLeft: 'auto',
- paddingTop: 12
+ paddingTop: 12,
},
[`& .${classes.gridDetails}`]: {
display: 'flex',
- whiteSpace: 'nowrap'
+ whiteSpace: 'nowrap',
},
[`& .${classes.gridFolder}`]: {
color: 'white',
padding: 5,
minHeight: 15,
height: 20,
- borderRadius: 3
+ borderRadius: 3,
},
[`& .${classes.topToolbar}`]: {
paddingLeft: 5,
@@ -153,6 +153,6 @@ export const GridStyles = styled('div')(({ theme }) => ({
// borderBottom: '1px solid ' + theme.palette.divider,
width: 'calc(100% - 10px)',
overflowX: 'auto',
- overflowY: 'hidden'
- }
+ overflowY: 'hidden',
+ },
}));
diff --git a/app/perspectives/grid-perspective/hooks/SortedDirContextProvider.tsx b/app/perspectives/grid-perspective/hooks/SortedDirContextProvider.tsx
index 297476ee5..b81dd4f48 100644
--- a/app/perspectives/grid-perspective/hooks/SortedDirContextProvider.tsx
+++ b/app/perspectives/grid-perspective/hooks/SortedDirContextProvider.tsx
@@ -41,7 +41,7 @@ export const SortedDirContext = createContext<SortedDirContextData>({
sortBy: undefined,
orderBy: undefined,
setSortBy: () => {},
- setOrderBy: () => {}
+ setOrderBy: () => {},
});
export type SortedDirContextProviderProps = {
@@ -49,12 +49,12 @@ export type SortedDirContextProviderProps = {
};
export const SortedDirContextProvider = ({
- children
+ children,
}: SortedDirContextProviderProps) => {
const {
currentDirectoryEntries,
directoryMeta,
- currentDirectoryPerspective
+ currentDirectoryPerspective,
} = useDirectoryContentContext();
const searchFilter: string = useSelector(getSearchFilter);
@@ -63,17 +63,17 @@ export const SortedDirContextProvider = ({
}, [directoryMeta, currentDirectoryPerspective]);
const [sortBy, setSortBy] = useState<string>(
- settings && settings.sortBy ? settings.sortBy : defaultSettings.sortBy
+ settings && settings.sortBy ? settings.sortBy : defaultSettings.sortBy,
);
const [orderBy, setOrderBy] = useState<null | boolean>(
settings && typeof settings.orderBy !== 'undefined'
? settings.orderBy
- : defaultSettings.orderBy
+ : defaultSettings.orderBy,
);
function getSettings(
meta,
- perspective = PerspectiveIDs.GRID
+ perspective = PerspectiveIDs.GRID,
): TS.FolderSettings {
if (perspective === PerspectiveIDs.UNSPECIFIED) {
perspective = PerspectiveIDs.GRID;
@@ -100,12 +100,9 @@ export const SortedDirContextProvider = ({
entry.name.toLowerCase().includes(searchFilter.toLowerCase())
);
} else {*/
- return sortByCriteria(
- currentDirectoryEntries,
- sortBy,
- orderBy
- ).filter(entry =>
- entry.name.toLowerCase().includes(searchFilter.toLowerCase())
+ return sortByCriteria(currentDirectoryEntries, sortBy, orderBy).filter(
+ (entry) =>
+ entry.name.toLowerCase().includes(searchFilter.toLowerCase()),
);
}
if (sortBy === 'byRelevance') {
@@ -117,7 +114,9 @@ export const SortedDirContextProvider = ({
}
}
// not in search mode
- return sortByCriteria(currentDirectoryEntries, sortBy, orderBy).map(o => o);
+ return sortByCriteria(currentDirectoryEntries, sortBy, orderBy).map(
+ (o) => o,
+ );
}, [currentDirectoryEntries, searchFilter, sortBy, orderBy]);
const context = useMemo(() => {
@@ -127,7 +126,7 @@ export const SortedDirContextProvider = ({
sortBy,
orderBy,
setSortBy,
- setOrderBy
+ setOrderBy,
};
}, [sortedDirContent, settings, sortBy, orderBy]);
diff --git a/app/perspectives/grid-perspective/index.tsx b/app/perspectives/grid-perspective/index.tsx
index 6717b6b3c..8d91eb0eb 100644
--- a/app/perspectives/grid-perspective/index.tsx
+++ b/app/perspectives/grid-perspective/index.tsx
@@ -28,5 +28,5 @@ export const defaultSettings = {
showDescription: false,
showEntriesDescription: true,
showTags: true,
- gridPageLimit: 100
+ gridPageLimit: 100,
};
diff --git a/app/perspectives/index.tsx b/app/perspectives/index.tsx
index d79890909..bb47f7fe8 100644
--- a/app/perspectives/index.tsx
+++ b/app/perspectives/index.tsx
@@ -29,7 +29,7 @@ export const PerspectiveIDs = {
GALLERY: 'gallery',
// TREEVIZ: 'treeviz',
MAPIQUE: 'mapique',
- KANBAN: 'kanban'
+ KANBAN: 'kanban',
// WIKI: 'wiki'
};
@@ -39,7 +39,7 @@ export const GridPerspectiveMeta = {
pro: false,
beta: false,
icon: <GridPerspectiveIcon />,
- title: 'Grid Perspective'
+ title: 'Grid Perspective',
};
export const ListPerspectiveMeta = {
@@ -48,7 +48,7 @@ export const ListPerspectiveMeta = {
pro: false,
beta: false,
icon: <ListPerspectiveIcon />,
- title: 'List Perspective'
+ title: 'List Perspective',
};
export const MapiquePerspectiveMeta = {
@@ -57,7 +57,7 @@ export const MapiquePerspectiveMeta = {
pro: true,
beta: false,
icon: <MapiquePerspectiveIcon />,
- title: 'Mapique Perspective'
+ title: 'Mapique Perspective',
};
export const KanbanPerspectiveMeta = {
@@ -66,7 +66,7 @@ export const KanbanPerspectiveMeta = {
pro: true,
beta: true,
icon: <KanbanPerspectiveIcon />,
- title: 'Kanban Perspective'
+ title: 'Kanban Perspective',
};
export { KanbanPerspectiveIcon };
@@ -77,7 +77,7 @@ export const GalleryPerspectiveMeta = {
pro: true,
beta: false,
icon: <GalleryPerspectiveIcon />,
- title: 'Gallery Perspective'
+ title: 'Gallery Perspective',
};
export const AvailablePerspectives = [];
diff --git a/app/perspectives/list/components/MainContainer.tsx b/app/perspectives/list/components/MainContainer.tsx
index 26b4c74fa..410153a67 100644
--- a/app/perspectives/list/components/MainContainer.tsx
+++ b/app/perspectives/list/components/MainContainer.tsx
@@ -73,27 +73,16 @@ function ListPerspective(props: Props) {
const { openRenameEntryDialog } = props;
const { openEntry, openPrevFile, openNextFile } = useOpenedEntryContext();
- const {
- directoryMeta,
- currentDirectoryPath,
- setDirectoryMeta
- } = useDirectoryContentContext();
+ const { directoryMeta, currentDirectoryPath, setDirectoryMeta } =
+ useDirectoryContentContext();
const { openFileNatively } = useFsActionsContext();
const dispatch: AppDispatch = useDispatch();
- const {
- sortedDirContent,
- sortBy,
- orderBy,
- setSortBy,
- setOrderBy
- } = useSortedDirContext();
+ const { sortedDirContent, sortBy, orderBy, setSortBy, setOrderBy } =
+ useSortedDirContext();
const desktopMode = useSelector(getDesktopMode);
- const {
- selectedEntries,
- setSelectedEntries,
- lastSelectedEntryPath
- } = useSelectedEntriesContext();
+ const { selectedEntries, setSelectedEntries, lastSelectedEntryPath } =
+ useSelectedEntriesContext();
const keyBindings = useSelector(getKeyBindingObject);
//const searchFilter: string = useSelector(getSearchFilter);
/*const editedEntryPaths: Array<TS.EditedEntryPath> = useSelector(
@@ -104,7 +93,7 @@ function ListPerspective(props: Props) {
const handleSetSelectedEntries = (entries: Array<TS.FileSystemEntry>) => {
const selected = showDirectories.current
? entries
- : entries.filter(entry => entry.isFile);
+ : entries.filter((entry) => entry.isFile);
setSelectedEntries(selected);
};
@@ -123,29 +112,18 @@ function ListPerspective(props: Props) {
const selectedEntryPath = useRef<string>(undefined);
const selectedTag = useRef<TS.Tag | null>(null);
const perspectiveMode = useRef<boolean>(true);
- const [
- fileContextMenuAnchorEl,
- setFileContextMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [
- dirContextMenuAnchorEl,
- setDirContextMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [
- tagContextMenuAnchorEl,
- setTagContextMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [
- sortingContextMenuAnchorEl,
- setSortingContextMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [
- optionsContextMenuAnchorEl,
- setOptionsContextMenuAnchorEl
- ] = useState<null | HTMLElement>(null);
- const [isAddTagDialogOpened, setIsAddTagDialogOpened] = useState<TS.Tag>(
- undefined
- );
+ const [fileContextMenuAnchorEl, setFileContextMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [dirContextMenuAnchorEl, setDirContextMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [tagContextMenuAnchorEl, setTagContextMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [sortingContextMenuAnchorEl, setSortingContextMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [optionsContextMenuAnchorEl, setOptionsContextMenuAnchorEl] =
+ useState<null | HTMLElement>(null);
+ const [isAddTagDialogOpened, setIsAddTagDialogOpened] =
+ useState<TS.Tag>(undefined);
/*const sortBy = useRef<string>(
settings && settings.sortBy ? settings.sortBy : defaultSettings.sortBy
);
@@ -157,70 +135,64 @@ function ListPerspective(props: Props) {
const layoutType = useRef<string>(
settings && settings.layoutType
? settings.layoutType
- : defaultSettings.layoutType
+ : defaultSettings.layoutType,
);
const singleClickAction = useRef<string>(
settings && settings.singleClickAction
? settings.singleClickAction
- : defaultSettings.singleClickAction
+ : defaultSettings.singleClickAction,
);
const entrySize = useRef<string>(
settings && settings.entrySize
? settings.entrySize
- : defaultSettings.entrySize
+ : defaultSettings.entrySize,
);
const thumbnailMode = useRef<string>(
settings && settings.thumbnailMode
? settings.thumbnailMode
- : defaultSettings.thumbnailMode
+ : defaultSettings.thumbnailMode,
);
const showDirectories = useRef<boolean>(
settings && typeof settings.showDirectories !== 'undefined'
? settings.showDirectories
- : defaultSettings.showDirectories
+ : defaultSettings.showDirectories,
);
const showDetails = useRef<boolean>(
settings && typeof settings.showDetails !== 'undefined'
? settings.showDetails
- : defaultSettings.showDetails
+ : defaultSettings.showDetails,
);
const showDescription = useRef<boolean>(
settings && typeof settings.showDescription !== 'undefined'
? settings.showDescription
- : defaultSettings.showDescription
+ : defaultSettings.showDescription,
);
const showEntriesDescription = useRef<boolean>(
settings && typeof settings.showEntriesDescription !== 'undefined'
? settings.showEntriesDescription
- : defaultSettings.showEntriesDescription
+ : defaultSettings.showEntriesDescription,
);
const showTags = useRef<boolean>(
settings && typeof settings.showTags !== 'undefined'
? settings.showTags
- : defaultSettings.showTags
+ : defaultSettings.showTags,
);
- const [
- isMoveCopyFilesDialogOpened,
- setIsMoveCopyFilesDialogOpened
- ] = useState<boolean>(false);
- const [isShareFilesDialogOpened, setIsShareFilesDialogOpened] = useState<
- boolean
- >(false);
- const [
- isAddRemoveTagsDialogOpened,
- setIsAddRemoveTagsDialogOpened
- ] = useState<boolean>(false);
- const [isGridSettingsDialogOpened, setIsGridSettingsDialogOpened] = useState<
- boolean
- >(false);
+ const [isMoveCopyFilesDialogOpened, setIsMoveCopyFilesDialogOpened] =
+ useState<boolean>(false);
+ const [isShareFilesDialogOpened, setIsShareFilesDialogOpened] =
+ useState<boolean>(false);
+ const [isAddRemoveTagsDialogOpened, setIsAddRemoveTagsDialogOpened] =
+ useState<boolean>(false);
+ const [isGridSettingsDialogOpened, setIsGridSettingsDialogOpened] =
+ useState<boolean>(false);
const gridPageLimit = useRef<number>(
settings && settings.gridPageLimit
? settings.gridPageLimit
- : defaultSettings.gridPageLimit
+ : defaultSettings.gridPageLimit,
);
// true: save in default settings; false: save per folder settings; undefined - dont save changes
const isDefaultSetting = useRef<boolean>(undefined);
- const [ignored, forceUpdate] = useReducer(x => x + 1, 0, undefined);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0, undefined);
const firstRender = useFirstRender();
useEffect(() => {
@@ -257,12 +229,12 @@ function ListPerspective(props: Props) {
setOrderBy(
perspectiveSettings && perspectiveSettings.orderBy !== undefined
? perspectiveSettings.orderBy
- : defaultSettings.orderBy
+ : defaultSettings.orderBy,
);
setSortBy(
perspectiveSettings && perspectiveSettings.sortBy !== undefined
? perspectiveSettings.sortBy
- : defaultSettings.sortBy
+ : defaultSettings.sortBy,
);
singleClickAction.current =
perspectiveSettings &&
@@ -299,20 +271,20 @@ function ListPerspective(props: Props) {
singleClickAction: singleClickAction.current,
entrySize: entrySize.current,
thumbnailMode: thumbnailMode.current,
- gridPageLimit: gridPageLimit.current
+ gridPageLimit: gridPageLimit.current,
};
if (Pro && !isDefaultSetting.current) {
Pro.MetaOperations.savePerspectiveSettings(
currentDirectoryPath,
PerspectiveIDs.LIST,
- perspectiveSettings
+ perspectiveSettings,
).then((fsEntryMeta: TS.FileSystemEntryMeta) => {
setDirectoryMeta(fsEntryMeta);
});
} else {
localStorage.setItem(
defaultSettings.settingsKey,
- JSON.stringify(perspectiveSettings)
+ JSON.stringify(perspectiveSettings),
);
forceUpdate();
}
@@ -331,14 +303,14 @@ function ListPerspective(props: Props) {
singleClickAction.current,
entrySize.current,
thumbnailMode.current,
- gridPageLimit.current
+ gridPageLimit.current,
]);
const makeFirstSelectedEntryVisible = () => {
if (selectedEntries && selectedEntries.length > 0) {
try {
const firstSelectedElement = document.querySelector(
- '[data-entry-id="' + selectedEntries[0].uuid + '"]'
+ '[data-entry-id="' + selectedEntries[0].uuid + '"]',
);
if (
isObj(firstSelectedElement) &&
@@ -362,7 +334,7 @@ function ListPerspective(props: Props) {
// forceUpdate();
};
- const handleSortBy = handleSort => {
+ const handleSortBy = (handleSort) => {
if (sortBy !== handleSort) {
setSortBy(handleSort);
} else {
@@ -372,7 +344,7 @@ function ListPerspective(props: Props) {
setSortingContextMenuAnchorEl(null);
};
- const handleSortingMenu = event => {
+ const handleSortingMenu = (event) => {
const anchor = event ? event.currentTarget : null;
setSortingContextMenuAnchorEl(anchor);
};
@@ -435,13 +407,13 @@ function ListPerspective(props: Props) {
return thumbMode;
};
- const changeEntrySize = size => {
+ const changeEntrySize = (size) => {
closeOptionsMenu();
entrySize.current = size;
// forceUpdate();
};
- const changeSingleClickAction = singleClick => {
+ const changeSingleClickAction = (singleClick) => {
closeOptionsMenu();
singleClickAction.current = singleClick;
// forceUpdate();
@@ -460,7 +432,7 @@ function ListPerspective(props: Props) {
const handleTagMenu = (
event: React.ChangeEvent<HTMLInputElement>,
tag: TS.Tag,
- entryPath: string
+ entryPath: string,
) => {
event.preventDefault();
event.stopPropagation();
@@ -498,7 +470,7 @@ function ListPerspective(props: Props) {
addRemoveTags: keyBindings.addRemoveTags,
renameFile: keyBindings.renameFile,
openEntry: keyBindings.openEntry,
- openFileExternally: keyBindings.openFileExternally
+ openFileExternally: keyBindings.openFileExternally,
};
const onContextMenu = (event: React.MouseEvent<HTMLDivElement>) => {
@@ -536,17 +508,17 @@ function ListPerspective(props: Props) {
renameFile: () => {
openRenameEntryDialog();
},
- openEntry: e => {
+ openEntry: (e) => {
e.preventDefault();
openEntry();
},
openFileExternally: () => {
openFileNatively();
- }
+ },
};
- const sortedDirectories = sortedDirContent.filter(entry => !entry.isFile);
- const sortedFiles = sortedDirContent.filter(entry => entry.isFile);
+ const sortedDirectories = sortedDirContent.filter((entry) => !entry.isFile);
+ const sortedFiles = sortedDirContent.filter((entry) => entry.isFile);
/*const locationPath = currentLocation
? PlatformIO.getLocationPath(currentLocation)
: '';*/
@@ -565,16 +537,16 @@ function ListPerspective(props: Props) {
index: number,
handleGridContextMenu: (
event: React.MouseEvent<HTMLDivElement>,
- fsEntry: TS.FileSystemEntry
+ fsEntry: TS.FileSystemEntry,
) => void,
handleGridCellClick,
handleGridCellDblClick,
- isLast?: boolean
+ isLast?: boolean,
) => {
let selected = false;
if (
selectedEntries &&
- selectedEntries.some(entry => entry.path === fsEntry.path)
+ selectedEntries.some((entry) => entry.path === fsEntry.path)
) {
selected = true;
}
@@ -584,7 +556,7 @@ function ListPerspective(props: Props) {
const deselectEntry = (fsEntry: TS.FileSystemEntry) => {
const newSelection = selectedEntries.filter(
- data => data.path !== fsEntry.path
+ (data) => data.path !== fsEntry.path,
);
handleSetSelectedEntries(newSelection);
};
@@ -609,7 +581,7 @@ function ListPerspective(props: Props) {
showTags={showTags.current}
handleGridContextMenu={(
event: React.MouseEvent<HTMLDivElement>,
- fsEntry: TS.FileSystemEntry
+ fsEntry: TS.FileSystemEntry,
) => {
setMouseX(event.clientX);
setMouseY(event.clientY);
@@ -625,7 +597,7 @@ function ListPerspective(props: Props) {
return (
<div
style={{
- height: '100%' // 'calc(100% - 47px)'
+ height: '100%', // 'calc(100% - 47px)'
}}
data-tid={defaultSettings.testID}
>
@@ -653,7 +625,7 @@ function ListPerspective(props: Props) {
marginBottom: 70,
paddingRight: 4,
paddingLeft: 4,
- gridTemplateColumns: 'none'
+ gridTemplateColumns: 'none',
}}
directories={sortedDirectories}
showDetails={showDetails.current}
@@ -695,7 +667,7 @@ function ListPerspective(props: Props) {
{isGridSettingsDialogOpened && (
<GridSettingsDialog
open={isGridSettingsDialogOpened}
- onClose={isDefault => {
+ onClose={(isDefault) => {
setIsGridSettingsDialogOpened(false);
isDefaultSetting.current = isDefault;
}}
@@ -723,7 +695,7 @@ function ListPerspective(props: Props) {
resetLocalSettings={() => {
Pro.MetaOperations.savePerspectiveSettings(
currentDirectoryPath,
- PerspectiveIDs.LIST
+ PerspectiveIDs.LIST,
).then((fsEntryMeta: TS.FileSystemEntryMeta) => {
setDirectoryMeta(fsEntryMeta);
setIsGridSettingsDialogOpened(false);
diff --git a/app/perspectives/list/index.tsx b/app/perspectives/list/index.tsx
index 20d28369d..d583525aa 100644
--- a/app/perspectives/list/index.tsx
+++ b/app/perspectives/list/index.tsx
@@ -28,5 +28,5 @@ export const defaultSettings = {
showDescription: false,
showEntriesDescription: true,
showTags: true,
- gridPageLimit: 100
+ gridPageLimit: 100,
};
diff --git a/app/reducers/app.ts b/app/reducers/app.ts
index 00200aab3..8b25be9ff 100644
--- a/app/reducers/app.ts
+++ b/app/reducers/app.ts
@@ -26,13 +26,13 @@ import {
actions as SettingsActions,
getCheckForUpdateOnStartup,
isFirstRun,
- isGlobalKeyBindingEnabled
+ isGlobalKeyBindingEnabled,
} from '-/reducers/settings';
import { TS } from '-/tagspaces.namespace';
import {
addTag,
getTagLibrary,
- setTagLibrary
+ setTagLibrary,
} from '-/services/taglibrary-utils';
import { getProTeaserSlideIndex } from '-/content/ProTeaserSlides';
import { extensionsFound } from '-/extension-config';
@@ -111,7 +111,7 @@ export const types = {
// SET_ISLOADING: 'APP/SET_ISLOADING',
ADD_EXTENSIONS: 'APP/ADD_EXTENSIONS',
REMOVE_EXTENSIONS: 'APP/REMOVE_EXTENSIONS',
- UPDATE_EXTENSION: 'APP/UPDATE_EXTENSION'
+ UPDATE_EXTENSION: 'APP/UPDATE_EXTENSION',
};
export type OpenedEntry = {
@@ -185,7 +185,7 @@ export const initialState = {
visible: false,
text: 'Test',
notificationType: '',
- autohide: false
+ autohide: false,
},
editTagDialogOpened: false,
aboutDialogOpened: false,
@@ -216,9 +216,9 @@ export const initialState = {
// eslint-disable-next-line @typescript-eslint/no-empty-function
associateSoftwareToken: () => {},
// eslint-disable-next-line @typescript-eslint/no-empty-function
- verifySoftwareToken: () => {}
+ verifySoftwareToken: () => {},
}
- : undefined
+ : undefined,
};
// The state described here will not be persisted
@@ -230,8 +230,8 @@ export default (state: any = initialState, action: any) => {
...state,
lastBackgroundImageChange: {
folderPath: action.folderPath,
- dt: action.lastBackgroundImageChange
- }
+ dt: action.lastBackgroundImageChange,
+ },
};
}
case types.LAST_BACKGROUND_COLOR_CHANGE: {
@@ -239,8 +239,8 @@ export default (state: any = initialState, action: any) => {
...state,
lastBackgroundColorChange: {
folderPath: action.folderPath,
- dt: action.lastBackgroundColorChange
- }
+ dt: action.lastBackgroundColorChange,
+ },
};
}
case types.LAST_THUMBNAIL_IMAGE_CHANGE: {
@@ -248,8 +248,8 @@ export default (state: any = initialState, action: any) => {
...state,
lastThumbnailImageChange: {
thumbPath: action.thumbPath,
- dt: action.lastThumbnailImageChange
- }
+ dt: action.lastThumbnailImageChange,
+ },
};
}
case types.LOGIN_SUCCESS: {
@@ -267,10 +267,10 @@ export default (state: any = initialState, action: any) => {
path: action.path,
filePath: action.filePath,
progress: action.progress,
- abort: action.abort
- }
+ abort: action.abort,
+ },
];
- state.progress.map(fileProgress => {
+ state.progress.map((fileProgress) => {
if (fileProgress.path !== action.path) {
arrProgress.push(fileProgress);
}
@@ -285,7 +285,7 @@ export default (state: any = initialState, action: any) => {
if (action.isUpdateAvailable !== state.isUpdateAvailable) {
return {
...state,
- isUpdateAvailable: action.isUpdateAvailable
+ isUpdateAvailable: action.isUpdateAvailable,
};
}
return state;
@@ -306,7 +306,7 @@ export default (state: any = initialState, action: any) => {
return {
...state,
tag: action.tag,
- editTagDialogOpened: !state.editTagDialogOpened
+ editTagDialogOpened: !state.editTagDialogOpened,
};
}
case types.TOGGLE_ABOUT_DIALOG: {
@@ -318,13 +318,13 @@ export default (state: any = initialState, action: any) => {
case types.TOGGLE_ONBOARDING_DIALOG: {
return {
...state,
- onboardingDialogOpened: !state.onboardingDialogOpened
+ onboardingDialogOpened: !state.onboardingDialogOpened,
};
}
case types.TOGGLE_OPENLINK_DIALOG: {
return {
...state,
- openLinkDialogOpened: !state.openLinkDialogOpened
+ openLinkDialogOpened: !state.openLinkDialogOpened,
};
}
case types.TOGGLE_OPEN_PRO_TEASER_DIALOG: {
@@ -337,7 +337,7 @@ export default (state: any = initialState, action: any) => {
}
return {
...state,
- proTeaserIndex: index
+ proTeaserIndex: index,
};
}
case types.TOGGLE_KEYBOARD_DIALOG: {
@@ -346,31 +346,32 @@ export default (state: any = initialState, action: any) => {
case types.TOGGLE_NEW_ENTRY_DIALOG: {
return {
...state,
- isNewEntryDialogOpened: !state.isNewEntryDialogOpened
+ isNewEntryDialogOpened: !state.isNewEntryDialogOpened,
};
}
case types.TOGGLE_NEW_FILE_DIALOG: {
return {
...state,
- isNewFileDialogOpened: !state.isNewFileDialogOpened
+ isNewFileDialogOpened: !state.isNewFileDialogOpened,
};
}
case types.TOGGLE_NEW_AUDIO_DIALOG: {
return {
...state,
- isNewAudioDialogOpened: !state.isNewAudioDialogOpened
+ isNewAudioDialogOpened: !state.isNewAudioDialogOpened,
};
}
case types.TOGGLE_DELETE_MULTIPLE_ENTRIES_DIALOG: {
return {
...state,
- deleteMultipleEntriesDialogOpened: !state.deleteMultipleEntriesDialogOpened
+ deleteMultipleEntriesDialogOpened:
+ !state.deleteMultipleEntriesDialogOpened,
};
}
case types.TOGGLE_IMPORT_KANBAN_DIALOG: {
return {
...state,
- importKanBanDialogOpened: !state.importKanBanDialogOpened
+ importKanBanDialogOpened: !state.importKanBanDialogOpened,
};
}
case types.TOGGLE_LICENSE_DIALOG: {
@@ -379,7 +380,7 @@ export default (state: any = initialState, action: any) => {
case types.TOGGLE_THIRD_PARTY_LIBS_DIALOG: {
return {
...state,
- thirdPartyLibsDialogOpened: !state.thirdPartyLibsDialogOpened
+ thirdPartyLibsDialogOpened: !state.thirdPartyLibsDialogOpened,
};
}
case types.TOGGLE_SETTINGS_DIALOG: {
@@ -390,7 +391,7 @@ export default (state: any = initialState, action: any) => {
return {
...state,
createDirectoryDialogOpened:
- state.createDirectoryDialogOpened !== null ? null : action.props
+ state.createDirectoryDialogOpened !== null ? null : action.props,
};
}
case types.TOGGLE_UPLOAD_DIALOG: {
@@ -400,7 +401,7 @@ export default (state: any = initialState, action: any) => {
...state,
// progress: (state.uploadDialogOpened ? state.progress : []),
uploadDialogOpened:
- state.uploadDialogOpened === undefined ? action.title : undefined
+ state.uploadDialogOpened === undefined ? action.title : undefined,
};
//}
// return state;
@@ -408,7 +409,7 @@ export default (state: any = initialState, action: any) => {
case types.TOGGLE_TRUNCATED_DIALOG: {
return {
...state,
- isTruncatedConfirmDialogOpened: !state.isTruncatedConfirmDialogOpened
+ isTruncatedConfirmDialogOpened: !state.isTruncatedConfirmDialogOpened,
};
}
/* case types.SET_CURRENT_DIRECTORY_DIRS: {
@@ -429,7 +430,7 @@ export default (state: any = initialState, action: any) => {
return {
...state,
progress: [],
- uploadDialogOpened: undefined
+ uploadDialogOpened: undefined,
};
// }
// return state;
@@ -437,13 +438,13 @@ export default (state: any = initialState, action: any) => {
case types.TOGGLE_PROGRESS_DIALOG: {
return {
...state,
- progressDialogOpened: !state.progressDialogOpened
+ progressDialogOpened: !state.progressDialogOpened,
};
}
case types.SET_SEARCH_FILTER: {
return {
...state,
- searchFilter: action.searchFilter
+ searchFilter: action.searchFilter,
};
}
case types.REFLECT_DELETE_ENTRY: {
@@ -463,16 +464,16 @@ export default (state: any = initialState, action: any) => {
}*/
return {
...state,
- editedEntryPaths
+ editedEntryPaths,
};
}
case types.REFLECT_DELETE_ENTRIES: {
/*const newDirectoryEntries = state.currentDirectoryEntries.filter(
entry => !action.paths.some(path => path === entry.path)
);*/
- const editedEntryPaths = action.paths.map(path => ({
+ const editedEntryPaths = action.paths.map((path) => ({
action: 'delete',
- path: path
+ path: path,
}));
// check if currentDirectoryEntries or openedFiles changed
/*if (state.currentDirectoryEntries.length > newDirectoryEntries.length) {
@@ -484,7 +485,7 @@ export default (state: any = initialState, action: any) => {
}*/
return {
...state,
- editedEntryPaths
+ editedEntryPaths,
};
}
case types.REFLECT_CREATE_ENTRY: {
@@ -501,8 +502,8 @@ export default (state: any = initialState, action: any) => {
{
action: newEntry.isFile ? 'createFile' : 'createDir',
path: newEntry.path,
- uuid: newEntry.uuid
- }
+ uuid: newEntry.uuid,
+ },
];
// clean all dir separators to have platform independent path match
/*if (
@@ -524,7 +525,7 @@ export default (state: any = initialState, action: any) => {
}*/
return {
...state,
- editedEntryPaths
+ editedEntryPaths,
};
}
case types.REFLECT_CREATE_ENTRIES: {
@@ -537,15 +538,15 @@ export default (state: any = initialState, action: any) => {
state.currentDirectoryPath.replace(/[/\\]/g, '')
) {*/
const editedEntryPaths: Array<TS.EditedEntryPath> = action.fsEntries.map(
- newEntry => ({
+ (newEntry) => ({
action: newEntry.isFile ? 'createFile' : 'createDir',
path: newEntry.path,
- uuid: newEntry.uuid
- })
+ uuid: newEntry.uuid,
+ }),
);
return {
...state,
- editedEntryPaths
+ editedEntryPaths,
/*currentDirectoryEntries: [
...state.currentDirectoryEntries,
...action.fsEntries
@@ -563,12 +564,12 @@ export default (state: any = initialState, action: any) => {
const editedEntryPaths = [
{ action: 'rename', path: action.path },
- { action: 'rename', path: action.newPath }
+ { action: 'rename', path: action.newPath },
];
return {
...state,
- editedEntryPaths
+ editedEntryPaths,
/*currentDirectoryEntries: state.currentDirectoryEntries.map(entry => {
if (entry.path !== action.path) {
return entry;
@@ -626,7 +627,7 @@ export default (state: any = initialState, action: any) => {
case types.REFLECT_EDITED_ENTRY_PATHS: {
return {
...state,
- editedEntryPaths: action.editedEntryPaths // .map(path => ({ action: 'edit', path }))
+ editedEntryPaths: action.editedEntryPaths, // .map(path => ({ action: 'edit', path }))
};
}
/*case types.UPDATE_CURRENTDIR_ENTRY: {
@@ -646,7 +647,7 @@ export default (state: any = initialState, action: any) => {
locationManagerPanelOpened: true,
tagLibraryPanelOpened: false,
searchPanelOpened: false,
- helpFeedbackPanelOpened: false
+ helpFeedbackPanelOpened: false,
};
}
case types.OPEN_TAGLIBRARY_PANEL: {
@@ -655,7 +656,7 @@ export default (state: any = initialState, action: any) => {
locationManagerPanelOpened: false,
tagLibraryPanelOpened: true,
searchPanelOpened: false,
- helpFeedbackPanelOpened: false
+ helpFeedbackPanelOpened: false,
};
}
case types.OPEN_SEARCH_PANEL: {
@@ -664,7 +665,7 @@ export default (state: any = initialState, action: any) => {
locationManagerPanelOpened: false,
tagLibraryPanelOpened: false,
searchPanelOpened: true,
- helpFeedbackPanelOpened: false
+ helpFeedbackPanelOpened: false,
};
}
case types.OPEN_HELPFEEDBACK_PANEL: {
@@ -673,23 +674,23 @@ export default (state: any = initialState, action: any) => {
locationManagerPanelOpened: false,
tagLibraryPanelOpened: false,
searchPanelOpened: false,
- helpFeedbackPanelOpened: true
+ helpFeedbackPanelOpened: true,
};
}
case types.ADD_EXTENSIONS: {
const extensions = mergeByProp(
state.extensions,
action.extensions,
- 'extensionId'
+ 'extensionId',
);
return {
...state,
- extensions: extensions.map(ext => {
+ extensions: extensions.map((ext) => {
if (action.enabledExtensions.includes(ext.extensionId)) {
return { ...ext, extensionEnabled: true };
}
return ext;
- })
+ }),
};
}
case types.UPDATE_EXTENSION: {
@@ -698,16 +699,16 @@ export default (state: any = initialState, action: any) => {
extensions: mergeByProp(
state.extensions,
[action.extension],
- 'extensionId'
- ) // updateExtensions(state.extensions, action.extension)
+ 'extensionId',
+ ), // updateExtensions(state.extensions, action.extension)
};
}
case types.REMOVE_EXTENSIONS: {
return {
...state,
extensions: state.extensions.filter(
- ext => ext.extensionId !== action.extensionId
- )
+ (ext) => ext.extensionId !== action.extensionId,
+ ),
};
}
default: {
@@ -730,38 +731,39 @@ function disableBackGestureMac() {
}
export const actions = {
- addExtensions: (extensions: Array<TS.Extension>) => (
- dispatch: (action) => void,
- getState: () => any
- ) => {
- const { settings } = getState();
- dispatch(actions.addExtensionsInt(extensions, settings.enabledExtensions));
- },
+ addExtensions:
+ (extensions: Array<TS.Extension>) =>
+ (dispatch: (action) => void, getState: () => any) => {
+ const { settings } = getState();
+ dispatch(
+ actions.addExtensionsInt(extensions, settings.enabledExtensions),
+ );
+ },
addExtensionsInt: (
extensions: Array<TS.Extension>,
- enabledExtensions: Array<string>
+ enabledExtensions: Array<string>,
) => ({
type: types.ADD_EXTENSIONS,
extensions,
- enabledExtensions
+ enabledExtensions,
}),
removeExtension: (extensionId: string) => ({
type: types.REMOVE_EXTENSIONS,
- extensionId
+ extensionId,
}),
updateExtension: (extension: TS.Extension) => ({
type: types.UPDATE_EXTENSION,
- extension
+ extension,
}),
setLastBackgroundImageChange: (folderPath, lastBackgroundImageChange) => ({
type: types.LAST_BACKGROUND_IMAGE_CHANGE,
folderPath,
- lastBackgroundImageChange
+ lastBackgroundImageChange,
}),
setLastBackgroundColorChange: (folderPath, lastBackgroundColorChange) => ({
type: types.LAST_BACKGROUND_COLOR_CHANGE,
folderPath,
- lastBackgroundColorChange
+ lastBackgroundColorChange,
}),
/**
* @param thumbPath
@@ -770,9 +772,9 @@ export const actions = {
setLastThumbnailImageChange: (thumbPath, lastThumbnailImageChange?) => ({
type: types.LAST_THUMBNAIL_IMAGE_CHANGE,
thumbPath,
- lastThumbnailImageChange: lastThumbnailImageChange || new Date().getTime()
+ lastThumbnailImageChange: lastThumbnailImageChange || new Date().getTime(),
}),
- loggedIn: user => ({ type: types.LOGIN_SUCCESS, user }),
+ loggedIn: (user) => ({ type: types.LOGIN_SUCCESS, user }),
/*openLink: (url: string, options = { fullWidth: true }) => ({
type: types.OPEN_LINK,
url,
@@ -854,33 +856,31 @@ export const actions = {
goOffline: () => ({ type: types.DEVICE_OFFLINE }),
setUpdateAvailable: (isUpdateAvailable: boolean) => ({
type: types.SET_NEW_VERSION_AVAILABLE,
- isUpdateAvailable
+ isUpdateAvailable,
}),
setProgress: (path, progress, abort?, filePath = undefined) => ({
type: types.PROGRESS,
path,
filePath,
progress,
- abort
+ abort,
}),
resetProgress: () => ({ type: types.RESET_PROGRESS }),
- onUploadProgress: (progress, abort, fileName = undefined) => (
- dispatch: (action) => void
- ) => {
- const progressPercentage = Math.round(
- (progress.loaded / progress.total) * 100
- );
- console.log(progressPercentage);
+ onUploadProgress:
+ (progress, abort, fileName = undefined) =>
+ (dispatch: (action) => void) => {
+ const progressPercentage = Math.round(
+ (progress.loaded / progress.total) * 100,
+ );
+ console.log(progressPercentage);
- dispatch(
- actions.setProgress(progress.key, progressPercentage, abort, fileName)
- );
- },
- showCreateDirectoryDialog: () => (
- dispatch: (action) => void,
- getState: () => any
- ) => {
- /* const { app } = getState();
+ dispatch(
+ actions.setProgress(progress.key, progressPercentage, abort, fileName),
+ );
+ },
+ showCreateDirectoryDialog:
+ () => (dispatch: (action) => void, getState: () => any) => {
+ /* const { app } = getState();
if (!app.currentDirectoryPath) {
dispatch(
actions.showNotification(
@@ -890,14 +890,12 @@ export const actions = {
)
);
} else {*/
- dispatch(actions.toggleCreateDirectoryDialog());
- //}
- },
- showCreateFileDialog: () => (
- dispatch: (action) => void,
- getState: () => any
- ) => {
- /*const { app } = getState();
+ dispatch(actions.toggleCreateDirectoryDialog());
+ //}
+ },
+ showCreateFileDialog:
+ () => (dispatch: (action) => void, getState: () => any) => {
+ /*const { app } = getState();
if (!app.currentDirectoryPath) {
dispatch(
actions.showNotification(
@@ -907,12 +905,12 @@ export const actions = {
)
);
} else {*/
- dispatch(actions.toggleNewEntryDialog());
- // }
- },
+ dispatch(actions.toggleNewEntryDialog());
+ // }
+ },
toggleEditTagDialog: (tag: TS.Tag) => ({
type: types.TOGGLE_EDIT_TAG_DIALOG,
- tag
+ tag,
}),
toggleAboutDialog: () => ({ type: types.TOGGLE_ABOUT_DIALOG }),
toggleLocationDialog: () => ({ type: types.TOGGLE_LOCATION_DIALOG }),
@@ -921,42 +919,42 @@ export const actions = {
toggleOpenLinkDialog: () => ({ type: types.TOGGLE_OPENLINK_DIALOG }),
toggleProTeaser: (slidePage?: string) => ({
type: types.TOGGLE_OPEN_PRO_TEASER_DIALOG,
- proTeaserPage: slidePage
+ proTeaserPage: slidePage,
}),
toggleLicenseDialog: () => ({ type: types.TOGGLE_LICENSE_DIALOG }),
toggleThirdPartyLibsDialog: () => ({
- type: types.TOGGLE_THIRD_PARTY_LIBS_DIALOG
+ type: types.TOGGLE_THIRD_PARTY_LIBS_DIALOG,
}),
toggleSettingsDialog: () => ({ type: types.TOGGLE_SETTINGS_DIALOG }),
toggleCreateDirectoryDialog: (props = undefined) => ({
type: types.TOGGLE_CREATE_DIRECTORY_DIALOG,
- props
+ props,
}),
toggleNewEntryDialog: () => ({ type: types.TOGGLE_NEW_ENTRY_DIALOG }),
toggleNewFileDialog: () => ({ type: types.TOGGLE_NEW_FILE_DIALOG }),
toggleNewAudioDialog: () => ({ type: types.TOGGLE_NEW_AUDIO_DIALOG }),
toggleDeleteMultipleEntriesDialog: () => ({
- type: types.TOGGLE_DELETE_MULTIPLE_ENTRIES_DIALOG
+ type: types.TOGGLE_DELETE_MULTIPLE_ENTRIES_DIALOG,
}),
toggleImportKanBanDialog: () => ({
- type: types.TOGGLE_IMPORT_KANBAN_DIALOG
+ type: types.TOGGLE_IMPORT_KANBAN_DIALOG,
}),
toggleUploadDialog: (title = '') => ({
type: types.TOGGLE_UPLOAD_DIALOG,
- title
+ title,
}),
toggleTruncatedConfirmDialog: () => ({
- type: types.TOGGLE_TRUNCATED_DIALOG
+ type: types.TOGGLE_TRUNCATED_DIALOG,
}),
/*setCurrentDirectoryDirs: dirs => ({
type: types.SET_CURRENT_DIRECTORY_DIRS,
dirs
}),*/
clearUploadDialog: () => ({
- type: types.CLEAR_UPLOAD_DIALOG
+ type: types.CLEAR_UPLOAD_DIALOG,
}),
toggleProgressDialog: () => ({
- type: types.TOGGLE_PROGRESS_DIALOG
+ type: types.TOGGLE_PROGRESS_DIALOG,
}),
openLocationManagerPanel: () => ({ type: types.OPEN_LOCATIONMANAGER_PANEL }),
openTagLibraryPanel: () => ({ type: types.OPEN_TAGLIBRARY_PANEL }),
@@ -975,16 +973,15 @@ export const actions = {
type: types.SET_SELECTED_ENTRIES,
selectedEntries
}),*/
- addTag: (tag: any, parentTagGroupUuid: TS.Uuid) => (
- dispatch: (action) => void,
- getState: () => any
- ) => {
- const { locations } = getState();
- addTag(tag, parentTagGroupUuid, getTagLibrary(), locations);
- dispatch(actions.tagLibraryChanged());
- },
+ addTag:
+ (tag: any, parentTagGroupUuid: TS.Uuid) =>
+ (dispatch: (action) => void, getState: () => any) => {
+ const { locations } = getState();
+ addTag(tag, parentTagGroupUuid, getTagLibrary(), locations);
+ dispatch(actions.tagLibraryChanged());
+ },
tagLibraryChanged: () => ({
- type: types.SET_TAG_LIBRARY_CHANGED
+ type: types.SET_TAG_LIBRARY_CHANGED,
}),
/*openDirectory: (directoryPath: string) => () => {
PlatformIO.openDirectory(directoryPath);
@@ -994,23 +991,23 @@ export const actions = {
},*/
setSearchFilter: (searchFilter: string) => ({
type: types.SET_SEARCH_FILTER,
- searchFilter
+ searchFilter,
}),
reflectDeleteEntry: (path: string) => ({
type: types.REFLECT_DELETE_ENTRY,
- path
+ path,
}),
reflectDeleteEntries: (paths: string[]) => ({
type: types.REFLECT_DELETE_ENTRIES,
- paths
+ paths,
}),
reflectCreateEntryInt: (newEntry: TS.FileSystemEntry) => ({
type: types.REFLECT_CREATE_ENTRY,
- newEntry
+ newEntry,
}),
reflectCreateEntries: (fsEntries: Array<TS.FileSystemEntry>) => ({
type: types.REFLECT_CREATE_ENTRIES,
- fsEntries
+ fsEntries,
}),
/*reflectCreateEntries: (fsEntries: Array<TS.FileSystemEntry>) => (
dispatch: (action) => void
@@ -1018,11 +1015,10 @@ export const actions = {
dispatch(actions.reflectCreateEntriesInt(fsEntries));
dispatch(actions.setSelectedEntries(fsEntries));
},*/
- reflectCreateEntry: (path: string, isFile: boolean) => (
- dispatch: (action) => void
- ) => {
- dispatch(actions.reflectCreateEntries([toFsEntry(path, isFile)]));
- },
+ reflectCreateEntry:
+ (path: string, isFile: boolean) => (dispatch: (action) => void) => {
+ dispatch(actions.reflectCreateEntries([toFsEntry(path, isFile)]));
+ },
/*reflectCreateEntryObj: (newEntry: TS.FileSystemEntry) => (
dispatch: (action) => void
) => {
@@ -1033,7 +1029,7 @@ export const actions = {
reflectRenameEntry: (path: string, newPath: string) => ({
type: types.REFLECT_RENAME_ENTRY,
path,
- newPath
+ newPath,
}),
/*reflectRenameEntry: (path: string, newPath: string) => (
dispatch: (action) => void
@@ -1044,8 +1040,8 @@ export const actions = {
},*/
reflectEditedEntryPaths: (editedEntryPaths: Array<TS.EditedEntryPath>) => ({
type: types.REFLECT_EDITED_ENTRY_PATHS,
- editedEntryPaths
- })
+ editedEntryPaths,
+ }),
/*openFileNatively: (selectedFile: string) => (
dispatch: (action) => void,
getState: () => any
diff --git a/app/reducers/index.ts b/app/reducers/index.ts
index 63c09e5bf..6224ec613 100644
--- a/app/reducers/index.ts
+++ b/app/reducers/index.ts
@@ -92,7 +92,7 @@ const rootPersistConfig: PersistConfig = {
storage,
version: 2,
blacklist,
- debug: false
+ debug: false,
// migrate: createMigrate(migrations, { debug: true }),
// https://github.com/rt2zz/redux-persist/blob/b6a60bd653d59c4fe462e2e0ea827fd76eb190e1/README.md#state-reconciler
// stateReconciler: autoMergeLevel2,
@@ -111,7 +111,7 @@ const rootReducer = persistCombineReducers(rootPersistConfig, {
app,
locations: externalLocations ? () => externalLocations : locations,
taglibrary, // externalTagLibrary ? () => externalTagLibrary : taglibrary,
- searches: externalSearches ? () => externalSearches : searches
+ searches: externalSearches ? () => externalSearches : searches,
});
export default rootReducer;
diff --git a/app/reducers/keybindings-default.ts b/app/reducers/keybindings-default.ts
index fd75363a3..d157684f3 100644
--- a/app/reducers/keybindings-default.ts
+++ b/app/reducers/keybindings-default.ts
@@ -2,47 +2,47 @@ export default function keyBindings(isMacLike) {
return [
{
name: 'selectAll',
- command: (isMacLike ? 'command' : 'ctrl') + '+a'
+ command: (isMacLike ? 'command' : 'ctrl') + '+a',
},
{
name: 'closeViewer',
- command: (isMacLike ? 'command' : 'ctrl') + '+w'
+ command: (isMacLike ? 'command' : 'ctrl') + '+w',
},
{
name: 'saveDocument',
- command: (isMacLike ? 'command' : 'ctrl') + '+s'
+ command: (isMacLike ? 'command' : 'ctrl') + '+s',
},
{
name: 'reloadDocument',
- command: (isMacLike ? 'command' : 'ctrl') + '+r'
+ command: (isMacLike ? 'command' : 'ctrl') + '+r',
},
{
name: 'editDocument',
- command: (isMacLike ? 'command' : 'ctrl') + '+e'
+ command: (isMacLike ? 'command' : 'ctrl') + '+e',
},
{
name: 'deleteDocument',
- command: 'del'
+ command: 'del',
},
{
name: 'showLocationManager',
- command: (isMacLike ? 'command' : 'ctrl') + '+1'
+ command: (isMacLike ? 'command' : 'ctrl') + '+1',
},
{
name: 'showTagLibrary',
- command: (isMacLike ? 'command' : 'ctrl') + '+2'
+ command: (isMacLike ? 'command' : 'ctrl') + '+2',
},
{
name: 'showSearch',
- command: (isMacLike ? 'command' : 'ctrl') + '+3'
+ command: (isMacLike ? 'command' : 'ctrl') + '+3',
},
{
name: 'toggleShowHiddenEntries',
- command: (isMacLike ? 'command' : 'ctrl') + '+h'
+ command: (isMacLike ? 'command' : 'ctrl') + '+h',
},
{
name: 'addRemoveTags',
- command: (isMacLike ? 'command' : 'ctrl') + '+t'
+ command: (isMacLike ? 'command' : 'ctrl') + '+t',
},
/* {
name: 'propertiesDocument',
@@ -50,19 +50,19 @@ export default function keyBindings(isMacLike) {
}, */
{
name: 'nextDocument',
- command: 'down'
+ command: 'down',
},
{
name: 'prevDocument',
- command: 'up'
+ command: 'up',
},
{
name: 'Escape',
- command: 'Escape'
+ command: 'Escape',
},
{
name: 'showHelp',
- command: 'f1'
+ command: 'f1',
},
// {
// name: 'reloadApplication',
@@ -70,7 +70,7 @@ export default function keyBindings(isMacLike) {
// },
{
name: 'toggleFullScreen',
- command: 'f11'
+ command: 'f11',
},
// {
// name: 'openDevTools',
@@ -78,31 +78,31 @@ export default function keyBindings(isMacLike) {
// },
{
name: 'openSearch',
- command: (isMacLike ? 'command' : 'ctrl') + '+f'
+ command: (isMacLike ? 'command' : 'ctrl') + '+f',
},
{
name: 'renameFile',
- command: 'f2'
+ command: 'f2',
},
{
name: 'openEntry',
- command: 'alt+enter'
+ command: 'alt+enter',
},
{
name: 'openParentDirectory',
- command: 'backspace'
+ command: 'backspace',
},
{
name: 'openFileExternally',
- command: (isMacLike ? 'command' : 'ctrl') + '+enter'
+ command: (isMacLike ? 'command' : 'ctrl') + '+enter',
},
{
name: 'zoomIn',
- command: (isMacLike ? 'command' : 'ctrl') + '+shift+'
+ command: (isMacLike ? 'command' : 'ctrl') + '+shift+',
},
{
name: 'zoomOut',
- command: (isMacLike ? 'command' : 'ctrl') + '+-'
- }
+ command: (isMacLike ? 'command' : 'ctrl') + '+-',
+ },
];
}
diff --git a/app/reducers/locations.ts b/app/reducers/locations.ts
index 262669460..486984f3f 100644
--- a/app/reducers/locations.ts
+++ b/app/reducers/locations.ts
@@ -18,7 +18,7 @@
import {
immutablySwapItems,
- locationType
+ locationType,
} from '@tagspaces/tagspaces-common/misc';
import { actions as AppActions } from '-/reducers/app';
import PlatformIO from '-/services/platform-facade';
@@ -37,7 +37,7 @@ export const types = {
MOVE_UP_LOCATION: 'APP/MOVE_UP_LOCATION',
MOVE_DOWN_LOCATION: 'APP/MOVE_DOWN_LOCATION',
EDIT_LOCATION: 'APP/EDIT_LOCATION',
- REMOVE_LOCATION: 'APP/REMOVE_LOCATION'
+ REMOVE_LOCATION: 'APP/REMOVE_LOCATION',
};
export const initialState = [];
@@ -46,13 +46,13 @@ export default (state: Array<TS.Location> = initialState, action: any) => {
switch (action.type) {
case types.ADD_LOCATION: {
const locations = action.location.isDefault
- ? state.map(location => ({ ...location, isDefault: false }))
+ ? state.map((location) => ({ ...location, isDefault: false }))
: [...state];
const newLocation = {
...action.location,
uuid: action.location.uuid || getUuid(),
- creationDate: new Date().toJSON()
+ creationDate: new Date().toJSON(),
};
if (action.locationPosition) {
locations.splice(action.locationPosition, 0, newLocation);
@@ -83,9 +83,9 @@ export default (state: Array<TS.Location> = initialState, action: any) => {
action.location.newuuid !== undefined
? action.location.newuuid
: action.location.uuid,
- persistTagsInSidecarFile: action.location.persistTagsInSidecarFile
+ persistTagsInSidecarFile: action.location.persistTagsInSidecarFile,
},
- ...state.slice(indexForEditing + 1)
+ ...state.slice(indexForEditing + 1),
];
}
return state;
@@ -141,7 +141,7 @@ export default (state: Array<TS.Location> = initialState, action: any) => {
if (indexForRemoving >= 0) {
return [
...state.slice(0, indexForRemoving),
- ...state.slice(indexForRemoving + 1)
+ ...state.slice(indexForRemoving + 1),
];
// return state.filter( (item, index) => index !== indexForRemoving);
}
@@ -156,21 +156,21 @@ export default (state: Array<TS.Location> = initialState, action: any) => {
export const actions = {
createLocation: (
location: TS.Location,
- locationPosition: number = undefined
+ locationPosition: number = undefined,
) => ({
type: types.ADD_LOCATION,
location,
- locationPosition
+ locationPosition,
}),
moveLocation: (uuid: string, position: number) => ({
type: types.MOVE_LOCATION,
uuid,
- position
+ position,
}),
moveLocationUp: (uuid: string) => ({ type: types.MOVE_UP_LOCATION, uuid }),
moveLocationDown: (uuid: string) => ({
type: types.MOVE_DOWN_LOCATION,
- uuid
+ uuid,
}),
/*editLocation: (location: TS.Location, openAfterEdit = true) => (
dispatch: (actions: Object) => void
@@ -216,7 +216,7 @@ export const actions = {
},*/
changeLocation: (location: TS.Location) => ({
type: types.EDIT_LOCATION,
- location
+ location,
}),
/*removeLocation: (location: TS.Location) => (
dispatch: (actions: Object) => void
@@ -226,26 +226,26 @@ export const actions = {
},*/
deleteLocation: (location: TS.Location) => ({
type: types.REMOVE_LOCATION,
- location
- })
+ location,
+ }),
};
// Selectors
export const getLocations = (state: any): Array<TS.Location> => state.locations;
export const getLocation = (
state: any,
- locationId: string
+ locationId: string,
): TS.Location | null =>
- state.locations.find(location => location.uuid === locationId);
+ state.locations.find((location) => location.uuid === locationId);
/*export const getLocationPosition = (state: any, locationId: string): number =>
state.locations.findIndex(location => location.uuid === locationId);*/
export const getLocationByPath = (
state: any,
- path: string
+ path: string,
): TS.Location | null =>
- state.locations.find(location => location.path === path);
+ state.locations.find((location) => location.path === path);
export const getDefaultLocationId = (state: any): string | undefined => {
- let foundLocation = state.locations.find(location => location.isDefault);
+ let foundLocation = state.locations.find((location) => location.isDefault);
return foundLocation ? foundLocation.uuid : undefined;
};
/*export const getCurrentLocation = (state: any): TS.Location | undefined => {
@@ -256,10 +256,10 @@ export const getDefaultLocationId = (state: any): string | undefined => {
};*/
export const getFirstRWLocation = (state: any): TS.Location | undefined => {
let foundLocation = state.locations.find(
- location => location.isDefault && !location.isReadOnly
+ (location) => location.isDefault && !location.isReadOnly,
);
if (!foundLocation) {
- foundLocation = state.locations.find(location => !location.isReadOnly);
+ foundLocation = state.locations.find((location) => !location.isReadOnly);
}
return foundLocation;
};
diff --git a/app/reducers/searches.ts b/app/reducers/searches.ts
index a54604bf3..b2aaf5139 100644
--- a/app/reducers/searches.ts
+++ b/app/reducers/searches.ts
@@ -26,7 +26,7 @@ export const types = {
EDIT_SEARCH: 'SEARCH/EDIT_SEARCH',
MOVE_UP_SEARCH: 'SEARCH/MOVE_UP_SEARCH',
MOVE_DOWN_SEARCH: 'SEARCH/MOVE_DOWN_SEARCH',
- REMOVE_SEARCH: 'SEARCH/REMOVE_SEARCH'
+ REMOVE_SEARCH: 'SEARCH/REMOVE_SEARCH',
};
export default (state: Array<TS.SearchQuery> = initialState, action: any) => {
@@ -36,14 +36,14 @@ export default (state: Array<TS.SearchQuery> = initialState, action: any) => {
return [
...state,
{
- ...search
+ ...search,
// creationDate: new Date().getTime()
- }
+ },
];
}
case types.EDIT_SEARCH: {
const indexForEditing = state.findIndex(
- search => search.uuid === action.search.uuid
+ (search) => search.uuid === action.search.uuid,
);
if (indexForEditing >= 0) {
@@ -51,16 +51,16 @@ export default (state: Array<TS.SearchQuery> = initialState, action: any) => {
...state.slice(0, indexForEditing),
{
// ...state[indexForEditing],
- ...action.search
+ ...action.search,
},
- ...state.slice(indexForEditing + 1)
+ ...state.slice(indexForEditing + 1),
];
}
return state;
}
case types.MOVE_UP_SEARCH: {
const indexForUpdating = state.findIndex(
- search => search.uuid === action.uuid
+ (search) => search.uuid === action.uuid,
);
if (indexForUpdating > 0) {
@@ -71,7 +71,7 @@ export default (state: Array<TS.SearchQuery> = initialState, action: any) => {
}
case types.MOVE_DOWN_SEARCH: {
const indexForUpdating = state.findIndex(
- search => search.uuid === action.uuid
+ (search) => search.uuid === action.uuid,
);
if (indexForUpdating >= 0 && indexForUpdating < state.length - 1) {
@@ -82,13 +82,13 @@ export default (state: Array<TS.SearchQuery> = initialState, action: any) => {
}
case types.REMOVE_SEARCH: {
const indexForRemoving = state.findIndex(
- search => search.uuid === action.uuid
+ (search) => search.uuid === action.uuid,
);
if (indexForRemoving >= 0) {
return [
...state.slice(0, indexForRemoving),
- ...state.slice(indexForRemoving + 1)
+ ...state.slice(indexForRemoving + 1),
];
}
return state;
@@ -102,37 +102,36 @@ export default (state: Array<TS.SearchQuery> = initialState, action: any) => {
export const actions = {
addSearch: (search: TS.SearchQuery) => ({
type: types.ADD_SEARCH,
- search
+ search,
}),
- addSearches: (arrSearches: Array<TS.SearchQuery>, override = true) => (
- dispatch: (actions: Object) => void,
- getState: () => any
- ) => {
- arrSearches.forEach((newSearch: TS.SearchQuery) => {
- const { searches } = getState();
- const searchExist: boolean = searches.some(
- location => location.uuid === newSearch.uuid
- );
- if (!searchExist) {
- dispatch(actions.addSearch(newSearch));
- } else if (override) {
- dispatch(actions.editSearch(newSearch));
- }
- });
- },
+ addSearches:
+ (arrSearches: Array<TS.SearchQuery>, override = true) =>
+ (dispatch: (actions: Object) => void, getState: () => any) => {
+ arrSearches.forEach((newSearch: TS.SearchQuery) => {
+ const { searches } = getState();
+ const searchExist: boolean = searches.some(
+ (location) => location.uuid === newSearch.uuid,
+ );
+ if (!searchExist) {
+ dispatch(actions.addSearch(newSearch));
+ } else if (override) {
+ dispatch(actions.editSearch(newSearch));
+ }
+ });
+ },
moveSearchUp: (uuid: string) => ({ type: types.MOVE_UP_SEARCH, uuid }),
moveSearchDown: (uuid: string) => ({
type: types.MOVE_DOWN_SEARCH,
- uuid
+ uuid,
}),
editSearch: (search: TS.SearchQuery) => ({
type: types.EDIT_SEARCH,
- search
+ search,
}),
removeSearch: (uuid: string) => ({
type: types.REMOVE_SEARCH,
- uuid
- })
+ uuid,
+ }),
/* getSearch: (uuid: string) => (
dispatch: (actions: Object) => void,
getState: () => any
diff --git a/app/reducers/settings-default.ts b/app/reducers/settings-default.ts
index 3b17995ea..5bc2a58a1 100644
--- a/app/reducers/settings-default.ts
+++ b/app/reducers/settings-default.ts
@@ -112,112 +112,112 @@ export default {
supportedLanguages: [
{
iso: 'en',
- title: 'English'
+ title: 'English',
},
{
iso: 'de_DE',
- title: 'Deutsch (German)'
+ title: 'Deutsch (German)',
},
{
iso: 'it',
- title: 'Italiano (Italian)'
+ title: 'Italiano (Italian)',
},
{
iso: 'zh_CN',
- title: '中国的 (Chinese)'
+ title: '中国的 (Chinese)',
},
{
iso: 'bg',
- title: 'Български (Bulgarian)'
+ title: 'Български (Bulgarian)',
},
{
iso: 'ja',
- title: '日本の (Japanese)'
+ title: '日本の (Japanese)',
},
{
iso: 'pt_BR',
- title: 'Português (Brazil)'
+ title: 'Português (Brazil)',
},
{
iso: 'pt_PT',
- title: 'Português (Portugal)'
+ title: 'Português (Portugal)',
},
{
iso: 'fr',
- title: 'Français (French)'
+ title: 'Français (French)',
},
{
iso: 'sk_SK',
- title: 'Slovenský (Slovak)'
+ title: 'Slovenský (Slovak)',
},
{
iso: 'es',
- title: 'Español (Spanish)'
+ title: 'Español (Spanish)',
},
{
iso: 'uk',
- title: 'Український (Ukrainian)'
+ title: 'Український (Ukrainian)',
},
{
iso: 'ru',
- title: 'Русский (Russian)'
+ title: 'Русский (Russian)',
},
{
iso: 'tr',
- title: 'Türk (Turkish)'
+ title: 'Türk (Turkish)',
},
{
iso: 'cs',
- title: 'Čeština (Czech)'
+ title: 'Čeština (Czech)',
},
{
iso: 'ca',
- title: 'Catalan (Català)'
+ title: 'Catalan (Català)',
},
{
iso: 'ko',
- title: '한국의 (Korean)'
+ title: '한국의 (Korean)',
},
{
iso: 'el',
- title: 'ελληνικά (Greek)'
+ title: 'ελληνικά (Greek)',
},
{
iso: 'sv',
- title: 'svenska (Swedish)'
+ title: 'svenska (Swedish)',
},
{
iso: 'nl_NL',
- title: 'Nederlands (Dutch)'
+ title: 'Nederlands (Dutch)',
},
{
iso: 'zh_TW',
- title: '台灣 (Chinese Taiwan)'
+ title: '台灣 (Chinese Taiwan)',
},
{
iso: 'hu',
- title: 'Magyar (Hungarian)'
+ title: 'Magyar (Hungarian)',
},
{
iso: 'id_ID',
- title: 'bahasa Indonesia (Indonesian)'
+ title: 'bahasa Indonesia (Indonesian)',
},
{
iso: 'hy',
- title: 'հայերեն (Armenian)'
+ title: 'հայերեն (Armenian)',
},
{
iso: 'nb',
- title: 'Bokmål (Norwegian)'
+ title: 'Bokmål (Norwegian)',
},
{
iso: 'fr_CA',
- title: 'français canadien (Canadian French)'
+ title: 'français canadien (Canadian French)',
},
{
iso: 'zh_HK',
- title: '漢語 (Chinese Hong Kong)'
- }
+ title: '漢語 (Chinese Hong Kong)',
+ },
],
keyBindings: keyBindings(AppConfig.isMacLike),
supportedFileTypes: supportedFileTypes,
@@ -228,14 +228,14 @@ export default {
name: 'Standard',
serverURL: 'https://{s}.tile.osm.org/{z}/{x}/{y}.png',
serverInfo:
- '<b>Leaflet</b> | Map data: &copy; <b>https://openstreetmap.org/copyright</b> contributors, <b>CC-BY-SA</b>, Imagery © <b>Mapbox</b>'
+ '<b>Leaflet</b> | Map data: &copy; <b>https://openstreetmap.org/copyright</b> contributors, <b>CC-BY-SA</b>, Imagery © <b>Mapbox</b>',
},
{
uuid: getUuid(),
name: 'Topographic',
serverURL: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
serverInfo:
- '<b>Leaflet</b> | Map data: &copy; <b>https://openstreetmap.org/copyright</b> contributors, SRTM | Map style: &copy; <b>https://opentopomap.org</b> - OpenTopoMap (<b>https://creativecommons.org/licenses/by-sa/3.0/</b> - CC-BY-SA'
- }
- ]
+ '<b>Leaflet</b> | Map data: &copy; <b>https://openstreetmap.org/copyright</b> contributors, SRTM | Map style: &copy; <b>https://opentopomap.org</b> - OpenTopoMap (<b>https://creativecommons.org/licenses/by-sa/3.0/</b> - CC-BY-SA',
+ },
+ ],
};
diff --git a/app/reducers/settings.ts b/app/reducers/settings.ts
index e234033f1..bce0e9e36 100644
--- a/app/reducers/settings.ts
+++ b/app/reducers/settings.ts
@@ -30,7 +30,7 @@ import {
getDefaultEditor,
getDefaultViewer,
mergeByProp,
- updateByProp
+ updateByProp,
} from '-/services/utils-io';
export const types = {
@@ -98,7 +98,7 @@ export const types = {
SET_SHOW_BOOKMARKS: 'SET_SHOW_BOOKMARKS',
SET_FILE_OPEN_HISTORY: 'SET_FILE_OPEN_HISTORY',
SET_FOLDER_OPEN_HISTORY: 'SET_FOLDER_OPEN_HISTORY',
- SET_FILE_EDIT_HISTORY: 'SET_FILE_EDIT_HISTORY'
+ SET_FILE_EDIT_HISTORY: 'SET_FILE_EDIT_HISTORY',
};
export default (state: any = defaultSettings, action: any) => {
@@ -107,11 +107,11 @@ export default (state: any = defaultSettings, action: any) => {
// const currentVersion = semver.coerce(versionMeta.version);
// console.log('---->' + currentVersion);
- const mergedKeyBindings = defaultSettings.keyBindings.map(x =>
+ const mergedKeyBindings = defaultSettings.keyBindings.map((x) =>
Object.assign(
x,
- state.keyBindings.find(y => y.name === x.name)
- )
+ state.keyBindings.find((y) => y.name === x.name),
+ ),
);
return {
...defaultSettings,
@@ -127,13 +127,13 @@ export default (state: any = defaultSettings, action: any) => {
supportedLanguages: defaultSettings.supportedLanguages, // taking always the languages from default settings
keyBindings: [
// ...defaultSettings.keyBindings, // use to reset to the default key bindings
- ...mergedKeyBindings
+ ...mergedKeyBindings,
],
supportedFileTypes: mergeByProp(
defaultSettings.supportedFileTypes,
state.supportedFileTypes,
- 'type'
- )
+ 'type',
+ ),
};
}
case types.TOGGLE_SHOWUNIXHIDDENENTRIES: {
@@ -175,7 +175,7 @@ export default (state: any = defaultSettings, action: any) => {
case types.WARNING_OPENING_FILES_EXTERNALLY: {
return {
...state,
- warningOpeningFilesExternally: action.warningOpeningFilesExternally
+ warningOpeningFilesExternally: action.warningOpeningFilesExternally,
};
}
case types.SET_SAVE_TAGS_IN_LOCATION: {
@@ -232,7 +232,7 @@ export default (state: any = defaultSettings, action: any) => {
case types.SET_PERSISTTAGSINSIDECARFILE: {
return {
...state,
- persistTagsInSidecarFile: action.persistTagsInSidecarFile
+ persistTagsInSidecarFile: action.persistTagsInSidecarFile,
};
}
case types.SET_ADDTAGSTOLIBRARY: {
@@ -254,7 +254,7 @@ export default (state: any = defaultSettings, action: any) => {
return {
...state,
//isLoading: true,
- email: action.email
+ email: action.email,
};
}
case types.SET_TAGCOLOR: {
@@ -302,8 +302,8 @@ export default (state: any = defaultSettings, action: any) => {
keyBindings: [
...state.keyBindings.slice(0, indexForEditing),
{ name: action.keyBindingName, command: action.keyBindingCommand },
- ...state.keyBindings.slice(indexForEditing + 1)
- ]
+ ...state.keyBindings.slice(indexForEditing + 1),
+ ],
};
}
return state;
@@ -311,7 +311,7 @@ export default (state: any = defaultSettings, action: any) => {
case types.SET_GLOBAL_KEYBINDING: {
return {
...state,
- enableGlobalKeyboardShortcuts: action.enableGlobalKeyboardShortcuts
+ enableGlobalKeyboardShortcuts: action.enableGlobalKeyboardShortcuts,
};
}
case types.SET_ZOOM_RESET: {
@@ -345,7 +345,7 @@ export default (state: any = defaultSettings, action: any) => {
case types.SET_SUPPORTED_FILE_TYPES: {
return {
...state,
- supportedFileTypes: action.supportedFileTypes
+ supportedFileTypes: action.supportedFileTypes,
};
}
case types.ADD_SUPPORTED_FILE_TYPES: {
@@ -354,8 +354,8 @@ export default (state: any = defaultSettings, action: any) => {
supportedFileTypes: updateByProp(
state.supportedFileTypes,
action.supportedFileTypes,
- 'type'
- )
+ 'type',
+ ),
};
}
case types.ENABLE_EXTENSION: {
@@ -369,21 +369,21 @@ export default (state: any = defaultSettings, action: any) => {
}
} else {
enabledExtensions = state.enabledExtensions.filter(
- extensionId => extensionId === action.extensionId
+ (extensionId) => extensionId === action.extensionId,
);
supportedFileTypes = state.supportedFileTypes.filter(
- fType =>
+ (fType) =>
!(
fType.viewer === action.extensionId &&
fType.editor === action.extensionId
- )
+ ),
);
}
return {
...state,
enabledExtensions: enabledExtensions,
- ...(supportedFileTypes && { supportedFileTypes: supportedFileTypes })
+ ...(supportedFileTypes && { supportedFileTypes: supportedFileTypes }),
};
}
case types.REMOVE_SUPPORTED_FILE_TYPES: {
@@ -391,64 +391,64 @@ export default (state: any = defaultSettings, action: any) => {
(fType: TS.FileTypes) => ({
...fType,
...(fType.viewer === action.extensionId && {
- viewer: getDefaultViewer(fType.type)
+ viewer: getDefaultViewer(fType.type),
}),
...(fType.editor === action.extensionId && {
- editor: getDefaultEditor(fType.type)
- })
- })
+ editor: getDefaultEditor(fType.type),
+ }),
+ }),
);
return {
...state,
- supportedFileTypes: supportedFileTypes
+ supportedFileTypes: supportedFileTypes,
};
}
case types.SET_ENTRY_PROPERTIES_SPLIT_SIZE: {
return {
...state,
- entrySplitSize: action.entrySplitSize
+ entrySplitSize: action.entrySplitSize,
};
}
case types.SET_MAIN_VSPLIT_SIZE: {
return {
...state,
- mainVSplitSize: action.mainVSplitSize
+ mainVSplitSize: action.mainVSplitSize,
};
}
case types.SET_LAST_PUBLISHED_VERSION: {
return {
...state,
- lastPublishedVersion: action.lastPublishedVersion
+ lastPublishedVersion: action.lastPublishedVersion,
};
}
case types.SET_STORED_SEARCHES_VISIBLE: {
return {
...state,
- storedSearchesVisible: action.storedSearchesVisible
+ storedSearchesVisible: action.storedSearchesVisible,
};
}
case types.SET_SHOW_BOOKMARKS: {
return {
...state,
- showBookmarks: action.showBookmarks
+ showBookmarks: action.showBookmarks,
};
}
case types.SET_FILE_OPEN_HISTORY: {
return {
...state,
- fileOpenHistory: action.fileOpenHistory
+ fileOpenHistory: action.fileOpenHistory,
};
}
case types.SET_FOLDER_OPEN_HISTORY: {
return {
...state,
- folderOpenHistory: action.folderOpenHistory
+ folderOpenHistory: action.folderOpenHistory,
};
}
case types.SET_FILE_EDIT_HISTORY: {
return {
...state,
- fileEditHistory: action.fileEditHistory
+ fileEditHistory: action.fileEditHistory,
};
}
case types.TOGGLE_TAGGROUP: {
@@ -456,7 +456,7 @@ export default (state: any = defaultSettings, action: any) => {
if (state.tagGroupCollapsed) {
if (state.tagGroupCollapsed.includes(action.uuid)) {
tagGroupCollapsed = state.tagGroupCollapsed.filter(
- tagGroupUUID => tagGroupUUID !== action.uuid
+ (tagGroupUUID) => tagGroupUUID !== action.uuid,
);
} else {
tagGroupCollapsed = [...state.tagGroupCollapsed, action.uuid];
@@ -466,7 +466,7 @@ export default (state: any = defaultSettings, action: any) => {
}
return {
...state,
- tagGroupCollapsed
+ tagGroupCollapsed,
};
}
case types.ADD_MAPTILE_SERVER: {
@@ -474,17 +474,17 @@ export default (state: any = defaultSettings, action: any) => {
if (action.isDefault) {
mapTileServers = [
{ ...action.tileServer, uuid: getUuid() },
- ...state.mapTileServers
+ ...state.mapTileServers,
];
} else {
mapTileServers = [
...state.mapTileServers,
- { ...action.tileServer, uuid: getUuid() }
+ { ...action.tileServer, uuid: getUuid() },
];
}
return {
...state,
- mapTileServers
+ mapTileServers,
};
}
case types.EDIT_MAPTILE_SERVER: {
@@ -493,30 +493,30 @@ export default (state: any = defaultSettings, action: any) => {
mapTileServers = [
action.tileServer,
...state.mapTileServers.filter(
- tileServer => tileServer.uuid !== action.tileServer.uuid
- )
+ (tileServer) => tileServer.uuid !== action.tileServer.uuid,
+ ),
];
} else {
mapTileServers = [
...state.mapTileServers.filter(
- tileServer => tileServer.uuid !== action.tileServer.uuid
+ (tileServer) => tileServer.uuid !== action.tileServer.uuid,
),
- action.tileServer
+ action.tileServer,
];
}
return {
...state,
- mapTileServers
+ mapTileServers,
};
}
case types.DELETE_MAPTILE_SERVER: {
const mapTileServers = state.mapTileServers.filter(
- tileServer => tileServer.uuid !== action.uuid
+ (tileServer) => tileServer.uuid !== action.uuid,
);
return {
...state,
- mapTileServers
+ mapTileServers,
};
}
default: {
@@ -529,69 +529,69 @@ export const actions = {
addTileServers: (tileServer: TS.MapTileServer, isDefault = false) => ({
type: types.ADD_MAPTILE_SERVER,
tileServer,
- isDefault
+ isDefault,
}),
editTileServers: (tileServer: TS.MapTileServer, isDefault = false) => ({
type: types.EDIT_MAPTILE_SERVER,
tileServer,
- isDefault
+ isDefault,
}),
deleteTileServer: (uuid: string) => ({
type: types.DELETE_MAPTILE_SERVER,
- uuid
+ uuid,
}),
toggleTagGroup: (tagGroupUUID: string) => ({
type: types.TOGGLE_TAGGROUP,
- uuid: tagGroupUUID
+ uuid: tagGroupUUID,
}),
setTagDelimiter: (delimiter: string) => ({
type: types.SET_TAG_DELIMITER,
- delimiter
+ delimiter,
}),
setMaxSearchResult: (maxSearchResult: number) => ({
type: types.SET_MAX_SEARCH_RESULT,
- maxSearchResult
+ maxSearchResult,
}),
setDesktopMode: (desktopMode: boolean) => ({
type: types.SET_DESKTOPMODE,
- desktopMode
+ desktopMode,
}),
setDevMode: (devMode: boolean) => ({
type: types.SET_DEVMODE,
- devMode
+ devMode,
}),
setEnableWS: (enableWS: boolean) => ({
type: types.SET_ENABLE_WS,
- enableWS
+ enableWS,
}),
setWarningOpeningFilesExternally: (
- warningOpeningFilesExternally: boolean
+ warningOpeningFilesExternally: boolean,
) => ({
type: types.WARNING_OPENING_FILES_EXTERNALLY,
- warningOpeningFilesExternally
+ warningOpeningFilesExternally,
}),
setSaveTagInLocation: (saveTagInLocation: boolean) => ({
type: types.SET_SAVE_TAGS_IN_LOCATION,
- saveTagInLocation
+ saveTagInLocation,
}),
toggleShowUnixHiddenEntries: () => ({
- type: types.TOGGLE_SHOWUNIXHIDDENENTRIES
+ type: types.TOGGLE_SHOWUNIXHIDDENENTRIES,
}),
setEntryContainerTab: (tabIndex: number) => ({
type: types.SET_ENTRY_CONTAINER_TAB,
- entryContainerTab: tabIndex
+ entryContainerTab: tabIndex,
}),
setShowDetails: (showDetails: boolean) => ({
type: types.SET_SHOW_DETAILS,
- showDetails: showDetails
+ showDetails: showDetails,
}),
setCheckForUpdates: (checkForUpdates: boolean) => ({
type: types.SET_CHECKFORUPDATES,
- checkForUpdates
+ checkForUpdates,
}),
reorderTags: (reorderTags: boolean) => ({
type: types.SET_REORDER_TAGS,
- reorderTags
+ reorderTags,
}),
/*setLanguage: (language: string) => (dispatch: (action) => void) => {
return i18n.changeLanguage(language).then(() => {
@@ -600,75 +600,75 @@ export const actions = {
},*/
setLanguage: (language: string) => ({
type: types.SET_LANGUAGE,
- language
+ language,
}),
setUseDefaultLocation: (useDefaultLocation: boolean) => ({
type: types.SET_USEDEFAULTLOCATION,
- useDefaultLocation
+ useDefaultLocation,
}),
setDefaultPerspective: (defaultPerspective: string) => ({
type: types.SET_DEFAULTPERSPECTIVE,
- defaultPerspective
+ defaultPerspective,
}),
setColoredFileExtension: (coloredFileExtension: boolean) => ({
type: types.SET_COLOREDFILEEXTENSION,
- coloredFileExtension
+ coloredFileExtension,
}),
setShowTagAreaOnStartup: (showTagAreaOnStartup: boolean) => ({
type: types.SET_SHOWTAGAREAONSTARTUP,
- showTagAreaOnStartup
+ showTagAreaOnStartup,
}),
setLoadsLocationMetaData: (loadsLocationMetaData: boolean) => ({
type: types.SET_LOADSLOCATIONMETADATA,
- loadsLocationMetaData
+ loadsLocationMetaData,
}),
setSearchInSubfolders: (searchInSubfolders: boolean) => ({
type: types.SET_SEARCHINSUBFOLDERS,
- searchInSubfolders
+ searchInSubfolders,
}),
setWatchCurrentDirectory: (watchCurrentDirectory: boolean) => ({
type: types.SET_WATCHCURRENTDIRECTORY,
- watchCurrentDirectory
+ watchCurrentDirectory,
}),
setCalculateTags: (calculateTags: boolean) => ({
type: types.SET_CALCULATETAGS,
- calculateTags
+ calculateTags,
}),
setUseTrashCan: (useTrashCan: boolean) => ({
type: types.SET_USETRASHCAN,
- useTrashCan
+ useTrashCan,
}),
setPersistTagsInSidecarFile: (persistTagsInSidecarFile: boolean) => ({
type: types.SET_PERSISTTAGSINSIDECARFILE,
- persistTagsInSidecarFile
+ persistTagsInSidecarFile,
}),
setAddTagsToLibrary: (addTagsToLibrary: boolean) => ({
type: types.SET_ADDTAGSTOLIBRARY,
- addTagsToLibrary
+ addTagsToLibrary,
}),
setRevisionsEnabled: (enabled: boolean) => ({
type: types.SET_REVISIONS_ENABLED,
- enabled
+ enabled,
}),
setPrefixTagContainer: (prefixTagContainer: boolean) => ({
type: types.SET_PREFIX_TAG_CONTAINER,
- prefixTagContainer
+ prefixTagContainer,
}),
setUseGenerateThumbnails: (useGenerateThumbnails: boolean) => ({
type: types.SET_USEGENERATETHUMBNAILS,
- useGenerateThumbnails
+ useGenerateThumbnails,
}),
setUseTextExtraction: (useTextExtraction: boolean) => ({
type: types.SET_USETEXTEXTRACTION,
- useTextExtraction
+ useTextExtraction,
}),
setAppDataPath: (path: string) => ({
type: types.SET_APPDATAPATH,
- path
+ path,
}),
setContentHash: (contentHash: string) => ({
type: types.SET_CONTENTHASH,
- contentHash
+ contentHash,
}),
setEmail: (email: string) => ({ type: types.SET_EMAIL, email }),
setZoomRestoreApp: () => ({ type: types.SET_ZOOM_RESTORE }),
@@ -677,131 +677,136 @@ export const actions = {
setZoomOutApp: () => ({ type: types.SET_ZOOM_OUT }),
setTagColor: (tagColor: string) => ({
type: types.SET_TAGCOLOR,
- tagColor
+ tagColor,
}),
setTagTextColor: (tagTextColor: string) => ({
type: types.SET_TAGTEXTCOLOR,
- tagTextColor
+ tagTextColor,
}),
setCurrentTheme: (currentTheme: string) => ({
type: types.SET_CURRENTTHEME,
- currentTheme
+ currentTheme,
}),
setCurrentRegularTheme: (currentRegularTheme: string) => ({
type: types.SET_CURRENT_REGULAR_THEME,
- currentRegularTheme
+ currentRegularTheme,
}),
setCurrentDarkTheme: (currentDarkTheme: string) => ({
type: types.SET_CURRENT_DARK_THEME,
- currentDarkTheme
+ currentDarkTheme,
}),
setGeoTaggingFormat: (geoTaggingFormat: string) => ({
type: types.SET_GEO_TAGGING_FORMAT,
- geoTaggingFormat
+ geoTaggingFormat,
}),
setHistory: (key: string, value: number) => ({
type: types.SET_HISTORY,
key,
- value
+ value,
}),
switchTheme: () => ({ type: types.SWITCH_THEME }),
setKeyBinding: (keyBindingName: string, keyBindingCommand: string) => ({
type: types.SET_KEYBINDING,
keyBindingName,
- keyBindingCommand
+ keyBindingCommand,
}),
setGlobalKeyBinding: (enableGlobalKeyboardShortcuts: boolean) => ({
type: types.SET_GLOBAL_KEYBINDING,
- enableGlobalKeyboardShortcuts
+ enableGlobalKeyboardShortcuts,
}),
addSupportedFileTypes: (
supportedFileTypes: Array<TS.FileTypes>,
- override = false
+ override = false,
) => ({
type: types.ADD_SUPPORTED_FILE_TYPES,
supportedFileTypes,
- override
+ override,
}),
removeSupportedFileTypes: (extensionId: string) => ({
type: types.REMOVE_SUPPORTED_FILE_TYPES,
- extensionId
+ extensionId,
}),
enableExtension: (extensionId: string, enabled: boolean) => ({
type: types.ENABLE_EXTENSION,
extensionId,
- enabled
+ enabled,
}),
setSupportedFileTypes: (supportedFileTypes: []) => ({
type: types.SET_SUPPORTED_FILE_TYPES,
- supportedFileTypes
+ supportedFileTypes,
}),
setEntryPropertiesSplitSize: (entrySplitSize: string) => ({
type: types.SET_ENTRY_PROPERTIES_SPLIT_SIZE,
- entrySplitSize
+ entrySplitSize,
}),
setMainVerticalSplitSize: (mainVSplitSize: string) => ({
type: types.SET_MAIN_VSPLIT_SIZE,
- mainVSplitSize
+ mainVSplitSize,
}),
setFirstRun: (firstRun: boolean) => ({
type: types.SET_FIRST_RUN,
- firstRun
+ firstRun,
}),
upgradeSettings: () => ({
- type: types.UPGRADE_SETTINGS
+ type: types.UPGRADE_SETTINGS,
}),
setLastPublishedVersion: (lastPublishedVersion: string) => ({
type: types.SET_LAST_PUBLISHED_VERSION,
- lastPublishedVersion
+ lastPublishedVersion,
}),
setStoredSearchesVisible: (storedSearchesVisible: boolean) => ({
type: types.SET_STORED_SEARCHES_VISIBLE,
- storedSearchesVisible
+ storedSearchesVisible,
}),
setShowBookmarks: (showBookmarks: boolean) => ({
type: types.SET_SHOW_BOOKMARKS,
- showBookmarks
+ showBookmarks,
}),
setFileOpenHistory: (fileOpenHistory: boolean) => ({
type: types.SET_FILE_OPEN_HISTORY,
- fileOpenHistory
+ fileOpenHistory,
}),
setFolderOpenHistory: (folderOpenHistory: boolean) => ({
type: types.SET_FOLDER_OPEN_HISTORY,
- folderOpenHistory
+ folderOpenHistory,
}),
setFileEditHistory: (fileEditHistory: boolean) => ({
type: types.SET_FILE_EDIT_HISTORY,
- fileEditHistory
- }),
- checkForUpdate: () => (
- dispatch: (actions: Object) => void
- // getState: () => any
- ) => {
- // const { settings } = getState();
- getLastVersionPromise()
- .then(lastVersion => {
- console.log('Last version on server: ' + lastVersion);
- const newVersion = semver.coerce(lastVersion); // lastVersion '3.0.5' ;
- const currentVersion = semver.coerce(versionMeta.version);
- // const lastPublishedVersion = semver.coerce(settings.lastPublishedVersion);
- if (semver.valid(newVersion) && semver.gt(newVersion, currentVersion)) {
- console.log('New version available: ' + newVersion.version + '!');
- dispatch(actions.setLastPublishedVersion(newVersion.version));
- // if (semver.gt(newVersion, lastPublishedVersion)) {
- dispatch(AppActions.setUpdateAvailable(true));
- // }
- } else {
- console.log(
- 'Current version: ' + versionMeta.version + ' is up to date'
- );
- }
- return true;
- })
- .catch(error => {
- console.warn('Error while checking for update: ' + error);
- });
- }
+ fileEditHistory,
+ }),
+ checkForUpdate:
+ () =>
+ (
+ dispatch: (actions: Object) => void,
+ // getState: () => any
+ ) => {
+ // const { settings } = getState();
+ getLastVersionPromise()
+ .then((lastVersion) => {
+ console.log('Last version on server: ' + lastVersion);
+ const newVersion = semver.coerce(lastVersion); // lastVersion '3.0.5' ;
+ const currentVersion = semver.coerce(versionMeta.version);
+ // const lastPublishedVersion = semver.coerce(settings.lastPublishedVersion);
+ if (
+ semver.valid(newVersion) &&
+ semver.gt(newVersion, currentVersion)
+ ) {
+ console.log('New version available: ' + newVersion.version + '!');
+ dispatch(actions.setLastPublishedVersion(newVersion.version));
+ // if (semver.gt(newVersion, lastPublishedVersion)) {
+ dispatch(AppActions.setUpdateAvailable(true));
+ // }
+ } else {
+ console.log(
+ 'Current version: ' + versionMeta.version + ' is up to date',
+ );
+ }
+ return true;
+ })
+ .catch((error) => {
+ console.warn('Error while checking for update: ' + error);
+ });
+ },
};
/**
@@ -916,7 +921,7 @@ export const getKeyBindingObject = (state: any) =>
generateKeyBindingObject(state.settings.keyBindings);
export const getSupportedFileTypes = (state: any) =>
state.settings.supportedFileTypes.sort((a, b) =>
- a.type > b.type ? 1 : a.type < b.type ? -1 : 0
+ a.type > b.type ? 1 : a.type < b.type ? -1 : 0,
);
export const getTagColor = (state: any) => state.settings.tagBackgroundColor;
export const getTagTextColor = (state: any) => state.settings.tagTextColor;
diff --git a/app/reducers/smart-tags.ts b/app/reducers/smart-tags.ts
index 0ee484f4f..b055c9533 100644
--- a/app/reducers/smart-tags.ts
+++ b/app/reducers/smart-tags.ts
@@ -1,4 +1,4 @@
-export default t => [
+export default (t) => [
{
title: t('core:smartTags'),
uuid: 'd4b5c16a-1c3a-4561-96c7-686696cb2004',
@@ -14,7 +14,7 @@ export default t => [
functionality: 'now',
description: t('core:smartTagNowDescription'),
color: '#4986e7',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
id: '7505080c-b974-425f-8434-25cd08fb1013',
@@ -23,7 +23,7 @@ export default t => [
functionality: 'today',
description: t('core:smartTagTodayDescription'),
color: '#4986e7',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
id: '841e55a0-3596-4417-9186-d035cbcb676c',
@@ -32,7 +32,7 @@ export default t => [
functionality: 'tomorrow',
description: t('core:smartTagTomorrowDescription'),
color: '#4986e7',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
id: '3bf2bde9-cfa1-41cc-9154-debbf853e74c',
@@ -41,7 +41,7 @@ export default t => [
functionality: 'yesterday',
description: t('core:smartTagYesterdayDescription'),
color: '#4986e7',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
id: 'e4618609-0940-4d78-b79f-7d4221df33e2',
@@ -50,7 +50,7 @@ export default t => [
functionality: 'currentMonth',
description: t('core:smartTagMonthDescription'),
color: '#4986e7',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
id: 'b6d6c107-741e-423b-82a4-f00ae394dee4',
@@ -59,7 +59,7 @@ export default t => [
functionality: 'currentYear',
description: t('core:smartTagYearDescription'),
color: '#4986e7',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
id: 'da9fd0e6-7921-4195-b8f9-dca80f132bab',
@@ -68,7 +68,7 @@ export default t => [
functionality: 'geoTagging',
description: t('core:smartTagGeoDescription'),
color: '#4986e7',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
id: '67678ddd-4979-4489-8d2d-69a964af6b0d',
@@ -77,8 +77,8 @@ export default t => [
functionality: 'dateTagging',
description: t('core:smartTagDateDescription'),
color: '#4986e7',
- textcolor: '#ffffff'
- }
- ]
- }
+ textcolor: '#ffffff',
+ },
+ ],
+ },
];
diff --git a/app/reducers/taglibrary-default.ts b/app/reducers/taglibrary-default.ts
index 8ba24860d..4926f8a61 100644
--- a/app/reducers/taglibrary-default.ts
+++ b/app/reducers/taglibrary-default.ts
@@ -28,29 +28,29 @@ export default [
{
title: 'done',
color: '#008000',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: 'next',
color: '#008000',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: 'maybe',
color: '#008000',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: 'waiting',
color: '#008000',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: 'todo',
color: '#008000',
- textcolor: '#ffffff'
- }
- ]
+ textcolor: '#ffffff',
+ },
+ ],
},
{
title: 'Common Tags',
@@ -61,19 +61,19 @@ export default [
{
title: 'book',
color: '#008000',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: 'paper',
color: '#008000',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: 'article',
color: '#008000',
- textcolor: '#ffffff'
- }
- ]
+ textcolor: '#ffffff',
+ },
+ ],
},
{
title: 'Priorities',
@@ -84,19 +84,19 @@ export default [
{
title: 'high',
color: '#ff7537',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: 'medium',
color: '#ffad46',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: 'low',
color: '#7bd148',
- textcolor: '#ffffff'
- }
- ]
+ textcolor: '#ffffff',
+ },
+ ],
},
{
title: 'Ratings',
@@ -107,28 +107,28 @@ export default [
{
title: '1star',
color: '#ffcc24',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: '2star',
color: '#ffcc24',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: '3star',
color: '#ffcc24',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: '4star',
color: '#ffcc24',
- textcolor: '#ffffff'
+ textcolor: '#ffffff',
},
{
title: '5star',
color: '#ffcc24',
- textcolor: '#ffffff'
- }
- ]
- }
+ textcolor: '#ffffff',
+ },
+ ],
+ },
] as any;
diff --git a/app/reducers/taglibrary.ts b/app/reducers/taglibrary.ts
index c64d313fc..4905ce12d 100644
--- a/app/reducers/taglibrary.ts
+++ b/app/reducers/taglibrary.ts
@@ -19,7 +19,7 @@ import {
immutablySwapItems,
formatDateTime4Tag,
extend,
- prepareTagGroupForExport
+ prepareTagGroupForExport,
} from '@tagspaces/tagspaces-common/misc';
import AppConfig from '-/AppConfig';
import { getUuid } from '@tagspaces/tagspaces-common/utils-io';
@@ -49,7 +49,7 @@ export const types = {
MOVE_TAG_GROUP_DOWN: 'MOVE_TAG_GROUP_DOWN',
EDIT_TAG_COLOR: 'EDIT_TAG_COLOR',
MOVE_TAG: 'MOVE_TAG',
- CHANGE_TAG_ORDER: 'CHANGE_TAG_ORDER'
+ CHANGE_TAG_ORDER: 'CHANGE_TAG_ORDER',
};
export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
@@ -63,8 +63,8 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
{
...action.entry,
created_date: new Date(),
- modified_date: new Date()
- }
+ modified_date: new Date(),
+ },
];
}
case types.ADD_TAGGROUP: {
@@ -82,24 +82,24 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
title: action.entry.title,
children: [
...state[indexForEditing].children,
- action.entry.children[0]
+ action.entry.children[0],
],
created_date: new Date(),
- modified_date: new Date()
+ modified_date: new Date(),
},
- ...state.slice(indexForEditing + 1)
+ ...state.slice(indexForEditing + 1),
];
}
return state;
}
case types.MERGE_TAGGROUP: {
const indexForEditing = state.findIndex(
- obj => obj.uuid === action.entry.uuid
+ (obj) => obj.uuid === action.entry.uuid,
);
if (indexForEditing >= 0) {
const tags = [
...state[indexForEditing].children,
- ...action.entry.children
+ ...action.entry.children,
];
tags.splice(0, tags.length - AppConfig.maxCollectedTag);
return [
@@ -109,9 +109,9 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
title: action.entry.title,
children: tags,
created_date: action.entry.created_date,
- modified_date: new Date()
+ modified_date: new Date(),
},
- ...state.slice(indexForEditing + 1)
+ ...state.slice(indexForEditing + 1),
];
}
return [
@@ -123,8 +123,8 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
textcolor: action.entry.textcolor,
children: action.entry.children,
created_date: new Date(),
- modified_date: new Date()
- }
+ modified_date: new Date(),
+ },
];
}
case types.UPDATE_TAGGROUP: {
@@ -139,12 +139,12 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
const modifiedEntry = extend(
{ created_date: new Date() },
action.entry,
- { modified_date: new Date() }
+ { modified_date: new Date() },
);
return [
...state.slice(0, indexForEditing),
modifiedEntry,
- ...state.slice(indexForEditing + 1)
+ ...state.slice(indexForEditing + 1),
];
}
return state;
@@ -159,7 +159,7 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
if (indexForRemoving >= 0) {
return [
...state.slice(0, indexForRemoving),
- ...state.slice(indexForRemoving + 1)
+ ...state.slice(indexForRemoving + 1),
];
}
return state;
@@ -176,9 +176,9 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
...state.slice(0, indexForEditing),
{
...state[indexForEditing],
- children: action.tags
+ children: action.tags,
},
- ...state.slice(indexForEditing + 1)
+ ...state.slice(indexForEditing + 1),
];
}
return state;
@@ -194,14 +194,14 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
if (indexForEditing >= 0) {
const taggroupTags = state[indexForEditing].children;
const newTag = action.tag;
- if (!taggroupTags.some(tag => tag.title === newTag.title)) {
+ if (!taggroupTags.some((tag) => tag.title === newTag.title)) {
return [
...state.slice(0, indexForEditing),
{
...state[indexForEditing],
- children: [...taggroupTags, newTag]
+ children: [...taggroupTags, newTag],
},
- ...state.slice(indexForEditing + 1)
+ ...state.slice(indexForEditing + 1),
];
}
}
@@ -331,10 +331,10 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
{
...state[indexForUpdating],
children: state[indexForUpdating].children.sort((a, b) =>
- a.title > b.title ? 1 : a.title < b.title ? -1 : 0
- )
+ a.title > b.title ? 1 : a.title < b.title ? -1 : 0,
+ ),
},
- ...state.slice(indexForUpdating + 1)
+ ...state.slice(indexForUpdating + 1),
];
}
return state;
@@ -363,23 +363,23 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
const newTagLibrary = [...state];
const tag = { ...state[indexFromGroup].children[tagIndexForRemoving] };
const found = newTagLibrary[indexToGroup].children.find(
- t => t.title === tag.title
+ (t) => t.title === tag.title,
);
if (!found) {
newTagLibrary[indexToGroup].children.push(tag);
newTagLibrary[indexFromGroup].children = [
...newTagLibrary[indexFromGroup].children.slice(
0,
- tagIndexForRemoving
+ tagIndexForRemoving,
),
...newTagLibrary[indexFromGroup].children.slice(
- tagIndexForRemoving + 1
- )
+ tagIndexForRemoving + 1,
+ ),
];
return newTagLibrary;
}
console.warn(
- 'Tag with this title already exists in the target tag group'
+ 'Tag with this title already exists in the target tag group',
);
}
return state;
@@ -397,10 +397,10 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#swapping_variables
[
newTagLibrary[indexFromGroup].children[action.fromIndex],
- newTagLibrary[indexFromGroup].children[action.toIndex]
+ newTagLibrary[indexFromGroup].children[action.toIndex],
] = [
newTagLibrary[indexFromGroup].children[action.toIndex],
- newTagLibrary[indexFromGroup].children[action.fromIndex]
+ newTagLibrary[indexFromGroup].children[action.fromIndex],
];
return newTagLibrary;
@@ -418,10 +418,10 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
tagGroup = {
title: tagGroup.title,
uuid: tagGroup.key,
- children: tagGroup.children
+ children: tagGroup.children,
};
const tagsArr = [];
- tagGroup.children.forEach(tag => {
+ tagGroup.children.forEach((tag) => {
tagsArr.push(tag);
tagGroup.children = tagsArr;
arr.push(tagGroup);
@@ -429,12 +429,12 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
}
});
} else {
- action.entries.forEach(tagGroup => {
- const index = arr.findIndex(obj => obj.uuid === tagGroup.uuid);
+ action.entries.forEach((tagGroup) => {
+ const index = arr.findIndex((obj) => obj.uuid === tagGroup.uuid);
if (index > -1) {
- tagGroup.children.forEach(tag => {
+ tagGroup.children.forEach((tag) => {
const stateTag = arr[index].children.find(
- obj => obj.title === tag.title
+ (obj) => obj.title === tag.title,
);
if (stateTag === undefined) {
arr[index].children.push(tag);
@@ -459,68 +459,65 @@ export default (state: Array<TS.TagGroup> = defaultTagLibrary, action: any) => {
export const actions = {
deleteAll: () => ({
- type: types.DELETE_ALL
+ type: types.DELETE_ALL,
}),
- createTagGroup: (entry: TS.TagGroup) => (
- dispatch: (actions: Object) => void,
- getState: () => any
- ) => {
- if (Pro && entry.locationId) {
- const { locations } = getState();
- const location: TS.Location = locations.find(
- l => l.uuid === entry.locationId
- );
- if (location) {
- Pro.MetaOperations.createTagGroup(location.path, entry);
+ createTagGroup:
+ (entry: TS.TagGroup) =>
+ (dispatch: (actions: Object) => void, getState: () => any) => {
+ if (Pro && entry.locationId) {
+ const { locations } = getState();
+ const location: TS.Location = locations.find(
+ (l) => l.uuid === entry.locationId,
+ );
+ if (location) {
+ Pro.MetaOperations.createTagGroup(location.path, entry);
+ }
}
- }
- dispatch(actions.createTagGroupInt(entry));
- },
+ dispatch(actions.createTagGroupInt(entry));
+ },
createTagGroupInt: (entry: TS.TagGroup) => ({
type: types.CREATE_TAGGROUP,
- entry
+ entry,
}),
- editTagGroup: (entry: TS.TagGroup) => (
- dispatch: (actions: Object) => void,
- getState: () => any
- ) => {
- if (Pro && entry.locationId) {
- const { locations } = getState();
- const location: TS.Location = locations.find(
- l => l.uuid === entry.locationId
- );
- if (location) {
- Pro.MetaOperations.editTagGroup(location.path, entry);
+ editTagGroup:
+ (entry: TS.TagGroup) =>
+ (dispatch: (actions: Object) => void, getState: () => any) => {
+ if (Pro && entry.locationId) {
+ const { locations } = getState();
+ const location: TS.Location = locations.find(
+ (l) => l.uuid === entry.locationId,
+ );
+ if (location) {
+ Pro.MetaOperations.editTagGroup(location.path, entry);
+ }
}
- }
- dispatch(actions.editTagGroupInt(entry));
- },
+ dispatch(actions.editTagGroupInt(entry));
+ },
editTagGroupInt: (entry: TS.TagGroup) => ({
type: types.UPDATE_TAGGROUP,
- entry
+ entry,
}),
- removeTagGroup: (parentTagGroupUuid: TS.Uuid) => (
- dispatch: (actions: Object) => void,
- getState: () => any
- ) => {
- const { taglibrary } = getState();
- const tagGroup: TS.TagGroup = taglibrary.find(
- t => t.uuid === parentTagGroupUuid
- );
- if (Pro && tagGroup && tagGroup.locationId) {
- const { locations } = getState();
- const location: TS.Location = locations.find(
- l => l.uuid === tagGroup.locationId
+ removeTagGroup:
+ (parentTagGroupUuid: TS.Uuid) =>
+ (dispatch: (actions: Object) => void, getState: () => any) => {
+ const { taglibrary } = getState();
+ const tagGroup: TS.TagGroup = taglibrary.find(
+ (t) => t.uuid === parentTagGroupUuid,
);
- if (location) {
- Pro.MetaOperations.removeTagGroup(location.path, parentTagGroupUuid);
+ if (Pro && tagGroup && tagGroup.locationId) {
+ const { locations } = getState();
+ const location: TS.Location = locations.find(
+ (l) => l.uuid === tagGroup.locationId,
+ );
+ if (location) {
+ Pro.MetaOperations.removeTagGroup(location.path, parentTagGroupUuid);
+ }
}
- }
- dispatch(actions.removeTagGroupInt(parentTagGroupUuid));
- },
+ dispatch(actions.removeTagGroupInt(parentTagGroupUuid));
+ },
removeTagGroupInt: (parentTagGroupUuid: TS.Uuid) => ({
type: types.REMOVE_TAGGROUP,
- uuid: parentTagGroupUuid
+ uuid: parentTagGroupUuid,
}),
/* addTagGroup: (entry: TS.TagGroup) => ({
type: types.ADD_TAGGROUP,
@@ -529,109 +526,106 @@ export const actions = {
/**
* @deprecated use /services/taglibrary-utils/mergeTagGroup instead
*/
- mergeTagGroup: (entry: TS.TagGroup) => (
- dispatch: (actions: Object) => void,
- getState: () => any
- ) => {
- if (Pro && entry.locationId) {
- const { locations } = getState();
- const location: TS.Location = locations.find(
- l => l.uuid === entry.locationId
- );
- if (location) {
- Pro.MetaOperations.mergeTagGroup(location.path, entry);
+ mergeTagGroup:
+ (entry: TS.TagGroup) =>
+ (dispatch: (actions: Object) => void, getState: () => any) => {
+ if (Pro && entry.locationId) {
+ const { locations } = getState();
+ const location: TS.Location = locations.find(
+ (l) => l.uuid === entry.locationId,
+ );
+ if (location) {
+ Pro.MetaOperations.mergeTagGroup(location.path, entry);
+ }
}
- }
- dispatch(actions.mergeTagGroupInt(entry));
- },
+ dispatch(actions.mergeTagGroupInt(entry));
+ },
mergeTagGroupInt: (entry: TS.TagGroup) => ({
type: types.MERGE_TAGGROUP,
- entry
+ entry,
}),
- addTag: (tag: any, parentTagGroupUuid: TS.Uuid) => (
- dispatch: (actions: Object) => void,
- getState: () => any
- ) => {
- const { settings, taglibrary } = getState();
- const { tagTextColor, tagBackgroundColor } = settings;
+ addTag:
+ (tag: any, parentTagGroupUuid: TS.Uuid) =>
+ (dispatch: (actions: Object) => void, getState: () => any) => {
+ const { settings, taglibrary } = getState();
+ const { tagTextColor, tagBackgroundColor } = settings;
- const tagGroup: TS.TagGroup = taglibrary.find(
- t => t.uuid === parentTagGroupUuid
- );
+ const tagGroup: TS.TagGroup = taglibrary.find(
+ (t) => t.uuid === parentTagGroupUuid,
+ );
- let newTags: Array<TS.Tag>;
- if (typeof tag === 'object' && tag !== null) {
- if (tagGroup.children.some(t => t.title === tag.title)) {
- // tag exist
- return;
+ let newTags: Array<TS.Tag>;
+ if (typeof tag === 'object' && tag !== null) {
+ if (tagGroup.children.some((t) => t.title === tag.title)) {
+ // tag exist
+ return;
+ }
+ const tagObject: TS.Tag = {
+ ...tag,
+ textcolor: tag.textcolor || tagTextColor,
+ color: tag.color || tagBackgroundColor,
+ };
+ newTags = [tagObject];
+ dispatch(actions.addTagInt(tagObject, parentTagGroupUuid));
+ } else {
+ const newTagGroup = {
+ ...tagGroup,
+ color: tagGroup.color ? tagGroup.color : tagBackgroundColor,
+ textcolor: tagGroup.textcolor ? tagGroup.textcolor : tagTextColor,
+ };
+ newTags = parseNewTags(tag, newTagGroup);
+ dispatch(actions.addTags(newTags, newTagGroup));
}
- const tagObject: TS.Tag = {
- ...tag,
- textcolor: tag.textcolor || tagTextColor,
- color: tag.color || tagBackgroundColor
- };
- newTags = [tagObject];
- dispatch(actions.addTagInt(tagObject, parentTagGroupUuid));
- } else {
- const newTagGroup = {
- ...tagGroup,
- color: tagGroup.color ? tagGroup.color : tagBackgroundColor,
- textcolor: tagGroup.textcolor ? tagGroup.textcolor : tagTextColor
- };
- newTags = parseNewTags(tag, newTagGroup);
- dispatch(actions.addTags(newTags, newTagGroup));
- }
- if (Pro && tagGroup && tagGroup.locationId) {
- const { locations } = getState();
- const location: TS.Location = locations.find(
- l => l.uuid === tagGroup.locationId
- );
- if (location) {
- tagGroup.children = newTags;
- Pro.MetaOperations.editTagGroup(location.path, tagGroup);
+ if (Pro && tagGroup && tagGroup.locationId) {
+ const { locations } = getState();
+ const location: TS.Location = locations.find(
+ (l) => l.uuid === tagGroup.locationId,
+ );
+ if (location) {
+ tagGroup.children = newTags;
+ Pro.MetaOperations.editTagGroup(location.path, tagGroup);
+ }
}
- }
- },
+ },
addTags: (tags: Array<TS.Tag>, tagGroup: TS.TagGroup) => ({
type: types.ADD_TAGS,
tags,
- tagGroup
+ tagGroup,
}),
addTagInt: (tag: TS.Tag, parentTagGroupUuid: TS.Uuid) => ({
type: types.ADD_TAG,
tag,
- uuid: parentTagGroupUuid
+ uuid: parentTagGroupUuid,
}),
- editTag: (tag: TS.Tag, parentTagGroupUuid: TS.Uuid, origTitle: string) => (
- dispatch: (actions: Object) => void,
- getState: () => any
- ) => {
- const { taglibrary } = getState();
- const tagGroup: TS.TagGroup = taglibrary.find(
- t => t.uuid === parentTagGroupUuid
- );
- const newTagGroup = {
- ...tagGroup,
- children: tagGroup.children.map(t => {
- if (t.title === origTitle) {
- return tag;
- }
- return t;
- })
- };
-
- if (Pro && tagGroup && tagGroup.locationId) {
- const { locations } = getState();
- const location: TS.Location = locations.find(
- l => l.uuid === tagGroup.locationId
+ editTag:
+ (tag: TS.Tag, parentTagGroupUuid: TS.Uuid, origTitle: string) =>
+ (dispatch: (actions: Object) => void, getState: () => any) => {
+ const { taglibrary } = getState();
+ const tagGroup: TS.TagGroup = taglibrary.find(
+ (t) => t.uuid === parentTagGroupUuid,
);
- if (location) {
- Pro.MetaOperations.editTagGroup(location.path, newTagGroup, true);
+ const newTagGroup = {
+ ...tagGroup,
+ children: tagGroup.children.map((t) => {
+ if (t.title === origTitle) {
+ return tag;
+ }
+ return t;
+ }),
+ };
+
+ if (Pro && tagGroup && tagGroup.locationId) {
+ const { locations } = getState();
+ const location: TS.Location = locations.find(
+ (l) => l.uuid === tagGroup.locationId,
+ );
+ if (location) {
+ Pro.MetaOperations.editTagGroup(location.path, newTagGroup, true);
+ }
}
- }
- dispatch(actions.editTagGroupInt(newTagGroup));
- },
+ dispatch(actions.editTagGroupInt(newTagGroup));
+ },
/* editTagInt: (
tag: TS.Tag,
parentTagGroupUuid: TS.Uuid,
@@ -642,40 +636,43 @@ export const actions = {
uuid: parentTagGroupUuid,
origTitle
}), */
- deleteTag: (tagTitle: string, parentTagGroupUuid: TS.Uuid) => (
- dispatch: (actions: Object) => void,
- getState: () => any
- ) => {
- const { taglibrary } = getState();
+ deleteTag:
+ (tagTitle: string, parentTagGroupUuid: TS.Uuid) =>
+ (dispatch: (actions: Object) => void, getState: () => any) => {
+ const { taglibrary } = getState();
- const tagGroup: TS.TagGroup = taglibrary.find(
- t => t.uuid === parentTagGroupUuid
- );
+ const tagGroup: TS.TagGroup = taglibrary.find(
+ (t) => t.uuid === parentTagGroupUuid,
+ );
- const tagIndexForRemoving = tagGroup.children.findIndex(
- tag => tag.title === tagTitle
- );
- if (tagIndexForRemoving >= 0) {
- const editedTagGroup = {
- ...tagGroup,
- children: [
- ...tagGroup.children.slice(0, tagIndexForRemoving),
- ...tagGroup.children.slice(tagIndexForRemoving + 1)
- ]
- };
+ const tagIndexForRemoving = tagGroup.children.findIndex(
+ (tag) => tag.title === tagTitle,
+ );
+ if (tagIndexForRemoving >= 0) {
+ const editedTagGroup = {
+ ...tagGroup,
+ children: [
+ ...tagGroup.children.slice(0, tagIndexForRemoving),
+ ...tagGroup.children.slice(tagIndexForRemoving + 1),
+ ],
+ };
- if (Pro && tagGroup.locationId) {
- const { locations } = getState();
- const location: TS.Location = locations.find(
- l => l.uuid === tagGroup.locationId
- );
- if (location) {
- Pro.MetaOperations.editTagGroup(location.path, editedTagGroup, true);
+ if (Pro && tagGroup.locationId) {
+ const { locations } = getState();
+ const location: TS.Location = locations.find(
+ (l) => l.uuid === tagGroup.locationId,
+ );
+ if (location) {
+ Pro.MetaOperations.editTagGroup(
+ location.path,
+ editedTagGroup,
+ true,
+ );
+ }
}
+ dispatch(actions.editTagGroupInt(editedTagGroup));
}
- dispatch(actions.editTagGroupInt(editedTagGroup));
- }
- },
+ },
/* deleteTagInt: (tagTitle: string, parentTagGroupUuid: TS.Uuid) => ({
type: types.REMOVE_TAG,
tagTitle,
@@ -684,45 +681,45 @@ export const actions = {
moveTagGroup: (tagGroupUuid: TS.Uuid, position: number) => ({
type: types.MOVE_TAG_GROUP,
uuid: tagGroupUuid,
- position
+ position,
}),
moveTagGroupUp: (parentTagGroupUuid: TS.Uuid) => ({
type: types.MOVE_TAG_GROUP_UP,
- uuid: parentTagGroupUuid
+ uuid: parentTagGroupUuid,
}),
moveTagGroupDown: (parentTagGroupUuid: TS.Uuid) => ({
type: types.MOVE_TAG_GROUP_DOWN,
- uuid: parentTagGroupUuid
+ uuid: parentTagGroupUuid,
}),
sortTagGroup: (parentTagGroupUuid: TS.Uuid) => ({
type: types.SORT_TAG_GROUP_UP,
- uuid: parentTagGroupUuid
+ uuid: parentTagGroupUuid,
}),
moveTag: (
tagTitle: string,
fromTagGroupUuid: TS.Uuid,
- toTagGroupUuid: TS.Uuid
+ toTagGroupUuid: TS.Uuid,
) => ({
type: types.MOVE_TAG,
tagTitle,
fromTagGroupId: fromTagGroupUuid,
- toTagGroupId: toTagGroupUuid
+ toTagGroupId: toTagGroupUuid,
}),
changeTagOrder: (
tagGroupUuid: TS.Uuid,
fromIndex: number,
- toIndex: number
+ toIndex: number,
) => ({
type: types.CHANGE_TAG_ORDER,
tagGroupUuid,
fromIndex,
- toIndex
+ toIndex,
}),
importTagGroups: (entries: Array<TS.TagGroup>, replace = false) => ({
type: types.IMPORT_TAGGROUP,
entries,
- replace
- })
+ replace,
+ }),
/**
* GraphQL API return TagGroup Tags array like String
* This migrate tagGroups model to children []
@@ -745,15 +742,15 @@ export const actions = {
export const getTagGroups = (state: any) => state.taglibrary;
export const getAllTags = (state: any) => {
const uniqueTags: TS.Tag[] = [];
- state.taglibrary.forEach(tagGroup => {
- tagGroup.children.forEach(tag => {
- const found = uniqueTags.find(uTag => uTag.title === tag.title);
+ state.taglibrary.forEach((tagGroup) => {
+ tagGroup.children.forEach((tag) => {
+ const found = uniqueTags.find((uTag) => uTag.title === tag.title);
if (!found) {
uniqueTags.push(tag);
}
});
});
return uniqueTags.sort((a, b) =>
- a.title > b.title ? 1 : a.title < b.title ? -1 : 0
+ a.title > b.title ? 1 : a.title < b.title ? -1 : 0,
);
};
diff --git a/app/services/electron-menus.ts b/app/services/electron-menus.ts
index 309158f68..fb02d1d81 100644
--- a/app/services/electron-menus.ts
+++ b/app/services/electron-menus.ts
@@ -31,31 +31,31 @@ export default function buildDesktopMenu(props: any, i18n) {
{
label: i18n.t('newWindow'),
accelerator: '',
- click: () => props.createNewWindowInstance()
+ click: () => props.createNewWindowInstance(),
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('newFileNote'),
accelerator: 'CommandOrControl+Shift+n',
- click: props.toggleNewFileDialog
+ click: props.toggleNewFileDialog,
},
{
label: i18n.t('createDirectory'),
accelerator: '',
- click: props.showCreateDirectoryDialog
+ click: props.showCreateDirectoryDialog,
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('openLink'),
accelerator: 'CmdOrCtrl+o',
- click: props.toggleOpenLinkDialog
+ click: props.toggleOpenLinkDialog,
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('print'),
@@ -64,17 +64,17 @@ export default function buildDesktopMenu(props: any, i18n) {
if (focusedWindow.webContents && focusedWindow.webContents.print) {
focusedWindow.webContents.print();
}
- }
+ },
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('exitApp'),
accelerator: 'CmdOrCtrl+q',
- click: quitApp // PlatformIO.quitApp
- }
- ]
+ click: quitApp, // PlatformIO.quitApp
+ },
+ ],
},
{
label: i18n.t('edit'),
@@ -82,52 +82,52 @@ export default function buildDesktopMenu(props: any, i18n) {
{
label: i18n.t('undo'),
accelerator: 'CmdOrCtrl+z',
- role: 'undo'
+ role: 'undo',
},
{
label: i18n.t('redo'),
accelerator: 'Shift+CmdOrCtrl+z',
- role: 'redo'
+ role: 'redo',
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('cut'),
accelerator: 'CmdOrCtrl+x',
- role: 'cut'
+ role: 'cut',
},
{
label: i18n.t('copy'),
accelerator: 'CmdOrCtrl+c',
- role: 'copy'
+ role: 'copy',
},
{
label: i18n.t('paste'),
accelerator: 'CmdOrCtrl+v',
- role: 'paste'
+ role: 'paste',
},
{
label: i18n.t('selectAll'),
accelerator: 'CmdOrCtrl+a',
- role: 'selectall'
- }
- ]
+ role: 'selectall',
+ },
+ ],
},
{
label: i18n.t('view'),
submenu: [
{
label: i18n.t('showLocationManager'),
- click: props.openLocationManagerPanel
+ click: props.openLocationManagerPanel,
},
{
label: i18n.t('showTagLibrary'),
- click: props.openTagLibraryPanel
+ click: props.openTagLibraryPanel,
},
{
label: i18n.t('showSearch'),
- click: props.openSearch
+ click: props.openSearch,
},
{
label: i18n.t('showDevTools'),
@@ -135,45 +135,45 @@ export default function buildDesktopMenu(props: any, i18n) {
if (focusedWindow) {
focusedWindow.toggleDevTools();
}
- }
+ },
},
{
label: i18n.t('reloadApplication'),
accelerator: 'CmdOrCtrl+Shift+R',
click: (item, focusedWindow) => {
focusedWindow.webContents.reload();
- }
+ },
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('goback'),
accelerator: 'Alt+Left',
- click: props.goBack
+ click: props.goBack,
},
{
label: i18n.t('goforward'),
accelerator: 'Alt+Right',
- click: props.goForward
+ click: props.goForward,
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('zoomReset'),
accelerator: 'CmdOrCtrl+0',
- click: props.setZoomResetApp
+ click: props.setZoomResetApp,
},
{
label: i18n.t('zoomIn'),
accelerator: 'CmdOrCtrl+Shift+Plus',
- click: props.setZoomInApp
+ click: props.setZoomInApp,
},
{
label: i18n.t('zoomOut'),
accelerator: 'CmdOrCtrl+-',
- click: props.setZoomOutApp
+ click: props.setZoomOutApp,
},
{
label: i18n.t('toggleFullScreen'),
@@ -186,16 +186,16 @@ export default function buildDesktopMenu(props: any, i18n) {
} else {
focusedWindow.setFullScreen(true);
}
- }
+ },
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('settings'),
- click: props.toggleSettingsDialog
- }
- ]
+ click: props.toggleSettingsDialog,
+ },
+ ],
},
{
label: '&' + i18n.t('help'),
@@ -203,81 +203,81 @@ export default function buildDesktopMenu(props: any, i18n) {
{
label: '&' + i18n.t('documentation'),
accelerator: 'F1',
- click: props.openHelpFeedbackPanel
+ click: props.openHelpFeedbackPanel,
},
{
label: '&' + i18n.t('shortcutKeys'),
- click: props.toggleKeysDialog
+ click: props.toggleKeysDialog,
},
{
label: 'Welcome Wizzard',
- click: props.toggleOnboardingDialog
+ click: props.toggleOnboardingDialog,
},
{
label: '&' + i18n.t('whatsNew'),
click: () => {
shell.openExternal(Links.links.changelogURL);
- }
+ },
},
{
label: '&' + i18n.t('followOnTwitter'),
click: () => {
shell.openExternal(Links.links.twitter);
- }
+ },
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: '&' + i18n.t('suggestNewFeatures'),
click: () => {
shell.openExternal(Links.links.suggestFeature);
- }
+ },
},
{
label: '&' + i18n.t('reportIssues'),
click: () => {
shell.openExternal(Links.links.reportIssue);
- }
+ },
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: i18n.t('webClipperChrome'),
click: () => {
shell.openExternal(Links.links.webClipperChrome);
- }
+ },
},
{
label: i18n.t('webClipperFirefox'),
click: () => {
shell.openExternal(Links.links.webClipperFirefox);
- }
+ },
},
{
- type: 'separator'
+ type: 'separator',
},
{
label: '&' + i18n.t('license'),
- click: props.toggleLicenseDialog
+ click: props.toggleLicenseDialog,
},
{
label: i18n.t('cancelSubscription'),
click: () => {
shell.openExternal(Links.links.cancelSubscription);
- }
+ },
},
{
label: '&' + i18n.t('thirdPartyLibs'),
- click: props.toggleThirdPartyLibsDialog
+ click: props.toggleThirdPartyLibsDialog,
},
{
label: '&' + i18n.t('aboutTagSpaces'),
- click: props.toggleAboutDialog
- }
- ]
- }
+ click: props.toggleAboutDialog,
+ },
+ ],
+ },
];
// PlatformIO.initMainMenu(templateDefault);
diff --git a/app/services/i18nOptions.ts b/app/services/i18nOptions.ts
index f06b74e5e..bf91abc86 100644
--- a/app/services/i18nOptions.ts
+++ b/app/services/i18nOptions.ts
@@ -427,8 +427,8 @@ const options: InitOptions = {
backend: {
loadPath: '{{lng}}',
// parse: data => data, // comment to have working i18n switch
- request: loadLocales // comment to have working i18n switch
- } // as HttpBackendOptions
+ request: loadLocales, // comment to have working i18n switch
+ }, // as HttpBackendOptions
// getAsync: true,
// debug: true,
/* interpolation: {
diff --git a/app/services/meta-loader.ts b/app/services/meta-loader.ts
index 880585b03..29d047797 100644
--- a/app/services/meta-loader.ts
+++ b/app/services/meta-loader.ts
@@ -5,47 +5,47 @@ import {
getMetaFileLocationForDir,
getMetaFileLocationForFile,
getThumbFileLocationForDirectory,
- getThumbFileLocationForFile
+ getThumbFileLocationForFile,
} from '@tagspaces/tagspaces-common/paths';
import AppConfig from '-/AppConfig';
export function loadCurrentDirMeta(
directoryPath: string,
dirEntries: TS.FileSystemEntry[],
- pageFiles?: TS.FileSystemEntry[]
+ pageFiles?: TS.FileSystemEntry[],
): Promise<TS.FileSystemEntry[]> {
return PlatformIO.listMetaDirectoryPromise(directoryPath)
- .then(meta => {
+ .then((meta) => {
//metaLoadedLock.current = false;
//props.setIsMetaLoaded(true);
// props.setMetaForCurrentDir(meta);
const dirEntriesPromises = dirEntries
- .filter(entry => !entry.isFile)
- .map(entry => getEnhancedDir(entry));
+ .filter((entry) => !entry.isFile)
+ .map((entry) => getEnhancedDir(entry));
const files = pageFiles
? pageFiles
- : dirEntries.filter(entry => entry.isFile);
+ : dirEntries.filter((entry) => entry.isFile);
const fileEntriesPromises = getFileEntriesPromises(files, meta);
const thumbs = getThumbs(files, meta);
return getEntries([
...dirEntriesPromises,
...fileEntriesPromises,
- ...thumbs
+ ...thumbs,
]);
})
- .catch(ex => {
+ .catch((ex) => {
console.log(ex);
return undefined;
});
}
function getEntries(metaPromises): Promise<TS.FileSystemEntry[]> {
- const catchHandler = error => undefined;
- return Promise.all(metaPromises.map(promise => promise.catch(catchHandler)))
+ const catchHandler = (error) => undefined;
+ return Promise.all(metaPromises.map((promise) => promise.catch(catchHandler)))
.then((entries: TS.FileSystemEntry[]) => {
return entries;
})
- .catch(err => {
+ .catch((err) => {
console.log('err updateEntries:', err);
return undefined;
});
@@ -53,25 +53,22 @@ function getEntries(metaPromises): Promise<TS.FileSystemEntry[]> {
function getFileEntriesPromises(
pageFiles: TS.FileSystemEntry[],
- meta: Array<any>
+ meta: Array<any>,
): Promise<TS.FileSystemEntry>[] {
- return pageFiles.map(entry => {
+ return pageFiles.map((entry) => {
const metaFilePath = getMetaFileLocationForFile(
entry.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
if (
// check if metaFilePath exist in listMetaDirectory content
- meta.some(metaFile => metaFilePath.endsWith(metaFile.path)) &&
+ meta.some((metaFile) => metaFilePath.endsWith(metaFile.path)) &&
// !checkEntryExist(entry.path) &&
entry.path.indexOf(
- AppConfig.metaFolder + PlatformIO.getDirSeparator()
+ AppConfig.metaFolder + PlatformIO.getDirSeparator(),
) === -1
) {
- return getMetaForEntry(
- entry,
- metaFilePath
- ); /*Promise.resolve({
+ return getMetaForEntry(entry, metaFilePath); /*Promise.resolve({
[entry.path]: getMetaForEntry(entry, metaFilePath)
});*/
}
@@ -81,22 +78,24 @@ function getFileEntriesPromises(
function getThumbs(
pageFiles: TS.FileSystemEntry[],
- meta: Array<any>
+ meta: Array<any>,
): Promise<TS.FileSystemEntry>[] {
- return pageFiles.map(entry => Promise.resolve(setThumbForEntry(entry, meta)));
+ return pageFiles.map((entry) =>
+ Promise.resolve(setThumbForEntry(entry, meta)),
+ );
}
function setThumbForEntry(
entry: TS.FileSystemEntry,
- meta: Array<any>
+ meta: Array<any>,
): TS.FileSystemEntry {
const thumbEntry = { ...entry };
let thumbPath = getThumbFileLocationForFile(
entry.path,
PlatformIO.getDirSeparator(),
- false
+ false,
);
- if (thumbPath && meta.some(metaFile => thumbPath.endsWith(metaFile.path))) {
+ if (thumbPath && meta.some((metaFile) => thumbPath.endsWith(metaFile.path))) {
thumbEntry.thumbPath = thumbPath;
if (PlatformIO.haveObjectStoreSupport() || PlatformIO.haveWebDavSupport()) {
if (thumbPath && thumbPath.startsWith('/')) {
@@ -113,30 +112,30 @@ function setThumbForEntry(
}
export function getEnhancedDir(
- entry: TS.FileSystemEntry
+ entry: TS.FileSystemEntry,
): Promise<TS.FileSystemEntry> {
if (!entry) {
return Promise.resolve(undefined);
}
if (entry.isFile) {
return Promise.reject(
- new Error('getEnhancedDir accept dir only:' + entry.path)
+ new Error('getEnhancedDir accept dir only:' + entry.path),
);
}
if (entry.name === AppConfig.metaFolder) {
return Promise.resolve(undefined);
}
- return PlatformIO.listMetaDirectoryPromise(entry.path).then(meta => {
+ return PlatformIO.listMetaDirectoryPromise(entry.path).then((meta) => {
const metaFilePath = getMetaFileLocationForDir(
entry.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const thumbDirPath = getThumbFileLocationForDirectory(
entry.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
let enhancedEntry;
- if (meta.some(metaFile => thumbDirPath.endsWith(metaFile.path))) {
+ if (meta.some((metaFile) => thumbDirPath.endsWith(metaFile.path))) {
const thumbPath =
PlatformIO.haveObjectStoreSupport() || PlatformIO.haveWebDavSupport()
? PlatformIO.getURLforPath(thumbDirPath)
@@ -144,9 +143,9 @@ export function getEnhancedDir(
enhancedEntry = { ...entry, thumbPath };
}
if (
- meta.some(metaFile => metaFilePath.endsWith(metaFile.path)) &&
+ meta.some((metaFile) => metaFilePath.endsWith(metaFile.path)) &&
entry.path.indexOf(
- AppConfig.metaFolder + PlatformIO.getDirSeparator()
+ AppConfig.metaFolder + PlatformIO.getDirSeparator(),
) === -1
) {
return getMetaForEntry(enhancedEntry || entry, metaFilePath);
diff --git a/app/services/platform-facade.ts b/app/services/platform-facade.ts
index ebc44d3c2..8e9495f16 100644
--- a/app/services/platform-facade.ts
+++ b/app/services/platform-facade.ts
@@ -76,7 +76,7 @@ import {
platformRemoveExtension,
platformGetUserDataDir,
platformUnZip,
- platformDirProperties
+ platformDirProperties,
} from '@tagspaces/tagspaces-platforms/platform-io';
import { cleanTrailingDirSeparator } from '@tagspaces/tagspaces-common/paths';
import AppConfig from '-/AppConfig';
@@ -114,11 +114,11 @@ export default class PlatformFacade {
platformSetLanguage(language);
};
- static setZoomFactorElectron = zoomLevel => {
+ static setZoomFactorElectron = (zoomLevel) => {
platformSetZoomFactorElectron(zoomLevel);
};
- static setGlobalShortcuts = globalShortcutsEnabled => {
+ static setGlobalShortcuts = (globalShortcutsEnabled) => {
platformSetGlobalShortcuts(globalShortcutsEnabled);
};
@@ -189,7 +189,7 @@ export default class PlatformFacade {
static createDirectoryIndexInWorker = (
directoryPath: string,
extractText: boolean,
- ignorePatterns: Array<string>
+ ignorePatterns: Array<string>,
): Promise<any> => {
if (!PlatformFacade.isWorkerAvailable()) {
return Promise.reject(new Error('no Worker Available!'));
@@ -199,12 +199,12 @@ export default class PlatformFacade {
directoryPath,
extractText,
ignorePatterns,
- settings.getUsedWsPort()
+ settings.getUsedWsPort(),
);
};
static createThumbnailsInWorker = (
- tmbGenerationList: Array<string>
+ tmbGenerationList: Array<string>,
): Promise<any> => {
if (!PlatformFacade.isWorkerAvailable()) {
return Promise.reject(new Error('no Worker Available!'));
@@ -212,7 +212,7 @@ export default class PlatformFacade {
return platformCreateThumbnailsInWorker(
token,
tmbGenerationList,
- settings.getUsedWsPort()
+ settings.getUsedWsPort(),
);
};
@@ -227,13 +227,13 @@ export default class PlatformFacade {
path: string,
mode = ['extractThumbPath'],
ignorePatterns: Array<string> = [],
- resultsLimit: any = {}
+ resultsLimit: any = {},
): Promise<Array<any>> =>
platformListDirectoryPromise(
cleanTrailingDirSeparator(path),
mode,
ignorePatterns,
- resultsLimit
+ resultsLimit,
);
static listMetaDirectoryPromise = (path: string): Promise<Array<any>> =>
@@ -242,7 +242,7 @@ export default class PlatformFacade {
static listObjectStoreDir = (
param: Object,
mode = ['extractThumbPath'],
- ignorePatterns: Array<string> = []
+ ignorePatterns: Array<string> = [],
): Promise<Array<any>> =>
platformListObjectStoreDir(param, mode, ignorePatterns);
@@ -266,7 +266,7 @@ export default class PlatformFacade {
*/
static copyFilePromiseOverwrite = (
sourceFilePath: string,
- targetFilePath: string
+ targetFilePath: string,
): Promise<any> => {
//PlatformFacade.ignoreByWatcher(targetFilePath);
return platformCopyFilePromise(sourceFilePath, targetFilePath);
@@ -275,7 +275,7 @@ export default class PlatformFacade {
static renameFilePromise = (
filePath: string,
newFilePath: string,
- onProgress = undefined
+ onProgress = undefined,
): Promise<any> => {
//PlatformFacade.ignoreByWatcher(filePath, newFilePath);
return platformRenameFilePromise(filePath, newFilePath, onProgress);
@@ -283,7 +283,7 @@ export default class PlatformFacade {
static renameDirectoryPromise = (
dirPath: string,
- newDirName: string
+ newDirName: string,
): Promise<any> => {
// PlatformFacade.ignoreByWatcher(dirPath, newDirName);
return platformRenameDirectoryPromise(dirPath, newDirName);
@@ -292,7 +292,7 @@ export default class PlatformFacade {
static copyDirectoryPromise = (
param: any,
newDirPath: string,
- onProgress = undefined
+ onProgress = undefined,
): Promise<any> => {
//PlatformFacade.ignoreByWatcher(param.path, newDirPath);
return platformCopyDirectoryPromise(param, newDirPath, onProgress);
@@ -301,7 +301,7 @@ export default class PlatformFacade {
static moveDirectoryPromise = (
param: any,
newDirPath: string,
- onProgress = undefined
+ onProgress = undefined,
): Promise<any> => {
//PlatformFacade.ignoreByWatcher(param.path, newDirPath);
return platformMoveDirectoryPromise(param, newDirPath, onProgress);
@@ -309,7 +309,7 @@ export default class PlatformFacade {
static loadTextFilePromise = (
filePath: string,
- isPreview?: boolean
+ isPreview?: boolean,
): Promise<any> => {
let path = filePath;
try {
@@ -320,18 +320,18 @@ export default class PlatformFacade {
static getFileContentPromise = (
filePath: string,
- type?: string
+ type?: string,
): Promise<any> => platformGetFileContentPromise(filePath, type);
static getLocalFileContentPromise = (
filePath: string,
- type?: string
+ type?: string,
): Promise<any> => platformGetLocalFileContentPromise(filePath, type);
static saveFilePromise = (
param: any,
content: any,
- overwrite: boolean
+ overwrite: boolean,
): Promise<any> => {
//PlatformFacade.ignoreByWatcher(param.path);
return platformSaveFilePromise(param, content, overwrite);
@@ -340,7 +340,7 @@ export default class PlatformFacade {
static saveTextFilePromise = (
param: any,
content: string,
- overwrite: boolean
+ overwrite: boolean,
): Promise<any> => {
//PlatformFacade.ignoreByWatcher(param.path);
return platformSaveTextFilePromise(param, content, overwrite);
@@ -352,8 +352,8 @@ export default class PlatformFacade {
overwrite: boolean,
onUploadProgress?: (
progress: any, // ManagedUpload.Progress,
- response: any // AWS.Response<AWS.S3.PutObjectOutput, AWS.AWSError>
- ) => void
+ response: any, // AWS.Response<AWS.S3.PutObjectOutput, AWS.AWSError>
+ ) => void,
): Promise<TS.FileSystemEntry> => {
//PlatformFacade.ignoreByWatcher(param.path);
@@ -361,13 +361,13 @@ export default class PlatformFacade {
param,
content,
overwrite,
- onUploadProgress
+ onUploadProgress,
);
};
static deleteFilePromise = (
path: string,
- useTrash?: boolean
+ useTrash?: boolean,
): Promise<any> => {
//PlatformFacade.ignoreByWatcher(path);
return platformDeleteFilePromise(path, useTrash);
@@ -375,7 +375,7 @@ export default class PlatformFacade {
static deleteDirectoryPromise = (
path: string,
- useTrash?: boolean
+ useTrash?: boolean,
): Promise<any> => {
//PlatformFacade.ignoreByWatcher(path);
return platformDeleteDirectoryPromise(path, useTrash);
@@ -389,7 +389,7 @@ export default class PlatformFacade {
static openFile = (
filePath: string,
- warningOpeningFilesExternally: boolean
+ warningOpeningFilesExternally: boolean,
): void => {
if (
!warningOpeningFilesExternally ||
@@ -397,7 +397,7 @@ export default class PlatformFacade {
confirm(
'Do you really want to open "' +
filePath +
- '"? Execution of some files can be potentially dangerous!'
+ '"? Execution of some files can be potentially dangerous!',
)
) {
platformOpenFile(filePath);
@@ -424,14 +424,14 @@ export default class PlatformFacade {
mode: string[],
ignorePatterns: Array<string>,
listDirectoryPromise,
- loadTextFilePromise
+ loadTextFilePromise,
) {
return platformCreateIndex(
param,
mode,
ignorePatterns,
listDirectoryPromise,
- loadTextFilePromise
+ loadTextFilePromise,
);
}
diff --git a/app/services/search.ts b/app/services/search.ts
index e5f50199d..90b5a9af3 100644
--- a/app/services/search.ts
+++ b/app/services/search.ts
@@ -48,7 +48,7 @@ export const FileTypeGroups = {
'dng',
'psd',
'avif',
- 'nef'
+ 'nef',
],
notes: ['md', 'mdown', 'txt', 'html'],
documents: [
@@ -64,7 +64,7 @@ export const FileTypeGroups = {
'numbers',
'potx',
'sldx',
- 'dotx'
+ 'dotx',
],
audio: ['ogg', 'mp3', 'wav', 'wave', 'flac', 'acc'],
video: ['ogv', 'mp4', 'webm', 'm4v', 'mkv', 'avi', '3gp', '3g2'],
@@ -74,7 +74,7 @@ export const FileTypeGroups = {
emails: ['eml', 'msg'],
folders: ['folders'],
files: ['files'],
- untagged: ['untagged']
+ untagged: ['untagged'],
};
export function haveSearchFilters(searchQuery: TS.SearchQuery) {
@@ -100,13 +100,13 @@ export function defaultTitle(searchQuery: TS.SearchQuery) {
title += searchQuery.textQuery;
}
if (searchQuery.tagsAND && searchQuery.tagsAND.length > 0) {
- title += searchQuery.tagsAND.map(tag => ' +' + tag.title);
+ title += searchQuery.tagsAND.map((tag) => ' +' + tag.title);
}
if (searchQuery.tagsNOT && searchQuery.tagsNOT.length > 0) {
- title += searchQuery.tagsNOT.map(tag => ' -' + tag.title);
+ title += searchQuery.tagsNOT.map((tag) => ' -' + tag.title);
}
if (searchQuery.tagsOR && searchQuery.tagsOR.length > 0) {
- title += searchQuery.tagsOR.map(tag => ' |' + tag.title);
+ title += searchQuery.tagsOR.map((tag) => ' |' + tag.title);
}
return title.trim();
}
@@ -159,25 +159,25 @@ const fuseOptions = {
keys: [
{
name: 'name',
- weight: 0.3
+ weight: 0.3,
},
{
name: 'description',
- weight: 0.2
+ weight: 0.2,
},
{
name: 'textContent',
- weight: 0.2
+ weight: 0.2,
},
{
name: 'tags',
- weight: 0.2
+ weight: 0.2,
},
{
name: 'path', // TODO ignore .ts folder, should not be in the index
- weight: 0.1
- }
- ]
+ weight: 0.1,
+ },
+ ],
};
// Constructs the string for the JMESPath search query. We first filter for all ORTags, then continuously pipe the result in to the
@@ -194,7 +194,7 @@ function constructjmespathQuery(searchQuery: TS.SearchQuery): string {
if (ORtagsExist) {
jmespathQuery += ' tags[? ';
- searchQuery.tagsOR.forEach(tag => {
+ searchQuery.tagsOR.forEach((tag) => {
const cleanedTagTitle = tag.title.trim().toLowerCase();
if (cleanedTagTitle.length > 0) {
jmespathQuery += "title=='" + cleanedTagTitle + "' || ";
@@ -211,7 +211,7 @@ function constructjmespathQuery(searchQuery: TS.SearchQuery): string {
} else {
jmespathQuery += ' tags[? ';
}
- searchQuery.tagsAND.forEach(tag => {
+ searchQuery.tagsAND.forEach((tag) => {
const cleanedTagTitle = tag.title.trim().toLowerCase();
if (cleanedTagTitle.length > 0) {
jmespathQuery += "title=='" + cleanedTagTitle + "']] | [? tags[? ";
@@ -230,7 +230,7 @@ function constructjmespathQuery(searchQuery: TS.SearchQuery): string {
} else {
jmespathQuery += '!(tags[? ';
}
- searchQuery.tagsNOT.forEach(tag => {
+ searchQuery.tagsNOT.forEach((tag) => {
const cleanedTagTitle = tag.title.trim().toLowerCase();
if (cleanedTagTitle.length > 0) {
jmespathQuery += "title=='" + cleanedTagTitle + "'])] | [?!(tags[? ";
@@ -267,7 +267,7 @@ function constructjmespathQuery(searchQuery: TS.SearchQuery): string {
function prepareIndex(
index: Array<TS.FileSystemEntry>,
- showUnixHiddenEntries: boolean
+ showUnixHiddenEntries: boolean,
) {
console.time('PreparingIndex');
let filteredIndex = [];
@@ -275,7 +275,7 @@ function prepareIndex(
filteredIndex = index;
} else {
filteredIndex = index.filter(
- (entry: TS.FileSystemEntry) => !entry.name.startsWith('.')
+ (entry: TS.FileSystemEntry) => !entry.name.startsWith('.'),
);
}
const enhancedIndex = filteredIndex.map((entry: any) => {
@@ -286,9 +286,9 @@ function prepareIndex(
let toTime = null;
let enhancedTags: Array<TS.Tag> = [];
if (tags && tags.length) {
- enhancedTags = tags.map(tag => {
+ enhancedTags = tags.map((tag) => {
const enhancedTag: TS.Tag = {
- ...tag
+ ...tag,
};
try {
const location = parseGeoLocation(tag.title);
@@ -306,7 +306,7 @@ function prepareIndex(
}
} catch (e) {
console.warn(
- 'Error parsing tag ' + JSON.stringify(tag) + ' from ' + entry.path
+ 'Error parsing tag ' + JSON.stringify(tag) + ' from ' + entry.path,
);
}
return enhancedTag;
@@ -314,7 +314,7 @@ function prepareIndex(
}
const enhancedEntry = {
...entry,
- tags: enhancedTags
+ tags: enhancedTags,
};
if (lat) {
enhancedEntry.lat = lat;
@@ -337,7 +337,7 @@ function prepareIndex(
function setOriginTitle(results: Array<Object>) {
return results.map((entry: any) => {
if (entry.tags && entry.tags.length) {
- entry.tags.map(tag => {
+ entry.tags.map((tag) => {
if (tag.originTitle) {
tag.title = tag.originTitle;
}
@@ -351,7 +351,7 @@ function setOriginTitle(results: Array<Object>) {
export default class Search {
static searchLocationIndex = (
locationContent: Array<TS.FileSystemEntry>,
- searchQuery: TS.SearchQuery
+ searchQuery: TS.SearchQuery,
): Promise<Array<TS.FileSystemEntry> | []> =>
new Promise((resolve, reject) => {
console.time('searchtime');
@@ -361,14 +361,14 @@ export default class Search {
const jmespathQuery = constructjmespathQuery(searchQuery);
let results = prepareIndex(
locationContent,
- searchQuery.showUnixHiddenEntries
+ searchQuery.showUnixHiddenEntries,
);
let searched = false;
// Limiting the search to current folder only (with sub-folders)
if (searchQuery.searchBoxing === 'folder') {
- results = results.filter(entry =>
- isPathStartsWith(entry.path, searchQuery.currentDirectory)
+ results = results.filter((entry) =>
+ isPathStartsWith(entry.path, searchQuery.currentDirectory),
);
}
@@ -396,7 +396,7 @@ export default class Search {
searchQuery.searchType &&
searchQuery.searchType.includes('strict')
) {
- results = results.filter(entry => {
+ results = results.filter((entry) => {
const ignoreCase = searchQuery.searchType === 'semistrict';
const textQuery = ignoreCase
? searchQuery.textQuery.toLowerCase()
diff --git a/app/services/taglibrary-utils.ts b/app/services/taglibrary-utils.ts
index cdf85a159..2f703dce3 100644
--- a/app/services/taglibrary-utils.ts
+++ b/app/services/taglibrary-utils.ts
@@ -4,7 +4,7 @@ import {
extend,
formatDateTime4Tag,
immutablySwapItems,
- prepareTagGroupForExport
+ prepareTagGroupForExport,
} from '@tagspaces/tagspaces-common/misc';
import versionMeta from '-/version.json';
import { getUuid } from '@tagspaces/tagspaces-common/utils-io';
@@ -26,7 +26,7 @@ export function getTagLibrary(): Array<TS.TagGroup> {
}
export function setTagLibrary(
- tagGroups: Array<TS.TagGroup>
+ tagGroups: Array<TS.TagGroup>,
): Array<TS.TagGroup> {
if (tagGroups && tagGroups.length > 0) {
localStorage.setItem(tagLibraryKey, JSON.stringify(tagGroups));
@@ -39,32 +39,32 @@ export function getAllTags(tagGroups?: Array<TS.TagGroup>) {
tagGroups = getTagLibrary();
}
const uniqueTags: TS.Tag[] = [];
- tagGroups.forEach(tagGroup => {
- tagGroup.children.forEach(tag => {
- const found = uniqueTags.find(uTag => uTag.title === tag.title);
+ tagGroups.forEach((tagGroup) => {
+ tagGroup.children.forEach((tag) => {
+ const found = uniqueTags.find((uTag) => uTag.title === tag.title);
if (!found) {
uniqueTags.push(tag);
}
});
});
return uniqueTags.sort((a, b) =>
- a.title > b.title ? 1 : a.title < b.title ? -1 : 0
+ a.title > b.title ? 1 : a.title < b.title ? -1 : 0,
);
}
export function removeTagGroup(
parentTagGroupUuid: TS.Uuid,
tagGroups: Array<TS.TagGroup>,
- locations: Array<TS.Location>
+ locations: Array<TS.Location>,
): Array<TS.TagGroup> {
const indexForRemoving = tagGroups.findIndex(
- t => t.uuid === parentTagGroupUuid
+ (t) => t.uuid === parentTagGroupUuid,
);
if (indexForRemoving >= 0) {
const tagGroup: TS.TagGroup = tagGroups[indexForRemoving];
if (Pro && tagGroup && tagGroup.locationId) {
const location: TS.Location = locations.find(
- l => l.uuid === tagGroup.locationId
+ (l) => l.uuid === tagGroup.locationId,
);
if (location) {
Pro.MetaOperations.removeTagGroup(location.path, parentTagGroupUuid);
@@ -73,7 +73,7 @@ export function removeTagGroup(
return setTagLibrary([
...tagGroups.slice(0, indexForRemoving),
- ...tagGroups.slice(indexForRemoving + 1)
+ ...tagGroups.slice(indexForRemoving + 1),
]);
}
@@ -82,15 +82,15 @@ export function removeTagGroup(
export function moveTagGroupUp(
parentTagGroupUuid: TS.Uuid,
- tagGroups: Array<TS.TagGroup>
+ tagGroups: Array<TS.TagGroup>,
): Array<TS.TagGroup> {
let indexForUpdating = tagGroups.findIndex(
- t => t.uuid === parentTagGroupUuid
+ (t) => t.uuid === parentTagGroupUuid,
);
if (indexForUpdating > 0) {
const secondIndex = indexForUpdating - 1;
return setTagLibrary(
- immutablySwapItems(tagGroups, indexForUpdating, secondIndex)
+ immutablySwapItems(tagGroups, indexForUpdating, secondIndex),
);
}
return tagGroups;
@@ -98,15 +98,15 @@ export function moveTagGroupUp(
export function moveTagGroupDown(
parentTagGroupUuid: TS.Uuid,
- tagGroups: Array<TS.TagGroup>
+ tagGroups: Array<TS.TagGroup>,
): Array<TS.TagGroup> {
let indexForUpdating = tagGroups.findIndex(
- t => t.uuid === parentTagGroupUuid
+ (t) => t.uuid === parentTagGroupUuid,
);
if (indexForUpdating >= 0 && indexForUpdating < tagGroups.length - 1) {
const secondIndex = indexForUpdating + 1;
return setTagLibrary(
- immutablySwapItems(tagGroups, indexForUpdating, secondIndex)
+ immutablySwapItems(tagGroups, indexForUpdating, secondIndex),
);
}
return tagGroups;
@@ -115,9 +115,9 @@ export function moveTagGroupDown(
export function moveTagGroup(
tagGroupUuid: TS.Uuid,
position: number,
- tagGroups: Array<TS.TagGroup>
+ tagGroups: Array<TS.TagGroup>,
): Array<TS.TagGroup> {
- let indexForUpdating = tagGroups.findIndex(t => t.uuid === tagGroupUuid);
+ let indexForUpdating = tagGroups.findIndex((t) => t.uuid === tagGroupUuid);
if (indexForUpdating > -1 && indexForUpdating !== position) {
const tagGroupsReturn = Array.from(tagGroups);
const [removed] = tagGroupsReturn.splice(indexForUpdating, 1);
@@ -129,10 +129,10 @@ export function moveTagGroup(
export function sortTagGroup(
parentTagGroupUuid: TS.Uuid,
- tagGroups: Array<TS.TagGroup>
+ tagGroups: Array<TS.TagGroup>,
): Array<TS.TagGroup> {
let indexForUpdating = tagGroups.findIndex(
- t => t.uuid === parentTagGroupUuid
+ (t) => t.uuid === parentTagGroupUuid,
);
if (indexForUpdating > -1) {
return setTagLibrary([
@@ -140,10 +140,10 @@ export function sortTagGroup(
{
...tagGroups[indexForUpdating],
children: tagGroups[indexForUpdating].children.sort((a, b) =>
- a.title > b.title ? 1 : a.title < b.title ? -1 : 0
- )
+ a.title > b.title ? 1 : a.title < b.title ? -1 : 0,
+ ),
},
- ...tagGroups.slice(indexForUpdating + 1)
+ ...tagGroups.slice(indexForUpdating + 1),
]);
}
return tagGroups;
@@ -152,7 +152,7 @@ export function sortTagGroup(
export function importTagGroups(
newEntries: Array<TS.TagGroup>,
tagGroups: Array<TS.TagGroup>,
- replace = false
+ replace = false,
): Array<TS.TagGroup> {
const arr = replace ? [] : [...tagGroups];
// console.log(arr);
@@ -167,10 +167,10 @@ export function importTagGroups(
title: newTg.title,
// @ts-ignore
uuid: newTg.key,
- children: newTg.children
+ children: newTg.children,
};
const tagsArr = [];
- newTg.children.forEach(tag => {
+ newTg.children.forEach((tag) => {
tagsArr.push(tag);
newTg.children = tagsArr;
arr.push(newTg);
@@ -178,12 +178,12 @@ export function importTagGroups(
}
});
} else {
- newEntries.forEach(tagGroup => {
- const index = arr.findIndex(obj => obj.uuid === tagGroup.uuid);
+ newEntries.forEach((tagGroup) => {
+ const index = arr.findIndex((obj) => obj.uuid === tagGroup.uuid);
if (index > -1) {
- tagGroup.children.forEach(tag => {
+ tagGroup.children.forEach((tag) => {
const stateTag = arr[index].children.find(
- obj => obj.title === tag.title
+ (obj) => obj.title === tag.title,
);
if (stateTag === undefined) {
arr[index].children.push(tag);
@@ -203,7 +203,7 @@ export function importTagGroups(
export function exportTagGroups(
entry: Array<TS.TagGroup>,
- settingsVersion = 3
+ settingsVersion = 3,
) {
const tagLibrary = entry;
const jsonFormat =
@@ -215,7 +215,7 @@ export function exportTagGroups(
settingsVersion +
', "tagGroups": ';
const allTagGroups = [];
- tagLibrary.forEach(value => {
+ tagLibrary.forEach((value) => {
const preparedTagGroup = prepareTagGroupForExport(value);
if (preparedTagGroup.title && preparedTagGroup.uuid) {
allTagGroups.push(preparedTagGroup);
@@ -225,8 +225,8 @@ export function exportTagGroups(
const blob = new Blob(
[jsonFormat + JSON.stringify(allTagGroups, null, 2) + '}'],
{
- type: 'application/json'
- }
+ type: 'application/json',
+ },
);
const dateTimeTag = formatDateTime4Tag(new Date(), true);
saveAsTextFile(blob, 'tag-library [tagspaces ' + dateTimeTag + '].json');
@@ -236,12 +236,12 @@ export function exportTagGroups(
export function createTagGroup(
entry: TS.TagGroup,
tagGroups: Array<TS.TagGroup>,
- location?: TS.Location
+ location?: TS.Location,
): Array<TS.TagGroup> {
const newEntry = {
...entry,
created_date: new Date().getTime(),
- modified_date: new Date().getTime()
+ modified_date: new Date().getTime(),
};
if (Pro && location) {
Pro.MetaOperations.createTagGroup(location.path, newEntry);
@@ -254,10 +254,10 @@ export function editTag(
parentTagGroupUuid: TS.Uuid,
origTitle: string,
tagGroups: Array<TS.TagGroup>,
- locations: Array<TS.Location>
+ locations: Array<TS.Location>,
): Array<TS.TagGroup> {
const indexForEditing = tagGroups.findIndex(
- t => t.uuid === parentTagGroupUuid
+ (t) => t.uuid === parentTagGroupUuid,
);
if (indexForEditing > -1) {
@@ -265,17 +265,17 @@ export function editTag(
const newTagGroup: TS.TagGroup = {
...tagGroup,
modified_date: new Date().getTime(),
- children: tagGroup.children.map(t => {
+ children: tagGroup.children.map((t) => {
if (t.title === origTitle) {
return tag;
}
return t;
- })
+ }),
};
if (Pro && tagGroup && tagGroup.locationId) {
const location: TS.Location = locations.find(
- l => l.uuid === tagGroup.locationId
+ (l) => l.uuid === tagGroup.locationId,
);
if (location) {
Pro.MetaOperations.editTagGroup(location.path, newTagGroup, true);
@@ -290,7 +290,7 @@ export function moveTag(
tagTitle: string,
fromTagGroupId: TS.Uuid,
toTagGroupId: TS.Uuid,
- tagGroups: Array<TS.TagGroup>
+ tagGroups: Array<TS.TagGroup>,
) {
let tagIndexForRemoving = -1;
let indexFromGroup = -1;
@@ -305,20 +305,22 @@ export function moveTag(
});
if (indexFromGroup >= 0 && tagGroups[indexFromGroup].children) {
tagIndexForRemoving = tagGroups[indexFromGroup].children.findIndex(
- tag => tag.title === tagTitle
+ (tag) => tag.title === tagTitle,
);
}
if (indexToGroup >= 0 && indexToGroup >= 0 && tagIndexForRemoving >= 0) {
const newTagLibrary = [...tagGroups];
const tag = { ...tagGroups[indexFromGroup].children[tagIndexForRemoving] };
const found = newTagLibrary[indexToGroup].children.find(
- t => t.title === tag.title
+ (t) => t.title === tag.title,
);
if (!found) {
newTagLibrary[indexToGroup].children.push(tag);
newTagLibrary[indexFromGroup].children = [
...newTagLibrary[indexFromGroup].children.slice(0, tagIndexForRemoving),
- ...newTagLibrary[indexFromGroup].children.slice(tagIndexForRemoving + 1)
+ ...newTagLibrary[indexFromGroup].children.slice(
+ tagIndexForRemoving + 1,
+ ),
];
return setTagLibrary(newTagLibrary);
}
@@ -331,10 +333,10 @@ export function changeTagOrder(
tagGroupUuid: TS.Uuid,
fromIndex: number,
toIndex: number,
- tagGroups: Array<TS.TagGroup>
+ tagGroups: Array<TS.TagGroup>,
) {
const indexFromGroup = tagGroups.findIndex(
- tagGroup => tagGroup.uuid === tagGroupUuid
+ (tagGroup) => tagGroup.uuid === tagGroupUuid,
);
if (indexFromGroup > -1) {
@@ -342,10 +344,10 @@ export function changeTagOrder(
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#swapping_variables
[
newTagLibrary[indexFromGroup].children[fromIndex],
- newTagLibrary[indexFromGroup].children[toIndex]
+ newTagLibrary[indexFromGroup].children[toIndex],
] = [
newTagLibrary[indexFromGroup].children[toIndex],
- newTagLibrary[indexFromGroup].children[fromIndex]
+ newTagLibrary[indexFromGroup].children[fromIndex],
];
return setTagLibrary(newTagLibrary);
@@ -356,16 +358,16 @@ export function changeTagOrder(
export function editTagGroup(
entry: TS.TagGroup,
tagGroups: Array<TS.TagGroup>,
- locations: Array<TS.Location>
+ locations: Array<TS.Location>,
) {
const editedTagGroup = {
...entry,
- modified_date: new Date().getTime()
+ modified_date: new Date().getTime(),
};
if (Pro && entry.locationId) {
const location: TS.Location = locations.find(
- l => l.uuid === entry.locationId
+ (l) => l.uuid === entry.locationId,
);
if (location) {
Pro.MetaOperations.editTagGroup(location.path, editedTagGroup);
@@ -378,14 +380,14 @@ export function deleteTag(
tagTitle: string,
parentTagGroupUuid: TS.Uuid,
tagGroups: Array<TS.TagGroup>,
- locations: Array<TS.Location>
+ locations: Array<TS.Location>,
) {
const tagGroup: TS.TagGroup = tagGroups.find(
- t => t.uuid === parentTagGroupUuid
+ (t) => t.uuid === parentTagGroupUuid,
);
const tagIndexForRemoving = tagGroup.children.findIndex(
- tag => tag.title === tagTitle
+ (tag) => tag.title === tagTitle,
);
if (tagIndexForRemoving >= 0) {
const editedTagGroup: TS.TagGroup = {
@@ -393,13 +395,13 @@ export function deleteTag(
modified_date: new Date().getTime(),
children: [
...tagGroup.children.slice(0, tagIndexForRemoving),
- ...tagGroup.children.slice(tagIndexForRemoving + 1)
- ]
+ ...tagGroup.children.slice(tagIndexForRemoving + 1),
+ ],
};
if (Pro && tagGroup.locationId) {
const location: TS.Location = locations.find(
- l => l.uuid === tagGroup.locationId
+ (l) => l.uuid === tagGroup.locationId,
);
if (location) {
Pro.MetaOperations.editTagGroup(location.path, editedTagGroup, true);
@@ -414,24 +416,24 @@ export function addTag(
tag: any,
parentTagGroupUuid: TS.Uuid,
tagGroups: Array<TS.TagGroup>,
- locations: Array<TS.Location>
+ locations: Array<TS.Location>,
) {
// const { tagTextColor, tagBackgroundColor } = settings;
let tagGroupsReturn = tagGroups;
const tagGroup: TS.TagGroup = tagGroups.find(
- t => t.uuid === parentTagGroupUuid
+ (t) => t.uuid === parentTagGroupUuid,
);
let newTags: Array<TS.Tag>;
if (typeof tag === 'object' && tag !== null) {
- if (tagGroup.children.some(t => t.title === tag.title)) {
+ if (tagGroup.children.some((t) => t.title === tag.title)) {
// tag exist
return;
}
const tagObject: TS.Tag = {
...tag,
textcolor: tag.textcolor, // || tagTextColor,
- color: tag.color // || tagBackgroundColor
+ color: tag.color, // || tagBackgroundColor
};
newTags = [tagObject];
tagGroupsReturn = addTagInt(tagObject, parentTagGroupUuid, tagGroups);
@@ -439,7 +441,7 @@ export function addTag(
const newTagGroup = {
...tagGroup,
color: tagGroup.color, // ? tagGroup.color : tagBackgroundColor,
- textcolor: tagGroup.textcolor // ? tagGroup.textcolor : tagTextColor
+ textcolor: tagGroup.textcolor, // ? tagGroup.textcolor : tagTextColor
};
newTags = parseNewTags(tag, newTagGroup);
tagGroupsReturn = addTags(newTags, newTagGroup, tagGroups);
@@ -448,7 +450,7 @@ export function addTag(
if (Pro && tagGroup && tagGroup.locationId) {
// const { locations } = getState();
const location: TS.Location = locations.find(
- l => l.uuid === tagGroup.locationId
+ (l) => l.uuid === tagGroup.locationId,
);
if (location) {
tagGroup.children = newTags;
@@ -461,17 +463,17 @@ export function addTag(
export function mergeTagGroup(
entry: TS.TagGroup,
tagGroups: Array<TS.TagGroup>,
- locations?: Array<TS.Location>
+ locations?: Array<TS.Location>,
) {
if (Pro && entry.locationId && locations) {
const location: TS.Location = locations.find(
- l => l.uuid === entry.locationId
+ (l) => l.uuid === entry.locationId,
);
if (location) {
Pro.MetaOperations.mergeTagGroup(location.path, entry);
}
}
- const indexForEditing = tagGroups.findIndex(obj => obj.uuid === entry.uuid);
+ const indexForEditing = tagGroups.findIndex((obj) => obj.uuid === entry.uuid);
if (indexForEditing > -1) {
const tags = [...tagGroups[indexForEditing].children, ...entry.children];
tags.splice(0, tags.length - AppConfig.maxCollectedTag);
@@ -482,9 +484,9 @@ export function mergeTagGroup(
title: entry.title,
children: tags,
created_date: entry.created_date,
- modified_date: new Date().getTime()
+ modified_date: new Date().getTime(),
},
- ...tagGroups.slice(indexForEditing + 1)
+ ...tagGroups.slice(indexForEditing + 1),
]);
}
return setTagLibrary([
@@ -496,25 +498,25 @@ export function mergeTagGroup(
textcolor: entry.textcolor,
children: entry.children,
created_date: new Date().getTime(),
- modified_date: new Date().getTime()
- }
+ modified_date: new Date().getTime(),
+ },
]);
}
function addTags(
tags: Array<TS.Tag>,
tagGroup: TS.TagGroup,
- tagGroups: Array<TS.TagGroup>
+ tagGroups: Array<TS.TagGroup>,
) {
- let indexForEditing = tagGroups.findIndex(tg => tg.uuid === tagGroup.uuid);
+ let indexForEditing = tagGroups.findIndex((tg) => tg.uuid === tagGroup.uuid);
if (indexForEditing >= 0) {
return setTagLibrary([
...tagGroups.slice(0, indexForEditing),
{
...tagGroups[indexForEditing],
- children: tags
+ children: tags,
},
- ...tagGroups.slice(indexForEditing + 1)
+ ...tagGroups.slice(indexForEditing + 1),
]);
}
return tagGroups;
@@ -523,22 +525,22 @@ function addTags(
function addTagInt(
newTag: TS.Tag,
parentTagGroupUuid: TS.Uuid,
- tagGroups: Array<TS.TagGroup>
+ tagGroups: Array<TS.TagGroup>,
) {
let indexForEditing = tagGroups.findIndex(
- tagGroup => tagGroup.uuid === parentTagGroupUuid
+ (tagGroup) => tagGroup.uuid === parentTagGroupUuid,
);
if (indexForEditing >= 0) {
const taggroupTags = tagGroups[indexForEditing].children;
- if (!taggroupTags.some(tag => tag.title === newTag.title)) {
+ if (!taggroupTags.some((tag) => tag.title === newTag.title)) {
return setTagLibrary([
...tagGroups.slice(0, indexForEditing),
{
...tagGroups[indexForEditing],
- children: [...taggroupTags, newTag]
+ children: [...taggroupTags, newTag],
},
- ...tagGroups.slice(indexForEditing + 1)
+ ...tagGroups.slice(indexForEditing + 1),
]);
}
}
@@ -547,22 +549,22 @@ function addTagInt(
function updateTagGroup(
entry: TS.TagGroup,
- tagGroups: Array<TS.TagGroup>
+ tagGroups: Array<TS.TagGroup>,
): Array<TS.TagGroup> {
let indexForEditing = tagGroups.findIndex(
- tagGroup => tagGroup.uuid === entry.uuid
+ (tagGroup) => tagGroup.uuid === entry.uuid,
);
if (indexForEditing >= 0) {
const modifiedEntry = {
...entry,
...(!entry.created_date && { created_date: new Date().getTime() }),
- ...(!entry.modified_date && { modified_date: new Date().getTime() })
+ ...(!entry.modified_date && { modified_date: new Date().getTime() }),
};
return setTagLibrary([
...tagGroups.slice(0, indexForEditing),
modifiedEntry,
- ...tagGroups.slice(indexForEditing + 1)
+ ...tagGroups.slice(indexForEditing + 1),
]);
}
return tagGroups;
@@ -574,11 +576,11 @@ function updateTagGroup(
export const getTagColors = (
tagTitle: string,
defaultTextColor: string,
- defaultBackgroundColor: string
+ defaultBackgroundColor: string,
) => {
const tagColors = {
textcolor: defaultTextColor,
- color: defaultBackgroundColor
+ color: defaultBackgroundColor,
};
getAllTags().forEach((tag: TS.Tag) => {
if (tag.title === tagTitle) {
diff --git a/app/services/thumbsgenerator.ts b/app/services/thumbsgenerator.ts
index c49b23d79..b233a572f 100644
--- a/app/services/thumbsgenerator.ts
+++ b/app/services/thumbsgenerator.ts
@@ -23,7 +23,7 @@ import {
extractFileName,
normalizePath,
getMetaDirectoryPath,
- encodeFileName
+ encodeFileName,
} from '@tagspaces/tagspaces-common/paths';
import AppConfig from '-/AppConfig';
import { base64ToArrayBuffer } from '-/utils/dom';
@@ -60,7 +60,7 @@ export const supportedContainers = [
'odg',
'ods',
'odt',
- 'pdf'
+ 'pdf',
];
export const supportedText = [
'txt',
@@ -84,7 +84,7 @@ export const supportedText = [
'rb',
'ini',
'sh',
- 'sql'
+ 'sql',
// 'mhtml'
];
export const supportedVideos = [
@@ -94,7 +94,7 @@ export const supportedVideos = [
'm4v',
'mkv',
'lrv',
- '3gp'
+ '3gp',
// '3g2'
];
const maxFileSize = 30 * 1024 * 1024; // 30 MB
@@ -108,12 +108,12 @@ function saveThumbnailPromise(filePath, dataURL) {
const content = base64ToArrayBuffer(baseString);
return PlatformIO.saveBinaryFilePromise({ path: filePath }, content, true)
.then(() => filePath)
- .catch(error => {
+ .catch((error) => {
console.warn(
'Saving thumbnail for ' +
filePath +
' failed with ' +
- JSON.stringify(error)
+ JSON.stringify(error),
);
return Promise.reject(new Error('Saving tmb failed for: ' + filePath));
});
@@ -122,11 +122,11 @@ function saveThumbnailPromise(filePath, dataURL) {
function getThumbFileLocation(filePath: string) {
const containingFolder = extractContainingDirectoryPath(
filePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const metaFolder = getMetaDirectoryPath(
containingFolder,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
return (
metaFolder +
@@ -137,13 +137,13 @@ function getThumbFileLocation(filePath: string) {
}
export function getThumbnailURLPromise(
- filePath: string
+ filePath: string,
): Promise<{ filePath: string; tmbPath?: string }> {
return PlatformIO.getPropertiesPromise(filePath)
- .then(origStats => {
+ .then((origStats) => {
const thumbFilePath = getThumbFileLocation(filePath);
return PlatformIO.getPropertiesPromise(thumbFilePath)
- .then(stats => {
+ .then((stats) => {
if (stats) {
// Thumbnail exists
if (origStats.lmdt > stats.lmdt) {
@@ -152,10 +152,10 @@ export function getThumbnailURLPromise(
filePath,
origStats.size,
thumbFilePath,
- origStats.isFile
+ origStats.isFile,
)
- .then(tmbPath => ({ filePath, tmbPath }))
- .catch(err => {
+ .then((tmbPath) => ({ filePath, tmbPath }))
+ .catch((err) => {
console.warn('Thumb generation failed ' + err);
return Promise.resolve({ filePath, tmbPath: thumbFilePath });
});
@@ -169,21 +169,21 @@ export function getThumbnailURLPromise(
filePath,
origStats.size,
thumbFilePath,
- origStats.isFile
+ origStats.isFile,
)
- .then(tmbPath => ({ filePath, tmbPath }))
- .catch(err => {
+ .then((tmbPath) => ({ filePath, tmbPath }))
+ .catch((err) => {
console.warn('Thumb generation failed ' + err);
return Promise.resolve({ filePath });
});
}
})
- .catch(err => {
+ .catch((err) => {
console.warn('Error getting tmb properties ' + err);
return Promise.resolve({ filePath });
});
})
- .catch(err => {
+ .catch((err) => {
console.warn('Error getting file properties ' + err);
return Promise.resolve({ filePath });
});
@@ -217,11 +217,11 @@ export function createThumbnailPromise(
filePath: string,
fileSize: number,
thumbFilePath: string,
- isFile: boolean
+ isFile: boolean,
): Promise<string | undefined> {
const metaDirectory = extractContainingDirectoryPath(
thumbFilePath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const fileDirectory = isFile
? extractContainingDirectoryPath(filePath, PlatformIO.getDirSeparator())
@@ -230,7 +230,7 @@ export function createThumbnailPromise(
if (normalizedFileDirectory.endsWith(AppConfig.metaFolder)) {
return Promise.resolve(undefined); // prevent creating thumbs in meta/.ts folder
}
- return PlatformIO.checkDirExist(metaDirectory).then(exist => {
+ return PlatformIO.checkDirExist(metaDirectory).then((exist) => {
if (!exist) {
return PlatformIO.createDirectoryPromise(metaDirectory).then(() => {
return createThumbnailSavePromise(filePath, fileSize, thumbFilePath);
@@ -244,21 +244,21 @@ export function createThumbnailPromise(
function createThumbnailSavePromise(
filePath: string,
fileSize: number,
- thumbFilePath: string
+ thumbFilePath: string,
): Promise<string | undefined> {
return generateThumbnailPromise(filePath, fileSize)
- .then(dataURL => {
+ .then((dataURL) => {
if (dataURL && dataURL.length) {
return saveThumbnailPromise(thumbFilePath, dataURL)
.then(() => thumbFilePath)
- .catch(err => {
+ .catch((err) => {
console.warn('Thumb saving failed ' + err + ' for ' + filePath);
return Promise.resolve(undefined);
});
}
return undefined; // thumbFilePath;
})
- .catch(err => {
+ .catch((err) => {
console.warn('Thumb generation failed ' + err + ' for ' + filePath);
return Promise.resolve(undefined);
});
@@ -270,7 +270,7 @@ function createThumbnailSavePromise(
export function generateThumbnailPromise(fileURL: string, fileSize: number) {
const ext = extractFileExtension(
fileURL,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
).toLowerCase();
const fileURLEscaped = /^https?:\/\//.test(fileURL)
@@ -310,14 +310,14 @@ export function generateThumbnailPromise(fileURL: string, fileSize: number) {
return Pro.ThumbsGenerator.generateZipContainerImageThumbnail(
fileURLEscaped,
maxSize,
- supportedImgs
+ supportedImgs,
);
}
} else if (supportedVideos.indexOf(ext) >= 0) {
if (Pro) {
return Pro.ThumbsGenerator.generateVideoThumbnail(
fileURLEscaped,
- maxSize
+ maxSize,
);
}
return generateVideoThumbnail(fileURLEscaped);
@@ -331,9 +331,9 @@ function generateDefaultThumbnail() {
export function generateImageThumbnail(
fileURL: string,
- maxTmbSize?: number
+ maxTmbSize?: number,
): Promise<string> {
- return new Promise(resolve => {
+ return new Promise((resolve) => {
try {
let canvas: HTMLCanvasElement = document.createElement('canvas');
const ctx = canvas.getContext('2d');
@@ -409,7 +409,7 @@ export function generateImageThumbnail(
// });
};
img.src = fileURL;
- img.onerror = err => {
+ img.onerror = (err) => {
console.warn(`Error loading: ${fileURL} for tmb gen`, err);
resolve('');
};
@@ -421,7 +421,7 @@ export function generateImageThumbnail(
}
function generateVideoThumbnail(fileURL): Promise<string> {
- return new Promise(resolve => {
+ return new Promise((resolve) => {
try {
let canvas: HTMLCanvasElement = document.createElement('canvas');
const ctx = canvas.getContext('2d');
@@ -443,7 +443,7 @@ function generateVideoThumbnail(fileURL): Promise<string> {
video.onseeked = () => {
ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
const dataurl = canvas.toDataURL(AppConfig.thumbType);
- img.onerror = err => {
+ img.onerror = (err) => {
console.warn(`Error loading: ${fileURL} for tmb gen with: ${err} `);
resolve('');
};
@@ -452,7 +452,7 @@ function generateVideoThumbnail(fileURL): Promise<string> {
canvas = null;
video = null;
};
- video.onerror = err => {
+ video.onerror = (err) => {
console.warn(`Error opening: ${fileURL} for tmb gen with: ${err} `);
resolve('');
};
diff --git a/app/services/utils-io.ts b/app/services/utils-io.ts
index 5f2bd5552..9ca87a75c 100644
--- a/app/services/utils-io.ts
+++ b/app/services/utils-io.ts
@@ -21,16 +21,16 @@ import { marked } from 'marked';
import DOMPurify from 'dompurify';
import {
loadIndex,
- enhanceDirectoryIndex
+ enhanceDirectoryIndex,
} from '@tagspaces/tagspaces-platforms/indexer';
import {
enhanceEntry,
- loadJSONString
+ loadJSONString,
} from '@tagspaces/tagspaces-common/utils-io';
import { saveAs } from 'file-saver';
import {
locationType,
- prepareTagForExport
+ prepareTagForExport,
} from '@tagspaces/tagspaces-common/misc';
import {
extractTagsAsObjects,
@@ -45,7 +45,7 @@ import {
normalizePath,
getThumbFileLocationForDirectory,
getBgndFileLocationForDirectory,
- cleanFrontDirSeparator
+ cleanFrontDirSeparator,
} from '@tagspaces/tagspaces-common/paths';
import AppConfig from '-/AppConfig';
import PlatformIO from './platform-facade';
@@ -59,7 +59,7 @@ import { supportedFileTypes } from '-/extension-config';
export function getMetaForEntry(
entry: TS.FileSystemEntry,
- metaFilePath?: string
+ metaFilePath?: string,
): Promise<TS.FileSystemEntry> {
if (entry.meta) {
// && Object.keys(entry.meta).length > 0) {
@@ -70,12 +70,12 @@ export function getMetaForEntry(
if (entry.isFile) {
metaFilePath = getMetaFileLocationForFile(
entry.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
} else {
metaFilePath = getMetaFileLocationForDir(
entry.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
}
}
@@ -86,11 +86,11 @@ export function getMetaForEntry(
...entry,
meta: {
...meta,
- description: getDescriptionPreview(meta.description, 200)
- }
+ description: getDescriptionPreview(meta.description, 200),
+ },
},
AppConfig.tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
}
return entry;
@@ -99,34 +99,35 @@ export function getMetaForEntry(
export function enhanceOpenedEntry(
entry: OpenedEntry,
- tagDelimiter
+ tagDelimiter,
): OpenedEntry {
if (entry.isFile) {
const fineNameTags = extractTagsAsObjects(
entry.path,
tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
if (fineNameTags.length > 0) {
if (entry.tags && entry.tags.length > 0) {
const uniqueTags = entry.tags.filter(
- tag => fineNameTags.findIndex(obj => obj.title === tag.title) === -1
+ (tag) =>
+ fineNameTags.findIndex((obj) => obj.title === tag.title) === -1,
);
return {
...entry,
- tags: [...uniqueTags, ...fineNameTags]
+ tags: [...uniqueTags, ...fineNameTags],
};
}
return {
...entry,
- tags: fineNameTags
+ tags: fineNameTags,
};
}
} else {
// ignore wrong size from fs.stats for directories
return {
...entry,
- size: undefined
+ size: undefined,
};
}
return entry;
@@ -243,7 +244,7 @@ export function enhanceOpenedEntry(
export function orderDirectories(
directories,
- metaArray: Array<TS.OrderVisibilitySettings>
+ metaArray: Array<TS.OrderVisibilitySettings>,
) {
// if (sortBy === 'custom') {
try {
@@ -251,11 +252,11 @@ export function orderDirectories(
const arrLength = directories.length;
return directories.sort((a, b) => {
let indexA = metaArray.findIndex(
- meta => meta.name === a.name
+ (meta) => meta.name === a.name,
// meta => meta.path === Object.keys(a)[0]
);
let indexB = metaArray.findIndex(
- meta => meta.name === b.name
+ (meta) => meta.name === b.name,
// meta => meta.path === Object.keys(b)[0]
);
// set new dirs last
@@ -277,12 +278,12 @@ export function orderDirectories(
export function orderByMetaArray(
arr,
- metaArray: Array<TS.OrderVisibilitySettings>
+ metaArray: Array<TS.OrderVisibilitySettings>,
) {
const arrLength = arr.length;
return arr.sort((a, b) => {
- let indexA = metaArray.findIndex(metaFiles => metaFiles.name === a.name);
- let indexB = metaArray.findIndex(metaFiles => metaFiles.name === b.name);
+ let indexA = metaArray.findIndex((metaFiles) => metaFiles.name === a.name);
+ let indexB = metaArray.findIndex((metaFiles) => metaFiles.name === b.name);
// set new files last; dirs first
if (indexA === -1) {
indexA = !a.isFile ? arrLength * -1 : arrLength;
@@ -296,7 +297,7 @@ export function orderByMetaArray(
export function findExtensionPathForId(
extensionId: string,
- extensionExternalPath = undefined
+ extensionExternalPath = undefined,
): string {
if (extensionExternalPath) {
return extensionExternalPath + '/' + extensionId;
@@ -311,11 +312,11 @@ export function findExtensionsForEntry(
uuid: string,
supportedFileTypes: Array<any>,
entryPath: string,
- isFile = true
+ isFile = true,
): OpenedEntry {
const fileExtension = extractFileExtension(
entryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
).toLowerCase();
const viewingExtensionPath = isFile
? findExtensionPathForId('@tagspaces/extensions/text-viewer')
@@ -329,9 +330,9 @@ export function findExtensionsForEntry(
// changed: false,
locationId: undefined,
lmdt: 0,
- size: 0
+ size: 0,
};
- supportedFileTypes.map(fileType => {
+ supportedFileTypes.map((fileType) => {
if (fileType.viewer && fileType.type.toLowerCase() === fileExtension) {
fileForOpening.viewingExtensionId = fileType.viewer;
if (fileType.color) {
@@ -339,13 +340,13 @@ export function findExtensionsForEntry(
}
fileForOpening.viewingExtensionPath = findExtensionPathForId(
fileType.viewer,
- fileType.extensionExternalPath
+ fileType.extensionExternalPath,
);
if (fileType.editor && fileType.editor.length > 0) {
fileForOpening.editingExtensionId = fileType.editor;
fileForOpening.editingExtensionPath = findExtensionPathForId(
fileType.editor,
- fileType.extensionExternalPath
+ fileType.extensionExternalPath,
);
}
}
@@ -357,10 +358,10 @@ export function findExtensionsForEntry(
export function getNextFile(
pivotFilePath?: string,
lastSelectedEntry?: string,
- currentDirectoryEntries?: Array<TS.FileSystemEntry>
+ currentDirectoryEntries?: Array<TS.FileSystemEntry>,
): TS.FileSystemEntry {
const currentEntries = currentDirectoryEntries
- ? currentDirectoryEntries.filter(entry => entry.isFile)
+ ? currentDirectoryEntries.filter((entry) => entry.isFile)
: [];
let filePath = pivotFilePath;
if (!filePath) {
@@ -394,10 +395,10 @@ export function getNextFile(
export function getPrevFile(
pivotFilePath?: string,
lastSelectedEntry?: string,
- currentDirectoryEntries?: Array<TS.FileSystemEntry>
+ currentDirectoryEntries?: Array<TS.FileSystemEntry>,
): TS.FileSystemEntry {
const currentEntries = currentDirectoryEntries
- ? currentDirectoryEntries.filter(entry => entry.isFile)
+ ? currentDirectoryEntries.filter((entry) => entry.isFile)
: [];
let filePath = pivotFilePath;
if (!filePath) {
@@ -450,15 +451,15 @@ async function persistIndex(param: string | any, directoryIndex: any) {
return PlatformIO.saveTextFilePromise(
{ ...param, path: folderIndexPath },
JSON.stringify(directoryIndex), // relativeIndex),
- true
+ true,
)
.then(() => {
console.log(
- 'Index persisted for: ' + directoryPath + ' to ' + folderIndexPath
+ 'Index persisted for: ' + directoryPath + ' to ' + folderIndexPath,
);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.log('Error saving the index for ' + folderIndexPath, err);
});
}
@@ -467,7 +468,7 @@ export function createDirectoryIndex(
param: string | any,
extractText = false,
ignorePatterns: Array<string> = [],
- enableWS = true
+ enableWS = true,
// disableIndexing = true,
): Promise<Array<TS.FileSystemEntry>> {
if (Pro && Pro.Watcher) {
@@ -492,8 +493,8 @@ export function createDirectoryIndex(
return PlatformIO.createDirectoryIndexInWorker(
dirPath,
extractText,
- ignorePatterns
- ).then(succeeded => {
+ ignorePatterns,
+ ).then((succeeded) => {
if (succeeded) {
return loadIndex({ path: dirPath, locationID });
}
@@ -517,18 +518,18 @@ export function createDirectoryIndex(
mode,
ignorePatterns,
listDirectoryPromise,
- loadTextFilePromise
+ loadTextFilePromise,
)
- .then(directoryIndex =>
- persistIndex(param, directoryIndex).then(success => {
+ .then((directoryIndex) =>
+ persistIndex(param, directoryIndex).then((success) => {
if (success) {
console.log('Index generated in folder: ' + directoryPath);
return enhanceDirectoryIndex(param, directoryIndex, locationID);
}
return undefined;
- })
+ }),
)
- .catch(err => {
+ .catch((err) => {
console.log('Error creating index: ', err);
});
}
@@ -537,7 +538,7 @@ export function createDirectoryIndex(
* get full entry properties - with full description
*/
export async function getAllPropertiesPromise(
- entryPath: string
+ entryPath: string,
): Promise<TS.FileSystemEntry> {
const entryProps = await PlatformIO.getPropertiesPromise(entryPath);
let metaFilePath;
@@ -553,7 +554,7 @@ export async function getAllPropertiesPromise(
return enhanceEntry(
entryProps,
AppConfig.tagDelimiter,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
}
console.warn('Error getting props for ' + entryPath);
@@ -582,21 +583,21 @@ export function saveAsTextFile(blob: any, filename: string) {
}*/
export function isFulfilled<T>(
- result: PromiseSettledResult<T>
+ result: PromiseSettledResult<T>,
): result is PromiseFulfilledResult<T> {
return result.status === 'fulfilled';
}
export function isRejected<T>(
- result: PromiseSettledResult<T>
+ result: PromiseSettledResult<T>,
): result is PromiseRejectedResult {
return result.status === 'rejected';
}
export function getFulfilledResults<T>(
- results: Array<PromiseSettledResult<T>>
+ results: Array<PromiseSettledResult<T>>,
) {
- return results.filter(isFulfilled).map(result => result.value);
+ return results.filter(isFulfilled).map((result) => result.value);
}
interface FileExistenceCheck {
@@ -606,9 +607,9 @@ interface FileExistenceCheck {
export function checkFilesExistPromise(
paths: string[],
- targetPath: string
+ targetPath: string,
): Promise<Array<string>> {
- const promises: FileExistenceCheck[] = paths.map(path => {
+ const promises: FileExistenceCheck[] = paths.map((path) => {
const targetFile =
normalizePath(targetPath) +
PlatformIO.getDirSeparator() +
@@ -618,23 +619,23 @@ export function checkFilesExistPromise(
const progressPromises: Array<Promise<string>> = promises.map(
({ promise, path }) =>
promise
- .then(exists => (exists ? path : ''))
- .catch(err => {
+ .then((exists) => (exists ? path : ''))
+ .catch((err) => {
console.warn(`Promise ${path} error:`, err);
return '';
- })
+ }),
);
- return Promise.allSettled(progressPromises).then(results => {
- return getFulfilledResults(results).filter(r => r);
+ return Promise.allSettled(progressPromises).then((results) => {
+ return getFulfilledResults(results).filter((r) => r);
});
}
export function checkDirsExistPromise(
paths: string[],
- targetPath: string
+ targetPath: string,
): Promise<Array<string>> {
- const promises: FileExistenceCheck[] = paths.map(path => {
+ const promises: FileExistenceCheck[] = paths.map((path) => {
const targetDir =
normalizePath(targetPath) +
PlatformIO.getDirSeparator() +
@@ -644,15 +645,15 @@ export function checkDirsExistPromise(
const progressPromises: Array<Promise<string>> = promises.map(
({ promise, path }) =>
promise
- .then(exists => (exists ? path : ''))
- .catch(err => {
+ .then((exists) => (exists ? path : ''))
+ .catch((err) => {
console.warn(`Promise ${path} error:`, err);
return '';
- })
+ }),
);
- return Promise.allSettled(progressPromises).then(results => {
- return getFulfilledResults(results).filter(r => r);
+ return Promise.allSettled(progressPromises).then((results) => {
+ return getFulfilledResults(results).filter((r) => r);
});
}
@@ -662,7 +663,7 @@ export async function loadSubFolders(path: string, loadHidden = false) {
let i = 0;
let isHidden = false;
if (folderContent !== undefined) {
- folderContent.map(entry => {
+ folderContent.map((entry) => {
if (!entry.isFile) {
isHidden = entry.name.startsWith('.');
if (isHidden) {
@@ -675,7 +676,7 @@ export async function loadSubFolders(path: string, loadHidden = false) {
lmdt: entry.lmdt,
meta: entry.meta,
path: entry.path,
- tags: entry.tags
+ tags: entry.tags,
});
} else {
// do nothing
@@ -689,7 +690,7 @@ export async function loadSubFolders(path: string, loadHidden = false) {
lmdt: entry.lmdt,
meta: entry.meta,
path: entry.path,
- tags: entry.tags
+ tags: entry.tags,
});
}
}
@@ -703,7 +704,7 @@ export function generateFileName(
fileName: string,
tags: string[],
tagDelimiter: string,
- prefixTagContainer = AppConfig.prefixTagContainer
+ prefixTagContainer = AppConfig.prefixTagContainer,
) {
let tagsString = '';
// Creating the string will all the tags by more that 0 tags
@@ -740,7 +741,7 @@ export function generateFileName(
newFileName =
cleanFileName(
fileName.substring(0, lastDotPosition),
- prefixTagContainer
+ prefixTagContainer,
) +
(tagsString ? prefixTagContainer + tagsString : '') +
'.' +
@@ -751,7 +752,7 @@ export function generateFileName(
newFileName =
cleanFileName(
fileName.substring(0, beginTagContainer),
- prefixTagContainer
+ prefixTagContainer,
) +
(tagsString ? prefixTagContainer + tagsString : '') +
fileName.substring(endTagContainer + 1, fileName.length).trim();
@@ -775,20 +776,17 @@ function cleanFileName(fileName, prefixTagContainer) {
export function parseNewTags(tagsInput: string, tagGroup: TS.TagGroup) {
if (tagGroup) {
- let tags = tagsInput
- .split(' ')
- .join(',')
- .split(','); // handle spaces around commas
+ let tags = tagsInput.split(' ').join(',').split(','); // handle spaces around commas
tags = [...new Set(tags)]; // remove duplicates
- tags = tags.filter(tag => tag && tag.length > 0); // zero length tags
+ tags = tags.filter((tag) => tag && tag.length > 0); // zero length tags
const taggroupTags = tagGroup.children;
- taggroupTags.forEach(tag => {
+ taggroupTags.forEach((tag) => {
// filter out duplicated tags
- tags = tags.filter(t => t !== tag.title);
+ tags = tags.filter((t) => t !== tag.title);
});
return taggroupTags.concat(
- tags.map(tagTitle => {
+ tags.map((tagTitle) => {
const tag: TS.Tag = {
type: taggroupTags.length > 0 ? taggroupTags[0].type : 'sidecar',
title: tagTitle.trim(),
@@ -798,31 +796,31 @@ export function parseNewTags(tagsInput: string, tagGroup: TS.TagGroup) {
color: tagGroup.color,
textcolor: tagGroup.textcolor,
style: taggroupTags.length > 0 ? taggroupTags[0].style : '',
- modified_date: new Date().getTime()
+ modified_date: new Date().getTime(),
};
return tag;
- })
+ }),
);
}
}
export async function loadLocationDataPromise(
path: string,
- metaFile = AppConfig.folderLocationsFile
+ metaFile = AppConfig.folderLocationsFile,
): Promise<TS.FileSystemEntryMeta> {
const entryProperties = await PlatformIO.getPropertiesPromise(path);
if (!entryProperties.isFile) {
const metaFilePath = getMetaFileLocationForDir(
path,
PlatformIO.getDirSeparator(),
- metaFile
+ metaFile,
);
let metaData;
try {
metaData = await loadJSONFile(metaFilePath);
metaData = {
...metaData,
- description: getDescriptionPreview(metaData.description, 200)
+ description: getDescriptionPreview(metaData.description, 200),
};
} catch (e) {
console.debug('cannot load json:' + metaFilePath, e);
@@ -839,9 +837,9 @@ export async function loadLocationDataPromise(
*/
export function loadMetaDataPromise(
path: string,
- fullDescription = false
+ fullDescription = false,
): Promise<TS.FileSystemEntryMeta> {
- return PlatformIO.getPropertiesPromise(path).then(entryProperties => {
+ return PlatformIO.getPropertiesPromise(path).then((entryProperties) => {
if (entryProperties) {
if (entryProperties.isFile) {
return loadFileMetaDataPromise(path, fullDescription);
@@ -854,13 +852,13 @@ export function loadMetaDataPromise(
export function loadFileMetaDataPromise(
path: string,
- fullDescription = false
+ fullDescription = false,
): Promise<TS.FileSystemEntryMeta> {
const metaFilePath = getMetaFileLocationForFile(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
- return loadJSONFile(metaFilePath).then(metaData => {
+ return loadJSONFile(metaFilePath).then((metaData) => {
if (!metaData) {
throw new Error('loadFileMetaDataPromise ' + metaFilePath + ' not exist');
}
@@ -874,20 +872,20 @@ export function loadFileMetaDataPromise(
tags: metaData.tags || [],
appName: metaData.appName || '',
appVersion: metaData.appVersion || '',
- lastUpdated: metaData.lastUpdated || ''
+ lastUpdated: metaData.lastUpdated || '',
};
});
}
export function loadDirMetaDataPromise(
path: string,
- fullDescription = false
+ fullDescription = false,
): Promise<TS.FileSystemEntryMeta> {
const metaDirPath = getMetaFileLocationForDir(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
- return loadJSONFile(metaDirPath).then(metaData => {
+ return loadJSONFile(metaDirPath).then((metaData) => {
if (!metaData) {
throw new Error('loadDirMetaDataPromise ' + metaDirPath + ' not exist');
}
@@ -903,13 +901,13 @@ export function loadDirMetaDataPromise(
tags: metaData.tags || [],
appName: metaData.appName || '',
appVersion: metaData.appVersion || '',
- lastUpdated: metaData.lastUpdated || ''
+ lastUpdated: metaData.lastUpdated || '',
};
});
}
export function cleanMetaData(
- metaData: TS.FileSystemEntryMeta
+ metaData: TS.FileSystemEntryMeta,
): TS.FileSystemEntryMeta {
const cleanedMeta: any = {};
if (metaData.id) {
@@ -993,7 +991,7 @@ export function cleanMetaData(
}
if (metaData.tags && metaData.tags.length > 0) {
cleanedMeta.tags = [];
- metaData.tags.forEach(tag => {
+ metaData.tags.forEach((tag) => {
const cleanedTag = prepareTagForExport(tag);
if (cleanedTag.title) {
cleanedMeta.tags.push(cleanedTag);
@@ -1005,7 +1003,7 @@ export function cleanMetaData(
export async function saveLocationDataPromise(
path: string,
- metaData: any
+ metaData: any,
): Promise<any> {
const entryProperties = await PlatformIO.getPropertiesPromise(path);
if (entryProperties) {
@@ -1015,11 +1013,10 @@ export async function saveLocationDataPromise(
// todo not need to check if folder exist first createDirectoryPromise() recursively will skip creation of existing folders https://nodejs.org/api/fs.html#fs_fs_mkdir_path_options_callback
const metaDirectoryPath = getMetaDirectoryPath(
path,
- PlatformIO.getDirSeparator()
- );
- const metaDirectoryProperties = await PlatformIO.getPropertiesPromise(
- metaDirectoryPath
+ PlatformIO.getDirSeparator(),
);
+ const metaDirectoryProperties =
+ await PlatformIO.getPropertiesPromise(metaDirectoryPath);
if (!metaDirectoryProperties) {
await PlatformIO.createDirectoryPromise(metaDirectoryPath);
}
@@ -1027,19 +1024,19 @@ export async function saveLocationDataPromise(
metaFilePath = getMetaFileLocationForDir(
path,
PlatformIO.getDirSeparator(),
- AppConfig.folderLocationsFile
+ AppConfig.folderLocationsFile,
);
}
const content = JSON.stringify({
...metaData,
appName: versionMeta.name,
appVersion: versionMeta.version,
- lastUpdated: new Date().toJSON()
+ lastUpdated: new Date().toJSON(),
});
return PlatformIO.saveTextFilePromise(
{ path: metaFilePath },
content,
- true
+ true,
);
}
return Promise.reject(new Error('file not found' + path));
@@ -1047,7 +1044,7 @@ export async function saveLocationDataPromise(
export async function saveMetaDataPromise(
path: string,
- metaData: any
+ metaData: any,
): Promise<any> {
const entryProperties = await PlatformIO.getPropertiesPromise(path);
const cleanedMetaData = cleanMetaData(metaData);
@@ -1056,12 +1053,12 @@ export async function saveMetaDataPromise(
if (entryProperties.isFile) {
metaFilePath = getMetaFileLocationForFile(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
// check and create meta folder if not exist
const metaFolder = getMetaDirectoryPath(
extractContainingDirectoryPath(path, PlatformIO.getDirSeparator()),
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
const metaExist = await PlatformIO.getPropertiesPromise(metaFolder);
if (!metaExist) {
@@ -1072,11 +1069,10 @@ export async function saveMetaDataPromise(
// todo not need to check if folder exist first createDirectoryPromise() recursively will skip creation of existing folders https://nodejs.org/api/fs.html#fs_fs_mkdir_path_options_callback
const metaDirectoryPath = getMetaDirectoryPath(
path,
- PlatformIO.getDirSeparator()
- );
- const metaDirectoryProperties = await PlatformIO.getPropertiesPromise(
- metaDirectoryPath
+ PlatformIO.getDirSeparator(),
);
+ const metaDirectoryProperties =
+ await PlatformIO.getPropertiesPromise(metaDirectoryPath);
if (!metaDirectoryProperties) {
await PlatformIO.createDirectoryPromise(metaDirectoryPath);
}
@@ -1088,14 +1084,14 @@ export async function saveMetaDataPromise(
metaFilePath = getMetaFileLocationForDir(
path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
}
const content = JSON.stringify(mergeFsEntryMeta(cleanedMetaData));
return PlatformIO.saveTextFilePromise(
{ path: metaFilePath },
content,
- true
+ true,
);
}
return Promise.reject(new Error('file not found' + path));
@@ -1108,33 +1104,33 @@ export async function saveMetaDataPromise(
*/
export function setFolderBackgroundPromise(
filePath: string,
- directoryPath: string
+ directoryPath: string,
): Promise<string> {
const folderBgndPath = getBgndFileLocationForDirectory(
directoryPath,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
);
return generateImageThumbnail(filePath, AppConfig.maxBgndSize) // 4K -> 3840, 2K -> 2560
- .then(base64Image => {
+ .then((base64Image) => {
if (base64Image) {
const data = base64ToArrayBuffer(base64Image.split(',').pop());
return PlatformIO.saveBinaryFilePromise(
{ path: folderBgndPath },
data,
- true
+ true,
)
.then(() => {
// props.setLastBackgroundImageChange(new Date().getTime());
return directoryPath;
})
- .catch(error => {
+ .catch((error) => {
console.log('Save to file failed ', error);
return Promise.reject(error);
});
}
})
- .catch(error => {
+ .catch((error) => {
console.log('Background generation failed ', error);
return Promise.reject(error);
});
@@ -1151,14 +1147,14 @@ export function findBackgroundColorForFolder(fsEntry: TS.FileSystemEntry) {
export function findColorForEntry(
fsEntry: TS.FileSystemEntry,
- supportedFileTypes: Array<any>
+ supportedFileTypes: Array<any>,
): string {
if (!fsEntry.isFile) {
return 'gray'; // AppConfig.defaultFolderColor;
}
if (fsEntry.extension !== undefined) {
const fileType = supportedFileTypes.find(
- type => type.type.toLowerCase() === fsEntry.extension.toLowerCase()
+ (type) => type.type.toLowerCase() === fsEntry.extension.toLowerCase(),
);
if (fileType && fileType.color) {
@@ -1170,7 +1166,7 @@ export function findColorForEntry(
export function loadFileContentPromise(
fullPath: string,
- type: string
+ type: string,
): Promise<any> {
return new Promise((resolve, reject) => {
const xhr: any = new XMLHttpRequest();
@@ -1199,7 +1195,7 @@ export function getDescriptionPreview(mdContent, maxLength = 200) {
.replace(
/\[(.*?)\]\(.*?\)/g, // remove link href, also dataurls
// /\(data:([\w\/\+]+);(charset=[\w-]+|base64).*,([a-zA-Z0-9+/]+={0,2})\)/g,
- ''
+ '',
)
.replace(/<[^>]*>/g, '') // remove html
.replace(/\*|~|#|_/g, '');
@@ -1255,7 +1251,7 @@ export function convertMarkDown(mdContent: string, directoryPath: string) {
breaks: false,
smartLists: true,
smartypants: false,
- xhtml: true
+ xhtml: true,
});
return marked.parse(DOMPurify.sanitize(mdContent));
@@ -1307,7 +1303,7 @@ export function normalizeUrl(url: string) {
*/
export function mergeByProp(a, b, prop) {
const reduced = a.filter(
- aitem => !b.find(bitem => aitem[prop] === bitem[prop])
+ (aitem) => !b.find((bitem) => aitem[prop] === bitem[prop]),
);
return reduced.concat(b);
}
@@ -1322,10 +1318,10 @@ export function updateByProp(a, b, prop) {
const commonResults = [];
const uniqueResults = [];
for (const el of a) {
- const commonB = b.find(bitem => bitem[prop] === el[prop]);
+ const commonB = b.find((bitem) => bitem[prop] === el[prop]);
if (commonB) {
const common = {};
- Object.keys(el).forEach(function(key) {
+ Object.keys(el).forEach(function (key) {
common[key] = el[key] || commonB[key];
});
commonResults.push(common);
@@ -1334,7 +1330,7 @@ export function updateByProp(a, b, prop) {
}
}
const uniqueB = b.filter(
- bitem => !a.find(aitem => bitem[prop] === aitem[prop])
+ (bitem) => !a.find((aitem) => bitem[prop] === aitem[prop]),
);
return [...commonResults, ...uniqueResults, ...uniqueB];
}
@@ -1349,8 +1345,8 @@ export const merge = (a, b) => {
return Object.fromEntries(
Object.entries(allKeys).map(([k, v]) => [
k,
- v && Array.isArray(v) ? mergeTags(v, b[k]) : v || b[k]
- ])
+ v && Array.isArray(v) ? mergeTags(v, b[k]) : v || b[k],
+ ]),
);
};
@@ -1359,19 +1355,19 @@ function mergeTags(oldTagsArray: Array<TS.Tag>, newTagsArray: Array<TS.Tag>) {
return oldTagsArray;
}
const uniqueTags = newTagsArray.filter(
- newTag => !oldTagsArray.some(oldTag => oldTag.title === newTag.title)
+ (newTag) => !oldTagsArray.some((oldTag) => oldTag.title === newTag.title),
);
return [...oldTagsArray, ...uniqueTags];
}
export function getFolderThumbPath(
path: string,
- lastThumbnailImageChange: any
+ lastThumbnailImageChange: any,
) {
if (path) {
return getThumbPath(
getThumbFileLocationForDirectory(path, PlatformIO.getDirSeparator()),
- lastThumbnailImageChange
+ lastThumbnailImageChange,
);
}
return undefined;
@@ -1379,7 +1375,7 @@ export function getFolderThumbPath(
export function getThumbPath(
thumbPath: string,
- lastThumbnailImageChange?: any
+ lastThumbnailImageChange?: any,
) {
if (!thumbPath) {
return undefined;
@@ -1409,12 +1405,12 @@ function isSignedURL(signedUrl) {
export function getFolderBgndPath(
path: string,
- lastBackgroundImageChange: any
+ lastBackgroundImageChange: any,
) {
if (path !== undefined) {
return getBgndPath(
getBgndFileLocationForDirectory(path, PlatformIO.getDirSeparator()),
- lastBackgroundImageChange
+ lastBackgroundImageChange,
);
}
return undefined;
@@ -1459,7 +1455,7 @@ export function getCleanLocationPath(location: TS.Location): string {
export function getRelativeEntryPath(
location: TS.Location,
- entryPath: string
+ entryPath: string,
): string {
const entryPathCleaned = cleanTrailingDirSeparator(entryPath);
// const isCloudLocation = location.type === locationType.TYPE_CLOUD;
@@ -1479,17 +1475,17 @@ export function getRelativeEntryPath(
*/
export function updateFsEntries(
entries: Array<TS.FileSystemEntry>,
- entriesChanges: Array<any>
+ entriesChanges: Array<any>,
): Array<TS.FileSystemEntry> {
- return entries.map(entry => {
- const entryUpdated = entriesChanges.find(e => e.path === entry.path);
+ return entries.map((entry) => {
+ const entryUpdated = entriesChanges.find((e) => e.path === entry.path);
if (!entryUpdated) {
return entry;
}
return {
...entry,
- ...entryUpdated
+ ...entryUpdated,
};
});
}
@@ -1502,7 +1498,7 @@ export function mergeFsEntryMeta(props: any = {}): TS.FileSystemEntryMeta {
lastUpdated: new Date().getTime(),
tags: [],
...props,
- id: props.id || getUuid()
+ id: props.id || getUuid(),
};
}
@@ -1518,7 +1514,7 @@ export function toFsEntry(path: string, isFile: boolean): TS.FileSystemEntry {
tags: [],
size: 0,
lmdt: new Date().getTime(),
- path
+ path,
};
}
@@ -1531,43 +1527,43 @@ export function openedToFsEntry(openedEntry: OpenedEntry): TS.FileSystemEntry {
isFile: openedEntry.isFile,
extension: extractFileExtension(
openedEntry.path,
- PlatformIO.getDirSeparator()
+ PlatformIO.getDirSeparator(),
),
description: openedEntry.description,
tags: openedEntry.tags,
size: openedEntry.size,
lmdt: openedEntry.lmdt,
- path: openedEntry.path
+ path: openedEntry.path,
};
}
export function createFsEntryMeta(
path: string,
- props: any = {}
+ props: any = {},
): Promise<string> {
const newFsEntryMeta: TS.FileSystemEntryMeta = mergeFsEntryMeta(props);
return saveMetaDataPromise(path, newFsEntryMeta)
.then(() => newFsEntryMeta.id)
- .catch(error => {
+ .catch((error) => {
console.log(
'Error saveMetaDataPromise for ' +
path +
' orphan id: ' +
newFsEntryMeta.id,
- error
+ error,
);
return newFsEntryMeta.id;
});
}
export function getDefaultViewer(fileType) {
- const type = supportedFileTypes.find(fType => fType.type === fileType);
+ const type = supportedFileTypes.find((fType) => fType.type === fileType);
if (type) {
return type.viewer;
}
return undefined;
}
export function getDefaultEditor(fileType) {
- const type = supportedFileTypes.find(fType => fType.type === fileType);
+ const type = supportedFileTypes.find((fType) => fType.type === fileType);
if (type) {
return type.editor;
}
diff --git a/app/store/configureStore.dev.ts b/app/store/configureStore.dev.ts
index a81dc5bf7..bf9c03ecf 100644
--- a/app/store/configureStore.dev.ts
+++ b/app/store/configureStore.dev.ts
@@ -25,7 +25,7 @@ import rootReducer from '../reducers';
import onlineListener from '../services/onlineListener';
import PlatformIO from '-/services/platform-facade';
-const configureStore = initialState => {
+const configureStore = (initialState) => {
// Redux Configuration
const middleware = [];
const enhancers = [];
@@ -36,7 +36,7 @@ const configureStore = initialState => {
// Logging Middleware
const logger = createLogger({
level: 'info',
- collapsed: true
+ collapsed: true,
});
middleware.push(logger);
@@ -49,7 +49,7 @@ const configureStore = initialState => {
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
// Options: http://zalmoxisus.github.io/redux-devtools-extension/API/Arguments.html
- actionCreators
+ actionCreators,
})
: compose;
/* eslint-enable no-underscore-dangle */
@@ -78,7 +78,7 @@ const configureStore = initialState => {
if (module.hot) {
module.hot.accept(
'../reducers',
- () => store.replaceReducer(require('../reducers')) // eslint-disable-line global-require
+ () => store.replaceReducer(require('../reducers')), // eslint-disable-line global-require
);
}
diff --git a/app/store/configureStore.prod.ts b/app/store/configureStore.prod.ts
index af4194451..59802bad6 100644
--- a/app/store/configureStore.prod.ts
+++ b/app/store/configureStore.prod.ts
@@ -24,7 +24,7 @@ import onlineListener from '../services/onlineListener';
import PlatformIO from '-/services/platform-facade';
const enhancer = compose(
- applyMiddleware(thunk) // , router)
+ applyMiddleware(thunk), // , router)
// autoRehydrate()
);
diff --git a/app/utils/HandleAuth.tsx b/app/utils/HandleAuth.tsx
index da9acfa68..1da19cda1 100644
--- a/app/utils/HandleAuth.tsx
+++ b/app/utils/HandleAuth.tsx
@@ -2,7 +2,7 @@ import React, { useRef } from 'react';
import {
AuthState,
CognitoUserInterface,
- onAuthUIStateChange
+ onAuthUIStateChange,
} from '@aws-amplify/ui-components';
import { API, Auth } from 'aws-amplify';
import { bindActionCreators } from 'redux';
@@ -34,7 +34,7 @@ function HandleAuth(props: Props) {
} catch (e) {
if (e && e.code && e.code === 'MODULE_NOT_FOUND') {
console.debug(
- 'graphql/queries is missing. You must run "amplify codegen" first'
+ 'graphql/queries is missing. You must run "amplify codegen" first',
);
}
}
@@ -44,14 +44,14 @@ function HandleAuth(props: Props) {
// @ts-ignore
if (username.current !== authData.username && queries) {
fetchTenant()
- .then(async tenant => {
+ .then(async (tenant) => {
if (tenant) {
await saveLocations(tenant, queries.getExtconfig);
await addTagGroups(tenant, queries.tagGroupsByTenant);
}
return true;
})
- .catch(e => {
+ .catch((e) => {
console.log(e);
});
props.initApp();
@@ -71,7 +71,7 @@ function HandleAuth(props: Props) {
// @ts-ignore
const { data } = await API.graphql({
query,
- variables: { id: tenant }
+ variables: { id: tenant },
});
if (data) {
// console.log(data.getExtconfig.Locations.items);
@@ -90,13 +90,13 @@ function HandleAuth(props: Props) {
// @ts-ignore
const { data } = await API.graphql({
query,
- variables: { tenant }
+ variables: { tenant },
});
if (data && data.TagGroupsByTenant.items.length > 0) {
const tagGroupsByTenant = data.TagGroupsByTenant.items[0];
importTagGroups(
JSON.parse(tagGroupsByTenant.tagGroups),
- tagGroupsByTenant.replace
+ tagGroupsByTenant.replace,
);
}
};
@@ -104,7 +104,7 @@ function HandleAuth(props: Props) {
const fetchTenant = () =>
// get the access token of the signed in user
Auth.currentSession()
- .then(session => {
+ .then((session) => {
const accessToken = session.getAccessToken();
const cognitogroups = accessToken.payload['cognito:groups'];
if (cognitogroups) {
@@ -112,7 +112,7 @@ function HandleAuth(props: Props) {
}
return undefined;
})
- .catch(e => {
+ .catch((e) => {
console.log(e);
});
@@ -123,10 +123,10 @@ function mapDispatchToProps(dispatch) {
return bindActionCreators(
{
loggedIn: AppActions.loggedIn,
- initApp: AppActions.initApp
+ initApp: AppActions.initApp,
// importTagGroups: TagGroupActions.importTagGroups
},
- dispatch
+ dispatch,
);
}
diff --git a/app/utils/dates.ts b/app/utils/dates.ts
index bacd5c52f..db7108fef 100644
--- a/app/utils/dates.ts
+++ b/app/utils/dates.ts
@@ -38,84 +38,84 @@ export function isDateTimeTag(tagDate: string): boolean {
/** Returns true if string is this format: 2015 */
export function isYear(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
/** Returns true if string is this format: 2015-2017 */
export function isYearPeriod(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789]-[0123][0123456789][0123456789][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
/** Returns true if string is this format: 201512 */
export function isYearMonth(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789][01][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
/** Returns true if string is this format: 201512-201604 */
export function isYearMonthPeriod(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789][01][0123456789]-[0123][0123456789][0123456789][0123456789][01][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
/** Returns true if string is this format: 20151223 */
export function isYearMonthDay(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
/** Returns true if string is this format: 20151223-20160223 */
export function isYearMonthDayPeriod(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789]-[0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
/** Returns true if string is this format: 20151223~01 */
export function isYearMonthDayHour(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789][~T][0123456][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
/** Returns true if string is this format: 20190712~17-20190712~17 */
export function isYearMonthDayHourPeriod(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789][~T][0123456][0123456789]-[0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789][~T][0123456][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
/** Returns true if string is this format: 20151223~0112 or 20151223T0112 */
export function isYearMonthDayHourMin(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789][~T][0123456][0123456789][0123456][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
/** Returns true if string is this format: 20190712~1740-20190712~1740 */
export function isYearMonthDayHourMinPeriod(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789][~T][0123456][0123456789][0123456][0123456789]-[0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789][~T][0123456][0123456789][0123456][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
/** Returns true if string is this format: 20151223~011358 */
export function isYearMonthDayHourMinSec(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789][~T][0123456][0123456789][0123456][0123456789][0123456][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
/** Returns true if string is this format: 20190712~174031-20190712~174031 */
export function isYearMonthDayHourMinSecPeriod(tagDate: string): boolean {
return /(^|\s)([0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789][~T][0123456][0123456789][0123456][0123456789][0123456][0123456789]-[0123][0123456789][0123456789][0123456789][01][0123456789][0123][0123456789][~T][0123456][0123456789][0123456][0123456789][0123456][0123456789])(\s|$)/.test(
- tagDate
+ tagDate,
);
}
@@ -127,16 +127,17 @@ export function getDaysInMonth(year: number, month: number): number {
export const msInDay = 1000 * 60 * 60 * 24;
/** Extract the time period from string e.g. 201901 -> fromDate: 2019-01-01 00:00:00, toDate; 2019-01-31 23:59:59 */
-export function extractTimePeriod(
- value: string
-): { fromDateTime: Date | null; toDateTime: Date | null } {
+export function extractTimePeriod(value: string): {
+ fromDateTime: Date | null;
+ toDateTime: Date | null;
+} {
let fromDateTime = null;
let toDateTime = null;
if (value.length && !/(^|\s)([0123456789])(\s|$)/.test(value.substr(0, 1))) {
return {
// Return if the first char is not a number, ignoring values starting with letters
fromDateTime,
- toDateTime
+ toDateTime,
};
}
try {
@@ -158,7 +159,7 @@ export function extractTimePeriod(
month +
'-' +
getDaysInMonth(parseInt(year, 10), parseInt(month, 10)) +
- ' 23:59:59.999'
+ ' 23:59:59.999',
);
} else if (isYearMonthPeriod(value)) {
const fromYear = value.substring(0, 4);
@@ -172,7 +173,7 @@ export function extractTimePeriod(
toMonth +
'-' +
getDaysInMonth(parseInt(toYear, 10), parseInt(toMonth, 10)) +
- ' 23:59:59.999'
+ ' 23:59:59.999',
);
} else if (isYearMonthDayPeriod(value)) {
const fromYear = value.substring(0, 4);
@@ -183,7 +184,7 @@ export function extractTimePeriod(
const toDay = value.substring(15, 17);
fromDateTime = new Date(fromYear + '-' + fromMonth + '-' + fromDay);
toDateTime = new Date(
- toYear + '-' + toMonth + '-' + toDay + ' 23:59:59.999'
+ toYear + '-' + toMonth + '-' + toDay + ' 23:59:59.999',
);
} else if (isYearMonthDay(value)) {
const year = value.substring(0, 4);
@@ -197,10 +198,10 @@ export function extractTimePeriod(
const day = value.substring(6, 8);
const hour = value.substring(9, 11);
fromDateTime = new Date(
- year + '-' + month + '-' + day + ' ' + hour + ':00:00'
+ year + '-' + month + '-' + day + ' ' + hour + ':00:00',
);
toDateTime = new Date(
- year + '-' + month + '-' + day + ' ' + hour + ':59:59.999'
+ year + '-' + month + '-' + day + ' ' + hour + ':59:59.999',
);
} else if (isYearMonthDayHourPeriod(value)) {
const fromYear = value.substring(0, 4);
@@ -212,10 +213,10 @@ export function extractTimePeriod(
const toDay = value.substring(18, 20);
const toHour = value.substring(21, 23);
fromDateTime = new Date(
- fromYear + '-' + fromMonth + '-' + fromDay + ' ' + fromHour + ':00:00'
+ fromYear + '-' + fromMonth + '-' + fromDay + ' ' + fromHour + ':00:00',
);
toDateTime = new Date(
- toYear + '-' + toMonth + '-' + toDay + ' ' + toHour + ':59:59.999'
+ toYear + '-' + toMonth + '-' + toDay + ' ' + toHour + ':59:59.999',
);
} else if (isYearMonthDayHourMin(value)) {
const year = value.substring(0, 4);
@@ -224,10 +225,10 @@ export function extractTimePeriod(
const hour = value.substring(9, 11);
const min = value.substring(11, 13);
fromDateTime = new Date(
- year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':00'
+ year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':00',
);
toDateTime = new Date(
- year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':59.999'
+ year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':59.999',
);
} else if (isYearMonthDayHourMinPeriod(value)) {
const fromYear = value.substring(0, 4);
@@ -250,7 +251,7 @@ export function extractTimePeriod(
fromHour +
':' +
fromMin +
- ':00'
+ ':00',
);
toDateTime = new Date(
toYear +
@@ -262,7 +263,7 @@ export function extractTimePeriod(
toHour +
':' +
toMin +
- ':59.999'
+ ':59.999',
);
} else if (isYearMonthDayHourMinSec(value)) {
const year = value.substring(0, 4);
@@ -272,7 +273,7 @@ export function extractTimePeriod(
const min = value.substring(11, 13);
const sec = value.substring(13, 15);
fromDateTime = new Date(
- year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':' + sec
+ year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':' + sec,
);
toDateTime = new Date(
year +
@@ -286,7 +287,7 @@ export function extractTimePeriod(
min +
':' +
sec +
- '.999'
+ '.999',
);
} else if (isYearMonthDayHourMinSecPeriod(value)) {
const fromYear = value.substring(0, 4);
@@ -312,7 +313,7 @@ export function extractTimePeriod(
':' +
fromMin +
':' +
- fromSec
+ fromSec,
);
toDateTime = new Date(
toYear +
@@ -326,7 +327,7 @@ export function extractTimePeriod(
toMin +
':' +
toSec +
- '.999'
+ '.999',
);
}
} catch (err) {
@@ -334,7 +335,7 @@ export function extractTimePeriod(
}
return {
fromDateTime,
- toDateTime
+ toDateTime,
};
}
@@ -392,7 +393,7 @@ export function parseDate(date: string) {
export function parseFullDate(date: string) {
// validate year as 4 digits, month as 01-12, and day as 01-31
const parsedDate = date.match(
- /^(\d{4})(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])$/
+ /^(\d{4})(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])$/,
);
if (parsedDate) {
// make a date
@@ -489,9 +490,12 @@ export function convertToDate(date: string) {
}
export function convertToDateTime(dateTime: string) {
- const dateTimeRegExp = /^\d\d\d\d-(00|[0-9]|1[0-9]|2[0-3]):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9])$/g;
- const dateTimeWinRegExp = /^(([0-1]?[0-9])|([2][0-3]))!([0-5]?[0-9])(!([0-5]?[0-9]))?$/g;
- const dateTimeWin1RegExp = /^(([0-1]?[0-9])|([2][0-3]))[~T]([0-5]?[0-9])(!([0-5]?[0-9]))?$/g;
+ const dateTimeRegExp =
+ /^\d\d\d\d-(00|[0-9]|1[0-9]|2[0-3]):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9])$/g;
+ const dateTimeWinRegExp =
+ /^(([0-1]?[0-9])|([2][0-3]))!([0-5]?[0-9])(!([0-5]?[0-9]))?$/g;
+ const dateTimeWin1RegExp =
+ /^(([0-1]?[0-9])|([2][0-3]))[~T]([0-5]?[0-9])(!([0-5]?[0-9]))?$/g;
if (
dateTime.match(dateTimeRegExp) ||
dateTime.match(dateTimeWinRegExp) ||
@@ -555,7 +559,8 @@ export function convertToDateTime(dateTime: string) {
}
export function convertToDateRange(dateRange: string) {
- const dateRangeRegExp = /^([0]?[1-9]|[1|2][0-9]|[3][0|1])[-]([0]?[1-9]|[1][0-2])$/g;
+ const dateRangeRegExp =
+ /^([0]?[1-9]|[1|2][0-9]|[3][0|1])[-]([0]?[1-9]|[1][0-2])$/g;
if (dateRange.match(dateRangeRegExp) || dateRange.search('-')) {
const range = dateRange.split('-');
if (parseInt(range[0], 10) && parseInt(range[1], 10)) {
diff --git a/app/utils/dom.ts b/app/utils/dom.ts
index d64a053a8..a34031a91 100644
--- a/app/utils/dom.ts
+++ b/app/utils/dom.ts
@@ -37,7 +37,7 @@ export function clearURLParam(paramName) {
export function updateHistory(
newLocation: TS.Location,
newDirectoryPath: string,
- newEntryPath?: string
+ newEntryPath?: string,
) {
const currentHref = new URL(window.location.href);
const params = new URLSearchParams(currentHref.search);
diff --git a/app/utils/extension-utils.js b/app/utils/extension-utils.js
index e2fb03e47..4ce76191c 100644
--- a/app/utils/extension-utils.js
+++ b/app/utils/extension-utils.js
@@ -16,7 +16,7 @@ function getExtensions(directoryPath, isExternal = false) {
return;
}
// Filter subdirectories
- const subDirectories = files.filter(file => file.isDirectory());
+ const subDirectories = files.filter((file) => file.isDirectory());
resolve(processDirs(directoryPath, subDirectories, isExternal));
});
@@ -26,13 +26,13 @@ function getExtensions(directoryPath, isExternal = false) {
function processDirs(directoryPath, dirs, isExternal = false) {
const supportedFileTypes = [];
- const extensions = dirs.map(dir => {
+ const extensions = dirs.map((dir) => {
const pluginJsonPath = path.join(
directoryPath,
'@tagspaces',
'extensions',
dir.name,
- 'package.json'
+ 'package.json',
);
try {
const packageJsonContent = fs.readFileSync(pluginJsonPath);
@@ -55,28 +55,28 @@ function processDirs(directoryPath, dirs, isExternal = false) {
(buildFolder ? '/' + buildFolder : '');
if (fileTypes) {
- fileTypes.forEach(fileType => {
+ fileTypes.forEach((fileType) => {
if (fileType.ext) {
const supportTypes = fileType.types ? fileType.types : types;
- const supportedTypes = supportTypes.map(type => ({
+ const supportedTypes = supportTypes.map((type) => ({
[type]: extensionId,
- ...(isExternal && { extensionExternalPath: directoryPath })
+ ...(isExternal && { extensionExternalPath: directoryPath }),
}));
const existingItemIndex = supportedFileTypes.findIndex(
- item => item.type === fileType.ext
+ (item) => item.type === fileType.ext,
);
if (existingItemIndex !== -1) {
// If an item with the same id already exists, update its properties
supportedFileTypes[existingItemIndex] = {
...supportedFileTypes[existingItemIndex],
- ...supportedTypes.reduce((a, b) => ({ ...a, ...b }))
+ ...supportedTypes.reduce((a, b) => ({ ...a, ...b })),
};
} else {
supportedFileTypes.push({
type: fileType.ext,
color: fileType.color ? fileType.color : color,
- ...supportedTypes.reduce((a, b) => ({ ...a, ...b }))
+ ...supportedTypes.reduce((a, b) => ({ ...a, ...b })),
});
}
}
@@ -89,19 +89,19 @@ function processDirs(directoryPath, dirs, isExternal = false) {
...(isExternal && { extensionExternal: true }),
extensionEnabled: enabled !== undefined ? enabled : !isExternal,
version: version,
- ...props
+ ...props,
};
}
} catch (ex) {
console.debug(
- 'generateExtensionsConfig: ' + dir.name + ' error:' + ex.message
+ 'generateExtensionsConfig: ' + dir.name + ' error:' + ex.message,
);
}
return undefined;
});
return {
- extensions: extensions.filter(ex => ex),
- supportedFileTypes: supportedFileTypes
+ extensions: extensions.filter((ex) => ex),
+ supportedFileTypes: supportedFileTypes,
};
}
diff --git a/app/utils/geo.ts b/app/utils/geo.ts
index a0fcdef80..de218f11c 100644
--- a/app/utils/geo.ts
+++ b/app/utils/geo.ts
@@ -47,7 +47,7 @@ export function isPlusCode(plusCode: string): boolean {
}
const upperCasedPlusCode = plusCode.toUpperCase(); // needed only lowercased index
return /(^|\s)([23456789C][23456789CFGHJMPQRV][23456789CFGHJMPQRVWX]{6}\+[23456789CFGHJMPQRVWX]{2,3})(\s|$)/.test(
- upperCasedPlusCode
+ upperCasedPlusCode,
);
}
@@ -57,7 +57,8 @@ export function isMgrsString(c) {
return false;
}
const coord = c.replace(/\s+/g, '');
- const MGRS = /^(\d{1,2})([C-HJ-NP-X])\s*([A-HJ-NP-Z])([A-HJ-NP-V])\s*(\d{1,5}\s*\d{1,5})$/i;
+ const MGRS =
+ /^(\d{1,2})([C-HJ-NP-X])\s*([A-HJ-NP-Z])([A-HJ-NP-V])\s*(\d{1,5}\s*\d{1,5})$/i;
return MGRS.test(coord);
}
@@ -66,12 +67,12 @@ export function isMgrsString(c) {
* @param latLongInput
*/
export function parseLatLon(
- latLongInput: string
+ latLongInput: string,
): { lat: number; lon: number } | false {
const cleanedInput = latLongInput.replace(/\s+/g, ''); // cleaning spaces
if (
!/^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/.test(
- cleanedInput
+ cleanedInput,
)
) {
return false;
@@ -82,7 +83,7 @@ export function parseLatLon(
if (!isNaN(lat) && !isNaN(lon)) {
return {
lat,
- lon
+ lon,
};
}
return false;
diff --git a/app/utils/metaoperations.ts b/app/utils/metaoperations.ts
index 4a4491e8a..f1c2933a6 100644
--- a/app/utils/metaoperations.ts
+++ b/app/utils/metaoperations.ts
@@ -1,14 +1,14 @@
import {
loadMetaDataPromise,
mergeFsEntryMeta,
- saveMetaDataPromise
+ saveMetaDataPromise,
} from '-/services/utils-io';
import { TS } from '-/tagspaces.namespace';
// eslint-disable-next-line import/prefer-default-export
export function savePerspective(
path: string,
- perspective: string
+ perspective: string,
): Promise<TS.FileSystemEntryMeta> {
return new Promise((resolve, reject) => {
loadMetaDataPromise(path)
@@ -17,7 +17,7 @@ export function savePerspective(
if (perspective && perspective !== 'unspecified') {
updatedFsEntryMeta = {
...fsEntryMeta,
- perspective
+ perspective,
};
} else {
const { perspective: remove, ...rest } = fsEntryMeta;
@@ -28,9 +28,9 @@ export function savePerspective(
resolve(updatedFsEntryMeta);
return true;
})
- .catch(err => {
+ .catch((err) => {
console.warn(
- 'Error adding perspective for ' + path + ' with ' + err
+ 'Error adding perspective for ' + path + ' with ' + err,
);
reject();
});
@@ -38,16 +38,16 @@ export function savePerspective(
})
.catch(() => {
const newFsEntryMeta: TS.FileSystemEntryMeta = mergeFsEntryMeta({
- perspective
+ perspective,
});
saveMetaDataPromise(path, newFsEntryMeta)
.then(() => {
resolve(newFsEntryMeta);
return true;
})
- .catch(error => {
+ .catch((error) => {
console.warn(
- 'Error adding perspective for ' + path + ' with ' + error
+ 'Error adding perspective for ' + path + ' with ' + error,
);
reject();
});
diff --git a/app/utils/useEventListener.ts b/app/utils/useEventListener.ts
index 17bf8ad57..1847a9b6d 100644
--- a/app/utils/useEventListener.ts
+++ b/app/utils/useEventListener.ts
@@ -44,7 +44,7 @@ function Component() {
// Hook
export default function useEventListener<
- T extends HTMLElement = HTMLDivElement
+ T extends HTMLElement = HTMLDivElement,
>(eventName: string, handler: Function, element?: RefObject<T>) {
// Create a ref that stores handler
const savedHandler = useRef<Function>();
diff --git a/app/utils/useValidation.ts b/app/utils/useValidation.ts
index bcf8d19cc..8cb6dfd86 100644
--- a/app/utils/useValidation.ts
+++ b/app/utils/useValidation.ts
@@ -15,7 +15,7 @@ export default function useValidation() {
setErrorInput([...errorInput, errorKey]);
}
} else if (errorInput.indexOf(errorKey) > -1) {
- setErrorInput(errorInput.filter(err => err !== errorKey));
+ setErrorInput(errorInput.filter((err) => err !== errorKey));
}
};
@@ -25,7 +25,7 @@ export default function useValidation() {
*/
const haveError = (errorKey?: string): boolean => {
if (errorKey) {
- return errorInput.some(err => err === errorKey);
+ return errorInput.some((err) => err === errorKey);
}
return errorInput.length > 0;
};
diff --git a/babel.config.js b/babel.config.js
index 9aa9c12a6..ce1412ae6 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -17,7 +17,7 @@ const packageJson = require('./package.json');
const electronVersion = parseInt(
/\d+/.exec(packageJson.devDependencies.electron),
- 10
+ 10,
);
const developmentEnvironments = ['development', 'test'];
@@ -30,10 +30,10 @@ const productionPlugins = [
// babel-preset-react-optimize
require('@babel/plugin-transform-react-constant-elements'),
require('@babel/plugin-transform-react-inline-elements'),
- require('babel-plugin-transform-react-remove-prop-types')
+ require('babel-plugin-transform-react-remove-prop-types'),
];
-module.exports = api => {
+module.exports = (api) => {
// see docs about api at https://babeljs.io/docs/en/config-files#apicache
const development = api.env(developmentEnvironments);
@@ -44,14 +44,14 @@ module.exports = api => {
require('@babel/preset-env'),
{
targets: {
- electron: electronVersion // require('electron/package.json').version // getElectronVersion()
+ electron: electronVersion, // require('electron/package.json').version // getElectronVersion()
},
useBuiltIns: 'usage',
- corejs: '3.0.0'
- }
+ corejs: '3.0.0',
+ },
],
require('@babel/preset-typescript'),
- [require('@babel/preset-react'), { development }]
+ [require('@babel/preset-react'), { development }],
],
plugins: [
// Stage 0
@@ -63,11 +63,11 @@ module.exports = api => {
[require('@babel/plugin-proposal-optional-chaining'), { loose: false }],
[
require('@babel/plugin-proposal-pipeline-operator'),
- { proposal: 'minimal' }
+ { proposal: 'minimal' },
],
[
require('@babel/plugin-proposal-nullish-coalescing-operator'),
- { loose: false }
+ { loose: false },
],
require('@babel/plugin-proposal-do-expressions'),
@@ -88,12 +88,12 @@ module.exports = api => {
'module-resolver',
{
alias: {
- '-': './app'
- }
- }
+ '-': './app',
+ },
+ },
],
- ...(development ? developmentPlugins : productionPlugins)
- ]
+ ...(development ? developmentPlugins : productionPlugins),
+ ],
};
};
diff --git a/configs/webpack.config.base.js b/configs/webpack.config.base.js
index bfbd49fe4..970157813 100644
--- a/configs/webpack.config.base.js
+++ b/configs/webpack.config.base.js
@@ -11,11 +11,11 @@ export default {
// externals: [...Object.keys(dependencies || {})],
externals: [
{
- fsevents: "require('fsevents')"
+ fsevents: "require('fsevents')",
},
{
- fswin: "require('fswin')"
- }
+ fswin: "require('fswin')",
+ },
],
module: {
@@ -28,26 +28,26 @@ export default {
{
loader: 'babel-loader',
options: {
- cacheDirectory: true
- }
+ cacheDirectory: true,
+ },
},
{
loader: 'ts-loader',
options: {
transpileOnly: true,
- experimentalWatchApi: true
- }
- }
- ]
- }
- ]
+ experimentalWatchApi: true,
+ },
+ },
+ ],
+ },
+ ],
},
output: {
path: path.join(__dirname, '..', 'app'),
// https://github.com/webpack/webpack/issues/1114
libraryTarget: 'commonjs2',
- pathinfo: false
+ pathinfo: false,
},
/**
@@ -55,28 +55,28 @@ export default {
*/
resolve: {
extensions: ['.mjs', '.js', '.ts', '.tsx', '.json'],
- modules: [path.join(__dirname, '..', 'app'), 'node_modules']
+ modules: [path.join(__dirname, '..', 'app'), 'node_modules'],
},
cache: {
type: 'filesystem',
buildDependencies: {
- config: [__filename]
- }
+ config: [__filename],
+ },
},
plugins: [
new webpack.EnvironmentPlugin({
- NODE_ENV: 'production'
+ NODE_ENV: 'production',
}),
new Dotenv({
path: path.join(
__dirname,
'..',
'node_modules',
- '@tagspaces/tagspaces-common/default.env'
- )
- })
+ '@tagspaces/tagspaces-common/default.env',
+ ),
+ }),
// new webpack.NamedModulesPlugin()
- ]
+ ],
};
diff --git a/configs/webpack.config.cordova.dev.babel.js b/configs/webpack.config.cordova.dev.babel.js
index 4798e441e..dd32e920c 100644
--- a/configs/webpack.config.cordova.dev.babel.js
+++ b/configs/webpack.config.cordova.dev.babel.js
@@ -30,7 +30,7 @@ export default merge(baseConfig, {
path: path.join(__dirname, '../cordova/www/dist'),
publicPath: './dist/',
filename: 'bundle.js',
- sourceMapFilename: '[file].map'
+ sourceMapFilename: '[file].map',
},
/*node: {
@@ -47,81 +47,81 @@ export default merge(baseConfig, {
{
loader: MiniCssExtractPlugin.loader,
options: {
- publicPath: './'
- }
+ publicPath: './',
+ },
},
{
loader: 'css-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Pipe other styles through css modules and append to style.css
{
test: /^((?!\.global).)*\.css$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Add SASS support - compile all .global.scss files and pipe it to style.css
{
test: /\.global\.(scss|sass)$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
sourceMap: true,
- importLoaders: 1
- }
+ importLoaders: 1,
+ },
},
{
loader: 'sass-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Add SASS support - compile all other .scss files and pipe it to style.css
{
test: /^((?!\.global).)*\.(scss|sass)$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
importLoaders: 1,
- sourceMap: true
- }
+ sourceMap: true,
+ },
},
{
loader: 'sass-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// WOFF Font
{
@@ -130,10 +130,10 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'application/font-woff'
- }
+ mimetype: 'application/font-woff',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// WOFF2 Font
{
@@ -142,10 +142,10 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'application/font-woff'
- }
+ mimetype: 'application/font-woff',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// TTF Font
{
@@ -154,16 +154,16 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'application/octet-stream'
- }
+ mimetype: 'application/octet-stream',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// EOT Font
{
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
use: 'file-loader',
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// SVG Font
{
@@ -172,30 +172,30 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'image/svg+xml'
- }
+ mimetype: 'image/svg+xml',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Text files
{
test: /\.(txt)$/,
use: 'raw-loader',
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Common Image Formats
{
test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/,
- type: 'asset/resource'
+ type: 'asset/resource',
},
{
// https://github.com/microsoft/PowerBI-visuals-tools/issues/365#issuecomment-1099716186
test: /\.m?js/,
resolve: {
- fullySpecified: false
- }
- }
- ]
+ fullySpecified: false,
+ },
+ },
+ ],
},
plugins: [
@@ -209,12 +209,12 @@ export default merge(baseConfig, {
* development checks
*/
new webpack.EnvironmentPlugin({
- NODE_ENV: 'development'
+ NODE_ENV: 'development',
}),
new NodePolyfillPlugin(),
new MiniCssExtractPlugin({
- filename: 'style.css'
+ filename: 'style.css',
}),
/* new webpack.NormalModuleReplacementPlugin(
@@ -240,7 +240,7 @@ export default merge(baseConfig, {
new BundleAnalyzerPlugin({
analyzerMode:
process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
- openAnalyzer: process.env.OPEN_ANALYZER === 'true'
- })
- ]
+ openAnalyzer: process.env.OPEN_ANALYZER === 'true',
+ }),
+ ],
});
diff --git a/configs/webpack.config.cordova.prod.babel.js b/configs/webpack.config.cordova.prod.babel.js
index 64766e619..c6e608fd0 100644
--- a/configs/webpack.config.cordova.prod.babel.js
+++ b/configs/webpack.config.cordova.prod.babel.js
@@ -29,7 +29,7 @@ export default merge(baseConfig, {
libraryTarget: 'window', // 'window', // 'commonjs2',
path: path.join(__dirname, '../cordova/www/dist'),
publicPath: './dist/',
- filename: 'bundle.js'
+ filename: 'bundle.js',
},
/*node: {
@@ -46,81 +46,81 @@ export default merge(baseConfig, {
{
loader: MiniCssExtractPlugin.loader,
options: {
- publicPath: './'
- }
+ publicPath: './',
+ },
},
{
loader: 'css-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Pipe other styles through css modules and append to style.css
{
test: /^((?!\.global).)*\.css$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Add SASS support - compile all .global.scss files and pipe it to style.css
{
test: /\.global\.(scss|sass)$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
sourceMap: true,
- importLoaders: 1
- }
+ importLoaders: 1,
+ },
},
{
loader: 'sass-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Add SASS support - compile all other .scss files and pipe it to style.css
{
test: /^((?!\.global).)*\.(scss|sass)$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
importLoaders: 1,
- sourceMap: true
- }
+ sourceMap: true,
+ },
},
{
loader: 'sass-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// WOFF Font
{
@@ -129,10 +129,10 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'application/font-woff'
- }
+ mimetype: 'application/font-woff',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// WOFF2 Font
{
@@ -141,10 +141,10 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'application/font-woff'
- }
+ mimetype: 'application/font-woff',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// TTF Font
{
@@ -153,16 +153,16 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'application/octet-stream'
- }
+ mimetype: 'application/octet-stream',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// EOT Font
{
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
use: 'file-loader',
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// SVG Font
{
@@ -171,30 +171,30 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'image/svg+xml'
- }
+ mimetype: 'image/svg+xml',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Text files
{
test: /\.(txt)$/,
use: 'raw-loader',
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Common Image Formats
{
test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/,
- type: 'asset/resource'
+ type: 'asset/resource',
},
{
// https://github.com/microsoft/PowerBI-visuals-tools/issues/365#issuecomment-1099716186
test: /\.m?js/,
resolve: {
- fullySpecified: false
- }
- }
- ]
+ fullySpecified: false,
+ },
+ },
+ ],
},
optimization: {
@@ -203,7 +203,7 @@ export default merge(baseConfig, {
: [
// For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
`...`,
- new CssMinimizerPlugin()
+ new CssMinimizerPlugin(),
/*new OptimizeCSSAssetsPlugin({
cssProcessorOptions: {
map: {
@@ -212,7 +212,7 @@ export default merge(baseConfig, {
}
}
})*/
- ]
+ ],
},
plugins: [
@@ -226,12 +226,12 @@ export default merge(baseConfig, {
* development checks
*/
new webpack.EnvironmentPlugin({
- NODE_ENV: 'production'
+ NODE_ENV: 'production',
}),
new NodePolyfillPlugin(),
new MiniCssExtractPlugin({
- filename: 'style.css'
+ filename: 'style.css',
}),
/* new webpack.NormalModuleReplacementPlugin(
@@ -257,7 +257,7 @@ export default merge(baseConfig, {
new BundleAnalyzerPlugin({
analyzerMode:
process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
- openAnalyzer: process.env.OPEN_ANALYZER === 'true'
- })
- ]
+ openAnalyzer: process.env.OPEN_ANALYZER === 'true',
+ }),
+ ],
});
diff --git a/configs/webpack.config.main.prod.babel.js b/configs/webpack.config.main.prod.babel.js
index 2a88a8664..9dde7393d 100644
--- a/configs/webpack.config.main.prod.babel.js
+++ b/configs/webpack.config.main.prod.babel.js
@@ -25,7 +25,7 @@ export default merge(baseConfig, {
output: {
path: path.join(__dirname, '..'),
- filename: './app/main.prod.js'
+ filename: './app/main.prod.js',
},
optimization: {
@@ -33,19 +33,19 @@ export default merge(baseConfig, {
? []
: [
new TerserPlugin({
- parallel: true
+ parallel: true,
// sourceMap: true,
// cache: true
}),
- '...' // '...' can be used in optimization.minimizer to access the defaults.
- ]
+ '...', // '...' can be used in optimization.minimizer to access the defaults.
+ ],
},
plugins: [
new BundleAnalyzerPlugin({
analyzerMode:
process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
- openAnalyzer: process.env.OPEN_ANALYZER === 'true'
+ openAnalyzer: process.env.OPEN_ANALYZER === 'true',
}),
/* new webpack.NormalModuleReplacementPlugin(
@@ -80,8 +80,8 @@ export default merge(baseConfig, {
new webpack.EnvironmentPlugin({
NODE_ENV: 'production',
DEBUG_PROD: false,
- START_MINIMIZED: false
- })
+ START_MINIMIZED: false,
+ }),
],
/**
@@ -91,6 +91,6 @@ export default merge(baseConfig, {
*/
node: {
__dirname: false,
- __filename: false
- }
+ __filename: false,
+ },
});
diff --git a/configs/webpack.config.renderer.dev.babel.js b/configs/webpack.config.renderer.dev.babel.js
index 7215fa9c3..24ac7e913 100644
--- a/configs/webpack.config.renderer.dev.babel.js
+++ b/configs/webpack.config.renderer.dev.babel.js
@@ -25,7 +25,7 @@ const publicPath = `http://localhost:${port}/dist`;
const dll = path.join(__dirname, '..', 'dll');
const manifest = path.resolve(dll, 'renderer.json');
const requiredByDLLConfig = module.parent.filename.includes(
- 'webpack.config.renderer.dev.dll'
+ 'webpack.config.renderer.dev.dll',
);
/**
@@ -34,8 +34,8 @@ const requiredByDLLConfig = module.parent.filename.includes(
if (!requiredByDLLConfig && !(fs.existsSync(dll) && fs.existsSync(manifest))) {
console.log(
chalk.black.bgYellow.bold(
- 'The DLL files are missing. Sit back while we build them for you with "yarn build-dll"'
- )
+ 'The DLL files are missing. Sit back while we build them for you with "yarn build-dll"',
+ ),
);
execSync('npm run build-dll');
}
@@ -52,12 +52,12 @@ export default merge(baseConfig, {
// 'react-hot-loader/patch',
`webpack-dev-server/client?http://localhost:${port}/`,
'webpack/hot/only-dev-server',
- require.resolve('../app/index.tsx')
+ require.resolve('../app/index.tsx'),
],
output: {
publicPath: `http://localhost:${port}/dist/`,
- filename: 'renderer.dev.js'
+ filename: 'renderer.dev.js',
},
module: {
@@ -66,80 +66,80 @@ export default merge(baseConfig, {
test: /\.global\.css$/,
use: [
{
- loader: 'style-loader'
+ loader: 'style-loader',
},
{
loader: 'css-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
{
test: /^((?!\.global).)*\.css$/,
use: [
{
- loader: 'style-loader'
+ loader: 'style-loader',
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
sourceMap: true,
- importLoaders: 1
- }
- }
- ]
+ importLoaders: 1,
+ },
+ },
+ ],
},
// SASS support - compile all .global.scss files and pipe it to style.css
{
test: /\.global\.(scss|sass)$/,
use: [
{
- loader: 'style-loader'
+ loader: 'style-loader',
},
{
loader: 'css-loader',
options: {
- sourceMap: true
- }
+ sourceMap: true,
+ },
},
{
- loader: 'sass-loader'
- }
- ]
+ loader: 'sass-loader',
+ },
+ ],
},
// SASS support - compile all other .scss files and pipe it to style.css
{
test: /^((?!\.global).)*\.(scss|sass)$/,
use: [
{
- loader: 'style-loader'
+ loader: 'style-loader',
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
sourceMap: true,
- importLoaders: 1
- }
+ importLoaders: 1,
+ },
},
{
- loader: 'sass-loader'
- }
- ]
+ loader: 'sass-loader',
+ },
+ ],
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/i,
type: 'asset/resource',
generator: {
- filename: 'fonts/[hash][ext][query]'
- }
+ filename: 'fonts/[hash][ext][query]',
+ },
},
/*{
test: /\.(eot|woff|ttf|svg|woff2)$/,
@@ -201,23 +201,23 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'image/svg+xml'
- }
+ mimetype: 'image/svg+xml',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Text files
{
test: /\.(txt)$/,
use: 'raw-loader',
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Common Image Formats
{
test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/,
- type: 'asset/resource'
- }
- ]
+ type: 'asset/resource',
+ },
+ ],
},
plugins: [
@@ -226,11 +226,11 @@ export default merge(baseConfig, {
: new webpack.DllReferencePlugin({
context: path.join(__dirname, '..', 'dll'),
manifest: require(manifest),
- sourceType: 'var'
+ sourceType: 'var',
}),
new webpack.HotModuleReplacementPlugin({
- multiStep: true
+ multiStep: true,
}),
/* new webpack.NormalModuleReplacementPlugin(
@@ -268,17 +268,17 @@ export default merge(baseConfig, {
* 'staging', for example, by changing the ENV variables in the npm scripts
*/
new webpack.EnvironmentPlugin({
- NODE_ENV: 'development'
+ NODE_ENV: 'development',
}),
new webpack.LoaderOptionsPlugin({
- debug: true
- })
+ debug: true,
+ }),
],
node: {
__dirname: false,
- __filename: false
+ __filename: false,
},
devServer: {
@@ -287,13 +287,13 @@ export default merge(baseConfig, {
client: {
overlay: {
warnings: false,
- errors: false
- }
+ errors: false,
+ },
},
// noInfo: true,
devMiddleware: {
// index: true,
- stats: 'errors-only'
+ stats: 'errors-only',
// mimeTypes: { "text/html": ["phtml"] },
// publicPath: "/publicPathForDevServe",
// serverSideRender: true,
@@ -318,12 +318,12 @@ export default merge(baseConfig, {
watch: {
aggregateTimeout: 300,
ignored: /node_modules/,
- poll: 100
- }
+ poll: 100,
+ },
},
historyApiFallback: {
verbose: true,
- disableDotRule: false
+ disableDotRule: false,
},
setupMiddlewares(middlewares, devServer) {
if (process.env.START_HOT) {
@@ -331,12 +331,12 @@ export default merge(baseConfig, {
spawn('npm', ['run', 'start-main-dev'], {
shell: true,
env: process.env,
- stdio: 'inherit'
+ stdio: 'inherit',
})
- .on('close', code => process.exit(code))
- .on('error', spawnError => console.error(spawnError));
+ .on('close', (code) => process.exit(code))
+ .on('error', (spawnError) => console.error(spawnError));
}
return middlewares;
- }
- }
+ },
+ },
});
diff --git a/configs/webpack.config.renderer.dev.dll.babel.js b/configs/webpack.config.renderer.dev.dll.babel.js
index ef367733e..52d384474 100644
--- a/configs/webpack.config.renderer.dev.dll.babel.js
+++ b/configs/webpack.config.renderer.dev.dll.babel.js
@@ -35,20 +35,20 @@ export default merge(baseConfig, {
module: require('./webpack.config.renderer.dev.babel').default.module,
entry: {
- renderer: Object.keys(dependencies || {})
+ renderer: Object.keys(dependencies || {}),
},
output: {
library: 'renderer',
path: dist,
filename: '[name].dev.dll.js',
- libraryTarget: 'var'
+ libraryTarget: 'var',
},
plugins: [
new webpack.DllPlugin({
path: path.join(dist, '[name].json'),
- name: '[name]'
+ name: '[name]',
}),
/**
@@ -61,7 +61,7 @@ export default merge(baseConfig, {
* development checks
*/
new webpack.EnvironmentPlugin({
- NODE_ENV: 'development'
+ NODE_ENV: 'development',
}),
/* new webpack.NormalModuleReplacementPlugin(
@@ -89,9 +89,9 @@ export default merge(baseConfig, {
options: {
context: path.join(__dirname, '..', 'app'),
output: {
- path: path.join(__dirname, '..', 'dll')
- }
- }
- })
- ]
+ path: path.join(__dirname, '..', 'dll'),
+ },
+ },
+ }),
+ ],
});
diff --git a/configs/webpack.config.renderer.prod.babel.js b/configs/webpack.config.renderer.prod.babel.js
index 00220d383..5c7777271 100644
--- a/configs/webpack.config.renderer.prod.babel.js
+++ b/configs/webpack.config.renderer.prod.babel.js
@@ -26,7 +26,7 @@ export default merge(baseConfig, {
output: {
path: path.join(__dirname, '..', 'app/dist'),
publicPath: './dist/',
- filename: 'renderer.prod.js'
+ filename: 'renderer.prod.js',
},
module: {
@@ -38,81 +38,81 @@ export default merge(baseConfig, {
{
loader: MiniCssExtractPlugin.loader,
options: {
- publicPath: './'
- }
+ publicPath: './',
+ },
},
{
loader: 'css-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Pipe other styles through css modules and append to style.css
{
test: /^((?!\.global).)*\.css$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Add SASS support - compile all .global.scss files and pipe it to style.css
{
test: /\.global\.(scss|sass)$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
sourceMap: true,
- importLoaders: 1
- }
+ importLoaders: 1,
+ },
},
{
loader: 'sass-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Add SASS support - compile all other .scss files and pipe it to style.css
{
test: /^((?!\.global).)*\.(scss|sass)$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
importLoaders: 1,
- sourceMap: true
- }
+ sourceMap: true,
+ },
},
{
loader: 'sass-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// WOFF Font
{
@@ -121,10 +121,10 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'application/font-woff'
- }
+ mimetype: 'application/font-woff',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// WOFF2 Font
{
@@ -133,10 +133,10 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'application/font-woff'
- }
+ mimetype: 'application/font-woff',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// TTF Font
{
@@ -145,16 +145,16 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'application/octet-stream'
- }
+ mimetype: 'application/octet-stream',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// EOT Font
{
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
use: 'file-loader',
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// SVG Font
{
@@ -163,23 +163,23 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'image/svg+xml'
- }
+ mimetype: 'image/svg+xml',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Text files
{
test: /\.(txt)$/,
use: 'raw-loader',
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Common Image Formats
{
test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/,
- type: 'asset/resource'
- }
- ]
+ type: 'asset/resource',
+ },
+ ],
},
optimization: {
@@ -188,7 +188,7 @@ export default merge(baseConfig, {
: [
// For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
`...`,
- new CssMinimizerPlugin()
+ new CssMinimizerPlugin(),
/*new OptimizeCSSAssetsPlugin({
cssProcessorOptions: {
map: {
@@ -197,7 +197,7 @@ export default merge(baseConfig, {
}
}
})*/
- ]
+ ],
},
plugins: [
@@ -211,7 +211,7 @@ export default merge(baseConfig, {
* development checks
*/
new webpack.EnvironmentPlugin({
- NODE_ENV: 'production'
+ NODE_ENV: 'production',
}),
/* new webpack.NormalModuleReplacementPlugin(
@@ -235,13 +235,13 @@ export default merge(baseConfig, {
), */
new MiniCssExtractPlugin({
- filename: 'style.css'
+ filename: 'style.css',
}),
new BundleAnalyzerPlugin({
analyzerMode:
process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
- openAnalyzer: process.env.OPEN_ANALYZER === 'true'
- })
- ]
+ openAnalyzer: process.env.OPEN_ANALYZER === 'true',
+ }),
+ ],
});
diff --git a/configs/webpack.config.web.dev.babel.js b/configs/webpack.config.web.dev.babel.js
index e0b398e65..94b47d391 100644
--- a/configs/webpack.config.web.dev.babel.js
+++ b/configs/webpack.config.web.dev.babel.js
@@ -30,7 +30,7 @@ export default merge(baseConfig, {
libraryTarget: 'window', // 'window', // 'commonjs2',
path: path.join(__dirname, '../web/dist'),
publicPath: '../dist/',
- filename: 'bundle.js'
+ filename: 'bundle.js',
},
/*node: {
@@ -47,89 +47,89 @@ export default merge(baseConfig, {
{
loader: MiniCssExtractPlugin.loader,
options: {
- publicPath: './'
- }
+ publicPath: './',
+ },
},
{
loader: 'css-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Pipe other styles through css modules and append to style.css
{
test: /^((?!\.global).)*\.css$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Add SASS support - compile all .global.scss files and pipe it to style.css
{
test: /\.global\.(scss|sass)$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
sourceMap: true,
- importLoaders: 1
- }
+ importLoaders: 1,
+ },
},
{
loader: 'sass-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Add SASS support - compile all other .scss files and pipe it to style.css
{
test: /^((?!\.global).)*\.(scss|sass)$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
importLoaders: 1,
- sourceMap: true
- }
+ sourceMap: true,
+ },
},
{
loader: 'sass-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// WOFF Font
{
test: /\.(woff|woff2|eot|ttf|otf)$/i,
type: 'asset/resource',
generator: {
- filename: 'fonts/[hash][ext][query]'
- }
+ filename: 'fonts/[hash][ext][query]',
+ },
},
/*{
test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
@@ -179,30 +179,30 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'image/svg+xml'
- }
+ mimetype: 'image/svg+xml',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Text files
{
test: /\.(txt)$/,
use: 'raw-loader',
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Common Image Formats
{
test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/,
- type: 'asset/resource'
+ type: 'asset/resource',
},
{
// https://github.com/microsoft/PowerBI-visuals-tools/issues/365#issuecomment-1099716186
test: /\.m?js/,
resolve: {
- fullySpecified: false
- }
- }
- ]
+ fullySpecified: false,
+ },
+ },
+ ],
},
plugins: [
@@ -216,12 +216,12 @@ export default merge(baseConfig, {
* development checks
*/
new webpack.EnvironmentPlugin({
- NODE_ENV: 'development'
+ NODE_ENV: 'development',
}),
new NodePolyfillPlugin(),
new MiniCssExtractPlugin({
- filename: 'style.css'
+ filename: 'style.css',
}),
/* new webpack.NormalModuleReplacementPlugin(
@@ -247,7 +247,7 @@ export default merge(baseConfig, {
new BundleAnalyzerPlugin({
analyzerMode:
process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
- openAnalyzer: process.env.OPEN_ANALYZER === 'true'
- })
- ]
+ openAnalyzer: process.env.OPEN_ANALYZER === 'true',
+ }),
+ ],
});
diff --git a/configs/webpack.config.web.prod.babel.js b/configs/webpack.config.web.prod.babel.js
index 5485320ed..867eec46d 100644
--- a/configs/webpack.config.web.prod.babel.js
+++ b/configs/webpack.config.web.prod.babel.js
@@ -29,7 +29,7 @@ export default merge(baseConfig, {
libraryTarget: 'window', // 'window', // 'commonjs2',
path: path.join(__dirname, '../web/dist'),
publicPath: '../dist/',
- filename: 'bundle.js'
+ filename: 'bundle.js',
},
/*node: {
@@ -46,89 +46,89 @@ export default merge(baseConfig, {
{
loader: MiniCssExtractPlugin.loader,
options: {
- publicPath: './'
- }
+ publicPath: './',
+ },
},
{
loader: 'css-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Pipe other styles through css modules and append to style.css
{
test: /^((?!\.global).)*\.css$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Add SASS support - compile all .global.scss files and pipe it to style.css
{
test: /\.global\.(scss|sass)$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
sourceMap: true,
- importLoaders: 1
- }
+ importLoaders: 1,
+ },
},
{
loader: 'sass-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// Add SASS support - compile all other .scss files and pipe it to style.css
{
test: /^((?!\.global).)*\.(scss|sass)$/,
use: [
{
- loader: MiniCssExtractPlugin.loader
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]'
+ localIdentName: '[name]__[local]__[hash:base64:5]',
},
importLoaders: 1,
- sourceMap: true
- }
+ sourceMap: true,
+ },
},
{
loader: 'sass-loader',
options: {
- sourceMap: true
- }
- }
- ]
+ sourceMap: true,
+ },
+ },
+ ],
},
// WOFF Font
{
test: /\.(woff|woff2|eot|ttf|otf)$/i,
type: 'asset/resource',
generator: {
- filename: 'fonts/[hash][ext][query]'
- }
+ filename: 'fonts/[hash][ext][query]',
+ },
},
/*{
test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
@@ -178,30 +178,30 @@ export default merge(baseConfig, {
loader: 'url-loader',
options: {
limit: 10000,
- mimetype: 'image/svg+xml'
- }
+ mimetype: 'image/svg+xml',
+ },
},
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Text files
{
test: /\.(txt)$/,
use: 'raw-loader',
- type: 'javascript/auto'
+ type: 'javascript/auto',
},
// Common Image Formats
{
test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/,
- type: 'asset/resource'
+ type: 'asset/resource',
},
{
// https://github.com/microsoft/PowerBI-visuals-tools/issues/365#issuecomment-1099716186
test: /\.m?js/,
resolve: {
- fullySpecified: false
- }
- }
- ]
+ fullySpecified: false,
+ },
+ },
+ ],
},
optimization: {
@@ -210,7 +210,7 @@ export default merge(baseConfig, {
: [
// For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
`...`,
- new CssMinimizerPlugin()
+ new CssMinimizerPlugin(),
/*new OptimizeCSSAssetsPlugin({
cssProcessorOptions: {
map: {
@@ -219,7 +219,7 @@ export default merge(baseConfig, {
}
}
})*/
- ]
+ ],
},
plugins: [
@@ -233,12 +233,12 @@ export default merge(baseConfig, {
* development checks
*/
new webpack.EnvironmentPlugin({
- NODE_ENV: 'production'
+ NODE_ENV: 'production',
}),
new NodePolyfillPlugin(),
new MiniCssExtractPlugin({
- filename: 'style.css'
+ filename: 'style.css',
}),
/* new webpack.NormalModuleReplacementPlugin(
@@ -264,7 +264,7 @@ export default merge(baseConfig, {
new BundleAnalyzerPlugin({
analyzerMode:
process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
- openAnalyzer: process.env.OPEN_ANALYZER === 'true'
- })
- ]
+ openAnalyzer: process.env.OPEN_ANALYZER === 'true',
+ }),
+ ],
});
diff --git a/internals/scripts/CheckBuiltsExist.js b/internals/scripts/CheckBuiltsExist.js
index b0b10852a..cfaa6ec10 100644
--- a/internals/scripts/CheckBuiltsExist.js
+++ b/internals/scripts/CheckBuiltsExist.js
@@ -11,22 +11,22 @@ function CheckBuildsExist() {
'..',
'app',
'dist',
- 'renderer.prod.js'
+ 'renderer.prod.js',
);
if (!fs.existsSync(mainPath)) {
throw new Error(
chalk.whiteBright.bgRed.bold(
- 'The main process is not built yet. Build it by running "yarn build-main"'
- )
+ 'The main process is not built yet. Build it by running "yarn build-main"',
+ ),
);
}
if (!fs.existsSync(rendererPath)) {
throw new Error(
chalk.whiteBright.bgRed.bold(
- 'The renderer process is not built yet. Build it by running "yarn build-renderer"'
- )
+ 'The renderer process is not built yet. Build it by running "yarn build-renderer"',
+ ),
);
}
}
diff --git a/internals/scripts/CheckNodeEnv.js b/internals/scripts/CheckNodeEnv.js
index 8acca0a22..3a2c04d0b 100644
--- a/internals/scripts/CheckNodeEnv.js
+++ b/internals/scripts/CheckNodeEnv.js
@@ -8,8 +8,8 @@ export default function CheckNodeEnv(expectedEnv) {
if (process.env.NODE_ENV !== expectedEnv) {
console.log(
chalk.whiteBright.bgRed.bold(
- `"process.env.NODE_ENV" must be "${expectedEnv}" to use this webpack config`
- )
+ `"process.env.NODE_ENV" must be "${expectedEnv}" to use this webpack config`,
+ ),
);
process.exit(2);
}
diff --git a/internals/scripts/CheckPortInUse.js b/internals/scripts/CheckPortInUse.js
index b6d102250..834fa6820 100644
--- a/internals/scripts/CheckPortInUse.js
+++ b/internals/scripts/CheckPortInUse.js
@@ -8,8 +8,8 @@ import detectPort from 'detect-port';
if (port !== String(availablePort)) {
throw new Error(
chalk.whiteBright.bgRed.bold(
- `Port "${port}" on "localhost" is already in use. Please use another port. ex: PORT=4343 yarn dev`
- )
+ `Port "${port}" on "localhost" is already in use. Please use another port. ex: PORT=4343 yarn dev`,
+ ),
);
} else {
process.exit(0);
diff --git a/package-lock.json b/package-lock.json
index 5c51d5ab3..dbc55c34b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -139,7 +139,7 @@
"electron-notarize": "^1.2.2",
"eslint": "^8.0.0",
"eslint-config-airbnb": "^19.0.4",
- "eslint-config-prettier": "^8.5.0",
+ "eslint-config-prettier": "^9.0.0",
"eslint-config-react-app": "^7.0.1",
"eslint-formatter-pretty": "^4.1.0",
"eslint-import-resolver-webpack": "^0.13.2",
@@ -167,7 +167,7 @@
"node-polyfill-webpack-plugin": "^2.0.1",
"npm": "^8.5.5",
"playwright": "1.38.1",
- "prettier": "1.19.1",
+ "prettier": "3.0.3",
"properties-reader": "^2.2.0",
"raw-loader": "^4.0.2",
"react-test-renderer": "^18.2.0",
@@ -181,9 +181,7 @@
"shx": "^0.3.2",
"sinon": "^2.3.1",
"style-loader": "^1.1.2",
- "stylelint": "^9.9.0",
- "stylelint-config-prettier": "^4.0.0",
- "stylelint-config-standard": "^18.2.0",
+ "stylelint": "^15.11.0",
"ts-loader": "^6.2.1",
"typescript": "5.2.2",
"url-loader": "^3.0.0",
@@ -8633,6 +8631,92 @@
"resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-6.0.4.tgz",
"integrity": "sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A=="
},
+ "node_modules/@csstools/css-parser-algorithms": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.3.2.tgz",
+ "integrity": "sha512-sLYGdAdEY2x7TSw9FtmdaTrh2wFtRJO5VMbBrA8tEqEod7GEggFmxTSK9XqExib3yMuYNcvcTdCZIP6ukdjAIA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "engines": {
+ "node": "^14 || ^16 || >=18"
+ },
+ "peerDependencies": {
+ "@csstools/css-tokenizer": "^2.2.1"
+ }
+ },
+ "node_modules/@csstools/css-tokenizer": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.1.tgz",
+ "integrity": "sha512-Zmsf2f/CaEPWEVgw29odOj+WEVoiJy9s9NOv5GgNY9mZ1CZ7394By6wONrONrTsnNDv6F9hR02nvFihrGVGHBg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "engines": {
+ "node": "^14 || ^16 || >=18"
+ }
+ },
+ "node_modules/@csstools/media-query-list-parser": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.5.tgz",
+ "integrity": "sha512-IxVBdYzR8pYe89JiyXQuYk4aVVoCPhMJkz6ElRwlVysjwURTsTk/bmY/z4FfeRE+CRBMlykPwXEVUg8lThv7AQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "engines": {
+ "node": "^14 || ^16 || >=18"
+ },
+ "peerDependencies": {
+ "@csstools/css-parser-algorithms": "^2.3.2",
+ "@csstools/css-tokenizer": "^2.2.1"
+ }
+ },
+ "node_modules/@csstools/selector-specificity": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.0.tgz",
+ "integrity": "sha512-hBI9tfBtuPIi885ZsZ32IMEU/5nlZH/KOVYJCOh7gyMxaVLGmLedYqFN6Ui1LXkI8JlC8IsuC0rF0btcRZKd5g==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "engines": {
+ "node": "^14 || ^16 || >=18"
+ },
+ "peerDependencies": {
+ "postcss-selector-parser": "^6.0.13"
+ }
+ },
"node_modules/@date-io/core": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/@date-io/core/-/core-2.17.0.tgz",
@@ -9959,25 +10043,6 @@
"@milkdown/transformer": "^7.2.0"
}
},
- "node_modules/@mrmlnc/readdir-enhanced": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",
- "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==",
- "dev": true,
- "dependencies": {
- "call-me-maybe": "^1.0.1",
- "glob-to-regexp": "^0.3.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/@mrmlnc/readdir-enhanced/node_modules/glob-to-regexp": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz",
- "integrity": "sha512-Iozmtbqv0noj0uDDqoL0zNq0VBEfK2YFoMAZoxJe4cwphvLR+JskfF30QhXHOR4m3KrE6NLRYw+U9MRXvifyig==",
- "dev": true
- },
"node_modules/@mui/base": {
"version": "5.0.0-beta.21",
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.21.tgz",
@@ -12491,16 +12556,6 @@
"integrity": "sha512-uK2z1ZHJyC0nQRbuovXFt4mzXDwf27vQeUWNhfKGwRcWW429GOhP8HxUHlM6TLH4bzmlv/HlEjpvJh3JfmGsAA==",
"dev": true
},
- "node_modules/@types/glob": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
- "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==",
- "dev": true,
- "dependencies": {
- "@types/minimatch": "*",
- "@types/node": "*"
- }
- },
"node_modules/@types/history": {
"version": "4.7.11",
"resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz",
@@ -12620,10 +12675,10 @@
"integrity": "sha512-1Gjee59G25MrQGk8bsNvC6fxNiRgUlGn2wlhGf95a59DrprnnHk80FIMMFG9XHMdrfsuA119ht06QPDXA1Z7tw==",
"dev": true
},
- "node_modules/@types/minimatch": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz",
- "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==",
+ "node_modules/@types/minimist": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.4.tgz",
+ "integrity": "sha512-Kfe/D3hxHTusnPNRbycJE1N77WHDsdS4AjUYIzlDzhDrS47NrwuL3YW4VITxwR7KCVpzwgy4Rbj829KSSQmwXQ==",
"dev": true
},
"node_modules/@types/ms": {
@@ -12653,6 +12708,12 @@
"@types/node": "*"
}
},
+ "node_modules/@types/normalize-package-data": {
+ "version": "2.4.3",
+ "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.3.tgz",
+ "integrity": "sha512-ehPtgRgaULsFG8x0NeYJvmyH1hmlfsNLujHe9dQEia/7MAJYdzMSi19JtchUHjmBA6XC/75dK55mzZH+RyieSg==",
+ "dev": true
+ },
"node_modules/@types/parse-json": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.1.tgz",
@@ -12847,27 +12908,6 @@
"dev": true,
"optional": true
},
- "node_modules/@types/vfile": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/@types/vfile/-/vfile-3.0.2.tgz",
- "integrity": "sha512-b3nLFGaGkJ9rzOcuXRfHkZMdjsawuDD0ENL9fzTophtBg8FJHSGbH7daXkEpcwy3v7Xol3pAvsmlYyFhR4pqJw==",
- "dev": true,
- "dependencies": {
- "@types/node": "*",
- "@types/unist": "*",
- "@types/vfile-message": "*"
- }
- },
- "node_modules/@types/vfile-message": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@types/vfile-message/-/vfile-message-2.0.0.tgz",
- "integrity": "sha512-GpTIuDpb9u4zIO165fUy9+fXcULdD8HFRNli04GehoMVbeNq7D6OBnqSmg3lxZnC+UvgUhEWKxdKiwYUkGltIw==",
- "deprecated": "This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.",
- "dev": true,
- "dependencies": {
- "vfile-message": "*"
- }
- },
"node_modules/@types/ws": {
"version": "8.5.8",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.8.tgz",
@@ -14192,60 +14232,6 @@
"node": ">= 4.5.0"
}
},
- "node_modules/autoprefixer": {
- "version": "9.8.8",
- "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.8.tgz",
- "integrity": "sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA==",
- "dev": true,
- "dependencies": {
- "browserslist": "^4.12.0",
- "caniuse-lite": "^1.0.30001109",
- "normalize-range": "^0.1.2",
- "num2fraction": "^1.2.2",
- "picocolors": "^0.2.1",
- "postcss": "^7.0.32",
- "postcss-value-parser": "^4.1.0"
- },
- "bin": {
- "autoprefixer": "bin/autoprefixer"
- },
- "funding": {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/autoprefixer"
- }
- },
- "node_modules/autoprefixer/node_modules/picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "node_modules/autoprefixer/node_modules/postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "dependencies": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=6.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- }
- },
- "node_modules/autoprefixer/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/available-typed-arrays": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
@@ -15406,12 +15392,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/call-me-maybe": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz",
- "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==",
- "dev": true
- },
"node_modules/caller-callsite": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz",
@@ -15558,16 +15538,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/character-entities-html4": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.4.tgz",
- "integrity": "sha512-HRcDxZuZqMx3/a+qrzxdBKBPUpxWEq9xw2OPZ3a/174ihfrQKVsFhqtthBInFy1zZ9GgZyFXOatNujm8M+El3g==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/chardet": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
@@ -15881,19 +15851,6 @@
"node": ">=6"
}
},
- "node_modules/clone-regexp": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.1.tgz",
- "integrity": "sha512-Fcij9IwRW27XedRIJnSOEupS7RVcXtObJXbcUOX93UCLqqOdRpkvzKywOOSizmEK/Is3S/RHX9dLdfo6R1Q1mw==",
- "dev": true,
- "dependencies": {
- "is-regexp": "^1.0.0",
- "is-supported-regexp-flag": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/clone-response": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",
@@ -15923,16 +15880,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/collapse-white-space": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz",
- "integrity": "sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/collection-visit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@@ -17048,6 +16995,15 @@
"postcss": "^8.0.9"
}
},
+ "node_modules/css-functions-list": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.1.tgz",
+ "integrity": "sha512-Nj5YcaGgBtuUmn1D7oHqPW0c9iui7xsTsj5lIX8ZgevdfhmjFfKB3r8moHJtNJnctnYXJyYX5I1pp90HM4TPgQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=12 || >=16"
+ }
+ },
"node_modules/css-line-break": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
@@ -17429,18 +17385,6 @@
"is-git-repository": "^1.0.0"
}
},
- "node_modules/currently-unhandled": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
- "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==",
- "dev": true,
- "dependencies": {
- "array-find-index": "^1.0.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/cytoscape": {
"version": "3.26.0",
"resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.26.0.tgz",
@@ -18576,28 +18520,6 @@
"csstype": "^3.0.2"
}
},
- "node_modules/dom-serializer": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
- "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
- "dev": true,
- "dependencies": {
- "domelementtype": "^2.0.1",
- "entities": "^2.0.0"
- }
- },
- "node_modules/dom-serializer/node_modules/domelementtype": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
- "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/fb55"
- }
- ]
- },
"node_modules/domain-browser": {
"version": "4.22.0",
"resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz",
@@ -18610,12 +18532,6 @@
"url": "https://bevry.me/fund"
}
},
- "node_modules/domelementtype": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
- "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
- "dev": true
- },
"node_modules/domexception": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz",
@@ -18625,51 +18541,11 @@
"webidl-conversions": "^4.0.2"
}
},
- "node_modules/domhandler": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz",
- "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==",
- "dev": true,
- "dependencies": {
- "domelementtype": "1"
- }
- },
"node_modules/dompurify": {
"version": "2.4.7",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.7.tgz",
"integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ=="
},
- "node_modules/domutils": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
- "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
- "dev": true,
- "dependencies": {
- "dom-serializer": "0",
- "domelementtype": "1"
- }
- },
- "node_modules/dot-prop": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
- "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
- "dev": true,
- "dependencies": {
- "is-obj": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/dot-prop/node_modules/is-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/dotenv": {
"version": "16.3.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
@@ -19640,9 +19516,9 @@
}
},
"node_modules/eslint-config-prettier": {
- "version": "8.10.0",
- "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz",
- "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz",
+ "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==",
"dev": true,
"bin": {
"eslint-config-prettier": "bin/cli.js"
@@ -20674,18 +20550,6 @@
"integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==",
"dev": true
},
- "node_modules/execall": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/execall/-/execall-1.0.0.tgz",
- "integrity": "sha512-/J0Q8CvOvlAdpvhfkD/WnTQ4H1eU0exze2nFGPj/RSC7jpQ0NkKe2r28T5eMkhEEs+fzepMZNy1kVRKNlC04nQ==",
- "dev": true,
- "dependencies": {
- "clone-regexp": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/exif-js": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/exif-js/-/exif-js-2.3.0.tgz",
@@ -21797,6 +21661,18 @@
"generate-license-file": "bin/generate-license-file"
}
},
+ "node_modules/generate-license-file/node_modules/eslint-config-prettier": {
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz",
+ "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==",
+ "dev": true,
+ "bin": {
+ "eslint-config-prettier": "bin/cli.js"
+ },
+ "peerDependencies": {
+ "eslint": ">=7.0.0"
+ }
+ },
"node_modules/gensync": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
@@ -21846,15 +21722,6 @@
"integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==",
"dev": true
},
- "node_modules/get-stdin": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
- "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/get-stream": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
@@ -22066,21 +21933,6 @@
"integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==",
"dev": true
},
- "node_modules/gonzales-pe": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz",
- "integrity": "sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==",
- "dev": true,
- "dependencies": {
- "minimist": "^1.2.5"
- },
- "bin": {
- "gonzales": "bin/gonzales.js"
- },
- "engines": {
- "node": ">=0.6.0"
- }
- },
"node_modules/gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
@@ -22180,6 +22032,15 @@
"node": ">=6"
}
},
+ "node_modules/hard-rejection": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz",
+ "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/harmony-reflect": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/harmony-reflect/-/harmony-reflect-1.6.2.tgz",
@@ -22569,12 +22430,15 @@
}
},
"node_modules/html-tags": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz",
- "integrity": "sha512-+Il6N8cCo2wB/Vd3gqy/8TZhTD3QvcVeQLCnZiGkGCH3JP28IgGAY41giccp2W4R3jfyJPAP318FQTa1yU7K7g==",
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz",
+ "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==",
"dev": true,
"engines": {
- "node": ">=4"
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/html2canvas": {
@@ -22589,40 +22453,6 @@
"node": ">=8.0.0"
}
},
- "node_modules/htmlparser2": {
- "version": "3.10.1",
- "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
- "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==",
- "dev": true,
- "dependencies": {
- "domelementtype": "^1.3.1",
- "domhandler": "^2.3.0",
- "domutils": "^1.5.1",
- "entities": "^1.1.1",
- "inherits": "^2.0.1",
- "readable-stream": "^3.1.1"
- }
- },
- "node_modules/htmlparser2/node_modules/entities": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
- "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
- "dev": true
- },
- "node_modules/htmlparser2/node_modules/readable-stream": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
- "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
- "dev": true,
- "dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
"node_modules/http-cache-semantics": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
@@ -22961,12 +22791,12 @@
}
},
"node_modules/import-lazy": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz",
- "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz",
+ "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==",
"dev": true,
"engines": {
- "node": ">=6"
+ "node": ">=8"
}
},
"node_modules/import-local": {
@@ -23078,12 +22908,6 @@
"node": ">=4"
}
},
- "node_modules/indexes-of": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz",
- "integrity": "sha512-bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA==",
- "dev": true
- },
"node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -23292,15 +23116,6 @@
"node": ">= 0.10"
}
},
- "node_modules/is-alphanumeric": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz",
- "integrity": "sha512-ZmRL7++ZkcMOfDuWZuMJyIVLr2keE1o/DeNWh1EmgqGhUcV+9BIVsx0BcSBOHTZqzjs4+dISzr2KAeBEWGgXeA==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/is-arguments": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
@@ -23812,15 +23627,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/is-supported-regexp-flag": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.1.tgz",
- "integrity": "sha512-3vcJecUUrpgCqc/ca0aWeNu64UGgxcvO60K/Fkr1N6RSvfGCTU60UKN68JDmKokgba0rFFJs12EnzOQa14ubKQ==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/is-symbol": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
@@ -23913,16 +23719,6 @@
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true
},
- "node_modules/is-whitespace-character": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz",
- "integrity": "sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
@@ -23932,16 +23728,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/is-word-character": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz",
- "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/is-wsl": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
@@ -25033,9 +24819,9 @@
}
},
"node_modules/known-css-properties": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.11.0.tgz",
- "integrity": "sha512-bEZlJzXo5V/ApNNa5z375mJC6Nrz4vG43UgcSCrg2OHC+yuB6j0iDSrY7RQ/+PRofFB03wNIIt9iXIVLr4wc7w==",
+ "version": "0.29.0",
+ "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.29.0.tgz",
+ "integrity": "sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==",
"dev": true
},
"node_modules/language-subtag-registry": {
@@ -26012,34 +25798,6 @@
"node": ">=6"
}
},
- "node_modules/load-json-file": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
- "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==",
- "dev": true,
- "dependencies": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^4.0.0",
- "pify": "^3.0.0",
- "strip-bom": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/load-json-file/node_modules/parse-json": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==",
- "dev": true,
- "dependencies": {
- "error-ex": "^1.3.1",
- "json-parse-better-errors": "^1.0.1"
- },
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/loader-runner": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",
@@ -26186,6 +25944,12 @@
"resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
"integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ=="
},
+ "node_modules/lodash.truncate": {
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz",
+ "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==",
+ "dev": true
+ },
"node_modules/lodash.uniq": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
@@ -26546,19 +26310,6 @@
"loose-envify": "cli.js"
}
},
- "node_modules/loud-rejection": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
- "integrity": "sha512-RPNliZOFkqFumDhvYqOaNY4Uz9oJM2K9tC6JWsJJsNdhuONW4LQHRBpb0qf4pJApVffI5N39SwzWZJuEhfd7eQ==",
- "dev": true,
- "dependencies": {
- "currently-unhandled": "^0.4.1",
- "signal-exit": "^3.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/lowercase-keys": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
@@ -26657,16 +26408,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/markdown-escapes": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz",
- "integrity": "sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/markdown-table": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz",
@@ -26726,43 +26467,6 @@
"safe-buffer": "^5.1.2"
}
},
- "node_modules/mdast-util-compact": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.4.tgz",
- "integrity": "sha512-3YDMQHI5vRiS2uygEFYaqckibpJtKq5Sj2c8JioeOQBU6INpKbdWzfyLqFFnDwEcEnRFIdMsguzs5pC1Jp4Isg==",
- "dev": true,
- "dependencies": {
- "unist-util-visit": "^1.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/mdast-util-compact/node_modules/unist-util-is": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz",
- "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==",
- "dev": true
- },
- "node_modules/mdast-util-compact/node_modules/unist-util-visit": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz",
- "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==",
- "dev": true,
- "dependencies": {
- "unist-util-visit-parents": "^2.0.0"
- }
- },
- "node_modules/mdast-util-compact/node_modules/unist-util-visit-parents": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz",
- "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==",
- "dev": true,
- "dependencies": {
- "unist-util-is": "^3.0.0"
- }
- },
"node_modules/mdast-util-definitions": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz",
@@ -27025,64 +26729,110 @@
"dev": true
},
"node_modules/meow": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz",
- "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==",
+ "version": "10.1.5",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz",
+ "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==",
"dev": true,
"dependencies": {
- "camelcase-keys": "^4.0.0",
- "decamelize-keys": "^1.0.0",
- "loud-rejection": "^1.0.0",
- "minimist-options": "^3.0.1",
- "normalize-package-data": "^2.3.4",
- "read-pkg-up": "^3.0.0",
- "redent": "^2.0.0",
- "trim-newlines": "^2.0.0",
- "yargs-parser": "^10.0.0"
+ "@types/minimist": "^1.2.2",
+ "camelcase-keys": "^7.0.0",
+ "decamelize": "^5.0.0",
+ "decamelize-keys": "^1.1.0",
+ "hard-rejection": "^2.1.0",
+ "minimist-options": "4.1.0",
+ "normalize-package-data": "^3.0.2",
+ "read-pkg-up": "^8.0.0",
+ "redent": "^4.0.0",
+ "trim-newlines": "^4.0.2",
+ "type-fest": "^1.2.2",
+ "yargs-parser": "^20.2.9"
},
"engines": {
- "node": ">=6"
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/meow/node_modules/camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==",
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
"dev": true,
"engines": {
- "node": ">=4"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/meow/node_modules/camelcase-keys": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz",
- "integrity": "sha512-Ej37YKYbFUI8QiYlvj9YHb6/Z60dZyPJW0Cs8sFilMbd2lP0bw3ylAq9yJkK4lcTA2dID5fG8LjmJYbO7kWb7Q==",
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz",
+ "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==",
"dev": true,
"dependencies": {
- "camelcase": "^4.1.0",
- "map-obj": "^2.0.0",
- "quick-lru": "^1.0.0"
+ "camelcase": "^6.3.0",
+ "map-obj": "^4.1.0",
+ "quick-lru": "^5.1.1",
+ "type-fest": "^1.2.1"
},
"engines": {
- "node": ">=4"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/meow/node_modules/map-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz",
- "integrity": "sha512-TzQSV2DiMYgoF5RycneKVUzIa9bQsj/B3tTgsE3dOGqlzHnGIDaC7XBE7grnA+8kZPnfqSGFe95VHc2oc0VFUQ==",
+ "node_modules/meow/node_modules/decamelize": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz",
+ "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==",
"dev": true,
"engines": {
- "node": ">=4"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/meow/node_modules/normalize-package-data": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
+ "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
+ "dev": true,
+ "dependencies": {
+ "hosted-git-info": "^4.0.1",
+ "is-core-module": "^2.5.0",
+ "semver": "^7.3.4",
+ "validate-npm-package-license": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=10"
}
},
"node_modules/meow/node_modules/quick-lru": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz",
- "integrity": "sha512-tRS7sTgyxMXtLum8L65daJnHUhfDUgboRdcWW2bR9vBfrj2+O5HSMbQOJfJJjIVSPFqbBCF37FpwWXGitDc5tA==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
"dev": true,
"engines": {
- "node": ">=4"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/meow/node_modules/type-fest": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
+ "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/merge-descriptors": {
@@ -28617,6 +28367,15 @@
"node": ">=4"
}
},
+ "node_modules/min-indent": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
+ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/mini-css-extract-plugin": {
"version": "2.7.6",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz",
@@ -28722,16 +28481,17 @@
}
},
"node_modules/minimist-options": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz",
- "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz",
+ "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==",
"dev": true,
"dependencies": {
"arrify": "^1.0.1",
- "is-plain-obj": "^1.1.0"
+ "is-plain-obj": "^1.1.0",
+ "kind-of": "^6.0.3"
},
"engines": {
- "node": ">= 4"
+ "node": ">= 6"
}
},
"node_modules/minipass": {
@@ -29301,21 +29061,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/normalize-range": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
- "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/normalize-selector": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz",
- "integrity": "sha512-dxvWdI8gw6eAvk9BlPffgEoGfM7AdijoCwOEJge3e3ulT2XLgmU7KvvxprOaCu05Q1uGRHmOhHe1r6emZoKyFw==",
- "dev": true
- },
"node_modules/normalize-url": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
@@ -32001,12 +31746,6 @@
"integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==",
"peer": true
},
- "node_modules/num2fraction": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz",
- "integrity": "sha512-Y1wZESM7VUThYY+4W+X4ySH2maqcA+p7UR+w8VWNWVAd6lwuXXWz/w/Cz43J/dI2I+PS6wD5N+bJUF+gjWvIqg==",
- "dev": true
- },
"node_modules/number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
@@ -32868,12 +32607,6 @@
"integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
"dev": true
},
- "node_modules/path-dirname": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
- "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==",
- "dev": true
- },
"node_modules/path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
@@ -33368,329 +33101,6 @@
"postcss": "^8.2.15"
}
},
- "node_modules/postcss-html": {
- "version": "0.36.0",
- "resolved": "https://registry.npmjs.org/postcss-html/-/postcss-html-0.36.0.tgz",
- "integrity": "sha512-HeiOxGcuwID0AFsNAL0ox3mW6MHH5cstWN1Z3Y+n6H+g12ih7LHdYxWwEA/QmrebctLjo79xz9ouK3MroHwOJw==",
- "dev": true,
- "dependencies": {
- "htmlparser2": "^3.10.0"
- },
- "peerDependencies": {
- "postcss": ">=5.0.0",
- "postcss-syntax": ">=0.36.0"
- }
- },
- "node_modules/postcss-jsx": {
- "version": "0.36.4",
- "resolved": "https://registry.npmjs.org/postcss-jsx/-/postcss-jsx-0.36.4.tgz",
- "integrity": "sha512-jwO/7qWUvYuWYnpOb0+4bIIgJt7003pgU3P6nETBLaOyBXuTD55ho21xnals5nBrlpTIFodyd3/jBi6UO3dHvA==",
- "dev": true,
- "dependencies": {
- "@babel/core": ">=7.2.2"
- },
- "peerDependencies": {
- "postcss": ">=5.0.0",
- "postcss-syntax": ">=0.36.0"
- }
- },
- "node_modules/postcss-less": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-3.1.4.tgz",
- "integrity": "sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA==",
- "dev": true,
- "dependencies": {
- "postcss": "^7.0.14"
- },
- "engines": {
- "node": ">=6.14.4"
- }
- },
- "node_modules/postcss-less/node_modules/picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "node_modules/postcss-less/node_modules/postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "dependencies": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=6.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- }
- },
- "node_modules/postcss-less/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/postcss-markdown": {
- "version": "0.36.0",
- "resolved": "https://registry.npmjs.org/postcss-markdown/-/postcss-markdown-0.36.0.tgz",
- "integrity": "sha512-rl7fs1r/LNSB2bWRhyZ+lM/0bwKv9fhl38/06gF6mKMo/NPnp55+K1dSTosSVjFZc0e1ppBlu+WT91ba0PMBfQ==",
- "dev": true,
- "dependencies": {
- "remark": "^10.0.1",
- "unist-util-find-all-after": "^1.0.2"
- },
- "peerDependencies": {
- "postcss": ">=5.0.0",
- "postcss-syntax": ">=0.36.0"
- }
- },
- "node_modules/postcss-markdown/node_modules/bail": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz",
- "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/postcss-markdown/node_modules/ccount": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz",
- "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/postcss-markdown/node_modules/character-entities": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz",
- "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/postcss-markdown/node_modules/character-entities-legacy": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz",
- "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/postcss-markdown/node_modules/character-reference-invalid": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz",
- "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/postcss-markdown/node_modules/is-alphabetical": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz",
- "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/postcss-markdown/node_modules/is-alphanumerical": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz",
- "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==",
- "dev": true,
- "dependencies": {
- "is-alphabetical": "^1.0.0",
- "is-decimal": "^1.0.0"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/postcss-markdown/node_modules/is-decimal": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz",
- "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/postcss-markdown/node_modules/is-hexadecimal": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz",
- "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/postcss-markdown/node_modules/longest-streak": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz",
- "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/postcss-markdown/node_modules/markdown-table": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz",
- "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==",
- "dev": true
- },
- "node_modules/postcss-markdown/node_modules/parse-entities": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz",
- "integrity": "sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==",
- "dev": true,
- "dependencies": {
- "character-entities": "^1.0.0",
- "character-entities-legacy": "^1.0.0",
- "character-reference-invalid": "^1.0.0",
- "is-alphanumerical": "^1.0.0",
- "is-decimal": "^1.0.0",
- "is-hexadecimal": "^1.0.0"
- }
- },
- "node_modules/postcss-markdown/node_modules/remark": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/remark/-/remark-10.0.1.tgz",
- "integrity": "sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==",
- "dev": true,
- "dependencies": {
- "remark-parse": "^6.0.0",
- "remark-stringify": "^6.0.0",
- "unified": "^7.0.0"
- }
- },
- "node_modules/postcss-markdown/node_modules/remark-parse": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-6.0.3.tgz",
- "integrity": "sha512-QbDXWN4HfKTUC0hHa4teU463KclLAnwpn/FBn87j9cKYJWWawbiLgMfP2Q4XwhxxuuuOxHlw+pSN0OKuJwyVvg==",
- "dev": true,
- "dependencies": {
- "collapse-white-space": "^1.0.2",
- "is-alphabetical": "^1.0.0",
- "is-decimal": "^1.0.0",
- "is-whitespace-character": "^1.0.0",
- "is-word-character": "^1.0.0",
- "markdown-escapes": "^1.0.0",
- "parse-entities": "^1.1.0",
- "repeat-string": "^1.5.4",
- "state-toggle": "^1.0.0",
- "trim": "0.0.1",
- "trim-trailing-lines": "^1.0.0",
- "unherit": "^1.0.4",
- "unist-util-remove-position": "^1.0.0",
- "vfile-location": "^2.0.0",
- "xtend": "^4.0.1"
- }
- },
- "node_modules/postcss-markdown/node_modules/remark-stringify": {
- "version": "6.0.4",
- "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-6.0.4.tgz",
- "integrity": "sha512-eRWGdEPMVudijE/psbIDNcnJLRVx3xhfuEsTDGgH4GsFF91dVhw5nhmnBppafJ7+NWINW6C7ZwWbi30ImJzqWg==",
- "dev": true,
- "dependencies": {
- "ccount": "^1.0.0",
- "is-alphanumeric": "^1.0.0",
- "is-decimal": "^1.0.0",
- "is-whitespace-character": "^1.0.0",
- "longest-streak": "^2.0.1",
- "markdown-escapes": "^1.0.0",
- "markdown-table": "^1.1.0",
- "mdast-util-compact": "^1.0.0",
- "parse-entities": "^1.0.2",
- "repeat-string": "^1.5.4",
- "state-toggle": "^1.0.0",
- "stringify-entities": "^1.0.1",
- "unherit": "^1.0.4",
- "xtend": "^4.0.1"
- }
- },
- "node_modules/postcss-markdown/node_modules/trough": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz",
- "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/postcss-markdown/node_modules/unified": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/unified/-/unified-7.1.0.tgz",
- "integrity": "sha512-lbk82UOIGuCEsZhPj8rNAkXSDXd6p0QLzIuSsCdxrqnqU56St4eyOB+AlXsVgVeRmetPTYydIuvFfpDIed8mqw==",
- "dev": true,
- "dependencies": {
- "@types/unist": "^2.0.0",
- "@types/vfile": "^3.0.0",
- "bail": "^1.0.0",
- "extend": "^3.0.0",
- "is-plain-obj": "^1.1.0",
- "trough": "^1.0.0",
- "vfile": "^3.0.0",
- "x-is-string": "^0.1.0"
- }
- },
- "node_modules/postcss-markdown/node_modules/unist-util-stringify-position": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz",
- "integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==",
- "dev": true
- },
- "node_modules/postcss-markdown/node_modules/vfile": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/vfile/-/vfile-3.0.1.tgz",
- "integrity": "sha512-y7Y3gH9BsUSdD4KzHsuMaCzRjglXN0W2EcMf0gpvu6+SbsGhMje7xDc8AEoeXy6mIwCKMI6BkjMsRjzQbhMEjQ==",
- "dev": true,
- "dependencies": {
- "is-buffer": "^2.0.0",
- "replace-ext": "1.0.0",
- "unist-util-stringify-position": "^1.0.0",
- "vfile-message": "^1.0.0"
- }
- },
- "node_modules/postcss-markdown/node_modules/vfile-message": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz",
- "integrity": "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==",
- "dev": true,
- "dependencies": {
- "unist-util-stringify-position": "^1.1.1"
- }
- },
- "node_modules/postcss-media-query-parser": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz",
- "integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==",
- "dev": true
- },
"node_modules/postcss-merge-longhand": {
"version": "5.1.7",
"resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz",
@@ -34029,65 +33439,6 @@
"postcss": "^8.2.15"
}
},
- "node_modules/postcss-reporter": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-6.0.1.tgz",
- "integrity": "sha512-LpmQjfRWyabc+fRygxZjpRxfhRf9u/fdlKf4VHG4TSPbV2XNsuISzYW1KL+1aQzx53CAppa1bKG4APIB/DOXXw==",
- "dev": true,
- "dependencies": {
- "chalk": "^2.4.1",
- "lodash": "^4.17.11",
- "log-symbols": "^2.2.0",
- "postcss": "^7.0.7"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/postcss-reporter/node_modules/log-symbols": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
- "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
- "dev": true,
- "dependencies": {
- "chalk": "^2.0.1"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/postcss-reporter/node_modules/picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "node_modules/postcss-reporter/node_modules/postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "dependencies": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=6.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- }
- },
- "node_modules/postcss-reporter/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/postcss-resolve-nested-selector": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz",
@@ -34095,133 +33446,19 @@
"dev": true
},
"node_modules/postcss-safe-parser": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.2.tgz",
- "integrity": "sha512-Uw6ekxSWNLCPesSv/cmqf2bY/77z11O7jZGPax3ycZMFU/oi2DMH9i89AdHc1tRwFg/arFoEwX0IS3LCUxJh1g==",
- "dev": true,
- "dependencies": {
- "postcss": "^7.0.26"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/postcss-safe-parser/node_modules/picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "node_modules/postcss-safe-parser/node_modules/postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "dependencies": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=6.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- }
- },
- "node_modules/postcss-safe-parser/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/postcss-sass": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.3.5.tgz",
- "integrity": "sha512-B5z2Kob4xBxFjcufFnhQ2HqJQ2y/Zs/ic5EZbCywCkxKd756Q40cIQ/veRDwSrw1BF6+4wUgmpm0sBASqVi65A==",
- "dev": true,
- "dependencies": {
- "gonzales-pe": "^4.2.3",
- "postcss": "^7.0.1"
- }
- },
- "node_modules/postcss-sass/node_modules/picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "node_modules/postcss-sass/node_modules/postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz",
+ "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==",
"dev": true,
- "dependencies": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- },
"engines": {
- "node": ">=6.0.0"
+ "node": ">=12.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
- }
- },
- "node_modules/postcss-sass/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/postcss-scss": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.1.1.tgz",
- "integrity": "sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA==",
- "dev": true,
- "dependencies": {
- "postcss": "^7.0.6"
},
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/postcss-scss/node_modules/picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "node_modules/postcss-scss/node_modules/postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "dependencies": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=6.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- }
- },
- "node_modules/postcss-scss/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
+ "peerDependencies": {
+ "postcss": "^8.3.3"
}
},
"node_modules/postcss-selector-parser": {
@@ -34253,15 +33490,6 @@
"postcss": "^8.2.15"
}
},
- "node_modules/postcss-syntax": {
- "version": "0.36.2",
- "resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz",
- "integrity": "sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==",
- "dev": true,
- "peerDependencies": {
- "postcss": ">=5.0.0"
- }
- },
"node_modules/postcss-unique-selectors": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz",
@@ -34337,15 +33565,18 @@
}
},
"node_modules/prettier": {
- "version": "1.19.1",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
- "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
+ "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
"dev": true,
"bin": {
- "prettier": "bin-prettier.js"
+ "prettier": "bin/prettier.cjs"
},
"engines": {
- "node": ">=4"
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/pretty-format": {
@@ -35780,100 +35011,65 @@
}
},
"node_modules/read-pkg-up": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz",
- "integrity": "sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==",
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz",
+ "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==",
"dev": true,
"dependencies": {
- "find-up": "^2.0.0",
- "read-pkg": "^3.0.0"
+ "find-up": "^5.0.0",
+ "read-pkg": "^6.0.0",
+ "type-fest": "^1.0.1"
},
"engines": {
- "node": ">=4"
- }
- },
- "node_modules/read-pkg-up/node_modules/find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==",
- "dev": true,
- "dependencies": {
- "locate-path": "^2.0.0"
+ "node": ">=12"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/read-pkg-up/node_modules/locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==",
+ "node_modules/read-pkg-up/node_modules/normalize-package-data": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
+ "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
"dev": true,
"dependencies": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
+ "hosted-git-info": "^4.0.1",
+ "is-core-module": "^2.5.0",
+ "semver": "^7.3.4",
+ "validate-npm-package-license": "^3.0.1"
},
"engines": {
- "node": ">=4"
+ "node": ">=10"
}
},
- "node_modules/read-pkg-up/node_modules/p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "node_modules/read-pkg-up/node_modules/read-pkg": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz",
+ "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==",
"dev": true,
"dependencies": {
- "p-try": "^1.0.0"
+ "@types/normalize-package-data": "^2.4.0",
+ "normalize-package-data": "^3.0.2",
+ "parse-json": "^5.2.0",
+ "type-fest": "^1.0.1"
},
"engines": {
- "node": ">=4"
- }
- },
- "node_modules/read-pkg-up/node_modules/p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==",
- "dev": true,
- "dependencies": {
- "p-limit": "^1.1.0"
+ "node": ">=12"
},
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/read-pkg-up/node_modules/p-try": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==",
- "dev": true,
- "engines": {
- "node": ">=4"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/read-pkg-up/node_modules/path-type": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
- "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+ "node_modules/read-pkg-up/node_modules/type-fest": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
+ "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
"dev": true,
- "dependencies": {
- "pify": "^3.0.0"
- },
"engines": {
- "node": ">=4"
- }
- },
- "node_modules/read-pkg-up/node_modules/read-pkg": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
- "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==",
- "dev": true,
- "dependencies": {
- "load-json-file": "^4.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^3.0.0"
+ "node": ">=10"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/read-pkg/node_modules/parse-json": {
@@ -36017,16 +35213,31 @@
}
},
"node_modules/redent": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
- "integrity": "sha512-XNwrTx77JQCEMXTeb8movBKuK75MgH0RZkujNuDKCezemx/voapl9i2gCSi8WWm8+ox5ycJi1gxF22fR7c0Ciw==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz",
+ "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==",
"dev": true,
"dependencies": {
- "indent-string": "^3.0.0",
- "strip-indent": "^2.0.0"
+ "indent-string": "^5.0.0",
+ "strip-indent": "^4.0.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/redent/node_modules/indent-string": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
+ "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/redux": {
@@ -36328,15 +35539,6 @@
"node": ">=0.10"
}
},
- "node_modules/replace-ext": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
- "integrity": "sha512-vuNYXC7gG7IeVNBC1xUllqCcZKRbJoSPOBhnTEcAIiKCsbuef6zO3F0Rve3isPMMoNoQRWjQwbAgAjHUHniyEA==",
- "dev": true,
- "engines": {
- "node": ">= 0.10"
- }
- },
"node_modules/request": {
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
@@ -37889,15 +37091,6 @@
"node": ">= 6"
}
},
- "node_modules/specificity": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz",
- "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==",
- "dev": true,
- "bin": {
- "specificity": "bin/specificity"
- }
- },
"node_modules/split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
@@ -38028,16 +37221,6 @@
"node": ">= 6"
}
},
- "node_modules/state-toggle": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz",
- "integrity": "sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/static-extend": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
@@ -38249,72 +37432,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/stringify-entities": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz",
- "integrity": "sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A==",
- "dev": true,
- "dependencies": {
- "character-entities-html4": "^1.0.0",
- "character-entities-legacy": "^1.0.0",
- "is-alphanumerical": "^1.0.0",
- "is-hexadecimal": "^1.0.0"
- }
- },
- "node_modules/stringify-entities/node_modules/character-entities-legacy": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz",
- "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/stringify-entities/node_modules/is-alphabetical": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz",
- "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/stringify-entities/node_modules/is-alphanumerical": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz",
- "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==",
- "dev": true,
- "dependencies": {
- "is-alphabetical": "^1.0.0",
- "is-decimal": "^1.0.0"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/stringify-entities/node_modules/is-decimal": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz",
- "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/stringify-entities/node_modules/is-hexadecimal": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz",
- "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==",
- "dev": true,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/stringify-object": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz",
@@ -38367,12 +37484,18 @@
}
},
"node_modules/strip-indent": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
- "integrity": "sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz",
+ "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==",
"dev": true,
+ "dependencies": {
+ "min-indent": "^1.0.1"
+ },
"engines": {
- "node": ">=4"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/strip-json-comments": {
@@ -38435,652 +37558,201 @@
}
},
"node_modules/stylelint": {
- "version": "9.10.1",
- "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-9.10.1.tgz",
- "integrity": "sha512-9UiHxZhOAHEgeQ7oLGwrwoDR8vclBKlSX7r4fH0iuu0SfPwFaLkb1c7Q2j1cqg9P7IDXeAV2TvQML/fRQzGBBQ==",
- "dev": true,
- "dependencies": {
- "autoprefixer": "^9.0.0",
- "balanced-match": "^1.0.0",
- "chalk": "^2.4.1",
- "cosmiconfig": "^5.0.0",
- "debug": "^4.0.0",
- "execall": "^1.0.0",
- "file-entry-cache": "^4.0.0",
- "get-stdin": "^6.0.0",
+ "version": "15.11.0",
+ "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.11.0.tgz",
+ "integrity": "sha512-78O4c6IswZ9TzpcIiQJIN49K3qNoXTM8zEJzhaTE/xRTCZswaovSEVIa/uwbOltZrk16X4jAxjaOhzz/hTm1Kw==",
+ "dev": true,
+ "dependencies": {
+ "@csstools/css-parser-algorithms": "^2.3.1",
+ "@csstools/css-tokenizer": "^2.2.0",
+ "@csstools/media-query-list-parser": "^2.1.4",
+ "@csstools/selector-specificity": "^3.0.0",
+ "balanced-match": "^2.0.0",
+ "colord": "^2.9.3",
+ "cosmiconfig": "^8.2.0",
+ "css-functions-list": "^3.2.1",
+ "css-tree": "^2.3.1",
+ "debug": "^4.3.4",
+ "fast-glob": "^3.3.1",
+ "fastest-levenshtein": "^1.0.16",
+ "file-entry-cache": "^7.0.0",
"global-modules": "^2.0.0",
- "globby": "^9.0.0",
+ "globby": "^11.1.0",
"globjoin": "^0.1.4",
- "html-tags": "^2.0.0",
- "ignore": "^5.0.4",
- "import-lazy": "^3.1.0",
+ "html-tags": "^3.3.1",
+ "ignore": "^5.2.4",
+ "import-lazy": "^4.0.0",
"imurmurhash": "^0.1.4",
- "known-css-properties": "^0.11.0",
- "leven": "^2.1.0",
- "lodash": "^4.17.4",
- "log-symbols": "^2.0.0",
- "mathml-tag-names": "^2.0.1",
- "meow": "^5.0.0",
- "micromatch": "^3.1.10",
- "normalize-selector": "^0.2.0",
- "pify": "^4.0.0",
- "postcss": "^7.0.13",
- "postcss-html": "^0.36.0",
- "postcss-jsx": "^0.36.0",
- "postcss-less": "^3.1.0",
- "postcss-markdown": "^0.36.0",
- "postcss-media-query-parser": "^0.2.3",
- "postcss-reporter": "^6.0.0",
+ "is-plain-object": "^5.0.0",
+ "known-css-properties": "^0.29.0",
+ "mathml-tag-names": "^2.1.3",
+ "meow": "^10.1.5",
+ "micromatch": "^4.0.5",
+ "normalize-path": "^3.0.0",
+ "picocolors": "^1.0.0",
+ "postcss": "^8.4.28",
"postcss-resolve-nested-selector": "^0.1.1",
- "postcss-safe-parser": "^4.0.0",
- "postcss-sass": "^0.3.5",
- "postcss-scss": "^2.0.0",
- "postcss-selector-parser": "^3.1.0",
- "postcss-syntax": "^0.36.2",
- "postcss-value-parser": "^3.3.0",
- "resolve-from": "^4.0.0",
- "signal-exit": "^3.0.2",
- "slash": "^2.0.0",
- "specificity": "^0.4.1",
- "string-width": "^3.0.0",
+ "postcss-safe-parser": "^6.0.0",
+ "postcss-selector-parser": "^6.0.13",
+ "postcss-value-parser": "^4.2.0",
+ "resolve-from": "^5.0.0",
+ "string-width": "^4.2.3",
+ "strip-ansi": "^6.0.1",
"style-search": "^0.1.0",
- "sugarss": "^2.0.0",
+ "supports-hyperlinks": "^3.0.0",
"svg-tags": "^1.0.0",
- "table": "^5.0.0"
+ "table": "^6.8.1",
+ "write-file-atomic": "^5.0.1"
},
"bin": {
- "stylelint": "bin/stylelint.js"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/stylelint-config-prettier": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/stylelint-config-prettier/-/stylelint-config-prettier-4.0.0.tgz",
- "integrity": "sha512-cwh3QbBC2+3zBeMvuxFjT8XsbSdyoyELOY9BZqMuvphUKEQ+srkPWoN60FlvRwLB014TOke4Y12KvTtfKnaHhg==",
- "dev": true,
- "bin": {
- "stylelint-config-prettier-check": "bin/check.js"
- },
- "engines": {
- "node": ">= 6",
- "npm": ">= 3"
- },
- "peerDependencies": {
- "stylelint": "^9.1.1"
- }
- },
- "node_modules/stylelint-config-recommended": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-2.2.0.tgz",
- "integrity": "sha512-bZ+d4RiNEfmoR74KZtCKmsABdBJr4iXRiCso+6LtMJPw5rd/KnxUWTxht7TbafrTJK1YRjNgnN0iVZaJfc3xJA==",
- "dev": true,
- "peerDependencies": {
- "stylelint": "^8.3.0 || ^9.0.0 || ^10.0.0"
- }
- },
- "node_modules/stylelint-config-standard": {
- "version": "18.3.0",
- "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-18.3.0.tgz",
- "integrity": "sha512-Tdc/TFeddjjy64LvjPau9SsfVRexmTFqUhnMBrzz07J4p2dVQtmpncRF/o8yZn8ugA3Ut43E6o1GtjX80TFytw==",
- "dev": true,
- "dependencies": {
- "stylelint-config-recommended": "^2.2.0"
+ "stylelint": "bin/stylelint.mjs"
},
- "peerDependencies": {
- "stylelint": "^8.3.0 || ^9.0.0 || ^10.0.0"
- }
- },
- "node_modules/stylelint/node_modules/@nodelib/fs.stat": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
- "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
- "dev": true,
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/stylelint/node_modules/ansi-regex": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
- "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/stylelint/node_modules/argparse": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
- "dev": true,
- "dependencies": {
- "sprintf-js": "~1.0.2"
- }
- },
- "node_modules/stylelint/node_modules/arr-diff": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
- "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==",
- "dev": true,
"engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stylelint/node_modules/array-union": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
- "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==",
- "dev": true,
- "dependencies": {
- "array-uniq": "^1.0.1"
+ "node": "^14.13.1 || >=16.0.0"
},
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stylelint/node_modules/braces": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
- "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
- "dev": true,
- "dependencies": {
- "arr-flatten": "^1.1.0",
- "array-unique": "^0.3.2",
- "extend-shallow": "^2.0.1",
- "fill-range": "^4.0.0",
- "isobject": "^3.0.1",
- "repeat-element": "^1.1.2",
- "snapdragon": "^0.8.1",
- "snapdragon-node": "^2.0.1",
- "split-string": "^3.0.2",
- "to-regex": "^3.0.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stylelint/node_modules/braces/node_modules/extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==",
- "dev": true,
- "dependencies": {
- "is-extendable": "^0.1.0"
- },
- "engines": {
- "node": ">=0.10.0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/stylelint"
}
},
- "node_modules/stylelint/node_modules/braces/node_modules/is-extendable": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
- "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
+ "node_modules/stylelint/node_modules/balanced-match": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz",
+ "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==",
+ "dev": true
},
"node_modules/stylelint/node_modules/cosmiconfig": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
- "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==",
+ "version": "8.3.6",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz",
+ "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==",
"dev": true,
"dependencies": {
- "import-fresh": "^2.0.0",
- "is-directory": "^0.3.1",
- "js-yaml": "^3.13.1",
- "parse-json": "^4.0.0"
+ "import-fresh": "^3.3.0",
+ "js-yaml": "^4.1.0",
+ "parse-json": "^5.2.0",
+ "path-type": "^4.0.0"
},
"engines": {
- "node": ">=4"
- }
- },
- "node_modules/stylelint/node_modules/dir-glob": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
- "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==",
- "dev": true,
- "dependencies": {
- "path-type": "^3.0.0"
+ "node": ">=14"
},
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/stylelint/node_modules/emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
- "node_modules/stylelint/node_modules/extend-shallow": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
- "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==",
- "dev": true,
- "dependencies": {
- "assign-symbols": "^1.0.0",
- "is-extendable": "^1.0.1"
+ "funding": {
+ "url": "https://github.com/sponsors/d-fischer"
},
- "engines": {
- "node": ">=0.10.0"
+ "peerDependencies": {
+ "typescript": ">=4.9.5"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
}
},
- "node_modules/stylelint/node_modules/fast-glob": {
- "version": "2.2.7",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
- "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==",
+ "node_modules/stylelint/node_modules/css-tree": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
+ "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
"dev": true,
"dependencies": {
- "@mrmlnc/readdir-enhanced": "^2.2.1",
- "@nodelib/fs.stat": "^1.1.2",
- "glob-parent": "^3.1.0",
- "is-glob": "^4.0.0",
- "merge2": "^1.2.3",
- "micromatch": "^3.1.10"
+ "mdn-data": "2.0.30",
+ "source-map-js": "^1.0.1"
},
"engines": {
- "node": ">=4.0.0"
+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
}
},
"node_modules/stylelint/node_modules/file-entry-cache": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-4.0.0.tgz",
- "integrity": "sha512-AVSwsnbV8vH/UVbvgEhf3saVQXORNv0ZzSkvkhQIaia5Tia+JhGTaa/ePUSVoPHQyGayQNmYfkzFi3WZV5zcpA==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-7.0.1.tgz",
+ "integrity": "sha512-uLfFktPmRetVCbHe5UPuekWrQ6hENufnA46qEGbfACkK5drjTTdQYUragRgMjHldcbYG+nslUerqMPjbBSHXjQ==",
"dev": true,
"dependencies": {
- "flat-cache": "^2.0.1"
+ "flat-cache": "^3.1.1"
},
"engines": {
- "node": ">=4"
+ "node": ">=12.0.0"
}
},
- "node_modules/stylelint/node_modules/fill-range": {
+ "node_modules/stylelint/node_modules/has-flag": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
- "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==",
- "dev": true,
- "dependencies": {
- "extend-shallow": "^2.0.1",
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1",
- "to-regex-range": "^2.1.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stylelint/node_modules/fill-range/node_modules/extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==",
- "dev": true,
- "dependencies": {
- "is-extendable": "^0.1.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stylelint/node_modules/fill-range/node_modules/is-extendable": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
- "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stylelint/node_modules/flat-cache": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
- "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
- "dev": true,
- "dependencies": {
- "flatted": "^2.0.0",
- "rimraf": "2.6.3",
- "write": "1.0.3"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/stylelint/node_modules/flatted": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
- "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
- "dev": true
- },
- "node_modules/stylelint/node_modules/glob-parent": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
- "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==",
- "dev": true,
- "dependencies": {
- "is-glob": "^3.1.0",
- "path-dirname": "^1.0.0"
- }
- },
- "node_modules/stylelint/node_modules/glob-parent/node_modules/is-glob": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
- "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==",
- "dev": true,
- "dependencies": {
- "is-extglob": "^2.1.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stylelint/node_modules/globby": {
- "version": "9.2.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz",
- "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==",
- "dev": true,
- "dependencies": {
- "@types/glob": "^7.1.1",
- "array-union": "^1.0.2",
- "dir-glob": "^2.2.2",
- "fast-glob": "^2.2.6",
- "glob": "^7.1.3",
- "ignore": "^4.0.3",
- "pify": "^4.0.1",
- "slash": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/stylelint/node_modules/globby/node_modules/ignore": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
- "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
- "dev": true,
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/stylelint/node_modules/import-fresh": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
- "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==",
- "dev": true,
- "dependencies": {
- "caller-path": "^2.0.0",
- "resolve-from": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/stylelint/node_modules/import-fresh/node_modules/resolve-from": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
- "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/stylelint/node_modules/is-buffer": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
- "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
- "dev": true
- },
- "node_modules/stylelint/node_modules/is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/stylelint/node_modules/is-number": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
- "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==",
- "dev": true,
- "dependencies": {
- "kind-of": "^3.0.2"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stylelint/node_modules/is-number/node_modules/kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==",
- "dev": true,
- "dependencies": {
- "is-buffer": "^1.1.5"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stylelint/node_modules/js-yaml": {
- "version": "3.14.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
- "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
- "dev": true,
- "dependencies": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
- },
- "node_modules/stylelint/node_modules/leven": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz",
- "integrity": "sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stylelint/node_modules/log-symbols": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
- "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
- "dependencies": {
- "chalk": "^2.0.1"
- },
"engines": {
- "node": ">=4"
+ "node": ">=8"
}
},
- "node_modules/stylelint/node_modules/micromatch": {
- "version": "3.1.10",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
- "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+ "node_modules/stylelint/node_modules/is-plain-object": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
+ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
"dev": true,
- "dependencies": {
- "arr-diff": "^4.0.0",
- "array-unique": "^0.3.2",
- "braces": "^2.3.1",
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "extglob": "^2.0.4",
- "fragment-cache": "^0.2.1",
- "kind-of": "^6.0.2",
- "nanomatch": "^1.2.9",
- "object.pick": "^1.3.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.2"
- },
"engines": {
"node": ">=0.10.0"
}
},
- "node_modules/stylelint/node_modules/parse-json": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==",
- "dev": true,
- "dependencies": {
- "error-ex": "^1.3.1",
- "json-parse-better-errors": "^1.0.1"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/stylelint/node_modules/path-type": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
- "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
- "dev": true,
- "dependencies": {
- "pify": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/stylelint/node_modules/path-type/node_modules/pify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
- "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/stylelint/node_modules/picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
+ "node_modules/stylelint/node_modules/mdn-data": {
+ "version": "2.0.30",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
+ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
"dev": true
},
- "node_modules/stylelint/node_modules/pify": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
+ "node_modules/stylelint/node_modules/resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true,
"engines": {
- "node": ">=6"
+ "node": ">=8"
}
},
- "node_modules/stylelint/node_modules/postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
+ "node_modules/stylelint/node_modules/signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
"dev": true,
- "dependencies": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- },
"engines": {
- "node": ">=6.0.0"
+ "node": ">=14"
},
"funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/stylelint/node_modules/postcss-selector-parser": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz",
- "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==",
+ "node_modules/stylelint/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"dependencies": {
- "dot-prop": "^5.2.0",
- "indexes-of": "^1.0.1",
- "uniq": "^1.0.1"
+ "has-flag": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
- "node_modules/stylelint/node_modules/postcss-value-parser": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
- "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
- "dev": true
- },
- "node_modules/stylelint/node_modules/rimraf": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
- "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
- "dev": true,
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- }
- },
- "node_modules/stylelint/node_modules/slash": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
- "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/stylelint/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/stylelint/node_modules/sprintf-js": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
- "dev": true
- },
- "node_modules/stylelint/node_modules/string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
- "dev": true,
- "dependencies": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/stylelint/node_modules/strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "node_modules/stylelint/node_modules/supports-hyperlinks": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz",
+ "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==",
"dev": true,
"dependencies": {
- "ansi-regex": "^4.1.0"
+ "has-flag": "^4.0.0",
+ "supports-color": "^7.0.0"
},
"engines": {
- "node": ">=6"
+ "node": ">=14.18"
}
},
- "node_modules/stylelint/node_modules/to-regex-range": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
- "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==",
+ "node_modules/stylelint/node_modules/write-file-atomic": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
+ "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
"dev": true,
"dependencies": {
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1"
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^4.0.1"
},
"engines": {
- "node": ">=0.10.0"
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/stylis": {
@@ -39094,47 +37766,6 @@
"integrity": "sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==",
"peer": true
},
- "node_modules/sugarss": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-2.0.0.tgz",
- "integrity": "sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ==",
- "dev": true,
- "dependencies": {
- "postcss": "^7.0.2"
- }
- },
- "node_modules/sugarss/node_modules/picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "node_modules/sugarss/node_modules/postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "dependencies": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=6.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- }
- },
- "node_modules/sugarss/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/sumchecker": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
@@ -39279,91 +37910,91 @@
"dev": true
},
"node_modules/table": {
- "version": "5.4.6",
- "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
- "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
+ "version": "6.8.1",
+ "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz",
+ "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==",
"dev": true,
"dependencies": {
- "ajv": "^6.10.2",
- "lodash": "^4.17.14",
- "slice-ansi": "^2.1.0",
- "string-width": "^3.0.0"
+ "ajv": "^8.0.1",
+ "lodash.truncate": "^4.4.2",
+ "slice-ansi": "^4.0.0",
+ "string-width": "^4.2.3",
+ "strip-ansi": "^6.0.1"
},
"engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/table/node_modules/ansi-regex": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
- "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/table/node_modules/astral-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
- "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
- "dev": true,
- "engines": {
- "node": ">=4"
+ "node": ">=10.0.0"
}
},
- "node_modules/table/node_modules/emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
- "node_modules/table/node_modules/is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==",
+ "node_modules/table/node_modules/ajv": {
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
+ "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
"dev": true,
- "engines": {
- "node": ">=4"
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
}
},
- "node_modules/table/node_modules/slice-ansi": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
- "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
+ "node_modules/table/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"dependencies": {
- "ansi-styles": "^3.2.0",
- "astral-regex": "^1.0.0",
- "is-fullwidth-code-point": "^2.0.0"
+ "color-convert": "^2.0.1"
},
"engines": {
- "node": ">=6"
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/table/node_modules/string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "node_modules/table/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"dependencies": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
+ "color-name": "~1.1.4"
},
"engines": {
- "node": ">=6"
+ "node": ">=7.0.0"
}
},
- "node_modules/table/node_modules/strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "node_modules/table/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/table/node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "node_modules/table/node_modules/slice-ansi": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
+ "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
"dev": true,
"dependencies": {
- "ansi-regex": "^4.1.0"
+ "ansi-styles": "^4.0.0",
+ "astral-regex": "^2.0.0",
+ "is-fullwidth-code-point": "^3.0.0"
},
"engines": {
- "node": ">=6"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/slice-ansi?sponsor=1"
}
},
"node_modules/tailwind-nord": {
@@ -39952,30 +38583,16 @@
"node": ">=0.6"
}
},
- "node_modules/trim": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz",
- "integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==",
- "deprecated": "Use String.prototype.trim() instead",
- "dev": true
- },
"node_modules/trim-newlines": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz",
- "integrity": "sha512-MTBWv3jhVjTU7XR3IQHllbiJs8sc75a80OEhB6or/q7pLTWgQ0bMGQXXYQSrSuXe6WiKWDZ5txXY5P59a/coVA==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.1.1.tgz",
+ "integrity": "sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==",
"dev": true,
"engines": {
- "node": ">=4"
- }
- },
- "node_modules/trim-trailing-lines": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz",
- "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==",
- "dev": true,
+ "node": ">=12"
+ },
"funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/trough": {
@@ -40454,20 +39071,6 @@
"resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz",
"integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA=="
},
- "node_modules/unherit": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz",
- "integrity": "sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==",
- "dev": true,
- "dependencies": {
- "inherits": "^2.0.0",
- "xtend": "^4.0.0"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/unicode-canonical-property-names-ecmascript": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
@@ -40574,31 +39177,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/uniq": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz",
- "integrity": "sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==",
- "dev": true
- },
- "node_modules/unist-util-find-all-after": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-1.0.5.tgz",
- "integrity": "sha512-lWgIc3rrTMTlK1Y0hEuL+k+ApzFk78h+lsaa2gHf63Gp5Ww+mt11huDniuaoq1H+XMK2lIIjjPkncxXcDp3QDw==",
- "dev": true,
- "dependencies": {
- "unist-util-is": "^3.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/unist-util-find-all-after/node_modules/unist-util-is": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz",
- "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==",
- "dev": true
- },
"node_modules/unist-util-is": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz",
@@ -40611,43 +39189,6 @@
"url": "https://opencollective.com/unified"
}
},
- "node_modules/unist-util-remove-position": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz",
- "integrity": "sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==",
- "dev": true,
- "dependencies": {
- "unist-util-visit": "^1.1.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/unist-util-remove-position/node_modules/unist-util-is": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz",
- "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==",
- "dev": true
- },
- "node_modules/unist-util-remove-position/node_modules/unist-util-visit": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz",
- "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==",
- "dev": true,
- "dependencies": {
- "unist-util-visit-parents": "^2.0.0"
- }
- },
- "node_modules/unist-util-remove-position/node_modules/unist-util-visit-parents": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz",
- "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==",
- "dev": true,
- "dependencies": {
- "unist-util-is": "^3.0.0"
- }
- },
"node_modules/unist-util-stringify-position": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz",
@@ -41110,16 +39651,6 @@
"url": "https://opencollective.com/unified"
}
},
- "node_modules/vfile-location": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz",
- "integrity": "sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==",
- "dev": true,
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
"node_modules/vfile-message": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz",
@@ -42045,18 +40576,6 @@
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
- "node_modules/write": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
- "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
- "dev": true,
- "dependencies": {
- "mkdirp": "^0.5.1"
- },
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/write-file-atomic": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
@@ -42077,12 +40596,6 @@
"async-limiter": "~1.0.0"
}
},
- "node_modules/x-is-string": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz",
- "integrity": "sha512-GojqklwG8gpzOVEVki5KudKNoq7MbbjYZCbyWzEz7tyPA7eleiE0+ePwOWQQRb5fm86rD3S8Tc0tSFf3AOv50w==",
- "dev": true
- },
"node_modules/xml-name-validator": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
@@ -42171,21 +40684,12 @@
}
},
"node_modules/yargs-parser": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
- "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
- "dev": true,
- "dependencies": {
- "camelcase": "^4.1.0"
- }
- },
- "node_modules/yargs-parser/node_modules/camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==",
+ "version": "20.2.9",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
+ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true,
"engines": {
- "node": ">=4"
+ "node": ">=10"
}
},
"node_modules/yargs/node_modules/yargs-parser": {
@@ -49201,6 +47705,33 @@
"resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-6.0.4.tgz",
"integrity": "sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A=="
},
+ "@csstools/css-parser-algorithms": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.3.2.tgz",
+ "integrity": "sha512-sLYGdAdEY2x7TSw9FtmdaTrh2wFtRJO5VMbBrA8tEqEod7GEggFmxTSK9XqExib3yMuYNcvcTdCZIP6ukdjAIA==",
+ "dev": true,
+ "requires": {}
+ },
+ "@csstools/css-tokenizer": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.1.tgz",
+ "integrity": "sha512-Zmsf2f/CaEPWEVgw29odOj+WEVoiJy9s9NOv5GgNY9mZ1CZ7394By6wONrONrTsnNDv6F9hR02nvFihrGVGHBg==",
+ "dev": true
+ },
+ "@csstools/media-query-list-parser": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.5.tgz",
+ "integrity": "sha512-IxVBdYzR8pYe89JiyXQuYk4aVVoCPhMJkz6ElRwlVysjwURTsTk/bmY/z4FfeRE+CRBMlykPwXEVUg8lThv7AQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "@csstools/selector-specificity": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.0.tgz",
+ "integrity": "sha512-hBI9tfBtuPIi885ZsZ32IMEU/5nlZH/KOVYJCOh7gyMxaVLGmLedYqFN6Ui1LXkI8JlC8IsuC0rF0btcRZKd5g==",
+ "dev": true,
+ "requires": {}
+ },
"@date-io/core": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/@date-io/core/-/core-2.17.0.tgz",
@@ -50211,24 +48742,6 @@
"tslib": "^2.5.0"
}
},
- "@mrmlnc/readdir-enhanced": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",
- "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==",
- "dev": true,
- "requires": {
- "call-me-maybe": "^1.0.1",
- "glob-to-regexp": "^0.3.0"
- },
- "dependencies": {
- "glob-to-regexp": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz",
- "integrity": "sha512-Iozmtbqv0noj0uDDqoL0zNq0VBEfK2YFoMAZoxJe4cwphvLR+JskfF30QhXHOR4m3KrE6NLRYw+U9MRXvifyig==",
- "dev": true
- }
- }
- },
"@mui/base": {
"version": "5.0.0-beta.21",
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.21.tgz",
@@ -52006,16 +50519,6 @@
"integrity": "sha512-uK2z1ZHJyC0nQRbuovXFt4mzXDwf27vQeUWNhfKGwRcWW429GOhP8HxUHlM6TLH4bzmlv/HlEjpvJh3JfmGsAA==",
"dev": true
},
- "@types/glob": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
- "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==",
- "dev": true,
- "requires": {
- "@types/minimatch": "*",
- "@types/node": "*"
- }
- },
"@types/history": {
"version": "4.7.11",
"resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz",
@@ -52135,10 +50638,10 @@
"integrity": "sha512-1Gjee59G25MrQGk8bsNvC6fxNiRgUlGn2wlhGf95a59DrprnnHk80FIMMFG9XHMdrfsuA119ht06QPDXA1Z7tw==",
"dev": true
},
- "@types/minimatch": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz",
- "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==",
+ "@types/minimist": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.4.tgz",
+ "integrity": "sha512-Kfe/D3hxHTusnPNRbycJE1N77WHDsdS4AjUYIzlDzhDrS47NrwuL3YW4VITxwR7KCVpzwgy4Rbj829KSSQmwXQ==",
"dev": true
},
"@types/ms": {
@@ -52168,6 +50671,12 @@
"@types/node": "*"
}
},
+ "@types/normalize-package-data": {
+ "version": "2.4.3",
+ "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.3.tgz",
+ "integrity": "sha512-ehPtgRgaULsFG8x0NeYJvmyH1hmlfsNLujHe9dQEia/7MAJYdzMSi19JtchUHjmBA6XC/75dK55mzZH+RyieSg==",
+ "dev": true
+ },
"@types/parse-json": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.1.tgz",
@@ -52362,26 +50871,6 @@
"dev": true,
"optional": true
},
- "@types/vfile": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/@types/vfile/-/vfile-3.0.2.tgz",
- "integrity": "sha512-b3nLFGaGkJ9rzOcuXRfHkZMdjsawuDD0ENL9fzTophtBg8FJHSGbH7daXkEpcwy3v7Xol3pAvsmlYyFhR4pqJw==",
- "dev": true,
- "requires": {
- "@types/node": "*",
- "@types/unist": "*",
- "@types/vfile-message": "*"
- }
- },
- "@types/vfile-message": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@types/vfile-message/-/vfile-message-2.0.0.tgz",
- "integrity": "sha512-GpTIuDpb9u4zIO165fUy9+fXcULdD8HFRNli04GehoMVbeNq7D6OBnqSmg3lxZnC+UvgUhEWKxdKiwYUkGltIw==",
- "dev": true,
- "requires": {
- "vfile-message": "*"
- }
- },
"@types/ws": {
"version": "8.5.8",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.8.tgz",
@@ -53399,45 +51888,6 @@
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
"dev": true
},
- "autoprefixer": {
- "version": "9.8.8",
- "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.8.tgz",
- "integrity": "sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA==",
- "dev": true,
- "requires": {
- "browserslist": "^4.12.0",
- "caniuse-lite": "^1.0.30001109",
- "normalize-range": "^0.1.2",
- "num2fraction": "^1.2.2",
- "picocolors": "^0.2.1",
- "postcss": "^7.0.32",
- "postcss-value-parser": "^4.1.0"
- },
- "dependencies": {
- "picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "requires": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- }
- },
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- }
- }
- },
"available-typed-arrays": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
@@ -54392,12 +52842,6 @@
"set-function-length": "^1.1.1"
}
},
- "call-me-maybe": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz",
- "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==",
- "dev": true
- },
"caller-callsite": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz",
@@ -54496,12 +52940,6 @@
"resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz",
"integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="
},
- "character-entities-html4": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.4.tgz",
- "integrity": "sha512-HRcDxZuZqMx3/a+qrzxdBKBPUpxWEq9xw2OPZ3a/174ihfrQKVsFhqtthBInFy1zZ9GgZyFXOatNujm8M+El3g==",
- "dev": true
- },
"chardet": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
@@ -54730,16 +53168,6 @@
"shallow-clone": "^3.0.0"
}
},
- "clone-regexp": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.1.tgz",
- "integrity": "sha512-Fcij9IwRW27XedRIJnSOEupS7RVcXtObJXbcUOX93UCLqqOdRpkvzKywOOSizmEK/Is3S/RHX9dLdfo6R1Q1mw==",
- "dev": true,
- "requires": {
- "is-regexp": "^1.0.0",
- "is-supported-regexp-flag": "^1.0.0"
- }
- },
"clone-response": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",
@@ -54760,12 +53188,6 @@
"integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==",
"dev": true
},
- "collapse-white-space": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz",
- "integrity": "sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==",
- "dev": true
- },
"collection-visit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@@ -55676,6 +54098,12 @@
"dev": true,
"requires": {}
},
+ "css-functions-list": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.1.tgz",
+ "integrity": "sha512-Nj5YcaGgBtuUmn1D7oHqPW0c9iui7xsTsj5lIX8ZgevdfhmjFfKB3r8moHJtNJnctnYXJyYX5I1pp90HM4TPgQ==",
+ "dev": true
+ },
"css-line-break": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
@@ -55943,15 +54371,6 @@
"is-git-repository": "^1.0.0"
}
},
- "currently-unhandled": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
- "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==",
- "dev": true,
- "requires": {
- "array-find-index": "^1.0.1"
- }
- },
"cytoscape": {
"version": "3.26.0",
"resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.26.0.tgz",
@@ -56825,36 +55244,12 @@
"csstype": "^3.0.2"
}
},
- "dom-serializer": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
- "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
- "dev": true,
- "requires": {
- "domelementtype": "^2.0.1",
- "entities": "^2.0.0"
- },
- "dependencies": {
- "domelementtype": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
- "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
- "dev": true
- }
- }
- },
"domain-browser": {
"version": "4.22.0",
"resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz",
"integrity": "sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==",
"dev": true
},
- "domelementtype": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
- "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
- "dev": true
- },
"domexception": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz",
@@ -56864,47 +55259,11 @@
"webidl-conversions": "^4.0.2"
}
},
- "domhandler": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz",
- "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==",
- "dev": true,
- "requires": {
- "domelementtype": "1"
- }
- },
"dompurify": {
"version": "2.4.7",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.7.tgz",
"integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ=="
},
- "domutils": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
- "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
- "dev": true,
- "requires": {
- "dom-serializer": "0",
- "domelementtype": "1"
- }
- },
- "dot-prop": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
- "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
- "dev": true,
- "requires": {
- "is-obj": "^2.0.0"
- },
- "dependencies": {
- "is-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
- "dev": true
- }
- }
- },
"dotenv": {
"version": "16.3.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
@@ -57758,9 +56117,9 @@
}
},
"eslint-config-prettier": {
- "version": "8.10.0",
- "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz",
- "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz",
+ "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==",
"dev": true,
"requires": {}
},
@@ -58435,15 +56794,6 @@
}
}
},
- "execall": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/execall/-/execall-1.0.0.tgz",
- "integrity": "sha512-/J0Q8CvOvlAdpvhfkD/WnTQ4H1eU0exze2nFGPj/RSC7jpQ0NkKe2r28T5eMkhEEs+fzepMZNy1kVRKNlC04nQ==",
- "dev": true,
- "requires": {
- "clone-regexp": "^1.0.0"
- }
- },
"exif-js": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/exif-js/-/exif-js-2.3.0.tgz",
@@ -59331,6 +57681,15 @@
"inquirer": "^7.3.3",
"license-checker": "^25.0.1",
"ora": "^4.1.1"
+ },
+ "dependencies": {
+ "eslint-config-prettier": {
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz",
+ "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==",
+ "dev": true,
+ "requires": {}
+ }
}
},
"gensync": {
@@ -59373,12 +57732,6 @@
"integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==",
"dev": true
},
- "get-stdin": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
- "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
- "dev": true
- },
"get-stream": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
@@ -59543,15 +57896,6 @@
"integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==",
"dev": true
},
- "gonzales-pe": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz",
- "integrity": "sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==",
- "dev": true,
- "requires": {
- "minimist": "^1.2.5"
- }
- },
"gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
@@ -59626,6 +57970,12 @@
"har-schema": "^2.0.0"
}
},
+ "hard-rejection": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz",
+ "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==",
+ "dev": true
+ },
"harmony-reflect": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/harmony-reflect/-/harmony-reflect-1.6.2.tgz",
@@ -59949,9 +58299,9 @@
}
},
"html-tags": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz",
- "integrity": "sha512-+Il6N8cCo2wB/Vd3gqy/8TZhTD3QvcVeQLCnZiGkGCH3JP28IgGAY41giccp2W4R3jfyJPAP318FQTa1yU7K7g==",
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz",
+ "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==",
"dev": true
},
"html2canvas": {
@@ -59963,39 +58313,6 @@
"text-segmentation": "^1.0.3"
}
},
- "htmlparser2": {
- "version": "3.10.1",
- "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
- "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==",
- "dev": true,
- "requires": {
- "domelementtype": "^1.3.1",
- "domhandler": "^2.3.0",
- "domutils": "^1.5.1",
- "entities": "^1.1.1",
- "inherits": "^2.0.1",
- "readable-stream": "^3.1.1"
- },
- "dependencies": {
- "entities": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
- "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
- "dev": true
- },
- "readable-stream": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
- "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
- "dev": true,
- "requires": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- }
- }
- }
- },
"http-cache-semantics": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
@@ -60234,9 +58551,9 @@
}
},
"import-lazy": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz",
- "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz",
+ "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==",
"dev": true
},
"import-local": {
@@ -60314,12 +58631,6 @@
"integrity": "sha512-BYqTHXTGUIvg7t1r4sJNKcbDZkL92nkXA8YtRpbjFHRHGDL/NtUeiBJMeE60kIFN/Mg8ESaWQvftaYMGJzQZCQ==",
"dev": true
},
- "indexes-of": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz",
- "integrity": "sha512-bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA==",
- "dev": true
- },
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -60482,12 +58793,6 @@
"hasown": "^2.0.0"
}
},
- "is-alphanumeric": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz",
- "integrity": "sha512-ZmRL7++ZkcMOfDuWZuMJyIVLr2keE1o/DeNWh1EmgqGhUcV+9BIVsx0BcSBOHTZqzjs4+dISzr2KAeBEWGgXeA==",
- "dev": true
- },
"is-arguments": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
@@ -60825,12 +59130,6 @@
"has-tostringtag": "^1.0.0"
}
},
- "is-supported-regexp-flag": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.1.tgz",
- "integrity": "sha512-3vcJecUUrpgCqc/ca0aWeNu64UGgxcvO60K/Fkr1N6RSvfGCTU60UKN68JDmKokgba0rFFJs12EnzOQa14ubKQ==",
- "dev": true
- },
"is-symbol": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
@@ -60896,24 +59195,12 @@
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true
},
- "is-whitespace-character": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz",
- "integrity": "sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==",
- "dev": true
- },
"is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
"integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
"dev": true
},
- "is-word-character": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz",
- "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==",
- "dev": true
- },
"is-wsl": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
@@ -61783,9 +60070,9 @@
"peer": true
},
"known-css-properties": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.11.0.tgz",
- "integrity": "sha512-bEZlJzXo5V/ApNNa5z375mJC6Nrz4vG43UgcSCrg2OHC+yuB6j0iDSrY7RQ/+PRofFB03wNIIt9iXIVLr4wc7w==",
+ "version": "0.29.0",
+ "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.29.0.tgz",
+ "integrity": "sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==",
"dev": true
},
"language-subtag-registry": {
@@ -62562,30 +60849,6 @@
}
}
},
- "load-json-file": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
- "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^4.0.0",
- "pify": "^3.0.0",
- "strip-bom": "^3.0.0"
- },
- "dependencies": {
- "parse-json": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==",
- "dev": true,
- "requires": {
- "error-ex": "^1.3.1",
- "json-parse-better-errors": "^1.0.1"
- }
- }
- }
- },
"loader-runner": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",
@@ -62720,6 +60983,12 @@
"resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
"integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ=="
},
+ "lodash.truncate": {
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz",
+ "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==",
+ "dev": true
+ },
"lodash.uniq": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
@@ -62995,16 +61264,6 @@
"js-tokens": "^3.0.0 || ^4.0.0"
}
},
- "loud-rejection": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
- "integrity": "sha512-RPNliZOFkqFumDhvYqOaNY4Uz9oJM2K9tC6JWsJJsNdhuONW4LQHRBpb0qf4pJApVffI5N39SwzWZJuEhfd7eQ==",
- "dev": true,
- "requires": {
- "currently-unhandled": "^0.4.1",
- "signal-exit": "^3.0.0"
- }
- },
"lowercase-keys": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
@@ -63078,12 +61337,6 @@
"object-visit": "^1.0.0"
}
},
- "markdown-escapes": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz",
- "integrity": "sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==",
- "dev": true
- },
"markdown-table": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz",
@@ -63126,41 +61379,6 @@
"safe-buffer": "^5.1.2"
}
},
- "mdast-util-compact": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.4.tgz",
- "integrity": "sha512-3YDMQHI5vRiS2uygEFYaqckibpJtKq5Sj2c8JioeOQBU6INpKbdWzfyLqFFnDwEcEnRFIdMsguzs5pC1Jp4Isg==",
- "dev": true,
- "requires": {
- "unist-util-visit": "^1.1.0"
- },
- "dependencies": {
- "unist-util-is": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz",
- "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==",
- "dev": true
- },
- "unist-util-visit": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz",
- "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==",
- "dev": true,
- "requires": {
- "unist-util-visit-parents": "^2.0.0"
- }
- },
- "unist-util-visit-parents": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz",
- "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==",
- "dev": true,
- "requires": {
- "unist-util-is": "^3.0.0"
- }
- }
- }
- },
"mdast-util-definitions": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz",
@@ -63358,49 +61576,71 @@
"dev": true
},
"meow": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz",
- "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==",
+ "version": "10.1.5",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz",
+ "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==",
"dev": true,
"requires": {
- "camelcase-keys": "^4.0.0",
- "decamelize-keys": "^1.0.0",
- "loud-rejection": "^1.0.0",
- "minimist-options": "^3.0.1",
- "normalize-package-data": "^2.3.4",
- "read-pkg-up": "^3.0.0",
- "redent": "^2.0.0",
- "trim-newlines": "^2.0.0",
- "yargs-parser": "^10.0.0"
+ "@types/minimist": "^1.2.2",
+ "camelcase-keys": "^7.0.0",
+ "decamelize": "^5.0.0",
+ "decamelize-keys": "^1.1.0",
+ "hard-rejection": "^2.1.0",
+ "minimist-options": "4.1.0",
+ "normalize-package-data": "^3.0.2",
+ "read-pkg-up": "^8.0.0",
+ "redent": "^4.0.0",
+ "trim-newlines": "^4.0.2",
+ "type-fest": "^1.2.2",
+ "yargs-parser": "^20.2.9"
},
"dependencies": {
"camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==",
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
"dev": true
},
"camelcase-keys": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz",
- "integrity": "sha512-Ej37YKYbFUI8QiYlvj9YHb6/Z60dZyPJW0Cs8sFilMbd2lP0bw3ylAq9yJkK4lcTA2dID5fG8LjmJYbO7kWb7Q==",
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz",
+ "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==",
"dev": true,
"requires": {
- "camelcase": "^4.1.0",
- "map-obj": "^2.0.0",
- "quick-lru": "^1.0.0"
+ "camelcase": "^6.3.0",
+ "map-obj": "^4.1.0",
+ "quick-lru": "^5.1.1",
+ "type-fest": "^1.2.1"
}
},
- "map-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz",
- "integrity": "sha512-TzQSV2DiMYgoF5RycneKVUzIa9bQsj/B3tTgsE3dOGqlzHnGIDaC7XBE7grnA+8kZPnfqSGFe95VHc2oc0VFUQ==",
+ "decamelize": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz",
+ "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==",
"dev": true
},
+ "normalize-package-data": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
+ "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
+ "dev": true,
+ "requires": {
+ "hosted-git-info": "^4.0.1",
+ "is-core-module": "^2.5.0",
+ "semver": "^7.3.4",
+ "validate-npm-package-license": "^3.0.1"
+ }
+ },
"quick-lru": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz",
- "integrity": "sha512-tRS7sTgyxMXtLum8L65daJnHUhfDUgboRdcWW2bR9vBfrj2+O5HSMbQOJfJJjIVSPFqbBCF37FpwWXGitDc5tA==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
+ "dev": true
+ },
+ "type-fest": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
+ "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
"dev": true
}
}
@@ -64482,6 +62722,12 @@
"integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
"dev": true
},
+ "min-indent": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
+ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
+ "dev": true
+ },
"mini-css-extract-plugin": {
"version": "2.7.6",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz",
@@ -64559,13 +62805,14 @@
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="
},
"minimist-options": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz",
- "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz",
+ "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==",
"dev": true,
"requires": {
"arrify": "^1.0.1",
- "is-plain-obj": "^1.1.0"
+ "is-plain-obj": "^1.1.0",
+ "kind-of": "^6.0.3"
}
},
"minipass": {
@@ -65006,18 +63253,6 @@
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
- "normalize-range": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
- "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
- "dev": true
- },
- "normalize-selector": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz",
- "integrity": "sha512-dxvWdI8gw6eAvk9BlPffgEoGfM7AdijoCwOEJge3e3ulT2XLgmU7KvvxprOaCu05Q1uGRHmOhHe1r6emZoKyFw==",
- "dev": true
- },
"normalize-url": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
@@ -66899,12 +65134,6 @@
"integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==",
"peer": true
},
- "num2fraction": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz",
- "integrity": "sha512-Y1wZESM7VUThYY+4W+X4ySH2maqcA+p7UR+w8VWNWVAd6lwuXXWz/w/Cz43J/dI2I+PS6wD5N+bJUF+gjWvIqg==",
- "dev": true
- },
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
@@ -67557,12 +65786,6 @@
"integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
"dev": true
},
- "path-dirname": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
- "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==",
- "dev": true
- },
"path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
@@ -67916,264 +66139,6 @@
"dev": true,
"requires": {}
},
- "postcss-html": {
- "version": "0.36.0",
- "resolved": "https://registry.npmjs.org/postcss-html/-/postcss-html-0.36.0.tgz",
- "integrity": "sha512-HeiOxGcuwID0AFsNAL0ox3mW6MHH5cstWN1Z3Y+n6H+g12ih7LHdYxWwEA/QmrebctLjo79xz9ouK3MroHwOJw==",
- "dev": true,
- "requires": {
- "htmlparser2": "^3.10.0"
- }
- },
- "postcss-jsx": {
- "version": "0.36.4",
- "resolved": "https://registry.npmjs.org/postcss-jsx/-/postcss-jsx-0.36.4.tgz",
- "integrity": "sha512-jwO/7qWUvYuWYnpOb0+4bIIgJt7003pgU3P6nETBLaOyBXuTD55ho21xnals5nBrlpTIFodyd3/jBi6UO3dHvA==",
- "dev": true,
- "requires": {
- "@babel/core": ">=7.2.2"
- }
- },
- "postcss-less": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-3.1.4.tgz",
- "integrity": "sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA==",
- "dev": true,
- "requires": {
- "postcss": "^7.0.14"
- },
- "dependencies": {
- "picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "requires": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- }
- },
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- }
- }
- },
- "postcss-markdown": {
- "version": "0.36.0",
- "resolved": "https://registry.npmjs.org/postcss-markdown/-/postcss-markdown-0.36.0.tgz",
- "integrity": "sha512-rl7fs1r/LNSB2bWRhyZ+lM/0bwKv9fhl38/06gF6mKMo/NPnp55+K1dSTosSVjFZc0e1ppBlu+WT91ba0PMBfQ==",
- "dev": true,
- "requires": {
- "remark": "^10.0.1",
- "unist-util-find-all-after": "^1.0.2"
- },
- "dependencies": {
- "bail": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz",
- "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==",
- "dev": true
- },
- "ccount": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz",
- "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==",
- "dev": true
- },
- "character-entities": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz",
- "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==",
- "dev": true
- },
- "character-entities-legacy": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz",
- "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==",
- "dev": true
- },
- "character-reference-invalid": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz",
- "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==",
- "dev": true
- },
- "is-alphabetical": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz",
- "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==",
- "dev": true
- },
- "is-alphanumerical": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz",
- "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==",
- "dev": true,
- "requires": {
- "is-alphabetical": "^1.0.0",
- "is-decimal": "^1.0.0"
- }
- },
- "is-decimal": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz",
- "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==",
- "dev": true
- },
- "is-hexadecimal": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz",
- "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==",
- "dev": true
- },
- "longest-streak": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz",
- "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==",
- "dev": true
- },
- "markdown-table": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz",
- "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==",
- "dev": true
- },
- "parse-entities": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz",
- "integrity": "sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==",
- "dev": true,
- "requires": {
- "character-entities": "^1.0.0",
- "character-entities-legacy": "^1.0.0",
- "character-reference-invalid": "^1.0.0",
- "is-alphanumerical": "^1.0.0",
- "is-decimal": "^1.0.0",
- "is-hexadecimal": "^1.0.0"
- }
- },
- "remark": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/remark/-/remark-10.0.1.tgz",
- "integrity": "sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==",
- "dev": true,
- "requires": {
- "remark-parse": "^6.0.0",
- "remark-stringify": "^6.0.0",
- "unified": "^7.0.0"
- }
- },
- "remark-parse": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-6.0.3.tgz",
- "integrity": "sha512-QbDXWN4HfKTUC0hHa4teU463KclLAnwpn/FBn87j9cKYJWWawbiLgMfP2Q4XwhxxuuuOxHlw+pSN0OKuJwyVvg==",
- "dev": true,
- "requires": {
- "collapse-white-space": "^1.0.2",
- "is-alphabetical": "^1.0.0",
- "is-decimal": "^1.0.0",
- "is-whitespace-character": "^1.0.0",
- "is-word-character": "^1.0.0",
- "markdown-escapes": "^1.0.0",
- "parse-entities": "^1.1.0",
- "repeat-string": "^1.5.4",
- "state-toggle": "^1.0.0",
- "trim": "0.0.1",
- "trim-trailing-lines": "^1.0.0",
- "unherit": "^1.0.4",
- "unist-util-remove-position": "^1.0.0",
- "vfile-location": "^2.0.0",
- "xtend": "^4.0.1"
- }
- },
- "remark-stringify": {
- "version": "6.0.4",
- "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-6.0.4.tgz",
- "integrity": "sha512-eRWGdEPMVudijE/psbIDNcnJLRVx3xhfuEsTDGgH4GsFF91dVhw5nhmnBppafJ7+NWINW6C7ZwWbi30ImJzqWg==",
- "dev": true,
- "requires": {
- "ccount": "^1.0.0",
- "is-alphanumeric": "^1.0.0",
- "is-decimal": "^1.0.0",
- "is-whitespace-character": "^1.0.0",
- "longest-streak": "^2.0.1",
- "markdown-escapes": "^1.0.0",
- "markdown-table": "^1.1.0",
- "mdast-util-compact": "^1.0.0",
- "parse-entities": "^1.0.2",
- "repeat-string": "^1.5.4",
- "state-toggle": "^1.0.0",
- "stringify-entities": "^1.0.1",
- "unherit": "^1.0.4",
- "xtend": "^4.0.1"
- }
- },
- "trough": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz",
- "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==",
- "dev": true
- },
- "unified": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/unified/-/unified-7.1.0.tgz",
- "integrity": "sha512-lbk82UOIGuCEsZhPj8rNAkXSDXd6p0QLzIuSsCdxrqnqU56St4eyOB+AlXsVgVeRmetPTYydIuvFfpDIed8mqw==",
- "dev": true,
- "requires": {
- "@types/unist": "^2.0.0",
- "@types/vfile": "^3.0.0",
- "bail": "^1.0.0",
- "extend": "^3.0.0",
- "is-plain-obj": "^1.1.0",
- "trough": "^1.0.0",
- "vfile": "^3.0.0",
- "x-is-string": "^0.1.0"
- }
- },
- "unist-util-stringify-position": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz",
- "integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==",
- "dev": true
- },
- "vfile": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/vfile/-/vfile-3.0.1.tgz",
- "integrity": "sha512-y7Y3gH9BsUSdD4KzHsuMaCzRjglXN0W2EcMf0gpvu6+SbsGhMje7xDc8AEoeXy6mIwCKMI6BkjMsRjzQbhMEjQ==",
- "dev": true,
- "requires": {
- "is-buffer": "^2.0.0",
- "replace-ext": "1.0.0",
- "unist-util-stringify-position": "^1.0.0",
- "vfile-message": "^1.0.0"
- }
- },
- "vfile-message": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz",
- "integrity": "sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==",
- "dev": true,
- "requires": {
- "unist-util-stringify-position": "^1.1.1"
- }
- }
- }
- },
- "postcss-media-query-parser": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz",
- "integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==",
- "dev": true
- },
"postcss-merge-longhand": {
"version": "5.1.7",
"resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz",
@@ -68382,51 +66347,6 @@
"postcss-value-parser": "^4.2.0"
}
},
- "postcss-reporter": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-6.0.1.tgz",
- "integrity": "sha512-LpmQjfRWyabc+fRygxZjpRxfhRf9u/fdlKf4VHG4TSPbV2XNsuISzYW1KL+1aQzx53CAppa1bKG4APIB/DOXXw==",
- "dev": true,
- "requires": {
- "chalk": "^2.4.1",
- "lodash": "^4.17.11",
- "log-symbols": "^2.2.0",
- "postcss": "^7.0.7"
- },
- "dependencies": {
- "log-symbols": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
- "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
- "dev": true,
- "requires": {
- "chalk": "^2.0.1"
- }
- },
- "picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "requires": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- }
- },
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- }
- }
- },
"postcss-resolve-nested-selector": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz",
@@ -68434,104 +66354,11 @@
"dev": true
},
"postcss-safe-parser": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.2.tgz",
- "integrity": "sha512-Uw6ekxSWNLCPesSv/cmqf2bY/77z11O7jZGPax3ycZMFU/oi2DMH9i89AdHc1tRwFg/arFoEwX0IS3LCUxJh1g==",
- "dev": true,
- "requires": {
- "postcss": "^7.0.26"
- },
- "dependencies": {
- "picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "requires": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- }
- },
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- }
- }
- },
- "postcss-sass": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.3.5.tgz",
- "integrity": "sha512-B5z2Kob4xBxFjcufFnhQ2HqJQ2y/Zs/ic5EZbCywCkxKd756Q40cIQ/veRDwSrw1BF6+4wUgmpm0sBASqVi65A==",
- "dev": true,
- "requires": {
- "gonzales-pe": "^4.2.3",
- "postcss": "^7.0.1"
- },
- "dependencies": {
- "picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "requires": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- }
- },
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- }
- }
- },
- "postcss-scss": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.1.1.tgz",
- "integrity": "sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz",
+ "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==",
"dev": true,
- "requires": {
- "postcss": "^7.0.6"
- },
- "dependencies": {
- "picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "requires": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- }
- },
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- }
- }
+ "requires": {}
},
"postcss-selector-parser": {
"version": "6.0.13",
@@ -68553,13 +66380,6 @@
"svgo": "^2.7.0"
}
},
- "postcss-syntax": {
- "version": "0.36.2",
- "resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz",
- "integrity": "sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==",
- "dev": true,
- "requires": {}
- },
"postcss-unique-selectors": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz",
@@ -68602,9 +66422,9 @@
"dev": true
},
"prettier": {
- "version": "1.19.1",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
- "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
+ "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
"dev": true
},
"pretty-format": {
@@ -69721,77 +67541,45 @@
}
},
"read-pkg-up": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz",
- "integrity": "sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==",
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz",
+ "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==",
"dev": true,
"requires": {
- "find-up": "^2.0.0",
- "read-pkg": "^3.0.0"
+ "find-up": "^5.0.0",
+ "read-pkg": "^6.0.0",
+ "type-fest": "^1.0.1"
},
"dependencies": {
- "find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==",
- "dev": true,
- "requires": {
- "locate-path": "^2.0.0"
- }
- },
- "locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==",
- "dev": true,
- "requires": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
- }
- },
- "p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "normalize-package-data": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
+ "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
"dev": true,
"requires": {
- "p-try": "^1.0.0"
+ "hosted-git-info": "^4.0.1",
+ "is-core-module": "^2.5.0",
+ "semver": "^7.3.4",
+ "validate-npm-package-license": "^3.0.1"
}
},
- "p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==",
+ "read-pkg": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz",
+ "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==",
"dev": true,
"requires": {
- "p-limit": "^1.1.0"
+ "@types/normalize-package-data": "^2.4.0",
+ "normalize-package-data": "^3.0.2",
+ "parse-json": "^5.2.0",
+ "type-fest": "^1.0.1"
}
},
- "p-try": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==",
+ "type-fest": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
+ "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
"dev": true
- },
- "path-type": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
- "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
- "dev": true,
- "requires": {
- "pify": "^3.0.0"
- }
- },
- "read-pkg": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
- "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==",
- "dev": true,
- "requires": {
- "load-json-file": "^4.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^3.0.0"
- }
}
}
},
@@ -69883,13 +67671,21 @@
}
},
"redent": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
- "integrity": "sha512-XNwrTx77JQCEMXTeb8movBKuK75MgH0RZkujNuDKCezemx/voapl9i2gCSi8WWm8+ox5ycJi1gxF22fR7c0Ciw==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz",
+ "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==",
"dev": true,
"requires": {
- "indent-string": "^3.0.0",
- "strip-indent": "^2.0.0"
+ "indent-string": "^5.0.0",
+ "strip-indent": "^4.0.0"
+ },
+ "dependencies": {
+ "indent-string": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
+ "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
+ "dev": true
+ }
}
},
"redux": {
@@ -70124,12 +67920,6 @@
"integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==",
"dev": true
},
- "replace-ext": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
- "integrity": "sha512-vuNYXC7gG7IeVNBC1xUllqCcZKRbJoSPOBhnTEcAIiKCsbuef6zO3F0Rve3isPMMoNoQRWjQwbAgAjHUHniyEA==",
- "dev": true
- },
"request": {
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
@@ -71345,12 +69135,6 @@
}
}
},
- "specificity": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz",
- "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==",
- "dev": true
- },
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
@@ -71454,12 +69238,6 @@
"integrity": "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==",
"dev": true
},
- "state-toggle": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz",
- "integrity": "sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==",
- "dev": true
- },
"static-extend": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
@@ -71500,791 +69278,371 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
"integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==",
- "dev": true
- },
- "stream-browserify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz",
- "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==",
- "dev": true,
- "requires": {
- "inherits": "~2.0.4",
- "readable-stream": "^3.5.0"
- },
- "dependencies": {
- "readable-stream": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
- "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
- "dev": true,
- "requires": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- }
- }
- }
- },
- "stream-http": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz",
- "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==",
- "dev": true,
- "requires": {
- "builtin-status-codes": "^3.0.0",
- "inherits": "^2.0.4",
- "readable-stream": "^3.6.0",
- "xtend": "^4.0.2"
- },
- "dependencies": {
- "readable-stream": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
- "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
- "dev": true,
- "requires": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- }
- }
- }
- },
- "string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "requires": {
- "safe-buffer": "~5.2.0"
- }
- },
- "string-argv": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.0.2.tgz",
- "integrity": "sha512-p6/Mqq0utTQWUeGMi/m0uBtlLZEwXSY3+mXzeRRqw7fz5ezUb28Wr0R99NlfbWaMmL/jCyT9be4jpn7Yz8IO8w==",
- "dev": true
- },
- "string-natural-compare": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz",
- "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==",
- "dev": true
- },
- "string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "dependencies": {
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
- }
- }
- },
- "string.prototype.matchall": {
- "version": "4.0.10",
- "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz",
- "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1",
- "get-intrinsic": "^1.2.1",
- "has-symbols": "^1.0.3",
- "internal-slot": "^1.0.5",
- "regexp.prototype.flags": "^1.5.0",
- "set-function-name": "^2.0.0",
- "side-channel": "^1.0.4"
- }
- },
- "string.prototype.trim": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz",
- "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1"
- }
- },
- "string.prototype.trimend": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz",
- "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1"
- }
- },
- "string.prototype.trimstart": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz",
- "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.2.0",
- "es-abstract": "^1.22.1"
- }
- },
- "stringify-entities": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz",
- "integrity": "sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A==",
- "dev": true,
- "requires": {
- "character-entities-html4": "^1.0.0",
- "character-entities-legacy": "^1.0.0",
- "is-alphanumerical": "^1.0.0",
- "is-hexadecimal": "^1.0.0"
- },
- "dependencies": {
- "character-entities-legacy": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz",
- "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==",
- "dev": true
- },
- "is-alphabetical": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz",
- "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==",
- "dev": true
- },
- "is-alphanumerical": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz",
- "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==",
- "dev": true,
- "requires": {
- "is-alphabetical": "^1.0.0",
- "is-decimal": "^1.0.0"
- }
- },
- "is-decimal": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz",
- "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==",
- "dev": true
- },
- "is-hexadecimal": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz",
- "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==",
- "dev": true
- }
- }
- },
- "stringify-object": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz",
- "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==",
- "dev": true,
- "requires": {
- "get-own-enumerable-property-symbols": "^3.0.0",
- "is-obj": "^1.0.1",
- "is-regexp": "^1.0.0"
- }
- },
- "strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "requires": {
- "ansi-regex": "^5.0.1"
- }
- },
- "strip-bom": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
- "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
- "dev": true
- },
- "strip-eof": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
- "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==",
- "dev": true
- },
- "strip-final-newline": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
- "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="
- },
- "strip-indent": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
- "integrity": "sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA==",
- "dev": true
- },
- "strip-json-comments": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
- "dev": true
- },
- "strnum": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz",
- "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA=="
- },
- "style-loader": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.3.0.tgz",
- "integrity": "sha512-V7TCORko8rs9rIqkSrlMfkqA63DfoGBBJmK1kKGCcSi+BWb4cqz0SRsnp4l6rU5iwOEd0/2ePv68SV22VXon4Q==",
- "dev": true,
- "requires": {
- "loader-utils": "^2.0.0",
- "schema-utils": "^2.7.0"
- }
- },
- "style-search": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz",
- "integrity": "sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==",
- "dev": true
- },
- "stylehacks": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz",
- "integrity": "sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==",
- "dev": true,
- "requires": {
- "browserslist": "^4.21.4",
- "postcss-selector-parser": "^6.0.4"
- }
- },
- "stylelint": {
- "version": "9.10.1",
- "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-9.10.1.tgz",
- "integrity": "sha512-9UiHxZhOAHEgeQ7oLGwrwoDR8vclBKlSX7r4fH0iuu0SfPwFaLkb1c7Q2j1cqg9P7IDXeAV2TvQML/fRQzGBBQ==",
- "dev": true,
- "requires": {
- "autoprefixer": "^9.0.0",
- "balanced-match": "^1.0.0",
- "chalk": "^2.4.1",
- "cosmiconfig": "^5.0.0",
- "debug": "^4.0.0",
- "execall": "^1.0.0",
- "file-entry-cache": "^4.0.0",
- "get-stdin": "^6.0.0",
- "global-modules": "^2.0.0",
- "globby": "^9.0.0",
- "globjoin": "^0.1.4",
- "html-tags": "^2.0.0",
- "ignore": "^5.0.4",
- "import-lazy": "^3.1.0",
- "imurmurhash": "^0.1.4",
- "known-css-properties": "^0.11.0",
- "leven": "^2.1.0",
- "lodash": "^4.17.4",
- "log-symbols": "^2.0.0",
- "mathml-tag-names": "^2.0.1",
- "meow": "^5.0.0",
- "micromatch": "^3.1.10",
- "normalize-selector": "^0.2.0",
- "pify": "^4.0.0",
- "postcss": "^7.0.13",
- "postcss-html": "^0.36.0",
- "postcss-jsx": "^0.36.0",
- "postcss-less": "^3.1.0",
- "postcss-markdown": "^0.36.0",
- "postcss-media-query-parser": "^0.2.3",
- "postcss-reporter": "^6.0.0",
- "postcss-resolve-nested-selector": "^0.1.1",
- "postcss-safe-parser": "^4.0.0",
- "postcss-sass": "^0.3.5",
- "postcss-scss": "^2.0.0",
- "postcss-selector-parser": "^3.1.0",
- "postcss-syntax": "^0.36.2",
- "postcss-value-parser": "^3.3.0",
- "resolve-from": "^4.0.0",
- "signal-exit": "^3.0.2",
- "slash": "^2.0.0",
- "specificity": "^0.4.1",
- "string-width": "^3.0.0",
- "style-search": "^0.1.0",
- "sugarss": "^2.0.0",
- "svg-tags": "^1.0.0",
- "table": "^5.0.0"
- },
- "dependencies": {
- "@nodelib/fs.stat": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
- "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
- "dev": true
- },
- "ansi-regex": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
- "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
- "dev": true
- },
- "argparse": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
- "dev": true,
- "requires": {
- "sprintf-js": "~1.0.2"
- }
- },
- "arr-diff": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
- "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==",
- "dev": true
- },
- "array-union": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
- "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==",
- "dev": true,
- "requires": {
- "array-uniq": "^1.0.1"
- }
- },
- "braces": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
- "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
- "dev": true,
- "requires": {
- "arr-flatten": "^1.1.0",
- "array-unique": "^0.3.2",
- "extend-shallow": "^2.0.1",
- "fill-range": "^4.0.0",
- "isobject": "^3.0.1",
- "repeat-element": "^1.1.2",
- "snapdragon": "^0.8.1",
- "snapdragon-node": "^2.0.1",
- "split-string": "^3.0.2",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==",
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- },
- "is-extendable": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
- "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==",
- "dev": true
- }
- }
- },
- "cosmiconfig": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
- "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==",
- "dev": true,
- "requires": {
- "import-fresh": "^2.0.0",
- "is-directory": "^0.3.1",
- "js-yaml": "^3.13.1",
- "parse-json": "^4.0.0"
- }
- },
- "dir-glob": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
- "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==",
- "dev": true,
- "requires": {
- "path-type": "^3.0.0"
- }
- },
- "emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
- "extend-shallow": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
- "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==",
- "dev": true,
- "requires": {
- "assign-symbols": "^1.0.0",
- "is-extendable": "^1.0.1"
- }
- },
- "fast-glob": {
- "version": "2.2.7",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
- "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==",
- "dev": true,
- "requires": {
- "@mrmlnc/readdir-enhanced": "^2.2.1",
- "@nodelib/fs.stat": "^1.1.2",
- "glob-parent": "^3.1.0",
- "is-glob": "^4.0.0",
- "merge2": "^1.2.3",
- "micromatch": "^3.1.10"
- }
- },
- "file-entry-cache": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-4.0.0.tgz",
- "integrity": "sha512-AVSwsnbV8vH/UVbvgEhf3saVQXORNv0ZzSkvkhQIaia5Tia+JhGTaa/ePUSVoPHQyGayQNmYfkzFi3WZV5zcpA==",
- "dev": true,
- "requires": {
- "flat-cache": "^2.0.1"
- }
- },
- "fill-range": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
- "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==",
- "dev": true,
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1",
- "to-regex-range": "^2.1.0"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==",
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- },
- "is-extendable": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
- "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==",
- "dev": true
- }
- }
- },
- "flat-cache": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
- "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
- "dev": true,
- "requires": {
- "flatted": "^2.0.0",
- "rimraf": "2.6.3",
- "write": "1.0.3"
- }
- },
- "flatted": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
- "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
- "dev": true
- },
- "glob-parent": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
- "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==",
- "dev": true,
- "requires": {
- "is-glob": "^3.1.0",
- "path-dirname": "^1.0.0"
- },
- "dependencies": {
- "is-glob": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
- "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==",
- "dev": true,
- "requires": {
- "is-extglob": "^2.1.0"
- }
- }
- }
- },
- "globby": {
- "version": "9.2.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz",
- "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==",
- "dev": true,
- "requires": {
- "@types/glob": "^7.1.1",
- "array-union": "^1.0.2",
- "dir-glob": "^2.2.2",
- "fast-glob": "^2.2.6",
- "glob": "^7.1.3",
- "ignore": "^4.0.3",
- "pify": "^4.0.1",
- "slash": "^2.0.0"
- },
- "dependencies": {
- "ignore": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
- "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
- "dev": true
- }
- }
- },
- "import-fresh": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
- "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==",
- "dev": true,
- "requires": {
- "caller-path": "^2.0.0",
- "resolve-from": "^3.0.0"
- },
- "dependencies": {
- "resolve-from": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
- "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==",
- "dev": true
- }
- }
- },
- "is-buffer": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
- "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==",
- "dev": true
- },
- "is-number": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
- "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==",
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==",
- "dev": true,
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "js-yaml": {
- "version": "3.14.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
- "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
- "dev": true,
- "requires": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
- }
- },
- "leven": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz",
- "integrity": "sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==",
- "dev": true
- },
- "log-symbols": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
- "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
- "dev": true,
- "requires": {
- "chalk": "^2.0.1"
- }
- },
- "micromatch": {
- "version": "3.1.10",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
- "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+ "dev": true
+ },
+ "stream-browserify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz",
+ "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==",
+ "dev": true,
+ "requires": {
+ "inherits": "~2.0.4",
+ "readable-stream": "^3.5.0"
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dev": true,
"requires": {
- "arr-diff": "^4.0.0",
- "array-unique": "^0.3.2",
- "braces": "^2.3.1",
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "extglob": "^2.0.4",
- "fragment-cache": "^0.2.1",
- "kind-of": "^6.0.2",
- "nanomatch": "^1.2.9",
- "object.pick": "^1.3.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.2"
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
}
- },
- "parse-json": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==",
+ }
+ }
+ },
+ "stream-http": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz",
+ "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==",
+ "dev": true,
+ "requires": {
+ "builtin-status-codes": "^3.0.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.6.0",
+ "xtend": "^4.0.2"
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dev": true,
"requires": {
- "error-ex": "^1.3.1",
- "json-parse-better-errors": "^1.0.1"
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
}
+ }
+ }
+ },
+ "string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "requires": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "string-argv": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.0.2.tgz",
+ "integrity": "sha512-p6/Mqq0utTQWUeGMi/m0uBtlLZEwXSY3+mXzeRRqw7fz5ezUb28Wr0R99NlfbWaMmL/jCyT9be4jpn7Yz8IO8w==",
+ "dev": true
+ },
+ "string-natural-compare": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz",
+ "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "dependencies": {
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+ }
+ }
+ },
+ "string.prototype.matchall": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz",
+ "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "get-intrinsic": "^1.2.1",
+ "has-symbols": "^1.0.3",
+ "internal-slot": "^1.0.5",
+ "regexp.prototype.flags": "^1.5.0",
+ "set-function-name": "^2.0.0",
+ "side-channel": "^1.0.4"
+ }
+ },
+ "string.prototype.trim": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz",
+ "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1"
+ }
+ },
+ "string.prototype.trimend": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz",
+ "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1"
+ }
+ },
+ "string.prototype.trimstart": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz",
+ "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1"
+ }
+ },
+ "stringify-object": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz",
+ "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==",
+ "dev": true,
+ "requires": {
+ "get-own-enumerable-property-symbols": "^3.0.0",
+ "is-obj": "^1.0.1",
+ "is-regexp": "^1.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ },
+ "strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
+ "dev": true
+ },
+ "strip-eof": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
+ "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==",
+ "dev": true
+ },
+ "strip-final-newline": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
+ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="
+ },
+ "strip-indent": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz",
+ "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==",
+ "dev": true,
+ "requires": {
+ "min-indent": "^1.0.1"
+ }
+ },
+ "strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "dev": true
+ },
+ "strnum": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz",
+ "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA=="
+ },
+ "style-loader": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.3.0.tgz",
+ "integrity": "sha512-V7TCORko8rs9rIqkSrlMfkqA63DfoGBBJmK1kKGCcSi+BWb4cqz0SRsnp4l6rU5iwOEd0/2ePv68SV22VXon4Q==",
+ "dev": true,
+ "requires": {
+ "loader-utils": "^2.0.0",
+ "schema-utils": "^2.7.0"
+ }
+ },
+ "style-search": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz",
+ "integrity": "sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==",
+ "dev": true
+ },
+ "stylehacks": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz",
+ "integrity": "sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.21.4",
+ "postcss-selector-parser": "^6.0.4"
+ }
+ },
+ "stylelint": {
+ "version": "15.11.0",
+ "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.11.0.tgz",
+ "integrity": "sha512-78O4c6IswZ9TzpcIiQJIN49K3qNoXTM8zEJzhaTE/xRTCZswaovSEVIa/uwbOltZrk16X4jAxjaOhzz/hTm1Kw==",
+ "dev": true,
+ "requires": {
+ "@csstools/css-parser-algorithms": "^2.3.1",
+ "@csstools/css-tokenizer": "^2.2.0",
+ "@csstools/media-query-list-parser": "^2.1.4",
+ "@csstools/selector-specificity": "^3.0.0",
+ "balanced-match": "^2.0.0",
+ "colord": "^2.9.3",
+ "cosmiconfig": "^8.2.0",
+ "css-functions-list": "^3.2.1",
+ "css-tree": "^2.3.1",
+ "debug": "^4.3.4",
+ "fast-glob": "^3.3.1",
+ "fastest-levenshtein": "^1.0.16",
+ "file-entry-cache": "^7.0.0",
+ "global-modules": "^2.0.0",
+ "globby": "^11.1.0",
+ "globjoin": "^0.1.4",
+ "html-tags": "^3.3.1",
+ "ignore": "^5.2.4",
+ "import-lazy": "^4.0.0",
+ "imurmurhash": "^0.1.4",
+ "is-plain-object": "^5.0.0",
+ "known-css-properties": "^0.29.0",
+ "mathml-tag-names": "^2.1.3",
+ "meow": "^10.1.5",
+ "micromatch": "^4.0.5",
+ "normalize-path": "^3.0.0",
+ "picocolors": "^1.0.0",
+ "postcss": "^8.4.28",
+ "postcss-resolve-nested-selector": "^0.1.1",
+ "postcss-safe-parser": "^6.0.0",
+ "postcss-selector-parser": "^6.0.13",
+ "postcss-value-parser": "^4.2.0",
+ "resolve-from": "^5.0.0",
+ "string-width": "^4.2.3",
+ "strip-ansi": "^6.0.1",
+ "style-search": "^0.1.0",
+ "supports-hyperlinks": "^3.0.0",
+ "svg-tags": "^1.0.0",
+ "table": "^6.8.1",
+ "write-file-atomic": "^5.0.1"
+ },
+ "dependencies": {
+ "balanced-match": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz",
+ "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==",
+ "dev": true
},
- "path-type": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
- "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+ "cosmiconfig": {
+ "version": "8.3.6",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz",
+ "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==",
"dev": true,
"requires": {
- "pify": "^3.0.0"
- },
- "dependencies": {
- "pify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
- "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==",
- "dev": true
- }
+ "import-fresh": "^3.3.0",
+ "js-yaml": "^4.1.0",
+ "parse-json": "^5.2.0",
+ "path-type": "^4.0.0"
}
},
- "picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "pify": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
- "dev": true
- },
- "postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
+ "css-tree": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
+ "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
"dev": true,
"requires": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
+ "mdn-data": "2.0.30",
+ "source-map-js": "^1.0.1"
}
},
- "postcss-selector-parser": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz",
- "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==",
+ "file-entry-cache": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-7.0.1.tgz",
+ "integrity": "sha512-uLfFktPmRetVCbHe5UPuekWrQ6hENufnA46qEGbfACkK5drjTTdQYUragRgMjHldcbYG+nslUerqMPjbBSHXjQ==",
"dev": true,
"requires": {
- "dot-prop": "^5.2.0",
- "indexes-of": "^1.0.1",
- "uniq": "^1.0.1"
+ "flat-cache": "^3.1.1"
}
},
- "postcss-value-parser": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
- "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
- "rimraf": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
- "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
- "dev": true,
- "requires": {
- "glob": "^7.1.3"
- }
+ "is-plain-object": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
+ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
+ "dev": true
},
- "slash": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
- "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
+ "mdn-data": {
+ "version": "2.0.30",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
+ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
"dev": true
},
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true
},
- "sprintf-js": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
+ "signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
"dev": true
},
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
+ "has-flag": "^4.0.0"
}
},
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "supports-hyperlinks": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz",
+ "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==",
"dev": true,
"requires": {
- "ansi-regex": "^4.1.0"
+ "has-flag": "^4.0.0",
+ "supports-color": "^7.0.0"
}
},
- "to-regex-range": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
- "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==",
+ "write-file-atomic": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
+ "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
"dev": true,
"requires": {
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1"
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^4.0.1"
}
}
}
},
- "stylelint-config-prettier": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/stylelint-config-prettier/-/stylelint-config-prettier-4.0.0.tgz",
- "integrity": "sha512-cwh3QbBC2+3zBeMvuxFjT8XsbSdyoyELOY9BZqMuvphUKEQ+srkPWoN60FlvRwLB014TOke4Y12KvTtfKnaHhg==",
- "dev": true,
- "requires": {}
- },
- "stylelint-config-recommended": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-2.2.0.tgz",
- "integrity": "sha512-bZ+d4RiNEfmoR74KZtCKmsABdBJr4iXRiCso+6LtMJPw5rd/KnxUWTxht7TbafrTJK1YRjNgnN0iVZaJfc3xJA==",
- "dev": true,
- "requires": {}
- },
- "stylelint-config-standard": {
- "version": "18.3.0",
- "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-18.3.0.tgz",
- "integrity": "sha512-Tdc/TFeddjjy64LvjPau9SsfVRexmTFqUhnMBrzz07J4p2dVQtmpncRF/o8yZn8ugA3Ut43E6o1GtjX80TFytw==",
- "dev": true,
- "requires": {
- "stylelint-config-recommended": "^2.2.0"
- }
- },
"stylis": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",
@@ -72296,39 +69654,6 @@
"integrity": "sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==",
"peer": true
},
- "sugarss": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-2.0.0.tgz",
- "integrity": "sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ==",
- "dev": true,
- "requires": {
- "postcss": "^7.0.2"
- },
- "dependencies": {
- "picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==",
- "dev": true
- },
- "postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dev": true,
- "requires": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- }
- },
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- }
- }
- },
"sumchecker": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
@@ -72431,70 +69756,69 @@
"dev": true
},
"table": {
- "version": "5.4.6",
- "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
- "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
+ "version": "6.8.1",
+ "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz",
+ "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==",
"dev": true,
"requires": {
- "ajv": "^6.10.2",
- "lodash": "^4.17.14",
- "slice-ansi": "^2.1.0",
- "string-width": "^3.0.0"
+ "ajv": "^8.0.1",
+ "lodash.truncate": "^4.4.2",
+ "slice-ansi": "^4.0.0",
+ "string-width": "^4.2.3",
+ "strip-ansi": "^6.0.1"
},
"dependencies": {
- "ansi-regex": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
- "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
- "dev": true
- },
- "astral-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
- "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
- "dev": true
- },
- "emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==",
- "dev": true
+ "ajv": {
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
+ "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
},
- "slice-ansi": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
- "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
- "ansi-styles": "^3.2.0",
- "astral-regex": "^1.0.0",
- "is-fullwidth-code-point": "^2.0.0"
+ "color-convert": "^2.0.1"
}
},
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
+ "color-name": "~1.1.4"
}
},
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "slice-ansi": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
+ "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
"dev": true,
"requires": {
- "ansi-regex": "^4.1.0"
+ "ansi-styles": "^4.0.0",
+ "astral-regex": "^2.0.0",
+ "is-fullwidth-code-point": "^3.0.0"
}
}
}
@@ -72974,22 +70298,10 @@
"integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==",
"dev": true
},
- "trim": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz",
- "integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==",
- "dev": true
- },
"trim-newlines": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz",
- "integrity": "sha512-MTBWv3jhVjTU7XR3IQHllbiJs8sc75a80OEhB6or/q7pLTWgQ0bMGQXXYQSrSuXe6WiKWDZ5txXY5P59a/coVA==",
- "dev": true
- },
- "trim-trailing-lines": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz",
- "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.1.1.tgz",
+ "integrity": "sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==",
"dev": true
},
"trough": {
@@ -73369,16 +70681,6 @@
"resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz",
"integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA=="
},
- "unherit": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz",
- "integrity": "sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==",
- "dev": true,
- "requires": {
- "inherits": "^2.0.0",
- "xtend": "^4.0.0"
- }
- },
"unicode-canonical-property-names-ecmascript": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
@@ -73455,29 +70757,6 @@
}
}
},
- "uniq": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz",
- "integrity": "sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==",
- "dev": true
- },
- "unist-util-find-all-after": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-1.0.5.tgz",
- "integrity": "sha512-lWgIc3rrTMTlK1Y0hEuL+k+ApzFk78h+lsaa2gHf63Gp5Ww+mt11huDniuaoq1H+XMK2lIIjjPkncxXcDp3QDw==",
- "dev": true,
- "requires": {
- "unist-util-is": "^3.0.0"
- },
- "dependencies": {
- "unist-util-is": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz",
- "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==",
- "dev": true
- }
- }
- },
"unist-util-is": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz",
@@ -73486,41 +70765,6 @@
"@types/unist": "^2.0.0"
}
},
- "unist-util-remove-position": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz",
- "integrity": "sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==",
- "dev": true,
- "requires": {
- "unist-util-visit": "^1.1.0"
- },
- "dependencies": {
- "unist-util-is": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz",
- "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==",
- "dev": true
- },
- "unist-util-visit": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz",
- "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==",
- "dev": true,
- "requires": {
- "unist-util-visit-parents": "^2.0.0"
- }
- },
- "unist-util-visit-parents": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz",
- "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==",
- "dev": true,
- "requires": {
- "unist-util-is": "^3.0.0"
- }
- }
- }
- },
"unist-util-stringify-position": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz",
@@ -73868,12 +71112,6 @@
"vfile-message": "^3.0.0"
}
},
- "vfile-location": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz",
- "integrity": "sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==",
- "dev": true
- },
"vfile-message": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz",
@@ -74548,15 +71786,6 @@
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
- "write": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
- "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
- "dev": true,
- "requires": {
- "mkdirp": "^0.5.1"
- }
- },
"write-file-atomic": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
@@ -74577,12 +71806,6 @@
"async-limiter": "~1.0.0"
}
},
- "x-is-string": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz",
- "integrity": "sha512-GojqklwG8gpzOVEVki5KudKNoq7MbbjYZCbyWzEz7tyPA7eleiE0+ePwOWQQRb5fm86rD3S8Tc0tSFf3AOv50w==",
- "dev": true
- },
"xml-name-validator": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
@@ -74659,21 +71882,10 @@
}
},
"yargs-parser": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
- "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
- "dev": true,
- "requires": {
- "camelcase": "^4.1.0"
- },
- "dependencies": {
- "camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==",
- "dev": true
- }
- }
+ "version": "20.2.9",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
+ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
+ "dev": true
},
"yauzl": {
"version": "2.10.0",
diff --git a/package.json b/package.json
index 3b1a9be23..055a495d8 100644
--- a/package.json
+++ b/package.json
@@ -269,7 +269,7 @@
"electron-notarize": "^1.2.2",
"eslint": "^8.0.0",
"eslint-config-airbnb": "^19.0.4",
- "eslint-config-prettier": "^8.5.0",
+ "eslint-config-prettier": "^9.0.0",
"eslint-config-react-app": "^7.0.1",
"eslint-formatter-pretty": "^4.1.0",
"eslint-import-resolver-webpack": "^0.13.2",
@@ -297,7 +297,7 @@
"node-polyfill-webpack-plugin": "^2.0.1",
"npm": "^8.5.5",
"playwright": "1.38.1",
- "prettier": "1.19.1",
+ "prettier": "3.0.3",
"properties-reader": "^2.2.0",
"raw-loader": "^4.0.2",
"react-test-renderer": "^18.2.0",
@@ -311,9 +311,7 @@
"shx": "^0.3.2",
"sinon": "^2.3.1",
"style-loader": "^1.1.2",
- "stylelint": "^9.9.0",
- "stylelint-config-prettier": "^4.0.0",
- "stylelint-config-standard": "^18.2.0",
+ "stylelint": "^15.11.0",
"ts-loader": "^6.2.1",
"typescript": "5.2.2",
"url-loader": "^3.0.0",
diff --git a/playwright.config.common.js b/playwright.config.common.js
index 765a3e341..73d5b7efb 100644
--- a/playwright.config.common.js
+++ b/playwright.config.common.js
@@ -33,9 +33,9 @@ const pwConfig = {
? [['html', { open: 'never' }], ['github'], ['list', { printSteps: true }]]
: [
['html', { open: 'never' }],
- ['list', { printSteps: true }]
+ ['list', { printSteps: true }],
],
- workers: 1
+ workers: 1,
};
export default pwConfig;
diff --git a/playwright.config.minio.js b/playwright.config.minio.js
index 74aada3e6..cf80528bc 100644
--- a/playwright.config.minio.js
+++ b/playwright.config.minio.js
@@ -11,5 +11,5 @@ global.isUnitTest = false;
export default defineConfig({
...pwConfig,
globalSetup: './tests/global-setup-minio.js',
- globalTeardown: './tests/global-teardown-minio.js'
+ globalTeardown: './tests/global-teardown-minio.js',
});
diff --git a/playwright.config.web.browsers.js b/playwright.config.web.browsers.js
index be8e3dcb6..3085252b0 100644
--- a/playwright.config.web.browsers.js
+++ b/playwright.config.web.browsers.js
@@ -15,16 +15,16 @@ export default defineConfig({
projects: [
{
name: 'chromium',
- use: { ...devices['Desktop Chrome'] }
+ use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
- use: { ...devices['Desktop Firefox'] }
+ use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
- use: { ...devices['Desktop Safari'] }
+ use: { ...devices['Desktop Safari'] },
},
/* Test against mobile viewports. */
@@ -49,8 +49,8 @@ export default defineConfig({
name: 'Google Chrome',
use: {
...devices['Desktop Chrome'],
- channel: 'chrome'
- }
- }
- ]
+ channel: 'chrome',
+ },
+ },
+ ],
});
diff --git a/playwright.config.web.js b/playwright.config.web.js
index 439babcbf..a416981ff 100644
--- a/playwright.config.web.js
+++ b/playwright.config.web.js
@@ -13,6 +13,6 @@ global.isUnitTest = false;
const config = defineConfig({
...pwConfig,
globalSetup: './tests/global-setup-web.js',
- globalTeardown: './tests/global-teardown-web.js'
+ globalTeardown: './tests/global-teardown-web.js',
});
export default config;
diff --git a/playwright.unit.js b/playwright.unit.js
index 863b2916e..18634e8ec 100644
--- a/playwright.unit.js
+++ b/playwright.unit.js
@@ -11,5 +11,5 @@ module.exports = defineConfig({
timeout: 30000,
// (3 hours) Maximum time in milliseconds the whole test suite can run. Useful on CI to prevent broken setup from running too long and wasting resources.
globalTimeout: process.env.CI ? 3 * 60 * 60 * 1000 : undefined,
- reporter: process.env.CI ? 'github' : 'list'
+ reporter: process.env.CI ? 'github' : 'list',
});
diff --git a/scripts/afterSign.js b/scripts/afterSign.js
index 96859aeb3..d8e6de7c6 100644
--- a/scripts/afterSign.js
+++ b/scripts/afterSign.js
@@ -6,7 +6,7 @@ const fs = require('fs');
const path = require('path');
var electron_notarize = require('electron-notarize');
-module.exports = async function(params) {
+module.exports = async function (params) {
if (process.platform !== 'darwin') {
return;
}
@@ -17,7 +17,7 @@ module.exports = async function(params) {
let appPath = path.join(
params.appOutDir,
- `${params.packager.appInfo.productFilename}.app`
+ `${params.packager.appInfo.productFilename}.app`,
);
if (!fs.existsSync(appPath)) {
console.log('skip');
@@ -31,7 +31,7 @@ module.exports = async function(params) {
appBundleId: appId,
appPath: appPath,
appleId: process.env.APPLE_ID,
- appleIdPassword: process.env.APPLE_ID_PASSWORD
+ appleIdPassword: process.env.APPLE_ID_PASSWORD,
});
} catch (error) {
console.error(error);
diff --git a/scripts/app-package-gen.js b/scripts/app-package-gen.js
index 83182111b..9892bd5a9 100644
--- a/scripts/app-package-gen.js
+++ b/scripts/app-package-gen.js
@@ -27,7 +27,7 @@ if (dependencies && Object.keys(dependencies).length) {
console.log('Installing dependencies for ' + platform);
fs.writeFileSync(
'package.json',
- JSON.stringify({ ...pkg, dependencies }, null, 2)
+ JSON.stringify({ ...pkg, dependencies }, null, 2),
);
} else {
console.log('No specific dependencies on this platform: ' + platform);
diff --git a/scripts/app-package-install-npm.js b/scripts/app-package-install-npm.js
index c226b86db..e28a40b39 100644
--- a/scripts/app-package-install-npm.js
+++ b/scripts/app-package-install-npm.js
@@ -60,7 +60,7 @@ if (dependenciesObj && Object.keys(dependenciesObj).length) {
'..',
'app',
'node_modules',
- dep
+ dep,
);
if (!fs.existsSync(packagePath)) {
npmInstall = true;
@@ -82,7 +82,7 @@ if (dependenciesObj && Object.keys(dependenciesObj).length) {
}
// npmArgs.push('--no-save --force');
if (npmInstall && npmArgs.length > 0) {
- npm.load(er => {
+ npm.load((er) => {
if (er) {
console.log('err:', er);
return; // handlError(er)
@@ -104,8 +104,8 @@ if (dependenciesObj && Object.keys(dependenciesObj).length) {
'@tagspaces',
'extensions',
'md-editor',
- 'node_modules'
- )
+ 'node_modules',
+ ),
);
fs.removeSync(
path.join(
@@ -116,8 +116,8 @@ if (dependenciesObj && Object.keys(dependenciesObj).length) {
'@tagspaces',
'extensions',
'md-editor',
- 'src'
- )
+ 'src',
+ ),
);
/* npm.commands.dedupe([], (er) => {
if (er) {
@@ -125,13 +125,13 @@ if (dependenciesObj && Object.keys(dependenciesObj).length) {
}
}); */
});
- npm.on('log', message => {
+ npm.on('log', (message) => {
console.log('npm:' + message);
});
});
} else {
console.log(
- 'Installing dependencies for ' + platform + ' are already installed.'
+ 'Installing dependencies for ' + platform + ' are already installed.',
);
}
} else {
diff --git a/scripts/checkExtensions.js b/scripts/checkExtensions.js
index c04a7ff7d..c6645214c 100644
--- a/scripts/checkExtensions.js
+++ b/scripts/checkExtensions.js
@@ -10,8 +10,8 @@ if (!fs.existsSync(path.resolve(__dirname, '../app/node_modules'))) {
'yarn',
['--cwd', path.resolve(__dirname, '../app'), 'install'],
{
- stdio: 'inherit'
- }
+ stdio: 'inherit',
+ },
);
console.log(result);
}
diff --git a/scripts/checkWSinstalled.js b/scripts/checkWSinstalled.js
index 0679aa03a..fbc0fa020 100644
--- a/scripts/checkWSinstalled.js
+++ b/scripts/checkWSinstalled.js
@@ -73,11 +73,11 @@ if (platform === 'node') {
!dirExist(dir) ||
!isInstalled(
'@tagspaces/extensions',
- packageJson.nodeDependencies['@tagspaces/extensions']
+ packageJson.nodeDependencies['@tagspaces/extensions'],
) ||
!isInstalled(
'@tagspaces/tagspaces-ws',
- packageJson.nodeDependencies['@tagspaces/tagspaces-ws']
+ packageJson.nodeDependencies['@tagspaces/tagspaces-ws'],
) ||
!isInstalled('sharp', packageJson.nodeDependencies['sharp'])
) {
@@ -88,7 +88,7 @@ if (platform === 'node') {
!dirExist(dir) ||
!isInstalled(
'@tagspaces/extensions',
- packageJson.webDependencies['@tagspaces/extensions']
+ packageJson.webDependencies['@tagspaces/extensions'],
) ||
isInstalled('@tagspaces/tagspaces-ws')
) {
diff --git a/scripts/extconfig-two-locations.js b/scripts/extconfig-two-locations.js
index c1a0d99a2..ea508e411 100644
--- a/scripts/extconfig-two-locations.js
+++ b/scripts/extconfig-two-locations.js
@@ -6,8 +6,7 @@ window.ExtLocations = [
uuid: '30565f09-c7fd-2333-fc67-a75db27rt5ba', // an unique id of the location
type: '0', // 1 defines the locations a cloud based
name: 'empty_folder', // the name of the location
- path:
- './tests/testdata-tmp/file-structure/supported-filestypes/empty_folder', // the path to sub folder in the location
+ path: './tests/testdata-tmp/file-structure/supported-filestypes/empty_folder', // the path to sub folder in the location
// accessKeyId: 'your_access_key', // the access key of the user
// secretAccessKey: 'your_secret_key', // the secret case of the user
// bucketName: 'demo-bucket', // the name of the S3 bucket
@@ -16,7 +15,7 @@ window.ExtLocations = [
isReadOnly: false, // if true the user interface of the application turns to read-only mode
disableIndexing: false, // if true the search index will be persisted and loaded by default on location opening
fullTextIndex: true, // activated the full-text search for TXT, MD and HTML files
- watchForChanges: false // activates the watching for changed files in the current location
+ watchForChanges: false, // activates the watching for changed files in the current location
},
{
uuid: '30565f09-c7fd-2333-fc67-a75db27rt5b1', // an unique id of the location
@@ -31,8 +30,8 @@ window.ExtLocations = [
isReadOnly: false, // if true the user interface of the application turns to read-only mode
disableIndexing: false, // if true the search index will be persisted and loaded by default on location opening
fullTextIndex: true, // activated the full-text search for TXT, MD and HTML files
- watchForChanges: false // activates the watching for changed files in the current location
- }
+ watchForChanges: false, // activates the watching for changed files in the current location
+ },
];
/*window.ExtSearches = [
{
diff --git a/scripts/extconfig-with-welcome.js b/scripts/extconfig-with-welcome.js
index b844fd99d..56a19bf8e 100644
--- a/scripts/extconfig-with-welcome.js
+++ b/scripts/extconfig-with-welcome.js
@@ -15,8 +15,8 @@ window.ExtLocations = [
isReadOnly: false, // if true the user interface of the application turns to read-only mode
disableIndexing: false, // if true the search index will be persisted and loaded by default on location opening
fullTextIndex: false, // activated the full-text search for TXT, MD and HTML files
- watchForChanges: false // activates the watching for changed files in the current location
- }
+ watchForChanges: false, // activates the watching for changed files in the current location
+ },
];
/*window.ExtSearches = [
{
diff --git a/scripts/extconfig.js b/scripts/extconfig.js
index 512be84ef..569f5d934 100644
--- a/scripts/extconfig.js
+++ b/scripts/extconfig.js
@@ -15,8 +15,8 @@ window.ExtLocations = [
isReadOnly: false, // if true the user interface of the application turns to read-only mode
disableIndexing: false, // if true the search index will be persisted and loaded by default on location opening
fullTextIndex: false, // activated the full-text search for TXT, MD and HTML files
- watchForChanges: false // activates the watching for changed files in the current location
- }
+ watchForChanges: false, // activates the watching for changed files in the current location
+ },
];
/*window.ExtSearches = [
{
diff --git a/scripts/generateExtensionsConfig.js b/scripts/generateExtensionsConfig.js
index bf1a38aef..d11f338d2 100644
--- a/scripts/generateExtensionsConfig.js
+++ b/scripts/generateExtensionsConfig.js
@@ -9,7 +9,7 @@ getExtensions(directoryPath)
.then(({ extensions, supportedFileTypes }) => {
writeExtensions(extensions, supportedFileTypes);
})
- .catch(err => {
+ .catch((err) => {
console.error('getExtensions error:', err);
writeExtensions([], []);
});
diff --git a/scripts/genswconf.js b/scripts/genswconf.js
index 5a8504f67..7de96852b 100644
--- a/scripts/genswconf.js
+++ b/scripts/genswconf.js
@@ -4,26 +4,26 @@ const { version } = require('../app/package.json');
const FILES_TO_CACHE = ['offline.html'];
sh.cd('web/dist');
-sh.ls('*.js').forEach(file => {
+sh.ls('*.js').forEach((file) => {
FILES_TO_CACHE.push('dist/' + file);
});
-sh.ls('*.ttf').forEach(file => {
+sh.ls('*.ttf').forEach((file) => {
FILES_TO_CACHE.push('dist/' + file);
});
-sh.ls('*.woff*').forEach(file => {
+sh.ls('*.woff*').forEach((file) => {
FILES_TO_CACHE.push('dist/' + file);
});
-sh.ls('*.css').forEach(file => {
+sh.ls('*.css').forEach((file) => {
FILES_TO_CACHE.push('dist/' + file);
});
let CACHE_STRING = '\nconst FILES_TO_CACHE = [\n';
-FILES_TO_CACHE.forEach(file => {
+FILES_TO_CACHE.forEach((file) => {
CACHE_STRING += ' "' + file + '",\n';
});
CACHE_STRING += '];';
const buildTime = new Date().getTime(); // toISOString();
sh.echo(
- 'const CACHE_NAME = "TS-' + version + '-' + buildTime + '";' + CACHE_STRING
+ 'const CACHE_NAME = "TS-' + version + '-' + buildTime + '";' + CACHE_STRING,
).to('../sw-config.js');
diff --git a/scripts/jwt_generate.js b/scripts/jwt_generate.js
index 22388f54b..1a5fb1a72 100644
--- a/scripts/jwt_generate.js
+++ b/scripts/jwt_generate.js
@@ -6,7 +6,7 @@ const propertiesReader = require('properties-reader');
const propsPath = pathLib.join(__dirname, '..', 'app', '.env');
if (!fs.existsSync(propsPath)) {
throw new Error(
- propsPath + ' file not exist! Please create it and add property KEY=xxx'
+ propsPath + ' file not exist! Please create it and add property KEY=xxx',
);
}
const properties = propertiesReader(propsPath);
@@ -18,7 +18,7 @@ const content = '{"jwt":"' + token + '"}';
fs.outputFileSync(
pathLib.join(__dirname, '../app/config/config.json'),
- content
+ content,
);
/* fs.writeFile(
pathLib.join(__dirname, '../app/config/config.json'),
diff --git a/scripts/postinstall.js b/scripts/postinstall.js
index 6faa5061b..c0fb311d8 100644
--- a/scripts/postinstall.js
+++ b/scripts/postinstall.js
@@ -95,7 +95,7 @@ if (install) {
}
if (shell.exec(cmd).code !== 0) {
shell.echo(
- 'Error: Install ' + process.env.PD_PLATFORM + ' platform failed'
+ 'Error: Install ' + process.env.PD_PLATFORM + ' platform failed',
);
shell.exit(1);
}
@@ -106,7 +106,7 @@ if (install) {
projectDir,
'node_modules',
'@tagspaces',
- 'tagspaces-platforms'
+ 'tagspaces-platforms',
);
const cmd2 =
'npx @tagspaces/dynamic-packages-loading ' +
diff --git a/scripts/setupextensions.js b/scripts/setupextensions.js
index 2934dbdeb..48701750d 100644
--- a/scripts/setupextensions.js
+++ b/scripts/setupextensions.js
@@ -103,8 +103,8 @@ const extensionList = [
{
package: '@tagspaces/extensions',
path: 'extensions',
- url: 'https://github.com/tagspaces/tagspaces-extensions'
- }
+ url: 'https://github.com/tagspaces/tagspaces-extensions',
+ },
];
sh.rm('-rf', '~/.config/yarn/link/@tagspaces');
@@ -115,7 +115,7 @@ if (!sh.test('-d', extensionDir)) {
sh.cd(extensionDir);
-extensionList.forEach(extension => {
+extensionList.forEach((extension) => {
if (sh.test('-d', extension.path)) {
sh.cd(extension.path);
sh.exec('git checkout ' + extensionBranch);
@@ -130,7 +130,7 @@ extensionList.forEach(extension => {
});
sh.cd('../app');
-extensionList.forEach(extension => {
+extensionList.forEach((extension) => {
sh.exec('yarn link ' + extension.package);
});
sh.cd('..');
diff --git a/scripts/versionmeta.js b/scripts/versionmeta.js
index 444599298..6288e8a0a 100644
--- a/scripts/versionmeta.js
+++ b/scripts/versionmeta.js
@@ -23,8 +23,8 @@ sh.exec(
version +
'", "name": "' +
productName +
- '"}'
+ '"}',
).to('app/version.json');
// sh.sed('-i', 'BUILD_VERSION', 'v0.1.2', file);
- }
+ },
);
diff --git a/scripts/webdavserver.js b/scripts/webdavserver.js
index bcbd5f4fc..f430ced29 100644
--- a/scripts/webdavserver.js
+++ b/scripts/webdavserver.js
@@ -6,7 +6,7 @@ jsDAV.createServer(
{
node: './web',
authBackend: jsDAVAuthBackendFile.new('./scripts/jsdavauth'),
- realm: 'jdavtest'
+ realm: 'jdavtest',
},
- 8000
+ 8000,
);
diff --git a/scripts/webextconfig-two-locations.js b/scripts/webextconfig-two-locations.js
index ac0dca179..d01a25c25 100644
--- a/scripts/webextconfig-two-locations.js
+++ b/scripts/webextconfig-two-locations.js
@@ -16,7 +16,7 @@ window.ExtLocations = [
isReadOnly: false, // if true the user interface of the application turns to read-only mode
disableIndexing: false, // if true the search index will be persisted and loaded by default on location opening
fullTextIndex: true, // activated the full-text search for TXT, MD and HTML files
- watchForChanges: false // activates the watching for changed files in the current location
+ watchForChanges: false, // activates the watching for changed files in the current location
},
{
uuid: '30565f09-c7fd-2333-fc67-a75db27rt5b1', // an unique id of the location
@@ -32,8 +32,8 @@ window.ExtLocations = [
isReadOnly: false, // if true the user interface of the application turns to read-only mode
disableIndexing: false, // if true the search index will be persisted and loaded by default on location opening
fullTextIndex: true, // activated the full-text search for TXT, MD and HTML files
- watchForChanges: false // activates the watching for changed files in the current location
- }
+ watchForChanges: false, // activates the watching for changed files in the current location
+ },
];
/*window.ExtSearches = [
{
diff --git a/scripts/webextconfig-with-welcome.js b/scripts/webextconfig-with-welcome.js
index 84bb030ba..0e0892b8a 100644
--- a/scripts/webextconfig-with-welcome.js
+++ b/scripts/webextconfig-with-welcome.js
@@ -16,8 +16,8 @@ window.ExtLocations = [
isReadOnly: false, // if true the user interface of the application turns to read-only mode
disableIndexing: false, // if true the search index will be persisted and loaded by default on location opening
fullTextIndex: false, // activated the full-text search for TXT, MD and HTML files
- watchForChanges: false // activates the watching for changed files in the current location
- }
+ watchForChanges: false, // activates the watching for changed files in the current location
+ },
];
/*window.ExtSearches = [
{
diff --git a/scripts/webextconfig.js b/scripts/webextconfig.js
index e5be28e58..9fb9682c5 100644
--- a/scripts/webextconfig.js
+++ b/scripts/webextconfig.js
@@ -16,8 +16,8 @@ window.ExtLocations = [
isReadOnly: false, // if true the user interface of the application turns to read-only mode
disableIndexing: false, // if true the search index will be persisted and loaded by default on location opening
fullTextIndex: false, // activated the full-text search for TXT, MD and HTML files
- watchForChanges: false // activates the watching for changed files in the current location
- }
+ watchForChanges: false, // activates the watching for changed files in the current location
+ },
];
/*window.ExtSearches = [
{
diff --git a/tests/create-1000files.js b/tests/create-1000files.js
index 3a896f1d1..0aa78f3d5 100644
--- a/tests/create-1000files.js
+++ b/tests/create-1000files.js
@@ -7,7 +7,7 @@ for (let i = 1; i <= 2000; i++) {
const fileName = `file${i}.txt`;
const fileContent = `This is file number ${i}`;
const filePath = path.join(testdir, fileName);
- fs.writeFile(filePath, fileContent, err => {
+ fs.writeFile(filePath, fileContent, (err) => {
if (err) throw err;
console.log(`File ${fileName} has been created.`);
});
diff --git a/tests/e2e/clearstorage.helpers.js b/tests/e2e/clearstorage.helpers.js
index c8963c7b7..18e881367 100644
--- a/tests/e2e/clearstorage.helpers.js
+++ b/tests/e2e/clearstorage.helpers.js
@@ -14,7 +14,7 @@ export async function clearStorage() {
});
// Execute JavaScript to clear cookies.
await global.client.evaluate(() => {
- document.cookie.split(';').forEach(function(c) {
+ document.cookie.split(';').forEach(function (c) {
document.cookie = c
.replace(/^ +/, '')
.replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/');
diff --git a/tests/e2e/file.properties.helpers.js b/tests/e2e/file.properties.helpers.js
index 6cc4cd8ad..3e7831935 100644
--- a/tests/e2e/file.properties.helpers.js
+++ b/tests/e2e/file.properties.helpers.js
@@ -4,13 +4,13 @@ import {
expectElementExist,
getElementText,
removeTagFromTagMenu,
- setInputKeys
+ setInputKeys,
} from './general.helpers';
export async function getPropertiesTags() {
const arrTags = [];
const tags = await global.client.$$(
- '[data-tid=PropertiesTagsSelectTID] div div div'
+ '[data-tid=PropertiesTagsSelectTID] div div div',
);
for (let i = 0; i < tags.length; i++) {
const dataTid = await tags[i].getAttribute('data-tid');
@@ -31,7 +31,7 @@ export async function getPropertiesTags() {
*/
export async function AddRemovePropertiesTags(
tagNames = ['test-props-tag'], // TODO fix camelCase tag name
- options = { add: true, remove: true }
+ options = { add: true, remove: true },
) {
if (options.add) {
for (let i = 0; i < tagNames.length; i++) {
@@ -46,13 +46,13 @@ export async function AddRemovePropertiesTags(
'[data-tid=tagContainer_' + tagName + ']',
true,
8000,
- '[data-tid=perspectiveGridFileTable]'
+ '[data-tid=perspectiveGridFileTable]',
);
await expectElementExist(
'[data-tid=tagContainer_' + tagName + ']',
true,
8000,
- '[data-tid=PropertiesTagsSelectTID]'
+ '[data-tid=PropertiesTagsSelectTID]',
);
//const propsNewTags = await getPropertiesTags();
//expect(propsNewTags.includes(tagName)).toBe(true);
@@ -67,13 +67,13 @@ export async function AddRemovePropertiesTags(
'[data-tid=tagContainer_' + tagName + ']',
false,
8000,
- '[data-tid=perspectiveGridFileTable]'
+ '[data-tid=perspectiveGridFileTable]',
);
await expectElementExist(
'[data-tid=tagContainer_' + tagName + ']',
false,
8000,
- '[data-tid=PropertiesTagsSelectTID]'
+ '[data-tid=PropertiesTagsSelectTID]',
);
// await global.client.waitForTimeout(1500);
//const propsNewTags = await getPropertiesTags();
@@ -86,7 +86,7 @@ export async function getPropertiesFileName() {
let fileName;
fileName = await global.client.inputValue(
- '[data-tid=fileNameProperties] input'
+ '[data-tid=fileNameProperties] input',
); // https://github.com/microsoft/playwright/issues/3265
/*.getAttribute(
'[data-tid=fileNameProperties] input',
diff --git a/tests/e2e/fileopener.pw.e2e.js b/tests/e2e/fileopener.pw.e2e.js
index 2455a992b..011e8ccbc 100644
--- a/tests/e2e/fileopener.pw.e2e.js
+++ b/tests/e2e/fileopener.pw.e2e.js
@@ -3,7 +3,7 @@ import {
createPwMinioLocation,
createPwLocation,
defaultLocationName,
- defaultLocationPath
+ defaultLocationPath,
} from './location.helpers';
import {
checkSettings,
@@ -22,12 +22,12 @@ import {
setSettings,
takeScreenshot,
waitForNotification,
- writeTextInIframeInput
+ writeTextInIframeInput,
} from './general.helpers';
import {
AddRemovePropertiesTags,
getPropertiesFileName,
- getPropertiesTags
+ getPropertiesTags,
} from './file.properties.helpers';
import { openContextEntryMenu } from './test-utils';
import { createFile, startTestingApp, stopApp, testDataRefresh } from './hook';
@@ -132,7 +132,7 @@ test.describe('TST08 - File folder properties', () => {
await clickOn('[data-tid=propsActionsMenuTID]');
await clickOn('[data-tid=openInFullWidthTID]');
const folderSelector = await global.client.$(
- '[data-tid=folderContainerTID]'
+ '[data-tid=folderContainerTID]',
); //.isHidden();
expect(await folderSelector.isHidden()).toBe(true);
await clickOn('[data-tid=propsActionsMenuTID]');
@@ -150,7 +150,7 @@ test.describe('TST08 - File folder properties', () => {
// open fileProperties
await openContextEntryMenu(
getGridFileSelector(fileName),
- 'showPropertiesTID'
+ 'showPropertiesTID',
);
//await clickOn(getGridFileSelector(fileName));
@@ -159,7 +159,7 @@ test.describe('TST08 - File folder properties', () => {
await AddRemovePropertiesTags(['test-tag1', 'test-tag2'], {
add: true,
- remove: false
+ remove: false,
});
const propsFileName = await getPropertiesFileName();
expect(propsFileName).toBe(fileName);
@@ -169,7 +169,7 @@ test.describe('TST08 - File folder properties', () => {
await clickOn('[data-tid=confirmRenameEntryTID]');
await global.client.waitForSelector(
- '[data-tid=fileNameProperties] input[value="' + newTitle + '"]'
+ '[data-tid=fileNameProperties] input[value="' + newTitle + '"]',
);
const propsNewFileName = await getPropertiesFileName();
expect(propsNewFileName).toBe(newTitle);
@@ -199,7 +199,7 @@ test.describe('TST08 - File folder properties', () => {
const fileName = 'sample.svg';
await openContextEntryMenu(
getGridFileSelector(fileName),
- 'showPropertiesTID'
+ 'showPropertiesTID',
);
/*await clickOn(selectorFile);
await clickOn('[data-tid=detailsTabTID]');*/
@@ -213,7 +213,7 @@ test.describe('TST08 - File folder properties', () => {
const fileName = 'sample.bmp';
await openContextEntryMenu(
getGridFileSelector(fileName),
- 'showPropertiesTID'
+ 'showPropertiesTID',
);
await AddRemovePropertiesTags(['test-tag1', 'test-tag2']);
await setSettings('[data-tid=settingsSetPersistTagsInSidecarFile]', true);
@@ -224,18 +224,18 @@ test.describe('TST08 - File folder properties', () => {
await clickOn('[data-tid=tagLibrary]');
await dnd(
'[data-tid=tagContainer_' + tagName + ']',
- getGridFileSelector('sample.txt')
+ getGridFileSelector('sample.txt'),
);
await expectElementExist(
'[data-tid=tagContainer_' + tagName + ']',
true,
8000,
- '[data-tid=perspectiveGridFileTable]'
+ '[data-tid=perspectiveGridFileTable]',
);
await openContextEntryMenu(
getGridFileSelector('sample[' + tagName + '].txt'),
- 'showPropertiesTID'
+ 'showPropertiesTID',
);
//await clickOn(getGridFileSelector('sample[' + tagName + '].txt'));
@@ -267,10 +267,10 @@ test.describe('TST08 - File folder properties', () => {
await clickOn('[data-tid=descriptionTID]');
const editor = await global.client.waitForSelector(
- '[data-tid=descriptionTID] [contenteditable=true]'
+ '[data-tid=descriptionTID] [contenteditable=true]',
);
await editor.type(desc, {
- delay: 0
+ delay: 0,
});
await clickOn('[data-tid=editDescriptionTID]');
@@ -278,7 +278,7 @@ test.describe('TST08 - File folder properties', () => {
'[data-tid=gridCellDescription]',
true,
10000,
- fileSelector
+ fileSelector,
);
});
@@ -319,14 +319,14 @@ test.describe('TST08 - File folder properties', () => {
await createFile(fileName, svg);
await openContextEntryMenu(
getGridFileSelector('empty_folder'),
- 'showProperties'
+ 'showProperties',
);
await global.client.dblclick(getGridFileSelector('empty_folder'));
await expectElementExist(getGridFileSelector(fileName));
//await clickOn(getGridFileSelector(fileName));
await openContextEntryMenu(
getGridFileSelector(fileName),
- 'showPropertiesTID' //'fileMenuOpenFile'
+ 'showPropertiesTID', //'fileMenuOpenFile'
);
//Toggle Properties
@@ -335,7 +335,7 @@ test.describe('TST08 - File folder properties', () => {
await setSettings('[data-tid=settingsSetPersistTagsInSidecarFile]', true);
await AddRemovePropertiesTags(['test-tag1', 'test-tag2'], {
add: true,
- remove: false
+ remove: false,
});
const arrayMeta =
global.isWeb || global.isMinio
@@ -419,7 +419,7 @@ test.describe('TST08 - File folder properties', () => {
await clickOn('[data-tid=detailsTabTID]');
const sharingLink = await global.client.$(
- '[data-tid=sharingLinkTID] input'
+ '[data-tid=sharingLinkTID] input',
);
const sharingLinkValue = await sharingLink.getAttribute('value');
@@ -432,7 +432,7 @@ test.describe('TST08 - File folder properties', () => {
await expectElementExist(
'[data-tid=OpenedTID' + dataTidFormat(fileName) + ']',
true,
- 5000
+ 5000,
);
});
});
diff --git a/tests/e2e/folder.pw.e2e.js b/tests/e2e/folder.pw.e2e.js
index 16505ecfc..a75849b1f 100644
--- a/tests/e2e/folder.pw.e2e.js
+++ b/tests/e2e/folder.pw.e2e.js
@@ -6,7 +6,7 @@ import {
defaultLocationPath,
defaultLocationName,
createPwMinioLocation,
- createPwLocation
+ createPwLocation,
} from './location.helpers';
import {
reloadDirectory,
@@ -16,7 +16,7 @@ import {
expectElementExist,
takeScreenshot,
selectorFile,
- setInputKeys
+ setInputKeys,
} from './general.helpers';
import { openContextEntryMenu, renameFolder } from './test-utils';
import { createFile, startTestingApp, stopApp, testDataRefresh } from './hook';
@@ -65,7 +65,7 @@ test.describe('TST01 - Folder management', () => {
await expectElementExist(
'[data-tid=fsEntryName_' + testFolder + ']',
false,
- 5000
+ 5000,
);
});
@@ -77,7 +77,7 @@ test.describe('TST01 - Folder management', () => {
await expectElementExist(
'[data-tid=fsEntryName_' + testFolder + ']',
false,
- 5000
+ 5000,
);
});
@@ -89,17 +89,17 @@ test.describe('TST01 - Folder management', () => {
await expectElementExist(
'[data-tid=fsEntryName_' + newDirectoryName + ']',
true,
- 5000
+ 5000,
);
// cleanup
await global.client.dblclick(
- '[data-tid=fsEntryName_' + newDirectoryName + ']'
+ '[data-tid=fsEntryName_' + newDirectoryName + ']',
);
await deleteDirectory();
await expectElementExist(
'[data-tid=fsEntryName_' + newDirectoryName + ']',
false,
- 5000
+ 5000,
);
});
@@ -112,13 +112,13 @@ test.describe('TST01 - Folder management', () => {
await expectElementExist(
'[data-tid=fsEntryName_' + testFolder + ']',
false,
- 5000
+ 5000,
);
});
test('TST0105 - Open subfolder [web,minio,electron]', async () => {
await global.client.dblclick(
- '[data-tid=fsEntryName_' + emptyFolderName + ']'
+ '[data-tid=fsEntryName_' + emptyFolderName + ']',
);
await expectElementExist(selectorFile, false, 5000);
});
@@ -126,17 +126,17 @@ test.describe('TST01 - Folder management', () => {
test('TST0106 - Show folder tags [web,minio,electron]', async () => {
await openContextEntryMenu(
'[data-tid=fsEntryName_empty_folder]',
- 'showProperties'
+ 'showProperties',
);
await AddRemovePropertiesTags(['test-tag1', 'test-tag2'], {
add: true,
- remove: false
+ remove: false,
});
await expectElementExist('[data-tid=tagContainer_test-tag1]', true, 5000);
await expectElementExist('[data-tid=tagContainer_test-tag2]', true, 5000);
await AddRemovePropertiesTags(['test-tag1', 'test-tag2'], {
add: false,
- remove: true
+ remove: true,
});
await expectElementExist('[data-tid=tagContainer_test-tag1]', false, 5000);
await expectElementExist('[data-tid=tagContainer_test-tag2]', false, 5000);
@@ -148,7 +148,7 @@ test.describe('TST01 - Folder management', () => {
await createFile('file_to_move.txt', 'testing file content');
await openContextEntryMenu(
'[data-tid=fsEntryName_empty_folder]',
- 'fileMenuMoveCopyDirectoryTID'
+ 'fileMenuMoveCopyDirectoryTID',
);
await clickOn('[data-tid=newSubdirectoryTID]');
const folderToMove = 'folder_to_move';
@@ -161,7 +161,7 @@ test.describe('TST01 - Folder management', () => {
await expectElementExist(
'[data-tid=fsEntryName_empty_folder]',
false,
- 5000
+ 5000,
);
await global.client.dblclick('[data-tid=fsEntryName_' + folderToMove + ']');
await expectElementExist('[data-tid=fsEntryName_empty_folder]', true, 5000);
@@ -172,7 +172,7 @@ test.describe('TST01 - Folder management', () => {
await createFile('file_to_copy.txt', 'testing file content');
await openContextEntryMenu(
'[data-tid=fsEntryName_empty_folder]',
- 'fileMenuMoveCopyDirectoryTID'
+ 'fileMenuMoveCopyDirectoryTID',
);
await clickOn('[data-tid=newSubdirectoryTID]');
const folderToCopy = 'folder_to_copy';
@@ -197,7 +197,7 @@ test.describe('TST01 - Folder management', () => {
test('TST0111 - Open folder properties [web,minio,electron]', async () => {
await openContextEntryMenu(
'[data-tid=fsEntryName_empty_folder]',
- 'showProperties'
+ 'showProperties',
);
await expectElementExist('[data-tid=OpenedTIDempty_folder]', true, 5000);
/*const divElement = await global.client.$(
@@ -210,13 +210,13 @@ test.describe('TST01 - Folder management', () => {
test('TST0112 - Delete non empty folder by disabled trashcan [web,minio,electron]', async () => {
await openContextEntryMenu(
'[data-tid=fsEntryName_empty_folder]',
- 'deleteDirectory'
+ 'deleteDirectory',
);
await clickOn('[data-tid=confirmDeleteFileDialog]');
await expectElementExist(
'[data-tid=fsEntryName_empty_folder]',
false,
- 5000
+ 5000,
);
});
@@ -232,7 +232,7 @@ test.describe('TST01 - Folder management', () => {
await expectElementExist(
'[data-tid=gridPerspectiveToggleShowDirectories]',
true,
- 5000
+ 5000,
);
await clickOn('[data-tid=closePerspectiveSettingsTID]');
});
@@ -244,7 +244,7 @@ test.describe('TST01 - Folder management', () => {
await expectElementExist(
'[data-tid=listPerspectiveOptionsMenu]',
true,
- 5000
+ 5000,
);
});
@@ -254,7 +254,7 @@ test.describe('TST01 - Folder management', () => {
await expectElementExist(
'[data-tid=perspectiveGalleryToolbar]',
true,
- 5000
+ 5000,
);
await expectElementExist('[data-tid=perspectiveGalleryHelp]', true, 5000);
});
@@ -265,7 +265,7 @@ test.describe('TST01 - Folder management', () => {
await expectElementExist(
'[data-tid=perspectiveMapiqueToolbar]',
true,
- 5000
+ 5000,
);
await expectElementExist('[data-tid=perspectiveMapiqueHelp]', true, 5000);
});
@@ -276,7 +276,7 @@ test.describe('TST01 - Folder management', () => {
await expectElementExist(
'[data-tid=kanbanSettingsDialogOpenTID]',
true,
- 5000
+ 5000,
);
});
});
diff --git a/tests/e2e/folderprops.pw.e2e.js b/tests/e2e/folderprops.pw.e2e.js
index f1430d7b6..cea4242c9 100644
--- a/tests/e2e/folderprops.pw.e2e.js
+++ b/tests/e2e/folderprops.pw.e2e.js
@@ -6,7 +6,7 @@ import {
defaultLocationPath,
defaultLocationName,
createPwMinioLocation,
- createPwLocation
+ createPwLocation,
} from './location.helpers';
import {
clickOn,
@@ -16,7 +16,7 @@ import {
setInputValue,
createNewDirectory,
dnd,
- setInputKeys
+ setInputKeys,
} from './general.helpers';
import { openContextEntryMenu } from './test-utils';
import { createFile, startTestingApp, stopApp, testDataRefresh } from './hook';
@@ -24,7 +24,7 @@ import { clearDataStorage } from './welcome.helpers';
import {
AddRemovePropertiesTags,
getPropertiesFileName,
- getPropertiesTags
+ getPropertiesTags,
} from './file.properties.helpers';
test.beforeAll(async () => {
@@ -54,7 +54,7 @@ test.beforeEach(async () => {
await openContextEntryMenu(
'[data-tid=fsEntryName_empty_folder]',
- 'showProperties'
+ 'showProperties',
);
});
@@ -82,10 +82,10 @@ test.describe('TST02 - Folder properties', () => {
title: 'test-tag',
color: '#61DD61',
textcolor: 'white',
- type: 'sidecar'
- }
+ type: 'sidecar',
+ },
],
- id: '73e839b38d034a4a807971e755c17091'
+ id: '73e839b38d034a4a807971e755c17091',
};
await createFile('tsm.json', JSON.stringify(tsmJson), 'empty_folder/.ts');
@@ -99,17 +99,17 @@ test.describe('TST02 - Folder properties', () => {
tagTitle +
']',
true,
- 4000
+ 4000,
);
await clickOn('[data-tid=descriptionTabTID]');
// await clickOn('[data-tid=editDescriptionTID]');
const editor = await global.client.waitForSelector(
- '[data-tid=descriptionTID] .milkdown' //[contenteditable=true]'
+ '[data-tid=descriptionTID] .milkdown', //[contenteditable=true]'
);
const description = await editor.innerText();
expect(description.replace(/[\s*#]/g, '')).toMatch(
- tsmJson.description.replace(/[\s*#]/g, '')
+ tsmJson.description.replace(/[\s*#]/g, ''),
);
});
@@ -131,7 +131,7 @@ test.describe('TST02 - Folder properties', () => {
await clickOn('[data-tid=confirmRenameEntryTID]');
// await waitForNotification();
await global.client.waitForSelector(
- '[data-tid=fileNameProperties] input[value="' + newTile + '"]'
+ '[data-tid=fileNameProperties] input[value="' + newTile + '"]',
);
const propsNewFolderName = await getPropertiesFileName();
expect(propsFolderName).not.toBe(propsNewFolderName);
@@ -174,13 +174,13 @@ test.describe('TST02 - Folder properties', () => {
await clickOn('[data-tid=tagLibrary]');
await dnd(
'[data-tid=tagContainer_' + tagName + ']',
- '[data-tid=PropertiesTagsSelectTID]'
+ '[data-tid=PropertiesTagsSelectTID]',
);
await expectElementExist(
'[data-tid=tagContainer_' + tagName + ']',
true,
8000,
- '[data-tid=perspectiveGridFileTable]'
+ '[data-tid=perspectiveGridFileTable]',
);
const propsTags = await getPropertiesTags();
@@ -195,7 +195,7 @@ test.describe('TST02 - Folder properties', () => {
// await global.client.dblclick('[data-tid=descriptionTID]');
await clickOn('[data-tid=descriptionTID]');
const editor = await global.client.waitForSelector(
- '[data-tid=descriptionTID] [contenteditable=true]'
+ '[data-tid=descriptionTID] [contenteditable=true]',
);
await editor.type(desc);
const editorContent = await editor.innerText();
@@ -205,14 +205,14 @@ test.describe('TST02 - Folder properties', () => {
'[data-tid=gridCellDescription]',
true,
10000,
- getGridFileSelector('empty_folder')
+ getGridFileSelector('empty_folder'),
);
});
test('TST0215 - Link for internal sharing + copy [web,minio,electron]', async () => {
// await clickOn('[data-tid=copyLinkToClipboardTID]');
const sharingLink = await global.client.waitForSelector(
- '[data-tid=sharingLinkTID] input'
+ '[data-tid=sharingLinkTID] input',
);
const sharingLinkValue = await sharingLink.getAttribute('value');
@@ -246,7 +246,7 @@ test.describe('TST02 - Folder properties', () => {
const fileName = 'sample.jpg';
await openContextEntryMenu(
getGridFileSelector(fileName),
- 'fileMenuMoveCopyFile'
+ 'fileMenuMoveCopyFile',
);
await clickOn('[data-tid=MoveTargetempty_folder]');
await clickOn('[data-tid=confirmCopyFiles]');
@@ -256,7 +256,7 @@ test.describe('TST02 - Folder properties', () => {
//await perspectiveEl.focus();
await clickOn('[data-tid=changePerspectiveTID]', {
// force: true,
- timeout: 15000
+ timeout: 15000,
}); // todo double click
await clickOn('[data-tid=changePerspectiveTID]');
await clickOn('[data-value=gallery]');
@@ -265,7 +265,7 @@ test.describe('TST02 - Folder properties', () => {
await expectElementExist(
'[data-tid=perspectiveGalleryToolbar]',
true,
- 5000
+ 5000,
);
});
});
diff --git a/tests/e2e/general.helpers.js b/tests/e2e/general.helpers.js
index de96c9fee..82231a56b 100644
--- a/tests/e2e/general.helpers.js
+++ b/tests/e2e/general.helpers.js
@@ -26,7 +26,7 @@ export async function takeScreenshot(testInfo, title = 'failure') {
testInfo.attachments.push({
name: 'screenshot',
path: sPath,
- contentType: 'image/png'
+ contentType: 'image/png',
});
return await global.client.screenshot({ path: sPath });
}
@@ -57,7 +57,7 @@ export async function rightClickOn(selector) {
export async function waitUntilClassChanged(selector, className) {
const element = await global.client.$(selector);
await element.waitUntil(
- async function() {
+ async function () {
const newClassName = await this.getAttribute('class');
return newClassName !== className;
},
@@ -68,8 +68,8 @@ export async function waitUntilClassChanged(selector, className) {
selector +
' className:' +
className +
- ' to changed after 5s'
- }
+ ' to changed after 5s',
+ },
);
return await element.getAttribute('class');
}
@@ -87,10 +87,10 @@ export async function setInputValue(selector, value) {
export async function setInputKeys(tid, value, delay = 0) {
// global.client.keyboard.type('[data-tid=' + tid + '] input', value, { delay: 100 });
const oldValue = await global.client.inputValue(
- '[data-tid=' + tid + '] input'
+ '[data-tid=' + tid + '] input',
);
await global.client.type('[data-tid=' + tid + '] input', value, {
- delay
+ delay,
});
return oldValue;
}
@@ -105,7 +105,7 @@ export async function setInputKeys(tid, value, delay = 0) {
export async function typeInputValue(inputSelector, value, delay = 0) {
const oldValue = await global.client.inputValue(inputSelector);
await global.client.type(inputSelector, value, {
- delay
+ delay,
});
return oldValue;
}
@@ -189,7 +189,7 @@ export async function getGridFileName(fileIndex) {
return fileName + '.' + fileExt.toLowerCase();
}
console.log(
- "Can't find getGridFileName:" + fileIndex + ' filesList is empty'
+ "Can't find getGridFileName:" + fileIndex + ' filesList is empty',
);
} catch (e) {
console.log("Can't find getGridFileName:" + fileIndex, e);
@@ -201,15 +201,15 @@ export async function getRevision(revIndex) {
try {
return await global.client.$$eval(
'table[data-tid=tableRevisionsTID] tbody tr',
- rows => {
+ (rows) => {
if (rows.length > 0) {
return {
id: rows[0].getAttribute('data-tid'),
- file: rows[0].querySelector('th').innerText
+ file: rows[0].querySelector('th').innerText,
};
}
return undefined;
- }
+ },
);
} catch (e) {
console.log("Can't find getRevision:" + revIndex, e);
@@ -233,12 +233,12 @@ export async function isElementDisplayed(
element,
selector,
displayed = true,
- timeout = 500
+ timeout = 500,
) {
try {
const el = await element.waitForSelector(selector, {
timeout,
- state: displayed ? 'visible' : 'detached'
+ state: displayed ? 'visible' : 'detached',
});
if (!displayed) {
if (el === null) {
@@ -265,14 +265,14 @@ export async function isDisplayed(
selector,
displayed = true,
timeout = 1500,
- parentSelector = undefined
+ parentSelector = undefined,
) {
try {
const parentEl = parentSelector ? parentSelector : global.client;
const el = await parentEl.waitForSelector(selector, {
timeout,
// strict: true,
- state: displayed ? 'attached' : 'detached' //'visible' : 'hidden' //'detached'
+ state: displayed ? 'attached' : 'detached', //'visible' : 'hidden' //'detached'
});
if (!displayed) {
if (el === null) {
@@ -287,7 +287,7 @@ export async function isDisplayed(
'ms exceeded. isDisplayed:' +
selector +
' displayed:' +
- displayed
+ displayed,
// error
);
}
@@ -340,8 +340,8 @@ export async function expectAudioPlay() {
{
message: 'progress of file is not greater that 0', // custom error message
// Poll for 10 seconds; defaults to 5 seconds. Pass 0 to disable timeout.
- timeout: 10000
- }
+ timeout: 10000,
+ },
)
.toBe(true);
}
@@ -349,7 +349,7 @@ export async function expectAudioPlay() {
export async function expectElementSelected(
selector,
isSelected = true,
- timeout = 2000
+ timeout = 2000,
) {
await expectElementExist(
'[data-tid="fsEntryName_' +
@@ -358,7 +358,7 @@ export async function expectElementSelected(
(isSelected ? 'CheckCircleIcon' : 'RadioButtonUncheckedIcon') +
'"]',
true,
- timeout
+ timeout,
);
}
@@ -366,13 +366,13 @@ export async function expectElementExist(
selector,
exist = true,
timeout = 2000,
- parentSelector = undefined
+ parentSelector = undefined,
) {
let displayed;
if (parentSelector) {
const parentElement = await global.client.waitForSelector(parentSelector, {
timeout,
- state: 'visible'
+ state: 'visible',
});
displayed = await isDisplayed(selector, exist, timeout, parentElement);
} else {
@@ -384,11 +384,11 @@ export async function expectElementExist(
export async function createLocation(
locationPath,
locationName,
- isDefault = false
+ isDefault = false,
) {
// locationPerspective = locationPerspective || 'Grid';
const locationManagerMenu = await global.client.$(
- '[data-tid=locationManagerPanel]'
+ '[data-tid=locationManagerPanel]',
);
await locationManagerMenu.click();
const elem = await global.client.$('[data-tid=createNewLocation]');
@@ -396,27 +396,27 @@ export async function createLocation(
const lPath = await global.client.$('[data-tid=locationPath]');
await lPath.click();
const locationPathInput = await global.client.$(
- '[data-tid=locationPath] input'
+ '[data-tid=locationPath] input',
);
await locationPathInput.keys(locationPath || defaultLocationPath);
// keys is workarround for not working setValue await global.client.$('[data-tid=locationPath] input').setValue(locationPath || defaultLocationPath);
const lName = await global.client.$('[data-tid=locationName]');
await lName.click();
const locationNameInput = await global.client.$(
- '[data-tid=locationName] input'
+ '[data-tid=locationName] input',
);
locationNameInput.keys(
- locationName || 'Test Location' + new Date().getTime()
+ locationName || 'Test Location' + new Date().getTime(),
);
if (isDefault) {
await delay(1000);
const locationIsDefault = await global.client.$(
- '[data-tid=locationIsDefault]'
+ '[data-tid=locationIsDefault]',
);
await locationIsDefault.click();
}
const confirmLocationCreation = await global.client.$(
- '[data-tid=confirmLocationCreation]'
+ '[data-tid=confirmLocationCreation]',
);
await confirmLocationCreation.waitForDisplayed();
await confirmLocationCreation.click();
@@ -425,17 +425,17 @@ export async function createLocation(
export async function setGridOptions(
perspective = 'list',
showDirectories = true,
- entrySize = undefined
+ entrySize = undefined,
) {
// open Option menu
await clickOn('[data-tid=' + perspective + 'PerspectiveOptionsMenu]');
if (showDirectories) {
await global.client.check(
- '[data-tid=gridPerspectiveToggleShowDirectories] input'
+ '[data-tid=gridPerspectiveToggleShowDirectories] input',
);
} else {
await global.client.uncheck(
- '[data-tid=gridPerspectiveToggleShowDirectories] input'
+ '[data-tid=gridPerspectiveToggleShowDirectories] input',
);
}
@@ -470,7 +470,7 @@ export async function selectFilesByID(arrEntryIds = []) {
await clickOn('[data-tid=openListPerspective]');
for (let i = 0; i < arrEntryIds.length; i++) {
await clickOn(
- 'div[data-entry-id="' + arrEntryIds[i] + '"] div[data-tid=rowCellTID]'
+ 'div[data-entry-id="' + arrEntryIds[i] + '"] div[data-tid=rowCellTID]',
);
/* let entry = await global.client.$(
'[data-entry-id="' + arrEntryIds[i] + '"]'
@@ -506,7 +506,7 @@ export async function selectRowFiles(arrIndex = []) {
// const classNotSelected = await parent.getAttribute('class');
// const elNotSelected = await parent.$('//*[@class="' + classNotSelected + '"]');
await clickOn(
- 'div[data-entry-id="' + id + '"] div[data-tid=rowCellTID]'
+ 'div[data-entry-id="' + id + '"] div[data-tid=rowCellTID]',
);
// filesList[index].click();
// const selector = '//*[@class="' + classNotSelected + '"]';
@@ -523,7 +523,7 @@ export async function selectRowFiles(arrIndex = []) {
filesList.length +
' with index:' +
index +
- ' not exist'
+ ' not exist',
);
}
}
@@ -566,8 +566,8 @@ export async function holdDownKey(character) {
{
type: 'key',
id: 'keyboard',
- actions: [{ type: 'keyDown', value: character }]
- }
+ actions: [{ type: 'keyDown', value: character }],
+ },
]);
}
@@ -576,8 +576,8 @@ export async function releaseKey(character) {
{
type: 'key',
id: 'keyboard',
- actions: [{ type: 'keyUp', value: character }]
- }
+ actions: [{ type: 'keyUp', value: character }],
+ },
]);
}
@@ -672,7 +672,7 @@ export async function expectTagsExistBySelector(
selector,
arrTagNames,
exist = true,
- timeout = 500
+ timeout = 500,
) {
const gridElement = await global.client.waitForSelector(selector);
await expectTagsExist(gridElement, arrTagNames, exist);
@@ -697,7 +697,7 @@ export async function expectTagsExist(gridElement, arrTagNames, exist = true) {
export async function expectMetaFilesExist(
arrMetaFiles,
exist = true,
- subFolder = undefined
+ subFolder = undefined,
) {
await checkSettings('[data-tid=settingsSetShowUnixHiddenEntries]', true);
//await clickOn('[data-tid=folderContainerOpenDirMenu]');
@@ -717,7 +717,7 @@ export async function expectMetaFilesExist(
await expectElementExist(
getGridFileSelector(arrMetaFiles[i]),
exist,
- 10000
+ 10000,
);
}
await clickOn('[data-tid=gridPerspectiveOnBackButton]');
@@ -728,7 +728,7 @@ export async function expectMetaFilesExist(
await expectElementExist(
getGridFileSelector(AppConfig.metaFolder),
true,
- 10000
+ 10000,
);
await checkSettings('[data-tid=settingsSetShowUnixHiddenEntries]', false);
}
@@ -742,7 +742,7 @@ export async function writeTextInIframeInput(txt) {
export async function expectFileContain(
txtToContain = 'etete&5435',
- timeout = 10000
+ timeout = 10000,
) {
await expect
.poll(
@@ -754,8 +754,8 @@ export async function expectFileContain(
{
message: 'make sure bodyTxt contain ' + txtToContain, // custom error message
// Poll for 10 seconds; defaults to 5 seconds. Pass 0 to disable timeout.
- timeout: timeout
- }
+ timeout: timeout,
+ },
)
.toBe(true);
}
@@ -768,7 +768,7 @@ export async function expectFileContain(
*/
export async function waitForNotification(
tid = 'notificationTID',
- forceClose = true
+ forceClose = true,
) {
// await expectElementExist('[data-tid=' + tid + ']', true, 8000);
// const notificationTID = await global.client.$('[data-tid=' + tid + ']');
@@ -814,7 +814,7 @@ export async function setSettings(selector, click = false) {
export async function checkSettings(
selector,
isChecked = true,
- tabSelector = '[data-tid=generalSettingsDialog]'
+ tabSelector = '[data-tid=generalSettingsDialog]',
) {
await clickOn('[data-tid=settings]');
await clickOn(tabSelector);
@@ -964,7 +964,7 @@ export async function openCloseAboutDialog(title) {
// // should eventually equals('About HTML Viewer');
// expect(getTitle).toBe(title);
const closeAboutDialogButton = await global.client.$(
- '#closeAboutDialogButton'
+ '#closeAboutDialogButton',
);
await closeAboutDialogButton.waitForDisplayed();
await closeAboutDialogButton.click();
diff --git a/tests/e2e/general.pw.e2e.js b/tests/e2e/general.pw.e2e.js
index 90a316aa2..f4ad221e6 100644
--- a/tests/e2e/general.pw.e2e.js
+++ b/tests/e2e/general.pw.e2e.js
@@ -7,7 +7,7 @@ import {
defaultLocationPath,
defaultLocationName,
createPwMinioLocation,
- createPwLocation
+ createPwLocation,
} from './location.helpers';
import {
reloadDirectory,
@@ -25,7 +25,7 @@ import {
createTxtFile,
expectMetaFilesExist,
getGridFileSelector,
- isDisplayed
+ isDisplayed,
} from './general.helpers';
import { searchEngine } from './search.helpers';
import { startTestingApp, stopApp, testDataRefresh } from './hook';
@@ -74,7 +74,7 @@ test.describe('TST51 - Perspective Grid', () => {
await expectElementExist(
'[data-tid=fsEntryName_' + testFolder + ']',
true,
- 2000
+ 2000,
);
await global.client.dblclick('[data-tid=fsEntryName_' + testFolder + ']');
// create new file
@@ -89,7 +89,7 @@ test.describe('TST51 - Perspective Grid', () => {
await expectElementExist(
'[data-tid=fsEntryName_' + testFolder + ']',
false,
- 2000
+ 2000,
);
// await takeScreenshot('TST0501 after deleteDirectory');
});
@@ -99,7 +99,7 @@ test.describe('TST51 - Perspective Grid', () => {
await expectElementExist(
'[data-tid=fsEntryName_' + testFolder + ']',
true,
- 2000
+ 2000,
);
await global.client.dblclick('[data-tid=fsEntryName_' + testFolder + ']');
@@ -114,7 +114,7 @@ test.describe('TST51 - Perspective Grid', () => {
await expectElementExist(
'[data-tid=fsEntryName_' + testFolder + ']',
false,
- 2000
+ 2000,
);
// await takeScreenshot('TST0502 after deleteDirectory');
});
@@ -124,7 +124,7 @@ test.describe('TST51 - Perspective Grid', () => {
await expectElementExist(
'[data-tid=fsEntryName_' + testFolder + ']',
true,
- 2000
+ 2000,
);
await global.client.dblclick('[data-tid=fsEntryName_' + testFolder + ']');
@@ -139,15 +139,15 @@ test.describe('TST51 - Perspective Grid', () => {
await expectElementExist(
'[data-tid=fsEntryName_' + testFolder + ']',
false,
- 2000
+ 2000,
);
// await takeScreenshot('TST0503 after deleteDirectory');
});
test('TST0510 - Generate thumbnail from Images [electron]', async () => {
const metaFiles = AppConfig.ThumbGenSupportedFileTypes.image
- .filter(ext => ext !== 'ico' && ext !== 'tiff' && ext !== 'tif') // ico file thumbnail generation not work TODO in not PRO version tiff tif is not generated in tests environment only
- .map(imgExt => 'sample.' + imgExt + '.jpg');
+ .filter((ext) => ext !== 'ico' && ext !== 'tiff' && ext !== 'tif') // ico file thumbnail generation not work TODO in not PRO version tiff tif is not generated in tests environment only
+ .map((imgExt) => 'sample.' + imgExt + '.jpg');
await expectMetaFilesExist(metaFiles);
});
@@ -165,14 +165,14 @@ test.describe('TST51 - Perspective Grid', () => {
'#exifTableBody tr:has(th:has-text("GPSLatitude")) td',
true,
5000,
- frame
+ frame,
);
expect(latExists).toBeTruthy();
});
test('TST0511 - Generate thumbnail from Videos [electron]', async () => {
const metaFiles = AppConfig.ThumbGenSupportedFileTypes.video.map(
- imgExt => 'sample.' + imgExt + '.jpg'
+ (imgExt) => 'sample.' + imgExt + '.jpg',
);
await expectMetaFilesExist(metaFiles);
});
@@ -185,7 +185,7 @@ test.describe('TST51 - Perspective Grid', () => {
await expectMetaFilesExist([
'sample.odt.jpg',
'sample.ods.jpg',
- 'sample.epub.jpg'
+ 'sample.epub.jpg',
]);
});
diff --git a/tests/e2e/hook.js b/tests/e2e/hook.js
index baf28b978..2c753cc84 100644
--- a/tests/e2e/hook.js
+++ b/tests/e2e/hook.js
@@ -6,7 +6,8 @@ import fse from 'fs-extra';
// Spectron API https://github.com/electron/spectron
// Webdriver.io http://webdriver.io/api.html
-export const delay = time => new Promise(resolve => setTimeout(resolve, time));
+export const delay = (time) =>
+ new Promise((resolve) => setTimeout(resolve, time));
/**
* Returns a random integer between min (inclusive) and max (inclusive)
@@ -59,7 +60,7 @@ export async function clearLocalStorage() {
windowHandle.history.pushState('', title, windowHandle.location.pathname);
} else {
await global.app.webContents.executeJavaScript(
- "window.history.pushState('', document.title, window.location.pathname);localStorage.clear()"
+ "window.history.pushState('', document.title, window.location.pathname);localStorage.clear()",
);
global.app.webContents.reload();
}
@@ -74,14 +75,14 @@ export async function copyExtConfig(extconfig = 'extconfig-with-welcome.js') {
'..',
'..',
'scripts',
- global.isWeb ? 'web' + extconfig : extconfig
+ global.isWeb ? 'web' + extconfig : extconfig,
);
const destDir = pathLib.join(
__dirname,
'..',
'..',
global.isWeb ? 'web' : 'app',
- 'extconfig.js'
+ 'extconfig.js',
);
await fse.copy(srcDir, destDir);
}
@@ -93,8 +94,8 @@ export async function removeExtConfig() {
'..',
'..',
global.isWeb ? 'web' : 'app',
- 'extconfig.js'
- )
+ 'extconfig.js',
+ ),
);
}
@@ -110,7 +111,7 @@ export async function startTestingApp(extconfig) {
'--no-sandbox',
'--disable-dev-shm-usage',
'--disable-extensions',
- '--window-size=1920,1080'
+ '--window-size=1920,1080',
];
if (global.isHeadlessMode) {
chromeDriverArgs.push('--headless');
@@ -120,11 +121,11 @@ export async function startTestingApp(extconfig) {
const { webkit, chromium } = require('playwright');
global.app = await chromium.launch({
headless: global.isHeadlessMode,
- slowMo: 50
+ slowMo: 50,
}); //browser
global.context = await global.app.newContext({
- viewport: { width: 1920, height: 1080 }
+ viewport: { width: 1920, height: 1080 },
});
global.client = await global.context.newPage(); //page
@@ -145,14 +146,14 @@ export async function startTestingApp(extconfig) {
// '--enable-logging', // after enabling cmd windows appears in Windows
'--ignore-certificate-errors',
'--ignore-ssl-errors',
- '--disable-dev-shm-usage'
+ '--disable-dev-shm-usage',
],
bypassCSP: true,
env: {
ELECTRON_ENABLE_LOGGING: true,
- ELECTRON_ENABLE_STACK_DUMPING: true
+ ELECTRON_ENABLE_STACK_DUMPING: true,
// NODE_ENV: 'test'
- }
+ },
});
// Get the Electron context.
@@ -187,7 +188,7 @@ export async function testDataRefresh() {
'..',
'testdata',
'file-structure',
- 'supported-filestypes'
+ 'supported-filestypes',
);
const dst = pathLib.join(__dirname, '..', 'testdata-tmp', 'file-structure');
@@ -199,7 +200,7 @@ export async function testDataRefresh() {
export async function createFile(
fileName = 'empty_file.html',
fileContent = undefined,
- rootFolder = 'empty_folder'
+ rootFolder = 'empty_folder',
) {
const filePath = pathLib.join(
__dirname,
@@ -208,7 +209,7 @@ export async function createFile(
'file-structure',
'supported-filestypes',
rootFolder,
- fileName
+ fileName,
);
try {
diff --git a/tests/e2e/key-bindings.pw.e2e.js b/tests/e2e/key-bindings.pw.e2e.js
index 438ecafcf..4a16049a2 100644
--- a/tests/e2e/key-bindings.pw.e2e.js
+++ b/tests/e2e/key-bindings.pw.e2e.js
@@ -8,7 +8,7 @@ import {
expectElementExist,
selectorFile,
setInputValue,
- takeScreenshot
+ takeScreenshot,
} from './general.helpers';
import { startTestingApp, stopApp, testDataRefresh } from './hook';
import { clearDataStorage } from './welcome.helpers';
diff --git a/tests/e2e/location.helpers.js b/tests/e2e/location.helpers.js
index 405a8b9eb..e941f542c 100644
--- a/tests/e2e/location.helpers.js
+++ b/tests/e2e/location.helpers.js
@@ -9,7 +9,7 @@ import {
selectorFile,
setInputKeys,
takeScreenshot,
- waitForNotification
+ waitForNotification,
} from './general.helpers';
export const defaultLocationPath =
@@ -24,7 +24,7 @@ export const minioEndpointURL = 'http://127.0.0.1:9000';
export async function createPwMinioLocation(
locationPath,
locationName,
- isDefault = false
+ isDefault = false,
) {
const lastLocationTID = await getPwLocationTid(-1);
// Check if location not exist (from extconfig.js)
@@ -39,13 +39,13 @@ export async function createPwMinioLocation(
// SET LOCATION NAME
await global.client.fill(
'[data-tid=locationName] input',
- locationName || 'Test Location' + new Date().getTime()
+ locationName || 'Test Location' + new Date().getTime(),
);
await global.client.fill('[data-tid=locationPath] input', locationPath);
await global.client.fill('[data-tid=accessKeyId] input', minioAccessKey);
await global.client.fill(
'[data-tid=secretAccessKey] input',
- minioSecretAccessKey
+ minioSecretAccessKey,
);
await global.client.fill('[data-tid=bucketName] input', locationName);
await global.client.fill('[data-tid=endpointURL] input', minioEndpointURL);
@@ -61,7 +61,7 @@ export async function createPwMinioLocation(
export async function createPwLocation(
locationPath,
locationName,
- isDefault = false
+ isDefault = false,
) {
const lastLocationTID = await getPwLocationTid(-1);
// Check if location not exist (from extconfig.js)
@@ -73,7 +73,7 @@ export async function createPwLocation(
await setInputKeys(
'locationName',
locationName || 'Test Location' + new Date().getTime(),
- 20
+ 20,
);
if (isDefault) {
@@ -127,7 +127,7 @@ export async function closeLocation(locationName = undefined) {
export async function openLocation(locationName) {
await delay(500);
const lName = await global.client.$(
- '[data-tid=location_' + locationName || defaultLocationName + ']'
+ '[data-tid=location_' + locationName || defaultLocationName + ']',
);
// await delay(1500);
await lName.waitForDisplayed();
@@ -161,7 +161,7 @@ export async function checkForIdExist(tid) {
export async function renameFileFromMenu(newFileName, selector = selectorFile) {
await openContextEntryMenu(selector, 'fileMenuRenameFile');
const fileName = await global.client.inputValue(
- '[data-tid=renameEntryDialogInput] input'
+ '[data-tid=renameEntryDialogInput] input',
);
await setInputKeys('renameEntryDialogInput', newFileName);
@@ -184,7 +184,7 @@ export async function getFirstFileName() {
let fileName;
await openContextEntryMenu(selectorFile, 'fileMenuRenameFile');
const renameFileDialogInput = await global.client.$(
- '[data-tid=renameEntryDialogInput] input'
+ '[data-tid=renameEntryDialogInput] input',
);
await renameFileDialogInput.waitForDisplayed({ timeout: 5000 });
fileName = await renameFileDialogInput.getValue();
@@ -240,7 +240,7 @@ export async function getLocationTid(locationIndex) {
'//!*[@data-tid="locationList"]/div'
);*/
const locationList = await global.client.$$(
- '[data-tid=locationTitleElement]'
+ '[data-tid=locationTitleElement]',
);
const location =
locationIndex < 0
@@ -262,14 +262,14 @@ export async function getPwLocationTid(locationIndex) {
try {
await global.client.waitForSelector('[data-tid=locationTitleElement]', {
// state: 'attached',
- timeout: 4000
+ timeout: 4000,
});
} catch (error) {
console.log("The element didn't appear.");
return undefined;
}
const locationList = await global.client.$$(
- '[data-tid=locationTitleElement]'
+ '[data-tid=locationTitleElement]',
);
const location =
locationIndex < 0
diff --git a/tests/e2e/location.pw.e2e.js b/tests/e2e/location.pw.e2e.js
index 9719b8092..a918cffb9 100644
--- a/tests/e2e/location.pw.e2e.js
+++ b/tests/e2e/location.pw.e2e.js
@@ -6,13 +6,13 @@ import {
startupLocation,
getPwLocationTid,
createPwMinioLocation,
- createPwLocation
+ createPwLocation,
} from './location.helpers';
import {
clickOn,
expectElementExist,
setInputKeys,
- takeScreenshot
+ takeScreenshot,
} from './general.helpers';
import { startTestingApp, stopApp, testDataRefresh } from './hook';
import { clearDataStorage } from './welcome.helpers';
@@ -62,7 +62,7 @@ test.describe('TST03 - Testing locations:', () => {
await expectElementExist(
'[data-tid=location_' + testLocationName + ']',
true,
- 1500
+ 1500,
);
});
@@ -80,7 +80,7 @@ test.describe('TST03 - Testing locations:', () => {
//await locationList.waitForDisplayed();
await expectElementExist(
'[data-tid=location_' + testLocationName + ']',
- false
+ false,
);
});
@@ -101,7 +101,7 @@ test.describe('TST03 - Testing locations:', () => {
await expectElementExist(
'[data-tid=location_' + newLocationName + ']',
true,
- 5000
+ 5000,
);
});
diff --git a/tests/e2e/markdown-editor.pw.e2e.js b/tests/e2e/markdown-editor.pw.e2e.js
index c11b6ca9e..975e04d59 100644
--- a/tests/e2e/markdown-editor.pw.e2e.js
+++ b/tests/e2e/markdown-editor.pw.e2e.js
@@ -6,14 +6,14 @@ import {
defaultLocationPath,
defaultLocationName,
createPwMinioLocation,
- createPwLocation
+ createPwLocation,
} from './location.helpers';
import {
clickOn,
frameLocator,
getGridFileSelector,
isDisplayed,
- takeScreenshot
+ takeScreenshot,
} from './general.helpers';
import { startTestingApp, stopApp, testDataRefresh } from './hook';
import { openContextEntryMenu, toContainTID } from './test-utils';
@@ -52,7 +52,7 @@ test.describe('TST69 - Markdown editor', () => {
test('TST6901 - Open and render md file [web,minio,electron]', async () => {
await openContextEntryMenu(
getGridFileSelector('sample.md'),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
await expect
.poll(
@@ -64,8 +64,8 @@ test.describe('TST69 - Markdown editor', () => {
{
message: 'make sure bodyTxt contain etete&5435', // custom error message
// Poll for 10 seconds; defaults to 5 seconds. Pass 0 to disable timeout.
- timeout: 10000
- }
+ timeout: 10000,
+ },
)
.toBe(true);
});
@@ -73,7 +73,7 @@ test.describe('TST69 - Markdown editor', () => {
test('TST6902 - Open settings [web,minio,electron]', async () => {
await openContextEntryMenu(
getGridFileSelector('sample.md'),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
// Access the iframe
@@ -87,7 +87,7 @@ test.describe('TST69 - Markdown editor', () => {
'#settings-dialog-title',
true,
2000,
- frame
+ frame,
);
expect(settingsExists).toBeTruthy();
@@ -97,7 +97,7 @@ test.describe('TST69 - Markdown editor', () => {
'#settings-dialog-title',
false,
2000,
- frame
+ frame,
);
expect(settingsExists).toBeTruthy();
});
diff --git a/tests/e2e/perspective-grid-right-button.pw.e2e.js b/tests/e2e/perspective-grid-right-button.pw.e2e.js
index 89073c0d5..9aec38055 100644
--- a/tests/e2e/perspective-grid-right-button.pw.e2e.js
+++ b/tests/e2e/perspective-grid-right-button.pw.e2e.js
@@ -9,7 +9,7 @@ import {
renameFileFromMenu,
deleteFileFromMenu,
createPwMinioLocation,
- createPwLocation
+ createPwLocation,
} from './location.helpers';
import { searchEngine } from './search.helpers';
import { openContextEntryMenu, toContainTID } from './test-utils';
@@ -29,7 +29,7 @@ import {
setGridOptions,
showFilesWithTag,
frameLocator,
- takeScreenshot
+ takeScreenshot,
} from './general.helpers';
import { AddRemoveTagsToSelectedFiles } from './perspective-grid.helpers';
import { startTestingApp, stopApp, testDataRefresh } from './hook';
@@ -71,7 +71,7 @@ test.describe('TST50** - Right button on a file', () => {
// await searchEngine('txt');
await openContextEntryMenu(
getGridFileSelector('sample.txt'), // perspectiveGridTable + firstFile,
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
// await takeScreenshot('fileMenuOpenFile');
await expect
@@ -84,8 +84,8 @@ test.describe('TST50** - Right button on a file', () => {
{
message: 'make sure bodyTxt contain etete&5435', // custom error message
// Poll for 10 seconds; defaults to 5 seconds. Pass 0 to disable timeout.
- timeout: 10000
- }
+ timeout: 10000,
+ },
)
.toBe(true);
// await takeScreenshot('bodyTxt_fileMenuOpenFile');
@@ -121,7 +121,7 @@ test.describe('TST50** - Right button on a file', () => {
const sampleFileName = 'sample.txt';
const oldName = await renameFileFromMenu(
newFileName,
- getGridFileSelector(sampleFileName)
+ getGridFileSelector(sampleFileName),
);
expect(oldName).toBe(sampleFileName);
@@ -134,7 +134,7 @@ test.describe('TST50** - Right button on a file', () => {
// rename back to oldName
const fileName = await renameFileFromMenu(
oldName,
- getGridFileSelector(newFileName + fileExtension)
+ getGridFileSelector(newFileName + fileExtension),
);
expect(fileName).toBe(newFileName + fileExtension);
});
@@ -164,7 +164,7 @@ test.describe('TST50** - Right button on a file', () => {
'[data-tid=tagContainer_' + testTagName + ']',
true,
8000,
- '[data-tid=perspectiveGridFileTable]'
+ '[data-tid=perspectiveGridFileTable]',
);
// await expectTagsExistBySelector(selectorFile, [testTagName], true);
@@ -183,7 +183,7 @@ test.describe('TST50** - Right button on a file', () => {
'[data-tid=tagContainer_' + testTagName + 'Edited]',
true,
8000,
- '[data-tid=perspectiveGridFileTable]'
+ '[data-tid=perspectiveGridFileTable]',
);
await testDataRefresh();
// cleanup
@@ -214,7 +214,7 @@ test.describe('TST50** - Right button on a file', () => {
'[data-tid=tagContainer_' + testTagName + ']',
true,
8000,
- '[data-tid=perspectiveGridFileTable]'
+ '[data-tid=perspectiveGridFileTable]',
);
// await expectTagsExistBySelector(selectorFile, [testTagName], true);
@@ -223,7 +223,7 @@ test.describe('TST50** - Right button on a file', () => {
'[data-tid=tagContainer_' + testTagName + ']',
false,
8000,
- '[data-tid=perspectiveGridFileTable]'
+ '[data-tid=perspectiveGridFileTable]',
);
// await expectTagsExistBySelector(selectorFile, [testTagName], false);
});
@@ -252,7 +252,7 @@ test.describe('TST50** - Right button on a file', () => {
await expectElementExist(
'[data-tid=tagMoreButton_' + testTagName + ']',
false,
- 5000
+ 5000,
);
/* const classNotSelected = await getGridCellClass(0);
@@ -283,7 +283,7 @@ test.describe('TST50** - Right button on a file', () => {
await AddRemoveTagsToSelectedFiles('grid', tags, true);
let gridElement = await global.client.waitForSelector(
- getGridFileSelector(generateFileName(fileName, fileExt, tags, ' '))
+ getGridFileSelector(generateFileName(fileName, fileExt, tags, ' ')),
);
gridElement = await gridElement.$('..');
for (let i = 0; i < tags.length; i++) {
@@ -297,7 +297,7 @@ test.describe('TST50** - Right button on a file', () => {
for (let i = 0; i < tags.length; i++) {
await expectElementExist(
'[data-tid=tagContainer_' + tags[i] + ']',
- false
+ false,
);
}
/*gridElement = await global.client.waitForSelector(
@@ -359,7 +359,7 @@ test.describe('TST50** - Right button on a file', () => {
//await global.client.dblclick(selectorFolder);
await openContextEntryMenu(
getGridFileSelector(folderName),
- 'openDirectory'
+ 'openDirectory',
);
await expectElementExist(getGridFileSelector(fileName), true);
@@ -378,7 +378,7 @@ test.describe('TST50** - Right button on a file', () => {
// await global.client.dblclick(selectorFolder);
await openContextEntryMenu(
getGridFileSelector(folderName),
- 'openDirectory'
+ 'openDirectory',
);
await expectElementExist(selectorFile, true);
await deleteFileFromMenu();
@@ -425,7 +425,7 @@ test.describe('TST50** - Right button on a file', () => {
await expectElementExist(
'[data-tid=fsEntryName_' + testFolder + ']',
- false
+ false,
);
// dir back to check if parent folder exist
// await clickOn('[data-tid=gridPerspectiveOnBackButton]');
@@ -499,13 +499,13 @@ test.describe('TST50** - Right button on a file', () => {
// '[data-tid=' + gridDefaultSettings.testID + ']',
'[data-tid=gridPerspectiveContainer]',
true,
- 5000
+ 5000,
);
await clickOn('[data-tid=openListPerspective]'); // openListPerspective
await expectElementExist(
// '[data-tid=' + listDefaultSettings.testID + ']',
'[data-tid=listPerspectiveContainer]',
- true
+ true,
);
});
diff --git a/tests/e2e/perspective-grid-sort.pw.e2e.js b/tests/e2e/perspective-grid-sort.pw.e2e.js
index 8be8baabf..a098e54a0 100644
--- a/tests/e2e/perspective-grid-sort.pw.e2e.js
+++ b/tests/e2e/perspective-grid-sort.pw.e2e.js
@@ -6,7 +6,7 @@ import {
defaultLocationPath,
defaultLocationName,
createPwMinioLocation,
- createPwLocation
+ createPwLocation,
} from './location.helpers';
import { clickOn, getGridFileName, takeScreenshot } from './general.helpers';
@@ -43,100 +43,97 @@ test.beforeEach(async () => {
});
// Scenarios for sorting files in grid perspective
-test.describe(
- 'TST5003 - Testing sort files in the grid perspective [web,minio,electron]',
- () => {
- test('TST10xx - Sort by name [web,minio,electron]', async () => {
- // DESC
- await clickOn('[data-tid=gridPerspectiveSortByName]');
- let sorted = getDirEntries('byName', false);
- for (let i = 0; i < sorted.length; i += 1) {
- const fileName = await getGridFileName(i);
- expect(fileName).toBe(sorted[i].name); //'sample_exif.jpg');
- }
-
- // ASC
- await clickOn('[data-tid=gridPerspectiveSortMenu]');
- await clickOn('[data-tid=gridPerspectiveSortByName]');
-
- sorted = getDirEntries('byName', true);
- for (let i = 0; i < sorted.length; i += 1) {
- const fileName = await getGridFileName(i);
- expect(fileName).toBe(sorted[i].name); //'sample.avif');
- }
- });
-
- test('TST10xx - Sort by size [web,minio,electron]', async () => {
- await clickOn('[data-tid=gridPerspectiveSortBySize]');
- // DESC
- let sorted = getDirEntries('byFileSize', true);
- for (let i = 0; i < sorted.length; i += 1) {
- const fileName = await getGridFileName(i);
- expect(fileName).toBe(sorted[i].name); //'sample.csv');
- }
-
- // ASC
- await clickOn('[data-tid=gridPerspectiveSortMenu]');
- await clickOn('[data-tid=gridPerspectiveSortBySize]');
- sorted = getDirEntries('byFileSize', false);
- for (let i = 0; i < sorted.length; i += 1) {
- const fileName = await getGridFileName(i);
- expect(fileName).toBe(sorted[i].name); //'sample.nef');
- }
- });
-
- test('TST10xx - Sort by date [web,minio,electron]', async () => {
- await clickOn('[data-tid=gridPerspectiveSortByDate]');
-
- let sorted = getDirEntries('byDateModified', true);
- for (let i = 0; i < sorted.length; i += 1) {
- const fileName = await getGridFileName(i);
- expect(fileName).toBe(sorted[i].name);
- }
-
- // ASC
- await clickOn('[data-tid=gridPerspectiveSortMenu]');
- await clickOn('[data-tid=gridPerspectiveSortByDate]');
-
- sorted = getDirEntries('byDateModified', false);
- for (let i = 0; i < sorted.length; i += 1) {
- const fileName = await getGridFileName(i);
- expect(fileName).toBe(sorted[i].name);
- }
- });
-
- test('TST10xx - Sort by extension [web,minio,electron]', async () => {
- await clickOn('[data-tid=gridPerspectiveSortByExt]');
- let sorted = getDirEntries('byExtension', true);
- for (let i = 0; i < sorted.length; i += 1) {
- const fileName = await getGridFileName(i);
- expect(fileName).toBe(sorted[i].name);
- }
-
- await clickOn('[data-tid=gridPerspectiveSortMenu]');
- await clickOn('[data-tid=gridPerspectiveSortByExt]');
- sorted = getDirEntries('byExtension', false);
- for (let i = 0; i < sorted.length; i += 1) {
- const fileName = await getGridFileName(i);
- expect(fileName).toBe(sorted[i].name);
- }
- });
-
- test('TST10xx - Sort by tags [web,minio,electron]', async () => {
- await clickOn('[data-tid=gridPerspectiveSortByFirstTag]');
- let sorted = getDirEntries('byFirstTag', true);
- for (let i = 0; i < sorted.length; i += 1) {
- const fileName = await getGridFileName(i);
- expect(fileName).toBe(sorted[i].name);
- }
- // ASC
- await clickOn('[data-tid=gridPerspectiveSortMenu]');
- await clickOn('[data-tid=gridPerspectiveSortByFirstTag]');
- sorted = getDirEntries('byFirstTag', false);
- for (let i = 0; i < sorted.length; i += 1) {
- const fileName = await getGridFileName(i);
- expect(fileName).toBe(sorted[i].name);
- }
- });
- }
-);
+test.describe('TST5003 - Testing sort files in the grid perspective [web,minio,electron]', () => {
+ test('TST10xx - Sort by name [web,minio,electron]', async () => {
+ // DESC
+ await clickOn('[data-tid=gridPerspectiveSortByName]');
+ let sorted = getDirEntries('byName', false);
+ for (let i = 0; i < sorted.length; i += 1) {
+ const fileName = await getGridFileName(i);
+ expect(fileName).toBe(sorted[i].name); //'sample_exif.jpg');
+ }
+
+ // ASC
+ await clickOn('[data-tid=gridPerspectiveSortMenu]');
+ await clickOn('[data-tid=gridPerspectiveSortByName]');
+
+ sorted = getDirEntries('byName', true);
+ for (let i = 0; i < sorted.length; i += 1) {
+ const fileName = await getGridFileName(i);
+ expect(fileName).toBe(sorted[i].name); //'sample.avif');
+ }
+ });
+
+ test('TST10xx - Sort by size [web,minio,electron]', async () => {
+ await clickOn('[data-tid=gridPerspectiveSortBySize]');
+ // DESC
+ let sorted = getDirEntries('byFileSize', true);
+ for (let i = 0; i < sorted.length; i += 1) {
+ const fileName = await getGridFileName(i);
+ expect(fileName).toBe(sorted[i].name); //'sample.csv');
+ }
+
+ // ASC
+ await clickOn('[data-tid=gridPerspectiveSortMenu]');
+ await clickOn('[data-tid=gridPerspectiveSortBySize]');
+ sorted = getDirEntries('byFileSize', false);
+ for (let i = 0; i < sorted.length; i += 1) {
+ const fileName = await getGridFileName(i);
+ expect(fileName).toBe(sorted[i].name); //'sample.nef');
+ }
+ });
+
+ test('TST10xx - Sort by date [web,minio,electron]', async () => {
+ await clickOn('[data-tid=gridPerspectiveSortByDate]');
+
+ let sorted = getDirEntries('byDateModified', true);
+ for (let i = 0; i < sorted.length; i += 1) {
+ const fileName = await getGridFileName(i);
+ expect(fileName).toBe(sorted[i].name);
+ }
+
+ // ASC
+ await clickOn('[data-tid=gridPerspectiveSortMenu]');
+ await clickOn('[data-tid=gridPerspectiveSortByDate]');
+
+ sorted = getDirEntries('byDateModified', false);
+ for (let i = 0; i < sorted.length; i += 1) {
+ const fileName = await getGridFileName(i);
+ expect(fileName).toBe(sorted[i].name);
+ }
+ });
+
+ test('TST10xx - Sort by extension [web,minio,electron]', async () => {
+ await clickOn('[data-tid=gridPerspectiveSortByExt]');
+ let sorted = getDirEntries('byExtension', true);
+ for (let i = 0; i < sorted.length; i += 1) {
+ const fileName = await getGridFileName(i);
+ expect(fileName).toBe(sorted[i].name);
+ }
+
+ await clickOn('[data-tid=gridPerspectiveSortMenu]');
+ await clickOn('[data-tid=gridPerspectiveSortByExt]');
+ sorted = getDirEntries('byExtension', false);
+ for (let i = 0; i < sorted.length; i += 1) {
+ const fileName = await getGridFileName(i);
+ expect(fileName).toBe(sorted[i].name);
+ }
+ });
+
+ test('TST10xx - Sort by tags [web,minio,electron]', async () => {
+ await clickOn('[data-tid=gridPerspectiveSortByFirstTag]');
+ let sorted = getDirEntries('byFirstTag', true);
+ for (let i = 0; i < sorted.length; i += 1) {
+ const fileName = await getGridFileName(i);
+ expect(fileName).toBe(sorted[i].name);
+ }
+ // ASC
+ await clickOn('[data-tid=gridPerspectiveSortMenu]');
+ await clickOn('[data-tid=gridPerspectiveSortByFirstTag]');
+ sorted = getDirEntries('byFirstTag', false);
+ for (let i = 0; i < sorted.length; i += 1) {
+ const fileName = await getGridFileName(i);
+ expect(fileName).toBe(sorted[i].name);
+ }
+ });
+});
diff --git a/tests/e2e/perspective-grid.helpers.js b/tests/e2e/perspective-grid.helpers.js
index 08e30a906..ab7a7354b 100644
--- a/tests/e2e/perspective-grid.helpers.js
+++ b/tests/e2e/perspective-grid.helpers.js
@@ -2,11 +2,11 @@ import { clickOn, isDisplayed, setInputKeys } from './general.helpers';
import {
cleanFileName,
extractFileExtension,
- extractTagsAsObjects
+ extractTagsAsObjects,
} from '@tagspaces/tagspaces-common/paths';
import {
dirSeparator,
- tagDelimiter
+ tagDelimiter,
} from '@tagspaces/tagspaces-common/AppConfig';
import { sortByCriteria } from '@tagspaces/tagspaces-common/misc';
@@ -21,7 +21,7 @@ import { sortByCriteria } from '@tagspaces/tagspaces-common/misc';
export async function AddRemoveTagsToSelectedFiles(
perspective = 'grid',
tagNames = ['test-tag'], // TODO fix camelCase tag name
- addTag = true
+ addTag = true,
) {
await clickOn('[data-tid=' + perspective + 'PerspectiveAddRemoveTags]');
@@ -53,11 +53,11 @@ export async function getDirEntries(sortCriteria, sortAsc) {
'..',
'testdata-tmp',
'file-structure',
- 'supported-filestypes'
+ 'supported-filestypes',
);
const dirEntries = (await fs.readdir(testDir, { withFileTypes: true }))
- .filter(item => !item.isDirectory() && !item.name.startsWith('.'))
- .map(item => {
+ .filter((item) => !item.isDirectory() && !item.name.startsWith('.'))
+ .map((item) => {
const entryPath = testDir + dirSeparator + item.name;
const stats = fs.statSync(entryPath);
return {
@@ -66,7 +66,7 @@ export async function getDirEntries(sortCriteria, sortAsc) {
size: stats.size,
lmdt: stats.mtime.getTime ? stats.mtime.getTime() : stats.mtime,
extension: extractFileExtension(item.name, dirSeparator),
- tags: extractTagsAsObjects(item.name, tagDelimiter, dirSeparator)
+ tags: extractTagsAsObjects(item.name, tagDelimiter, dirSeparator),
};
});
return sortByCriteria(dirEntries, sortCriteria, sortAsc);
diff --git a/tests/e2e/perspective-grid.pw.e2e.js b/tests/e2e/perspective-grid.pw.e2e.js
index 33f0ea821..33f2c57cf 100644
--- a/tests/e2e/perspective-grid.pw.e2e.js
+++ b/tests/e2e/perspective-grid.pw.e2e.js
@@ -7,7 +7,7 @@ import {
defaultLocationName,
deleteFileFromMenu,
createPwMinioLocation,
- createPwLocation
+ createPwLocation,
} from './location.helpers';
import {
clickOn,
@@ -23,12 +23,12 @@ import {
selectRowFiles,
setInputKeys,
setSettings,
- takeScreenshot
+ takeScreenshot,
} from './general.helpers';
import { AddRemoveTagsToSelectedFiles } from './perspective-grid.helpers';
import {
AddRemovePropertiesTags,
- getPropertiesFileName
+ getPropertiesFileName,
} from './file.properties.helpers';
import { createFile, startTestingApp, stopApp, testDataRefresh } from './hook';
import { clearDataStorage } from './welcome.helpers';
@@ -114,7 +114,7 @@ test.describe('TST50 - Perspective Grid', () => {
await expectElementExist(
'[data-tid=tagContainer_' + tags[i] + ']',
true,
- 5000
+ 5000,
);
// const selectBox = await global.client.$('[data-tid=perspectiveGridFileTable]');
/* await expectTagsExistBySelector(
@@ -133,7 +133,7 @@ test.describe('TST50 - Perspective Grid', () => {
await expectElementExist(
'[data-tid=tagContainer_' + tags[i] + ']',
false,
- 5000
+ 5000,
);
/*await expectTagsExistBySelector(
'[data-entry-id="' + selectedIds[i] + '"]',
@@ -160,7 +160,7 @@ test.describe('TST50 - Perspective Grid', () => {
await expectElementExist(
'[data-tid=tagMoreButton_' + tags[i] + ']',
false,
- 5000
+ 5000,
);
}
/* for (let i = 0; i < selectedIds.length; i++) {
@@ -182,7 +182,7 @@ test.describe('TST50 - Perspective Grid', () => {
await setSettings('[data-tid=settingsSetPersistTagsInSidecarFile]', true);
await AddRemovePropertiesTags(['test-tag1', 'test-tag2'], {
add: true,
- remove: false
+ remove: false,
});
// open Copy/Move File Dialog
await clickOn('[data-tid=gridPerspectiveCopySelectedFiles]');
@@ -217,7 +217,7 @@ test.describe('TST50 - Perspective Grid', () => {
await setSettings('[data-tid=settingsSetPersistTagsInSidecarFile]', true);
await AddRemovePropertiesTags(['test-tag1', 'test-tag2'], {
add: true,
- remove: false
+ remove: false,
});
// open Copy/Move File Dialog
await clickOn('[data-tid=gridPerspectiveCopySelectedFiles]');
@@ -255,7 +255,7 @@ test.describe('TST50 - Perspective Grid', () => {
await expectElementExist(
'[data-entry-id="' + selectedIds[i] + '"]',
false,
- 5000
+ 5000,
);
}
});
diff --git a/tests/e2e/quick-access.pw.e2e.js b/tests/e2e/quick-access.pw.e2e.js
index b3f891c92..4df34c5e1 100644
--- a/tests/e2e/quick-access.pw.e2e.js
+++ b/tests/e2e/quick-access.pw.e2e.js
@@ -6,7 +6,7 @@ import {
defaultLocationPath,
defaultLocationName,
createPwMinioLocation,
- createPwLocation
+ createPwLocation,
} from './location.helpers';
import {
clickOn,
@@ -15,7 +15,7 @@ import {
getGridFileSelector,
rightClickOn,
setInputKeys,
- takeScreenshot
+ takeScreenshot,
} from './general.helpers';
import { startTestingApp, stopApp, testDataRefresh } from './hook';
import { createSavedSearch, searchEngine } from './search.helpers';
@@ -60,21 +60,21 @@ test.describe('TST09 - Quick access', () => {
await clickOn('[data-tid=quickAccessButton]');
// await clickOn('[data-tid=storedSearchesVisibleTID]');
await expectElementExist(
- '[data-tid=StoredSearchTID' + storedSearchTitle + ']'
+ '[data-tid=StoredSearchTID' + storedSearchTitle + ']',
);
// Rename
await clickOn('[data-tid=editSearchTID]');
await setInputKeys('savedSearchTID', 'Renamed');
await clickOn('[data-tid=confirmSavedSearchTID]');
await expectElementExist(
- '[data-tid=StoredSearchTID' + storedSearchTitle + 'Renamed]'
+ '[data-tid=StoredSearchTID' + storedSearchTitle + 'Renamed]',
);
//Delete
await clickOn('[data-tid=editSearchTID]');
await clickOn('[data-tid=deleteSavedSearchTID]');
await expectElementExist(
'[data-tid=StoredSearchTID' + storedSearchTitle + 'Renamed]',
- false
+ false,
);
});
@@ -86,7 +86,7 @@ test.describe('TST09 - Quick access', () => {
await clickOn('[data-tid=quickAccessButton]');
// await clickOn('[data-tid=storedSearchesVisibleTID]');
await expectElementExist(
- '[data-tid=StoredSearchTID' + storedSearchTitle + ']'
+ '[data-tid=StoredSearchTID' + storedSearchTitle + ']',
);
// Execute
await clickOn('[data-tid=StoredSearchTID' + storedSearchTitle + ']');
@@ -97,7 +97,7 @@ test.describe('TST09 - Quick access', () => {
await clickOn('[data-tid=deleteSavedSearchTID]');
await expectElementExist(
'[data-tid=StoredSearchTID' + storedSearchTitle + ']',
- false
+ false,
);
});
@@ -106,7 +106,7 @@ test.describe('TST09 - Quick access', () => {
const bookmarkFileTid = dataTidFormat(bookmarkFileTitle);
await openContextEntryMenu(
getGridFileSelector(bookmarkFileTitle), // todo rethink selector here contain dot
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
// Create
@@ -116,7 +116,7 @@ test.describe('TST09 - Quick access', () => {
// Open
await clickOn('[data-tid=quickAccessButton]');
await expectElementExist(
- '[data-tid=tsBookmarksTID' + bookmarkFileTid + ']'
+ '[data-tid=tsBookmarksTID' + bookmarkFileTid + ']',
);
await clickOn('[data-tid=tsBookmarksTID' + bookmarkFileTid + ']');
await expectElementExist('[data-tid=OpenedTID' + bookmarkFileTid + ']');
@@ -131,7 +131,7 @@ test.describe('TST09 - Quick access', () => {
await expectElementExist(
'[data-tid=tsBookmarksTID' + bookmarkFileTid + ']',
- false
+ false,
);
});
@@ -161,7 +161,7 @@ test.describe('TST09 - Quick access', () => {
await expectElementExist(
'[data-tid=tsBookmarksTID' + testFolder + ']',
- false
+ false,
);
});
@@ -171,7 +171,7 @@ test.describe('TST09 - Quick access', () => {
for (let i = 0; i < bookmarks.length; i++) {
await openContextEntryMenu(
getGridFileSelector(bookmarks[i]),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
// Create
@@ -182,7 +182,7 @@ test.describe('TST09 - Quick access', () => {
await clickOn('[data-tid=refreshBookmarksTID]');
await expectElementExist(
- '[data-tid=tsBookmarksTID' + dataTidFormat(bookmarks[i]) + ']'
+ '[data-tid=tsBookmarksTID' + dataTidFormat(bookmarks[i]) + ']',
);
}
@@ -192,7 +192,7 @@ test.describe('TST09 - Quick access', () => {
for (let i = 0; i < bookmarks.length; i++) {
await expectElementExist(
'[data-tid=tsBookmarksTID' + dataTidFormat(bookmarks[i]) + ']',
- false
+ false,
);
}
});
@@ -202,7 +202,7 @@ test.describe('TST09 - Quick access', () => {
const fileTid = dataTidFormat(fileTitle);
await openContextEntryMenu(
getGridFileSelector(fileTitle),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
await clickOn('[data-tid=fileContainerCloseOpenedFile]');
@@ -210,7 +210,7 @@ test.describe('TST09 - Quick access', () => {
await clickOn('[data-tid=quickAccessButton]');
await clickOn('[data-tid=fileOpenHistoryTID]');
await expectElementExist(
- '[data-tid=tsLastOpenedFilesHistoryTID' + fileTid + ']'
+ '[data-tid=tsLastOpenedFilesHistoryTID' + fileTid + ']',
);
await clickOn('[data-tid=tsLastOpenedFilesHistoryTID' + fileTid + ']');
await expectElementExist('[data-tid=OpenedTID' + fileTid + ']');
@@ -220,7 +220,7 @@ test.describe('TST09 - Quick access', () => {
await clickOn('[data-tid=clearHistoryTID]');
await expectElementExist(
'[data-tid=tsLastOpenedFilesHistoryTID' + fileTid + ']',
- false
+ false,
);
});
@@ -234,14 +234,14 @@ test.describe('TST09 - Quick access', () => {
const fileTid = dataTidFormat(files[i]);
await openContextEntryMenu(
getGridFileSelector(files[i]),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
await clickOn('[data-tid=fileContainerCloseOpenedFile]');
// Refresh opened files
await clickOn('[data-tid=fileOpenMenuTID]');
await clickOn('[data-tid=refreshHistoryTID]');
await expectElementExist(
- '[data-tid=tsLastOpenedFilesHistoryTID' + fileTid + ']'
+ '[data-tid=tsLastOpenedFilesHistoryTID' + fileTid + ']',
);
}
@@ -251,7 +251,7 @@ test.describe('TST09 - Quick access', () => {
for (let i = 0; i < files.length; i++) {
await expectElementExist(
'[data-tid=tsLastOpenedFilesHistoryTID' + dataTidFormat(files[i]) + ']',
- false
+ false,
);
}
});
@@ -262,7 +262,7 @@ test.describe('TST09 - Quick access', () => {
const fileTid = dataTidFormat(fileTitle);
await openContextEntryMenu(
getGridFileSelector(fileTitle),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
await clickOn('[data-tid=fileContainerEditFile]');
@@ -272,7 +272,7 @@ test.describe('TST09 - Quick access', () => {
await clickOn('[data-tid=quickAccessButton]');
await clickOn('[data-tid=fileEditHistoryTID]');
await expectElementExist(
- '[data-tid=tsLastOpenedFilesHistoryTID' + fileTid + ']'
+ '[data-tid=tsLastOpenedFilesHistoryTID' + fileTid + ']',
);
await clickOn('[data-tid=tsLastOpenedFilesHistoryTID' + fileTid + ']');
await expectElementExist('[data-tid=OpenedTID' + fileTid + ']');
@@ -282,7 +282,7 @@ test.describe('TST09 - Quick access', () => {
await clickOn('[data-tid=clearHistoryTID]');
await expectElementExist(
'[data-tid=tsLastOpenedFilesHistoryTID' + fileTid + ']',
- false
+ false,
);
});
@@ -301,13 +301,13 @@ test.describe('TST09 - Quick access', () => {
await expectElementExist(
'[data-tid=tsLastOpenedFoldersHistoryTID' + testFolder + ']',
true,
- 10000
+ 10000,
);
await clickOn('[data-tid=tsLastOpenedFoldersHistoryTID' + testFolder + ']');
await expectElementExist(
'[data-tid=OpenedTID' + testFolder + ']',
true,
- 10000
+ 10000,
);
//Delete
@@ -316,7 +316,7 @@ test.describe('TST09 - Quick access', () => {
await expectElementExist(
'[data-tid=tsLastOpenedFoldersHistoryTID' + testFolder + ']',
false,
- 10000
+ 10000,
);
});
@@ -342,15 +342,15 @@ test.describe('TST09 - Quick access', () => {
await expectElementExist(
'[data-tid=tsLastOpenedFoldersHistoryTID' + testFolder + ']',
true,
- 10000
+ 10000,
);
await clickOn(
- '[data-tid=tsLastOpenedFoldersHistoryTID' + testFolder + ']'
+ '[data-tid=tsLastOpenedFoldersHistoryTID' + testFolder + ']',
);
await expectElementExist(
'[data-tid=OpenedTID' + testFolder + ']',
true,
- 10000
+ 10000,
);
}
@@ -361,7 +361,7 @@ test.describe('TST09 - Quick access', () => {
await expectElementExist(
'[data-tid=tsLastOpenedFoldersHistoryTID' + folders[i] + ']',
false,
- 10000
+ 10000,
);
}
});
@@ -373,7 +373,7 @@ test.describe('TST09 - Quick access', () => {
await expectElementExist(
'[data-tid=tsLastOpenedFoldersHistoryTID]',
false,
- 10000
+ 10000,
);
});
});
diff --git a/tests/e2e/search.helpers.js b/tests/e2e/search.helpers.js
index dec9bfcfd..851cd49c5 100644
--- a/tests/e2e/search.helpers.js
+++ b/tests/e2e/search.helpers.js
@@ -10,7 +10,7 @@ import {
setInputKeys,
setInputValue,
typeInputValue,
- waitForNotification
+ waitForNotification,
} from './general.helpers';
import { AddRemoveTagsToSelectedFiles } from './perspective-grid.helpers';
import { findAction } from '../../app/components/SearchOptions';
@@ -27,7 +27,7 @@ export const firstTagButton = '/tbody/tr[1]/td[3]/button[1]';
export async function addSearchCommand(
command,
executeSearch = true,
- forceOpenMenu = false
+ forceOpenMenu = false,
) {
if (!(await isDisplayed('#textQuery'))) {
await clickOn('[data-tid=toggleSearch]');
@@ -56,7 +56,7 @@ export async function addSearchCommand(
export async function searchEngine(
filename,
options = {},
- executeSearch = true
+ executeSearch = true,
) {
if (!(await isDisplayed('#textQuery'))) {
await clickOn('[data-tid=toggleSearch]');
@@ -107,10 +107,10 @@ export async function createSavedSearch(searchQuery) {
}
export async function addRemoveTagsInSearchResults(
- tags = ['test-tag3', 'test-tag4']
+ tags = ['test-tag3', 'test-tag4'],
) {
await global.client.dblclick(
- '[data-tid=fsEntryName_' + emptyFolderName + ']'
+ '[data-tid=fsEntryName_' + emptyFolderName + ']',
);
await searchEngine(testFilename); //, { reindexing: true });
// expected current filename
@@ -124,7 +124,7 @@ export async function addRemoveTagsInSearchResults(
await expectElementExist(
'[data-tid=tagContainer_' + tags[i] + ']',
true,
- 5000
+ 5000,
);
}
if (await isDisabled('[data-tid=listPerspectiveAddRemoveTags]')) {
@@ -137,7 +137,7 @@ export async function addRemoveTagsInSearchResults(
await expectElementExist(
'[data-tid=tagContainer_' + tags[i] + ']',
false,
- 5000
+ 5000,
);
/*await expectElementExist(
selectorFile + '[' + (i + 1) + ']//div[@id="gridCellTags"]//button[1]',
diff --git a/tests/e2e/search.pw.e2e.js b/tests/e2e/search.pw.e2e.js
index f95aa1e47..2c230f4cf 100644
--- a/tests/e2e/search.pw.e2e.js
+++ b/tests/e2e/search.pw.e2e.js
@@ -7,7 +7,7 @@ import {
getGridFileSelector,
selectorFile,
setSettings,
- takeScreenshot
+ takeScreenshot,
} from './general.helpers';
import {
checkFileExist,
@@ -15,7 +15,7 @@ import {
startTestingApp,
stopApp,
testDataRefresh,
- writeFile
+ writeFile,
} from './hook';
import {
closeFileProperties,
@@ -24,7 +24,7 @@ import {
createPwMinioLocation,
defaultLocationName,
defaultLocationPath,
- getPwLocationTid
+ getPwLocationTid,
} from './location.helpers';
import {
emptyFolderName,
@@ -32,7 +32,7 @@ import {
testFilename,
addRemoveTagsInSearchResults,
createSavedSearch,
- addSearchCommand
+ addSearchCommand,
} from './search.helpers';
import { clearDataStorage } from './welcome.helpers';
import { openContextEntryMenu } from './test-utils';
@@ -55,11 +55,11 @@ test.afterEach(async ({ page }, testInfo) => {
if (testInfo.status !== testInfo.expectedStatus) {
await takeScreenshot(testInfo);
const localStorage = await global.client.evaluate(() =>
- JSON.stringify(window.localStorage)
+ JSON.stringify(window.localStorage),
);
writeFile(
testInfo.outputPath(testInfo.title + '_localstorage.json'),
- localStorage
+ localStorage,
);
}
await clearDataStorage();
@@ -80,7 +80,7 @@ test.beforeEach(async () => {
test.describe('TST06 - Test Search in file structure:', () => {
test('TST0601 - Search in current location [web,electron]', async () => {
await global.client.dblclick(
- '[data-tid=fsEntryName_' + emptyFolderName + ']'
+ '[data-tid=fsEntryName_' + emptyFolderName + ']',
);
await searchEngine(testFilename); //, { reindexing: true });
@@ -139,7 +139,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
const searchQuery = 'jpg'; //'sample_exif.jpg';
await addSearchCommand(searchQuery, true);
await global.client.waitForSelector('img[alt=thumbnail]', {
- visible: true
+ visible: true,
});
const imageLocator = global.client.locator('img[alt=thumbnail]');
const imageCount = await imageLocator.count();
@@ -179,7 +179,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
await clickOn('#textQuery-option-0');
await expectElementExist(
'[data-tid=OpenedTID' + dataTidFormat(file) + ']',
- true
+ true,
);
});
@@ -187,7 +187,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
const bookmarkFileTitle = 'sample.txt';
await openContextEntryMenu(
getGridFileSelector(bookmarkFileTitle),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
// Create
@@ -198,7 +198,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
await clickOn('#textQuery-option-0');
await expectElementExist(
'[data-tid=OpenedTID' + dataTidFormat(bookmarkFileTitle) + ']',
- true
+ true,
);
});
@@ -235,7 +235,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
await expectElementSelected(
'sample' + ' ' + tags1.join(' ') + '.' + file1,
- false
+ false,
);
const file2 = 'jpg';
@@ -244,7 +244,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
await expectElementSelected(
'sample' + ' ' + tags2.join(' ') + '.' + file2,
- false
+ false,
);
const file3 = 'gif';
@@ -253,7 +253,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
await expectElementSelected(
'sample' + ' ' + tags3.join(' ') + '.' + file3,
- false
+ false,
);
function getFileName(fileExt, tags) {
@@ -290,7 +290,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
await expectElementExist(
getGridFileSelector('empty_file.html'),
true,
- 5000
+ 5000,
);
//await openLocationMenu(defaultLocationName);
//await clickOn('[data-tid=indexLocation]');
@@ -302,7 +302,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
await expectElementExist(
getGridFileSelector('empty_file.html'),
true,
- 5000
+ 5000,
);
});
@@ -358,7 +358,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
await expectElementExist(
getGridFileSelector('empty_file.html'),
true,
- 5000
+ 5000,
);
await clickOn('#clearSearchID');
@@ -373,7 +373,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
//await global.client.dblclick('[data-tid=fsEntryName_empty_folder]');
await openContextEntryMenu(
getGridFileSelector('empty_folder'),
- 'openDirectory'
+ 'openDirectory',
);
await addSearchCommand('sc:', false);
await clickOn('#textQuery-option-1');
@@ -413,13 +413,13 @@ test.describe('TST06 - Test Search in file structure:', () => {
test('TST0646 - Open directory from search results [web,electron]', async () => {
await createFile(
'text_file.txt',
- 'testing open subfolder from search results'
+ 'testing open subfolder from search results',
);
await addSearchCommand('empty_folder', true);
await expectElementExist(getGridFileSelector('empty_folder'), true, 5000);
await openContextEntryMenu(
getGridFileSelector('empty_folder'),
- 'openDirectory'
+ 'openDirectory',
);
await expectElementExist(getGridFileSelector('text_file.txt'), true, 5000);
});
diff --git a/tests/e2e/tag.helpers.js b/tests/e2e/tag.helpers.js
index 141ce6e7a..38573bd2b 100644
--- a/tests/e2e/tag.helpers.js
+++ b/tests/e2e/tag.helpers.js
@@ -8,7 +8,7 @@ export const editedGroupName = 'testGroup';
export async function createTagGroup(tagGroupName, locationName = undefined) {
const tagGroup = await global.client.$(
- '[data-tid=tagLibraryMoreButton_' + tagGroupName + ']'
+ '[data-tid=tagLibraryMoreButton_' + tagGroupName + ']',
);
if (!tagGroup) {
await clickOn('[data-tid=tagLibraryMenu]');
diff --git a/tests/e2e/tag.pw.e2e.js b/tests/e2e/tag.pw.e2e.js
index ad090742e..bc757e8c5 100644
--- a/tests/e2e/tag.pw.e2e.js
+++ b/tests/e2e/tag.pw.e2e.js
@@ -8,7 +8,7 @@ import {
expectMetaFilesExist,
getGridFileSelector,
setInputValue,
- takeScreenshot
+ takeScreenshot,
} from './general.helpers';
import { createFile, startTestingApp, stopApp, testDataRefresh } from './hook';
import { clearDataStorage, closeWelcomePlaywright } from './welcome.helpers';
@@ -16,7 +16,7 @@ import {
createPwLocation,
createPwMinioLocation,
defaultLocationName,
- defaultLocationPath
+ defaultLocationPath,
} from './location.helpers';
import {
addTags,
@@ -26,7 +26,7 @@ import {
newTagName,
tagMenu,
testGroup,
- testTagName
+ testTagName,
} from './tag.helpers';
test.beforeAll(async () => {
@@ -56,7 +56,7 @@ test.describe('TST04 - Testing the tag library:', () => {
await createTagGroup(testGroup);
await expectElementExist(
'[data-tid=tagLibraryTagGroupTitle_' + testGroup + ']',
- true
+ true,
);
});
@@ -64,14 +64,14 @@ test.describe('TST04 - Testing the tag library:', () => {
await createTagGroup(testGroup);
await expectElementExist(
'[data-tid=tagLibraryTagGroupTitle_' + testGroup + ']',
- true
+ true,
);
await clickOn('[data-tid=tagLibraryMoreButton_' + testGroup + ']');
await clickOn('[data-tid=deleteTagGroup]');
await clickOn('[data-tid=confirmDeleteTagGroupDialog]');
await expectElementExist(
'[data-tid=tagLibraryTagGroupTitle_' + testGroup + ']',
- false
+ false,
);
});
@@ -83,7 +83,7 @@ test.describe('TST04 - Testing the tag library:', () => {
await clickOn('[data-tid=editTagGroupConfirmButton]');
await expectElementExist(
'[data-tid=tagLibraryTagGroupTitle_' + editedGroupName + ']',
- true
+ true,
);
});
@@ -93,11 +93,11 @@ test.describe('TST04 - Testing the tag library:', () => {
await clickOn('[data-tid=editTagGroup]');
await clickOn('[data-tid=editTagGroupBackgroundColor]');
const inputElem = await global.client.$(
- '//*[@data-tid="colorPickerDialogContent"]/div/div[3]/div[1]/div/input'
+ '//*[@data-tid="colorPickerDialogContent"]/div/div[3]/div[1]/div/input',
);
await setInputValue(
'//*[@data-tid="colorPickerDialogContent"]/div/div[3]/div[1]/div/input',
- '000000'
+ '000000',
);
await clickOn('[data-tid=colorPickerConfirm]');
await clickOn('[data-tid=editTagGroupSwitch]');
@@ -105,7 +105,7 @@ test.describe('TST04 - Testing the tag library:', () => {
await clickOn('[data-tid=tagLibraryMoreButton_' + testGroup + ']');
await clickOn('[data-tid=editTagGroup]');
const colorElem = await global.client.$(
- '[data-tid=editTagGroupBackgroundColor]'
+ '[data-tid=editTagGroupBackgroundColor]',
);
let colorStyle = await colorElem.getAttribute('style');
@@ -121,7 +121,7 @@ test.describe('TST04 - Testing the tag library:', () => {
await addTags([newTagName]);
await expectElementExist(
'[data-tid=tagContainer_' + newTagName + ']',
- true
+ true,
);
});
@@ -134,7 +134,7 @@ test.describe('TST04 - Testing the tag library:', () => {
for (let i = 0; i < arrTags.length; i++) {
await expectElementExist(
'[data-tid=tagContainer_' + arrTags[i] + ']',
- true
+ true,
);
}
});
@@ -145,7 +145,7 @@ test.describe('TST04 - Testing the tag library:', () => {
await clickOn('[data-tid=editTagConfirm]');
await expectElementExist(
'[data-tid=tagContainer_' + testTagName + ']',
- true
+ true,
);
});
@@ -167,11 +167,11 @@ test.describe('TST04 - Testing the tag library:', () => {
await clickOn('[data-tid=settings]');
await clickOn('[data-tid=settingsToggleDefaultTagBackgroundColor]');
const inputElem = await global.client.$(
- '//*[@data-tid="colorPickerDialogContent"]/div/div[3]/div[1]/div/input'
+ '//*[@data-tid="colorPickerDialogContent"]/div/div[3]/div[1]/div/input',
);
await setInputValue(
'//*[@data-tid="colorPickerDialogContent"]/div/div[3]/div[1]/div/input',
- '000000'
+ '000000',
);
await clickOn('[data-tid=colorPickerConfirm]');
await clickOn('[data-tid=closeSettingsDialog]');
@@ -179,7 +179,7 @@ test.describe('TST04 - Testing the tag library:', () => {
await clickOn('[data-tid=createNewTagGroup]');
const colorElem = await global.client.$(
- '[data-tid=createTagGroupBackgroundColor]'
+ '[data-tid=createTagGroupBackgroundColor]',
);
let colorStyle = await colorElem.getAttribute('style');
const rgb2hex = require('rgb2hex');
@@ -266,7 +266,7 @@ test.describe('TST04 - Testing the tag library:', () => {
await checkSettings(
'[data-tid=saveTagInLocationTID]',
true,
- '[data-tid=advancedSettingsDialogTID]'
+ '[data-tid=advancedSettingsDialogTID]',
);
await createTagGroup(testGroup, defaultLocationName);
await clickOn('[data-tid=locationManager]');
@@ -281,7 +281,7 @@ test.describe('TST04 - Testing the tag library:', () => {
await checkSettings(
'[data-tid=saveTagInLocationTID]',
true,
- '[data-tid=advancedSettingsDialogTID]'
+ '[data-tid=advancedSettingsDialogTID]',
);
await clickOn('[data-tid=locationManager]');
if (global.isMinio) {
@@ -303,17 +303,17 @@ test.describe('TST04 - Testing the tag library:', () => {
'[data-tid=tagContainer_' + tagName + ']',
true,
3000,
- '[data-tid=tagGroupContainer_' + sourceTagGroup + ']'
+ '[data-tid=tagGroupContainer_' + sourceTagGroup + ']',
);
await dnd(
'[data-tid=tagContainer_' + tagName + ']',
- '[data-tid=tagGroupContainer_' + destinationTagGroup + ']'
+ '[data-tid=tagGroupContainer_' + destinationTagGroup + ']',
);
await expectElementExist(
'[data-tid=tagContainer_' + tagName + ']',
true,
3000,
- '[data-tid=tagGroupContainer_' + destinationTagGroup + ']'
+ '[data-tid=tagGroupContainer_' + destinationTagGroup + ']',
);
});
});
diff --git a/tests/e2e/test-utils.js b/tests/e2e/test-utils.js
index bbf5c8767..ebe5cb06a 100644
--- a/tests/e2e/test-utils.js
+++ b/tests/e2e/test-utils.js
@@ -25,7 +25,7 @@ export async function checkFilenameForExist(filename, selector) {
// selector is current selector location for element in perspectiveGridTable or perspectiveListTable (full xpath path to element)
const file = await global.client.$(
- selector || perspectiveGridTable + firstFileName
+ selector || perspectiveGridTable + firstFileName,
);
const fileTxt = await file.getText();
expect(fileTxt).toBe(filename);
@@ -33,7 +33,7 @@ export async function checkFilenameForExist(filename, selector) {
export function toContainTID(text, tids = ['etete&5435']) {
let pass = false;
- tids.forEach(tid => {
+ tids.forEach((tid) => {
pass = text.indexOf(tid) !== -1;
});
return pass;
diff --git a/tests/e2e/viewer-audiovideo.pw.e2e.js b/tests/e2e/viewer-audiovideo.pw.e2e.js
index fb6bdf51d..5cc058de5 100644
--- a/tests/e2e/viewer-audiovideo.pw.e2e.js
+++ b/tests/e2e/viewer-audiovideo.pw.e2e.js
@@ -7,14 +7,14 @@ import {
defaultLocationPath,
defaultLocationName,
createPwMinioLocation,
- createPwLocation
+ createPwLocation,
} from './location.helpers';
import {
clickOn,
expectAudioPlay,
getGridFileSelector,
isDisplayed,
- takeScreenshot
+ takeScreenshot,
} from './general.helpers';
import { startTestingApp, stopApp, testDataRefresh } from './hook';
import { openContextEntryMenu } from './test-utils';
@@ -50,7 +50,7 @@ test.describe('TST59 - Media player', () => {
test('TST5901 - Play ogg file [web,minio,electron]', async () => {
await openContextEntryMenu(
getGridFileSelector('sample.ogg'),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
await expectAudioPlay();
});
@@ -58,7 +58,7 @@ test.describe('TST59 - Media player', () => {
test('TST5902 - Play ogv file [web,minio,electron]', async () => {
await openContextEntryMenu(
getGridFileSelector('sample.ogv'),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
await expectAudioPlay();
});
@@ -66,7 +66,7 @@ test.describe('TST59 - Media player', () => {
test('TST5903 - Open and close about dialog [web,minio,electron]', async () => {
await openContextEntryMenu(
getGridFileSelector('sample.mp4'),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
// Access the iframe
@@ -80,7 +80,7 @@ test.describe('TST59 - Media player', () => {
'[data-tid=AboutDialogTID]',
true,
2000,
- frame
+ frame,
);
expect(aboutExists).toBeTruthy();
@@ -89,7 +89,7 @@ test.describe('TST59 - Media player', () => {
'[data-tid=AboutDialogTID]',
false,
2000,
- frame
+ frame,
);
// Expect that the element of AboutDialog not exist within the iframe
expect(aboutNotExists).toBeTruthy();
@@ -98,7 +98,7 @@ test.describe('TST59 - Media player', () => {
test('TST5904 - Play mp3 [web,minio,electron]', async () => {
await openContextEntryMenu(
getGridFileSelector('sample.mp3'),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
await expectAudioPlay();
});
@@ -109,7 +109,7 @@ test.describe('TST59 - Media player', () => {
test('TST5905 - Play webm [web,minio,electron]', async () => {
await openContextEntryMenu(
getGridFileSelector('sample.webm'),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
await expectAudioPlay();
@@ -127,7 +127,7 @@ test.describe('TST59 - Media player', () => {
test('TST5906 - Play flac [web,minio,electron]', async () => {
await openContextEntryMenu(
getGridFileSelector('sample.flac'),
- 'fileMenuOpenFile'
+ 'fileMenuOpenFile',
);
await expectAudioPlay();
});
diff --git a/tests/e2e/welcome.helpers.js b/tests/e2e/welcome.helpers.js
index 564583ce8..82918436e 100644
--- a/tests/e2e/welcome.helpers.js
+++ b/tests/e2e/welcome.helpers.js
@@ -23,8 +23,8 @@ export async function closeWelcomePlaywright() {
'[data-tid=closeOnboardingDialog]',
{
timeout: 3000,
- state: 'visible'
- }
+ state: 'visible',
+ },
);
if (el) {
await el.click();
diff --git a/tests/global-setup-minio.js b/tests/global-setup-minio.js
index ab1e5fb8e..3aa7555e4 100644
--- a/tests/global-setup-minio.js
+++ b/tests/global-setup-minio.js
@@ -1,7 +1,7 @@
import { startMinio } from './setup-functions';
import { removeExtConfig } from './e2e/hook';
-module.exports = async function() {
+module.exports = async function () {
await removeExtConfig();
global.minio = await startMinio();
diff --git a/tests/global-setup-web.js b/tests/global-setup-web.js
index b3bf92c27..4eefb91b3 100644
--- a/tests/global-setup-web.js
+++ b/tests/global-setup-web.js
@@ -1,7 +1,7 @@
import { startMinio, startWebServer } from './setup-functions';
import { removeExtConfig } from './e2e/hook';
-module.exports = async function() {
+module.exports = async function () {
await removeExtConfig();
global.webserver = await startWebServer();
diff --git a/tests/global-setup.js b/tests/global-setup.js
index 0024cfd45..ff1406c4a 100644
--- a/tests/global-setup.js
+++ b/tests/global-setup.js
@@ -1,4 +1,4 @@
-module.exports = async function() {
+module.exports = async function () {
// await globalSetup();
// copy extconfig
@@ -9,7 +9,7 @@ module.exports = async function() {
__dirname,
'..',
'scripts',
- 'extconfig-with-welcome.js'
+ 'extconfig-with-welcome.js',
);
let destDir = path.join(__dirname, '..', 'app', 'extconfig.js');
diff --git a/tests/global-teardown-minio.js b/tests/global-teardown-minio.js
index b641850b3..8142ecb9e 100644
--- a/tests/global-teardown-minio.js
+++ b/tests/global-teardown-minio.js
@@ -1,5 +1,5 @@
import { stopMinio } from './setup-functions';
-module.exports = function() {
+module.exports = function () {
stopMinio(global.minio);
};
diff --git a/tests/global-teardown-web.js b/tests/global-teardown-web.js
index 875a9e4fd..a6e7a3e70 100644
--- a/tests/global-teardown-web.js
+++ b/tests/global-teardown-web.js
@@ -1,6 +1,6 @@
import { stopChromeDriver, stopMinio, stopWebServer } from './setup-functions';
-module.exports = async function() {
+module.exports = async function () {
// await stopChromeDriver(global.chromeDriver);
await stopWebServer(global.webserver);
diff --git a/tests/global-teardown.js b/tests/global-teardown.js
index 4d98aa8f2..9f7d75acd 100644
--- a/tests/global-teardown.js
+++ b/tests/global-teardown.js
@@ -1,5 +1,5 @@
import { removeExtConfig } from './e2e/hook';
-module.exports = async function() {
+module.exports = async function () {
await removeExtConfig();
};
diff --git a/tests/setup-functions.js b/tests/setup-functions.js
index 86ee843c4..883744563 100644
--- a/tests/setup-functions.js
+++ b/tests/setup-functions.js
@@ -20,21 +20,21 @@ export async function startMinio() {
const command = global.isWin ? winMinio : unixMinio;
const minioProcess = await require('child_process').spawn(command, [
'server',
- pathLib.resolve(__dirname, './testdata-tmp/file-structure')
+ pathLib.resolve(__dirname, './testdata-tmp/file-structure'),
]);
- minioProcess.on('exit', function(code) {
+ minioProcess.on('exit', function (code) {
// console.log('exit here with code: ', code);
});
minioProcess.on('close', (code, signal) => {
// console.log(`child process terminated due to receipt of signal ${signal}`);
});
- minioProcess.stdout.on('data', function(data) {
+ minioProcess.stdout.on('data', function (data) {
// console.log('stdout: ' + data);
});
- minioProcess.stderr.on('data', function(data) {
+ minioProcess.stderr.on('data', function (data) {
console.log('stderr: ' + data);
});
return minioProcess;
@@ -80,8 +80,8 @@ export async function startWebServer() {
await app.use(
serveStatic(pathLib.resolve(__dirname, '../web'), {
- index: ['index.html']
- })
+ index: ['index.html'],
+ }),
);
if (global.isMac) {
//todo copyfiles do not work for MacOS
diff --git a/tests/test-data-refresh.js b/tests/test-data-refresh.js
index 710f01773..006c57c2e 100644
--- a/tests/test-data-refresh.js
+++ b/tests/test-data-refresh.js
@@ -6,7 +6,7 @@ const src = pathLib.join(
__dirname,
'testdata',
'file-structure',
- 'supported-filestypes'
+ 'supported-filestypes',
);
const dst = pathLib.join(__dirname, 'testdata-tmp', 'file-structure');
diff --git a/tests/unit/paths.test.js b/tests/unit/paths.test.js
index 75e9f1de6..635b9df13 100644
--- a/tests/unit/paths.test.js
+++ b/tests/unit/paths.test.js
@@ -5,7 +5,7 @@ const {
baseName,
extractFileExtension,
getMetaDirectoryPath,
- getMetaFileLocationForFile
+ getMetaFileLocationForFile,
} = require('@tagspaces/tagspaces-common/paths');
const dirSeparatorUnix = '/';
@@ -23,7 +23,7 @@ executeTests(
'../remote.php/webdav/[20120125 89.4kg 19.5% 2.6kg]',
'',
'',
- dirSeparatorUnix
+ dirSeparatorUnix,
);
function executeTests(dirPath, fileName, fileExtension, dirSeparator) {
@@ -38,7 +38,7 @@ function executeTests(dirPath, fileName, fileExtension, dirSeparator) {
const name = baseName(filepath, dirSeparator);
expect(
name === fileName + (fileExtension ? '.' + fileExtension : '') ||
- name === filepath
+ name === filepath,
).toBeTruthy();
});
@@ -48,7 +48,7 @@ function executeTests(dirPath, fileName, fileExtension, dirSeparator) {
test(platform + ' getMetaDirectoryPath ' + filepath, () => {
expect(getMetaDirectoryPath(dirPath, dirSeparator)).toBe(
- dirPath + dirSeparator + AppConfig.metaFolder
+ dirPath + dirSeparator + AppConfig.metaFolder,
);
});
@@ -60,7 +60,7 @@ function executeTests(dirPath, fileName, fileExtension, dirSeparator) {
dirSeparator +
fileName +
(fileExtension ? '.' + fileExtension : '') +
- AppConfig.metaFileExt
+ AppConfig.metaFileExt,
);
});
}
diff --git a/tests/unit/search.disabledtest.js b/tests/unit/search.disabledtest.js
index b6849c8d7..992850be8 100644
--- a/tests/unit/search.disabledtest.js
+++ b/tests/unit/search.disabledtest.js
@@ -56,12 +56,12 @@ const tag3 = { title: 'tagTitle3' };
test.skip('calls Search.searchLocationIndex for tags', async () => {
const searchQuery = {
- tagsAND: [{ title: '5star' }]
+ tagsAND: [{ title: '5star' }],
};
const searchResults = await Search.searchLocationIndex(
testEntries,
- searchQuery
+ searchQuery,
);
expect(searchResults[0].tags).toEqual(expect.arrayContaining([{ tags }]));
@@ -72,11 +72,11 @@ test.skip('calls Search.searchLocationIndex for tags with not to equal', () => {
const searchQuery = {
tagsAND: [tag1],
- maxSearchResults: 2
+ maxSearchResults: 2,
};
expect(
- Search.searchLocationIndex(locationContent, searchQuery)
+ Search.searchLocationIndex(locationContent, searchQuery),
).resolves.not.toStrictEqual([entry2]);
});
@@ -85,11 +85,11 @@ test.skip('calls Search.searchLocationIndex for not exist tags', () => {
const searchQueryNotExist = {
tagsAND: [tag3],
- maxSearchResults: 2
+ maxSearchResults: 2,
};
expect(
- Search.searchLocationIndex(locationContent, searchQueryNotExist)
+ Search.searchLocationIndex(locationContent, searchQueryNotExist),
).resolves.toStrictEqual([]);
});
@@ -98,36 +98,36 @@ test.skip('calls Search.searchLocationIndex for OR tags', () => {
const searchQuery = {
tagsNOT: [tag1],
- maxSearchResults: 2
+ maxSearchResults: 2,
};
const searchQueryNotExist = {
tagsNOT: [tag3],
- maxSearchResults: 2
+ maxSearchResults: 2,
};
expect(
- Search.searchLocationIndex(locationContent, searchQuery)
+ Search.searchLocationIndex(locationContent, searchQuery),
).resolves.toStrictEqual([entry1, entry2]);
expect(
- Search.searchLocationIndex(locationContent, searchQuery)
+ Search.searchLocationIndex(locationContent, searchQuery),
).resolves.not.toStrictEqual([entry3]);
expect(
- Search.searchLocationIndex(locationContent, searchQueryNotExist)
+ Search.searchLocationIndex(locationContent, searchQueryNotExist),
).resolves.toStrictEqual([]);
});
test('calls Search.searchLocationIndex for textQuery', async () => {
const searchQuery = {
searchType: 'strict',
- textQuery: 'IMG_20191001_163655.jpg'
+ textQuery: 'IMG_20191001_163655.jpg',
};
const searchResults = await Search.searchLocationIndex(
testEntries,
- searchQuery
+ searchQuery,
);
expect(searchResults[0].name).toStrictEqual('IMG_20191001_163655.jpg');
@@ -154,12 +154,12 @@ test('calls Search.searchLocationIndex for Pro', () => {
test.skip('calls Search.searchLocationIndex for extension', async () => {
const searchQuery = {
- FileTypeGroups: images
+ FileTypeGroups: images,
};
const searchResults = await Search.searchLocationIndex(
testEntries,
- searchQuery
+ searchQuery,
);
expect(searchResults[3].extension).toEqual('jpg');
});
@@ -168,12 +168,12 @@ test.skip('calls Search.searchLocationIndex for fileSize', async () => {
const locationContent = [entry1, entry2];
const searchQuery = {
- fileSize: 'sizeTiny'
+ fileSize: 'sizeTiny',
};
const searchResults = await Search.searchLocationIndex(
locationContent,
- searchQuery
+ searchQuery,
);
expect(searchResults[9].fileSize).resolves.toStrictEqual('sizeTiny');
});
@@ -182,12 +182,12 @@ test.skip('calls Search.searchLocationIndex for folder', async () => {
const locationContent = [entry1, entry2, entry3];
const searchQuery = {
- textQuery: 'testfolder1'
+ textQuery: 'testfolder1',
};
const searchResults = await Search.searchLocationIndex(
locationContent,
- searchQuery
+ searchQuery,
);
expect(searchResults[0].name).toStrictEqual('testFolder1');
diff --git a/tests/unit/testEntries.js b/tests/unit/testEntries.js
index 2f79ea9a0..405f0bd2f 100644
--- a/tests/unit/testEntries.js
+++ b/tests/unit/testEntries.js
@@ -7,7 +7,7 @@ export const entry1 = {
textConten: 'adsadas dasda',
fromTime: '',
toTime: '',
- fileSize: 9
+ fileSize: 9,
};
export const entry2 = {
@@ -16,7 +16,7 @@ export const entry2 = {
extension: 'jpg',
tags: [{ title: 'tagTitle2' }],
size: 222,
- path: '/gg/'
+ path: '/gg/',
};
export const entry3 = {
@@ -24,5 +24,5 @@ export const entry3 = {
description: 'test folder desciption',
isDirectory: true,
path: '/gg/',
- tags: []
+ tags: [],
};