aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/util/SerializationHelper.ts1
-rw-r--r--src/client/views/EditableView.tsx2
-rw-r--r--src/client/views/GestureOverlay.tsx1
-rw-r--r--src/client/views/MainView.tsx1
-rw-r--r--src/client/views/MetadataEntryMenu.tsx1
-rw-r--r--src/client/views/collections/CollectionMenu.tsx1
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx4
-rw-r--r--src/client/views/global/globalScripts.ts6
-rw-r--r--src/client/views/search/IconButton.tsx76
9 files changed, 49 insertions, 44 deletions
diff --git a/src/client/util/SerializationHelper.ts b/src/client/util/SerializationHelper.ts
index 76037a7e9..8daa69890 100644
--- a/src/client/util/SerializationHelper.ts
+++ b/src/client/util/SerializationHelper.ts
@@ -1,6 +1,5 @@
import { PropSchema, serialize, deserialize, custom, setDefaultModelSchema, getDefaultModelSchema } from 'serializr';
import { Field } from '../../fields/Doc';
-import { ClientUtils } from './ClientUtils';
let serializing = 0;
export function afterDocDeserialize(cb: (err: any, val: any) => void, err: any, newValue: any) {
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index edc35047f..6bc0e5424 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -222,12 +222,14 @@ export class EditableView extends React.Component<EditableProps> {
className: 'editableView-input',
onKeyDown: this.onKeyDown,
autoFocus: true,
+ // @ts-ignore
onBlur: e => this.finalizeEdit(e.currentTarget.value, false, true, false),
onPointerDown: this.stopPropagation,
onClick: this.stopPropagation,
onPointerUp: this.stopPropagation,
onKeyPress: this.stopPropagation,
value: this.props.autosuggestProps.value,
+ // @ts-ignore
onChange: this.props.autosuggestProps.onChange,
}}
/>
diff --git a/src/client/views/GestureOverlay.tsx b/src/client/views/GestureOverlay.tsx
index 5f0df3c5f..214da5541 100644
--- a/src/client/views/GestureOverlay.tsx
+++ b/src/client/views/GestureOverlay.tsx
@@ -14,7 +14,6 @@ import { InteractionUtils } from '../util/InteractionUtils';
import { ScriptingGlobals } from '../util/ScriptingGlobals';
import { Transform } from '../util/Transform';
import './GestureOverlay.scss';
-import { InkTranscription } from './InkTranscription';
import {
ActiveArrowEnd,
ActiveArrowScale,
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 1408e3124..50feccce2 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -44,7 +44,6 @@ import { DictationOverlay } from './DictationOverlay';
import { DocumentDecorations } from './DocumentDecorations';
import { GestureOverlay } from './GestureOverlay';
import { KeyManager } from './GlobalKeyHandler';
-import { InkTranscription } from './InkTranscription';
import { LightboxView } from './LightboxView';
import { LinkMenu } from './linking/LinkMenu';
import './MainView.scss';
diff --git a/src/client/views/MetadataEntryMenu.tsx b/src/client/views/MetadataEntryMenu.tsx
index bcbdd3ccb..5c6912121 100644
--- a/src/client/views/MetadataEntryMenu.tsx
+++ b/src/client/views/MetadataEntryMenu.tsx
@@ -156,6 +156,7 @@ export class MetadataEntryMenu extends React.Component<MetadataEntryProps> {
<span>Key:</span>
<div className="metadataEntry-autoSuggester" onClick={e => this.autosuggestRef.current!.input?.focus()}>
<Autosuggest
+ // @ts-ignore
inputProps={{ value: this._currentKey, onChange: this.onKeyChange }}
getSuggestionValue={this.getSuggestionValue}
suggestions={emptyPath}
diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx
index 268879bd4..3edf4135f 100644
--- a/src/client/views/collections/CollectionMenu.tsx
+++ b/src/client/views/collections/CollectionMenu.tsx
@@ -541,6 +541,7 @@ export class CollectionNoteTakingViewChrome extends React.Component<CollectionVi
autosuggestProps: {
inputProps: {
value: this._currentKey,
+ // @ts-ignore
onChange: this.onKeyChange,
},
getSuggestionValue: this.getSuggestionValue,
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx
index 1118c6a72..45e24bbb2 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx
@@ -10,7 +10,7 @@ import { Cast } from '../../../../fields/Types';
import { CollectionViewProps } from '../CollectionView';
import './CollectionFreeFormView.scss';
import * as React from 'react';
-import v5 = require('uuid/v5');
+import * as uuid from 'uuid';
@observer
export class CollectionFreeFormRemoteCursors extends React.Component<CollectionViewProps> {
@@ -42,7 +42,7 @@ export class CollectionFreeFormRemoteCursors extends React.Component<CollectionV
if (el) {
const ctx = el.getContext('2d');
if (ctx) {
- ctx.fillStyle = '#' + v5(metadata.id, v5.URL).substring(0, 6).toUpperCase() + '22';
+ ctx.fillStyle = '#' + uuid.v5(metadata.id, uuid.v5.URL).substring(0, 6).toUpperCase() + '22';
ctx.fillRect(0, 0, 20, 20);
ctx.fillStyle = 'black';
diff --git a/src/client/views/global/globalScripts.ts b/src/client/views/global/globalScripts.ts
index 0ad76db35..de29d8602 100644
--- a/src/client/views/global/globalScripts.ts
+++ b/src/client/views/global/globalScripts.ts
@@ -14,7 +14,7 @@ import { undoable, UndoManager } from '../../util/UndoManager';
import { CollectionFreeFormView } from '../collections/collectionFreeForm';
import { GestureOverlay } from '../GestureOverlay';
import { ActiveFillColor, ActiveInkColor, ActiveInkWidth, ActiveIsInkMask, InkingStroke, SetActiveFillColor, SetActiveInkColor, SetActiveInkWidth, SetActiveIsInkMask } from '../InkingStroke';
-import { InkTranscription } from '../InkTranscription';
+// import { InkTranscription } from '../InkTranscription';
import { CollectionFreeFormDocumentView } from '../nodes/CollectionFreeFormDocumentView';
import { DocumentView } from '../nodes/DocumentView';
import { RichTextMenu } from '../nodes/formattedText/RichTextMenu';
@@ -293,14 +293,14 @@ export function createInkGroup(inksToGroup?: Doc[], isSubGroup?: boolean) {
// TODO: nda - will probably need to go through and only remove the unprocessed selected docs
ffView.unprocessedDocs = [];
- InkTranscription.Instance.transcribeInk(newCollection, selected, false);
+ // InkTranscription.Instance.transcribeInk(newCollection, selected, false);
});
}
CollectionFreeFormView.collectionsWithUnprocessedInk.clear();
}
function setActiveTool(tool: InkTool | GestureUtils.Gestures, keepPrim: boolean, checkResult?: boolean) {
- InkTranscription.Instance?.createInkGroup();
+ // InkTranscription.Instance?.createInkGroup();
if (checkResult) {
return (Doc.ActiveTool === tool && !GestureOverlay.Instance?.InkShape) || GestureOverlay.Instance?.InkShape === tool
? GestureOverlay.Instance?.KeepPrimitiveMode || ![GestureUtils.Gestures.Circle, GestureUtils.Gestures.Line, GestureUtils.Gestures.Rectangle].includes(tool as GestureUtils.Gestures)
diff --git a/src/client/views/search/IconButton.tsx b/src/client/views/search/IconButton.tsx
index 6cf3a5f72..9aae347e7 100644
--- a/src/client/views/search/IconButton.tsx
+++ b/src/client/views/search/IconButton.tsx
@@ -1,29 +1,28 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import * as _ from "lodash";
+import * as _ from 'lodash';
import { action, IReactionDisposer, observable, reaction, runInAction } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
-import { DocumentType } from "../../documents/DocumentTypes";
+import { DocumentType } from '../../documents/DocumentTypes';
import '../global/globalCssVariables.scss';
import { IconBar } from './IconBar';
-import "./IconButton.scss";
-import "./SearchBox.scss";
+import './IconButton.scss';
+import './SearchBox.scss';
import { Font } from '@react-pdf/renderer';
-interface IconButtonProps {
+interface iconButtonProps {
type: string;
}
@observer
-export class IconButton extends React.Component<IconButtonProps>{
-
+export class IconButton extends React.Component<iconButtonProps> {
@observable private _isSelected: boolean = IconBar.Instance.getIcons().indexOf(this.props.type) !== -1;
@observable private _hover = false;
private _resetReaction?: IReactionDisposer;
private _selectAllReaction?: IReactionDisposer;
static Instance: IconButton;
- constructor(props: IconButtonProps) {
+ constructor(props: iconButtonProps) {
super(props);
IconButton.Instance = this;
}
@@ -40,7 +39,7 @@ export class IconButton extends React.Component<IconButtonProps>{
IconBar.Instance._resetClicked = false;
}
}
- }),
+ })
);
this._selectAllReaction = reaction(
@@ -54,24 +53,35 @@ export class IconButton extends React.Component<IconButtonProps>{
IconBar.Instance._selectAllClicked = false;
}
}
- }),
+ })
);
- }
+ };
@action.bound
getIcon() {
switch (this.props.type) {
- case (DocumentType.NONE): return "ban";
- case (DocumentType.AUDIO): return "music";
- case (DocumentType.COL): return "object-group";
- case (DocumentType.IMG): return "image";
- case (DocumentType.LINK): return "link";
- case (DocumentType.PDF): return "file-pdf";
- case (DocumentType.RTF): return "sticky-note";
- case (DocumentType.VID): return "video";
- case (DocumentType.WEB): return "globe-asia";
- case (DocumentType.MAP): return "map-marker-alt";
- default: return "caret-down";
+ case DocumentType.NONE:
+ return 'ban';
+ case DocumentType.AUDIO:
+ return 'music';
+ case DocumentType.COL:
+ return 'object-group';
+ case DocumentType.IMG:
+ return 'image';
+ case DocumentType.LINK:
+ return 'link';
+ case DocumentType.PDF:
+ return 'file-pdf';
+ case DocumentType.RTF:
+ return 'sticky-note';
+ case DocumentType.VID:
+ return 'video';
+ case DocumentType.WEB:
+ return 'globe-asia';
+ case DocumentType.MAP:
+ return 'map-marker-alt';
+ default:
+ return 'caret-down';
}
}
@@ -82,45 +92,39 @@ export class IconButton extends React.Component<IconButtonProps>{
if (!this._isSelected) {
this._isSelected = true;
newList.push(this.props.type);
- }
- else {
+ } else {
this._isSelected = false;
_.pull(newList, this.props.type);
}
IconBar.Instance.updateIcon(newList);
- }
+ };
selected = {
opacity: 1,
- backgroundColor: "#121721",
+ backgroundColor: '#121721',
//backgroundColor: "rgb(128, 128, 128)"
};
notSelected = {
opacity: 0.2,
- backgroundColor: "#121721",
+ backgroundColor: '#121721',
};
hoverStyle = {
opacity: 1,
- backgroundColor: "rgb(128, 128, 128)"
+ backgroundColor: 'rgb(128, 128, 128)',
//backgroundColor: "rgb(178, 206, 248)" //$medium-blue
};
render() {
return (
- <div className="type-outer" id={this.props.type + "-filter"}
- onMouseEnter={() => this._hover = true}
- onMouseLeave={() => this._hover = false}
- onClick={this.onClick}>
- <div className="type-icon" id={this.props.type + "-icon"}
- style={this._hover ? this.hoverStyle : this._isSelected ? this.selected : this.notSelected}
- >
+ <div className="type-outer" id={this.props.type + '-filter'} onMouseEnter={() => (this._hover = true)} onMouseLeave={() => (this._hover = false)} onClick={this.onClick}>
+ <div className="type-icon" id={this.props.type + '-icon'} style={this._hover ? this.hoverStyle : this._isSelected ? this.selected : this.notSelected}>
<FontAwesomeIcon className="fontawesome-icon" icon={this.getIcon()} />
</div>
{/* <div className="filter-description">{this.props.type}</div> */}
</div>
);
}
-} \ No newline at end of file
+}