From 8cb4624ed17d68117295ab9105cf4f824e9e11a7 Mon Sep 17 00:00:00 2001 From: Irina Kuzmina Date: Fri, 17 May 2024 16:40:50 +0300 Subject: [PATCH] fix(D3 plugin): fix import in utils (#482) chore(D3 plugin): fix import --- package-lock.json | 7 ++++--- package.json | 1 + src/plugins/d3/renderer/utils/text.ts | 2 +- src/plugins/d3/utils/pie-center-text.ts | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index d35203ad..edb1b40f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,6 +38,7 @@ "@storybook/react": "^7.0.26", "@storybook/react-webpack5": "^7.0.26", "@types/d3": "^7.4.0", + "@types/d3-selection": "^3.0.10", "@types/jest": "^28.1.3", "@types/lodash": "^4.14.177", "@types/node": "^18.0.0", @@ -7094,9 +7095,9 @@ "dev": true }, "node_modules/@types/d3-selection": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.5.tgz", - "integrity": "sha512-xCB0z3Hi8eFIqyja3vW8iV01+OHGYR2di/+e+AiOcXIOrY82lcvWW8Ke1DYE/EUVMsBl4Db9RppSBS3X1U6J0w==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.10.tgz", + "integrity": "sha512-cuHoUgS/V3hLdjJOLTT691+G2QoqAjCVLmr4kJXR4ha56w1Zdu8UUQ5TxLRqudgNjwXeQxKMq4j+lyf9sWuslg==", "dev": true }, "node_modules/@types/d3-shape": { diff --git a/package.json b/package.json index cd7ab1c1..f02c6032 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "@storybook/react": "^7.0.26", "@storybook/react-webpack5": "^7.0.26", "@types/d3": "^7.4.0", + "@types/d3-selection": "^3.0.10", "@types/jest": "^28.1.3", "@types/lodash": "^4.14.177", "@types/node": "^18.0.0", diff --git a/src/plugins/d3/renderer/utils/text.ts b/src/plugins/d3/renderer/utils/text.ts index cbbed5c9..19968a51 100644 --- a/src/plugins/d3/renderer/utils/text.ts +++ b/src/plugins/d3/renderer/utils/text.ts @@ -1,5 +1,5 @@ import type {Selection} from 'd3'; -import {select} from 'd3'; +import {select} from 'd3-selection'; import {BaseTextStyle} from '../../../../types'; diff --git a/src/plugins/d3/utils/pie-center-text.ts b/src/plugins/d3/utils/pie-center-text.ts index 0d5ad6b6..e2a3ba24 100644 --- a/src/plugins/d3/utils/pie-center-text.ts +++ b/src/plugins/d3/utils/pie-center-text.ts @@ -1,4 +1,4 @@ -import {create} from 'd3'; +import {create} from 'd3-selection'; import get from 'lodash/get'; import {getLabelsSize} from '../renderer/utils';