ketcher-react 2.2.0 → 2.3.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.
- package/LICENSE +1 -1
- package/dist/Editor.d.ts +3 -0
- package/dist/contexts/appContext.d.ts +6 -0
- package/dist/contexts/index.d.ts +3 -2
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useAppContext.d.ts +1 -0
- package/dist/hooks/useResizeObserver.d.ts +1 -1
- package/dist/hooks/useSettingsContext.d.ts +1 -1
- package/dist/index.css +3 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16256 -21706
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +16169 -21618
- package/dist/index.modern.js.map +1 -1
- package/dist/script/api.d.ts +2 -2
- package/dist/script/builders/ketcher/KetcherBuilder.d.ts +1 -1
- package/dist/script/editor/Editor.d.ts +11 -4
- package/dist/script/editor/actions/bond.d.ts +24 -24
- package/dist/script/editor/actions/reaction.d.ts +1 -1
- package/dist/script/editor/actions/text.d.ts +6 -0
- package/dist/script/editor/actions/utils.d.ts +1 -2
- package/dist/script/editor/operations/CanvasLoad.d.ts +1 -1
- package/dist/script/editor/operations/EnhancedFlagMove.d.ts +1 -1
- package/dist/script/editor/operations/FragmentStereoFlag.d.ts +3 -5
- package/dist/script/editor/operations/LoopMove.d.ts +1 -1
- package/dist/script/editor/operations/OperationType.d.ts +5 -0
- package/dist/script/editor/operations/Text/TextCreateDelete.d.ts +41 -0
- package/dist/script/{chem/struct/simpleObject.d.ts → editor/operations/Text/TextMove.d.ts} +12 -15
- package/dist/script/{util/pool.d.ts → editor/operations/Text/TextUpdate.d.ts} +14 -10
- package/dist/script/editor/operations/Text/index.d.ts +3 -0
- package/dist/script/editor/operations/atom/AtomAttr.d.ts +1 -1
- package/dist/script/editor/operations/atom/AtomMove.d.ts +1 -1
- package/dist/script/editor/operations/base.d.ts +2 -2
- package/dist/script/editor/operations/bond/BondAttr.d.ts +1 -1
- package/dist/script/editor/operations/bond/BondMove.d.ts +1 -1
- package/dist/script/editor/operations/bond/index.d.ts +15 -0
- package/dist/script/{util/pile.d.ts → editor/operations/calcimplicitH.d.ts} +8 -10
- package/dist/script/editor/operations/fragment.d.ts +1 -1
- package/dist/script/editor/operations/fragmentStereoAtom.d.ts +1 -1
- package/dist/script/editor/operations/index.d.ts +2 -0
- package/dist/script/editor/operations/rxn/index.d.ts +18 -1
- package/dist/script/editor/operations/rxn/plus/RxnPlusMove.d.ts +1 -1
- package/dist/script/editor/operations/sgroup/index.d.ts +1 -1
- package/dist/script/editor/operations/sgroup/sgroupHierarchy.d.ts +0 -2
- package/dist/script/editor/operations/simpleObject.d.ts +9 -11
- package/dist/script/editor/shared/action.d.ts +2 -2
- package/dist/script/editor/shared/utils.d.ts +2 -2
- package/dist/script/editor/tool/attach.d.ts +4 -1
- package/dist/script/editor/tool/enhanced-stereo.d.ts +2 -1
- package/dist/script/editor/tool/helper/lasso.d.ts +3 -0
- package/dist/script/editor/tool/helper/locate.d.ts +2 -0
- package/dist/script/editor/tool/index.d.ts +2 -0
- package/dist/script/editor/tool/reactionarrow.d.ts +4 -4
- package/dist/script/editor/tool/rotate.d.ts +1 -1
- package/dist/script/editor/tool/text.d.ts +27 -0
- package/dist/script/editor/utils/elementOffset.d.ts +1 -1
- package/dist/script/index.d.ts +1 -1
- package/dist/script/ketcher.d.ts +1 -2
- package/dist/script/render/draw.d.ts +13 -7
- package/dist/script/render/index.d.ts +5 -5
- package/dist/script/render/restruct/GeneralEnumTypes.d.ts +35 -0
- package/dist/script/render/restruct/ReEnhancedFlag.d.ts +28 -0
- package/dist/script/render/restruct/ReObject.d.ts +32 -0
- package/dist/script/render/restruct/ReSimpleObject.d.ts +40 -0
- package/dist/script/render/restruct/ReStruct.d.ts +110 -0
- package/dist/script/render/restruct/ReText.d.ts +38 -0
- package/dist/script/render/restruct/index.d.ts +5 -84
- package/dist/script/render/restruct/reatom.d.ts +41 -17
- package/dist/script/render/restruct/rebond.d.ts +36 -26
- package/dist/script/render/restruct/redatasgroupdata.d.ts +3 -7
- package/dist/script/render/restruct/refrag.d.ts +3 -7
- package/dist/script/render/restruct/reloop.d.ts +4 -8
- package/dist/script/render/restruct/rergroup.d.ts +4 -7
- package/dist/script/render/restruct/rerxnarrow.d.ts +3 -7
- package/dist/script/render/restruct/rerxnplus.d.ts +3 -7
- package/dist/script/render/restruct/resgroup.d.ts +3 -6
- package/dist/script/render/restruct/visel.d.ts +1 -2
- package/dist/script/render/util.d.ts +1 -1
- package/dist/script/ui/action/action.types.d.ts +1 -1
- package/dist/script/ui/action/atoms.d.ts +1 -1
- package/dist/script/ui/action/debug.d.ts +2 -2
- package/dist/script/ui/action/index.d.ts +392 -2
- package/dist/script/ui/action/templates.d.ts +10 -1
- package/dist/script/ui/action/tools.d.ts +16 -1
- package/dist/script/ui/component/form/colorPicker/ColorPicker.d.ts +12 -0
- package/dist/script/{chem/molfile/molfile.test.d.ts → ui/component/form/colorPicker/ColorPicker.test.d.ts} +0 -0
- package/dist/script/ui/component/view/savebutton.d.ts +1 -5
- package/dist/script/ui/data/convert/structConverter.d.ts +3 -3
- package/dist/script/ui/data/convert/structconv.d.ts +6 -4
- package/dist/script/ui/data/schema/options-schema.d.ts +25 -167
- package/dist/script/ui/data/schema/struct-schema.d.ts +20 -2
- package/dist/script/ui/data/templates.d.ts +1 -1
- package/dist/script/ui/dialog/index.d.ts +43 -7
- package/dist/script/ui/dialog/template/TemplateLib.d.ts +1 -1
- package/dist/script/ui/dialog/template/TemplateTable.d.ts +1 -1
- package/dist/script/ui/dialog/toolbox/enhancedStereo.d.ts +2 -0
- package/dist/script/ui/state/constants.d.ts +7 -0
- package/dist/script/ui/state/editor/index.d.ts +1 -2
- package/dist/script/ui/state/modal/form.d.ts +10 -2
- package/dist/script/ui/state/options/index.d.ts +4 -3
- package/dist/script/ui/state/shared.d.ts +1 -1
- package/dist/script/ui/views/components/Dialog/Dialog.d.ts +6 -8
- package/dist/script/ui/views/components/Dialog/index.d.ts +1 -1
- package/dist/script/ui/views/components/index.d.ts +1 -2
- package/dist/script/ui/views/modal/Modal.d.ts +4 -7
- package/dist/script/{format/chemGraph/toGraph/simpleObjectToGraph.d.ts → ui/views/modal/components/Text/Text.d.ts} +4 -5
- package/dist/script/ui/views/modal/components/Text/TextButton/TextButton.d.ts +14 -0
- package/dist/script/ui/views/modal/components/Text/TextButton/index.d.ts +1 -0
- package/dist/script/{util/scale.d.ts → ui/views/modal/components/Text/index.d.ts} +2 -8
- package/dist/script/ui/views/modal/components/document/Open/Open.container.d.ts +18 -0
- package/dist/script/ui/views/modal/components/document/Open/Open.d.ts +24 -2
- package/dist/script/ui/views/modal/components/document/Open/index.d.ts +1 -1
- package/dist/script/ui/views/modal/components/document/Save/SaveImageTab.d.ts +4 -0
- package/dist/script/ui/views/modal/components/meta/Settings/Settings.d.ts +16 -1
- package/dist/script/ui/views/modal/components/meta/Settings/components/Accordion/Accordion.d.ts +35 -13
- package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.container.d.ts +20 -0
- package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.d.ts +36 -0
- package/dist/script/ui/views/modal/components/toolbox/Atom/ElementNumber/ElementNumber.d.ts +6 -0
- package/dist/script/ui/views/modal/components/toolbox/Atom/ElementNumber/index.d.ts +16 -0
- package/dist/script/ui/views/modal/components/toolbox/Atom/index.d.ts +16 -0
- package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.container.d.ts +20 -0
- package/dist/script/ui/views/modal/components/toolbox/Attach/Attach.d.ts +24 -0
- package/dist/script/ui/views/modal/components/toolbox/Attach/index.d.ts +16 -0
- package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.container.d.ts +20 -0
- package/dist/script/ui/views/modal/components/toolbox/Automap/Automap.d.ts +32 -0
- package/dist/script/ui/views/modal/components/toolbox/Automap/index.d.ts +16 -0
- package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.container.d.ts +20 -0
- package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.d.ts +10 -0
- package/dist/script/ui/views/modal/components/toolbox/Bond/index.d.ts +16 -0
- package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.container.d.ts +20 -0
- package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/RgroupLogic.d.ts +28 -0
- package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/components/IfThenSelect/IfThenSelect.d.ts +19 -0
- package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/components/IfThenSelect/index.d.ts +16 -0
- package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/components/index.d.ts +16 -0
- package/dist/script/ui/views/modal/components/toolbox/RgroupLogic/index.d.ts +16 -0
- package/dist/script/ui/views/modal/components/toolbox/index.d.ts +21 -0
- package/dist/script/ui/views/modal/modal.types.d.ts +28 -0
- package/dist/script/ui/views/toolbars/LeftToolbar/Bond/options.d.ts +2 -1
- package/dist/script/ui/views/toolbars/LeftToolbar/LeftToolbar.container.d.ts +1 -1
- package/dist/script/ui/views/toolbars/LeftToolbar/LeftToolbar.d.ts +15 -1
- package/dist/script/ui/views/toolbars/LeftToolbar/RGroup/RGroup.d.ts +15 -0
- package/dist/script/ui/views/toolbars/LeftToolbar/Shape/Shape.d.ts +15 -0
- package/dist/script/ui/views/toolbars/mediaSizes.d.ts +0 -1
- package/dist/script/ui/views/toolbars/toolbar.types.d.ts +3 -3
- package/package.json +7 -3
- package/dist/script/chem/element-color.d.ts +0 -2
- package/dist/script/chem/element.d.ts +0 -57
- package/dist/script/chem/generics.d.ts +0 -5
- package/dist/script/chem/molfile/common.d.ts +0 -34
- package/dist/script/chem/molfile/index.d.ts +0 -10
- package/dist/script/chem/molfile/molfile.d.ts +0 -47
- package/dist/script/chem/molfile/molfileFormat.d.ts +0 -1
- package/dist/script/chem/molfile/parseSGroup.d.ts +0 -42
- package/dist/script/chem/molfile/utils.d.ts +0 -66
- package/dist/script/chem/molfile/v2000.d.ts +0 -10
- package/dist/script/chem/molfile/v3000.d.ts +0 -10
- package/dist/script/chem/sdf.d.ts +0 -10
- package/dist/script/chem/smiles/cis_trans.d.ts +0 -25
- package/dist/script/chem/smiles/dfs.d.ts +0 -53
- package/dist/script/chem/smiles/index.d.ts +0 -5
- package/dist/script/chem/smiles/stereocenters.d.ts +0 -26
- package/dist/script/chem/struct/atom.d.ts +0 -66
- package/dist/script/chem/struct/atomlist.d.ts +0 -10
- package/dist/script/chem/struct/bond.d.ts +0 -72
- package/dist/script/chem/struct/fragment.d.ts +0 -50
- package/dist/script/chem/struct/index.d.ts +0 -137
- package/dist/script/chem/struct/rgroup.d.ts +0 -19
- package/dist/script/chem/struct/sgforest.d.ts +0 -42
- package/dist/script/chem/struct/sgroup.d.ts +0 -68
- package/dist/script/format/chemGraph/convertStruct.d.ts +0 -2
- package/dist/script/format/chemGraph/fromGraph/moleculeToStruct.d.ts +0 -10
- package/dist/script/format/chemGraph/fromGraph/rgroupToStruct.d.ts +0 -3
- package/dist/script/format/chemGraph/fromGraph/rxnToStruct.d.ts +0 -1
- package/dist/script/format/chemGraph/fromGraph/simpleObjectToStruct.d.ts +0 -1
- package/dist/script/format/chemGraph/index.d.ts +0 -13
- package/dist/script/format/chemGraph/toGraph/headerToGraph.d.ts +0 -1
- package/dist/script/format/chemGraph/toGraph/moleculeToGraph.d.ts +0 -4
- package/dist/script/format/chemGraph/toGraph/prepare.d.ts +0 -14
- package/dist/script/format/chemGraph/toGraph/rgroupToGraph.d.ts +0 -5
- package/dist/script/format/chemGraph/toGraph/rxnToGraph.d.ts +0 -10
- package/dist/script/format/graphValidator.d.ts +0 -1
- package/dist/script/format/schemes/moleculeSchema.d.ts +0 -596
- package/dist/script/format/schemes/rgroupSchema.d.ts +0 -60
- package/dist/script/format/schemes/rootSchema.d.ts +0 -102
- package/dist/script/format/schemes/rxnSchemas.d.ts +0 -58
- package/dist/script/format/schemes/simpleObjectSchema.d.ts +0 -45
- package/dist/script/format/utils.d.ts +0 -1
- package/dist/script/render/restruct/reenhancedflag.d.ts +0 -15
- package/dist/script/render/restruct/reobject.d.ts +0 -15
- package/dist/script/render/restruct/resimpleobject.d.ts +0 -23
- package/dist/script/ui/dialog/toolbox/atom.d.ts +0 -2
- package/dist/script/ui/dialog/toolbox/attach.d.ts +0 -2
- package/dist/script/ui/dialog/toolbox/automap.d.ts +0 -18
- package/dist/script/ui/dialog/toolbox/bond.d.ts +0 -2
- package/dist/script/ui/dialog/toolbox/enhanced-stereo.d.ts +0 -2
- package/dist/script/ui/dialog/toolbox/rgroup-logic.d.ts +0 -2
- package/dist/script/util/banner.d.ts +0 -0
- package/dist/script/util/box2abs.d.ts +0 -23
- package/dist/script/util/vec2.d.ts +0 -75
package/dist/script/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/****************************************************************************
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import { InfoResult,
|
|
16
|
+
import { InfoResult, StructService, StructServiceOptions, StructServiceProvider } from 'ketcher-core';
|
|
17
17
|
declare type Api = StructService & Promise<InfoResult>;
|
|
18
18
|
declare function createApi(structServiceProvider: StructServiceProvider, defaultOptions: StructServiceOptions): Api;
|
|
19
19
|
export default createApi;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import {
|
|
16
|
+
import { ServiceMode, StructServiceProvider } from 'ketcher-core';
|
|
17
17
|
import { Ketcher } from '../../ketcher';
|
|
18
18
|
import { ButtonsConfig } from './ButtonsConfig';
|
|
19
19
|
declare class KetcherBuilder {
|
|
@@ -14,12 +14,19 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
16
|
import { PipelineSubscription, Subscription } from 'subscription';
|
|
17
|
-
import { Struct } from '
|
|
18
|
-
import Render from '../render';
|
|
17
|
+
import { Struct } from 'ketcher-core';
|
|
19
18
|
import Action from './shared/action';
|
|
19
|
+
import Render from '../render';
|
|
20
|
+
interface Selection {
|
|
21
|
+
atoms?: Array<number>;
|
|
22
|
+
bonds?: Array<number>;
|
|
23
|
+
enhancedFlags?: Array<number>;
|
|
24
|
+
rxnPluses?: Array<number>;
|
|
25
|
+
rxnArrows?: Array<number>;
|
|
26
|
+
}
|
|
20
27
|
declare class Editor {
|
|
21
28
|
render: Render;
|
|
22
|
-
_selection:
|
|
29
|
+
_selection: Selection | null;
|
|
23
30
|
_tool: any;
|
|
24
31
|
historyStack: any;
|
|
25
32
|
historyPtr: any;
|
|
@@ -45,7 +52,7 @@ declare class Editor {
|
|
|
45
52
|
struct(value?: Struct): Struct;
|
|
46
53
|
options(value?: any): any;
|
|
47
54
|
zoom(value?: any): any;
|
|
48
|
-
selection(ci?: any):
|
|
55
|
+
selection(ci?: any): Selection | null;
|
|
49
56
|
hover(ci: any, newTool?: any): void;
|
|
50
57
|
highlight(ci: any, visible: any): boolean;
|
|
51
58
|
update(action: Action | true, ignoreHistory?: any): void;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export function
|
|
23
|
-
|
|
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
|
+
import { Bond, Vec2, Struct } from 'ketcher-core';
|
|
17
|
+
import Action from '../shared/action';
|
|
18
|
+
import ReStruct from '../../render/restruct';
|
|
19
|
+
export declare function fromBondAddition(restruct: ReStruct, bond: Bond, begin: any, end: any, pos?: Vec2, pos2?: Vec2): [Action, number, number, number];
|
|
20
|
+
export declare function fromBondsAttrs(restruct: ReStruct, ids: Array<number> | number, attrs: Bond, reset?: boolean): Action;
|
|
21
|
+
export declare function fromBondsMerge(restruct: ReStruct, mergeMap: Map<number, number>): Action;
|
|
22
|
+
export declare function fromBondStereoUpdate(restruct: ReStruct, bond: Bond, withReverse?: boolean): Action;
|
|
23
|
+
export declare function getStereoAtomsMap(struct: Struct, bonds: Array<Bond>, bond?: Bond): Map<any, any>;
|
|
24
|
+
export declare function bondChangingAction(restruct: ReStruct, itemID: number, bond: Bond, bondProps: any): Action;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function fromArrowAddition(restruct: any, pos: any): Action;
|
|
1
|
+
export function fromArrowAddition(restruct: any, pos: any, mode: any): Action;
|
|
2
2
|
export function fromArrowDeletion(restruct: any, id: any): Action;
|
|
3
3
|
export function fromPlusAddition(restruct: any, pos: any): Action;
|
|
4
4
|
export function fromPlusDeletion(restruct: any, id: any): Action;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Action from '../shared/action';
|
|
2
|
+
import Restruct from '../../render/restruct';
|
|
3
|
+
import { Vec2 } from 'ketcher-core';
|
|
4
|
+
export declare function fromTextCreation(restruct: Restruct, content: string, position: Vec2): Action;
|
|
5
|
+
export declare function fromTextUpdating(restruct: Restruct, id: number, content: string): Action;
|
|
6
|
+
export declare function fromTextDeletion(restruct: Restruct, id: number): Action;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export function atomGetAttr(restruct: any, aid: any, name: any): any;
|
|
2
2
|
export function atomGetDegree(restruct: any, aid: any): any;
|
|
3
|
-
export function atomGetNeighbors(restruct: any, aid: any): any;
|
|
4
3
|
export function atomGetSGroups(restruct: any, aid: any): any[];
|
|
5
4
|
export function atomGetPos(restruct: any, id: any): any;
|
|
6
5
|
export function findStereoAtoms(struct: any, aids: any): any;
|
|
@@ -13,4 +12,4 @@ export function atomForNewBond(restruct: any, id: any): {
|
|
|
13
12
|
pos: Vec2;
|
|
14
13
|
};
|
|
15
14
|
export function getRelSgroupsBySelection(restruct: any, selectedAtoms: any): any;
|
|
16
|
-
import Vec2 from "
|
|
15
|
+
import { Vec2 } from "ketcher-core/dist/domain/entities/Vec2";
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
16
|
import Restruct from '../../render/restruct';
|
|
17
|
-
import Struct from '
|
|
17
|
+
import { Struct } from 'ketcher-core';
|
|
18
18
|
import { BaseOperation } from './base';
|
|
19
19
|
export declare class CanvasLoad extends BaseOperation {
|
|
20
20
|
data: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BaseOperation } from './base';
|
|
1
2
|
/****************************************************************************
|
|
2
3
|
* Copyright 2021 EPAM Systems
|
|
3
4
|
*
|
|
@@ -14,12 +15,9 @@
|
|
|
14
15
|
* limitations under the License.
|
|
15
16
|
***************************************************************************/
|
|
16
17
|
import Restruct from '../../render/restruct';
|
|
17
|
-
import { BaseOperation } from './base';
|
|
18
18
|
export declare class FragmentStereoFlag extends BaseOperation {
|
|
19
|
-
frid:
|
|
20
|
-
|
|
21
|
-
invert_flag: any;
|
|
22
|
-
constructor(fragmentId: any, flag?: boolean);
|
|
19
|
+
frid: number;
|
|
20
|
+
constructor(fragmentId: number);
|
|
23
21
|
execute(restruct: Restruct): void;
|
|
24
22
|
invert(): FragmentStereoFlag;
|
|
25
23
|
}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import Restruct from '../../render/restruct';
|
|
17
16
|
import { BaseOperation } from './base';
|
|
17
|
+
import Restruct from '../../render/restruct';
|
|
18
18
|
export declare class LoopMove extends BaseOperation {
|
|
19
19
|
data: {
|
|
20
20
|
id: any;
|
|
@@ -18,6 +18,7 @@ export declare const OperationType: Readonly<{
|
|
|
18
18
|
ATOM_DELETE: string;
|
|
19
19
|
ATOM_ATTR: string;
|
|
20
20
|
ATOM_MOVE: string;
|
|
21
|
+
CALC_IMPLICIT_H: string;
|
|
21
22
|
BOND_ADD: string;
|
|
22
23
|
BOND_DELETE: string;
|
|
23
24
|
BOND_ATTR: string;
|
|
@@ -54,4 +55,8 @@ export declare const OperationType: Readonly<{
|
|
|
54
55
|
FRAGMENT_ADD_STEREO_ATOM: string;
|
|
55
56
|
FRAGMENT_DELETE_STEREO_ATOM: string;
|
|
56
57
|
ENHANCED_FLAG_MOVE: string;
|
|
58
|
+
TEXT_CREATE: string;
|
|
59
|
+
TEXT_UPDATE: string;
|
|
60
|
+
TEXT_DELETE: string;
|
|
61
|
+
TEXT_MOVE: string;
|
|
57
62
|
}>;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 Restruct from '../../../render/restruct';
|
|
17
|
+
import { Vec2 } from 'ketcher-core';
|
|
18
|
+
import { BaseOperation } from '../base';
|
|
19
|
+
interface TextCreateData {
|
|
20
|
+
id?: number;
|
|
21
|
+
content: string;
|
|
22
|
+
position: Vec2;
|
|
23
|
+
}
|
|
24
|
+
export declare class TextCreate extends BaseOperation {
|
|
25
|
+
data: TextCreateData;
|
|
26
|
+
constructor(content: string, position: Vec2, id?: number);
|
|
27
|
+
execute(restruct: Restruct): void;
|
|
28
|
+
invert(): BaseOperation;
|
|
29
|
+
}
|
|
30
|
+
interface TextDeleteData {
|
|
31
|
+
id: number;
|
|
32
|
+
content?: string;
|
|
33
|
+
position?: Vec2;
|
|
34
|
+
}
|
|
35
|
+
export declare class TextDelete extends BaseOperation {
|
|
36
|
+
data: TextDeleteData;
|
|
37
|
+
constructor(id: number);
|
|
38
|
+
execute(restruct: Restruct): void;
|
|
39
|
+
invert(): BaseOperation;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -13,20 +13,17 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
pos?: Array<Vec2>;
|
|
23
|
-
});
|
|
24
|
-
clone(): SimpleObject;
|
|
25
|
-
center(): Vec2;
|
|
16
|
+
import { BaseOperation } from '../base';
|
|
17
|
+
import Restruct from '../../../render/restruct';
|
|
18
|
+
interface TextMoveData {
|
|
19
|
+
id: any;
|
|
20
|
+
d: any;
|
|
21
|
+
noinvalidate: boolean;
|
|
26
22
|
}
|
|
27
|
-
declare
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
export declare class TextMove extends BaseOperation {
|
|
24
|
+
data: TextMoveData;
|
|
25
|
+
constructor(id: any, d: any, noinvalidate: boolean);
|
|
26
|
+
execute(restruct: Restruct): void;
|
|
27
|
+
invert(): BaseOperation;
|
|
31
28
|
}
|
|
32
|
-
export {
|
|
29
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/****************************************************************************
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -13,13 +13,17 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
find(predicate: (key: number, value: TValue) => boolean): number | null;
|
|
23
|
-
filter(predicate: (key: number, value: TValue) => boolean): Pool<TValue>;
|
|
16
|
+
import { BaseOperation } from '../base';
|
|
17
|
+
import Restruct from '../../../render/restruct';
|
|
18
|
+
interface TextUpdateData {
|
|
19
|
+
id: number;
|
|
20
|
+
content: string;
|
|
21
|
+
previousContent?: string;
|
|
24
22
|
}
|
|
25
|
-
export
|
|
23
|
+
export declare class TextUpdate extends BaseOperation {
|
|
24
|
+
data: TextUpdateData;
|
|
25
|
+
constructor(id: number, content: string);
|
|
26
|
+
execute(restruct: Restruct): void;
|
|
27
|
+
invert(): TextUpdate;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import Restruct from '../../../render/restruct';
|
|
17
16
|
import { BaseOperation } from '../base';
|
|
17
|
+
import Restruct from '../../../render/restruct';
|
|
18
18
|
declare type Data = {
|
|
19
19
|
aid?: any;
|
|
20
20
|
attribute?: any;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import Restruct from '../../../render/restruct';
|
|
17
16
|
import { BaseOperation } from '../base';
|
|
17
|
+
import Restruct from '../../../render/restruct';
|
|
18
18
|
export declare class AtomMove extends BaseOperation {
|
|
19
19
|
data: {
|
|
20
20
|
aid: any;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import Restruct from '../../render/restruct';
|
|
17
16
|
import { OperationType } from './OperationType';
|
|
17
|
+
import Restruct from '../../render/restruct';
|
|
18
18
|
declare type ValueOf<TObject extends object> = Readonly<TObject[keyof TObject]>;
|
|
19
19
|
declare type OperationType = ValueOf<typeof OperationType>;
|
|
20
20
|
declare class BaseOperation {
|
|
@@ -30,7 +30,7 @@ declare class BaseOperation {
|
|
|
30
30
|
protected static invalidateLoop(restruct: Restruct, bondId: number): void;
|
|
31
31
|
protected static invalidateBond(restruct: Restruct, bondId: number): void;
|
|
32
32
|
protected static invalidateItem(restruct: Restruct, map: any, id: number, level?: any): void;
|
|
33
|
-
protected static invalidateEnhancedFlag(restruct: Restruct, fragmentId:
|
|
33
|
+
protected static invalidateEnhancedFlag(restruct: Restruct, fragmentId: number): void;
|
|
34
34
|
}
|
|
35
35
|
export { BaseOperation };
|
|
36
36
|
export default BaseOperation;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import Restruct from '../../../render/restruct';
|
|
17
16
|
import { BaseOperation } from '../base';
|
|
17
|
+
import Restruct from '../../../render/restruct';
|
|
18
18
|
declare type Data = {
|
|
19
19
|
bid: any;
|
|
20
20
|
attribute: any;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import Restruct from '../../../render/restruct';
|
|
17
16
|
import { BaseOperation } from '../base';
|
|
17
|
+
import Restruct from '../../../render/restruct';
|
|
18
18
|
export declare class BondMove extends BaseOperation {
|
|
19
19
|
data: {
|
|
20
20
|
bid: any;
|
|
@@ -1,3 +1,18 @@
|
|
|
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
|
+
***************************************************************************/
|
|
1
16
|
import Restruct from '../../../render/restruct';
|
|
2
17
|
import { BaseOperation } from '../base';
|
|
3
18
|
declare type Data = {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export default Pile;
|
|
2
1
|
/****************************************************************************
|
|
3
|
-
* Copyright
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
4
3
|
*
|
|
5
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -14,12 +13,11 @@ export default Pile;
|
|
|
14
13
|
* See the License for the specific language governing permissions and
|
|
15
14
|
* limitations under the License.
|
|
16
15
|
***************************************************************************/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
union(setB: any): Pile;
|
|
16
|
+
import { BaseOperation } from './base';
|
|
17
|
+
import Restruct from '../../render/restruct';
|
|
18
|
+
export declare class CalcImplicitH extends BaseOperation {
|
|
19
|
+
atomIds: Array<number>;
|
|
20
|
+
constructor(aids: Array<number>);
|
|
21
|
+
execute(restruct: Restruct): void;
|
|
22
|
+
invert(): CalcImplicitH;
|
|
25
23
|
}
|
|
@@ -2,7 +2,7 @@ import Restruct from '../../render/restruct';
|
|
|
2
2
|
import { BaseOperation } from './base';
|
|
3
3
|
declare class FragmentAdd extends BaseOperation {
|
|
4
4
|
frid: any;
|
|
5
|
-
constructor(fragmentId
|
|
5
|
+
constructor(fragmentId?: any);
|
|
6
6
|
execute(restruct: Restruct): void;
|
|
7
7
|
invert(): FragmentDelete;
|
|
8
8
|
}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import Restruct from '../../render/restruct';
|
|
17
16
|
import { BaseOperation } from './base';
|
|
17
|
+
import Restruct from '../../render/restruct';
|
|
18
18
|
declare type Data = {
|
|
19
19
|
frid: any;
|
|
20
20
|
aid: any;
|
|
@@ -22,9 +22,11 @@ export * from './ifThen';
|
|
|
22
22
|
export * from './fragment';
|
|
23
23
|
export * from './fragmentStereoAtom';
|
|
24
24
|
export * from './FragmentStereoFlag';
|
|
25
|
+
export * from './calcimplicitH';
|
|
25
26
|
export * from './LoopMove';
|
|
26
27
|
export * from './OperationType';
|
|
27
28
|
export * from './rgroup';
|
|
28
29
|
export * from './rxn';
|
|
29
30
|
export * from './simpleObject';
|
|
30
31
|
export * from './sgroup';
|
|
32
|
+
export * from './Text';
|
|
@@ -1,12 +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
|
+
import { RxnArrowMode } from 'ketcher-core';
|
|
1
17
|
import Restruct from '../../../render/restruct';
|
|
2
18
|
import { BaseOperation } from '../base';
|
|
3
19
|
declare type Data = {
|
|
4
20
|
pos: any;
|
|
5
21
|
arid: any;
|
|
22
|
+
mode: RxnArrowMode;
|
|
6
23
|
};
|
|
7
24
|
declare class RxnArrowAdd extends BaseOperation {
|
|
8
25
|
data: Data;
|
|
9
|
-
constructor(pos?:
|
|
26
|
+
constructor(mode: RxnArrowMode, pos: any, arid?: null);
|
|
10
27
|
execute(restruct: Restruct): void;
|
|
11
28
|
invert(): RxnArrowDelete;
|
|
12
29
|
}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import Restruct from '../../../../render/restruct';
|
|
17
16
|
import { BaseOperation } from '../../base';
|
|
17
|
+
import Restruct from '../../../../render/restruct';
|
|
18
18
|
export declare class RxnPlusMove extends BaseOperation {
|
|
19
19
|
data: {
|
|
20
20
|
id: any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Restruct from '../../../render/restruct';
|
|
1
2
|
/****************************************************************************
|
|
2
3
|
* Copyright 2021 EPAM Systems
|
|
3
4
|
*
|
|
@@ -14,7 +15,6 @@
|
|
|
14
15
|
* limitations under the License.
|
|
15
16
|
***************************************************************************/
|
|
16
17
|
import { BaseOperation } from '../base';
|
|
17
|
-
import Restruct from '../../../render/restruct';
|
|
18
18
|
declare type Data = {
|
|
19
19
|
sgid: any;
|
|
20
20
|
type?: any;
|
|
@@ -21,8 +21,6 @@ declare type Data = {
|
|
|
21
21
|
children?: any;
|
|
22
22
|
};
|
|
23
23
|
declare class SGroupAddToHierarchy extends BaseOperation {
|
|
24
|
-
private readonly parent?;
|
|
25
|
-
private readonly children?;
|
|
26
24
|
data: Data;
|
|
27
25
|
constructor(sgroupId?: any, parent?: any, children?: any);
|
|
28
26
|
execute(restruct: Restruct): void;
|
|
@@ -13,24 +13,22 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import Vec2 from '
|
|
16
|
+
import { SimpleObjectMode, Vec2 } from 'ketcher-core';
|
|
17
17
|
import Base from './base';
|
|
18
|
-
import { SimpleObjectMode } from 'src/script/chem/struct';
|
|
19
18
|
interface SimpleObjectAddData {
|
|
20
|
-
id?:
|
|
19
|
+
id?: number;
|
|
21
20
|
pos: Array<Vec2>;
|
|
22
21
|
mode: SimpleObjectMode;
|
|
23
22
|
toCircle: boolean;
|
|
24
23
|
}
|
|
25
24
|
export declare class SimpleObjectAdd extends Base {
|
|
26
25
|
data: SimpleObjectAddData;
|
|
27
|
-
|
|
28
|
-
constructor(pos?: Array<Vec2>, mode?: SimpleObjectMode, toCircle?: boolean);
|
|
26
|
+
constructor(pos?: Array<Vec2>, mode?: SimpleObjectMode, toCircle?: boolean, id?: number);
|
|
29
27
|
execute(restruct: any): void;
|
|
30
28
|
invert(): Base;
|
|
31
29
|
}
|
|
32
30
|
interface SimpleObjectDeleteData {
|
|
33
|
-
id:
|
|
31
|
+
id: number;
|
|
34
32
|
pos?: Array<Vec2>;
|
|
35
33
|
mode?: SimpleObjectMode;
|
|
36
34
|
toCircle?: boolean;
|
|
@@ -38,23 +36,23 @@ interface SimpleObjectDeleteData {
|
|
|
38
36
|
export declare class SimpleObjectDelete extends Base {
|
|
39
37
|
data: SimpleObjectDeleteData;
|
|
40
38
|
performed: boolean;
|
|
41
|
-
constructor(id:
|
|
39
|
+
constructor(id: number);
|
|
42
40
|
execute(restruct: any): void;
|
|
43
41
|
invert(): Base;
|
|
44
42
|
}
|
|
45
43
|
interface SimpleObjectMoveData {
|
|
46
|
-
id:
|
|
44
|
+
id: number;
|
|
47
45
|
d: any;
|
|
48
46
|
noinvalidate: boolean;
|
|
49
47
|
}
|
|
50
48
|
export declare class SimpleObjectMove extends Base {
|
|
51
49
|
data: SimpleObjectMoveData;
|
|
52
|
-
constructor(id:
|
|
50
|
+
constructor(id: number, d: any, noinvalidate: boolean);
|
|
53
51
|
execute(restruct: any): void;
|
|
54
52
|
invert(): Base;
|
|
55
53
|
}
|
|
56
54
|
interface SimpleObjectResizeData {
|
|
57
|
-
id:
|
|
55
|
+
id: number;
|
|
58
56
|
d: any;
|
|
59
57
|
current: Vec2;
|
|
60
58
|
anchor: Vec2;
|
|
@@ -63,7 +61,7 @@ interface SimpleObjectResizeData {
|
|
|
63
61
|
}
|
|
64
62
|
export declare class SimpleObjectResize extends Base {
|
|
65
63
|
data: SimpleObjectResizeData;
|
|
66
|
-
constructor(id:
|
|
64
|
+
constructor(id: number, d: any, current: Vec2, anchor: any, noinvalidate: boolean, toCircle: boolean);
|
|
67
65
|
execute(restruct: any): void;
|
|
68
66
|
invert(): Base;
|
|
69
67
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { BaseOperation } from '../operations/base';
|
|
1
2
|
/****************************************************************************
|
|
2
|
-
* Copyright
|
|
3
|
+
* Copyright 2021 EPAM Systems
|
|
3
4
|
*
|
|
4
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -14,7 +15,6 @@
|
|
|
14
15
|
* limitations under the License.
|
|
15
16
|
***************************************************************************/
|
|
16
17
|
import Restruct from '../../render/restruct';
|
|
17
|
-
import { BaseOperation } from '../operations/base';
|
|
18
18
|
declare class Action {
|
|
19
19
|
operations: BaseOperation[];
|
|
20
20
|
constructor(operations?: never[]);
|
|
@@ -13,9 +13,9 @@ declare function calcNewAtomPos(pos0: any, pos1: any, ctrlKey: any): Vec2;
|
|
|
13
13
|
declare function degrees(angle: any): number;
|
|
14
14
|
declare function setFracAngle(angle: any): void;
|
|
15
15
|
declare function mergeBondsParams(struct1: any, bond1: any, struct2: any, bond2: any): {
|
|
16
|
-
merged:
|
|
16
|
+
merged: boolean;
|
|
17
17
|
angle: number;
|
|
18
18
|
scale: number;
|
|
19
19
|
cross: boolean;
|
|
20
20
|
};
|
|
21
|
-
import Vec2 from "
|
|
21
|
+
import { Vec2 } from "ketcher-core/dist/domain/entities/Vec2";
|