ketcher-react 3.8.0-dev.1 → 3.8.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Icon/utils/iconNameToIcon.d.ts +1 -0
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.css.map +1 -1
- package/dist/cjs/index.js +1429 -1223
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{index.modern-5d5e11f2.js → index.modern-e42372a4.js} +67 -12
- package/dist/cjs/index.modern-e42372a4.js.map +1 -0
- package/dist/cjs/script/editor/Editor.d.ts +11 -9
- package/dist/cjs/script/editor/tool/create-monomer.d.ts +0 -1
- package/dist/cjs/script/ui/state/editor/selectors/index.d.ts +1 -1
- package/dist/cjs/script/ui/views/components/AttachmentPointEditPopup/AttachmentPointEditPopup.d.ts +9 -0
- package/dist/cjs/script/ui/views/components/ContextMenu/hooks/useMakeLeavingGroupAtomMenuItem.d.ts +9 -0
- package/dist/cjs/script/ui/views/components/MonomerCreationWizard/MonomerCreationWizard.types.d.ts +1 -1
- package/dist/cjs/script/ui/views/components/MonomerCreationWizard/components/AttachmentPoint/AttachmentPoint.d.ts +7 -0
- package/dist/components/Icon/utils/iconNameToIcon.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +1430 -1224
- package/dist/index.js.map +1 -1
- package/dist/{index.modern-7ce21378.js → index.modern-1aebb8e6.js} +67 -12
- package/dist/index.modern-1aebb8e6.js.map +1 -0
- package/dist/script/editor/Editor.d.ts +11 -9
- package/dist/script/editor/tool/create-monomer.d.ts +0 -1
- package/dist/script/ui/state/editor/selectors/index.d.ts +1 -1
- package/dist/script/ui/views/components/AttachmentPointEditPopup/AttachmentPointEditPopup.d.ts +9 -0
- package/dist/script/ui/views/components/ContextMenu/hooks/useMakeLeavingGroupAtomMenuItem.d.ts +9 -0
- package/dist/script/ui/views/components/MonomerCreationWizard/MonomerCreationWizard.types.d.ts +1 -1
- package/dist/script/ui/views/components/MonomerCreationWizard/components/AttachmentPoint/AttachmentPoint.d.ts +7 -0
- package/package.json +1 -1
- package/dist/cjs/index.modern-5d5e11f2.js.map +0 -1
- package/dist/cjs/script/ui/state/editor/actions/monomerCreation.d.ts +0 -15
- package/dist/cjs/script/ui/state/editor/middlewares/monomerCreation.d.ts +0 -2
- package/dist/cjs/script/ui/views/components/ContextMenu/hooks/useAddAttachmentPoint.d.ts +0 -4
- package/dist/cjs/script/ui/views/components/ContextMenu/hooks/useRemoveAttachmentPoint.d.ts +0 -4
- package/dist/index.modern-7ce21378.js.map +0 -1
- package/dist/script/ui/state/editor/actions/monomerCreation.d.ts +0 -15
- package/dist/script/ui/state/editor/middlewares/monomerCreation.d.ts +0 -2
- package/dist/script/ui/views/components/ContextMenu/hooks/useAddAttachmentPoint.d.ts +0 -4
- package/dist/script/ui/views/components/ContextMenu/hooks/useRemoveAttachmentPoint.d.ts +0 -4
|
@@ -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 { Action, Editor as KetcherEditor, FloatingToolsParams, MULTITAIL_ARROW_KEY, Render, Struct } from 'ketcher-core';
|
|
16
|
+
import { Action, AttachmentPointName, Editor as KetcherEditor, FloatingToolsParams, MonomerCreationState, MULTITAIL_ARROW_KEY, Render, Struct } from 'ketcher-core';
|
|
17
17
|
import { PipelineSubscription, Subscription } from 'subscription';
|
|
18
18
|
import { Highlighter } from './highlighter';
|
|
19
19
|
import { ContextMenuInfo } from '../ui/views/components/ContextMenu/contextMenu.types';
|
|
@@ -30,10 +30,6 @@ export interface Selection {
|
|
|
30
30
|
rgroupAttachmentPoints?: Array<number>;
|
|
31
31
|
[MULTITAIL_ARROW_KEY]?: Array<number>;
|
|
32
32
|
}
|
|
33
|
-
export declare type MonomerCreationState = {
|
|
34
|
-
originalStruct: Struct;
|
|
35
|
-
attachmentAtomIdToLeavingAtomId: Map<number, number>;
|
|
36
|
-
} | null;
|
|
37
33
|
declare class Editor implements KetcherEditor {
|
|
38
34
|
#private;
|
|
39
35
|
ketcherId: string;
|
|
@@ -75,7 +71,6 @@ declare class Editor implements KetcherEditor {
|
|
|
75
71
|
cursor: Subscription;
|
|
76
72
|
updateFloatingTools: Subscription<FloatingToolsParams>;
|
|
77
73
|
};
|
|
78
|
-
private _monomerCreationState;
|
|
79
74
|
serverSettings: {};
|
|
80
75
|
lastEvent: any;
|
|
81
76
|
macromoleculeConvertionError: string | null | undefined;
|
|
@@ -99,16 +94,23 @@ declare class Editor implements KetcherEditor {
|
|
|
99
94
|
positionStruct(x: number, y: number): void;
|
|
100
95
|
zoomAccordingContent(struct: Struct): boolean;
|
|
101
96
|
get monomerCreationState(): MonomerCreationState;
|
|
97
|
+
private set monomerCreationState(value);
|
|
102
98
|
get isMonomerCreationWizardActive(): boolean;
|
|
103
|
-
private
|
|
99
|
+
private terminalRGroupAtoms;
|
|
100
|
+
private potentialLeavingAtoms;
|
|
104
101
|
get isMonomerCreationWizardEnabled(): boolean;
|
|
105
102
|
static isSelectionContinuous(selection: Selection, struct: Struct): boolean;
|
|
103
|
+
private originalStruct;
|
|
106
104
|
private originalSelection;
|
|
107
|
-
private
|
|
105
|
+
private selectedToOriginalAtomsIdMap;
|
|
108
106
|
private selectionBBox;
|
|
109
107
|
openMonomerCreationWizard(): void;
|
|
108
|
+
assignLeavingGroupAtom(atomId: number): void;
|
|
110
109
|
closeMonomerCreationWizard(): void;
|
|
111
110
|
saveNewMonomer(data: any): void;
|
|
111
|
+
reassignAttachmentPointAtom(atomId: number, atomLabel: string): void;
|
|
112
|
+
reassignAttachmentPoint(currentName: AttachmentPointName, newName: AttachmentPointName): void;
|
|
113
|
+
removeAttachmentPoint(name: AttachmentPointName): void;
|
|
112
114
|
selection(ci?: any): Selection | null;
|
|
113
115
|
hover(ci: {
|
|
114
116
|
id: number;
|
|
@@ -132,7 +134,7 @@ declare class Editor implements KetcherEditor {
|
|
|
132
134
|
atomToFunctionalGroup: Map<any, any>;
|
|
133
135
|
};
|
|
134
136
|
explicitSelected(autoSelectBonds?: boolean): any;
|
|
135
|
-
structSelected(): Struct;
|
|
137
|
+
structSelected(existingSelection?: Selection): Struct;
|
|
136
138
|
alignDescriptors(): void;
|
|
137
139
|
setMacromoleculeConvertionError(errorMessage: string): void;
|
|
138
140
|
clearMacromoleculeConvertionError(): void;
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
***************************************************************************/
|
|
16
|
-
import
|
|
16
|
+
import { MonomerCreationState } from 'ketcher-core';
|
|
17
17
|
export declare const editorOptionsSelector: (state: any) => any;
|
|
18
18
|
export declare const editorMonomerCreationStateSelector: (state: any) => MonomerCreationState;
|
package/dist/script/ui/views/components/AttachmentPointEditPopup/AttachmentPointEditPopup.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AttachmentPointClickData, AttachmentPointName } from 'ketcher-core';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
data: AttachmentPointClickData | null;
|
|
4
|
+
onNameChange: (currentName: AttachmentPointName, newName: AttachmentPointName) => void;
|
|
5
|
+
onAtomChange: (atomId: number, atomLabel: string) => void;
|
|
6
|
+
onClose: VoidFunction;
|
|
7
|
+
};
|
|
8
|
+
declare const AttachmentPointEditPopup: ({ data, onNameChange, onAtomChange, onClose, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export default AttachmentPointEditPopup;
|
package/dist/script/ui/views/components/ContextMenu/hooks/useMakeLeavingGroupAtomMenuItem.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AtomContextMenuProps, MenuItemsProps } from '../contextMenu.types';
|
|
2
|
+
import { Editor } from 'src/script/editor';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
props: MenuItemsProps<AtomContextMenuProps>;
|
|
5
|
+
selectedAtomId: number | undefined;
|
|
6
|
+
editor: Editor;
|
|
7
|
+
};
|
|
8
|
+
declare const useMakeLeavingGroupAtomMenuItem: ({ props, selectedAtomId, editor, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export default useMakeLeavingGroupAtomMenuItem;
|
package/dist/script/ui/views/components/MonomerCreationWizard/MonomerCreationWizard.types.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare type WizardValues = {
|
|
|
13
13
|
[key in StringWizardFormFieldId]: string;
|
|
14
14
|
};
|
|
15
15
|
export declare type WizardNotificationType = 'info' | 'error';
|
|
16
|
-
export declare type WizardNotificationId = 'defaultAttachmentPoints' | 'emptyMandatoryFields' | 'invalidSymbol' | 'symbolExists' | 'editingIsNotAllowed';
|
|
16
|
+
export declare type WizardNotificationId = 'defaultAttachmentPoints' | 'emptyMandatoryFields' | 'invalidSymbol' | 'symbolExists' | 'editingIsNotAllowed' | 'noAttachmentPoints' | 'incorrectAttachmentPointsOrder' | 'creationSuccessful';
|
|
17
17
|
export declare type WizardNotificationTypeMap = Record<WizardNotificationId, WizardNotificationType>;
|
|
18
18
|
export declare type WizardNotificationMessageMap = Record<WizardNotificationId, string>;
|
|
19
19
|
export declare type WizardNotification = {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AttachmentPointName } from 'ketcher-core';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
name: AttachmentPointName;
|
|
4
|
+
atomLabel: string;
|
|
5
|
+
};
|
|
6
|
+
declare const AttachmentPoint: ({ name, atomLabel }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default AttachmentPoint;
|