ketcher-react 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,6 +48,7 @@ declare class Editor implements KetcherEditor {
48
48
  dearomatizeStruct: PipelineSubscription;
49
49
  enhancedStereoEdit: PipelineSubscription;
50
50
  confirm: PipelineSubscription;
51
+ cursor: Subscription;
51
52
  };
52
53
  lastEvent: any;
53
54
  constructor(clientArea: any, options: any);
@@ -0,0 +1,30 @@
1
+ /****************************************************************************
2
+ * Copyright 2021 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ***************************************************************************/
16
+ import Editor from '../Editor';
17
+ import { Vec2 } from 'ketcher-core';
18
+ declare class HandTool {
19
+ editor: Editor;
20
+ begPos: Vec2 | null;
21
+ endPos: Vec2 | null;
22
+ constructor(editor: any);
23
+ mousedown(event: any): void;
24
+ mousemove(event: any): void;
25
+ mouseup(event: any): void;
26
+ mouseover(): void;
27
+ mouseleave(): void;
28
+ cancel(): void;
29
+ }
30
+ export default HandTool;
@@ -1,5 +1,6 @@
1
1
  export default tools;
2
2
  declare namespace tools {
3
+ export { HandTool as hand };
3
4
  export { RGroupAtomTool as rgroupatom };
4
5
  export { SelectTool as select };
5
6
  export { SGroupTool as sgroup };
@@ -22,6 +23,7 @@ declare namespace tools {
22
23
  export { SimpleObjectTool as simpleobject };
23
24
  export { TextTool as text };
24
25
  }
26
+ import HandTool from "./hand";
25
27
  import RGroupAtomTool from "./rgroupatom";
26
28
  import SelectTool from "./select";
27
29
  import SGroupTool from "./sgroup";
@@ -55,6 +55,14 @@ declare const config: {
55
55
  'zoom-list': {
56
56
  hidden: (options: any) => boolean;
57
57
  };
58
+ hand: {
59
+ title: string;
60
+ shortcut: string;
61
+ action: {
62
+ tool: string;
63
+ };
64
+ hidden: (options: any) => boolean;
65
+ };
58
66
  'select-lasso': {
59
67
  title: string;
60
68
  shortcut: string;
@@ -1,4 +1,12 @@
1
1
  declare var _default: {
2
+ hand: {
3
+ title: string;
4
+ shortcut: string;
5
+ action: {
6
+ tool: string;
7
+ };
8
+ hidden: (options: any) => boolean;
9
+ };
2
10
  'select-lasso': {
3
11
  title: string;
4
12
  shortcut: string;
@@ -0,0 +1,5 @@
1
+ export function ErrorPopover({ error, anchorEl, handleClose }: {
2
+ error: any;
3
+ anchorEl: any;
4
+ handleClose: any;
5
+ }): JSX.Element;
@@ -0,0 +1,6 @@
1
+ export default Cursor;
2
+ declare function Cursor({ Icon, PressedIcon, enableHandTool }: {
3
+ Icon: any;
4
+ PressedIcon: any;
5
+ enableHandTool: any;
6
+ }): JSX.Element | null;
@@ -1,9 +1,12 @@
1
1
  export default StructEditor;
2
2
  declare class StructEditor extends Component<any, any, any> {
3
3
  constructor(props: any);
4
+ state: {
5
+ enableCursor: boolean;
6
+ };
4
7
  editorRef: import("react").RefObject<any>;
5
8
  logRef: import("react").RefObject<any>;
6
- shouldComponentUpdate(nextProps: any): boolean;
9
+ shouldComponentUpdate(nextProps: any, nextState: any): boolean;
7
10
  UNSAFE_componentWillReceiveProps(props: any): void;
8
11
  componentDidMount(): void;
9
12
  editor: Editor | undefined;
@@ -17,7 +17,7 @@
17
17
  import type { GenGroup as GenGroupType } from 'ketcher-core';
18
18
  declare type GenProps = {
19
19
  selected: (label: string) => boolean;
20
- onAtomSelect: (label: string) => void;
20
+ onAtomSelect: (label: string, activateImmediately: boolean) => void;
21
21
  group: GenGroupType;
22
22
  };
23
23
  declare const GenGroup: ({ group, onAtomSelect, selected }: GenProps) => JSX.Element;
@@ -18,7 +18,7 @@ import type { GenItemSet } from 'ketcher-core';
18
18
  declare type GenSetProps = {
19
19
  labels: GenItemSet[];
20
20
  selected: (label: string) => boolean;
21
- onAtomSelect: (label: string) => void;
21
+ onAtomSelect: (label: string, activateImmediately: boolean) => void;
22
22
  className?: string;
23
23
  group: string;
24
24
  };
@@ -16,7 +16,7 @@
16
16
  /// <reference types="react" />
17
17
  declare type GenericGroupsProps = {
18
18
  selected: (label: string) => boolean;
19
- onAtomSelect: (label: string) => void;
19
+ onAtomSelect: (label: string, activateImmediately: boolean) => void;
20
20
  };
21
21
  declare function GenericGroups({ selected, onAtomSelect }: GenericGroupsProps): JSX.Element;
22
22
  export default GenericGroups;
@@ -11,7 +11,7 @@ declare class Table extends Component<any, any, any> {
11
11
  changeType: (type: any) => void;
12
12
  headerContent: () => JSX.Element;
13
13
  selected: (label: any) => any;
14
- onAtomSelect: (label: any, activateImmidiatly?: boolean) => void;
14
+ onAtomSelect: (label: any, activateImmediately?: boolean) => void;
15
15
  result: () => {
16
16
  label: any;
17
17
  pseudo: null;
@@ -14,12 +14,12 @@
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
16
  declare type TopGroup = 'document' | 'edit' | 'zoom' | 'process' | 'meta';
17
- declare type LeftGroup = 'select' | 'bond' | 'charge' | 'transform' | 'sgroup' | 'rgroup' | 'shape' | 'text';
17
+ declare type LeftGroup = 'hand' | 'select' | 'bond' | 'charge' | 'transform' | 'sgroup' | 'rgroup' | 'shape' | 'text';
18
18
  declare type BottomGroup = 'template-common' | 'template-lib';
19
19
  declare type RightGroup = 'atom' | 'period-table';
20
20
  declare type ToolbarGroupVariant = TopGroup | LeftGroup | BottomGroup | RightGroup;
21
21
  declare type TopToolbarItemVariant = 'clear' | 'open' | 'save' | 'undo' | 'redo' | 'cut' | 'copies' | 'copy' | 'copy-image' | 'copy-mol' | 'copy-ket' | 'paste' | 'zoom-in' | 'zoom-out' | 'zoom-list' | 'layout' | 'clean' | 'arom' | 'dearom' | 'cip' | 'check' | 'analyse' | 'recognize' | 'miew' | 'settings' | 'help' | 'about';
22
- declare type LeftToolbarItemVariant = 'select' | 'select-lasso' | 'select-rectangle' | 'select-fragment' | 'erase' | 'bonds' | 'bond-common' | 'bond-single' | 'bond-double' | 'bond-triple' | 'bond-dative' | 'bond-stereo' | 'bond-up' | 'bond-down' | 'bond-updown' | 'bond-crossed' | 'bond-query' | 'bond-special' | 'bond-any' | 'bond-hydrogen' | 'bond-aromatic' | 'bond-singledouble' | 'bond-singlearomatic' | 'bond-doublearomatic' | 'chain' | 'charge-plus' | 'charge-minus' | 'transforms' | 'transform-rotate' | 'transform-flip-h' | 'transform-flip-v' | 'sgroup' | 'sgroup-data' | 'reaction-plus' | 'arrows' | 'reaction-arrow-open-angle' | 'reaction-arrow-filled-triangle' | 'reaction-arrow-filled-bow' | 'reaction-arrow-dashed-open-angle' | 'reaction-arrow-failed' | 'reaction-arrow-both-ends-filled-triangle' | 'reaction-arrow-equilibrium-filled-half-bow' | 'reaction-arrow-equilibrium-filled-triangle' | 'reaction-arrow-equilibrium-open-angle' | 'reaction-arrow-unbalanced-equilibrium-filled-half-bow' | 'reaction-arrow-unbalanced-equilibrium-open-half-angle' | 'reaction-arrow-unbalanced-equilibrium-large-filled-half-bow' | 'reaction-arrow-unbalanced-equilibrium-filled-half-triangle' | 'reaction-arrow-elliptical-arc-arrow-filled-bow' | 'reaction-arrow-elliptical-arc-arrow-filled-triangle' | 'reaction-arrow-elliptical-arc-arrow-open-angle' | 'reaction-arrow-elliptical-arc-arrow-open-half-angle' | 'reaction-mapping-tools' | 'reaction-automap' | 'reaction-map' | 'reaction-unmap' | 'rgroup' | 'rgroup-label' | 'rgroup-fragment' | 'rgroup-attpoints' | 'shapes' | 'shape-ellipse' | 'shape-rectangle' | 'shape-line' | 'text';
22
+ declare type LeftToolbarItemVariant = 'hand' | 'select' | 'select-lasso' | 'select-rectangle' | 'select-fragment' | 'erase' | 'bonds' | 'bond-common' | 'bond-single' | 'bond-double' | 'bond-triple' | 'bond-dative' | 'bond-stereo' | 'bond-up' | 'bond-down' | 'bond-updown' | 'bond-crossed' | 'bond-query' | 'bond-special' | 'bond-any' | 'bond-hydrogen' | 'bond-aromatic' | 'bond-singledouble' | 'bond-singlearomatic' | 'bond-doublearomatic' | 'chain' | 'charge-plus' | 'charge-minus' | 'transforms' | 'transform-rotate' | 'transform-flip-h' | 'transform-flip-v' | 'sgroup' | 'sgroup-data' | 'reaction-plus' | 'arrows' | 'reaction-arrow-open-angle' | 'reaction-arrow-filled-triangle' | 'reaction-arrow-filled-bow' | 'reaction-arrow-dashed-open-angle' | 'reaction-arrow-failed' | 'reaction-arrow-both-ends-filled-triangle' | 'reaction-arrow-equilibrium-filled-half-bow' | 'reaction-arrow-equilibrium-filled-triangle' | 'reaction-arrow-equilibrium-open-angle' | 'reaction-arrow-unbalanced-equilibrium-filled-half-bow' | 'reaction-arrow-unbalanced-equilibrium-open-half-angle' | 'reaction-arrow-unbalanced-equilibrium-large-filled-half-bow' | 'reaction-arrow-unbalanced-equilibrium-filled-half-triangle' | 'reaction-arrow-elliptical-arc-arrow-filled-bow' | 'reaction-arrow-elliptical-arc-arrow-filled-triangle' | 'reaction-arrow-elliptical-arc-arrow-open-angle' | 'reaction-arrow-elliptical-arc-arrow-open-half-angle' | 'reaction-mapping-tools' | 'reaction-automap' | 'reaction-map' | 'reaction-unmap' | 'rgroup' | 'rgroup-label' | 'rgroup-fragment' | 'rgroup-attpoints' | 'shapes' | 'shape-ellipse' | 'shape-rectangle' | 'shape-line' | 'text';
23
23
  declare type BottomToolbarItemVariant = 'template-common' | 'template-lib' | 'enhanced-stereo' | 'fullscreen';
24
24
  declare type RightToolbarItemVariant = 'atom' | 'freq-atoms' | 'period-table' | 'extended-table' | 'any-atom';
25
25
  declare type ToolbarItemVariant = TopToolbarItemVariant | LeftToolbarItemVariant | BottomToolbarItemVariant | RightToolbarItemVariant;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ketcher-react",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "Web-based molecule sketcher",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "http://lifescience.opensource.epam.com/ketcher",
@@ -58,7 +58,7 @@
58
58
  "font-face-observer": "^1.0.0",
59
59
  "hoist-non-react-statics": "^3.3.2",
60
60
  "intersection-observer": "^0.12.0",
61
- "ketcher-core": "1.4.0",
61
+ "ketcher-core": "1.5.0",
62
62
  "lodash": "^4.17.21",
63
63
  "miew-react": "^1.0.0",
64
64
  "react-colorful": "^5.4.0",