ketcher-react 2.4.1 → 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.
Files changed (179) hide show
  1. package/README.md +14 -8
  2. package/dist/Editor.d.ts +1 -0
  3. package/dist/index.css +1 -1
  4. package/dist/index.css.map +1 -1
  5. package/dist/index.js +11455 -6550
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.modern.js +11445 -6550
  8. package/dist/index.modern.js.map +1 -1
  9. package/dist/script/builders/ketcher/ButtonName.d.ts +1 -1
  10. package/dist/script/editor/Editor.d.ts +5 -2
  11. package/dist/script/editor/highlighter.d.ts +32 -0
  12. package/dist/script/editor/shared/closest.d.ts +1 -1
  13. package/dist/script/editor/tool/apoint.d.ts +18 -7
  14. package/dist/script/editor/tool/atom.d.ts +23 -18
  15. package/dist/script/editor/tool/attach.d.ts +19 -11
  16. package/dist/script/editor/tool/bond.d.ts +22 -15
  17. package/dist/script/editor/tool/chain.d.ts +21 -13
  18. package/dist/script/editor/tool/charge.d.ts +19 -8
  19. package/dist/script/editor/tool/enhanced-stereo.d.ts +7 -1
  20. package/dist/script/editor/tool/eraser.d.ts +24 -12
  21. package/dist/script/editor/tool/hand.d.ts +30 -0
  22. package/dist/script/editor/tool/helper/lasso.d.ts +45 -30
  23. package/dist/script/editor/tool/helper/locate.d.ts +36 -21
  24. package/dist/script/editor/tool/index.d.ts +4 -2
  25. package/dist/script/editor/tool/paste.d.ts +23 -13
  26. package/dist/script/editor/tool/reactionarrow.d.ts +21 -8
  27. package/dist/script/editor/tool/reactionmap.d.ts +21 -9
  28. package/dist/script/editor/tool/reactionplus.d.ts +19 -6
  29. package/dist/script/editor/tool/reactionunmap.d.ts +18 -3
  30. package/dist/script/editor/tool/rgroupatom.d.ts +18 -6
  31. package/dist/script/editor/tool/rgroupfragment.d.ts +18 -7
  32. package/dist/script/editor/tool/rotate.d.ts +22 -10
  33. package/dist/script/editor/tool/sgroup.d.ts +23 -11
  34. package/dist/script/editor/tool/simpleobject.d.ts +20 -7
  35. package/dist/script/editor/tool/template.d.ts +24 -19
  36. package/dist/script/editor/tool/text.d.ts +1 -2
  37. package/dist/script/ui/App/App.container.d.ts +1 -0
  38. package/dist/script/ui/App/App.d.ts +1 -0
  39. package/dist/script/ui/App/AppHidden/AppHidden.container.d.ts +1 -0
  40. package/dist/script/ui/App/AppHidden/AppHidden.d.ts +1 -0
  41. package/dist/script/ui/Portal/Portal.d.ts +1 -1
  42. package/dist/script/ui/action/action.types.d.ts +1 -1
  43. package/dist/script/ui/action/fullscreen.d.ts +23 -0
  44. package/dist/script/ui/action/functionalGroups.d.ts +3 -0
  45. package/dist/script/ui/action/help.d.ts +8 -0
  46. package/dist/script/ui/action/index.d.ts +74 -5
  47. package/dist/script/ui/action/isHidden.d.ts +1 -3
  48. package/dist/script/ui/action/server.d.ts +1 -3
  49. package/dist/script/ui/action/tools.d.ts +41 -0
  50. package/dist/script/ui/component/ContextMenu/ContextMenu.d.ts +1 -0
  51. package/dist/script/ui/component/cliparea/cliparea.d.ts +4 -0
  52. package/dist/script/ui/component/form/MeasureInput/measure-input.d.ts +8 -0
  53. package/dist/script/ui/component/form/Select/Select.d.ts +30 -0
  54. package/dist/script/ui/component/form/Select/Select.test.d.ts +1 -0
  55. package/dist/script/ui/{views/modal/components/PeriodTable/components/GenericGroups/components/components → component/form/Select}/index.d.ts +2 -1
  56. package/dist/script/ui/component/form/colorPicker/ColorPicker.d.ts +1 -0
  57. package/dist/script/ui/component/form/combobox/combobox.d.ts +4 -0
  58. package/dist/script/ui/component/form/form/errorPopover.d.ts +5 -0
  59. package/dist/script/ui/component/form/form/form.d.ts +9 -4
  60. package/dist/script/ui/component/form/input.d.ts +19 -1
  61. package/dist/script/ui/component/form/{select.d.ts → select-list.d.ts} +0 -0
  62. package/dist/script/ui/component/structrender.d.ts +28 -4
  63. package/dist/script/ui/component/view/Atom/Atom.d.ts +2 -2
  64. package/dist/script/ui/component/view/Tabs/Tabs.d.ts +3 -0
  65. package/dist/script/ui/component/view/openbutton.d.ts +2 -0
  66. package/dist/script/ui/data/schema/options-schema.d.ts +2 -2
  67. package/dist/script/ui/data/schema/sdata-schema.d.ts +11 -9
  68. package/dist/script/ui/data/schema/struct-schema.d.ts +30 -28
  69. package/dist/script/ui/dialog/template/EmptySearchResult.d.ts +1 -0
  70. package/dist/script/ui/dialog/template/TemplateDialog.d.ts +7 -1
  71. package/dist/script/ui/dialog/template/TemplateTable.d.ts +10 -7
  72. package/dist/script/ui/dialog/template/template-attach.d.ts +27 -1
  73. package/dist/script/ui/dialog/toolbox/enhancedStereo/enhancedStereo.d.ts +3 -1
  74. package/dist/script/ui/state/editor/index.d.ts +1 -0
  75. package/dist/script/ui/state/request/index.d.ts +2 -0
  76. package/dist/script/ui/state/request/request.types.d.ts +3 -1
  77. package/dist/script/ui/{views/modal/components/PeriodTable/components/GenericGroups/components/index.d.ts → utils/fileOpener.d.ts} +1 -1
  78. package/dist/script/ui/utils/index.d.ts +3 -0
  79. package/dist/script/ui/views/components/Cursor.d.ts +6 -0
  80. package/dist/script/ui/views/components/Dialog/Dialog.d.ts +17 -9
  81. package/dist/script/ui/views/{modal/components/PeriodTable/components/GenericGroups/index.d.ts → components/Spinner/LoadingCircles.d.ts} +2 -1
  82. package/dist/script/ui/views/components/Spinner/index.d.ts +1 -1
  83. package/dist/script/ui/views/components/StructEditor/StructEditor.d.ts +8 -0
  84. package/dist/script/ui/views/components/index.d.ts +2 -2
  85. package/dist/script/ui/views/modal/Modal.d.ts +1 -0
  86. package/dist/script/ui/views/modal/components/Confirm/Confirm.d.ts +7 -0
  87. package/dist/script/ui/views/modal/components/Confirm/index.d.ts +1 -0
  88. package/dist/script/ui/views/modal/components/ExtendedTable/ExtendedTable.d.ts +2 -0
  89. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/BoxWithLines.d.ts +18 -0
  90. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenGroup.d.ts +24 -0
  91. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenSet.d.ts +26 -0
  92. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenericGroups.d.ts +22 -0
  93. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/index.d.ts +27 -0
  94. package/dist/script/ui/views/modal/components/ExtendedTable/helpers.d.ts +1 -0
  95. package/dist/script/ui/views/modal/components/ExtendedTable/index.d.ts +1 -0
  96. package/dist/script/ui/views/modal/components/PeriodTable/PeriodTable.d.ts +9 -4
  97. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/ElementsTable.d.ts +2 -0
  98. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/components/MainRow.d.ts +3 -2
  99. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/components/OutinerRow.d.ts +3 -2
  100. package/dist/script/ui/views/modal/components/PeriodTable/components/index.d.ts +1 -1
  101. package/dist/script/ui/views/modal/components/Text/FontControl/FontControl.d.ts +1 -0
  102. package/dist/script/ui/views/{components/FunctionalGroups/FunctionalGroups.d.ts → modal/components/Text/SpecialSymbols/SpecialSymbolsButton.d.ts} +7 -8
  103. package/dist/script/ui/views/{components/Spinner/Spinner.d.ts → modal/components/Text/SpecialSymbolsList/SpecialSymbolsList.d.ts} +5 -3
  104. package/dist/script/ui/views/modal/components/Text/Text.d.ts +1 -0
  105. package/dist/script/ui/views/modal/components/Text/TextButton/TextButton.d.ts +1 -0
  106. package/dist/script/ui/views/modal/components/document/Open/Open.container.d.ts +7 -1
  107. package/dist/script/ui/views/modal/components/document/Open/Open.d.ts +6 -1
  108. package/dist/script/ui/views/modal/components/document/Open/components/AnalyzingFile.d.ts +20 -0
  109. package/dist/script/ui/views/modal/components/document/Open/components/DialogActionButton.d.ts +25 -0
  110. package/dist/script/ui/views/modal/components/document/Open/components/FileDrop.d.ts +26 -0
  111. package/dist/script/ui/views/modal/components/document/Open/components/OpenOptions.d.ts +24 -0
  112. package/dist/script/ui/views/modal/components/document/Open/components/TextEditor.d.ts +21 -0
  113. package/dist/script/ui/views/modal/components/document/Open/components/ViewSwitcher.d.ts +31 -0
  114. package/dist/script/ui/views/modal/components/document/Save/Save.d.ts +16 -6
  115. package/dist/script/ui/views/modal/components/meta/About/About.d.ts +1 -1
  116. package/dist/script/ui/views/modal/components/meta/Settings/Accordion/Accordion.d.ts +22 -0
  117. package/dist/script/ui/views/modal/components/meta/Settings/{components/Accordion → Accordion}/index.d.ts +0 -0
  118. package/dist/script/ui/views/modal/components/meta/Settings/Settings.d.ts +1 -0
  119. package/dist/script/ui/views/modal/components/meta/Settings/fieldGroups.d.ts +41 -0
  120. package/dist/script/ui/views/modal/components/process/Analyse/Analyse.d.ts +3 -0
  121. package/dist/script/ui/views/modal/components/process/Analyse/components/FormulaInput/FormulaInput.d.ts +2 -1
  122. package/dist/script/ui/views/modal/components/process/Miew/Miew.d.ts +30 -9
  123. package/dist/script/ui/views/modal/components/process/Recognize/Recognize.d.ts +1 -1
  124. package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.container.d.ts +3 -1
  125. package/dist/script/ui/views/modal/components/toolbox/Atom/ElementNumber/ElementNumber.d.ts +1 -0
  126. package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.container.d.ts +1 -0
  127. package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.d.ts +1 -0
  128. package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.container.d.ts +1 -0
  129. package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.d.ts +1 -0
  130. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.container.d.ts +1 -0
  131. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.d.ts +1 -0
  132. package/dist/script/ui/views/modal/components/toolbox/FG/RemoveFG.d.ts +1 -0
  133. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.container.d.ts +1 -0
  134. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.d.ts +1 -0
  135. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/components/IfThenSelect/IfThenSelect.d.ts +1 -0
  136. package/dist/script/ui/views/toolbars/ArrowScroll/ArrowScroll.d.ts +1 -0
  137. package/dist/script/ui/views/toolbars/BottomToolbar/BottomToolbar.d.ts +2 -2
  138. package/dist/script/ui/views/toolbars/BottomToolbar/TemplatesList/TemplatesList.d.ts +1 -0
  139. package/dist/script/ui/views/toolbars/LeftToolbar/Bond/Bond.d.ts +2 -2
  140. package/dist/script/ui/views/toolbars/LeftToolbar/LeftToolbar.container.d.ts +3 -2
  141. package/dist/script/ui/views/toolbars/LeftToolbar/LeftToolbar.d.ts +2 -2
  142. package/dist/script/ui/views/toolbars/LeftToolbar/RGroup/RGroup.d.ts +2 -2
  143. package/dist/script/ui/views/toolbars/LeftToolbar/Shape/Shape.d.ts +2 -2
  144. package/dist/script/ui/views/toolbars/LeftToolbar/Transform/Transform.d.ts +2 -2
  145. package/dist/script/ui/views/toolbars/RightToolbar/AtomsList/AtomsList.d.ts +2 -2
  146. package/dist/script/ui/views/toolbars/RightToolbar/RightToolbar.d.ts +2 -2
  147. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ActionButton/ActionButton.d.ts +1 -0
  148. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarGroupItem.d.ts +1 -0
  149. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/ToolbarMultiToolItem.d.ts +1 -0
  150. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/DefaultMultiTool/DefaultMultiTool.d.ts +3 -4
  151. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/GroupedMultiTool/GroupedMultiTool.d.ts +3 -4
  152. package/dist/script/ui/views/toolbars/TopToolbar/ClipboardControls.d.ts +31 -0
  153. package/dist/script/ui/views/{components/FunctionalGroups/index.d.ts → toolbars/TopToolbar/Divider.d.ts} +2 -1
  154. package/dist/script/ui/views/toolbars/TopToolbar/ElementWithDropdown.d.ts +23 -0
  155. package/dist/script/ui/views/toolbars/TopToolbar/ExternalFuncControls.d.ts +36 -0
  156. package/dist/script/ui/views/toolbars/TopToolbar/FileControls.d.ts +26 -0
  157. package/dist/script/ui/views/toolbars/TopToolbar/IconButton.d.ts +26 -0
  158. package/dist/script/ui/views/toolbars/TopToolbar/ScaleTransformer.d.ts +24 -0
  159. package/dist/script/ui/views/toolbars/TopToolbar/SystemControls.d.ts +28 -0
  160. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.container.d.ts +2 -2
  161. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.d.ts +40 -9
  162. package/dist/script/ui/views/toolbars/TopToolbar/UndoRedo.d.ts +27 -0
  163. package/dist/script/ui/views/toolbars/TopToolbar/ZoomControls.d.ts +29 -0
  164. package/dist/script/ui/views/toolbars/TopToolbar/{ZoomList/ZoomList.d.ts → ZoomInput.d.ts} +9 -13
  165. package/dist/script/ui/views/toolbars/TopToolbar/ZoomList.d.ts +23 -0
  166. package/dist/script/ui/views/toolbars/TopToolbar/ZoomSlider.d.ts +22 -0
  167. package/dist/script/ui/views/toolbars/mediaSizes.d.ts +0 -2
  168. package/dist/script/ui/views/toolbars/toolbar.types.d.ts +4 -4
  169. package/package.json +47 -58
  170. package/LICENSE +0 -201
  171. package/dist/script/ui/component/form/measure-input.d.ts +0 -8
  172. package/dist/script/ui/component/view/spin.d.ts +0 -4
  173. package/dist/script/ui/views/modal/components/PeriodTable/components/GenericGroups/GenericGroups.d.ts +0 -7
  174. package/dist/script/ui/views/modal/components/PeriodTable/components/GenericGroups/components/GenGroup.d.ts +0 -8
  175. package/dist/script/ui/views/modal/components/PeriodTable/components/GenericGroups/components/components/GenSet.d.ts +0 -8
  176. package/dist/script/ui/views/modal/components/document/Save/SaveImageTab.d.ts +0 -4
  177. package/dist/script/ui/views/modal/components/meta/Settings/components/Accordion/Accordion.d.ts +0 -36
  178. package/dist/script/ui/views/toolbars/TopToolbar/HelpLink/HelpLink.d.ts +0 -19
  179. package/dist/script/ui/views/toolbars/TopToolbar/ZoomList/index.d.ts +0 -16
@@ -0,0 +1,26 @@
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
+ interface ButtonProps {
18
+ iconName: string;
19
+ onClick: () => void;
20
+ title: string;
21
+ isHidden?: boolean;
22
+ disabled?: boolean;
23
+ shortcut?: string;
24
+ }
25
+ export declare const IconButton: ({ onClick, iconName, title, shortcut, isHidden, disabled }: ButtonProps) => JSX.Element | null;
26
+ export {};
@@ -0,0 +1,24 @@
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 class ScaleTransformer {
17
+ a: number;
18
+ b: number;
19
+ zoomList: number[];
20
+ constructor(inputMax: number);
21
+ getSliderValue(zoom: number): number;
22
+ getZoomValue(sliderValue: number): any;
23
+ private pickNearestFromList;
24
+ }
@@ -0,0 +1,28 @@
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
+ interface SystemControlsProps {
18
+ disabledButtons: string[];
19
+ hiddenButtons: string[];
20
+ className?: string;
21
+ onSettingsOpen: () => void;
22
+ onAboutOpen: () => void;
23
+ onHistoryClick: () => void;
24
+ onFullscreen: () => void;
25
+ onHelp: () => void;
26
+ }
27
+ export declare const SystemControls: ({ disabledButtons, hiddenButtons, onSettingsOpen, onFullscreen, onHelp, onAboutOpen, className }: SystemControlsProps) => JSX.Element;
28
+ export {};
@@ -13,6 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- import { TopToolbarCallProps, TopToolbarProps } from './TopToolbar';
17
- declare const TopToolbarContainer: import("react-redux").ConnectedComponent<(props: TopToolbarProps & TopToolbarCallProps) => JSX.Element, import("react-redux").Omit<TopToolbarProps & TopToolbarCallProps, "status" | "opened" | "disableableButtons" | "indigoVerification" | "vertical" | "onAction" | "onOpen">>;
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, onStereo, 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" | "onStereo" | "onMiew" | "onFullscreen" | "onAbout" | "onHelp">>;
18
18
  export { TopToolbarContainer };
@@ -13,13 +13,44 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- import { ToolbarGroupItemCallProps, ToolbarGroupItemProps } from '../ToolbarGroupItem';
17
- interface TopToolbarProps extends Omit<ToolbarGroupItemProps, 'id' | 'options'> {
18
- className?: string;
16
+ /// <reference types="react" />
17
+ declare type VoidFunction = () => void;
18
+ export interface PanelProps {
19
+ className: string;
20
+ disabledButtons: string[];
21
+ indigoVerification: boolean;
22
+ hiddenButtons: string[];
23
+ shortcuts: {
24
+ [key in string]: string;
25
+ };
26
+ onClear: VoidFunction;
27
+ onFileOpen: VoidFunction;
28
+ onSave: VoidFunction;
29
+ onUndo: VoidFunction;
30
+ onRedo: VoidFunction;
31
+ onCopy: VoidFunction;
32
+ onCopyMol: VoidFunction;
33
+ onCopyKet: VoidFunction;
34
+ onCopyImage: VoidFunction;
35
+ onCut: VoidFunction;
36
+ onPaste: VoidFunction;
37
+ currentZoom: number | undefined;
38
+ onZoom: (zoom: number) => void;
39
+ onZoomIn: VoidFunction;
40
+ onZoomOut: VoidFunction;
41
+ onSettingsOpen: VoidFunction;
42
+ onLayout: VoidFunction;
43
+ onClean: VoidFunction;
44
+ onAromatize: VoidFunction;
45
+ onDearomatize: VoidFunction;
46
+ onCalculate: VoidFunction;
47
+ onCheck: VoidFunction;
48
+ onAnalyse: VoidFunction;
49
+ onStereo: VoidFunction;
50
+ onMiew: VoidFunction;
51
+ onFullscreen: VoidFunction;
52
+ onAbout: VoidFunction;
53
+ onHelp: VoidFunction;
19
54
  }
20
- interface TopToolbarCallProps extends ToolbarGroupItemCallProps {
21
- }
22
- declare type Props = TopToolbarProps & TopToolbarCallProps;
23
- declare const TopToolbar: (props: Props) => JSX.Element;
24
- export type { TopToolbarProps, TopToolbarCallProps };
25
- export { TopToolbar };
55
+ 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, onStereo, onMiew, onFullscreen, onAbout, onHelp }: PanelProps) => JSX.Element;
56
+ export {};
@@ -0,0 +1,27 @@
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
+ interface UndoRedoProps {
18
+ disabledButtons: string[];
19
+ hiddenButtons: string[];
20
+ shortcuts: {
21
+ [key in string]: string;
22
+ };
23
+ onUndo: () => void;
24
+ onRedo: () => void;
25
+ }
26
+ export declare const UndoRedo: ({ onUndo, onRedo, disabledButtons, hiddenButtons, shortcuts }: UndoRedoProps) => JSX.Element;
27
+ export {};
@@ -0,0 +1,29 @@
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
+ interface ZoomProps {
18
+ currentZoom: number;
19
+ onZoom: (arg: number) => void;
20
+ onZoomIn: VoidFunction;
21
+ onZoomOut: VoidFunction;
22
+ disabledButtons: string[];
23
+ hiddenButtons: string[];
24
+ shortcuts: {
25
+ [key in string]: string;
26
+ };
27
+ }
28
+ export declare const ZoomControls: ({ currentZoom, onZoom, onZoomIn, onZoomOut, disabledButtons, hiddenButtons, shortcuts }: ZoomProps) => JSX.Element;
29
+ export {};
@@ -13,18 +13,14 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- import { UiActionAction } from '../../../../action';
17
- interface ZoomListProps {
18
- status: {
19
- zoom?: {
20
- selected?: number;
21
- };
16
+ import { RefObject } from 'react';
17
+ export declare const updateInputString: (zoom: number, inputElement: HTMLInputElement | null) => void;
18
+ export interface ZoomInputProps {
19
+ onZoomSubmit: () => void;
20
+ currentZoom: number;
21
+ inputRef: RefObject<HTMLInputElement>;
22
+ shortcuts: {
23
+ [key in string]: string;
22
24
  };
23
25
  }
24
- interface ZoomListCallProps {
25
- onAction: (action: UiActionAction) => void;
26
- }
27
- declare type Props = ZoomListProps & ZoomListCallProps;
28
- declare const ZoomList: (props: Props) => JSX.Element;
29
- export type { ZoomListProps, ZoomListCallProps };
30
- export { ZoomList };
26
+ export declare const ZoomInput: ({ onZoomSubmit, currentZoom, inputRef, shortcuts }: ZoomInputProps) => JSX.Element;
@@ -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
+ /// <reference types="react" />
17
+ interface ZoomListProps {
18
+ zoom: number;
19
+ setZoom: (zoom: number) => void;
20
+ }
21
+ declare const ZoomList: ({ zoom, setZoom }: ZoomListProps) => JSX.Element;
22
+ export type { ZoomListProps };
23
+ export { ZoomList };
@@ -0,0 +1,22 @@
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
+ interface SliderProps {
18
+ zoom: number;
19
+ setZoom: (arg: any) => void;
20
+ }
21
+ export declare const ZoomSlider: ({ zoom, setZoom }: SliderProps) => JSX.Element;
22
+ export {};
@@ -15,8 +15,6 @@
15
15
  ***************************************************************************/
16
16
  declare const mediaSizes: {
17
17
  topSeparatorsShowingWidth: number;
18
- zoomShowingWidth: number;
19
- infoShowingWidth: number;
20
18
  bondCollapsableHeight: number;
21
19
  rGroupCollapsableHeight: number;
22
20
  shapeCollapsableHeight: number;
@@ -14,14 +14,14 @@
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-mapping-tools' | 'reaction-automap' | 'reaction-map' | 'reaction-unmap' | 'rgroup' | 'rgroup-label' | 'rgroup-fragment' | 'rgroup-attpoints' | 'shapes' | 'shape-ellipse' | 'shape-rectangle' | 'shape-line' | 'text';
23
- declare type BottomToolbarItemVariant = 'template-common' | 'template-lib' | 'enhanced-stereo' | 'functional-groups';
24
- declare type RightToolbarItemVariant = 'atom' | 'freq-atoms' | 'period-table';
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
+ declare type BottomToolbarItemVariant = 'template-common' | 'template-lib' | 'enhanced-stereo' | 'fullscreen';
24
+ declare type RightToolbarItemVariant = 'atom' | 'freq-atoms' | 'period-table' | 'extended-table' | 'any-atom';
25
25
  declare type ToolbarItemVariant = TopToolbarItemVariant | LeftToolbarItemVariant | BottomToolbarItemVariant | RightToolbarItemVariant;
26
26
  interface ToolbarItem {
27
27
  id: ToolbarItemVariant;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ketcher-react",
3
- "version": "2.4.1",
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",
@@ -31,20 +31,25 @@
31
31
  "scripts": {
32
32
  "build": "cross-env NODE_ENV=production rollup -c -m true",
33
33
  "start": "cross-env NODE_ENV=development rollup -c -m true -w",
34
- "test": "run-s prettier stylelint test:lint test:unit",
35
- "test:lint": "eslint src --ext .ts,.tsx,.js,.jsx",
36
- "test:unit": "react-scripts test --env=jsdom --passWithNoTests",
37
- "prettier": "prettier --check \"src/**/*.{js,jsx,json,ts,tsx}\"",
38
- "prettier:write": "prettier --write \"src/**/*.{js,jsx,json,ts,tsx}\"",
39
- "stylelint": "stylelint \"src/**/*.{css,less,scss}\" --formatter verbose",
40
- "stylelint:fix": "stylelint \"src/**/*.{css,less,scss}\" --formatter verbose --fix"
34
+ "test": "run-s test:prettier test:stylelint test:eslint test:unit",
35
+ "test:eslint": "eslint . --ext .ts,.tsx,.js,.jsx",
36
+ "test:unit": "jest --passWithNoTests",
37
+ "test:unit:update": "jest -u",
38
+ "test:prettier": "prettier --check \"./**/*.{js,jsx,json,ts,tsx}\"",
39
+ "test:stylelint": "stylelint \"./**/*.{css,less}\" --formatter verbose",
40
+ "prettier:write": "prettier --write \"./**/*.{js,jsx,json,ts,tsx}\"",
41
+ "stylelint:fix": "stylelint \"./**/*.{css,less}\" --formatter verbose --fix"
41
42
  },
42
43
  "peerDependencies": {
43
44
  "react": "^17.0.2",
44
45
  "react-dom": "^17.0.2"
45
46
  },
46
47
  "dependencies": {
47
- "@babel/runtime": "^7.12.5",
48
+ "@babel/runtime": "^7.17.9",
49
+ "@emotion/react": "^11.7.1",
50
+ "@emotion/styled": "^11.6.0",
51
+ "@mui/material": "^5.2.4",
52
+ "ajv": "^8.10.0",
48
53
  "clsx": "^1.1.1",
49
54
  "draft-js": "^0.11.7",
50
55
  "draft-js-custom-styles": "^2.1.1",
@@ -52,14 +57,13 @@
52
57
  "file-saver": "^2.0.2",
53
58
  "font-face-observer": "^1.0.0",
54
59
  "hoist-non-react-statics": "^3.3.2",
55
- "html-to-react": "^1.4.5",
56
60
  "intersection-observer": "^0.12.0",
57
- "jsonschema": "^1.4.0",
58
- "ketcher-core": "1.2.1",
61
+ "ketcher-core": "1.5.0",
59
62
  "lodash": "^4.17.21",
60
- "normalize.css": "^8.0.1",
63
+ "miew-react": "^1.0.0",
61
64
  "react-colorful": "^5.4.0",
62
65
  "react-contextmenu": "^2.14.0",
66
+ "react-dropzone": "^11.7.1",
63
67
  "react-intersection-observer": "^8.32.1",
64
68
  "react-redux": "^7.2.1",
65
69
  "react-virtualized": "^9.22.3",
@@ -78,13 +82,10 @@
78
82
  "whatwg-fetch": "^3.4.1"
79
83
  },
80
84
  "devDependencies": {
81
- "@babel/core": "^7.12.3",
82
- "@babel/plugin-proposal-class-properties": "^7.12.1",
83
- "@babel/plugin-proposal-object-rest-spread": "^7.12.1",
84
- "@babel/plugin-transform-runtime": "^7.12.1",
85
- "@babel/preset-env": "^7.12.1",
86
- "@babel/preset-react": "^7.12.5",
87
- "@babel/preset-typescript": "^7.12.1",
85
+ "@babel/core": "^7.17.9",
86
+ "@babel/preset-env": "^7.16.11",
87
+ "@babel/preset-react": "^7.16.7",
88
+ "@babel/preset-typescript": "^7.16.7",
88
89
  "@rollup/plugin-babel": "^5.2.1",
89
90
  "@rollup/plugin-commonjs": "^16.0.0",
90
91
  "@rollup/plugin-json": "^4.1.0",
@@ -95,51 +96,39 @@
95
96
  "@testing-library/jest-dom": "^4.2.4",
96
97
  "@testing-library/react": "^9.5.0",
97
98
  "@testing-library/user-event": "^7.2.1",
98
- "@types/draft-js": "^0.11.3",
99
- "@types/jest": "^26.0.24",
100
- "@types/lodash": "^4.14.170",
101
- "@types/node": "^12.12.38",
102
- "@types/react": "^16.9.27",
103
- "@types/react-dom": "^16.9.7",
104
- "@typescript-eslint/eslint-plugin": "^4.0.0",
105
- "@typescript-eslint/parser": "^4.0.0",
99
+ "@types/draft-js": "^0.11.7",
100
+ "@types/jest": "^27.0.3",
101
+ "@types/lodash": "^4.14.178",
102
+ "@types/node": "^16.11.12",
103
+ "@types/react": "^17.0.37",
104
+ "@types/react-dom": "^17.0.11",
105
+ "@typescript-eslint/eslint-plugin": "^5.6.0",
106
+ "@typescript-eslint/parser": "^5.6.0",
106
107
  "autoprefixer": "^10.2.5",
107
- "babel-eslint": "^10.0.0",
108
- "cross-env": "^7.0.2",
109
- "current-git-branch": "^1.1.0",
110
- "eslint": "^6.8.0",
111
- "eslint-config-react-app": "^6.0.0",
112
- "eslint-plugin-import": "^2.22.0",
113
- "eslint-plugin-jest": "^24.0.0",
114
- "eslint-plugin-jsx-a11y": "^6.3.1",
115
- "eslint-plugin-promise": "^4.2.1",
116
- "eslint-plugin-react-hooks": "^4.0.8",
117
- "eslint-plugin-testing-library": "^3.9.0",
108
+ "babel-jest": "^27.4.5",
109
+ "cross-env": "^7.0.3",
110
+ "eslint": "^8.4.1",
111
+ "eslint-plugin-jest": "^25.3.0",
112
+ "eslint-plugin-jsx-a11y": "^6.5.1",
113
+ "eslint-plugin-react": "^7.27.1",
114
+ "eslint-plugin-react-hooks": "^4.3.0",
115
+ "eslint-plugin-testing-library": "^5.0.1",
116
+ "jest": "^27.4.5",
118
117
  "less": "^3.12.2",
119
118
  "npm-run-all": "^4.1.5",
120
119
  "postcss": "^8.2.10",
121
- "prettier": "^2.0.4",
122
- "react-scripts": "^4.0.3",
123
- "rollup": "^2.33.1",
120
+ "prettier": "^2.5.1",
121
+ "rollup": "^2.60.2",
124
122
  "rollup-plugin-cleanup": "^3.2.1",
125
- "rollup-plugin-copy": "^3.3.0",
123
+ "rollup-plugin-copy": "^3.4.0",
126
124
  "rollup-plugin-delete": "^2.0.0",
127
125
  "rollup-plugin-peer-deps-external": "^2.2.4",
128
- "rollup-plugin-postcss": "^4.0.0",
129
- "rollup-plugin-typescript2": "^0.29.0",
130
- "rollup-plugin-visualizer": "^4.2.0",
131
- "stylelint": "^13.13.1",
132
- "stylelint-config-prettier": "^8.0.2",
133
- "stylelint-config-recommended-scss": "^4.3.0",
134
- "stylelint-config-standard": "^22.0.0",
135
- "stylelint-prettier": "^1.2.0",
136
- "stylelint-scss": "^3.20.1",
137
- "typescript": "^4.4.3"
138
- },
139
- "jest": {
140
- "moduleNameMapper": {
141
- "\\.(css|less)$": "identity-obj-proxy"
142
- }
126
+ "rollup-plugin-postcss": "^4.0.2",
127
+ "rollup-plugin-typescript2": "^0.31.1",
128
+ "rollup-plugin-visualizer": "^5.5.2",
129
+ "stylelint": "13.13.1",
130
+ "ts-jest": "^27.1.2",
131
+ "typescript": "^4.5.2"
143
132
  },
144
133
  "files": [
145
134
  "dist"