ketcher-macromolecules 2.20.0 → 2.21.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 (29) hide show
  1. package/dist/components/contextMenu/SequenceItemContextMenu/SequenceItemContextMenu.d.ts +7 -0
  2. package/dist/components/contextMenu/SequenceItemContextMenu/helpers.d.ts +8 -0
  3. package/dist/components/contextMenu/SequenceItemContextMenu/helpers.test.d.ts +1 -0
  4. package/dist/components/menu/Menu.d.ts +4 -2
  5. package/dist/components/menu/menuItem/MenuItem.d.ts +2 -1
  6. package/dist/components/menu/subMenu/SubMenu.d.ts +2 -1
  7. package/dist/components/modal/UpdateSequenceInRNABuilder/UpdateSequenceInRNABuilder.d.ts +6 -0
  8. package/dist/components/modal/UpdateSequenceInRNABuilder/UpdateSequenceInRNABuilder.test.d.ts +16 -0
  9. package/dist/components/modal/UpdateSequenceInRNABuilder/index.d.ts +16 -0
  10. package/dist/components/modal/modalContainer/modalComponentList.d.ts +2 -1
  11. package/dist/components/modal/modalContainer/types.d.ts +1 -1
  12. package/dist/components/monomerLibrary/RnaBuilder/RnaEditor/RnaEditorExpanded/helpers/sequenceEdit.d.ts +7 -0
  13. package/dist/components/monomerLibrary/RnaBuilder/RnaEditor/RnaEditorExpanded/helpers/sequenceEdit.test.d.ts +1 -0
  14. package/dist/components/monomerLibrary/monomerLibraryGroup/MonomerGroup.d.ts +1 -1
  15. package/dist/components/monomerLibrary/monomerLibraryGroup/types.d.ts +2 -1
  16. package/dist/components/monomerLibrary/monomerLibraryItem/MonomerItem.d.ts +1 -1
  17. package/dist/components/monomerLibrary/monomerLibraryItem/hooks/useDisabledForSequenceMode.d.ts +3 -0
  18. package/dist/components/monomerLibrary/monomerLibraryItem/hooks/useDisabledForSequenceMode.test.d.ts +1 -0
  19. package/dist/components/monomerLibrary/monomerLibraryItem/types.d.ts +2 -1
  20. package/dist/hooks/stateHooks.d.ts +1 -0
  21. package/dist/index.js +681 -266
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.modern.js +681 -268
  24. package/dist/index.modern.js.map +1 -1
  25. package/dist/state/rna-builder/rnaBuilderSlice.d.ts +11 -2
  26. package/dist/styledComponents.d.ts +4 -0
  27. package/dist/theming/defaultTheme/theme.types.d.ts +3 -0
  28. package/package.json +1 -1
  29. package/dist/components/contextMenu/SequenceItemContextMenu.d.ts +0 -2
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { NodesSelection } from 'ketcher-core';
3
+ declare type SequenceItemContextMenuType = {
4
+ selections?: NodesSelection;
5
+ };
6
+ export declare const SequenceItemContextMenu: ({ selections, }: SequenceItemContextMenuType) => import("react").ReactPortal | null;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import { LabeledNucleotideWithPositionInSequence, NodesSelection } from 'ketcher-core';
2
+ export declare const generateSequenceContextMenuProps: (selections?: NodesSelection) => {
3
+ title: string;
4
+ isSelectedOnlyNucleotides: boolean;
5
+ isSelectedAtLeastOneNucleotide: boolean;
6
+ selectedSequenceLabeledNucleotides: LabeledNucleotideWithPositionInSequence[];
7
+ isSequenceFirstsOnlyNucleotidesSelected: boolean;
8
+ } | undefined;
@@ -19,14 +19,16 @@ import { GroupProps, MenuProps } from './types';
19
19
  declare const Menu: {
20
20
  ({ children, onItemClick, activeMenuItems, testId, }: React.PropsWithChildren<MenuProps>): import("@emotion/react/jsx-runtime").JSX.Element;
21
21
  Group: ({ children, divider, }: React.PropsWithChildren<GroupProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
22
- Item: ({ itemId, title, testId, onClick }: {
22
+ Item: ({ itemId, title, disabled, testId, onClick, }: {
23
23
  itemId: "α" | "β" | "γ" | "δ" | "ε" | "ζ" | "η" | "θ" | "ι" | "κ" | "λ" | "μ" | "ν" | "ξ" | "ο" | "π" | "ρ" | "σ" | "τ" | "υ" | "φ" | "χ" | "ψ" | "ω" | "Å" | "°" | "ħ" | "±" | "‰" | "√" | "←" | "→" | "←/" | "/→" | "↔" | "∏" | "∑" | "∞" | "∂" | "∆" | "∫" | "≈" | "=/" | "≤" | "≥" | "℉" | "℃" | "about" | "analyse" | "any-atom" | "arom" | "arrow-upward" | "bond-any" | "bond-aromatic" | "bond-crossed" | "bond-hydrogen" | "bond-dative" | "bond-double" | "bond-doublearomatic" | "bond-down" | "bond-single" | "bond-singlearomatic" | "bond-singledouble" | "bond-triple" | "bond-up" | "bond-updown" | "capital-t" | "chain" | "charge-minus" | "charge-plus" | "check" | "check-mark" | "chiral-flag" | "cip" | "clean" | "copies" | "copy" | "copy-image" | "copy-mol" | "copy-ket" | "cut" | "dearom" | "delete" | "dropdown" | "enhanced-stereo" | "edit" | "elements-group" | "extended-table" | "erase" | "file-thumbnail" | "fullscreen-enter" | "fullscreen-exit" | "generic-groups" | "hand" | "compressedhand" | "help" | "history" | "image-frame" | "layout" | "logo" | "miew" | "macromolecules-mode" | "molecules-mode" | "clear" | "open" | "paste" | "period-table" | "reaction-arrow-elliptical-arc-arrow-filled-bow" | "reaction-arrow-elliptical-arc-arrow-filled-triangle" | "reaction-arrow-elliptical-arc-arrow-open-angle" | "reaction-arrow-elliptical-arc-arrow-open-half-angle" | "reaction-arrow-open-angle" | "reaction-arrow-filled-triangle" | "reaction-arrow-filled-bow" | "reaction-arrow-dashed-open-angle" | "reaction-arrow-failed" | "reaction-arrow-both-ends-filled-triangle" | "reaction-arrow-equilibrium-filled-half-bow" | "reaction-arrow-equilibrium-filled-triangle" | "reaction-arrow-equilibrium-open-angle" | "reaction-arrow-unbalanced-equilibrium-filled-half-bow" | "reaction-arrow-unbalanced-equilibrium-open-half-angle" | "reaction-arrow-unbalanced-equilibrium-large-filled-half-bow" | "reaction-arrow-unbalanced-equilibrium-filled-half-triangle" | "reaction-automap" | "reaction-map" | "reaction-plus" | "reaction-unmap" | "recognize" | "redo" | "rgroup-attpoints" | "rgroup-fragment" | "rgroup-label" | "save" | "search" | "select-fragment" | "select-lasso" | "select-rectangle" | "settings" | "sgroup" | "template-0" | "template-1" | "template-2" | "template-3" | "template-4" | "template-5" | "template-6" | "template-7" | "template-dialog" | "template-lib" | "snake-mode" | "text" | "text-bold" | "text-italic" | "text-subscript" | "text-superscript" | "transform-flip-h" | "transform-flip-v" | "undo" | "zoom-in" | "zoom-out" | "zoom-reset" | "shape-ellipse" | "shape-rectangle" | "shape-polyline" | "shape-line" | "not-found" | "save-1" | "open-1" | "reset" | "close" | "general" | "general-white" | "stereo" | "stereo-white" | "atoms" | "atoms-white" | "bonds" | "bonds-white" | "server" | "server-white" | "3dviewer" | "3dviewer-white" | "debugging" | "debugging-white" | "dropdown-indicator" | "text-special-symbols" | "chevron" | "open-window-paste-icon" | "open-window-upload-icon" | "bracket" | "error" | "rap-left-link" | "rap-middle-link" | "rap-right-link" | "arrows-left" | "arrows-right" | "sugar" | "base" | "phosphate" | "preset" | "edit-filled" | "vertical-dots" | "expand" | "minimize-expansion" | "explicit-hydrogens" | "flex-layout-mode" | "snake-layout-mode" | "sequence-layout-mode";
24
24
  title?: string | undefined;
25
25
  testId?: string | undefined;
26
+ disabled?: boolean | undefined;
26
27
  onClick?: (() => void) | undefined;
27
28
  }) => import("@emotion/react/jsx-runtime").JSX.Element;
28
- Submenu: ({ children, vertical, needOpenByMenuItemClick, testId, }: React.PropsWithChildren<{
29
+ Submenu: ({ children, vertical, disabled, needOpenByMenuItemClick, testId, }: React.PropsWithChildren<{
29
30
  vertical?: boolean | undefined;
31
+ disabled?: boolean | undefined;
30
32
  needOpenByMenuItemClick?: boolean | undefined;
31
33
  testId?: string | undefined;
32
34
  }>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -18,7 +18,8 @@ declare type MenuItemProp = {
18
18
  itemId: IconName;
19
19
  title?: string;
20
20
  testId?: string;
21
+ disabled?: boolean;
21
22
  onClick?: () => void;
22
23
  };
23
- declare const MenuItem: ({ itemId, title, testId, onClick }: MenuItemProp) => import("@emotion/react/jsx-runtime").JSX.Element;
24
+ declare const MenuItem: ({ itemId, title, disabled, testId, onClick, }: MenuItemProp) => import("@emotion/react/jsx-runtime").JSX.Element;
24
25
  export { MenuItem };
@@ -16,8 +16,9 @@
16
16
  import React from 'react';
17
17
  declare type SubMenuProps = {
18
18
  vertical?: boolean;
19
+ disabled?: boolean;
19
20
  needOpenByMenuItemClick?: boolean;
20
21
  testId?: string;
21
22
  };
22
- declare const SubMenu: ({ children, vertical, needOpenByMenuItemClick, testId, }: React.PropsWithChildren<SubMenuProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
23
+ declare const SubMenu: ({ children, vertical, disabled, needOpenByMenuItemClick, testId, }: React.PropsWithChildren<SubMenuProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
23
24
  export { SubMenu };
@@ -0,0 +1,6 @@
1
+ export interface Props {
2
+ onClose: () => void;
3
+ isModalOpen: boolean;
4
+ }
5
+ declare const UpdateSequenceInRNABuilder: ({ isModalOpen, onClose }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export { UpdateSequenceInRNABuilder };
@@ -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,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 './UpdateSequenceInRNABuilder';
@@ -16,5 +16,6 @@
16
16
  import { Open } from "../Open";
17
17
  import { Save } from "../save";
18
18
  import { Delete } from "../Delete";
19
+ import { UpdateSequenceInRNABuilder } from "../UpdateSequenceInRNABuilder";
19
20
  import { MonomerConnection } from "../monomerConnection";
20
- export declare const modalComponentList: Record<string, typeof Open | typeof Save | typeof Delete | typeof MonomerConnection>;
21
+ export declare const modalComponentList: Record<string, typeof Open | typeof Save | typeof Delete | typeof UpdateSequenceInRNABuilder | typeof MonomerConnection>;
@@ -1,4 +1,4 @@
1
- import { BaseMonomer } from 'ketcher-core/dist/domain/entities/BaseMonomer';
1
+ import { BaseMonomer } from 'ketcher-core';
2
2
  export interface MonomerConnectionOnlyProps {
3
3
  firstMonomer?: BaseMonomer;
4
4
  secondMonomer?: BaseMonomer;
@@ -0,0 +1,7 @@
1
+ import { LabeledNucleotideWithPositionInSequence } from 'ketcher-core';
2
+ export declare const generateSequenceSelectionGroupNames: (labeledNucleotides?: LabeledNucleotideWithPositionInSequence[]) => {
3
+ Sugars: string;
4
+ Bases: string;
5
+ Phosphates: string;
6
+ } | undefined;
7
+ export declare const generateSequenceSelectionName: (labeledNucleotide: LabeledNucleotideWithPositionInSequence) => string;
@@ -1,3 +1,3 @@
1
1
  import { IMonomerGroupProps } from './types';
2
- declare const MonomerGroup: ({ items, title, selectedMonomerUniqueKey, libraryName, disabled, onItemClick, }: IMonomerGroupProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ declare const MonomerGroup: ({ items, title, groupName, selectedMonomerUniqueKey, libraryName, disabled, onItemClick, }: IMonomerGroupProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export { MonomerGroup };
@@ -14,11 +14,12 @@
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
16
  import { LibraryNameType } from '../../../constants';
17
- import { MonomerItemType } from 'ketcher-core';
17
+ import { MonomerGroups, MonomerItemType } from 'ketcher-core';
18
18
  export interface IMonomerGroupProps {
19
19
  items: MonomerItemType[];
20
20
  onItemClick?: (item: MonomerItemType) => void;
21
21
  title?: string;
22
+ groupName?: MonomerGroups;
22
23
  libraryName?: LibraryNameType;
23
24
  disabled?: boolean;
24
25
  selectedMonomerUniqueKey?: string;
@@ -1,3 +1,3 @@
1
1
  import { IMonomerItemProps } from './types';
2
- declare const MonomerItem: ({ item, onMouseLeave, onMouseMove, isSelected, disabled, onClick, }: IMonomerItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ declare const MonomerItem: ({ item, groupName, onMouseLeave, onMouseMove, isSelected, disabled, onClick, }: IMonomerItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export { MonomerItem };
@@ -0,0 +1,3 @@
1
+ import { MonomerGroups, MonomerItemType } from 'ketcher-core';
2
+ declare const useDisabledForSequenceMode: (item: MonomerItemType, groupName?: MonomerGroups) => boolean;
3
+ export default useDisabledForSequenceMode;
@@ -14,9 +14,10 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  ***************************************************************************/
17
- import { MonomerItemType } from 'ketcher-core';
17
+ import { MonomerGroups, MonomerItemType } from 'ketcher-core';
18
18
  export interface IMonomerItemProps {
19
19
  item: MonomerItemType;
20
+ groupName?: MonomerGroups;
20
21
  disabled?: boolean;
21
22
  isSelected?: boolean;
22
23
  onClick?: VoidFunction;
@@ -19,3 +19,4 @@ import { LayoutMode } from 'ketcher-core';
19
19
  export declare const useAppDispatch: () => import("redux").Dispatch<import("redux").AnyAction>;
20
20
  export declare const useAppSelector: TypedUseSelectorHook<RootState>;
21
21
  export declare function useLayoutMode(): LayoutMode;
22
+ export declare function useSequenceEditInRNABuilderMode(): boolean;