ketcher-react 2.6.4 → 2.7.0-rc1

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.
@@ -32,6 +32,7 @@ declare class Editor implements KetcherEditor {
32
32
  historyPtr: any;
33
33
  errorHandler: ((message: string) => void) | null;
34
34
  highlights: Highlighter;
35
+ hoverIcon: any;
35
36
  event: {
36
37
  message: Subscription;
37
38
  elementEdit: PipelineSubscription;
@@ -48,6 +49,7 @@ declare class Editor implements KetcherEditor {
48
49
  dearomatizeStruct: PipelineSubscription;
49
50
  enhancedStereoEdit: PipelineSubscription;
50
51
  confirm: PipelineSubscription;
52
+ showInfo: PipelineSubscription;
51
53
  cursor: Subscription;
52
54
  };
53
55
  lastEvent: any;
@@ -63,7 +65,7 @@ declare class Editor implements KetcherEditor {
63
65
  options(value?: any): any;
64
66
  zoom(value?: any): any;
65
67
  selection(ci?: any): Selection | null;
66
- hover(ci: any, newTool?: any): void;
68
+ hover(ci: any, newTool?: any, event?: PointerEvent): void;
67
69
  update(action: Action | true, ignoreHistory?: any): void;
68
70
  historySize(): {
69
71
  undo: any;
@@ -22,6 +22,8 @@ declare class AtomTool {
22
22
  isNotActiveTool: boolean | undefined;
23
23
  constructor(editor: any, atomProps: any);
24
24
  mousedown(event: any): void;
25
+ mouseleave(): void;
26
+ mouseover(): void;
25
27
  mousemove(event: any): void;
26
28
  mouseup(event: any): void;
27
29
  }
@@ -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 { ReSGroup } from 'ketcher-core';
16
17
  import { Editor } from '../Editor';
17
18
  declare class SelectTool {
18
19
  #private;
@@ -24,6 +25,11 @@ declare class SelectTool {
24
25
  mouseup(event: any): boolean;
25
26
  dblclick(event: any): true | undefined;
26
27
  mouseleave(_: any): void;
28
+ selectElementsOnCanvas(elements: {
29
+ atoms: number[];
30
+ bonds: number[];
31
+ }, editor: Editor, event: any): void;
32
+ isDraggingStructureOnSaltOrSolvent(dragCtx: any, sgroups: Map<number, ReSGroup>): any;
27
33
  }
28
34
  export declare function selMerge(selection: any, add: any, reversible: boolean): any;
29
35
  export default SelectTool;
@@ -26,6 +26,15 @@ export namespace atomCuts {
26
26
  const Br: string;
27
27
  const I: string;
28
28
  const A: string;
29
+ const Q: string;
30
+ const R: string;
31
+ const K: string;
32
+ const M: string;
33
+ const Si: string;
34
+ const Na: string;
35
+ const X: string;
36
+ const D: string;
37
+ const B: string;
29
38
  }
30
39
  declare var _default: {};
31
40
  export default _default;
@@ -1,9 +1,10 @@
1
- export function GenericInput({ schema, value, onChange, type, ...props }: {
1
+ export function GenericInput({ schema, value, onChange, type, isFocused, ...props }: {
2
2
  [x: string]: any;
3
3
  schema: any;
4
4
  value?: string | undefined;
5
5
  onChange: any;
6
6
  type?: string | undefined;
7
+ isFocused?: boolean | undefined;
7
8
  }): JSX.Element;
8
9
  export namespace GenericInput {
9
10
  function val(ev: any, schema: any): any;
@@ -18,13 +18,16 @@ import { Struct } from 'ketcher-core';
18
18
  interface StructRenderProps {
19
19
  struct: Struct;
20
20
  options: any;
21
+ id?: any;
21
22
  Tag?: string | ComponentType<any>;
22
23
  }
23
24
  declare class StructRender extends Component<StructRenderProps> {
24
25
  tagRef: React.RefObject<HTMLElement>;
25
26
  constructor(props: any);
26
- shouldComponentUpdate(): boolean;
27
+ shouldComponentUpdate(previousProps: any): any;
28
+ update(): void;
27
29
  componentDidMount(): void;
30
+ componentDidUpdate(): void;
28
31
  render(): JSX.Element;
29
32
  }
30
33
  export default StructRender;
@@ -15,7 +15,6 @@
15
15
  ***************************************************************************/
16
16
  import { FC } from 'react';
17
17
  import { Template } from './TemplateTable';
18
- import { Struct } from 'ketcher-core';
19
18
  interface TemplateLibProps {
20
19
  filter: string;
21
20
  group: string;
@@ -23,6 +22,7 @@ interface TemplateLibProps {
23
22
  selected: Template;
24
23
  mode: string;
25
24
  initialTab: number;
25
+ saltsAndSolvents: Template[];
26
26
  }
27
27
  interface TemplateLibCallProps {
28
28
  onAttach: (tmpl: Template) => void;
@@ -32,18 +32,10 @@ interface TemplateLibCallProps {
32
32
  onFilter: (filter: string) => void;
33
33
  onOk: (res: any) => void;
34
34
  onSelect: (res: any) => void;
35
- functionalGroups: (Template & {
36
- modifiedStruct: Struct;
37
- })[];
35
+ functionalGroups: Template[];
38
36
  }
39
37
  declare type Props = TemplateLibProps & TemplateLibCallProps;
40
- export interface Result {
41
- struct: Struct;
42
- aid: number | null;
43
- bid: number | null;
44
- mode: string;
45
- }
46
38
  declare const _default: import("react-redux").ConnectedComponent<FC<Props>, import("react-redux").Omit<TemplateLibProps & TemplateLibCallProps & {
47
39
  children?: import("react").ReactNode;
48
- }, "initialTab" | "functionalGroups" | "onFilter" | "onSelect" | "onChangeGroup" | "onAttach" | "onDelete" | "onOk">>;
40
+ }, "onFilter" | "onSelect" | "onChangeGroup" | "onAttach" | "onDelete" | "initialTab" | "functionalGroups" | "saltsAndSolvents"> & TemplateLibProps & TemplateLibCallProps>;
49
41
  export default _default;
@@ -17,12 +17,13 @@ import { FC } from 'react';
17
17
  import { Struct } from 'ketcher-core';
18
18
  export interface Template {
19
19
  struct: Struct;
20
- modifiedStruct?: Struct;
21
20
  props: {
22
21
  atomid: number;
23
22
  bondid: number;
24
23
  group: string;
25
24
  prerender?: string;
25
+ abbreviation: string;
26
+ name: string;
26
27
  };
27
28
  }
28
29
  interface TemplateTableProps {
@@ -32,7 +33,6 @@ interface TemplateTableProps {
32
33
  onDelete?: (tmpl: Template) => void;
33
34
  onAttach?: (tmpl: Template) => void;
34
35
  titleRows?: 1 | 2;
35
- onDoubleClick: (tmpl: Template) => void;
36
36
  }
37
37
  declare const TemplateTable: FC<TemplateTableProps>;
38
38
  export default TemplateTable;
@@ -23,4 +23,5 @@ export default function initEditor(dispatch: any, getState: any): {
23
23
  onDearomatizeStruct: (struct: any) => any;
24
24
  onMouseDown: () => void;
25
25
  onConfirm: () => Promise<any>;
26
+ onShowInfo: (pl: any) => void;
26
27
  };
@@ -16,8 +16,10 @@
16
16
  import { AnyAction } from 'redux';
17
17
  interface FGState {
18
18
  lib: [];
19
+ functionalGroupInfo: any;
19
20
  mode: string;
20
21
  }
21
22
  declare const functionalGroupsReducer: (state: FGState | undefined, { type, payload }: AnyAction) => any;
23
+ export declare function highlightFG(dispatch: any, group: any): void;
22
24
  export declare function initFGTemplates(baseUrl: string): (dispatch: any) => Promise<void>;
23
25
  export default functionalGroupsReducer;
@@ -14,4 +14,5 @@
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
16
  export declare const functionalGroupsSelector: (state: any) => any;
17
+ export declare const functionGroupInfoSelector: (state: any) => any;
17
18
  export declare const modeSelector: (state: any) => any;
@@ -1,12 +1,23 @@
1
- export function initKeydownListener(element: any): (dispatch: any, getState: any) => void;
2
- export function initClipboard(dispatch: any, getState: any): {
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
+ export declare function initKeydownListener(element: any): (dispatch: any, getState: any) => void;
17
+ export declare function initClipboard(dispatch: any): {
3
18
  formats: any[];
4
19
  focused(): boolean;
5
- onCut(): {
6
- 'text/plain': string;
7
- } | null;
8
- onCopy(): {
9
- 'text/plain': string;
10
- } | null;
20
+ onCut(): {} | null;
21
+ onCopy(): {} | null;
11
22
  onPaste(data: any): void;
12
23
  };
@@ -43,6 +43,7 @@ export namespace initOptionsState {
43
43
  const server: boolean;
44
44
  const templates: boolean;
45
45
  const functionalGroups: boolean;
46
+ const saltsAndSolvents: boolean;
46
47
  }
47
48
  namespace analyse {
48
49
  const values: null;
@@ -0,0 +1,23 @@
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 { AnyAction } from 'redux';
17
+ interface SaltsAndSolventsState {
18
+ lib: [];
19
+ mode: string;
20
+ }
21
+ declare const saltsAndSolventsReducer: (state: SaltsAndSolventsState | undefined, { type, payload }: AnyAction) => any;
22
+ export declare function initSaltsAndSolventsTemplates(baseUrl: string): (dispatch: any) => Promise<void>;
23
+ export default saltsAndSolventsReducer;
@@ -0,0 +1,16 @@
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
+ export declare const saltsAndSolventsSelector: (state: any) => any;
@@ -0,0 +1,2 @@
1
+ declare var _default: import("react-redux").ConnectedComponent<(props: any) => null, import("react-redux").Omit<any, "id" | "x" | "dispatch" | "functionalGroups" | "groupId" | "y" | "restruct" | "baba">>;
2
+ export default _default;
@@ -3,6 +3,8 @@ declare class StructEditor extends Component<any, any, any> {
3
3
  constructor(props: any);
4
4
  state: {
5
5
  enableCursor: boolean;
6
+ clientX: number;
7
+ clientY: number;
6
8
  };
7
9
  editorRef: import("react").RefObject<any>;
8
10
  logRef: import("react").RefObject<any>;
@@ -1,5 +1,5 @@
1
1
  export default Analyse;
2
- declare const Analyse: import("react-redux").ConnectedComponent<typeof AnalyseDialog, import("react-redux").Omit<any, "values" | "onAnalyse" | "round" | "loading" | "onChangeRound">>;
2
+ declare const Analyse: import("react-redux").ConnectedComponent<typeof AnalyseDialog, import("react-redux").Omit<any, "values" | "round" | "onAnalyse" | "loading" | "onChangeRound">>;
3
3
  declare class AnalyseDialog extends Component<any, any, any> {
4
4
  static contextType: import("react").Context<import("../../../../../../../contexts").IErrorsContext>;
5
5
  constructor(props: any);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ketcher-react",
3
- "version": "2.6.4",
3
+ "version": "2.7.0-rc1",
4
4
  "description": "Web-based molecule sketcher",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "http://lifescience.opensource.epam.com/ketcher",
@@ -58,11 +58,12 @@
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": "2.6.4",
61
+ "ketcher-core": "workspace:*",
62
62
  "lodash": "^4.17.21",
63
63
  "miew-react": "^1.0.0",
64
64
  "react-colorful": "^5.4.0",
65
65
  "react-contextmenu": "^2.14.0",
66
+ "react-device-detect": "^2.2.2",
66
67
  "react-dropzone": "^11.7.1",
67
68
  "react-intersection-observer": "^8.32.1",
68
69
  "react-redux": "^7.2.1",
@@ -133,4 +134,4 @@
133
134
  "files": [
134
135
  "dist"
135
136
  ]
136
- }
137
+ }