From acc7ae20036b28de9c5d44321260cdf4f0b937f5 Mon Sep 17 00:00:00 2001 From: sergei_kalugin Date: Fri, 14 Jul 2023 17:09:16 +0400 Subject: [PATCH] #2765 - refactor import statements for sGroupAttachmentPoint --- .../editor/operations/sgroup/sgroupAttachmentPoints.ts | 2 +- packages/ketcher-core/src/domain/entities/index.ts | 1 + packages/ketcher-core/src/domain/entities/sgroup.ts | 3 +-- .../domain/serializers/ket/fromKet/moleculeToStruct.ts | 9 +++++++-- .../src/domain/serializers/ket/toKet/moleculeToKet.ts | 3 +-- .../ketcher-core/src/domain/serializers/mol/molfile.ts | 3 +-- .../src/domain/serializers/mol/parseSGroup.js | 3 +-- 7 files changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/ketcher-core/src/application/editor/operations/sgroup/sgroupAttachmentPoints.ts b/packages/ketcher-core/src/application/editor/operations/sgroup/sgroupAttachmentPoints.ts index a22bef96cc..7129620a58 100644 --- a/packages/ketcher-core/src/application/editor/operations/sgroup/sgroupAttachmentPoints.ts +++ b/packages/ketcher-core/src/application/editor/operations/sgroup/sgroupAttachmentPoints.ts @@ -1,7 +1,7 @@ import { BaseOperation } from '../base'; import { OperationType } from '../OperationType'; import { ReStruct } from '../../../render'; -import { SGroupAttachmentPoint } from 'domain/entities/sGroupAttachmentPoint'; +import { SGroupAttachmentPoint } from 'domain/entities'; import assert from 'assert'; type Data = { diff --git a/packages/ketcher-core/src/domain/entities/index.ts b/packages/ketcher-core/src/domain/entities/index.ts index ded52fdd6c..72bd7cf6f8 100644 --- a/packages/ketcher-core/src/domain/entities/index.ts +++ b/packages/ketcher-core/src/domain/entities/index.ts @@ -34,3 +34,4 @@ export * from './vec2'; export * from './box2Abs'; export * from './pool'; export * from './highlight'; +export * from './sGroupAttachmentPoint'; diff --git a/packages/ketcher-core/src/domain/entities/sgroup.ts b/packages/ketcher-core/src/domain/entities/sgroup.ts index 0daa677b5c..e06312b8ff 100644 --- a/packages/ketcher-core/src/domain/entities/sgroup.ts +++ b/packages/ketcher-core/src/domain/entities/sgroup.ts @@ -22,10 +22,9 @@ import { Struct } from './struct'; import { SaltsAndSolventsProvider } from '../helpers'; import { Vec2 } from './vec2'; import { ReStruct } from '../../application/render'; -import { Pool } from 'domain/entities/pool'; +import { Pool, SGroupAttachmentPoint } from 'domain/entities'; import { ReSGroup } from 'application/render'; import { SgContexts } from 'application/editor/shared/constants'; -import { SGroupAttachmentPoint } from 'domain/entities/sGroupAttachmentPoint'; import assert from 'assert'; export class SGroupBracketParams { diff --git a/packages/ketcher-core/src/domain/serializers/ket/fromKet/moleculeToStruct.ts b/packages/ketcher-core/src/domain/serializers/ket/fromKet/moleculeToStruct.ts index 2758520950..a601408af9 100644 --- a/packages/ketcher-core/src/domain/serializers/ket/fromKet/moleculeToStruct.ts +++ b/packages/ketcher-core/src/domain/serializers/ket/fromKet/moleculeToStruct.ts @@ -14,11 +14,16 @@ * limitations under the License. ***************************************************************************/ -import { Atom, Bond, SGroup, Struct } from 'domain/entities'; +import { + Atom, + Bond, + SGroup, + Struct, + SGroupAttachmentPoint, +} from 'domain/entities'; import { Elements } from 'domain/constants'; import { ifDef } from 'utilities'; -import { SGroupAttachmentPoint } from 'domain/entities/sGroupAttachmentPoint'; import { mergeFragmentsToStruct } from './mergeFragmentsToStruct'; export function toRlabel(values) { diff --git a/packages/ketcher-core/src/domain/serializers/ket/toKet/moleculeToKet.ts b/packages/ketcher-core/src/domain/serializers/ket/toKet/moleculeToKet.ts index 5c7d776a9a..5fe182a883 100644 --- a/packages/ketcher-core/src/domain/serializers/ket/toKet/moleculeToKet.ts +++ b/packages/ketcher-core/src/domain/serializers/ket/toKet/moleculeToKet.ts @@ -14,10 +14,9 @@ * limitations under the License. ***************************************************************************/ -import { SGroup, Struct } from 'domain/entities'; +import { SGroup, Struct, SGroupAttachmentPoint } from 'domain/entities'; import { ifDef } from 'utilities'; -import { SGroupAttachmentPoint } from 'domain/entities/sGroupAttachmentPoint'; function fromRlabel(rg) { const res: Array = []; diff --git a/packages/ketcher-core/src/domain/serializers/mol/molfile.ts b/packages/ketcher-core/src/domain/serializers/mol/molfile.ts index 2455274e8c..87f3ecc85e 100644 --- a/packages/ketcher-core/src/domain/serializers/mol/molfile.ts +++ b/packages/ketcher-core/src/domain/serializers/mol/molfile.ts @@ -14,12 +14,11 @@ * limitations under the License. ***************************************************************************/ -import { StereoFlag, Struct } from 'domain/entities'; +import { StereoFlag, Struct, SGroupAttachmentPoint } from 'domain/entities'; import { Elements } from 'domain/constants'; import common from './common'; import utils from './utils'; -import { SGroupAttachmentPoint } from 'domain/entities/sGroupAttachmentPoint'; const END_V2000 = '2D 1 1.00000 0.00000 0'; diff --git a/packages/ketcher-core/src/domain/serializers/mol/parseSGroup.js b/packages/ketcher-core/src/domain/serializers/mol/parseSGroup.js index 895dc3b8a6..db377d398a 100644 --- a/packages/ketcher-core/src/domain/serializers/mol/parseSGroup.js +++ b/packages/ketcher-core/src/domain/serializers/mol/parseSGroup.js @@ -14,10 +14,9 @@ * limitations under the License. ***************************************************************************/ -import { Pool, SGroup, Vec2 } from 'domain/entities'; +import { Pool, SGroup, Vec2, SGroupAttachmentPoint } from 'domain/entities'; import utils from './utils'; -import { SGroupAttachmentPoint } from 'domain/entities/sGroupAttachmentPoint'; import assert from 'assert'; /**