ketcher-react 2.12.0-rc.4 → 2.13.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 (79) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +3 -0
  2. package/dist/components/Accordion/index.d.ts +16 -0
  3. package/dist/components/Accordion/styles.d.ts +29 -0
  4. package/dist/components/Accordion/types.d.ts +26 -0
  5. package/dist/components/Buttons/Button/Button.d.ts +2 -0
  6. package/dist/components/Buttons/Button/index.d.ts +16 -0
  7. package/dist/components/Buttons/Button/styles.d.ts +5 -0
  8. package/dist/components/Buttons/IconButton/IconButton.d.ts +1 -1
  9. package/dist/components/Buttons/index.d.ts +1 -0
  10. package/dist/components/Icon/utils/iconNameToIcon.d.ts +5 -0
  11. package/dist/components/InfoModal/InfoModal.d.ts +22 -0
  12. package/dist/components/InfoModal/constants.d.ts +4 -0
  13. package/dist/components/InfoModal/index.d.ts +17 -0
  14. package/dist/components/Input/Input.d.ts +2 -0
  15. package/dist/components/Input/index.d.ts +16 -0
  16. package/dist/components/Input/styles.d.ts +20 -0
  17. package/dist/components/StructRender/StructRender.d.ts +19 -0
  18. package/dist/components/StructRender/index.d.ts +16 -0
  19. package/dist/components/StructRender/styles.d.ts +20 -0
  20. package/dist/{script/ui/component/structrender.d.ts → components/StructRender/types.d.ts} +7 -15
  21. package/dist/components/index.d.ts +4 -0
  22. package/dist/components/styles/consts.d.ts +13 -0
  23. package/dist/index.css +1 -1
  24. package/dist/index.css.map +1 -1
  25. package/dist/index.js +2195 -1493
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.modern.js +2197 -1500
  28. package/dist/index.modern.js.map +1 -1
  29. package/dist/script/editor/Editor.d.ts +5 -8
  30. package/dist/script/editor/shared/utils.d.ts +12 -0
  31. package/dist/script/editor/tool/rotate-controller.d.ts +4 -1
  32. package/dist/script/editor/tool/rotate.d.ts +22 -8
  33. package/dist/script/editor/utils/functionalGroupsTooltip.d.ts +1 -1
  34. package/dist/script/editor/utils/index.d.ts +1 -0
  35. package/dist/script/editor/utils/structLayout.d.ts +4 -0
  36. package/dist/script/index.d.ts +1 -1
  37. package/dist/script/ui/action/index.d.ts +16 -3
  38. package/dist/script/ui/component/form/Select/Select.d.ts +1 -1
  39. package/dist/script/ui/component/form/buttonlist.d.ts +1 -1
  40. package/dist/script/ui/dialog/toolbox/sgroup.test.d.ts +1 -0
  41. package/dist/script/ui/state/editor/index.d.ts +2 -0
  42. package/dist/script/ui/state/modal/atoms.d.ts +1 -1
  43. package/dist/script/ui/state/modal/bonds.d.ts +1 -1
  44. package/dist/script/ui/state/mouse.d.ts +1 -1
  45. package/dist/script/ui/state/shared.d.ts +9 -0
  46. package/dist/script/ui/views/Editor.d.ts +1 -1
  47. package/dist/script/ui/views/components/ContextMenu/ContextMenuTrigger.utils.d.ts +1 -1
  48. package/dist/script/ui/views/components/StructEditor/StructEditor.d.ts +1 -0
  49. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenGroup.d.ts +1 -1
  50. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenSet.d.ts +1 -1
  51. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenericGroups.d.ts +1 -1
  52. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/components/ButtonGenSet/ButtonGenSet.d.ts +1 -1
  53. package/dist/script/ui/views/modal/components/InfoModal/InfoModal.d.ts +19 -0
  54. package/dist/script/ui/views/modal/components/InfoModal/InfoModal.test.d.ts +1 -0
  55. package/dist/script/ui/views/modal/components/InfoModal/PasteErrorModalBody/PasteErrorModalBody.d.ts +2 -0
  56. package/dist/script/ui/views/modal/components/InfoModal/PasteErrorModalBody/index.d.ts +1 -0
  57. package/dist/script/ui/views/modal/components/InfoModal/constants.d.ts +9 -0
  58. package/dist/script/ui/views/modal/components/InfoModal/index.d.ts +16 -0
  59. package/dist/script/ui/views/modal/components/InfoModal/mockStore.d.ts +63 -0
  60. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/components/MainRow.d.ts +1 -1
  61. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/components/OutinerRow.d.ts +1 -1
  62. package/dist/script/ui/views/modal/components/document/Open/components/DialogActionButton.d.ts +1 -1
  63. package/dist/script/ui/views/modal/components/document/Open/components/TextEditor.d.ts +1 -1
  64. package/dist/script/ui/views/toolbars/ArrowScroll/ArrowScroll.d.ts +1 -1
  65. package/dist/script/ui/views/toolbars/LeftToolbar/Bond/options.d.ts +1 -1
  66. package/dist/script/ui/views/toolbars/LeftToolbar/leftToolbarOptions.d.ts +1 -1
  67. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/variants.types.d.ts +1 -1
  68. package/dist/script/ui/views/toolbars/TopToolbar/ClipboardControls.d.ts +1 -1
  69. package/dist/script/ui/views/toolbars/TopToolbar/ElementWithDropdown.d.ts +1 -1
  70. package/dist/script/ui/views/toolbars/TopToolbar/ExternalFuncControls.d.ts +1 -1
  71. package/dist/script/ui/views/toolbars/TopToolbar/FileControls.d.ts +1 -1
  72. package/dist/script/ui/views/toolbars/TopToolbar/SystemControls.d.ts +1 -1
  73. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.container.d.ts +1 -1
  74. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.d.ts +1 -1
  75. package/dist/script/ui/views/toolbars/TopToolbar/UndoRedo.d.ts +1 -1
  76. package/dist/script/ui/views/toolbars/TopToolbar/ZoomControls.d.ts +1 -1
  77. package/dist/script/ui/views/toolbars/TopToolbar/ZoomInput.d.ts +1 -1
  78. package/dist/script/ui/views/toolbars/toolbar.types.d.ts +1 -1
  79. package/package.json +2 -2
@@ -13,20 +13,13 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- import { Action, Editor as KetcherEditor, Render, Struct } from 'ketcher-core';
16
+ import { Action, FloatingToolsParams, Editor as KetcherEditor, Render, Struct } from 'ketcher-core';
17
17
  import { PipelineSubscription, Subscription } from 'subscription';
18
18
  import { Highlighter } from './highlighter';
19
19
  import { contextMenuInfo } from '../ui/views/components/ContextMenu/contextMenu.types';
20
20
  import { HoverIcon } from './HoverIcon';
21
21
  import RotateController from './tool/rotate-controller';
22
22
  import { Tool } from './tool/Tool';
23
- export declare type FloatingToolsParams = {
24
- visible?: boolean;
25
- rotateHandlePosition?: {
26
- x: number;
27
- y: number;
28
- };
29
- };
30
23
  export interface Selection {
31
24
  atoms?: Array<number>;
32
25
  bonds?: Array<number>;
@@ -54,6 +47,8 @@ declare class Editor implements KetcherEditor {
54
47
  event: {
55
48
  message: Subscription;
56
49
  elementEdit: PipelineSubscription;
50
+ zoomIn: PipelineSubscription;
51
+ zoomOut: PipelineSubscription;
57
52
  bondEdit: PipelineSubscription;
58
53
  rgroupEdit: PipelineSubscription;
59
54
  sgroupEdit: PipelineSubscription;
@@ -84,6 +79,8 @@ declare class Editor implements KetcherEditor {
84
79
  setOptions(opts: string): false | import("ketcher-core/dist/application/render/render.types").RenderOptions;
85
80
  options(value?: any): import("ketcher-core/dist/application/render/render.types").RenderOptions;
86
81
  zoom(value?: any): number;
82
+ centerStruct(): void;
83
+ zoomAccordingContent(): void;
87
84
  selection(ci?: any): Selection | null;
88
85
  hover(ci: any, newTool?: any, event?: PointerEvent): void;
89
86
  update(action: Action | true, ignoreHistory?: boolean, options?: {
@@ -3,10 +3,22 @@ declare namespace _default {
3
3
  export { fracAngle };
4
4
  export { calcNewAtomPos };
5
5
  export { degrees };
6
+ export { normalizeAngle };
6
7
  }
7
8
  export default _default;
8
9
  declare function calcAngle(pos0: any, pos1: any): number;
9
10
  import { fracAngle } from "ketcher-core/dist/application/editor";
10
11
  declare function calcNewAtomPos(pos0: any, pos1: any, ctrlKey: any): Vec2;
11
12
  declare function degrees(angle: any): number;
13
+ /**
14
+ * @param {number} angle angle (in radians) from the X axis
15
+ * @returns {number} normalized angle (in radians) from the X axis
16
+ * @example
17
+ * normalizeAngleRelativeToXAxis(PI / 2) === PI / 2
18
+ * normalizeAngleRelativeToXAxis(PI) === PI
19
+ * normalizeAngleRelativeToXAxis(3/2 * PI) === -PI / 2
20
+ * normalizeAngleRelativeToXAxis(2 * PI) === 0
21
+ * normalizeAngleRelativeToXAxis(3 * PI) === PI
22
+ */
23
+ declare function normalizeAngle(angle: number): number;
12
24
  import { Vec2 } from "ketcher-core/dist/domain/entities/vec2";
@@ -16,6 +16,7 @@ declare class RotateController {
16
16
  private link?;
17
17
  private protractor?;
18
18
  private rotateArc?;
19
+ private snapAngleIndicator?;
19
20
  constructor(editor: Editor);
20
21
  private init;
21
22
  private get render();
@@ -24,7 +25,7 @@ declare class RotateController {
24
25
  rerender(): void;
25
26
  clean(): void;
26
27
  /**
27
- * Revert rotation by pressing "Escape" key
28
+ * Revert rotation by pressing "Escape" key or "Right click" button
28
29
  */
29
30
  revert(): void;
30
31
  private isPartOfFragmentSelected;
@@ -48,6 +49,8 @@ declare class RotateController {
48
49
  private dragCrossEnd;
49
50
  private dragCrossEndOUtOfBounding;
50
51
  updateFloatingToolsPosition: import("lodash").DebouncedFunc<() => void>;
52
+ private updateSnapAngleIndicator;
53
+ private drawSnapAngleIndicator;
51
54
  }
52
55
  export default RotateController;
53
56
  export { getDifference };
@@ -13,25 +13,39 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
+ /// <reference types="lodash" />
16
17
  import { FlipDirection, Vec2 } from 'ketcher-core';
17
18
  import Editor from '../Editor';
18
19
  import { Tool } from './Tool';
20
+ declare type SnapMode = 'one-bond' | 'multiple-bonds';
19
21
  declare class RotateTool implements Tool {
20
22
  private readonly editor;
21
23
  dragCtx: any;
22
24
  isNotActiveTool: boolean;
25
+ private centerAtomId?;
26
+ private snapInfo;
23
27
  constructor(editor: Editor, flipDirection?: FlipDirection);
28
+ private get reStruct();
29
+ private get struct();
30
+ private get selection();
31
+ get snapAngleDrawingProps(): {
32
+ isSnapping: boolean;
33
+ absoluteAngle: number;
34
+ relativeAngle: number;
35
+ snapMode: SnapMode;
36
+ } | null;
24
37
  mousedownHandle(handleCenter: Vec2, center: Vec2): void;
25
- /**
26
- * @returns `[center, visibleAtoms]`,
27
- * `visibleAtoms` = selected atoms
28
- * - atoms in contracted functional groups
29
- * + functional groups's attachment atoms
30
- */
31
- getCenter(editor: Editor): readonly [Vec2 | undefined, number[]];
32
- mousemove(event: any): boolean;
38
+ getCenter(): Vec2 | undefined;
39
+ mousemove: import("lodash").DebouncedFunc<(event: any) => boolean>;
33
40
  mouseup(): boolean;
34
41
  cancel(): void;
35
42
  mouseleave(): void;
43
+ private initSnapInfo;
44
+ private calculateAbsoluteSnapAngles;
45
+ private calculateAbsoluteAnglesByFixedBond;
46
+ private calculateAbsoluteAnglesByBisector;
47
+ private partitionNeighborsBySelection;
48
+ private snap;
49
+ private saveSnappingBonds;
36
50
  }
37
51
  export default RotateTool;
@@ -1,6 +1,6 @@
1
1
  import Editor from '../Editor';
2
2
  export declare const TOOLTIP_DELAY = 300;
3
- export declare function setFunctionalGroupsTooltip({ editor, event, isShow }: {
3
+ export declare function setFunctionalGroupsTooltip({ editor, event, isShow, }: {
4
4
  editor: Editor;
5
5
  event?: PointerEvent;
6
6
  isShow: boolean;
@@ -15,3 +15,4 @@
15
15
  ***************************************************************************/
16
16
  export * from './customOnChangeHandler';
17
17
  export * from './elementOffset';
18
+ export * from './structLayout';
@@ -0,0 +1,4 @@
1
+ import { Editor, ReStruct, Vec2 } from 'ketcher-core';
2
+ export declare function getSelectionMap(structure: ReStruct): {};
3
+ export declare function getStructCenter(ReStruct: any, selection?: any): Vec2;
4
+ export declare function recoordinate(editor: Editor, rp?: Vec2): void;
@@ -22,6 +22,6 @@ interface Config {
22
22
  buttons?: ButtonsConfig;
23
23
  errorHandler: (message: string) => void;
24
24
  }
25
- declare function buildKetcherAsync({ element, staticResourcesUrl, structServiceProvider, buttons, errorHandler }: Config): Promise<import("ketcher-core").Ketcher>;
25
+ declare function buildKetcherAsync({ element, staticResourcesUrl, structServiceProvider, buttons, errorHandler, }: Config): Promise<import("ketcher-core").Ketcher>;
26
26
  export type { Config, ButtonsConfig };
27
27
  export default buildKetcherAsync;
@@ -543,7 +543,9 @@ declare const config: {
543
543
  cut: {
544
544
  shortcut: string;
545
545
  title: string;
546
- action: (editor: any) => void;
546
+ action: {
547
+ thunk: (dispatch: any, _: any) => void;
548
+ };
547
549
  disabled: (editor: any) => boolean;
548
550
  hidden: (options: any) => boolean;
549
551
  };
@@ -554,7 +556,9 @@ declare const config: {
554
556
  copy: {
555
557
  shortcut: string;
556
558
  title: string;
557
- action: (editor: any) => void;
559
+ action: {
560
+ thunk: (dispatch: any, _: any) => void;
561
+ };
558
562
  disabled: (editor: any) => boolean;
559
563
  hidden: (options: any) => boolean;
560
564
  };
@@ -582,7 +586,9 @@ declare const config: {
582
586
  paste: {
583
587
  shortcut: string;
584
588
  title: string;
585
- action: (editor: any) => void;
589
+ action: {
590
+ thunk: (dispatch: any, _: any) => void;
591
+ };
586
592
  selected: ({ actions }: {
587
593
  actions: any;
588
594
  }) => any;
@@ -658,4 +664,11 @@ declare const config: {
658
664
  };
659
665
  hidden: (options: any) => boolean;
660
666
  };
667
+ 'info-modal': {
668
+ title: string;
669
+ action: {
670
+ dialog: string;
671
+ };
672
+ hidden: (options: any) => boolean;
673
+ };
661
674
  };
@@ -26,5 +26,5 @@ interface Props {
26
26
  multiple?: boolean;
27
27
  disabled?: boolean;
28
28
  }
29
- declare const Select: ({ className, value, onChange, multiple, disabled, options }: Props) => JSX.Element;
29
+ declare const Select: ({ className, value, onChange, multiple, disabled, options, }: Props) => JSX.Element;
30
30
  export default Select;
@@ -1,5 +1,5 @@
1
1
  export default ButtonList;
2
- declare function ButtonList({ value, onChange, schema, disabledIds, multiple, classes }: {
2
+ declare function ButtonList({ value, onChange, schema, disabledIds, multiple, classes, }: {
3
3
  value: any;
4
4
  onChange: any;
5
5
  schema: any;
@@ -0,0 +1 @@
1
+ export {};
@@ -22,4 +22,6 @@ export default function initEditor(dispatch: any, getState: any): {
22
22
  onShowInfo: (payload: any) => void;
23
23
  onApiSettings: (payload: any) => any;
24
24
  onUpdateFloatingTools: (...args: any[]) => void;
25
+ onZoomIn: import("lodash").DebouncedFunc<() => any>;
26
+ onZoomOut: import("lodash").DebouncedFunc<() => any>;
25
27
  };
@@ -1,6 +1,6 @@
1
1
  import { Atom } from 'ketcher-core';
2
2
  export declare function isAtomsArray(selectedElements: Atom | Atom[]): boolean;
3
- export declare function updateSelectedAtoms({ atoms, changeAtomPromise, editor }: {
3
+ export declare function updateSelectedAtoms({ atoms, changeAtomPromise, editor, }: {
4
4
  atoms: number[];
5
5
  editor: any;
6
6
  changeAtomPromise: Promise<Atom>;
@@ -1,5 +1,5 @@
1
1
  import { Bond } from 'ketcher-core';
2
- export declare function updateSelectedBonds({ bonds, changeBondPromise, editor }: {
2
+ export declare function updateSelectedBonds({ bonds, changeBondPromise, editor, }: {
3
3
  bonds: number[];
4
4
  changeBondPromise: Promise<Bond>;
5
5
  editor: any;
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- export declare function initMouseListener(element: any): (dispatch: any) => void;
16
+ export declare function initMouseListener(element: any): (dispatch: any, getState: any) => void;
@@ -21,3 +21,12 @@ export declare function removeStructAction(): {
21
21
  action?: Record<string, unknown>;
22
22
  };
23
23
  export declare function load(struct: Struct, options?: any): (dispatch: any, getState: any) => Promise<void>;
24
+ export declare function openInfoModal(command: 'Paste' | 'Copy' | 'Cut'): {
25
+ type: 'MODAL_OPEN';
26
+ data: {
27
+ name: 'info-modal';
28
+ prop: {
29
+ message: 'Paste' | 'Copy' | 'Cut';
30
+ };
31
+ };
32
+ };
@@ -1,3 +1,3 @@
1
1
  export default Editor;
2
- declare const Editor: import("react-redux").ConnectedComponent<typeof StructEditor, import("react-redux").Omit<any, "options" | "type" | "indigoVerification">>;
2
+ declare const Editor: import("react-redux").ConnectedComponent<typeof StructEditor, import("react-redux").Omit<any, string | number | symbol>>;
3
3
  import { StructEditor } from "./components";
@@ -2,6 +2,6 @@ import { FunctionalGroup } from 'ketcher-core';
2
2
  import Editor from 'src/script/editor';
3
3
  import { ClosestItem, ContextMenuShowProps, GetIsItemInSelectionArgs } from './contextMenu.types';
4
4
  import { Selection } from '../../../../editor/Editor';
5
- export declare const getIsItemInSelection: ({ item, selection, selectedSGroupsIds, selectedFunctionalGroups }: GetIsItemInSelectionArgs) => boolean;
5
+ export declare const getIsItemInSelection: ({ item, selection, selectedSGroupsIds, selectedFunctionalGroups, }: GetIsItemInSelectionArgs) => boolean;
6
6
  export declare function getMenuPropsForClosestItem(editor: Editor, closestItem: ClosestItem): ContextMenuShowProps | null;
7
7
  export declare function getMenuPropsForSelection(selection: Selection | null, selectedFunctionalGroups: Map<number, FunctionalGroup>): ContextMenuShowProps | null;
@@ -9,6 +9,7 @@ declare class StructEditor extends Component<any, any, any> {
9
9
  editorRef: import("react").RefObject<any>;
10
10
  logRef: import("react").RefObject<any>;
11
11
  updateFloatingToolsPositionOnScroll(): void;
12
+ handleWheel: (event: any) => void;
12
13
  shouldComponentUpdate(nextProps: any, nextState: any): boolean;
13
14
  UNSAFE_componentWillReceiveProps(props: any): void;
14
15
  componentDidMount(): void;
@@ -21,5 +21,5 @@ declare type GenProps = {
21
21
  group: GenGroupType;
22
22
  disabledQueryElements: Array<string> | null;
23
23
  };
24
- declare const GenGroup: ({ group, onAtomSelect, selected, disabledQueryElements }: GenProps) => JSX.Element;
24
+ declare const GenGroup: ({ group, onAtomSelect, selected, disabledQueryElements, }: GenProps) => JSX.Element;
25
25
  export { GenGroup };
@@ -23,5 +23,5 @@ declare type GenSetProps = {
23
23
  group: string;
24
24
  disabledQueryElements: Array<string> | null;
25
25
  };
26
- declare function GenSet({ labels, selected, onAtomSelect, className, group, disabledQueryElements }: GenSetProps): JSX.Element;
26
+ declare function GenSet({ labels, selected, onAtomSelect, className, group, disabledQueryElements, }: GenSetProps): JSX.Element;
27
27
  export { GenSet };
@@ -19,5 +19,5 @@ declare type GenericGroupsProps = {
19
19
  onAtomSelect: (label: string, activateImmediately: boolean) => void;
20
20
  disabledQueryElements: Array<string> | null;
21
21
  };
22
- declare function GenericGroups({ selected, onAtomSelect, disabledQueryElements }: GenericGroupsProps): JSX.Element;
22
+ declare function GenericGroups({ selected, onAtomSelect, disabledQueryElements, }: GenericGroupsProps): JSX.Element;
23
23
  export default GenericGroups;
@@ -21,5 +21,5 @@ declare type ButtonGenSetProps = {
21
21
  selected: (label: string) => boolean;
22
22
  disabled: boolean;
23
23
  };
24
- declare const ButtonGenSet: ({ button, onAtomSelect, selected, disabled }: ButtonGenSetProps) => JSX.Element;
24
+ declare const ButtonGenSet: ({ button, onAtomSelect, selected, disabled, }: ButtonGenSetProps) => JSX.Element;
25
25
  export default ButtonGenSet;
@@ -0,0 +1,19 @@
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
+ /// <reference types="react" />
17
+ declare function ErrorInfoModal(props: any): JSX.Element;
18
+ declare const InfoModal: import("react-redux").ConnectedComponent<typeof ErrorInfoModal, import("react-redux").Omit<any, "errorMessage" | "onOk">>;
19
+ export default InfoModal;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const PasteErrorModalBody: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './PasteErrorModalBody';
@@ -0,0 +1,9 @@
1
+ export declare const pasteErrorText = "Your browser doesn't allow pasting clipboard content via button. Please use shortcut instead.";
2
+ export declare const shortcut: {
3
+ hotKey: string;
4
+ label: string;
5
+ };
6
+ export declare const error: {
7
+ message: string;
8
+ close: string;
9
+ };
@@ -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 { default } from './InfoModal';
@@ -0,0 +1,63 @@
1
+ export function renderWithMockStore(component: any, initialState?: {
2
+ options: {
3
+ app: {
4
+ errorMessage: string;
5
+ };
6
+ };
7
+ }, store?: any): {
8
+ store: any;
9
+ container: HTMLElement;
10
+ baseElement: HTMLElement;
11
+ debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
12
+ rerender: (ui: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => void;
13
+ unmount: () => void;
14
+ asFragment: () => DocumentFragment;
15
+ getByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
16
+ getAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
17
+ queryByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
18
+ queryAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
19
+ findByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
20
+ findAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
21
+ getByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
22
+ getAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
23
+ queryByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
24
+ queryAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
25
+ findByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
26
+ findAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
27
+ getByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
28
+ getAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
29
+ queryByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
30
+ queryAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
31
+ findByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
32
+ findAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
33
+ getByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
34
+ getAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
35
+ queryByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
36
+ queryAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
37
+ findByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
38
+ findAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
39
+ getByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
40
+ getAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
41
+ queryByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
42
+ queryAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
43
+ findByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
44
+ findAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
45
+ getByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
46
+ getAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
47
+ queryByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
48
+ queryAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
49
+ findByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
50
+ findAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
51
+ getByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement;
52
+ getAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
53
+ queryByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement | null;
54
+ queryAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
55
+ findByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
56
+ findAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
57
+ getByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
58
+ getAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
59
+ queryByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
60
+ queryAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
61
+ findByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
62
+ findAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
63
+ };
@@ -1,5 +1,5 @@
1
1
  export default MainRow;
2
- declare function MainRow({ row, caption, refer, onAtomSelect, onDoubleClick, currentEvents, atomClassNames, className }: {
2
+ declare function MainRow({ row, caption, refer, onAtomSelect, onDoubleClick, currentEvents, atomClassNames, className, }: {
3
3
  row: any;
4
4
  caption: any;
5
5
  refer: any;
@@ -1,5 +1,5 @@
1
1
  export default OutinerRow;
2
- declare function OutinerRow({ row, caption, onAtomSelect, onDoubleClick, currentEvents, atomClassNames, className }: {
2
+ declare function OutinerRow({ row, caption, onAtomSelect, onDoubleClick, currentEvents, atomClassNames, className, }: {
3
3
  row: any;
4
4
  caption: any;
5
5
  onAtomSelect: any;
@@ -21,5 +21,5 @@ declare type Props = {
21
21
  styles: string;
22
22
  title?: string;
23
23
  };
24
- export declare const DialogActionButton: ({ clickHandler, label, title, styles, disabled }: Props) => JSX.Element;
24
+ export declare const DialogActionButton: ({ clickHandler, label, title, styles, disabled, }: Props) => JSX.Element;
25
25
  export {};
@@ -19,4 +19,4 @@ export declare type TextEditorProps = {
19
19
  inputHandler: (str: string) => void;
20
20
  autoFocus?: boolean;
21
21
  };
22
- export declare const TextEditor: ({ structStr, inputHandler, autoFocus }: TextEditorProps) => JSX.Element;
22
+ export declare const TextEditor: ({ structStr, inputHandler, autoFocus, }: TextEditorProps) => JSX.Element;
@@ -20,5 +20,5 @@ interface ArrowScrollProps {
20
20
  scrollUp: any;
21
21
  scrollDown: any;
22
22
  }
23
- declare const ArrowScroll: ({ startInView, endInView, scrollUp, scrollDown }: ArrowScrollProps) => JSX.Element;
23
+ declare const ArrowScroll: ({ startInView, endInView, scrollUp, scrollDown, }: ArrowScrollProps) => JSX.Element;
24
24
  export { ArrowScroll };
@@ -21,4 +21,4 @@ declare const bondQuery: ToolbarItem[];
21
21
  declare const bondSpecial: ToolbarItem[];
22
22
  declare const groupOptions: ToolbarItem[];
23
23
  declare const groupDescriptors: GroupDescriptor[];
24
- export { bondCommon, bondStereo, bondQuery, bondSpecial, groupOptions, groupDescriptors };
24
+ export { bondCommon, bondStereo, bondQuery, bondSpecial, groupOptions, groupDescriptors, };
@@ -5,4 +5,4 @@ declare const shapeOptions: ToolbarItem[];
5
5
  declare const selectOptions: ToolbarItem[];
6
6
  declare const arrowsOptions: ToolbarItem[];
7
7
  declare const mappingOptions: ToolbarItem[];
8
- export { rGroupOptions, bondCommon, bondQuery, bondSpecial, bondStereo, shapeOptions, selectOptions, arrowsOptions, mappingOptions };
8
+ export { rGroupOptions, bondCommon, bondQuery, bondSpecial, bondStereo, shapeOptions, selectOptions, arrowsOptions, mappingOptions, };
@@ -32,4 +32,4 @@ interface MultiToolCallProps {
32
32
  onAction: (action: UiActionAction) => void;
33
33
  }
34
34
  declare type MultiToolVariant = 'default' | 'grouped';
35
- export type { GroupDescriptor, MultiToolProps, MultiToolCallProps, MultiToolVariant };
35
+ export type { GroupDescriptor, MultiToolProps, MultiToolCallProps, MultiToolVariant, };
@@ -27,5 +27,5 @@ interface ClipboardControlsProps {
27
27
  [key in string]: string;
28
28
  };
29
29
  }
30
- export declare const ClipboardControls: ({ onCopy, onCopyMol, onCopyKet, onCopyImage, onPaste, onCut, shortcuts, disabledButtons, hiddenButtons }: ClipboardControlsProps) => JSX.Element;
30
+ export declare const ClipboardControls: ({ onCopy, onCopyMol, onCopyKet, onCopyImage, onPaste, onCut, shortcuts, disabledButtons, hiddenButtons, }: ClipboardControlsProps) => JSX.Element;
31
31
  export {};
@@ -19,5 +19,5 @@ interface ElementWithDropdownProps {
19
19
  dropDownElements: JSX.Element[];
20
20
  onToolOpen: () => void;
21
21
  }
22
- export declare const ElementWithDropdown: import("react-redux").ConnectedComponent<({ topElement, dropDownElements, onToolOpen }: ElementWithDropdownProps) => JSX.Element, import("react-redux").Omit<ElementWithDropdownProps, "onToolOpen">>;
22
+ export declare const ElementWithDropdown: import("react-redux").ConnectedComponent<({ topElement, dropDownElements, onToolOpen, }: ElementWithDropdownProps) => JSX.Element, import("react-redux").Omit<ElementWithDropdownProps, "onToolOpen">>;
23
23
  export {};
@@ -31,5 +31,5 @@ interface ExternalFuncProps {
31
31
  [key in string]: string;
32
32
  };
33
33
  }
34
- export declare const ExternalFuncControls: ({ isCollapsed, onLayout, onClean, onAromatize, onDearomatize, onCalculate, onCheck, onAnalyse, onMiew, disabledButtons, indigoVerification, hiddenButtons, shortcuts }: ExternalFuncProps) => JSX.Element;
34
+ export declare const ExternalFuncControls: ({ isCollapsed, onLayout, onClean, onAromatize, onDearomatize, onCalculate, onCheck, onAnalyse, onMiew, disabledButtons, indigoVerification, hiddenButtons, shortcuts, }: ExternalFuncProps) => JSX.Element;
35
35
  export {};
@@ -7,5 +7,5 @@ interface FileControlsProps {
7
7
  };
8
8
  hiddenButtons: string[];
9
9
  }
10
- export declare const FileControls: ({ onFileOpen, onSave, shortcuts, hiddenButtons }: FileControlsProps) => JSX.Element;
10
+ export declare const FileControls: ({ onFileOpen, onSave, shortcuts, hiddenButtons, }: FileControlsProps) => JSX.Element;
11
11
  export {};
@@ -24,5 +24,5 @@ interface SystemControlsProps {
24
24
  onFullscreen: () => void;
25
25
  onHelp: () => void;
26
26
  }
27
- export declare const SystemControls: ({ disabledButtons, hiddenButtons, onSettingsOpen, onFullscreen, onHelp, onAboutOpen, className }: SystemControlsProps) => JSX.Element;
27
+ export declare const SystemControls: ({ disabledButtons, hiddenButtons, onSettingsOpen, onFullscreen, onHelp, onAboutOpen, className, }: SystemControlsProps) => JSX.Element;
28
28
  export {};
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
16
  /// <reference types="react" />
17
- declare const TopToolbarContainer: import("react-redux").ConnectedComponent<({ className, disabledButtons, indigoVerification, hiddenButtons, shortcuts, onClear, onFileOpen, onSave, onUndo, onRedo, onCopy, onCopyMol, onCopyKet, onCopyImage, onCut, onPaste, currentZoom, onZoom, onZoomIn, onZoomOut, onSettingsOpen, onLayout, onClean, onAromatize, onDearomatize, onCalculate, onCheck, onAnalyse, onMiew, onFullscreen, onAbout, onHelp }: import("./TopToolbar").PanelProps) => JSX.Element, import("react-redux").Omit<import("./TopToolbar").PanelProps, "disabledButtons" | "indigoVerification" | "hiddenButtons" | "shortcuts" | "onClear" | "onFileOpen" | "onSave" | "onUndo" | "onRedo" | "onCopy" | "onCopyMol" | "onCopyKet" | "onCopyImage" | "onCut" | "onPaste" | "currentZoom" | "onZoom" | "onZoomIn" | "onZoomOut" | "onSettingsOpen" | "onLayout" | "onClean" | "onAromatize" | "onDearomatize" | "onCalculate" | "onCheck" | "onAnalyse" | "onMiew" | "onFullscreen" | "onAbout" | "onHelp">>;
17
+ declare const TopToolbarContainer: import("react-redux").ConnectedComponent<({ className, disabledButtons, indigoVerification, hiddenButtons, shortcuts, onClear, onFileOpen, onSave, onUndo, onRedo, onCopy, onCopyMol, onCopyKet, onCopyImage, onCut, onPaste, currentZoom, onZoom, onZoomIn, onZoomOut, onSettingsOpen, onLayout, onClean, onAromatize, onDearomatize, onCalculate, onCheck, onAnalyse, onMiew, onFullscreen, onAbout, onHelp, }: import("./TopToolbar").PanelProps) => JSX.Element, import("react-redux").Omit<import("./TopToolbar").PanelProps, "disabledButtons" | "indigoVerification" | "hiddenButtons" | "shortcuts" | "onClear" | "onFileOpen" | "onSave" | "onUndo" | "onRedo" | "onCopy" | "onCopyMol" | "onCopyKet" | "onCopyImage" | "onCut" | "onPaste" | "currentZoom" | "onZoom" | "onZoomIn" | "onZoomOut" | "onSettingsOpen" | "onLayout" | "onClean" | "onAromatize" | "onDearomatize" | "onCalculate" | "onCheck" | "onAnalyse" | "onMiew" | "onFullscreen" | "onAbout" | "onHelp">>;
18
18
  export { TopToolbarContainer };
@@ -51,5 +51,5 @@ export interface PanelProps {
51
51
  onAbout: VoidFunction;
52
52
  onHelp: VoidFunction;
53
53
  }
54
- export declare const TopToolbar: ({ className, disabledButtons, indigoVerification, hiddenButtons, shortcuts, onClear, onFileOpen, onSave, onUndo, onRedo, onCopy, onCopyMol, onCopyKet, onCopyImage, onCut, onPaste, currentZoom, onZoom, onZoomIn, onZoomOut, onSettingsOpen, onLayout, onClean, onAromatize, onDearomatize, onCalculate, onCheck, onAnalyse, onMiew, onFullscreen, onAbout, onHelp }: PanelProps) => JSX.Element;
54
+ export declare const TopToolbar: ({ className, disabledButtons, indigoVerification, hiddenButtons, shortcuts, onClear, onFileOpen, onSave, onUndo, onRedo, onCopy, onCopyMol, onCopyKet, onCopyImage, onCut, onPaste, currentZoom, onZoom, onZoomIn, onZoomOut, onSettingsOpen, onLayout, onClean, onAromatize, onDearomatize, onCalculate, onCheck, onAnalyse, onMiew, onFullscreen, onAbout, onHelp, }: PanelProps) => JSX.Element;
55
55
  export {};
@@ -23,5 +23,5 @@ interface UndoRedoProps {
23
23
  onUndo: () => void;
24
24
  onRedo: () => void;
25
25
  }
26
- export declare const UndoRedo: ({ onUndo, onRedo, disabledButtons, hiddenButtons, shortcuts }: UndoRedoProps) => JSX.Element;
26
+ export declare const UndoRedo: ({ onUndo, onRedo, disabledButtons, hiddenButtons, shortcuts, }: UndoRedoProps) => JSX.Element;
27
27
  export {};
@@ -25,5 +25,5 @@ interface ZoomProps {
25
25
  [key in string]: string;
26
26
  };
27
27
  }
28
- export declare const ZoomControls: ({ currentZoom, onZoom, onZoomIn, onZoomOut, disabledButtons, hiddenButtons, shortcuts }: ZoomProps) => JSX.Element;
28
+ export declare const ZoomControls: ({ currentZoom, onZoom, onZoomIn, onZoomOut, disabledButtons, hiddenButtons, shortcuts, }: ZoomProps) => JSX.Element;
29
29
  export {};