ketcher-react 2.8.0-rc.5 → 2.9.0-rc.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.
- package/dist/hooks/useClickOutside.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +2379 -2046
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2402 -2070
- package/dist/index.modern.js.map +1 -1
- package/dist/script/builders/ketcher/ButtonName.d.ts +1 -1
- package/dist/script/editor/Editor.d.ts +3 -1
- package/dist/script/editor/shared/utils.d.ts +29 -0
- package/dist/script/editor/tool/helper/dropAndMerge.d.ts +8 -0
- package/dist/script/editor/tool/helper/getGroupIdsFromItems.d.ts +12 -0
- package/dist/script/editor/tool/helper/getMergeItems.d.ts +2 -0
- package/dist/script/editor/tool/paste.d.ts +5 -0
- package/dist/script/editor/tool/select.d.ts +1 -1
- package/dist/script/editor/tool/sgroup.d.ts +2 -3
- package/dist/script/editor/tool/template.d.ts +8 -3
- package/dist/script/editor/utils/canvasExtension.d.ts +16 -0
- package/dist/script/ui/Portal/Portal.d.ts +2 -1
- package/dist/script/ui/action/action.types.d.ts +1 -1
- package/dist/script/ui/action/index.d.ts +24 -9
- package/dist/script/ui/action/server.d.ts +10 -2
- package/dist/script/ui/action/templates.d.ts +3 -0
- package/dist/script/ui/action/tools.d.ts +1 -9
- package/dist/script/ui/action/zoom.d.ts +2 -0
- package/dist/script/ui/data/convert/structconv.d.ts +16 -0
- package/dist/script/ui/data/schema/sdata-schema.d.ts +7 -5
- package/dist/script/ui/dialog/template/TemplateDialog.d.ts +1 -3
- package/dist/script/ui/dialog/template/template-attach.d.ts +1 -1
- package/dist/script/ui/dialog/toolbox/SDataFieldset.d.ts +4 -0
- package/dist/script/ui/dialog/toolbox/SGroupFieldset.d.ts +4 -0
- package/dist/script/ui/dialog/toolbox/enhancedStereo/enhancedStereo.d.ts +1 -3
- package/dist/script/ui/dialog/toolbox/sgroup.d.ts +1 -1
- package/dist/script/ui/state/constants.d.ts +0 -1
- package/dist/script/ui/state/editor/index.d.ts +0 -4
- package/dist/script/ui/state/handleHotkeysOverItem.d.ts +15 -0
- package/dist/script/ui/state/modal/form.d.ts +5 -16
- package/dist/script/ui/views/Editor.d.ts +1 -1
- package/dist/script/ui/views/components/ContextMenu/ContextMenu.d.ts +0 -1
- package/dist/script/ui/views/components/ContextMenu/ContextMenuTrigger.d.ts +2 -2
- package/dist/script/ui/views/components/ContextMenu/contextMenu.types.d.ts +17 -6
- package/dist/script/ui/views/components/ContextMenu/hooks/useAtomEdit.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/hooks/useAtomStereo.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/hooks/useBondEdit.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/hooks/useBondSGroupAttach.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/hooks/useBondSGroupEdit.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/hooks/useBondTypeChange.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/hooks/useDelete.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/hooks/useFunctionalGroupEoc.d.ts +6 -0
- package/dist/script/ui/views/components/ContextMenu/hooks/useFunctionalGroupRemove.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/menuItems/AtomMenuItems.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/menuItems/BondMenuItems.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/menuItems/FunctionalGroupMenuItems.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/menuItems/SelectionMenuItems.d.ts +3 -0
- package/dist/script/ui/views/components/ContextMenu/{items/utils.d.ts → utils.d.ts} +1 -3
- package/dist/script/ui/views/components/Dialog/Dialog.d.ts +2 -2
- package/dist/script/ui/views/components/StructEditor/InfoPanel.d.ts +1 -3
- package/dist/script/ui/views/components/StructEditor/SGroupDataRender.d.ts +13 -0
- package/dist/script/ui/views/components/StructEditor/helpers.d.ts +4 -0
- package/dist/script/ui/views/modal/components/document/Open/Open.container.d.ts +0 -2
- package/dist/script/ui/views/modal/components/document/Save/Save.d.ts +2 -1
- package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.container.d.ts +0 -2
- package/dist/script/ui/views/toolbars/toolbar.types.d.ts +1 -1
- package/package.json +8 -9
- package/dist/script/ui/component/ContextMenu/ContextMenu.d.ts +0 -3
- package/dist/script/ui/dialog/toolbox/sdata.d.ts +0 -19
- package/dist/script/ui/state/handleHotkeysOverAtom.d.ts +0 -7
- package/dist/script/ui/views/components/ContextMenu/items/AtomBatchOperations.d.ts +0 -20
- package/dist/script/ui/views/components/ContextMenu/items/AtomSingleOperations.d.ts +0 -19
- package/dist/script/ui/views/components/ContextMenu/items/BatchDelete.d.ts +0 -3
- package/dist/script/ui/views/components/ContextMenu/items/BondBatchOperations.d.ts +0 -20
- package/dist/script/ui/views/components/ContextMenu/items/BondSingleOperations.d.ts +0 -19
|
@@ -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' | 'fullscreen' | 'sgroup' | '
|
|
16
|
+
export declare type ButtonName = 'layout' | 'clean' | 'arom' | 'dearom' | 'cip' | 'check' | 'analyse' | 'recognize' | 'miew' | 'settings' | 'help' | 'about' | 'fullscreen' | 'sgroup' | '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';
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
import { Action, 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
|
+
export interface Selection {
|
|
20
21
|
atoms?: Array<number>;
|
|
21
22
|
bonds?: Array<number>;
|
|
22
23
|
enhancedFlags?: Array<number>;
|
|
@@ -37,6 +38,7 @@ declare class Editor implements KetcherEditor {
|
|
|
37
38
|
x: number;
|
|
38
39
|
y: number;
|
|
39
40
|
};
|
|
41
|
+
contextMenu: contextMenuInfo;
|
|
40
42
|
event: {
|
|
41
43
|
message: Subscription;
|
|
42
44
|
elementEdit: PipelineSubscription;
|
|
@@ -4,6 +4,8 @@ declare namespace _default {
|
|
|
4
4
|
export { calcNewAtomPos };
|
|
5
5
|
export { degrees };
|
|
6
6
|
export { mergeBondsParams };
|
|
7
|
+
export { getOnlyNonGroupItems };
|
|
8
|
+
export { getNonGroupItemsAndAttachmentPoints };
|
|
7
9
|
}
|
|
8
10
|
export default _default;
|
|
9
11
|
declare function calcAngle(pos0: any, pos1: any): number;
|
|
@@ -16,4 +18,31 @@ declare function mergeBondsParams(struct1: any, bond1: any, struct2: any, bond2:
|
|
|
16
18
|
scale: number;
|
|
17
19
|
cross: boolean;
|
|
18
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Get all items IDs that do not belong to sgroups
|
|
23
|
+
* @param items {{ atoms?: number[]; bonds?: number[] } | null}
|
|
24
|
+
* @param struct {Struct}
|
|
25
|
+
* @returns {{ atoms: number[], bonds: number[] }}
|
|
26
|
+
*/
|
|
27
|
+
declare function getOnlyNonGroupItems(items: {
|
|
28
|
+
atoms?: number[] | undefined;
|
|
29
|
+
bonds?: number[] | undefined;
|
|
30
|
+
} | null, struct: Struct): {
|
|
31
|
+
atoms: number[];
|
|
32
|
+
bonds: number[];
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Get all items IDs that do not belong to sgroups (except their attachment points)
|
|
36
|
+
* @param items {{ atoms?: number[]; bonds?: number[] } | null}
|
|
37
|
+
* @param struct {Struct}
|
|
38
|
+
* @returns {{ atoms: number[], bonds: number[] }}
|
|
39
|
+
*/
|
|
40
|
+
declare function getNonGroupItemsAndAttachmentPoints(items: {
|
|
41
|
+
atoms?: number[] | undefined;
|
|
42
|
+
bonds?: number[] | undefined;
|
|
43
|
+
} | null, struct: Struct): {
|
|
44
|
+
atoms: number[];
|
|
45
|
+
bonds: number[];
|
|
46
|
+
};
|
|
19
47
|
import { Vec2 } from "ketcher-core/dist/domain/entities/vec2";
|
|
48
|
+
import { Struct } from "ketcher-core/dist/domain/entities/struct";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from 'ketcher-core';
|
|
2
|
+
import Editor from '../../Editor';
|
|
3
|
+
declare type MergeItems = {
|
|
4
|
+
atoms: Map<number, number>;
|
|
5
|
+
bonds: Map<number, number>;
|
|
6
|
+
};
|
|
7
|
+
export declare function dropAndMerge(editor: Editor, mergeItems: MergeItems, action?: Action): void;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Struct } from 'ketcher-core';
|
|
2
|
+
declare type Items = {
|
|
3
|
+
atoms?: number[];
|
|
4
|
+
bonds?: number[];
|
|
5
|
+
};
|
|
6
|
+
declare function getGroupIdsFromItemArrays(struct: Struct, items?: Items): number[];
|
|
7
|
+
declare type MergeItems = {
|
|
8
|
+
atoms: Map<number, number>;
|
|
9
|
+
bonds: Map<number, number>;
|
|
10
|
+
};
|
|
11
|
+
declare function getGroupIdsFromItemMaps(struct: Struct, mergeMaps: MergeItems | null): number[];
|
|
12
|
+
export { getGroupIdsFromItemArrays, getGroupIdsFromItemMaps };
|
|
@@ -19,8 +19,13 @@ declare class PasteTool {
|
|
|
19
19
|
editor: Editor;
|
|
20
20
|
struct: Struct;
|
|
21
21
|
action: any;
|
|
22
|
+
templateAction: any;
|
|
23
|
+
dragCtx: any;
|
|
24
|
+
findItems: string[];
|
|
22
25
|
mergeItems: any;
|
|
26
|
+
isSingleContractedGroup: boolean;
|
|
23
27
|
constructor(editor: any, struct: any);
|
|
28
|
+
mousedown(event: any): void;
|
|
24
29
|
mousemove(event: any): void;
|
|
25
30
|
mouseup(): void;
|
|
26
31
|
cancel(): void;
|
|
@@ -23,7 +23,7 @@ declare class SelectTool {
|
|
|
23
23
|
isSelectionRunning(): boolean;
|
|
24
24
|
mousedown(event: any): boolean;
|
|
25
25
|
mousemove(event: any): boolean;
|
|
26
|
-
mouseup(event: any):
|
|
26
|
+
mouseup(event: any): void;
|
|
27
27
|
dblclick(event: any): true | undefined;
|
|
28
28
|
mouseleave(_: any): void;
|
|
29
29
|
selectElementsOnCanvas(elements: {
|
|
@@ -16,16 +16,15 @@
|
|
|
16
16
|
import Editor from '../Editor';
|
|
17
17
|
declare class SGroupTool {
|
|
18
18
|
editor: Editor;
|
|
19
|
-
type: any;
|
|
20
19
|
lassoHelper: any;
|
|
21
20
|
isNotActiveTool: boolean | undefined;
|
|
22
|
-
constructor(editor: any
|
|
21
|
+
constructor(editor: any);
|
|
23
22
|
checkSelection(): void;
|
|
24
23
|
mousedown(event: any): void;
|
|
25
24
|
mousemove(event: any): void;
|
|
26
25
|
mouseleave(event: any): void;
|
|
27
26
|
mouseup(event: any): void;
|
|
28
27
|
cancel(): void;
|
|
29
|
-
static sgroupDialog(editor: any, id: any
|
|
28
|
+
static sgroupDialog(editor: any, id: any): void;
|
|
30
29
|
}
|
|
31
30
|
export default SGroupTool;
|
|
@@ -14,16 +14,21 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
16
|
import Editor from '../Editor';
|
|
17
|
+
declare type MergeItems = Record<string, Map<unknown, unknown>> | null;
|
|
17
18
|
declare class TemplateTool {
|
|
18
19
|
editor: Editor;
|
|
19
20
|
mode: any;
|
|
20
21
|
template: any;
|
|
21
22
|
findItems: Array<string>;
|
|
23
|
+
mergeItems: MergeItems;
|
|
22
24
|
dragCtx: any;
|
|
25
|
+
targetGroupsIds: Array<number>;
|
|
26
|
+
isSaltOrSolvent: boolean;
|
|
27
|
+
followAction: any;
|
|
23
28
|
constructor(editor: any, tmpl: any);
|
|
24
|
-
mousedown(event: any):
|
|
25
|
-
mousemove(event: any):
|
|
26
|
-
mouseup(event: any):
|
|
29
|
+
mousedown(event: any): void;
|
|
30
|
+
mousemove(event: any): true | undefined;
|
|
31
|
+
mouseup(event: any): true | undefined;
|
|
27
32
|
cancel(e: any): void;
|
|
28
33
|
mouseleave(e: any): void;
|
|
29
34
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Vec2 } from 'ketcher-core';
|
|
2
|
+
export declare function isCloseToEdgeOfScreen(event: any): {
|
|
3
|
+
isCloseToLeftEdgeOfScreen: boolean;
|
|
4
|
+
isCloseToTopEdgeOfScreen: boolean;
|
|
5
|
+
isCloseToRightEdgeOfScreen: boolean;
|
|
6
|
+
isCloseToBottomEdgeOfScreen: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function isCloseToEdgeOfCanvas(event: any, canvasSize: any): {
|
|
9
|
+
isCloseToLeftEdgeOfCanvas: boolean;
|
|
10
|
+
isCloseToTopEdgeOfCanvas: boolean;
|
|
11
|
+
isCloseToRightEdgeOfCanvas: boolean;
|
|
12
|
+
isCloseToBottomEdgeOfCanvas: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare function calculateCanvasExtension(clientArea: any, currentCanvasSize: any, extensionVector: any): Vec2;
|
|
15
|
+
export declare function shiftAndExtendCanvasByVector(vector: Vec2, render: any): void;
|
|
16
|
+
export declare function scrollByVector(vector: Vec2, render: any): void;
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import { CSSProperties, Component } from 'react';
|
|
16
|
+
import { CSSProperties, Component, ReactNode } from 'react';
|
|
17
17
|
interface PortalProps {
|
|
18
18
|
isOpen: boolean;
|
|
19
19
|
className?: string;
|
|
20
20
|
style?: CSSProperties;
|
|
21
|
+
children: ReactNode;
|
|
21
22
|
}
|
|
22
23
|
declare type Props = PortalProps;
|
|
23
24
|
declare class Portal extends Component<Props> {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
16
|
import { Dispatch } from 'redux';
|
|
17
|
-
declare type ToolVariant = 'about' | 'analyse' | 'arom' | 'bond-any' | 'bond-hydrogen' | 'bond-aromatic' | 'bond-crossed' | 'bond-dative' | 'bond-double' | 'bond-doublearomatic' | 'bond-down' | 'bond-single' | 'bond-singlearomatic' | 'bond-singledouble' | 'bond-triple' | 'bond-up' | 'bond-updown' | 'chain' | 'charge-minus' | 'charge-plus' | 'check' | 'chiral-flag' | 'cip' | 'clean' | 'copy' | 'copy-image' | 'cut' | 'dearom' | 'dropdown' | 'enhanced-stereo' | 'erase' | 'fullscreen' | 'functional-groups' | 'generic-groups' | 'help' | 'layout' | 'logo' | 'miew' | 'clear' | 'open' | 'paste' | 'period-table' | 'reaction-arrow' | 'reaction-automap' | 'reaction-map' | 'reaction-plus' | 'reaction-unmap' | 'recognize' | 'redo' | 'rgroup-attpoints' | 'rgroup-fragment' | 'rgroup-label' | 'save' | 'select-fragment' | 'select-lasso' | 'select-rectangle' | 'settings' | 'sgroup' | '
|
|
17
|
+
declare type ToolVariant = 'about' | 'analyse' | 'arom' | 'atom-props' | 'bond-any' | 'bond-hydrogen' | 'bond-aromatic' | 'bond-crossed' | 'bond-dative' | 'bond-double' | 'bond-doublearomatic' | 'bond-down' | 'bond-props' | 'bond-single' | 'bond-singlearomatic' | 'bond-singledouble' | 'bond-triple' | 'bond-up' | 'bond-updown' | 'chain' | 'charge-minus' | 'charge-plus' | 'check' | 'chiral-flag' | 'cip' | 'clean' | 'copy' | 'copy-image' | 'cut' | 'dearom' | 'dropdown' | 'enhanced-stereo' | 'erase' | 'fullscreen' | 'functional-groups' | 'generic-groups' | 'help' | 'layout' | 'logo' | 'miew' | 'clear' | 'open' | 'paste' | 'period-table' | 'reaction-arrow' | 'reaction-automap' | 'reaction-map' | 'reaction-plus' | 'reaction-unmap' | 'recognize' | 'redo' | 'rgroup-attpoints' | 'rgroup-fragment' | 'rgroup-label' | 'save' | 'select-fragment' | 'select-lasso' | 'select-rectangle' | 'settings' | 'sgroup' | 'template-0' | 'template-1' | 'template-2' | 'template-3' | 'template-4' | 'template-5' | 'template-6' | 'template-7' | 'template-lib' | 'text' | 'transform-flip-h' | 'transform-flip-v' | 'transform-rotate' | 'zoom-in' | 'zoom-out' | 'shape-circle' | 'shape-rectangle' | 'shape-polyline' | 'shape-line' | 'undo';
|
|
18
18
|
declare type Editor = any;
|
|
19
19
|
declare type Server = any;
|
|
20
20
|
declare type Options = any;
|
|
@@ -29,13 +29,18 @@ declare const config: {
|
|
|
29
29
|
title: string;
|
|
30
30
|
action: {
|
|
31
31
|
dialog: string;
|
|
32
|
+
prop: {
|
|
33
|
+
tab: null;
|
|
34
|
+
};
|
|
32
35
|
};
|
|
33
36
|
selected: (editor: any) => boolean;
|
|
34
37
|
disabled: (editor: any, server: any, options: any) => boolean;
|
|
35
38
|
hidden: (options: any) => boolean;
|
|
36
39
|
};
|
|
37
40
|
zoom: {
|
|
41
|
+
shortcut: string[];
|
|
38
42
|
selected: (editor: any) => any;
|
|
43
|
+
action: (editor: any) => any;
|
|
39
44
|
hidden: (options: any) => boolean;
|
|
40
45
|
};
|
|
41
46
|
'zoom-out': {
|
|
@@ -171,15 +176,6 @@ declare const config: {
|
|
|
171
176
|
};
|
|
172
177
|
hidden: (options: any) => boolean;
|
|
173
178
|
};
|
|
174
|
-
'sgroup-data': {
|
|
175
|
-
shortcut: string;
|
|
176
|
-
title: string;
|
|
177
|
-
action: {
|
|
178
|
-
tool: string;
|
|
179
|
-
opts: string;
|
|
180
|
-
};
|
|
181
|
-
hidden: (options: any) => boolean;
|
|
182
|
-
};
|
|
183
179
|
arrows: {
|
|
184
180
|
hidden: (options: any) => boolean;
|
|
185
181
|
};
|
|
@@ -398,6 +394,7 @@ declare const config: {
|
|
|
398
394
|
hidden: (options: any) => boolean;
|
|
399
395
|
};
|
|
400
396
|
text: {
|
|
397
|
+
shortcut: string;
|
|
401
398
|
title: string;
|
|
402
399
|
action: {
|
|
403
400
|
tool: string;
|
|
@@ -436,6 +433,7 @@ declare const config: {
|
|
|
436
433
|
hidden: (options: any) => boolean;
|
|
437
434
|
};
|
|
438
435
|
arom: {
|
|
436
|
+
shortcut: string;
|
|
439
437
|
title: string;
|
|
440
438
|
action: {
|
|
441
439
|
thunk: (dispatch: any, getState: any) => void;
|
|
@@ -444,6 +442,7 @@ declare const config: {
|
|
|
444
442
|
hidden: (options: any) => boolean;
|
|
445
443
|
};
|
|
446
444
|
dearom: {
|
|
445
|
+
shortcut: string;
|
|
447
446
|
title: string;
|
|
448
447
|
action: {
|
|
449
448
|
thunk: (dispatch: any, getState: any) => void;
|
|
@@ -461,6 +460,7 @@ declare const config: {
|
|
|
461
460
|
hidden: (options: any) => boolean;
|
|
462
461
|
};
|
|
463
462
|
check: {
|
|
463
|
+
shortcut: string;
|
|
464
464
|
title: string;
|
|
465
465
|
action: {
|
|
466
466
|
dialog: string;
|
|
@@ -469,6 +469,7 @@ declare const config: {
|
|
|
469
469
|
hidden: (options: any) => boolean;
|
|
470
470
|
};
|
|
471
471
|
analyse: {
|
|
472
|
+
shortcut: string;
|
|
472
473
|
title: string;
|
|
473
474
|
action: {
|
|
474
475
|
dialog: string;
|
|
@@ -515,6 +516,20 @@ declare const config: {
|
|
|
515
516
|
};
|
|
516
517
|
hidden: (options: any) => boolean;
|
|
517
518
|
};
|
|
519
|
+
'atom-props': {
|
|
520
|
+
title: string;
|
|
521
|
+
action: {
|
|
522
|
+
dialog: string;
|
|
523
|
+
};
|
|
524
|
+
hidden: (options: any) => boolean;
|
|
525
|
+
};
|
|
526
|
+
'bond-props': {
|
|
527
|
+
title: string;
|
|
528
|
+
action: {
|
|
529
|
+
dialog: string;
|
|
530
|
+
};
|
|
531
|
+
hidden: (options: any) => boolean;
|
|
532
|
+
};
|
|
518
533
|
undo: {
|
|
519
534
|
shortcut: string;
|
|
520
535
|
title: string;
|
|
@@ -25,6 +25,8 @@ declare namespace config {
|
|
|
25
25
|
export { hidden_1 as hidden };
|
|
26
26
|
}
|
|
27
27
|
namespace arom {
|
|
28
|
+
const shortcut_2: string;
|
|
29
|
+
export { shortcut_2 as shortcut };
|
|
28
30
|
const title_2: string;
|
|
29
31
|
export { title_2 as title };
|
|
30
32
|
export namespace action_2 {
|
|
@@ -38,6 +40,8 @@ declare namespace config {
|
|
|
38
40
|
export { hidden_2 as hidden };
|
|
39
41
|
}
|
|
40
42
|
namespace dearom {
|
|
43
|
+
const shortcut_3: string;
|
|
44
|
+
export { shortcut_3 as shortcut };
|
|
41
45
|
const title_3: string;
|
|
42
46
|
export { title_3 as title };
|
|
43
47
|
export namespace action_3 {
|
|
@@ -51,8 +55,8 @@ declare namespace config {
|
|
|
51
55
|
export { hidden_3 as hidden };
|
|
52
56
|
}
|
|
53
57
|
namespace cip {
|
|
54
|
-
const
|
|
55
|
-
export {
|
|
58
|
+
const shortcut_4: string;
|
|
59
|
+
export { shortcut_4 as shortcut };
|
|
56
60
|
const title_4: string;
|
|
57
61
|
export { title_4 as title };
|
|
58
62
|
export namespace action_4 {
|
|
@@ -66,6 +70,8 @@ declare namespace config {
|
|
|
66
70
|
export { hidden_4 as hidden };
|
|
67
71
|
}
|
|
68
72
|
namespace check {
|
|
73
|
+
const shortcut_5: string;
|
|
74
|
+
export { shortcut_5 as shortcut };
|
|
69
75
|
const title_5: string;
|
|
70
76
|
export { title_5 as title };
|
|
71
77
|
export namespace action_5 {
|
|
@@ -78,6 +84,8 @@ declare namespace config {
|
|
|
78
84
|
export { hidden_5 as hidden };
|
|
79
85
|
}
|
|
80
86
|
namespace analyse {
|
|
87
|
+
const shortcut_6: string;
|
|
88
|
+
export { shortcut_6 as shortcut };
|
|
81
89
|
const title_6: string;
|
|
82
90
|
export { title_6 as title };
|
|
83
91
|
export namespace action_6 {
|
|
@@ -115,15 +115,6 @@ declare var _default: {
|
|
|
115
115
|
};
|
|
116
116
|
hidden: (options: any) => boolean;
|
|
117
117
|
};
|
|
118
|
-
'sgroup-data': {
|
|
119
|
-
shortcut: string;
|
|
120
|
-
title: string;
|
|
121
|
-
action: {
|
|
122
|
-
tool: string;
|
|
123
|
-
opts: string;
|
|
124
|
-
};
|
|
125
|
-
hidden: (options: any) => boolean;
|
|
126
|
-
};
|
|
127
118
|
arrows: {
|
|
128
119
|
hidden: (options: any) => boolean;
|
|
129
120
|
};
|
|
@@ -342,6 +333,7 @@ declare var _default: {
|
|
|
342
333
|
hidden: (options: any) => boolean;
|
|
343
334
|
};
|
|
344
335
|
text: {
|
|
336
|
+
shortcut: string;
|
|
345
337
|
title: string;
|
|
346
338
|
action: {
|
|
347
339
|
tool: string;
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
export function fromElement(selem: any): any;
|
|
2
2
|
export function toElement(elem: any): any;
|
|
3
|
+
export function fromAtom(satom: any): {
|
|
4
|
+
alias: any;
|
|
5
|
+
label: any;
|
|
6
|
+
charge: any;
|
|
7
|
+
isotope: any;
|
|
8
|
+
explicitValence: any;
|
|
9
|
+
radical: any;
|
|
10
|
+
invRet: any;
|
|
11
|
+
exactChangeFlag: boolean;
|
|
12
|
+
ringBondCount: any;
|
|
13
|
+
substitutionCount: any;
|
|
14
|
+
unsaturatedAtom: boolean;
|
|
15
|
+
hCount: any;
|
|
16
|
+
stereoParity: any;
|
|
17
|
+
};
|
|
18
|
+
export function toAtom(atom: any): any;
|
|
3
19
|
export function fromStereoLabel(stereoLabel: any): {
|
|
4
20
|
type: null;
|
|
5
21
|
orNumber?: undefined;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
export function getSdataDefault(schema: {} | undefined, context: any, fieldName: any): string;
|
|
11
11
|
export namespace sdataCustomSchema {
|
|
12
12
|
const key: string;
|
|
13
|
+
const title: string;
|
|
13
14
|
const type: string;
|
|
14
15
|
namespace properties {
|
|
15
16
|
export namespace type_1 {
|
|
@@ -18,15 +19,16 @@ export namespace sdataCustomSchema {
|
|
|
18
19
|
}
|
|
19
20
|
export { type_1 as type };
|
|
20
21
|
export namespace context {
|
|
21
|
-
|
|
22
|
+
const title_1: string;
|
|
23
|
+
export { title_1 as title };
|
|
22
24
|
const _enum_1: string[];
|
|
23
25
|
export { _enum_1 as enum };
|
|
24
26
|
const _default: string;
|
|
25
27
|
export { _default as default };
|
|
26
28
|
}
|
|
27
29
|
export namespace fieldName {
|
|
28
|
-
const
|
|
29
|
-
export {
|
|
30
|
+
const title_2: string;
|
|
31
|
+
export { title_2 as title };
|
|
30
32
|
const type_2: string;
|
|
31
33
|
export { type_2 as type };
|
|
32
34
|
const _default_1: string;
|
|
@@ -35,8 +37,8 @@ export namespace sdataCustomSchema {
|
|
|
35
37
|
export const invalidMessage: string;
|
|
36
38
|
}
|
|
37
39
|
export namespace fieldValue {
|
|
38
|
-
const
|
|
39
|
-
export {
|
|
40
|
+
const title_3: string;
|
|
41
|
+
export { title_3 as title };
|
|
40
42
|
const type_3: string;
|
|
41
43
|
export { type_3 as type };
|
|
42
44
|
const _default_2: string;
|
|
@@ -38,7 +38,5 @@ interface TemplateLibCallProps {
|
|
|
38
38
|
functionalGroups: Template[];
|
|
39
39
|
}
|
|
40
40
|
declare type Props = TemplateLibProps & TemplateLibCallProps;
|
|
41
|
-
declare const _default: import("react-redux").ConnectedComponent<FC<Props>, import("react-redux").Omit<TemplateLibProps & TemplateLibCallProps &
|
|
42
|
-
children?: import("react").ReactNode;
|
|
43
|
-
}, "onFilter" | "onTabChange" | "onSelect" | "onChangeGroup" | "onAttach" | "onCancel" | "onDelete" | "initialTab" | "renderOptions" | "functionalGroups" | "saltsAndSolvents"> & TemplateLibProps & TemplateLibCallProps>;
|
|
41
|
+
declare const _default: import("react-redux").ConnectedComponent<FC<Props>, import("react-redux").Omit<TemplateLibProps & TemplateLibCallProps, "onFilter" | "onTabChange" | "onSelect" | "onChangeGroup" | "onAttach" | "onCancel" | "onDelete" | "initialTab" | "renderOptions" | "functionalGroups" | "saltsAndSolvents"> & TemplateLibProps & TemplateLibCallProps>;
|
|
44
42
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare var _default: import("react-redux").ConnectedComponent<typeof Attach, import("react-redux").Omit<{
|
|
1
|
+
declare var _default: import("react-redux").ConnectedComponent<typeof Attach, import("react-redux").Omit<import("react").ClassAttributes<Attach> & {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
onInit: any;
|
|
4
4
|
}, string | number>>;
|
|
@@ -38,7 +38,5 @@ interface EnhancedStereoCallProps {
|
|
|
38
38
|
onOk: (res: any) => void;
|
|
39
39
|
}
|
|
40
40
|
declare type Props = EnhancedStereoProps & EnhancedStereoCallProps;
|
|
41
|
-
declare const _default: import("react-redux").ConnectedComponent<FC<Props>, import("react-redux").Omit<EnhancedStereoProps & EnhancedStereoCallProps
|
|
42
|
-
children?: import("react").ReactNode;
|
|
43
|
-
}, "formState" | "struct">>;
|
|
41
|
+
declare const _default: import("react-redux").ConnectedComponent<FC<Props>, import("react-redux").Omit<EnhancedStereoProps & EnhancedStereoCallProps, "formState" | "struct">>;
|
|
44
42
|
export default _default;
|
|
@@ -3,7 +3,7 @@ declare var _default: import("react-redux").ConnectedComponent<typeof Sgroup, im
|
|
|
3
3
|
formState: any;
|
|
4
4
|
}, "formState" | "dispatch">>;
|
|
5
5
|
export default _default;
|
|
6
|
-
declare function Sgroup({ formState, ...
|
|
6
|
+
declare function Sgroup({ formState, ...props }: {
|
|
7
7
|
[x: string]: any;
|
|
8
8
|
formState: any;
|
|
9
9
|
}): JSX.Element;
|
|
@@ -14,10 +14,6 @@ export default function initEditor(dispatch: any, getState: any): {
|
|
|
14
14
|
attrs: any;
|
|
15
15
|
}>;
|
|
16
16
|
onRemoveFG: (result: any) => Promise<any>;
|
|
17
|
-
onSdataEdit: (sgroup: any) => Promise<{
|
|
18
|
-
type: any;
|
|
19
|
-
attrs: any;
|
|
20
|
-
}>;
|
|
21
17
|
onMessage: (msg: any) => void;
|
|
22
18
|
onAromatizeStruct: (struct: any) => any;
|
|
23
19
|
onDearomatizeStruct: (struct: any) => any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Dispatch } from 'redux';
|
|
2
|
+
import { Editor } from '../../editor';
|
|
3
|
+
declare type TNewAction = {
|
|
4
|
+
tool?: string;
|
|
5
|
+
dialog?: string;
|
|
6
|
+
opts?: any;
|
|
7
|
+
};
|
|
8
|
+
declare type HandleHotkeyOverItemProps = {
|
|
9
|
+
hoveredItem: Record<string, number>;
|
|
10
|
+
newAction: TNewAction;
|
|
11
|
+
editor: Editor;
|
|
12
|
+
dispatch: Dispatch;
|
|
13
|
+
};
|
|
14
|
+
export declare function handleHotkeyOverItem(props: HandleHotkeyOverItemProps): void;
|
|
15
|
+
export {};
|
|
@@ -16,7 +16,7 @@ export function setDefaultSettings(): {
|
|
|
16
16
|
errors: {};
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
export function formReducer(state: any, action: any
|
|
19
|
+
export function formReducer(state: any, action: any): any;
|
|
20
20
|
export namespace formsState {
|
|
21
21
|
namespace atomProps {
|
|
22
22
|
const errors: {};
|
|
@@ -123,18 +123,15 @@ export namespace formsState {
|
|
|
123
123
|
const result_8: Record<string, any>;
|
|
124
124
|
export { result_8 as result };
|
|
125
125
|
}
|
|
126
|
-
namespace
|
|
126
|
+
namespace text {
|
|
127
127
|
const errors_10: {};
|
|
128
128
|
export { errors_10 as errors };
|
|
129
129
|
const valid_9: boolean;
|
|
130
130
|
export { valid_9 as valid };
|
|
131
|
-
|
|
132
|
-
const type_1: string;
|
|
133
|
-
export { type_1 as type };
|
|
134
|
-
}
|
|
131
|
+
const result_9: {};
|
|
135
132
|
export { result_9 as result };
|
|
136
133
|
}
|
|
137
|
-
namespace
|
|
134
|
+
namespace attach {
|
|
138
135
|
const errors_11: {};
|
|
139
136
|
export { errors_11 as errors };
|
|
140
137
|
const valid_10: boolean;
|
|
@@ -142,15 +139,7 @@ export namespace formsState {
|
|
|
142
139
|
const result_10: {};
|
|
143
140
|
export { result_10 as result };
|
|
144
141
|
}
|
|
145
|
-
|
|
146
|
-
const errors_12: {};
|
|
147
|
-
export { errors_12 as errors };
|
|
148
|
-
const valid_11: boolean;
|
|
149
|
-
export { valid_11 as valid };
|
|
150
|
-
const result_11: {};
|
|
151
|
-
export { result_11 as result };
|
|
152
|
-
}
|
|
153
|
-
const sdata: {
|
|
142
|
+
const sgroup: {
|
|
154
143
|
errors: {};
|
|
155
144
|
valid: boolean;
|
|
156
145
|
result: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export default Editor;
|
|
2
|
-
declare const Editor: import("react-redux").ConnectedComponent<typeof StructEditor, import("react-redux").Omit<any, "
|
|
2
|
+
declare const Editor: import("react-redux").ConnectedComponent<typeof StructEditor, import("react-redux").Omit<any, "type" | "indigoVerification" | "options">>;
|
|
3
3
|
import { StructEditor } from "./components";
|
|
@@ -15,6 +15,5 @@
|
|
|
15
15
|
***************************************************************************/
|
|
16
16
|
/// <reference types="react" />
|
|
17
17
|
import 'react-contexify/ReactContexify.css';
|
|
18
|
-
export declare const CONTEXT_MENU_ID = "ketcherBondAndAtomContextMenu";
|
|
19
18
|
declare const ContextMenu: React.FC;
|
|
20
19
|
export default ContextMenu;
|
|
@@ -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
|
-
|
|
17
|
-
declare const ContextMenuTrigger: React.FC
|
|
16
|
+
import { PropsWithChildren } from 'react';
|
|
17
|
+
declare const ContextMenuTrigger: React.FC<PropsWithChildren>;
|
|
18
18
|
export default ContextMenuTrigger;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FunctionalGroup } from 'ketcher-core';
|
|
2
|
+
import type { PredicateParams } from 'react-contexify';
|
|
3
|
+
export declare enum CONTEXT_MENU_ID {
|
|
4
|
+
FOR_BONDS = "context-menu-for-bonds",
|
|
5
|
+
FOR_ATOMS = "context-menu-for-atoms",
|
|
6
|
+
FOR_SELECTION = "context-menu-for-selection",
|
|
7
|
+
FOR_FUNCTIONAL_GROUPS = "context-menu-for-functional-groups"
|
|
8
|
+
}
|
|
9
|
+
export declare type ItemData = unknown;
|
|
2
10
|
export declare type ContextMenuShowProps = {
|
|
3
|
-
|
|
4
|
-
|
|
11
|
+
id: CONTEXT_MENU_ID;
|
|
12
|
+
functionalGroups?: FunctionalGroup[];
|
|
13
|
+
bondIds?: number[];
|
|
14
|
+
atomIds?: number[];
|
|
15
|
+
} | null;
|
|
16
|
+
export declare type ItemEventParams = PredicateParams<ContextMenuShowProps, ItemData>;
|
|
17
|
+
export declare type contextMenuInfo = {
|
|
18
|
+
[id in CONTEXT_MENU_ID]?: boolean;
|
|
5
19
|
};
|
|
6
|
-
export declare type ItemData = unknown;
|
|
7
|
-
export declare type CustomItemProps = Omit<ItemProps, 'children'>;
|
|
8
|
-
export declare type CustomSubMenuProps = Omit<SubMenuProps, 'children' | 'label'>;
|