@gravity-ui/chartkit 6.1.2 → 7.0.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.
@@ -6,4 +6,4 @@ export * from './types';
6
6
  *
7
7
  * DO NOT USE IT IN YOUR PRODUCTION
8
8
  * */
9
- export declare const D3Plugin: ChartKitPlugin;
9
+ export declare const GravityChartsPlugin: ChartKitPlugin;
@@ -6,8 +6,7 @@ export * from './types';
6
6
  *
7
7
  * DO NOT USE IT IN YOUR PRODUCTION
8
8
  * */
9
- export const D3Plugin = {
10
- // TODO: rename to 'gravity-chart' in the next major
11
- type: 'd3',
12
- renderer: React.lazy(() => import('./renderer/D3Widget')),
9
+ export const GravityChartsPlugin = {
10
+ type: 'gravity-charts',
11
+ renderer: React.lazy(() => import('./renderer/GravityChartsWidget')),
13
12
  };
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import type { ChartKitWidgetRef } from '../../../types';
3
- declare const D3Widget: React.ForwardRefExoticComponent<{
4
- type: "d3";
3
+ export declare const GravityChartsWidget: React.ForwardRefExoticComponent<{
4
+ type: "gravity-charts";
5
5
  data: import("@gravity-ui/charts").ChartData<any>;
6
6
  id?: string | undefined;
7
7
  isMobile?: boolean | undefined;
8
- onLoad?: ((data?: import("../../../types").ChartKitOnLoadData<"d3"> | undefined) => void) | undefined;
8
+ onLoad?: ((data?: import("../../../types").ChartKitOnLoadData<"gravity-charts"> | undefined) => void) | undefined;
9
9
  onRender?: ((data: import("../../../types").ChartKitOnRenderData) => void) | undefined;
10
- onChartLoad?: ((data: import("../../../types").ChartKitOnChartLoad<"d3">) => void) | undefined;
10
+ onChartLoad?: ((data: import("../../../types").ChartKitOnChartLoad<"gravity-charts">) => void) | undefined;
11
11
  onError?: import("../../../types").ChartKitOnError | undefined;
12
12
  renderError?: import("../../../types").RenderError | undefined;
13
13
  renderPluginLoader?: import("../../../types").ChartKitRenderPluginLoader | undefined;
@@ -16,4 +16,4 @@ declare const D3Widget: React.ForwardRefExoticComponent<{
16
16
  splitted?: boolean | undefined;
17
17
  } | undefined;
18
18
  } & React.RefAttributes<ChartKitWidgetRef | undefined>>;
19
- export default D3Widget;
19
+ export default GravityChartsWidget;
@@ -5,7 +5,7 @@ import { settings } from '../../../libs';
5
5
  import { measurePerformance } from '../../../utils';
6
6
  import { withSplitPane } from './withSplitPane/withSplitPane';
7
7
  const ChartWithSplitPane = withSplitPane(Chart);
8
- const D3Widget = React.forwardRef(function D3Widget(props, forwardedRef) {
8
+ export const GravityChartsWidget = React.forwardRef(function GravityChartsWidget(props, forwardedRef) {
9
9
  const { data, tooltip, onLoad, onRender, onChartLoad } = props;
10
10
  const lang = settings.get('lang');
11
11
  const performanceMeasure = React.useRef(measurePerformance());
@@ -43,4 +43,4 @@ const D3Widget = React.forwardRef(function D3Widget(props, forwardedRef) {
43
43
  }, [onChartLoad]);
44
44
  return React.createElement(ChartComponent, { ref: chartRef, data: data, lang: lang, onResize: handleResize });
45
45
  });
46
- export default D3Widget;
46
+ export default GravityChartsWidget;
@@ -1,5 +1,5 @@
1
1
  import type { ChartData } from '@gravity-ui/charts';
2
2
  export type * from '@gravity-ui/charts';
3
- export type D3WidgetData = {
3
+ export type GravityChartsWidgetData = {
4
4
  data: ChartData;
5
5
  };
@@ -32,7 +32,7 @@ export interface ChartKitWidget {
32
32
  forceUpdate: boolean;
33
33
  }, callExternalOnChange?: boolean) => void;
34
34
  };
35
- d3: {
35
+ 'gravity-charts': {
36
36
  data: ChartData;
37
37
  widget: never;
38
38
  tooltip?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/chartkit",
3
- "version": "6.1.2",
3
+ "version": "7.0.1",
4
4
  "description": "React component used to render charts based on any sources you need",
5
5
  "license": "MIT",
6
6
  "repository": "git@github.com:gravity-ui/ChartKit.git",
@@ -8,7 +8,7 @@
8
8
  "types": "build/index.d.ts",
9
9
  "exports": {
10
10
  ".": "./build/index.js",
11
- "./d3": "./build/plugins/d3/index.js",
11
+ "./gravity-charts": "./build/plugins/gravity-charts/index.js",
12
12
  "./highcharts": "./build/plugins/highcharts/index.js",
13
13
  "./indicator": "./build/plugins/indicator/index.js",
14
14
  "./yagr": "./build/plugins/yagr/index.js"
@@ -18,8 +18,8 @@
18
18
  "index.d.ts": [
19
19
  "./build/index.d.ts"
20
20
  ],
21
- "d3": [
22
- "./build/plugins/d3/index.d.ts"
21
+ "gravity-charts": [
22
+ "./build/plugins/gravity-charts/index.d.ts"
23
23
  ],
24
24
  "highcharts": [
25
25
  "./build/plugins/highcharts/index.d.ts"
@@ -47,7 +47,7 @@
47
47
  ],
48
48
  "dependencies": {
49
49
  "@bem-react/classname": "^1.6.0",
50
- "@gravity-ui/charts": "^0.8.0",
50
+ "@gravity-ui/charts": "^1.0.1",
51
51
  "@gravity-ui/date-utils": "^2.1.0",
52
52
  "@gravity-ui/i18n": "^1.0.0",
53
53
  "@gravity-ui/yagr": "^4.7.1",
File without changes