ketcher-react 2.4.2 → 2.5.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 (178) 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 +11467 -6649
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.modern.js +11464 -6656
  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 +3 -1
  11. package/dist/script/editor/shared/closest.d.ts +1 -1
  12. package/dist/script/editor/tool/apoint.d.ts +18 -7
  13. package/dist/script/editor/tool/atom.d.ts +23 -18
  14. package/dist/script/editor/tool/attach.d.ts +19 -11
  15. package/dist/script/editor/tool/bond.d.ts +22 -15
  16. package/dist/script/editor/tool/chain.d.ts +21 -13
  17. package/dist/script/editor/tool/charge.d.ts +19 -8
  18. package/dist/script/editor/tool/enhanced-stereo.d.ts +7 -1
  19. package/dist/script/editor/tool/eraser.d.ts +24 -12
  20. package/dist/script/editor/tool/hand.d.ts +30 -0
  21. package/dist/script/editor/tool/helper/lasso.d.ts +45 -30
  22. package/dist/script/editor/tool/helper/locate.d.ts +36 -21
  23. package/dist/script/editor/tool/index.d.ts +4 -2
  24. package/dist/script/editor/tool/paste.d.ts +23 -13
  25. package/dist/script/editor/tool/reactionarrow.d.ts +21 -8
  26. package/dist/script/editor/tool/reactionmap.d.ts +21 -9
  27. package/dist/script/editor/tool/reactionplus.d.ts +19 -6
  28. package/dist/script/editor/tool/reactionunmap.d.ts +18 -3
  29. package/dist/script/editor/tool/rgroupatom.d.ts +18 -6
  30. package/dist/script/editor/tool/rgroupfragment.d.ts +18 -7
  31. package/dist/script/editor/tool/rotate.d.ts +22 -10
  32. package/dist/script/editor/tool/sgroup.d.ts +23 -11
  33. package/dist/script/editor/tool/simpleobject.d.ts +20 -7
  34. package/dist/script/editor/tool/template.d.ts +24 -19
  35. package/dist/script/editor/tool/text.d.ts +1 -2
  36. package/dist/script/ui/App/App.container.d.ts +1 -0
  37. package/dist/script/ui/App/App.d.ts +1 -0
  38. package/dist/script/ui/App/AppHidden/AppHidden.container.d.ts +1 -0
  39. package/dist/script/ui/App/AppHidden/AppHidden.d.ts +1 -0
  40. package/dist/script/ui/Portal/Portal.d.ts +1 -1
  41. package/dist/script/ui/action/action.types.d.ts +1 -1
  42. package/dist/script/ui/action/fullscreen.d.ts +23 -0
  43. package/dist/script/ui/action/functionalGroups.d.ts +3 -0
  44. package/dist/script/ui/action/help.d.ts +8 -0
  45. package/dist/script/ui/action/index.d.ts +74 -5
  46. package/dist/script/ui/action/isHidden.d.ts +1 -3
  47. package/dist/script/ui/action/server.d.ts +1 -3
  48. package/dist/script/ui/action/tools.d.ts +41 -0
  49. package/dist/script/ui/component/ContextMenu/ContextMenu.d.ts +1 -0
  50. package/dist/script/ui/component/cliparea/cliparea.d.ts +4 -0
  51. package/dist/script/ui/component/form/MeasureInput/measure-input.d.ts +8 -0
  52. package/dist/script/ui/component/form/Select/Select.d.ts +30 -0
  53. package/dist/script/ui/component/form/Select/Select.test.d.ts +1 -0
  54. package/dist/script/ui/{views/modal/components/PeriodTable/components/GenericGroups/components/components → component/form/Select}/index.d.ts +2 -1
  55. package/dist/script/ui/component/form/colorPicker/ColorPicker.d.ts +1 -0
  56. package/dist/script/ui/component/form/combobox/combobox.d.ts +4 -0
  57. package/dist/script/ui/component/form/form/errorPopover.d.ts +5 -0
  58. package/dist/script/ui/component/form/form/form.d.ts +9 -4
  59. package/dist/script/ui/component/form/input.d.ts +19 -1
  60. package/dist/script/ui/component/form/{select.d.ts → select-list.d.ts} +0 -0
  61. package/dist/script/ui/component/structrender.d.ts +28 -4
  62. package/dist/script/ui/component/view/Atom/Atom.d.ts +2 -2
  63. package/dist/script/ui/component/view/Tabs/Tabs.d.ts +3 -0
  64. package/dist/script/ui/component/view/openbutton.d.ts +2 -0
  65. package/dist/script/ui/data/schema/options-schema.d.ts +2 -2
  66. package/dist/script/ui/data/schema/sdata-schema.d.ts +11 -9
  67. package/dist/script/ui/data/schema/struct-schema.d.ts +30 -28
  68. package/dist/script/ui/dialog/template/EmptySearchResult.d.ts +1 -0
  69. package/dist/script/ui/dialog/template/TemplateDialog.d.ts +7 -1
  70. package/dist/script/ui/dialog/template/TemplateTable.d.ts +10 -7
  71. package/dist/script/ui/dialog/template/template-attach.d.ts +27 -1
  72. package/dist/script/ui/dialog/toolbox/enhancedStereo/enhancedStereo.d.ts +3 -1
  73. package/dist/script/ui/state/editor/index.d.ts +1 -0
  74. package/dist/script/ui/state/request/index.d.ts +2 -0
  75. package/dist/script/ui/state/request/request.types.d.ts +3 -1
  76. package/dist/script/ui/{views/modal/components/PeriodTable/components/GenericGroups/components/index.d.ts → utils/fileOpener.d.ts} +1 -1
  77. package/dist/script/ui/utils/index.d.ts +3 -0
  78. package/dist/script/ui/views/components/Cursor.d.ts +6 -0
  79. package/dist/script/ui/views/components/Dialog/Dialog.d.ts +17 -9
  80. package/dist/script/ui/views/{modal/components/PeriodTable/components/GenericGroups/index.d.ts → components/Spinner/LoadingCircles.d.ts} +2 -1
  81. package/dist/script/ui/views/components/Spinner/index.d.ts +1 -1
  82. package/dist/script/ui/views/components/StructEditor/StructEditor.d.ts +8 -0
  83. package/dist/script/ui/views/components/index.d.ts +2 -2
  84. package/dist/script/ui/views/modal/Modal.d.ts +1 -0
  85. package/dist/script/ui/views/modal/components/Confirm/Confirm.d.ts +7 -0
  86. package/dist/script/ui/views/modal/components/Confirm/index.d.ts +1 -0
  87. package/dist/script/ui/views/modal/components/ExtendedTable/ExtendedTable.d.ts +2 -0
  88. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/BoxWithLines.d.ts +18 -0
  89. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenGroup.d.ts +24 -0
  90. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenSet.d.ts +26 -0
  91. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenericGroups.d.ts +22 -0
  92. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/index.d.ts +27 -0
  93. package/dist/script/ui/views/modal/components/ExtendedTable/helpers.d.ts +1 -0
  94. package/dist/script/ui/views/modal/components/ExtendedTable/index.d.ts +1 -0
  95. package/dist/script/ui/views/modal/components/PeriodTable/PeriodTable.d.ts +9 -4
  96. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/ElementsTable.d.ts +2 -0
  97. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/components/MainRow.d.ts +3 -2
  98. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/components/OutinerRow.d.ts +3 -2
  99. package/dist/script/ui/views/modal/components/PeriodTable/components/index.d.ts +1 -1
  100. package/dist/script/ui/views/modal/components/Text/FontControl/FontControl.d.ts +1 -0
  101. package/dist/script/ui/views/{components/FunctionalGroups/FunctionalGroups.d.ts → modal/components/Text/SpecialSymbols/SpecialSymbolsButton.d.ts} +7 -8
  102. package/dist/script/ui/views/{components/Spinner/Spinner.d.ts → modal/components/Text/SpecialSymbolsList/SpecialSymbolsList.d.ts} +5 -3
  103. package/dist/script/ui/views/modal/components/Text/Text.d.ts +1 -0
  104. package/dist/script/ui/views/modal/components/Text/TextButton/TextButton.d.ts +1 -0
  105. package/dist/script/ui/views/modal/components/document/Open/Open.container.d.ts +7 -1
  106. package/dist/script/ui/views/modal/components/document/Open/Open.d.ts +6 -1
  107. package/dist/script/ui/views/modal/components/document/Open/components/AnalyzingFile.d.ts +20 -0
  108. package/dist/script/ui/views/modal/components/document/Open/components/DialogActionButton.d.ts +25 -0
  109. package/dist/script/ui/views/modal/components/document/Open/components/FileDrop.d.ts +26 -0
  110. package/dist/script/ui/views/modal/components/document/Open/components/OpenOptions.d.ts +24 -0
  111. package/dist/script/ui/views/modal/components/document/Open/components/TextEditor.d.ts +21 -0
  112. package/dist/script/ui/views/modal/components/document/Open/components/ViewSwitcher.d.ts +31 -0
  113. package/dist/script/ui/views/modal/components/document/Save/Save.d.ts +16 -6
  114. package/dist/script/ui/views/modal/components/meta/About/About.d.ts +1 -1
  115. package/dist/script/ui/views/modal/components/meta/Settings/Accordion/Accordion.d.ts +22 -0
  116. package/dist/script/ui/views/modal/components/meta/Settings/{components/Accordion → Accordion}/index.d.ts +0 -0
  117. package/dist/script/ui/views/modal/components/meta/Settings/Settings.d.ts +1 -0
  118. package/dist/script/ui/views/modal/components/meta/Settings/fieldGroups.d.ts +41 -0
  119. package/dist/script/ui/views/modal/components/process/Analyse/Analyse.d.ts +3 -0
  120. package/dist/script/ui/views/modal/components/process/Analyse/components/FormulaInput/FormulaInput.d.ts +2 -1
  121. package/dist/script/ui/views/modal/components/process/Miew/Miew.d.ts +30 -9
  122. package/dist/script/ui/views/modal/components/process/Recognize/Recognize.d.ts +1 -1
  123. package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.container.d.ts +3 -1
  124. package/dist/script/ui/views/modal/components/toolbox/Atom/ElementNumber/ElementNumber.d.ts +1 -0
  125. package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.container.d.ts +1 -0
  126. package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.d.ts +1 -0
  127. package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.container.d.ts +1 -0
  128. package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.d.ts +1 -0
  129. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.container.d.ts +1 -0
  130. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.d.ts +1 -0
  131. package/dist/script/ui/views/modal/components/toolbox/FG/RemoveFG.d.ts +1 -0
  132. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.container.d.ts +1 -0
  133. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.d.ts +1 -0
  134. package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/components/IfThenSelect/IfThenSelect.d.ts +1 -0
  135. package/dist/script/ui/views/toolbars/ArrowScroll/ArrowScroll.d.ts +1 -0
  136. package/dist/script/ui/views/toolbars/BottomToolbar/BottomToolbar.d.ts +2 -2
  137. package/dist/script/ui/views/toolbars/BottomToolbar/TemplatesList/TemplatesList.d.ts +1 -0
  138. package/dist/script/ui/views/toolbars/LeftToolbar/Bond/Bond.d.ts +2 -2
  139. package/dist/script/ui/views/toolbars/LeftToolbar/LeftToolbar.container.d.ts +3 -2
  140. package/dist/script/ui/views/toolbars/LeftToolbar/LeftToolbar.d.ts +2 -2
  141. package/dist/script/ui/views/toolbars/LeftToolbar/RGroup/RGroup.d.ts +2 -2
  142. package/dist/script/ui/views/toolbars/LeftToolbar/Shape/Shape.d.ts +2 -2
  143. package/dist/script/ui/views/toolbars/LeftToolbar/Transform/Transform.d.ts +2 -2
  144. package/dist/script/ui/views/toolbars/RightToolbar/AtomsList/AtomsList.d.ts +2 -2
  145. package/dist/script/ui/views/toolbars/RightToolbar/RightToolbar.d.ts +2 -2
  146. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ActionButton/ActionButton.d.ts +1 -0
  147. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarGroupItem.d.ts +1 -0
  148. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/ToolbarMultiToolItem.d.ts +1 -0
  149. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/DefaultMultiTool/DefaultMultiTool.d.ts +3 -4
  150. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/GroupedMultiTool/GroupedMultiTool.d.ts +3 -4
  151. package/dist/script/ui/views/toolbars/TopToolbar/ClipboardControls.d.ts +31 -0
  152. package/dist/script/ui/views/{components/FunctionalGroups/index.d.ts → toolbars/TopToolbar/Divider.d.ts} +2 -1
  153. package/dist/script/ui/views/toolbars/TopToolbar/ElementWithDropdown.d.ts +23 -0
  154. package/dist/script/ui/views/toolbars/TopToolbar/ExternalFuncControls.d.ts +36 -0
  155. package/dist/script/ui/views/toolbars/TopToolbar/FileControls.d.ts +26 -0
  156. package/dist/script/ui/views/toolbars/TopToolbar/IconButton.d.ts +26 -0
  157. package/dist/script/ui/views/toolbars/TopToolbar/ScaleTransformer.d.ts +24 -0
  158. package/dist/script/ui/views/toolbars/TopToolbar/SystemControls.d.ts +28 -0
  159. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.container.d.ts +2 -2
  160. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.d.ts +40 -9
  161. package/dist/script/ui/views/toolbars/TopToolbar/UndoRedo.d.ts +27 -0
  162. package/dist/script/ui/views/toolbars/TopToolbar/ZoomControls.d.ts +29 -0
  163. package/dist/script/ui/views/toolbars/TopToolbar/{ZoomList/ZoomList.d.ts → ZoomInput.d.ts} +9 -13
  164. package/dist/script/ui/views/toolbars/TopToolbar/ZoomList.d.ts +23 -0
  165. package/dist/script/ui/views/toolbars/TopToolbar/ZoomSlider.d.ts +22 -0
  166. package/dist/script/ui/views/toolbars/mediaSizes.d.ts +0 -2
  167. package/dist/script/ui/views/toolbars/toolbar.types.d.ts +4 -4
  168. package/package.json +47 -58
  169. package/LICENSE +0 -201
  170. package/dist/script/ui/component/form/measure-input.d.ts +0 -8
  171. package/dist/script/ui/component/view/spin.d.ts +0 -4
  172. package/dist/script/ui/views/modal/components/PeriodTable/components/GenericGroups/GenericGroups.d.ts +0 -7
  173. package/dist/script/ui/views/modal/components/PeriodTable/components/GenericGroups/components/GenGroup.d.ts +0 -8
  174. package/dist/script/ui/views/modal/components/PeriodTable/components/GenericGroups/components/components/GenSet.d.ts +0 -8
  175. package/dist/script/ui/views/modal/components/document/Save/SaveImageTab.d.ts +0 -4
  176. package/dist/script/ui/views/modal/components/meta/Settings/components/Accordion/Accordion.d.ts +0 -36
  177. package/dist/script/ui/views/toolbars/TopToolbar/HelpLink/HelpLink.d.ts +0 -19
  178. package/dist/script/ui/views/toolbars/TopToolbar/ZoomList/index.d.ts +0 -16
@@ -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 type ButtonName = 'layout' | 'clean' | 'arom' | 'dearom' | 'cip' | 'check' | 'analyse' | 'recognize' | 'miew' | 'settings' | 'help' | 'about' | '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' | 'shape' | 'shape-ellipse' | 'shape-rectangle' | 'shape-line' | 'text' | 'enhanced-stereo';
16
+ export declare type ButtonName = 'layout' | 'clean' | 'arom' | 'dearom' | 'cip' | 'check' | 'analyse' | 'recognize' | 'miew' | 'settings' | 'help' | 'about' | 'fullscreen' | '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' | 'shape' | 'shape-ellipse' | 'shape-rectangle' | 'shape-line' | 'text' | 'enhanced-stereo';
@@ -47,6 +47,8 @@ declare class Editor implements KetcherEditor {
47
47
  aromatizeStruct: PipelineSubscription;
48
48
  dearomatizeStruct: PipelineSubscription;
49
49
  enhancedStereoEdit: PipelineSubscription;
50
+ confirm: PipelineSubscription;
51
+ cursor: Subscription;
50
52
  };
51
53
  lastEvent: any;
52
54
  constructor(clientArea: any, options: any);
@@ -70,7 +72,7 @@ declare class Editor implements KetcherEditor {
70
72
  handler: any;
71
73
  };
72
74
  unsubscribe(eventName: any, subscriber: any): void;
73
- findItem(event: any, maps: any, skip: any): any;
75
+ findItem(event: any, maps: any, skip?: any): any;
74
76
  findMerge(srcItems: any, maps: any): {
75
77
  atoms: Map<number, number>;
76
78
  bonds: Map<number, number> | null;
@@ -19,7 +19,7 @@ declare function findClosestItem(restruct: any, pos: any, maps: any, skip: any,
19
19
  * bonds: Map<number, number>?
20
20
  * }}
21
21
  */
22
- declare function findCloseMerge(restruct: any, selected: object, maps: string[] | undefined, scale: number): {
22
+ declare function findCloseMerge(restruct: ReStruct, selected: object, maps: string[] | undefined, scale: number): {
23
23
  atoms: Map<number, number>;
24
24
  bonds: Map<number, number> | null;
25
25
  };
@@ -1,12 +1,23 @@
1
- export default APointTool;
2
- declare function APointTool(editor: any): APointTool;
1
+ /****************************************************************************
2
+ * Copyright 2021 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ***************************************************************************/
16
+ import Editor from '../Editor';
3
17
  declare class APointTool {
18
+ editor: Editor;
4
19
  constructor(editor: any);
5
- editor: any;
6
- sgroups: any;
7
- struct: any;
8
- molecule: any;
9
- functionalGroups: any;
10
20
  mousemove(event: any): void;
11
21
  click(event: any): true | undefined;
12
22
  }
23
+ export default APointTool;
@@ -1,24 +1,29 @@
1
- export function atomLongtapEvent(tool: any, render: any): void;
2
- export default AtomTool;
3
- declare function AtomTool(editor: any, atomProps: any): AtomTool | null;
1
+ /****************************************************************************
2
+ * Copyright 2021 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ***************************************************************************/
16
+ import Editor from '../Editor';
4
17
  declare class AtomTool {
5
- constructor(editor: any, atomProps: any);
6
- editor: any;
18
+ #private;
19
+ editor: Editor;
7
20
  atomProps: any;
8
- struct: any;
9
- bondProps: {
10
- type: number;
11
- stereo: number;
12
- } | undefined;
13
- sgroups: any;
14
- molecule: any;
15
- functionalGroups: any;
21
+ dragCtx: any;
22
+ isNotActiveTool: boolean | undefined;
23
+ constructor(editor: any, atomProps: any);
16
24
  mousedown(event: any): void;
17
- dragCtx: {
18
- item?: undefined;
19
- } | {
20
- item: any;
21
- } | undefined;
22
25
  mousemove(event: any): void;
23
26
  mouseup(event: any): void;
24
27
  }
28
+ export declare function atomLongtapEvent(tool: any, render: any): void;
29
+ export default AtomTool;
@@ -1,16 +1,24 @@
1
- export default AttachTool;
2
- declare function AttachTool(editor: any, attachPoints: any): AttachTool;
1
+ /****************************************************************************
2
+ * Copyright 2021 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ***************************************************************************/
16
+ import Editor from '../Editor';
3
17
  declare class AttachTool {
18
+ attach: any;
19
+ editor: Editor;
4
20
  constructor(editor: any, attachPoints: any);
5
- attach: {
6
- atomid: any;
7
- bondid: any;
8
- } | undefined;
9
- editor: any;
10
- struct: any;
11
- sgroups: any;
12
- molecule: any;
13
- functionalGroups: any;
14
21
  mousemove(event: any): boolean;
15
22
  click(event: any): true | undefined;
16
23
  }
24
+ export default AttachTool;
@@ -1,21 +1,28 @@
1
- export default BondTool;
2
- declare function BondTool(editor: any, bondProps: any): BondTool | null;
1
+ /****************************************************************************
2
+ * Copyright 2021 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ***************************************************************************/
16
+ import Editor from '../Editor';
3
17
  declare class BondTool {
4
- constructor(editor: any, bondProps: any);
5
- editor: any;
6
- atomProps: {
7
- label: string;
8
- } | undefined;
18
+ editor: Editor;
19
+ atomProps: any;
9
20
  bondProps: any;
10
- struct: any;
11
- sgroups: any;
12
- molecule: any;
13
- functionalGroups: any;
21
+ dragCtx: any;
22
+ isNotActiveTool: boolean | undefined;
23
+ constructor(editor: any, bondProps: any);
14
24
  mousedown(event: any): true | undefined;
15
- dragCtx: {
16
- xy0: any;
17
- item: any;
18
- } | undefined;
19
25
  mousemove(event: any): true | undefined;
20
26
  mouseup(event: any): boolean;
21
27
  }
28
+ export default BondTool;
@@ -1,19 +1,27 @@
1
- export default ChainTool;
2
- declare function ChainTool(editor: any): ChainTool;
1
+ /****************************************************************************
2
+ * Copyright 2021 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ***************************************************************************/
16
+ import Editor from '../Editor';
3
17
  declare class ChainTool {
18
+ editor: Editor;
19
+ dragCtx: any;
4
20
  constructor(editor: any);
5
- editor: any;
6
- struct: any;
7
- sgroups: any;
8
- molecule: any;
9
- functionalGroups: any;
10
21
  mousedown(event: any): true | undefined;
11
- dragCtx: {
12
- xy0: any;
13
- item: any;
14
- } | undefined;
15
22
  mousemove(event: any): boolean;
16
23
  mouseup(): true | undefined;
17
- cancel: any;
18
- mouseleave: any;
24
+ cancel(): void;
25
+ mouseleave(): void;
19
26
  }
27
+ export default ChainTool;
@@ -1,13 +1,24 @@
1
- export default ChargeTool;
2
- declare function ChargeTool(editor: any, charge: any): ChargeTool;
1
+ /****************************************************************************
2
+ * Copyright 2021 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ***************************************************************************/
16
+ import Editor from '../Editor';
3
17
  declare class ChargeTool {
4
- constructor(editor: any, charge: any);
5
- editor: any;
18
+ editor: Editor;
6
19
  charge: any;
7
- struct: any;
8
- sgroups: any;
9
- molecule: any;
10
- functionalGroups: any;
20
+ constructor(editor: any, charge: any);
11
21
  mousemove(event: any): boolean;
12
22
  click(event: any): true | undefined;
13
23
  }
24
+ export default ChargeTool;
@@ -14,5 +14,11 @@
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
16
  import Editor from '../Editor';
17
- declare function EnhancedStereoTool(this: typeof EnhancedStereoTool, editor: Editor): null | void;
17
+ declare class EnhancedStereoTool {
18
+ editor: Editor;
19
+ stereoAtoms: Array<number>;
20
+ isNotActiveTool: true;
21
+ constructor(editor: any);
22
+ changeAtomsStereoAction(): any;
23
+ }
18
24
  export default EnhancedStereoTool;
@@ -1,19 +1,31 @@
1
- export default EraserTool;
2
- declare function EraserTool(editor: any, mode: any): EraserTool | null;
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 LassoHelper from './helper/lasso';
17
+ import Editor from '../Editor';
3
18
  declare class EraserTool {
19
+ editor: Editor;
20
+ maps: Array<string>;
21
+ lassoHelper: LassoHelper;
22
+ isNotActiveTool: boolean | undefined;
4
23
  constructor(editor: any, mode: any);
5
- editor: any;
6
- sgroups: any;
7
- struct: any;
8
- molecule: any;
9
- functionalGroups: any;
10
- maps: string[] | undefined;
11
- lassoHelper: LassoHelper | undefined;
12
24
  mousedown(event: any): void;
13
25
  mousemove(event: any): void;
14
- mouseup(event: any): void;
26
+ mouseup(): void;
15
27
  click(event: any): void;
16
- mouseleave: any;
28
+ mouseleave(): void;
17
29
  cancel(): void;
18
30
  }
19
- import LassoHelper from "./helper/lasso";
31
+ export default EraserTool;
@@ -0,0 +1,30 @@
1
+ /****************************************************************************
2
+ * Copyright 2021 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ***************************************************************************/
16
+ import Editor from '../Editor';
17
+ import { Vec2 } from 'ketcher-core';
18
+ declare class HandTool {
19
+ editor: Editor;
20
+ begPos: Vec2 | null;
21
+ endPos: Vec2 | null;
22
+ constructor(editor: any);
23
+ mousedown(event: any): void;
24
+ mousemove(event: any): void;
25
+ mouseup(event: any): void;
26
+ mouseover(): void;
27
+ mouseleave(): void;
28
+ cancel(): void;
29
+ }
30
+ export default HandTool;
@@ -1,44 +1,59 @@
1
- export default LassoHelper;
2
- declare function LassoHelper(mode: any, editor: any, fragment: any): void;
1
+ /****************************************************************************
2
+ * Copyright 2021 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ***************************************************************************/
16
+ import Editor from '../../Editor';
3
17
  declare class LassoHelper {
4
- constructor(mode: any, editor: any, fragment: any);
5
18
  mode: any;
19
+ editor: Editor;
6
20
  fragment: any;
7
- editor: any;
21
+ points: any;
22
+ selection: any;
23
+ constructor(mode: any, editor: any, fragment: any);
8
24
  getSelection(): {
9
- atoms: any[];
10
- bonds: any[];
11
- rxnArrows: any[];
12
- rxnPluses: any[];
13
- enhancedFlags: any[];
14
- sgroupData: any[];
15
- simpleObjects: any[];
16
- texts: any[];
25
+ atoms: number[];
26
+ bonds: number[];
27
+ rxnArrows: number[];
28
+ rxnPluses: number[];
29
+ enhancedFlags: number[];
30
+ sgroupData: number[];
31
+ simpleObjects: number[];
32
+ texts: number[];
17
33
  };
18
34
  begin(event: any): void;
19
- points: any;
20
35
  running(): boolean;
21
36
  addPoint(event: any): {
22
- atoms: any[];
23
- bonds: any[];
24
- rxnArrows: any[];
25
- rxnPluses: any[];
26
- enhancedFlags: any[];
27
- sgroupData: any[];
28
- simpleObjects: any[];
29
- texts: any[];
37
+ atoms: number[];
38
+ bonds: number[];
39
+ rxnArrows: number[];
40
+ rxnPluses: number[];
41
+ enhancedFlags: number[];
42
+ sgroupData: number[];
43
+ simpleObjects: number[];
44
+ texts: number[];
30
45
  } | null;
31
46
  update(): void;
32
- selection: any;
33
47
  end(): {
34
- atoms: any[];
35
- bonds: any[];
36
- rxnArrows: any[];
37
- rxnPluses: any[];
38
- enhancedFlags: any[];
39
- sgroupData: any[];
40
- simpleObjects: any[];
41
- texts: any[];
48
+ atoms: number[];
49
+ bonds: number[];
50
+ rxnArrows: number[];
51
+ rxnPluses: number[];
52
+ enhancedFlags: number[];
53
+ sgroupData: number[];
54
+ simpleObjects: number[];
55
+ texts: number[];
42
56
  };
43
57
  cancel(): void;
44
58
  }
59
+ export default LassoHelper;
@@ -1,25 +1,40 @@
1
- declare namespace _default {
2
- export { getElementsInRectangle as inRectangle };
3
- export { getElementsInPolygon as inPolygon };
4
- }
5
- export default _default;
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
+ ***************************************************************************/
6
16
  declare function getElementsInRectangle(restruct: any, p0: any, p1: any): {
7
- atoms: any[];
8
- bonds: any[];
9
- rxnArrows: any[];
10
- rxnPluses: any[];
11
- enhancedFlags: any[];
12
- sgroupData: any[];
13
- simpleObjects: any[];
14
- texts: any[];
17
+ atoms: number[];
18
+ bonds: number[];
19
+ rxnArrows: number[];
20
+ rxnPluses: number[];
21
+ enhancedFlags: number[];
22
+ sgroupData: number[];
23
+ simpleObjects: number[];
24
+ texts: number[];
15
25
  };
16
26
  declare function getElementsInPolygon(restruct: any, rr: any): {
17
- atoms: any[];
18
- bonds: any[];
19
- rxnArrows: any[];
20
- rxnPluses: any[];
21
- enhancedFlags: any[];
22
- sgroupData: any[];
23
- simpleObjects: any[];
24
- texts: any[];
27
+ atoms: number[];
28
+ bonds: number[];
29
+ rxnArrows: number[];
30
+ rxnPluses: number[];
31
+ enhancedFlags: number[];
32
+ sgroupData: number[];
33
+ simpleObjects: number[];
34
+ texts: number[];
35
+ };
36
+ declare const _default: {
37
+ inRectangle: typeof getElementsInRectangle;
38
+ inPolygon: typeof getElementsInPolygon;
25
39
  };
40
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  export default tools;
2
2
  declare namespace tools {
3
+ export { HandTool as hand };
3
4
  export { RGroupAtomTool as rgroupatom };
4
5
  export { SelectTool as select };
5
6
  export { SGroupTool as sgroup };
@@ -20,8 +21,9 @@ declare namespace tools {
20
21
  export { RotateTool as rotate };
21
22
  export { EnhancedStereoTool as enhancedStereo };
22
23
  export { SimpleObjectTool as simpleobject };
23
- export { TextToolWrapper as text };
24
+ export { TextTool as text };
24
25
  }
26
+ import HandTool from "./hand";
25
27
  import RGroupAtomTool from "./rgroupatom";
26
28
  import SelectTool from "./select";
27
29
  import SGroupTool from "./sgroup";
@@ -42,4 +44,4 @@ import PasteTool from "./paste";
42
44
  import RotateTool from "./rotate";
43
45
  import EnhancedStereoTool from "./enhanced-stereo";
44
46
  import SimpleObjectTool from "./simpleobject";
45
- import TextToolWrapper from "./text";
47
+ import TextTool from "./text";
@@ -1,19 +1,29 @@
1
- export default PasteTool;
2
- declare function PasteTool(editor: any, struct: any): PasteTool;
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 { Struct } from 'ketcher-core';
17
+ import Editor from '../Editor';
3
18
  declare class PasteTool {
4
- constructor(editor: any, struct: any);
5
- editor: any;
6
- struct: any;
7
- sgroups: any;
8
- molecule: any;
9
- functionalGroups: any;
19
+ editor: Editor;
20
+ struct: Struct;
10
21
  action: any;
11
- mergeItems: {
12
- atoms: Map<unknown, unknown>;
13
- bonds: Map<unknown, unknown>;
14
- } | null | undefined;
22
+ mergeItems: any;
23
+ constructor(editor: any, struct: any);
15
24
  mousemove(event: any): void;
16
25
  mouseup(): void;
17
26
  cancel(): void;
18
- mouseleave: any;
27
+ mouseleave(): void;
19
28
  }
29
+ export default PasteTool;
@@ -1,14 +1,27 @@
1
- export default ReactionArrowTool;
2
- declare function ReactionArrowTool(editor: any, mode: any): ReactionArrowTool;
1
+ /****************************************************************************
2
+ * Copyright 2021 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ***************************************************************************/
16
+ import Editor from '../Editor';
3
17
  declare class ReactionArrowTool {
4
- constructor(editor: any, mode: any);
5
18
  mode: any;
6
- editor: any;
19
+ editor: Editor;
20
+ dragCtx: any;
21
+ constructor(editor: any, mode: any);
7
22
  mousedown(event: any): void;
8
- dragCtx: {
9
- p0: any;
10
- } | undefined;
11
23
  mousemove(event: any): void;
12
- mouseup(event: any): boolean;
24
+ mouseup(): boolean;
13
25
  click(event: any): void;
14
26
  }
27
+ export default ReactionArrowTool;
@@ -1,16 +1,28 @@
1
- export default ReactionMapTool;
2
- declare function ReactionMapTool(editor: any): ReactionMapTool;
1
+ /****************************************************************************
2
+ * Copyright 2021 EPAM Systems
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ***************************************************************************/
16
+ import Editor from '../Editor';
3
17
  declare class ReactionMapTool {
18
+ editor: Editor;
19
+ rcs: any;
20
+ dragCtx: any;
21
+ line: any;
4
22
  constructor(editor: any);
5
- editor: any;
6
23
  mousedown(event: any): void;
7
- rcs: any;
8
- dragCtx: {
9
- item: any;
10
- xy0: any;
11
- } | undefined;
12
24
  mousemove(event: any): void;
13
25
  updateLine(p1: any, p2: any): void;
14
- line: any;
15
26
  mouseup(event: any): void;
16
27
  }
28
+ export default ReactionMapTool;