ketcher-react 2.15.0-rc.4 → 2.16.0-rc.2

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.
Files changed (37) hide show
  1. package/dist/components/Buttons/IconButton/IconButton.d.ts +1 -1
  2. package/dist/components/Buttons/IconButton/types.d.ts +2 -0
  3. package/dist/components/Icon/types.d.ts +2 -2
  4. package/dist/components/Icon/utils/iconNameToIcon.d.ts +2 -0
  5. package/dist/index.css +1 -1
  6. package/dist/index.css.map +1 -1
  7. package/dist/index.js +3048 -1867
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.modern.js +3048 -1867
  10. package/dist/index.modern.js.map +1 -1
  11. package/dist/script/editor/tool/paste.d.ts +2 -0
  12. package/dist/script/editor/tool/select.d.ts +3 -1
  13. package/dist/script/editor/tool/sgroup.d.ts +2 -1
  14. package/dist/script/editor/tool/template.d.ts +7 -12
  15. package/dist/script/editor/tool/templatePreview.d.ts +42 -0
  16. package/dist/script/ui/action/index.d.ts +6 -6
  17. package/dist/script/ui/action/tools.d.ts +6 -6
  18. package/dist/script/ui/component/cliparea/cliparea.d.ts +3 -2
  19. package/dist/script/ui/component/form/MeasureInput/measure-input.d.ts +2 -1
  20. package/dist/script/ui/component/form/Select/Select.d.ts +3 -1
  21. package/dist/script/ui/component/form/form/form.d.ts +3 -1
  22. package/dist/script/ui/data/convert/keynorm.d.ts +1 -0
  23. package/dist/script/ui/data/convert/structconv.d.ts +12 -0
  24. package/dist/script/ui/data/schema/struct-schema.d.ts +298 -180
  25. package/dist/script/ui/state/constants.d.ts +1 -0
  26. package/dist/script/ui/state/hotkeys.d.ts +3 -3
  27. package/dist/script/ui/state/hotkeys.test.d.ts +1 -0
  28. package/dist/script/ui/state/modal/atoms.d.ts +2 -2
  29. package/dist/script/ui/state/modal/form.d.ts +14 -5
  30. package/dist/script/ui/views/components/Dialog/Dialog.d.ts +1 -0
  31. package/dist/script/ui/views/components/StructEditor/InfoTooltip.d.ts +23 -0
  32. package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.container.d.ts +2 -0
  33. package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.d.ts +2 -0
  34. package/dist/script/ui/views/modal/components/toolbox/Atom/AtomElement/AtomElement.d.ts +4 -0
  35. package/dist/script/ui/views/modal/components/toolbox/Atom/helper.d.ts +6 -0
  36. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.d.ts +6 -3
  37. package/package.json +3 -3
@@ -22,10 +22,12 @@ declare class PasteTool implements Tool {
22
22
  private mergeItems;
23
23
  private readonly isSingleContractedGroup;
24
24
  constructor(editor: any, struct: any);
25
+ private get restruct();
25
26
  mousedown(event: any): void;
26
27
  mousemove(event: any): void;
27
28
  mouseup(): void;
28
29
  cancel(): void;
29
30
  mouseleave(): void;
31
+ mouseLeaveClientArea(): void;
30
32
  }
31
33
  export default PasteTool;
@@ -21,7 +21,8 @@ declare class SelectTool implements Tool {
21
21
  #private;
22
22
  private readonly editor;
23
23
  private dragCtx;
24
- isMousedDown: boolean;
24
+ private previousMouseMoveEvent?;
25
+ isMouseDown: boolean;
25
26
  readonly isMoving = false;
26
27
  constructor(editor: Editor, mode: SelectMode);
27
28
  isSelectionRunning(): boolean;
@@ -33,6 +34,7 @@ declare class SelectTool implements Tool {
33
34
  private selectElementsOnCanvas;
34
35
  private isDraggingStructureOnSaltOrSolvent;
35
36
  private updateArrowResizingState;
37
+ private moveCanvas;
36
38
  }
37
39
  export declare function selMerge(selection: any, add: any, reversible: boolean): any;
38
40
  export declare function getSelectedAtoms(selection: any, molecule: any): Atom[];
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
+ import Editor from '../Editor';
16
17
  import { Tool } from './Tool';
17
18
  declare class SGroupTool implements Tool {
18
19
  private readonly editor;
@@ -25,6 +26,6 @@ declare class SGroupTool implements Tool {
25
26
  mouseleave(event: any): void;
26
27
  mouseup(event: any): void;
27
28
  cancel(): void;
28
- static sgroupDialog(editor: any, id: any): void;
29
+ static sgroupDialog(editor: Editor, id: number | null): void;
29
30
  }
30
31
  export default SGroupTool;
@@ -13,20 +13,18 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- import { ReStruct } from 'ketcher-core';
16
+ import { Struct, Bond } from 'ketcher-core';
17
17
  import Editor from '../Editor';
18
18
  import { Tool } from './Tool';
19
- export declare const PREVIEW_DELAY = 300;
19
+ export declare function getBondFlipSign(struct: Struct, bond: Bond): number;
20
+ export declare function getAngleFromEvent(event: any, ci: any, restruct: any): any;
20
21
  declare class TemplateTool implements Tool {
21
22
  private readonly editor;
22
23
  private readonly mode;
23
24
  private readonly template;
24
25
  private readonly findItems;
26
+ private templatePreview;
25
27
  private dragCtx;
26
- private isPreviewVisible;
27
- private previewRemoveAction;
28
- private previewTimeout;
29
- private lastPreviewId;
30
28
  private targetGroupsIds;
31
29
  private readonly isSaltOrSolvent;
32
30
  private event;
@@ -42,11 +40,8 @@ declare class TemplateTool implements Tool {
42
40
  mousemove(event: any): boolean;
43
41
  mouseup(event?: any): boolean;
44
42
  cancel(): void;
45
- mouseleave(e: any): void;
46
- hidePreview(): void;
47
- showPreview(event: MouseEvent | {
48
- clientX: number;
49
- clientY: number;
50
- }, ci: any, restruct: ReStruct): void;
43
+ mouseleave(): void;
44
+ mouseLeaveClientArea(): void;
51
45
  }
46
+ export declare function getSign(molecule: any, bond: any, v: any): 0 | 1 | -1;
52
47
  export default TemplateTool;
@@ -0,0 +1,42 @@
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
+ declare class TemplatePreview {
18
+ private readonly editor;
19
+ private readonly template;
20
+ private readonly mode;
21
+ private floatingPreviewAction;
22
+ private connectedPreviewAction;
23
+ private connectedPreviewTimeout;
24
+ private lastPreviewId;
25
+ private floatingPreview;
26
+ private position;
27
+ private previousPosition;
28
+ constructor(editor: Editor, template: any, mode: any);
29
+ private get struct();
30
+ private get restruct();
31
+ private get isModeFunctionalGroup();
32
+ hidePreview(): void;
33
+ private getPreviewTarget;
34
+ movePreview(event: PointerEvent): void;
35
+ private moveFloatingPreview;
36
+ private hoverFusedItems;
37
+ private showFloatingPreview;
38
+ private hideFloatingPreview;
39
+ private hideConnectedPreview;
40
+ private showConnectedPreview;
41
+ }
42
+ export default TemplatePreview;
@@ -68,26 +68,26 @@ declare const config: {
68
68
  };
69
69
  hidden: (options: any) => boolean;
70
70
  };
71
- 'select-lasso': {
71
+ 'select-rectangle': {
72
72
  title: string;
73
- shortcut: string;
73
+ shortcut: string[];
74
74
  action: {
75
75
  tool: string;
76
76
  opts: string;
77
77
  };
78
+ hidden: (options: any) => boolean;
78
79
  };
79
- 'select-rectangle': {
80
+ 'select-lasso': {
80
81
  title: string;
81
- shortcut: string;
82
+ shortcut: string[];
82
83
  action: {
83
84
  tool: string;
84
85
  opts: string;
85
86
  };
86
- hidden: (options: any) => boolean;
87
87
  };
88
88
  'select-fragment': {
89
89
  title: string;
90
- shortcut: string;
90
+ shortcut: string[];
91
91
  action: {
92
92
  tool: string;
93
93
  opts: string;
@@ -7,26 +7,26 @@ declare var _default: {
7
7
  };
8
8
  hidden: (options: any) => boolean;
9
9
  };
10
- 'select-lasso': {
10
+ 'select-rectangle': {
11
11
  title: string;
12
- shortcut: string;
12
+ shortcut: string[];
13
13
  action: {
14
14
  tool: string;
15
15
  opts: string;
16
16
  };
17
+ hidden: (options: any) => boolean;
17
18
  };
18
- 'select-rectangle': {
19
+ 'select-lasso': {
19
20
  title: string;
20
- shortcut: string;
21
+ shortcut: string[];
21
22
  action: {
22
23
  tool: string;
23
24
  opts: string;
24
25
  };
25
- hidden: (options: any) => boolean;
26
26
  };
27
27
  'select-fragment': {
28
28
  title: string;
29
- shortcut: string;
29
+ shortcut: string[];
30
30
  action: {
31
31
  tool: string;
32
32
  opts: string;
@@ -10,9 +10,10 @@ declare class ClipArea extends Component<any, any, any> {
10
10
  listeners: {
11
11
  mouseup: (event: any) => void;
12
12
  mousedown: (event: any) => void;
13
- copy: (event: any) => Promise<void>;
14
- cut: (event: any) => Promise<void>;
13
+ copy: (event: any) => void;
14
+ cut: (event: any) => void;
15
15
  paste: (event: any) => void;
16
+ keydown: (event: any) => Promise<void>;
16
17
  } | undefined;
17
18
  shouldComponentUpdate(): boolean;
18
19
  componentWillUnmount(): void;
@@ -1,8 +1,9 @@
1
1
  export default MeasureInput;
2
- declare function MeasureInput({ schema, value, onChange, name, ...rest }: {
2
+ declare function MeasureInput({ schema, value, onChange, name, className, ...rest }: {
3
3
  [x: string]: any;
4
4
  schema: any;
5
5
  value: any;
6
6
  onChange: any;
7
7
  name: any;
8
+ className: any;
8
9
  }): JSX.Element;
@@ -25,6 +25,8 @@ interface Props {
25
25
  value?: string;
26
26
  multiple?: boolean;
27
27
  disabled?: boolean;
28
+ formName?: string;
29
+ name?: string;
28
30
  }
29
- declare const Select: ({ className, value, onChange, multiple, disabled, options, }: Props) => JSX.Element;
31
+ declare const Select: ({ className, value, onChange, multiple, disabled, options, formName, name, }: Props) => JSX.Element;
30
32
  export default Select;
@@ -11,8 +11,8 @@ declare class Form extends Component<any, any, any> {
11
11
  };
12
12
  deserialize: (inst: any) => any;
13
13
  };
14
- componentDidUpdate(prevProps: any): void;
15
14
  updateState(newState: any): void;
15
+ componentDidUpdate(prevProps: any): void;
16
16
  field(name: any, onChange: any): {
17
17
  dataError: any;
18
18
  value: any;
@@ -21,5 +21,7 @@ declare class Form extends Component<any, any, any> {
21
21
  render(): JSX.Element;
22
22
  }
23
23
  export function Field(props: any): JSX.Element;
24
+ export function CustomQueryField(props: any): JSX.Element;
25
+ export function FieldWithModal(props: any): JSX.Element;
24
26
  export function SelectOneOf(props: any): JSX.Element;
25
27
  import { Component } from "react";
@@ -1,3 +1,4 @@
1
+ export function isControlKey(event: any): any;
1
2
  export default keyNorm;
2
3
  declare function keyNorm(obj: any, ...args: any[]): any;
3
4
  declare namespace keyNorm {
@@ -2,6 +2,10 @@ export function fromElement(selem: any): any;
2
2
  export function toElement(elem: any): any;
3
3
  export function fromAtom(satom: any): {
4
4
  alias: any;
5
+ atomType: "list" | "single" | "pseudo";
6
+ atomList: any;
7
+ notList: any;
8
+ pseudo: any;
5
9
  label: any;
6
10
  charge: any;
7
11
  isotope: any;
@@ -14,6 +18,13 @@ export function fromAtom(satom: any): {
14
18
  unsaturatedAtom: boolean;
15
19
  hCount: any;
16
20
  stereoParity: any;
21
+ implicitHCount: any;
22
+ aromaticity: any;
23
+ ringMembership: any;
24
+ ringSize: any;
25
+ connectivity: any;
26
+ chirality: any;
27
+ customQuery: any;
17
28
  };
18
29
  export function toAtom(atom: any): any;
19
30
  export function fromStereoLabel(stereoLabel: any): {
@@ -30,6 +41,7 @@ export function fromBond(sbond: any): {
30
41
  type: string;
31
42
  topology: any;
32
43
  center: any;
44
+ customQuery: any;
33
45
  };
34
46
  export function toBond(bond: any): any;
35
47
  export function toBondType(caption: any): any;