ketcher-react 3.8.0-rc.4 → 3.9.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 (69) hide show
  1. package/dist/Editor.d.ts +2 -0
  2. package/dist/cjs/Editor.d.ts +2 -0
  3. package/dist/cjs/components/Icon/utils/iconNameToIcon.d.ts +1 -0
  4. package/dist/cjs/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +9 -6
  5. package/dist/cjs/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts +1 -1
  6. package/dist/cjs/hooks/index.d.ts +1 -1
  7. package/dist/cjs/hooks/useRequestAnimationFrame.d.ts +16 -0
  8. package/dist/cjs/index.css +1 -1
  9. package/dist/cjs/index.css.map +1 -1
  10. package/dist/cjs/index.js +2132 -1128
  11. package/dist/cjs/index.js.map +1 -1
  12. package/dist/cjs/{index.modern-7604afae.js → index.modern-bddb9120.js} +202 -123
  13. package/dist/cjs/index.modern-bddb9120.js.map +1 -0
  14. package/dist/cjs/script/editor/Editor.d.ts +16 -4
  15. package/dist/cjs/script/editor/utils/customOnChangeHandler.d.ts +20 -0
  16. package/dist/cjs/script/ui/action/highlightColors/HighlightColors.d.ts +1 -0
  17. package/dist/cjs/script/ui/action/server.d.ts +7 -7
  18. package/dist/cjs/script/ui/action/tools.d.ts +39 -4
  19. package/dist/cjs/script/ui/dialog/template/TemplateDialog.d.ts +2 -0
  20. package/dist/cjs/script/ui/views/components/AttachmentPointEditPopup/AttachmentPointEditPopup.d.ts +5 -3
  21. package/dist/cjs/script/ui/views/components/ContextMenu/contextMenu.types.d.ts +10 -4
  22. package/dist/cjs/script/ui/views/components/ContextMenu/hooks/useCreateMonomer.d.ts +2 -0
  23. package/dist/{script/ui/views/components/ContextMenu/hooks/useMakeLeavingGroupAtomMenuItem.d.ts → cjs/script/ui/views/components/ContextMenu/hooks/useMakeAttachmentPointMenuItems.d.ts} +3 -2
  24. package/dist/cjs/script/ui/views/components/ContextMenu/menuItems/AttachmentPointLabelMenuItems.d.ts +3 -0
  25. package/dist/cjs/script/ui/views/components/MonomerCreationWizard/MonomerCreationWizard.types.d.ts +1 -1
  26. package/dist/cjs/script/ui/views/components/MonomerCreationWizard/components/AttachmentPoint/AttachmentPoint.d.ts +6 -3
  27. package/dist/cjs/script/ui/views/components/MonomerCreationWizard/components/AttachmentPointControls/AttachmentPointControls.d.ts +13 -0
  28. package/dist/cjs/script/ui/views/components/MonomerCreationWizard/hooks/useAttachmentPointSelectsData.d.ts +10 -0
  29. package/dist/cjs/script/ui/views/modal/components/PeriodTable/components/TypeChoice/TypeChoice.d.ts +2 -1
  30. package/dist/cjs/script/ui/views/modal/components/toolbox/Atom/Atom.container.d.ts +1 -0
  31. package/dist/cjs/script/ui/views/modal/components/toolbox/Atom/Atom.d.ts +1 -0
  32. package/dist/cjs/script/ui/views/modal/components/toolbox/Bond/Bond.container.d.ts +3 -1
  33. package/dist/cjs/script/ui/views/modal/components/toolbox/Bond/Bond.d.ts +3 -1
  34. package/dist/cjs/script/ui/views/toolbars/ArrowScroll/ArrowScroll.d.ts +2 -2
  35. package/dist/components/Icon/utils/iconNameToIcon.d.ts +1 -0
  36. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +9 -6
  37. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts +1 -1
  38. package/dist/hooks/index.d.ts +1 -1
  39. package/dist/hooks/useRequestAnimationFrame.d.ts +16 -0
  40. package/dist/index.css +1 -1
  41. package/dist/index.css.map +1 -1
  42. package/dist/index.js +2135 -1130
  43. package/dist/index.js.map +1 -1
  44. package/dist/{index.modern-eb9aa0eb.js → index.modern-87b29a80.js} +203 -124
  45. package/dist/index.modern-87b29a80.js.map +1 -0
  46. package/dist/script/editor/Editor.d.ts +16 -4
  47. package/dist/script/editor/utils/customOnChangeHandler.d.ts +20 -0
  48. package/dist/script/ui/action/highlightColors/HighlightColors.d.ts +1 -0
  49. package/dist/script/ui/action/server.d.ts +7 -7
  50. package/dist/script/ui/action/tools.d.ts +39 -4
  51. package/dist/script/ui/dialog/template/TemplateDialog.d.ts +2 -0
  52. package/dist/script/ui/views/components/AttachmentPointEditPopup/AttachmentPointEditPopup.d.ts +5 -3
  53. package/dist/script/ui/views/components/ContextMenu/contextMenu.types.d.ts +10 -4
  54. package/dist/script/ui/views/components/ContextMenu/hooks/useCreateMonomer.d.ts +2 -0
  55. package/dist/{cjs/script/ui/views/components/ContextMenu/hooks/useMakeLeavingGroupAtomMenuItem.d.ts → script/ui/views/components/ContextMenu/hooks/useMakeAttachmentPointMenuItems.d.ts} +3 -2
  56. package/dist/script/ui/views/components/ContextMenu/menuItems/AttachmentPointLabelMenuItems.d.ts +3 -0
  57. package/dist/script/ui/views/components/MonomerCreationWizard/MonomerCreationWizard.types.d.ts +1 -1
  58. package/dist/script/ui/views/components/MonomerCreationWizard/components/AttachmentPoint/AttachmentPoint.d.ts +6 -3
  59. package/dist/script/ui/views/components/MonomerCreationWizard/components/AttachmentPointControls/AttachmentPointControls.d.ts +13 -0
  60. package/dist/script/ui/views/components/MonomerCreationWizard/hooks/useAttachmentPointSelectsData.d.ts +10 -0
  61. package/dist/script/ui/views/modal/components/PeriodTable/components/TypeChoice/TypeChoice.d.ts +2 -1
  62. package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.container.d.ts +1 -0
  63. package/dist/script/ui/views/modal/components/toolbox/Atom/Atom.d.ts +1 -0
  64. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.container.d.ts +3 -1
  65. package/dist/script/ui/views/modal/components/toolbox/Bond/Bond.d.ts +3 -1
  66. package/dist/script/ui/views/toolbars/ArrowScroll/ArrowScroll.d.ts +2 -2
  67. package/package.json +1 -2
  68. package/dist/cjs/index.modern-7604afae.js.map +0 -1
  69. package/dist/index.modern-eb9aa0eb.js.map +0 -1
@@ -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, AttachmentPointName, Editor as KetcherEditor, FloatingToolsParams, MonomerCreationState, MULTITAIL_ARROW_KEY, Render, Struct } from 'ketcher-core';
16
+ import { Action, Atom, 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';
@@ -97,23 +97,35 @@ declare class Editor implements KetcherEditor {
97
97
  private set monomerCreationState(value);
98
98
  get isMonomerCreationWizardActive(): boolean;
99
99
  private terminalRGroupAtoms;
100
- private potentialLeavingAtoms;
100
+ private potentialLeavingAtomsForAutoAssignment;
101
+ private potentialLeavingAtomsForManualAssignment;
101
102
  get isMonomerCreationWizardEnabled(): boolean;
102
- static isSelectionContinuous(selection: Selection, struct: Struct): boolean;
103
+ isMinimalViableStructure(): boolean;
104
+ static isStructureContinuous(struct: Struct, selection?: Selection): boolean;
105
+ static isStructureImpure(struct: Struct): boolean;
103
106
  private originalStruct;
104
107
  private originalSelection;
105
108
  private selectedToOriginalAtomsIdMap;
106
109
  private selectionBBox;
110
+ private changeEventSubscriber;
107
111
  openMonomerCreationWizard(): void;
108
112
  assignLeavingGroupAtom(atomId: number): void;
113
+ private preservedConnectionPointData;
114
+ assignConnectionPointAtom(atomId: number): void;
109
115
  closeMonomerCreationWizard(): void;
110
116
  private cleanupAttachmentPoint;
111
117
  saveNewMonomer(data: any): void;
112
- reassignAttachmentPointAtom(atomId: number, atomLabel: string): void;
118
+ reassignAttachmentPointLeavingAtom(name: AttachmentPointName, newLeavingAtomId: number): void;
113
119
  reassignAttachmentPoint(currentName: AttachmentPointName, newName: AttachmentPointName): void;
114
120
  removeAttachmentPoint(name: AttachmentPointName): void;
115
121
  cleanupCloseAttachmentPointEditPopup(): void;
116
122
  setProblematicAttachmentPoints(problematicPoints: Set<AttachmentPointName>): void;
123
+ highlightAttachmentPoint(name: AttachmentPointName | null): void;
124
+ findPotentialLeavingAtoms(attachmentAtomId: number): Atom[];
125
+ private subscribeToChangeEventInMonomerCreationWizard;
126
+ private unsubscribeFromChangeEventInMonomerCreationWizard;
127
+ private collectChangesForMonomerCreationStateInvalidation;
128
+ private invalidateMonomerCreationWizardState;
117
129
  selection(ci?: any): Selection | null;
118
130
  hover(ci: {
119
131
  id: number;
@@ -13,4 +13,24 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
+ declare type Position = {
17
+ x: number;
18
+ y: number;
19
+ };
20
+ declare type ArrowPosition = [Position, Position];
21
+ export declare type ChangeEventData = {
22
+ operation: any;
23
+ id?: number;
24
+ label?: string;
25
+ position?: Position | ArrowPosition;
26
+ attribute?: any;
27
+ from?: any;
28
+ to?: any;
29
+ atomId?: any;
30
+ fragId?: any;
31
+ sGroupId?: any;
32
+ type?: any;
33
+ mode?: any;
34
+ };
16
35
  export declare function customOnChangeHandler(action: any, handler: any): any;
36
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  interface HighlightMenuProps {
3
3
  onHighlight: (color: string) => void;
4
+ disabled?: boolean;
4
5
  }
5
6
  declare const HighlightMenu: FC<HighlightMenuProps>;
6
7
  export default HighlightMenu;
@@ -6,7 +6,7 @@ declare const config: {
6
6
  action: {
7
7
  thunk: (dispatch: any, getState: any) => void;
8
8
  };
9
- disabled: (editor: any, server: any, options: any) => boolean;
9
+ disabled: (editor: any, server: any, options: any) => any;
10
10
  hidden: (options: any) => boolean;
11
11
  };
12
12
  clean: {
@@ -15,7 +15,7 @@ declare const config: {
15
15
  action: {
16
16
  thunk: (dispatch: any, getState: any) => void;
17
17
  };
18
- disabled: (editor: any, server: any, options: any) => boolean;
18
+ disabled: (editor: any, server: any, options: any) => any;
19
19
  hidden: (options: any) => boolean;
20
20
  };
21
21
  arom: {
@@ -24,7 +24,7 @@ declare const config: {
24
24
  action: {
25
25
  thunk: (dispatch: any, getState: any) => void;
26
26
  };
27
- disabled: (editor: any, server: any, options: any) => boolean;
27
+ disabled: (editor: any, server: any, options: any) => any;
28
28
  hidden: (options: any) => boolean;
29
29
  };
30
30
  dearom: {
@@ -33,7 +33,7 @@ declare const config: {
33
33
  action: {
34
34
  thunk: (dispatch: any, getState: any) => void;
35
35
  };
36
- disabled: (editor: any, server: any, options: any) => boolean;
36
+ disabled: (editor: any, server: any, options: any) => any;
37
37
  hidden: (options: any) => boolean;
38
38
  };
39
39
  cip: {
@@ -42,7 +42,7 @@ declare const config: {
42
42
  action: {
43
43
  thunk: (dispatch: any, getState: any) => void;
44
44
  };
45
- disabled: (editor: any, server: any, options: any) => boolean;
45
+ disabled: (editor: any, server: any, options: any) => any;
46
46
  hidden: (options: any) => boolean;
47
47
  };
48
48
  check: {
@@ -70,7 +70,7 @@ declare const config: {
70
70
  action: {
71
71
  dialog: string;
72
72
  };
73
- disabled: (editor: any, server: any, options: any) => boolean;
73
+ disabled: (editor: any, server: any, options: any) => any;
74
74
  hidden: (options: any) => boolean;
75
75
  };
76
76
  miew: {
@@ -86,7 +86,7 @@ declare const config: {
86
86
  action: {
87
87
  thunk: (dispatch: any, getState: any) => void;
88
88
  };
89
- disabled: (editor: any, server: any, options: any) => boolean;
89
+ disabled: (editor: any, server: any, options: any) => any;
90
90
  hidden: (options: any) => boolean;
91
91
  };
92
92
  };
@@ -58,11 +58,11 @@ declare const _default: {
58
58
  action: {
59
59
  tool: string;
60
60
  };
61
- disabled: (editor: any) => boolean;
61
+ disabled: (editor: any) => any;
62
62
  hidden: (options: any) => boolean;
63
63
  };
64
64
  'charge-plus': {
65
- shortcut: string;
65
+ shortcut: string[];
66
66
  title: string;
67
67
  action: {
68
68
  tool: string;
@@ -71,7 +71,7 @@ declare const _default: {
71
71
  hidden: (options: any) => boolean;
72
72
  };
73
73
  'charge-minus': {
74
- shortcut: string;
74
+ shortcut: string[];
75
75
  title: string;
76
76
  action: {
77
77
  tool: string;
@@ -112,9 +112,11 @@ declare const _default: {
112
112
  action: {
113
113
  tool: string;
114
114
  };
115
+ disabled: (editor: any) => any;
115
116
  hidden: (options: any) => boolean;
116
117
  };
117
118
  arrows: {
119
+ disabled: (editor: any) => any;
118
120
  hidden: (options: any) => boolean;
119
121
  };
120
122
  'reaction-arrow-open-angle': {
@@ -123,6 +125,7 @@ declare const _default: {
123
125
  tool: string;
124
126
  opts: RxnArrowMode;
125
127
  };
128
+ disabled: (editor: any) => any;
126
129
  hidden: (options: any) => boolean;
127
130
  };
128
131
  'reaction-arrow-filled-triangle': {
@@ -131,6 +134,7 @@ declare const _default: {
131
134
  tool: string;
132
135
  opts: RxnArrowMode;
133
136
  };
137
+ disabled: (editor: any) => any;
134
138
  hidden: (options: any) => boolean;
135
139
  };
136
140
  'reaction-arrow-filled-bow': {
@@ -139,6 +143,7 @@ declare const _default: {
139
143
  tool: string;
140
144
  opts: RxnArrowMode;
141
145
  };
146
+ disabled: (editor: any) => any;
142
147
  hidden: (options: any) => boolean;
143
148
  };
144
149
  'reaction-arrow-dashed-open-angle': {
@@ -147,6 +152,7 @@ declare const _default: {
147
152
  tool: string;
148
153
  opts: RxnArrowMode;
149
154
  };
155
+ disabled: (editor: any) => any;
150
156
  hidden: (options: any) => boolean;
151
157
  };
152
158
  'reaction-arrow-failed': {
@@ -155,6 +161,7 @@ declare const _default: {
155
161
  tool: string;
156
162
  opts: RxnArrowMode;
157
163
  };
164
+ disabled: (editor: any) => any;
158
165
  hidden: (options: any) => boolean;
159
166
  };
160
167
  'reaction-arrow-retrosynthetic': {
@@ -163,6 +170,7 @@ declare const _default: {
163
170
  tool: string;
164
171
  opts: RxnArrowMode;
165
172
  };
173
+ disabled: (editor: any) => any;
166
174
  hidden: (options: any) => boolean;
167
175
  };
168
176
  'reaction-arrow-both-ends-filled-triangle': {
@@ -171,6 +179,7 @@ declare const _default: {
171
179
  tool: string;
172
180
  opts: RxnArrowMode;
173
181
  };
182
+ disabled: (editor: any) => any;
174
183
  hidden: (options: any) => boolean;
175
184
  };
176
185
  'reaction-arrow-equilibrium-filled-half-bow': {
@@ -179,6 +188,7 @@ declare const _default: {
179
188
  tool: string;
180
189
  opts: RxnArrowMode;
181
190
  };
191
+ disabled: (editor: any) => any;
182
192
  hidden: (options: any) => boolean;
183
193
  };
184
194
  'reaction-arrow-equilibrium-filled-triangle': {
@@ -187,6 +197,7 @@ declare const _default: {
187
197
  tool: string;
188
198
  opts: RxnArrowMode;
189
199
  };
200
+ disabled: (editor: any) => any;
190
201
  hidden: (options: any) => boolean;
191
202
  };
192
203
  'reaction-arrow-equilibrium-open-angle': {
@@ -195,6 +206,7 @@ declare const _default: {
195
206
  tool: string;
196
207
  opts: RxnArrowMode;
197
208
  };
209
+ disabled: (editor: any) => any;
198
210
  hidden: (options: any) => boolean;
199
211
  };
200
212
  'reaction-arrow-unbalanced-equilibrium-filled-half-bow': {
@@ -203,6 +215,7 @@ declare const _default: {
203
215
  tool: string;
204
216
  opts: RxnArrowMode;
205
217
  };
218
+ disabled: (editor: any) => any;
206
219
  hidden: (options: any) => boolean;
207
220
  };
208
221
  'reaction-arrow-unbalanced-equilibrium-open-half-angle': {
@@ -211,6 +224,7 @@ declare const _default: {
211
224
  tool: string;
212
225
  opts: RxnArrowMode;
213
226
  };
227
+ disabled: (editor: any) => any;
214
228
  hidden: (options: any) => boolean;
215
229
  };
216
230
  'reaction-arrow-unbalanced-equilibrium-large-filled-half-bow': {
@@ -219,6 +233,7 @@ declare const _default: {
219
233
  tool: string;
220
234
  opts: RxnArrowMode;
221
235
  };
236
+ disabled: (editor: any) => any;
222
237
  hidden: (options: any) => boolean;
223
238
  };
224
239
  'reaction-arrow-unbalanced-equilibrium-filled-half-triangle': {
@@ -227,6 +242,7 @@ declare const _default: {
227
242
  tool: string;
228
243
  opts: RxnArrowMode;
229
244
  };
245
+ disabled: (editor: any) => any;
230
246
  hidden: (options: any) => boolean;
231
247
  };
232
248
  'reaction-arrow-elliptical-arc-arrow-filled-bow': {
@@ -235,6 +251,7 @@ declare const _default: {
235
251
  tool: string;
236
252
  opts: RxnArrowMode;
237
253
  };
254
+ disabled: (editor: any) => any;
238
255
  hidden: (options: any) => boolean;
239
256
  };
240
257
  'reaction-arrow-elliptical-arc-arrow-filled-triangle': {
@@ -243,6 +260,7 @@ declare const _default: {
243
260
  tool: string;
244
261
  opts: RxnArrowMode;
245
262
  };
263
+ disabled: (editor: any) => any;
246
264
  hidden: (options: any) => boolean;
247
265
  };
248
266
  'reaction-arrow-elliptical-arc-arrow-open-angle': {
@@ -251,6 +269,7 @@ declare const _default: {
251
269
  tool: string;
252
270
  opts: RxnArrowMode;
253
271
  };
272
+ disabled: (editor: any) => any;
254
273
  hidden: (options: any) => boolean;
255
274
  };
256
275
  'reaction-arrow-elliptical-arc-arrow-open-half-angle': {
@@ -259,6 +278,7 @@ declare const _default: {
259
278
  tool: string;
260
279
  opts: RxnArrowMode;
261
280
  };
281
+ disabled: (editor: any) => any;
262
282
  hidden: (options: any) => boolean;
263
283
  };
264
284
  "reaction-arrow-multitail": {
@@ -267,6 +287,7 @@ declare const _default: {
267
287
  tool: string;
268
288
  opts: string;
269
289
  };
290
+ disabled: (editor: any) => any;
270
291
  hidden: (options: any) => boolean;
271
292
  };
272
293
  'reaction-plus': {
@@ -274,9 +295,11 @@ declare const _default: {
274
295
  action: {
275
296
  tool: string;
276
297
  };
298
+ disabled: (editor: any) => any;
277
299
  hidden: (options: any) => boolean;
278
300
  };
279
301
  'reaction-mapping-tools': {
302
+ disabled: (editor: any) => any;
280
303
  hidden: (options: any) => boolean;
281
304
  };
282
305
  'reaction-map': {
@@ -284,6 +307,7 @@ declare const _default: {
284
307
  action: {
285
308
  tool: string;
286
309
  };
310
+ disabled: (editor: any) => any;
287
311
  hidden: (options: any) => boolean;
288
312
  };
289
313
  'reaction-unmap': {
@@ -291,9 +315,11 @@ declare const _default: {
291
315
  action: {
292
316
  tool: string;
293
317
  };
318
+ disabled: (editor: any) => any;
294
319
  hidden: (options: any) => boolean;
295
320
  };
296
321
  rgroup: {
322
+ disabled: (editor: any) => any;
297
323
  hidden: (options: any) => boolean;
298
324
  };
299
325
  'rgroup-label': {
@@ -302,6 +328,7 @@ declare const _default: {
302
328
  action: {
303
329
  tool: string;
304
330
  };
331
+ disabled: (editor: any) => any;
305
332
  hidden: (options: any) => boolean;
306
333
  };
307
334
  'rgroup-fragment': {
@@ -310,6 +337,7 @@ declare const _default: {
310
337
  action: {
311
338
  tool: string;
312
339
  };
340
+ disabled: (editor: any) => any;
313
341
  hidden: (options: any) => boolean;
314
342
  };
315
343
  'rgroup-attpoints': {
@@ -318,6 +346,7 @@ declare const _default: {
318
346
  action: {
319
347
  tool: string;
320
348
  };
349
+ disabled: (editor: any) => any;
321
350
  hidden: (options: any) => boolean;
322
351
  };
323
352
  "create-monomer": {
@@ -326,9 +355,10 @@ declare const _default: {
326
355
  action: {
327
356
  tool: string;
328
357
  };
329
- disabled: (editor: any) => boolean;
358
+ disabled: (editor: any) => any;
330
359
  };
331
360
  shapes: {
361
+ disabled: (editor: any) => any;
332
362
  hidden: (options: any) => boolean;
333
363
  };
334
364
  'shape-ellipse': {
@@ -337,6 +367,7 @@ declare const _default: {
337
367
  tool: string;
338
368
  opts: SimpleObjectMode;
339
369
  };
370
+ disabled: (editor: any) => any;
340
371
  hidden: (options: any) => boolean;
341
372
  };
342
373
  'shape-rectangle': {
@@ -345,6 +376,7 @@ declare const _default: {
345
376
  tool: string;
346
377
  opts: SimpleObjectMode;
347
378
  };
379
+ disabled: (editor: any) => any;
348
380
  hidden: (options: any) => boolean;
349
381
  };
350
382
  'shape-line': {
@@ -353,6 +385,7 @@ declare const _default: {
353
385
  tool: string;
354
386
  opts: SimpleObjectMode;
355
387
  };
388
+ disabled: (editor: any) => any;
356
389
  hidden: (options: any) => boolean;
357
390
  };
358
391
  text: {
@@ -361,6 +394,7 @@ declare const _default: {
361
394
  action: {
362
395
  tool: string;
363
396
  };
397
+ disabled: (editor: any) => any;
364
398
  hidden: (options: any) => boolean;
365
399
  };
366
400
  bonds: {
@@ -371,6 +405,7 @@ declare const _default: {
371
405
  action: {
372
406
  tool: string;
373
407
  };
408
+ disabled: (editor: any) => any;
374
409
  hidden: (options: any) => boolean;
375
410
  };
376
411
  };
@@ -25,6 +25,7 @@ interface TemplateLibProps {
25
25
  initialTab: number;
26
26
  saltsAndSolvents: Template[];
27
27
  renderOptions?: any;
28
+ isMonomerCreationWizardActive?: boolean;
28
29
  }
29
30
  interface TemplateLibCallProps {
30
31
  onAttach: (tmpl: Template) => void;
@@ -49,6 +50,7 @@ declare const _default: import("react-redux").ConnectedComponent<FC<Props>, {
49
50
  initialTab: number;
50
51
  saltsAndSolvents: Template[];
51
52
  renderOptions?: any;
53
+ isMonomerCreationWizardActive?: boolean | undefined;
52
54
  onAttach: (tmpl: Template) => void;
53
55
  onCancel: () => void;
54
56
  onChangeGroup: (group: string) => void;
@@ -1,9 +1,11 @@
1
1
  import { AttachmentPointClickData, AttachmentPointName } from 'ketcher-core';
2
+ import { Editor } from '../../../../editor';
2
3
  declare type Props = {
3
- data: AttachmentPointClickData | null;
4
+ data: AttachmentPointClickData;
4
5
  onNameChange: (currentName: AttachmentPointName, newName: AttachmentPointName) => void;
5
- onAtomChange: (atomId: number, atomLabel: string) => void;
6
+ onLeavingAtomChange: (apName: AttachmentPointName, newLeavingAtomId: number) => void;
6
7
  onClose: VoidFunction;
8
+ editor: Editor;
7
9
  };
8
- declare const AttachmentPointEditPopup: ({ data, onNameChange, onAtomChange, onClose, }: Props) => import("react/jsx-runtime").JSX.Element | null;
10
+ declare const AttachmentPointEditPopup: ({ data, onNameChange, onLeavingAtomChange, onClose, editor, }: Props) => import("react/jsx-runtime").JSX.Element | null;
9
11
  export default AttachmentPointEditPopup;
@@ -1,4 +1,4 @@
1
- import { FunctionalGroup } from 'ketcher-core';
1
+ import { AttachmentPointName, FunctionalGroup } from 'ketcher-core';
2
2
  import type { TriggerEvent, PredicateParams } from 'react-contexify';
3
3
  import { Selection } from '../../../../editor/Editor';
4
4
  export declare enum CONTEXT_MENU_ID {
@@ -8,7 +8,8 @@ export declare enum CONTEXT_MENU_ID {
8
8
  FOR_FUNCTIONAL_GROUPS = "context-menu-for-functional-groups",
9
9
  FOR_R_GROUP_ATTACHMENT_POINT = "context-menu-for-rgroup-attachment-point",
10
10
  FOR_MULTITAIL_ARROW = "context-menu-for-multiple-arrowed",
11
- FOR_MACROMOLECULE = "context-menu-for-macromolecule"
11
+ FOR_MACROMOLECULE = "context-menu-for-macromolecule",
12
+ FOR_ATTACHMENT_POINT_LABEL = "context-menu-for-attachment-point-label"
12
13
  }
13
14
  export declare type ItemData = unknown;
14
15
  interface BaseContextMenuProps {
@@ -46,7 +47,11 @@ export interface MultitailArrowContextMenuProps {
46
47
  itemId: number;
47
48
  tailId: number | null;
48
49
  }
49
- export declare type ContextMenuProps = BondsContextMenuProps | AtomContextMenuProps | SelectionContextMenuProps | FunctionalGroupsContextMenuProps | RGroupAttachmentPointContextMenuProps | MultitailArrowContextMenuProps | MacromoleculeContextMenuProps;
50
+ export interface AttachmentPointLabelContextMenuProps extends BaseContextMenuProps {
51
+ id: string;
52
+ attachmentPointName: AttachmentPointName;
53
+ }
54
+ export declare type ContextMenuProps = BondsContextMenuProps | AtomContextMenuProps | SelectionContextMenuProps | FunctionalGroupsContextMenuProps | RGroupAttachmentPointContextMenuProps | MultitailArrowContextMenuProps | MacromoleculeContextMenuProps | AttachmentPointLabelContextMenuProps;
50
55
  export interface MenuItemsProps<T extends ContextMenuProps> {
51
56
  triggerEvent?: TriggerEvent;
52
57
  propsFromTrigger?: T;
@@ -58,7 +63,8 @@ export declare type ContextMenuInfo = {
58
63
  export declare enum ContextMenuTriggerType {
59
64
  None = "none",
60
65
  Selection = "selection",
61
- ClosestItem = "closestItem"
66
+ ClosestItem = "closestItem",
67
+ AuxiliaryItem = "auxiliaryItem"
62
68
  }
63
69
  export interface ClosestItem {
64
70
  id: number;
@@ -0,0 +1,2 @@
1
+ declare const useCreateMonomer: () => readonly [() => Promise<void>, () => boolean];
2
+ export default useCreateMonomer;
@@ -1,9 +1,10 @@
1
1
  import { AtomContextMenuProps, MenuItemsProps } from '../contextMenu.types';
2
2
  import { Editor } from 'src/script/editor';
3
+ import { ReactNode } from 'react';
3
4
  declare type Props = {
4
5
  props: MenuItemsProps<AtomContextMenuProps>;
5
6
  selectedAtomId: number | undefined;
6
7
  editor: Editor;
7
8
  };
8
- declare const useMakeLeavingGroupAtomMenuItem: ({ props, selectedAtomId, editor, }: Props) => import("react/jsx-runtime").JSX.Element | null;
9
- export default useMakeLeavingGroupAtomMenuItem;
9
+ declare const useMakeAttachmentPointMenuItems: ({ props, selectedAtomId, editor, }: Props) => ReactNode[] | null;
10
+ export default useMakeAttachmentPointMenuItems;
@@ -0,0 +1,3 @@
1
+ import { AttachmentPointLabelContextMenuProps, MenuItemsProps } from '../contextMenu.types';
2
+ declare const AttachmentPointLabelMenuItems: ({ propsFromTrigger, }: MenuItemsProps<AttachmentPointLabelContextMenuProps>) => import("react/jsx-runtime").JSX.Element | null;
3
+ export default AttachmentPointLabelMenuItems;
@@ -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' | 'noAttachmentPoints' | 'incorrectAttachmentPointsOrder' | 'creationSuccessful';
16
+ export declare type WizardNotificationId = 'defaultAttachmentPoints' | 'emptyMandatoryFields' | 'invalidSymbol' | 'symbolExists' | 'editingIsNotAllowed' | 'noAttachmentPoints' | 'incorrectAttachmentPointsOrder' | 'creationSuccessful' | 'incontinuousStructure' | 'notMinimalViableStructure' | 'impureStructure';
17
17
  export declare type WizardNotificationTypeMap = Record<WizardNotificationId, WizardNotificationType>;
18
18
  export declare type WizardNotificationMessageMap = Record<WizardNotificationId, string>;
19
19
  export declare type WizardNotification = {
@@ -1,8 +1,11 @@
1
1
  import { AttachmentPointName } from 'ketcher-core';
2
+ import Editor from '../../../../../../editor';
2
3
  declare type Props = {
3
4
  name: AttachmentPointName;
4
- atomLabel: string;
5
- implicitH: number;
5
+ editor: Editor;
6
+ onNameChange: (currentName: AttachmentPointName, newName: AttachmentPointName) => void;
7
+ onLeavingAtomChange: (apName: AttachmentPointName, newLeavingAtomId: number) => void;
8
+ onRemove: (name: AttachmentPointName) => void;
6
9
  };
7
- declare const AttachmentPoint: ({ name, atomLabel, implicitH }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ declare const AttachmentPoint: ({ name, editor, onNameChange, onLeavingAtomChange, onRemove, }: Props) => import("react/jsx-runtime").JSX.Element | null;
8
11
  export default AttachmentPoint;
@@ -0,0 +1,13 @@
1
+ import { AttachmentPointName } from 'ketcher-core';
2
+ import { AttachmentPointSelectData } from '../../hooks/useAttachmentPointSelectsData';
3
+ import { ReactNode } from 'react';
4
+ declare type Props = {
5
+ data: AttachmentPointSelectData;
6
+ onNameChange: (newName: AttachmentPointName) => void;
7
+ onLeavingAtomChange: (newLeavingAtomId: number) => void;
8
+ className?: string;
9
+ additionalControls?: ReactNode;
10
+ highlight?: boolean;
11
+ };
12
+ declare const AttachmentPointControls: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
13
+ export default AttachmentPointControls;
@@ -0,0 +1,10 @@
1
+ import { AttachmentPointName } from 'ketcher-core';
2
+ import { Editor } from '../../../../../editor';
3
+ import { Option } from '../../../../component/form/Select';
4
+ export declare type AttachmentPointSelectData = {
5
+ nameOptions: Array<Option>;
6
+ leavingAtomOptions: Array<Option>;
7
+ currentNameOption?: Option;
8
+ currentLeavingAtomOption?: Option;
9
+ };
10
+ export declare const useAttachmentPointSelectsData: (editor: Editor, attachmentPointName: AttachmentPointName) => AttachmentPointSelectData | null;
@@ -1,6 +1,7 @@
1
1
  export default TypeChoice;
2
- declare function TypeChoice({ value, onChange, ...props }: {
2
+ declare function TypeChoice({ value, onChange, disabled, ...props }: {
3
3
  [x: string]: any;
4
4
  value: any;
5
5
  onChange: any;
6
+ disabled: any;
6
7
  }): import("react/jsx-runtime").JSX.Element;
@@ -17,6 +17,7 @@
17
17
  declare const AtomContainer: import("react-redux").ConnectedComponent<import("react").FC<import("./Atom").AtomProps & {
18
18
  isMultipleAtoms?: boolean | undefined;
19
19
  isRestoredModal: boolean;
20
+ isMonomerCreationWizardActive?: boolean | undefined;
20
21
  }>, {
21
22
  className: string;
22
23
  alias: string;
@@ -34,6 +34,7 @@ interface AtomProps extends BaseCallProps, BaseProps {
34
34
  declare type Props = AtomProps & {
35
35
  isMultipleAtoms?: boolean;
36
36
  isRestoredModal: boolean;
37
+ isMonomerCreationWizardActive?: boolean;
37
38
  };
38
39
  declare const Atom: FC<Props>;
39
40
  export type { AtomProps };
@@ -13,7 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- declare const BondContainer: import("react-redux").ConnectedComponent<(props: import("./Bond").BondProps & import("../../../modal.types").BaseCallProps) => import("react/jsx-runtime").JSX.Element, {
16
+ declare const BondContainer: import("react-redux").ConnectedComponent<(props: import("./Bond").BondProps & import("../../../modal.types").BaseCallProps & {
17
+ isMonomerCreationWizardActive?: boolean | undefined;
18
+ }) => import("react/jsx-runtime").JSX.Element, {
17
19
  className: string;
18
20
  type: string;
19
21
  topology: number | null;
@@ -22,7 +22,9 @@ interface BondSettings {
22
22
  }
23
23
  interface BondProps extends BaseProps, BondSettings {
24
24
  }
25
- declare type Props = BondProps & BaseCallProps;
25
+ declare type Props = BondProps & BaseCallProps & {
26
+ isMonomerCreationWizardActive?: boolean;
27
+ };
26
28
  declare const Bond: (props: Props) => import("react/jsx-runtime").JSX.Element;
27
29
  export type { BondProps };
28
30
  export default Bond;
@@ -16,8 +16,8 @@
16
16
  interface ArrowScrollProps {
17
17
  startInView: boolean;
18
18
  endInView: boolean;
19
- scrollForward: any;
20
- scrollBack: any;
19
+ scrollForward: (dtMs: number) => void;
20
+ scrollBack: (dtMs: number) => void;
21
21
  isLeftRight?: boolean;
22
22
  }
23
23
  declare const ArrowScroll: ({ startInView, endInView, scrollForward, scrollBack, isLeftRight, }: ArrowScrollProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ketcher-react",
3
- "version": "3.8.0-rc.4",
3
+ "version": "3.9.0-rc.2",
4
4
  "description": "Web-based molecule sketcher",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "http://lifescience.opensource.epam.com/ketcher",
@@ -81,7 +81,6 @@
81
81
  "subscription": "^3.0.0",
82
82
  "url-search-params-polyfill": "^8.1.1",
83
83
  "use-resize-observer": "^7.0.0",
84
- "w3c-keyname": "^2.2.4",
85
84
  "whatwg-fetch": "^3.4.1"
86
85
  },
87
86
  "devDependencies": {