ketcher-react 2.12.0-rc.4 → 2.13.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.
Files changed (78) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +3 -0
  2. package/dist/components/Accordion/index.d.ts +16 -0
  3. package/dist/components/Accordion/styles.d.ts +29 -0
  4. package/dist/components/Accordion/types.d.ts +26 -0
  5. package/dist/components/Buttons/Button/Button.d.ts +2 -0
  6. package/dist/components/Buttons/Button/index.d.ts +16 -0
  7. package/dist/components/Buttons/Button/styles.d.ts +5 -0
  8. package/dist/components/Buttons/IconButton/IconButton.d.ts +1 -1
  9. package/dist/components/Buttons/index.d.ts +1 -0
  10. package/dist/components/Icon/utils/iconNameToIcon.d.ts +5 -0
  11. package/dist/components/InfoModal/InfoModal.d.ts +22 -0
  12. package/dist/components/InfoModal/constants.d.ts +4 -0
  13. package/dist/components/InfoModal/index.d.ts +17 -0
  14. package/dist/components/Input/Input.d.ts +2 -0
  15. package/dist/components/Input/index.d.ts +16 -0
  16. package/dist/components/Input/styles.d.ts +20 -0
  17. package/dist/components/StructRender/StructRender.d.ts +19 -0
  18. package/dist/components/StructRender/index.d.ts +16 -0
  19. package/dist/components/StructRender/styles.d.ts +20 -0
  20. package/dist/{script/ui/component/structrender.d.ts → components/StructRender/types.d.ts} +7 -15
  21. package/dist/components/index.d.ts +4 -0
  22. package/dist/components/styles/consts.d.ts +13 -0
  23. package/dist/index.css +1 -1
  24. package/dist/index.css.map +1 -1
  25. package/dist/index.js +2175 -1491
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.modern.js +2177 -1498
  28. package/dist/index.modern.js.map +1 -1
  29. package/dist/script/editor/Editor.d.ts +3 -8
  30. package/dist/script/editor/shared/utils.d.ts +12 -0
  31. package/dist/script/editor/tool/rotate-controller.d.ts +4 -1
  32. package/dist/script/editor/tool/rotate.d.ts +22 -8
  33. package/dist/script/editor/utils/functionalGroupsTooltip.d.ts +1 -1
  34. package/dist/script/editor/utils/index.d.ts +1 -0
  35. package/dist/script/editor/utils/structLayout.d.ts +4 -0
  36. package/dist/script/index.d.ts +1 -1
  37. package/dist/script/ui/action/index.d.ts +16 -3
  38. package/dist/script/ui/component/form/Select/Select.d.ts +1 -1
  39. package/dist/script/ui/component/form/buttonlist.d.ts +1 -1
  40. package/dist/script/ui/dialog/toolbox/sgroup.test.d.ts +1 -0
  41. package/dist/script/ui/state/modal/atoms.d.ts +1 -1
  42. package/dist/script/ui/state/modal/bonds.d.ts +1 -1
  43. package/dist/script/ui/state/mouse.d.ts +1 -1
  44. package/dist/script/ui/state/shared.d.ts +9 -0
  45. package/dist/script/ui/views/Editor.d.ts +1 -1
  46. package/dist/script/ui/views/components/ContextMenu/ContextMenuTrigger.utils.d.ts +1 -1
  47. package/dist/script/ui/views/components/StructEditor/StructEditor.d.ts +1 -0
  48. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenGroup.d.ts +1 -1
  49. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenSet.d.ts +1 -1
  50. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/GenericGroups.d.ts +1 -1
  51. package/dist/script/ui/views/modal/components/ExtendedTable/components/GenericGroups/components/ButtonGenSet/ButtonGenSet.d.ts +1 -1
  52. package/dist/script/ui/views/modal/components/InfoModal/InfoModal.d.ts +19 -0
  53. package/dist/script/ui/views/modal/components/InfoModal/InfoModal.test.d.ts +1 -0
  54. package/dist/script/ui/views/modal/components/InfoModal/PasteErrorModalBody/PasteErrorModalBody.d.ts +2 -0
  55. package/dist/script/ui/views/modal/components/InfoModal/PasteErrorModalBody/index.d.ts +1 -0
  56. package/dist/script/ui/views/modal/components/InfoModal/constants.d.ts +9 -0
  57. package/dist/script/ui/views/modal/components/InfoModal/index.d.ts +16 -0
  58. package/dist/script/ui/views/modal/components/InfoModal/mockStore.d.ts +63 -0
  59. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/components/MainRow.d.ts +1 -1
  60. package/dist/script/ui/views/modal/components/PeriodTable/components/ElementsTable/components/OutinerRow.d.ts +1 -1
  61. package/dist/script/ui/views/modal/components/document/Open/components/DialogActionButton.d.ts +1 -1
  62. package/dist/script/ui/views/modal/components/document/Open/components/TextEditor.d.ts +1 -1
  63. package/dist/script/ui/views/toolbars/ArrowScroll/ArrowScroll.d.ts +1 -1
  64. package/dist/script/ui/views/toolbars/LeftToolbar/Bond/options.d.ts +1 -1
  65. package/dist/script/ui/views/toolbars/LeftToolbar/leftToolbarOptions.d.ts +1 -1
  66. package/dist/script/ui/views/toolbars/ToolbarGroupItem/ToolbarMultiToolItem/variants/variants.types.d.ts +1 -1
  67. package/dist/script/ui/views/toolbars/TopToolbar/ClipboardControls.d.ts +1 -1
  68. package/dist/script/ui/views/toolbars/TopToolbar/ElementWithDropdown.d.ts +1 -1
  69. package/dist/script/ui/views/toolbars/TopToolbar/ExternalFuncControls.d.ts +1 -1
  70. package/dist/script/ui/views/toolbars/TopToolbar/FileControls.d.ts +1 -1
  71. package/dist/script/ui/views/toolbars/TopToolbar/SystemControls.d.ts +1 -1
  72. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.container.d.ts +1 -1
  73. package/dist/script/ui/views/toolbars/TopToolbar/TopToolbar.d.ts +1 -1
  74. package/dist/script/ui/views/toolbars/TopToolbar/UndoRedo.d.ts +1 -1
  75. package/dist/script/ui/views/toolbars/TopToolbar/ZoomControls.d.ts +1 -1
  76. package/dist/script/ui/views/toolbars/TopToolbar/ZoomInput.d.ts +1 -1
  77. package/dist/script/ui/views/toolbars/toolbar.types.d.ts +1 -1
  78. package/package.json +2 -2
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { IAccordionProps } from './types';
3
+ export declare const Accordion: ({ summary, details, expanded, className, onSummaryClick, }: IAccordionProps) => JSX.Element;
@@ -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 { Accordion } from './Accordion';
@@ -0,0 +1,29 @@
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 { IDetailsContainerProps } from './types';
18
+ export declare const Container: import("@emotion/styled").StyledComponent<{
19
+ theme?: import("@emotion/react").Theme | undefined;
20
+ as?: import("react").ElementType<any> | undefined;
21
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
22
+ export declare const SummaryContainer: import("@emotion/styled").StyledComponent<{
23
+ theme?: import("@emotion/react").Theme | undefined;
24
+ as?: import("react").ElementType<any> | undefined;
25
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
26
+ export declare const DetailsContainer: import("@emotion/styled").StyledComponent<{
27
+ theme?: import("@emotion/react").Theme | undefined;
28
+ as?: import("react").ElementType<any> | undefined;
29
+ } & IDetailsContainerProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -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
+ /// <reference types="react" />
17
+ export interface IAccordionProps {
18
+ summary: React.ReactNode;
19
+ details: React.ReactNode;
20
+ expanded: boolean;
21
+ onSummaryClick: React.MouseEventHandler<HTMLDivElement>;
22
+ className?: string;
23
+ }
24
+ export interface IDetailsContainerProps {
25
+ expanded: boolean;
26
+ }
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Button: ({ children, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>) => JSX.Element;
@@ -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 { Button } from './Button';
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledButton: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
@@ -15,5 +15,5 @@
15
15
  ***************************************************************************/
16
16
  /// <reference types="react" />
17
17
  import { IIconButtonProps } from './types';
18
- export declare const IconButton: ({ onClick, iconName, shortcut, title, className, isActive, isHidden, disabled }: IIconButtonProps) => JSX.Element | null;
18
+ export declare const IconButton: ({ onClick, iconName, shortcut, title, className, isActive, isHidden, disabled, }: IIconButtonProps) => JSX.Element | null;
19
19
  export default IconButton;
@@ -14,3 +14,4 @@
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
16
  export * from './IconButton';
17
+ export * from './Button';
@@ -206,4 +206,9 @@ export declare const iconNameToIcon: {
206
206
  readonly 'rap-right-link': ReactComponent;
207
207
  readonly 'arrows-left': ReactComponent;
208
208
  readonly 'arrows-right': ReactComponent;
209
+ readonly sugar: ReactComponent;
210
+ readonly base: ReactComponent;
211
+ readonly phosphate: ReactComponent;
212
+ readonly preset: ReactComponent;
213
+ readonly 'edit-filled': ReactComponent;
209
214
  };
@@ -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
+ interface InfoModalProps {
18
+ message: string;
19
+ close: () => void;
20
+ }
21
+ declare const InfoModal: ({ message, close }: InfoModalProps) => JSX.Element;
22
+ export default InfoModal;
@@ -0,0 +1,4 @@
1
+ export declare const error: {
2
+ message: string;
3
+ close: string;
4
+ };
@@ -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 InfoModal from './InfoModal';
17
+ export { InfoModal };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Input: (props: React.InputHTMLAttributes<HTMLInputElement>) => JSX.Element;
@@ -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 { Input } from './Input';
@@ -0,0 +1,20 @@
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 StyledInput: import("@emotion/styled").StyledComponent<{
18
+ theme?: import("@emotion/react").Theme | undefined;
19
+ as?: import("react").ElementType<any> | undefined;
20
+ }, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
@@ -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
+ /// <reference types="react" />
17
+ import { IStructRenderProps } from './types';
18
+ declare const StructRender: ({ struct, options, className }: IStructRenderProps) => JSX.Element;
19
+ export default StructRender;
@@ -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 { default as StructRender } from './StructRender';
@@ -0,0 +1,20 @@
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 Container: import("@emotion/styled").StyledComponent<{
18
+ theme?: import("@emotion/react").Theme | undefined;
19
+ as?: import("react").ElementType<any> | undefined;
20
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -13,21 +13,13 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  ***************************************************************************/
16
- import { Component, ComponentType } from 'react';
16
+ import { RenderOptions } from 'application/render/render.types';
17
17
  import { Struct } from 'ketcher-core';
18
- interface StructRenderProps {
18
+ export interface IStructRenderProps {
19
19
  struct: Struct;
20
- options: any;
21
- id?: any;
22
- Tag?: string | ComponentType<any>;
20
+ options?: RenderOptions & {
21
+ cachePrefix?: string;
22
+ needCache?: boolean;
23
+ };
24
+ className?: string;
23
25
  }
24
- declare class StructRender extends Component<StructRenderProps> {
25
- tagRef: React.RefObject<HTMLElement>;
26
- constructor(props: any);
27
- shouldComponentUpdate(previousProps: any): boolean;
28
- update(): void;
29
- componentDidMount(): void;
30
- componentDidUpdate(): void;
31
- render(): JSX.Element;
32
- }
33
- export default StructRender;
@@ -15,3 +15,7 @@
15
15
  ***************************************************************************/
16
16
  export * from './Icon';
17
17
  export * from './Buttons';
18
+ export * from './StructRender';
19
+ export * from './Input';
20
+ export * from './Accordion';
21
+ export * from './InfoModal';
@@ -21,9 +21,22 @@ declare const _default: {
21
21
  readonly hover: "#188794";
22
22
  };
23
23
  };
24
+ font: {
25
+ readonly size: {
26
+ readonly small: "10px";
27
+ readonly regular: "12px";
28
+ };
29
+ readonly weight: {
30
+ readonly regular: "400";
31
+ };
32
+ };
24
33
  border: {
34
+ readonly primary: "1px solid #cad3dd";
35
+ readonly secondary: "1px solid #167782";
36
+ readonly medium: "1.5px solid #188794";
25
37
  readonly radius: {
26
38
  readonly regular: "2px";
39
+ readonly medium: "4px";
27
40
  };
28
41
  };
29
42
  color: {