diff --git a/packages/ketcher-core/package.json b/packages/ketcher-core/package.json index c77817047f..efb61dea53 100644 --- a/packages/ketcher-core/package.json +++ b/packages/ketcher-core/package.json @@ -1,6 +1,6 @@ { "name": "ketcher-core", - "version": "2.6.0-rc.2", + "version": "2.6.0-rc.3", "description": "Web-based molecule sketcher", "license": "Apache-2.0", "homepage": "http://lifescience.opensource.epam.com/ketcher", @@ -44,8 +44,7 @@ "assert": "^2.0.0", "lodash": "^4.17.21", "raphael": "^2.3.0", - "svgpath": "^2.3.1", - "utf8": "^3.0.0" + "svgpath": "^2.3.1" }, "devDependencies": { "@babel/core": "^7.17.9", diff --git a/packages/ketcher-core/src/domain/serializers/ket/fromKet/textToStruct.ts b/packages/ketcher-core/src/domain/serializers/ket/fromKet/textToStruct.ts index 0bdd507aa7..2326ac503b 100644 --- a/packages/ketcher-core/src/domain/serializers/ket/fromKet/textToStruct.ts +++ b/packages/ketcher-core/src/domain/serializers/ket/fromKet/textToStruct.ts @@ -16,11 +16,10 @@ import { Struct, Text } from 'domain/entities' import { getNodeWithInvertedYCoord } from '../helpers' -import { utf8Converter } from '../utf8Converter' export function textToStruct(ketItem: any, struct: Struct) { const object = getNodeWithInvertedYCoord(ketItem.data) - struct.texts.add(new Text(utf8Converter(object, 'decode'))) + struct.texts.add(new Text(object)) return struct } diff --git a/packages/ketcher-core/src/domain/serializers/ket/toKet/textToKet.ts b/packages/ketcher-core/src/domain/serializers/ket/toKet/textToKet.ts index 840be9d21c..fa410f8f6a 100644 --- a/packages/ketcher-core/src/domain/serializers/ket/toKet/textToKet.ts +++ b/packages/ketcher-core/src/domain/serializers/ket/toKet/textToKet.ts @@ -14,11 +14,10 @@ * limitations under the License. ***************************************************************************/ import { getNodeWithInvertedYCoord } from '../helpers' -import { utf8Converter } from '../utf8Converter' export function textToKet(textNode) { return { type: 'text', - data: getNodeWithInvertedYCoord(utf8Converter(textNode.data, 'encode')) + data: getNodeWithInvertedYCoord(textNode.data) } } diff --git a/packages/ketcher-core/src/domain/serializers/ket/utf8Converter.ts b/packages/ketcher-core/src/domain/serializers/ket/utf8Converter.ts deleted file mode 100644 index 91442d3e6d..0000000000 --- a/packages/ketcher-core/src/domain/serializers/ket/utf8Converter.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as utf8 from 'utf8' - -export function utf8Converter(data, codeType) { - const content = JSON.parse(data.content) - content.blocks.map((block) => { - block.text = - codeType === 'encode' ? utf8.encode(block.text) : utf8.decode(block.text) - return block - }) - data.content = JSON.stringify(content) - return data -} diff --git a/packages/ketcher-react/package.json b/packages/ketcher-react/package.json index fec7a1fae9..0b80a995f8 100644 --- a/packages/ketcher-react/package.json +++ b/packages/ketcher-react/package.json @@ -1,6 +1,6 @@ { "name": "ketcher-react", - "version": "2.6.0-rc.2", + "version": "2.6.0-rc.3", "description": "Web-based molecule sketcher", "license": "Apache-2.0", "homepage": "http://lifescience.opensource.epam.com/ketcher", diff --git a/packages/ketcher-standalone/package.json b/packages/ketcher-standalone/package.json index b78e4eaa74..0c527778c3 100644 --- a/packages/ketcher-standalone/package.json +++ b/packages/ketcher-standalone/package.json @@ -1,6 +1,6 @@ { "name": "ketcher-standalone", - "version": "2.6.0-rc.2", + "version": "2.6.0-rc.3", "description": "Web-based molecule sketcher", "license": "Apache-2.0", "homepage": "http://lifescience.opensource.epam.com/ketcher", diff --git a/yarn.lock b/yarn.lock index f3d69d4459..2544dd1d8e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11226,7 +11226,6 @@ __metadata: typedoc: ^0.22.17 typedoc-plugin-markdown: ^3.12.1 typescript: ^4.5.2 - utf8: ^3.0.0 languageName: unknown linkType: soft @@ -17999,13 +17998,6 @@ __metadata: languageName: node linkType: hard -"utf8@npm:^3.0.0": - version: 3.0.0 - resolution: "utf8@npm:3.0.0" - checksum: cb89a69ad9ab393e3eae9b25305b3ff08bebca9adc839191a34f90777eb2942f86a96369d2839925fea58f8f722f7e27031d697f10f5f39690f8c5047303e62d - languageName: node - linkType: hard - "util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2"