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.
Files changed (109) hide show
  1. package/dist/components/Buttons/IconButton/IconButton.d.ts +19 -0
  2. package/dist/{icons → components/Buttons/IconButton}/index.d.ts +1 -1
  3. package/dist/components/Buttons/IconButton/styles.d.ts +24 -0
  4. package/dist/{script/ui/views/toolbars/TopToolbar/IconButton.d.ts → components/Buttons/IconButton/types.d.ts} +10 -6
  5. package/dist/components/Buttons/index.d.ts +16 -0
  6. package/dist/components/Icon/Icon.d.ts +19 -0
  7. package/dist/components/Icon/index.d.ts +19 -0
  8. package/dist/{script/ui/views/toolbars/LeftToolbar/Transform/Transform.d.ts → components/Icon/types.d.ts} +9 -8
  9. package/dist/components/Icon/utils/getIconByName.d.ts +17 -0
  10. package/dist/components/Icon/utils/getIconName.d.ts +17 -0
  11. package/dist/components/Icon/utils/iconNameToIcon.d.ts +209 -0
  12. package/dist/components/index.d.ts +17 -0
  13. package/dist/components/styles/consts.d.ts +46 -0
  14. package/dist/components/styles/index.d.ts +16 -0
  15. package/dist/constants.d.ts +2 -0
  16. package/dist/index.css +1 -1
  17. package/dist/index.css.map +1 -1
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +11755 -7063
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.modern.js +11827 -7142
  22. package/dist/index.modern.js.map +1 -1
  23. package/dist/script/editor/Editor.d.ts +15 -6
  24. package/dist/script/editor/shared/closest.d.ts +3 -3
  25. package/dist/script/editor/shared/utils.d.ts +0 -36
  26. package/dist/script/editor/tool/Tool.d.ts +21 -0
  27. package/dist/script/editor/tool/apoint.d.ts +3 -3
  28. package/dist/script/editor/tool/atom.d.ts +5 -5
  29. package/dist/script/editor/tool/attach.d.ts +4 -4
  30. package/dist/script/editor/tool/bond.d.ts +6 -8
  31. package/dist/script/editor/tool/chain.d.ts +4 -4
  32. package/dist/script/editor/tool/charge.d.ts +4 -4
  33. package/dist/script/editor/tool/enhanced-stereo.d.ts +4 -3
  34. package/dist/script/editor/tool/eraser.d.ts +5 -6
  35. package/dist/script/editor/tool/hand.d.ts +5 -6
  36. package/dist/script/editor/tool/helper/deleteFunctionalGroups.d.ts +2 -0
  37. package/dist/script/editor/tool/helper/filterNotInCollapsedSGroup.d.ts +13 -0
  38. package/dist/script/editor/tool/index.d.ts +17 -47
  39. package/dist/script/editor/tool/paste.d.ts +8 -11
  40. package/dist/script/editor/tool/reactionarrow.d.ts +12 -8
  41. package/dist/script/editor/tool/reactionmap.d.ts +5 -6
  42. package/dist/script/editor/tool/reactionplus.d.ts +4 -4
  43. package/dist/script/editor/tool/reactionunmap.d.ts +3 -3
  44. package/dist/script/editor/tool/rgroupatom.d.ts +3 -3
  45. package/dist/script/editor/tool/rgroupfragment.d.ts +3 -3
  46. package/dist/script/editor/tool/rotate-controller.d.ts +9 -2
  47. package/dist/script/editor/tool/rotate-controller.utils.d.ts +3 -0
  48. package/dist/script/editor/tool/rotate.d.ts +7 -6
  49. package/dist/script/editor/tool/select.d.ts +11 -10
  50. package/dist/script/editor/tool/sgroup.d.ts +4 -4
  51. package/dist/script/editor/tool/simpleobject.d.ts +7 -5
  52. package/dist/script/editor/tool/template.d.ts +19 -21
  53. package/dist/script/editor/tool/text.d.ts +4 -3
  54. package/dist/script/ui/action/index.d.ts +0 -4
  55. package/dist/script/ui/action/tools.d.ts +0 -4
  56. package/dist/script/ui/component/cliparea/cliparea.d.ts +1 -0
  57. package/dist/script/ui/component/view/saveButton.types.d.ts +2 -0
  58. package/dist/script/ui/component/view/saveButton.utils.d.ts +2 -0
  59. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.constants.d.ts +4 -0
  60. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.container.d.ts +17 -0
  61. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.container.test.d.ts +1 -0
  62. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.d.ts +22 -0
  63. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.test.d.ts +1 -0
  64. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.test.utils.d.ts +8 -0
  65. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.types.d.ts +37 -0
  66. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.utils.d.ts +23 -0
  67. package/dist/script/ui/dialog/AbbreviationLookup/AbbreviationLookup.utils.test.d.ts +16 -0
  68. package/dist/script/ui/dialog/AbbreviationLookup/hooks/useOptions.d.ts +17 -0
  69. package/dist/script/ui/dialog/AbbreviationLookup/hooks/useOptions.test.d.ts +1 -0
  70. package/dist/script/ui/dialog/AbbreviationLookup/index.d.ts +17 -0
  71. package/dist/script/ui/state/abbreviationLookup/abbreviationLookup.types.d.ts +19 -0
  72. package/dist/script/ui/state/abbreviationLookup/index.d.ts +30 -0
  73. package/dist/script/ui/state/abbreviationLookup/index.test.d.ts +1 -0
  74. package/dist/script/ui/{views/toolbars/LeftToolbar/Transform → state/abbreviationLookup/selectors}/index.d.ts +1 -1
  75. package/dist/script/ui/state/abbreviationLookup/selectors/selectors.d.ts +17 -0
  76. package/dist/script/ui/state/common/common.types.d.ts +21 -0
  77. package/dist/script/ui/state/common/index.d.ts +26 -0
  78. package/dist/script/ui/state/common/index.test.d.ts +1 -0
  79. package/dist/script/ui/state/common/selectors/index.d.ts +16 -0
  80. package/dist/script/ui/state/common/selectors/selectors.d.ts +19 -0
  81. package/dist/script/ui/state/constants.d.ts +21 -6
  82. package/dist/script/ui/state/editor/index.d.ts +1 -0
  83. package/dist/script/ui/state/floatingTools/index.d.ts +16 -0
  84. package/dist/script/ui/state/floatingTools/selectors/index.d.ts +5 -0
  85. package/dist/script/ui/state/mouse.d.ts +16 -0
  86. package/dist/script/ui/state/moveSelectedItems.d.ts +5 -0
  87. package/dist/script/ui/state/templates/index.d.ts +38 -23
  88. package/dist/script/ui/state/templates/selectors/index.d.ts +16 -0
  89. package/dist/script/ui/utils/index.d.ts +0 -1
  90. package/dist/script/ui/views/components/ContextMenu/ContextMenuTrigger.utils.d.ts +7 -0
  91. package/dist/script/ui/views/components/StructEditor/StructEditor.d.ts +1 -0
  92. package/dist/script/ui/views/modal/components/Text/TextButton/TextButton.d.ts +2 -1
  93. package/dist/script/ui/views/modal/components/document/Open/components/FileDrop.d.ts +2 -1
  94. package/dist/script/ui/views/modal/components/document/Save/Save.d.ts +1 -1
  95. package/dist/script/ui/views/toolbars/FloatingTools/FloatingTools.container.d.ts +4 -0
  96. package/dist/script/ui/views/toolbars/FloatingTools/FloatingTools.d.ts +20 -0
  97. package/dist/script/ui/views/toolbars/FloatingTools/index.d.ts +1 -0
  98. package/dist/script/ui/views/toolbars/LeftToolbar/leftToolbarOptions.d.ts +1 -2
  99. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ActionButton/ActionButton.d.ts +2 -1
  100. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarGroupItem.d.ts +1 -1
  101. package/dist/script/ui/views/toolbars/TopToolbar/Divider.d.ts +1 -0
  102. package/dist/script/ui/views/toolbars/TopToolbar/FileControls.d.ts +0 -15
  103. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbarIconButton.d.ts +18 -0
  104. package/dist/script/ui/views/toolbars/index.d.ts +1 -0
  105. package/dist/script/ui/views/toolbars/toolbar.types.d.ts +4 -3
  106. package/package.json +6 -3
  107. package/dist/script/editor/tool/helper/getMergeItems.d.ts +0 -2
  108. package/dist/script/ui/component/view/icon.d.ts +0 -5
  109. 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
- declare class SimpleObjectTool {
18
- mode: any;
19
- editor: Editor;
20
- dragCtx: any;
21
- constructor(editor: any, mode: any);
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
- declare type MergeItems = Record<string, Map<unknown, unknown>> | null;
19
- declare class TemplateTool {
20
- editor: Editor;
21
- mode: any;
22
- template: any;
23
- findItems: Array<string>;
24
- mergeItems: MergeItems;
25
- dragCtx: any;
26
- targetGroupsIds: Array<number>;
27
- isSaltOrSolvent: boolean;
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(): Struct;
31
- get functionalGroups(): import("ketcher-core").Pool<FunctionalGroup>;
32
- get isModeFunctionalGroup(): boolean;
33
- get closestItem(): any;
34
- get isNeedToShowRemoveAbbreviationPopup(): boolean;
35
- findKeyOfRelatedGroupId(clickedClosestItemId: number): number;
36
- showRemoveAbbreviationPopup(): Promise<void>;
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: any): boolean;
40
- cancel(e: any): void;
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
- declare class TextTool {
17
- editor: any;
18
- dragCtx: any;
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;
@@ -137,11 +137,7 @@ declare const config: {
137
137
  };
138
138
  hidden: (options: any) => boolean;
139
139
  };
140
- transforms: {
141
- hidden: (options: any) => boolean;
142
- };
143
140
  'transform-rotate': {
144
- shortcut: string;
145
141
  title: string;
146
142
  action: {
147
143
  tool: string;
@@ -76,11 +76,7 @@ declare var _default: {
76
76
  };
77
77
  hidden: (options: any) => boolean;
78
78
  };
79
- transforms: {
80
- hidden: (options: any) => boolean;
81
- };
82
79
  'transform-rotate': {
83
- shortcut: string;
84
80
  title: string;
85
81
  action: {
86
82
  tool: string;
@@ -1,4 +1,5 @@
1
1
  export function exec(action: any): boolean;
2
+ export const CLIP_AREA_BASE_CLASS: "cliparea";
2
3
  export const actions: string[];
3
4
  export default ClipArea;
4
5
  declare class ClipArea extends Component<any, any, any> {
@@ -0,0 +1,2 @@
1
+ export declare type FileSaverReturnType = Promise<(data: Blob | string, fn: any, type: string | undefined) => void | never>;
2
+ export declare type SaverType = Awaited<FileSaverReturnType>;
@@ -0,0 +1,2 @@
1
+ import { FileSaverReturnType } from './saveButton.types';
2
+ export declare const fileSaver: (server: any) => FileSaverReturnType;
@@ -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,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,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,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;
@@ -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 * from './Transform';
16
+ export * from './selectors';
@@ -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
- export namespace supportedSGroupTypes {
2
- const MUL: string;
3
- const SRU: string;
4
- const SUP: string;
5
- const DAT: string;
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
+ };
@@ -21,4 +21,5 @@ export default function initEditor(dispatch: any, getState: any): {
21
21
  onConfirm: () => Promise<any>;
22
22
  onShowInfo: (payload: any) => void;
23
23
  onApiSettings: (payload: any) => any;
24
+ onUpdateFloatingTools: (...args: any[]) => void;
24
25
  };
@@ -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,5 @@
1
+ export declare const getFloatingToolsVisible: (state: any) => boolean;
2
+ export declare const getFloatingToolsRotateHandlePosition: (state: any) => {
3
+ x: number;
4
+ y: number;
5
+ };
@@ -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 {};