ketcher-react 2.11.0-rc.4 → 2.12.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Buttons/IconButton/IconButton.d.ts +19 -0
- package/dist/{icons → components/Buttons/IconButton}/index.d.ts +1 -1
- package/dist/components/Buttons/IconButton/styles.d.ts +24 -0
- package/dist/{script/ui/views/toolbars/TopToolbar/IconButton.d.ts → components/Buttons/IconButton/types.d.ts} +10 -6
- package/dist/components/Buttons/index.d.ts +16 -0
- package/dist/components/Icon/Icon.d.ts +19 -0
- package/dist/components/Icon/index.d.ts +19 -0
- package/dist/{script/ui/views/toolbars/LeftToolbar/Transform/Transform.d.ts → components/Icon/types.d.ts} +9 -8
- package/dist/components/Icon/utils/getIconByName.d.ts +17 -0
- package/dist/components/Icon/utils/getIconName.d.ts +17 -0
- package/dist/components/Icon/utils/iconNameToIcon.d.ts +209 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/components/styles/consts.d.ts +46 -0
- package/dist/components/styles/index.d.ts +16 -0
- package/dist/constants.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11755 -7063
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +11827 -7142
- package/dist/index.modern.js.map +1 -1
- package/dist/script/editor/Editor.d.ts +15 -6
- package/dist/script/editor/shared/closest.d.ts +3 -3
- package/dist/script/editor/shared/utils.d.ts +0 -36
- package/dist/script/editor/tool/Tool.d.ts +21 -0
- package/dist/script/editor/tool/apoint.d.ts +3 -3
- package/dist/script/editor/tool/atom.d.ts +5 -5
- package/dist/script/editor/tool/attach.d.ts +4 -4
- package/dist/script/editor/tool/bond.d.ts +6 -8
- package/dist/script/editor/tool/chain.d.ts +4 -4
- package/dist/script/editor/tool/charge.d.ts +4 -4
- package/dist/script/editor/tool/enhanced-stereo.d.ts +4 -3
- package/dist/script/editor/tool/eraser.d.ts +5 -6
- package/dist/script/editor/tool/hand.d.ts +5 -6
- package/dist/script/editor/tool/helper/deleteFunctionalGroups.d.ts +2 -0
- package/dist/script/editor/tool/helper/filterNotInCollapsedSGroup.d.ts +13 -0
- package/dist/script/editor/tool/index.d.ts +17 -47
- package/dist/script/editor/tool/paste.d.ts +8 -11
- package/dist/script/editor/tool/reactionarrow.d.ts +12 -8
- package/dist/script/editor/tool/reactionmap.d.ts +5 -6
- package/dist/script/editor/tool/reactionplus.d.ts +4 -4
- package/dist/script/editor/tool/reactionunmap.d.ts +3 -3
- package/dist/script/editor/tool/rgroupatom.d.ts +3 -3
- package/dist/script/editor/tool/rgroupfragment.d.ts +3 -3
- package/dist/script/editor/tool/rotate-controller.d.ts +9 -2
- package/dist/script/editor/tool/rotate-controller.utils.d.ts +3 -0
- package/dist/script/editor/tool/rotate.d.ts +7 -6
- package/dist/script/editor/tool/select.d.ts +11 -10
- package/dist/script/editor/tool/sgroup.d.ts +4 -4
- package/dist/script/editor/tool/simpleobject.d.ts +7 -5
- package/dist/script/editor/tool/template.d.ts +19 -21
- package/dist/script/editor/tool/text.d.ts +4 -3
- package/dist/script/ui/action/index.d.ts +0 -4
- package/dist/script/ui/action/tools.d.ts +0 -4
- package/dist/script/ui/component/cliparea/cliparea.d.ts +1 -0
- package/dist/script/ui/component/view/saveButton.types.d.ts +2 -0
- package/dist/script/ui/component/view/saveButton.utils.d.ts +2 -0
- package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.constants.d.ts +4 -0
- package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.container.d.ts +17 -0
- package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.container.test.d.ts +1 -0
- package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.d.ts +22 -0
- package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.test.d.ts +1 -0
- package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.test.utils.d.ts +8 -0
- package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.types.d.ts +37 -0
- package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.utils.d.ts +23 -0
- package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.utils.test.d.ts +16 -0
- package/dist/script/ui/dialog/AbbreviationLookup/hooks/useOptions.d.ts +17 -0
- package/dist/script/ui/dialog/AbbreviationLookup/hooks/useOptions.test.d.ts +1 -0
- package/dist/script/ui/dialog/AbbreviationLookup/index.d.ts +17 -0
- package/dist/script/ui/state/abbreviationLookup/abbreviationLookup.types.d.ts +19 -0
- package/dist/script/ui/state/abbreviationLookup/index.d.ts +30 -0
- package/dist/script/ui/state/abbreviationLookup/index.test.d.ts +1 -0
- package/dist/script/ui/{views/toolbars/LeftToolbar/Transform → state/abbreviationLookup/selectors}/index.d.ts +1 -1
- package/dist/script/ui/state/abbreviationLookup/selectors/selectors.d.ts +17 -0
- package/dist/script/ui/state/common/common.types.d.ts +21 -0
- package/dist/script/ui/state/common/index.d.ts +26 -0
- package/dist/script/ui/state/common/index.test.d.ts +1 -0
- package/dist/script/ui/state/common/selectors/index.d.ts +16 -0
- package/dist/script/ui/state/common/selectors/selectors.d.ts +19 -0
- package/dist/script/ui/state/constants.d.ts +21 -6
- package/dist/script/ui/state/editor/index.d.ts +1 -0
- package/dist/script/ui/state/floatingTools/index.d.ts +16 -0
- package/dist/script/ui/state/floatingTools/selectors/index.d.ts +5 -0
- package/dist/script/ui/state/mouse.d.ts +16 -0
- package/dist/script/ui/state/moveSelectedItems.d.ts +5 -0
- package/dist/script/ui/state/templates/index.d.ts +38 -23
- package/dist/script/ui/state/templates/selectors/index.d.ts +16 -0
- package/dist/script/ui/utils/index.d.ts +0 -1
- package/dist/script/ui/views/components/ContextMenu/ContextMenuTrigger.utils.d.ts +7 -0
- package/dist/script/ui/views/components/StructEditor/StructEditor.d.ts +1 -0
- package/dist/script/ui/views/modal/components/Text/TextButton/TextButton.d.ts +2 -1
- package/dist/script/ui/views/modal/components/document/Open/components/FileDrop.d.ts +2 -1
- package/dist/script/ui/views/modal/components/document/Save/Save.d.ts +1 -1
- package/dist/script/ui/views/toolbars/FloatingTools/FloatingTools.container.d.ts +4 -0
- package/dist/script/ui/views/toolbars/FloatingTools/FloatingTools.d.ts +20 -0
- package/dist/script/ui/views/toolbars/FloatingTools/index.d.ts +1 -0
- package/dist/script/ui/views/toolbars/LeftToolbar/leftToolbarOptions.d.ts +1 -2
- package/dist/script/ui/views/toolbars/ToolbarGroupItem/ActionButton/ActionButton.d.ts +2 -1
- package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarGroupItem.d.ts +1 -1
- package/dist/script/ui/views/toolbars/TopToolbar/Divider.d.ts +1 -0
- package/dist/script/ui/views/toolbars/TopToolbar/FileControls.d.ts +0 -15
- package/dist/script/ui/views/toolbars/TopToolbar/TopToolbarIconButton.d.ts +18 -0
- package/dist/script/ui/views/toolbars/index.d.ts +1 -0
- package/dist/script/ui/views/toolbars/toolbar.types.d.ts +4 -3
- package/package.json +6 -3
- package/dist/script/editor/tool/helper/getMergeItems.d.ts +0 -2
- package/dist/script/ui/component/view/icon.d.ts +0 -5
- package/dist/script/ui/utils/renderStruct.d.ts +0 -9
|
@@ -13,12 +13,14 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
+
import { SimpleObjectMode } from 'ketcher-core';
|
|
16
17
|
import Editor from '../Editor';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
import { Tool } from './Tool';
|
|
19
|
+
declare class SimpleObjectTool implements Tool {
|
|
20
|
+
private readonly mode;
|
|
21
|
+
private readonly editor;
|
|
22
|
+
private dragCtx;
|
|
23
|
+
constructor(editor: Editor, mode: SimpleObjectMode);
|
|
22
24
|
mousedown(event: any): void;
|
|
23
25
|
mousemove(event: any): void;
|
|
24
26
|
mouseup(event: any): boolean;
|
|
@@ -13,31 +13,29 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import { FunctionalGroup, Struct } from 'ketcher-core';
|
|
17
16
|
import Editor from '../Editor';
|
|
18
|
-
|
|
19
|
-
declare class TemplateTool {
|
|
20
|
-
editor
|
|
21
|
-
mode
|
|
22
|
-
template
|
|
23
|
-
findItems
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
event: Event | undefined;
|
|
17
|
+
import { Tool } from './Tool';
|
|
18
|
+
declare class TemplateTool implements Tool {
|
|
19
|
+
private readonly editor;
|
|
20
|
+
private readonly mode;
|
|
21
|
+
private readonly template;
|
|
22
|
+
private readonly findItems;
|
|
23
|
+
private dragCtx;
|
|
24
|
+
private targetGroupsIds;
|
|
25
|
+
private readonly isSaltOrSolvent;
|
|
26
|
+
private event;
|
|
29
27
|
constructor(editor: Editor, tmpl: any);
|
|
30
|
-
get struct()
|
|
31
|
-
get functionalGroups()
|
|
32
|
-
get isModeFunctionalGroup()
|
|
33
|
-
get closestItem()
|
|
34
|
-
get isNeedToShowRemoveAbbreviationPopup()
|
|
35
|
-
findKeyOfRelatedGroupId
|
|
36
|
-
showRemoveAbbreviationPopup
|
|
28
|
+
private get struct();
|
|
29
|
+
private get functionalGroups();
|
|
30
|
+
private get isModeFunctionalGroup();
|
|
31
|
+
private get closestItem();
|
|
32
|
+
private get isNeedToShowRemoveAbbreviationPopup();
|
|
33
|
+
private findKeyOfRelatedGroupId;
|
|
34
|
+
private showRemoveAbbreviationPopup;
|
|
37
35
|
mousedown(event: MouseEvent): Promise<void>;
|
|
38
36
|
mousemove(event: any): boolean;
|
|
39
|
-
mouseup(event
|
|
40
|
-
cancel(
|
|
37
|
+
mouseup(event?: any): boolean;
|
|
38
|
+
cancel(): void;
|
|
41
39
|
mouseleave(e: any): void;
|
|
42
40
|
}
|
|
43
41
|
export default TemplateTool;
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
import { Tool } from './Tool';
|
|
17
|
+
declare class TextTool implements Tool {
|
|
18
|
+
private readonly editor;
|
|
19
|
+
private dragCtx;
|
|
19
20
|
constructor(editor: any);
|
|
20
21
|
mousedown(event: any): void;
|
|
21
22
|
mousemove(event: any): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const ABBREVIATION_LOOKUP_TEST_ID = "AbbreviationLookup";
|
|
2
|
+
export declare const NO_MATCHING_RESULTS_LABEL = "No matching results";
|
|
3
|
+
export declare const START_TYPING_NOTIFICATION_LABEL = "Start typing atom or template structure name";
|
|
4
|
+
export declare const MIN_LOOKUP_VALUE_LENGTH_FOR_HIGHLIGHT = 2;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
/// <reference types="react" />
|
|
17
|
+
export declare const AbbreviationLookupContainer: () => JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
/// <reference types="react" />
|
|
17
|
+
import { AbbreviationOption } from './AbbreviationLookup.types';
|
|
18
|
+
interface Props {
|
|
19
|
+
options: AbbreviationOption[];
|
|
20
|
+
}
|
|
21
|
+
export declare const AbbreviationLookup: ({ options }: Props) => JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AbbreviationGenericOption, AbbreviationOption, AbbreviationType } from './AbbreviationLookup.types';
|
|
3
|
+
export declare const createGenericOption: (name: string, abbreviation?: string | undefined, type?: AbbreviationType) => AbbreviationGenericOption;
|
|
4
|
+
export declare const createOption: (name: string, abbreviation?: string | undefined, type?: AbbreviationType) => AbbreviationOption;
|
|
5
|
+
export declare const CLIP_AREA_TEST_ID = "cliparea";
|
|
6
|
+
export declare const KetcherWrapper: ({ children }: {
|
|
7
|
+
children: any;
|
|
8
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { Template } from '../template/TemplateTable';
|
|
17
|
+
import { Element } from 'ketcher-core';
|
|
18
|
+
export declare enum AbbreviationType {
|
|
19
|
+
Template = "Template",
|
|
20
|
+
Element = "Element"
|
|
21
|
+
}
|
|
22
|
+
export interface AbbreviationGenericOption {
|
|
23
|
+
type: AbbreviationType;
|
|
24
|
+
loweredName: string;
|
|
25
|
+
loweredAbbreviation?: string;
|
|
26
|
+
label: string;
|
|
27
|
+
loweredLabel: string;
|
|
28
|
+
}
|
|
29
|
+
export interface AbbreviationTemplateOption extends AbbreviationGenericOption {
|
|
30
|
+
type: AbbreviationType.Template;
|
|
31
|
+
template: Template;
|
|
32
|
+
}
|
|
33
|
+
export interface AbbreviationElementOption extends AbbreviationGenericOption {
|
|
34
|
+
type: AbbreviationType.Element;
|
|
35
|
+
element: Element;
|
|
36
|
+
}
|
|
37
|
+
export declare type AbbreviationOption = AbbreviationTemplateOption | AbbreviationElementOption;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
/// <reference types="react" />
|
|
17
|
+
import { AbbreviationGenericOption, AbbreviationOption } from './AbbreviationLookup.types';
|
|
18
|
+
import { FilterOptionsState } from '@mui/material';
|
|
19
|
+
export declare const getStringsSimilarity: (loweredText?: string | undefined, loweredSubString?: string | undefined) => number;
|
|
20
|
+
export declare const highlightOptionLabel: (option: AbbreviationGenericOption, initialLoweredValue: string) => string | JSX.Element;
|
|
21
|
+
export declare const getOptionLabel: (option: AbbreviationGenericOption) => string;
|
|
22
|
+
export declare const getSimilarity: (option: AbbreviationGenericOption, loweredLookupValue: string) => number;
|
|
23
|
+
export declare const filterOptions: (options: AbbreviationOption[], state: FilterOptionsState<AbbreviationOption>) => AbbreviationOption[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { AbbreviationOption } from '../AbbreviationLookup.types';
|
|
17
|
+
export declare const useOptions: () => AbbreviationOption[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
export * from './AbbreviationLookup';
|
|
17
|
+
export * from './AbbreviationLookup.container';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
export interface AbbreviationLookupState {
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
lookupValue?: string;
|
|
19
|
+
}
|
|
@@ -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 { AbbreviationLookupState } from './abbreviationLookup.types';
|
|
17
|
+
export declare const initAbbreviationLookup: (key: string) => {
|
|
18
|
+
type: "ABBR_LOOKUP_INIT";
|
|
19
|
+
data: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const showAbbreviationLookup: (key: string) => {
|
|
22
|
+
type: "ABBR_LOOKUP_SHOW";
|
|
23
|
+
data: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const closeAbbreviationLookup: () => {
|
|
26
|
+
type: "ABBR_LOOKUP_CLOSE";
|
|
27
|
+
};
|
|
28
|
+
declare type AbbrLookupAction = ReturnType<typeof initAbbreviationLookup> | ReturnType<typeof showAbbreviationLookup> | ReturnType<typeof closeAbbreviationLookup>;
|
|
29
|
+
declare function abbreviationLookupReducer(state: AbbreviationLookupState | undefined, action: AbbrLookupAction): AbbreviationLookupState;
|
|
30
|
+
export default abbreviationLookupReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
export declare const selectIsAbbreviationLookupOpen: (state: any) => boolean;
|
|
17
|
+
export declare const selectAbbreviationLookupValue: (state: any) => string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
export interface CommonState {
|
|
17
|
+
cursorPosition: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
import { CommonState } from './common.types';
|
|
17
|
+
export declare const updateCursorPosition: (x: number, y: number) => {
|
|
18
|
+
type: "COMMON_UPDATE_CURSOR_POSITION";
|
|
19
|
+
data: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
declare type CommonAction = ReturnType<typeof updateCursorPosition>;
|
|
25
|
+
declare function commonReducer(state: CommonState | undefined, action: CommonAction): CommonState;
|
|
26
|
+
export default commonReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
export * from './selectors';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
export declare const selectCursorPosition: (state: any) => {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
export declare const supportedSGroupTypes: {
|
|
17
|
+
readonly MUL: "MUL";
|
|
18
|
+
readonly SRU: "SRU";
|
|
19
|
+
readonly SUP: "SUP";
|
|
20
|
+
readonly DAT: "DAT";
|
|
21
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Reducer } from 'react';
|
|
2
|
+
export interface FloatingToolsState {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
rotateHandlePosition: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare type FloatingToolsPayload = Partial<FloatingToolsState>;
|
|
10
|
+
export interface FloatingToolsAction {
|
|
11
|
+
type: 'UPDATE_FLOATING_TOOLS';
|
|
12
|
+
payload: Partial<FloatingToolsState>;
|
|
13
|
+
}
|
|
14
|
+
export declare const updateFloatingTools: (payload: FloatingToolsPayload) => FloatingToolsAction;
|
|
15
|
+
declare const floatingToolsReducer: Reducer<FloatingToolsState, FloatingToolsAction>;
|
|
16
|
+
export default floatingToolsReducer;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
* Copyright 2021 EPAM Systems
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
***************************************************************************/
|
|
16
|
+
export declare function initMouseListener(element: any): (dispatch: any) => void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Editor } from 'ketcher-core';
|
|
2
|
+
declare type ArrowKey = 'ArrowUp' | 'ArrowDown' | 'ArrowRight' | 'ArrowLeft';
|
|
3
|
+
export declare function isArrowKey(key: string): key is ArrowKey;
|
|
4
|
+
export declare function moveSelectedItems(editor: Editor, key: ArrowKey, isShiftPressed: boolean): void;
|
|
5
|
+
export {};
|