@semcore/d3-chart 3.0.0-beta.0 → 3.0.0

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 (97) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/lib/cjs/Area.js +9 -9
  3. package/lib/cjs/Axis.js +14 -14
  4. package/lib/cjs/Bar.js +8 -8
  5. package/lib/cjs/Bubble.js +33 -25
  6. package/lib/cjs/Bubble.js.map +1 -1
  7. package/lib/cjs/Donut.js +105 -89
  8. package/lib/cjs/Donut.js.map +1 -1
  9. package/lib/cjs/Dots.js +9 -9
  10. package/lib/cjs/HorizontalBar.js +8 -8
  11. package/lib/cjs/Hover.js +9 -7
  12. package/lib/cjs/Hover.js.map +1 -1
  13. package/lib/cjs/Line.js +8 -8
  14. package/lib/cjs/Plot.js +3 -3
  15. package/lib/cjs/Radar.js +22 -21
  16. package/lib/cjs/Radar.js.map +1 -1
  17. package/lib/cjs/RadialTree.js +75 -74
  18. package/lib/cjs/RadialTree.js.map +1 -1
  19. package/lib/cjs/ReferenceLine.js +9 -9
  20. package/lib/cjs/ResponsiveContainer.js +1 -2
  21. package/lib/cjs/ResponsiveContainer.js.map +1 -1
  22. package/lib/cjs/ScatterPlot.js +29 -21
  23. package/lib/cjs/ScatterPlot.js.map +1 -1
  24. package/lib/cjs/Tooltip.js +24 -13
  25. package/lib/cjs/Tooltip.js.map +1 -1
  26. package/lib/cjs/Venn.js +56 -35
  27. package/lib/cjs/Venn.js.map +1 -1
  28. package/lib/cjs/a11y/PlotA11yModule.js +2 -2
  29. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  30. package/lib/cjs/a11y/PlotA11yView.js +3 -3
  31. package/lib/cjs/a11y/hints.js.map +1 -1
  32. package/lib/cjs/a11y/serialize.js.map +1 -1
  33. package/lib/cjs/createElement.d.js +2 -0
  34. package/lib/cjs/createElement.d.js.map +1 -0
  35. package/lib/cjs/types/Bubble.d.js.map +1 -1
  36. package/lib/cjs/types/Hover.d.js.map +1 -1
  37. package/lib/cjs/types/Plot.d.js.map +1 -1
  38. package/lib/cjs/types/Tooltip.d.js.map +1 -1
  39. package/lib/cjs/types/index.d.js.map +1 -1
  40. package/lib/cjs/utils.js.map +1 -1
  41. package/lib/es6/Area.js +9 -9
  42. package/lib/es6/Axis.js +14 -14
  43. package/lib/es6/Bar.js +8 -8
  44. package/lib/es6/Bubble.js +35 -26
  45. package/lib/es6/Bubble.js.map +1 -1
  46. package/lib/es6/Donut.js +107 -90
  47. package/lib/es6/Donut.js.map +1 -1
  48. package/lib/es6/Dots.js +9 -9
  49. package/lib/es6/HorizontalBar.js +8 -8
  50. package/lib/es6/Hover.js +9 -7
  51. package/lib/es6/Hover.js.map +1 -1
  52. package/lib/es6/Line.js +8 -8
  53. package/lib/es6/Plot.js +3 -3
  54. package/lib/es6/Radar.js +22 -21
  55. package/lib/es6/Radar.js.map +1 -1
  56. package/lib/es6/RadialTree.js +73 -72
  57. package/lib/es6/RadialTree.js.map +1 -1
  58. package/lib/es6/ReferenceLine.js +9 -9
  59. package/lib/es6/ResponsiveContainer.js +0 -1
  60. package/lib/es6/ResponsiveContainer.js.map +1 -1
  61. package/lib/es6/ScatterPlot.js +31 -22
  62. package/lib/es6/ScatterPlot.js.map +1 -1
  63. package/lib/es6/Tooltip.js +24 -13
  64. package/lib/es6/Tooltip.js.map +1 -1
  65. package/lib/es6/Venn.js +58 -36
  66. package/lib/es6/Venn.js.map +1 -1
  67. package/lib/es6/a11y/PlotA11yModule.js +2 -2
  68. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  69. package/lib/es6/a11y/PlotA11yView.js +3 -3
  70. package/lib/es6/a11y/hints.js.map +1 -1
  71. package/lib/es6/a11y/serialize.js.map +1 -1
  72. package/lib/es6/createElement.d.js +2 -0
  73. package/lib/es6/createElement.d.js.map +1 -0
  74. package/lib/es6/types/Bubble.d.js.map +1 -1
  75. package/lib/es6/types/Hover.d.js.map +1 -1
  76. package/lib/es6/types/Plot.d.js.map +1 -1
  77. package/lib/es6/types/Tooltip.d.js.map +1 -1
  78. package/lib/es6/types/index.d.js +3 -0
  79. package/lib/es6/types/index.d.js.map +1 -1
  80. package/lib/es6/utils.js.map +1 -1
  81. package/lib/types/Bubble.d.ts +1 -5
  82. package/lib/types/Hover.d.ts +1 -1
  83. package/lib/types/Plot.d.ts +3 -5
  84. package/lib/types/RadialTree.d.ts +14 -14
  85. package/lib/types/Tooltip.d.ts +2 -2
  86. package/lib/types/a11y/PlotA11yModule.d.ts +1 -1
  87. package/lib/types/a11y/focus.d.ts +1 -1
  88. package/lib/types/a11y/hints.d.ts +5 -5
  89. package/lib/types/a11y/insights.d.ts +8 -8
  90. package/lib/types/a11y/intl.d.ts +1 -1
  91. package/lib/types/a11y/locale.d.ts +1 -1
  92. package/lib/types/a11y/serialize.d.ts +4 -4
  93. package/lib/types/a11y/summarize.d.ts +1 -1
  94. package/lib/types/createElement.d.ts +2 -0
  95. package/lib/types/index.d.ts +2 -0
  96. package/lib/types/utils.d.ts +7 -6
  97. package/package.json +10 -10
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { UnknownProperties, Intergalactic } from '@semcore/core';
3
- declare type RadianData = {
3
+ type RadianData = {
4
4
  /**
5
5
  * Text label on the end of radian.
6
6
  */
@@ -37,7 +37,7 @@ declare type RadianData = {
37
37
  /** @deprecated */
38
38
  export interface IRadialTreeProps extends RadialTreeProps, UnknownProperties {
39
39
  }
40
- export declare type RadialTreeProps = {
40
+ export type RadialTreeProps = {
41
41
  /**
42
42
  * List of radians. `{ label: string; key: string; capSize?: number; icon?: React.FC; color?: string; iconColor?: string; iconSize?: number; }`
43
43
  */
@@ -106,7 +106,7 @@ export declare type RadialTreeProps = {
106
106
  /** @deprecated */
107
107
  export interface IRadialTreeRadianProps extends RadialTreeRadianProps, UnknownProperties {
108
108
  }
109
- export declare type RadialTreeRadianProps = RadialTreeProps & {
109
+ export type RadialTreeRadianProps = RadialTreeProps & {
110
110
  radiansCount?: number;
111
111
  textWidth?: number;
112
112
  onRadianClick?: (key: string) => (event: React.MouseEvent) => void;
@@ -114,7 +114,7 @@ export declare type RadialTreeRadianProps = RadialTreeProps & {
114
114
  /** @deprecated */
115
115
  export interface IRadialTreeRadianInteractiveAreaProps extends RadialTreeRadianInteractiveAreaProps {
116
116
  }
117
- export declare type RadialTreeRadianInteractiveAreaProps = {
117
+ export type RadialTreeRadianInteractiveAreaProps = {
118
118
  x1?: number;
119
119
  y1?: number;
120
120
  x2?: number;
@@ -124,7 +124,7 @@ export declare type RadialTreeRadianInteractiveAreaProps = {
124
124
  /** @deprecated */
125
125
  export interface IRadialTreeRadianLineProps extends RadialTreeRadianLineProps, UnknownProperties {
126
126
  }
127
- export declare type RadialTreeRadianLineProps = {
127
+ export type RadialTreeRadianLineProps = {
128
128
  x1?: number;
129
129
  y1?: number;
130
130
  x2?: number;
@@ -134,7 +134,7 @@ export declare type RadialTreeRadianLineProps = {
134
134
  ['data-radial-animation']?: `${string}-line`;
135
135
  ['data-radian-index']?: number;
136
136
  };
137
- declare type RadialTreeRadianLineAsProps = IRadialTreeRadianLineProps & {
137
+ type RadialTreeRadianLineAsProps = IRadialTreeRadianLineProps & {
138
138
  Element: React.FC<{
139
139
  render: string;
140
140
  transparent: boolean;
@@ -145,7 +145,7 @@ declare const Line: React.FC<RadialTreeRadianLineAsProps>;
145
145
  /** @deprecated */
146
146
  export interface IRadialTreeRadianCapProps extends RadialTreeRadianCapProps, UnknownProperties {
147
147
  }
148
- export declare type RadialTreeRadianCapProps = {
148
+ export type RadialTreeRadianCapProps = {
149
149
  x?: number;
150
150
  y?: number;
151
151
  radius?: number;
@@ -154,7 +154,7 @@ export declare type RadialTreeRadianCapProps = {
154
154
  ['data-radial-animation']?: `${string}-cap-circle`;
155
155
  ['data-radian-index']?: number;
156
156
  };
157
- declare type RadialTreeRadianCapAsProps = IRadialTreeRadianCapProps & {
157
+ type RadialTreeRadianCapAsProps = IRadialTreeRadianCapProps & {
158
158
  Element: React.FC<{
159
159
  render: string;
160
160
  transparent: boolean;
@@ -165,7 +165,7 @@ declare const Cap: React.FC<RadialTreeRadianCapAsProps>;
165
165
  /** @deprecated */
166
166
  export interface IRadialTreeRadianIconProps extends RadialTreeRadianIconProps, UnknownProperties {
167
167
  }
168
- export declare type RadialTreeRadianIconProps = {
168
+ export type RadialTreeRadianIconProps = {
169
169
  x?: number;
170
170
  y?: number;
171
171
  iconSize?: number;
@@ -176,7 +176,7 @@ export declare type RadialTreeRadianIconProps = {
176
176
  isActive?: boolean;
177
177
  transparent?: boolean;
178
178
  };
179
- declare type RadialTreeRadianIconAsProps = IRadialTreeRadianIconProps & {
179
+ type RadialTreeRadianIconAsProps = IRadialTreeRadianIconProps & {
180
180
  Element: React.FC<{
181
181
  render: string | React.FC;
182
182
  transparent: boolean;
@@ -190,7 +190,7 @@ declare const Icon: React.FC<RadialTreeRadianIconAsProps>;
190
190
  /** @deprecated */
191
191
  export interface IRadialTreeRadianLabelProps extends RadialTreeRadianLabelProps, UnknownProperties {
192
192
  }
193
- export declare type RadialTreeRadianLabelProps = {
193
+ export type RadialTreeRadianLabelProps = {
194
194
  x?: number;
195
195
  y?: number;
196
196
  color?: string;
@@ -202,7 +202,7 @@ export declare type RadialTreeRadianLabelProps = {
202
202
  angle?: number;
203
203
  transparent?: boolean;
204
204
  };
205
- declare type RadialTreeRadianLabelAsProps = IRadialTreeRadianLabelProps & {
205
+ type RadialTreeRadianLabelAsProps = IRadialTreeRadianLabelProps & {
206
206
  Element: React.FC<{
207
207
  render: string;
208
208
  } & React.SVGProps<any>>;
@@ -217,14 +217,14 @@ declare const Label: React.FC<RadialTreeRadianLabelAsProps>;
217
217
  /** @deprecated */
218
218
  export interface IRadialTreeTitleProps extends RadialTreeTitleProps, UnknownProperties {
219
219
  }
220
- export declare type RadialTreeTitleProps = {
220
+ export type RadialTreeTitleProps = {
221
221
  x?: number;
222
222
  y?: number;
223
223
  textSize?: number;
224
224
  ['data-radial-animation']?: `${string}-label`;
225
225
  color?: string;
226
226
  };
227
- declare type IntergalacticD3Component<BaseTag extends Intergalactic.InternalTypings.ComponentTag, Props, Context = {}> = (<Tag extends Intergalactic.InternalTypings.ComponentTag = Intergalactic.InternalTypings.ComponentTag>(props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>) => Intergalactic.InternalTypings.ComponentRenderingResults) & Intergalactic.InternalTypings.ComponentAdditive<BaseTag>;
227
+ type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<Tag extends Intergalactic.Tag = Intergalactic.Tag>(props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>) => Intergalactic.InternalTypings.ComponentRenderingResults) & Intergalactic.InternalTypings.ComponentAdditive<BaseTag>;
228
228
  declare const RadialTree: (<Tag extends Intergalactic.InternalTypings.ComponentTag = Intergalactic.InternalTypings.ComponentTag>(props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, RadialTreeProps, {}, never[]>) => Intergalactic.InternalTypings.ComponentRenderingResults) & Intergalactic.InternalTypings.ComponentAdditive<"g"> & {
229
229
  Title: IntergalacticD3Component<'text', RadialTreeTitleProps>;
230
230
  Radian: IntergalacticD3Component<'g', RadialTreeRadianProps> & {
@@ -36,7 +36,7 @@ export type TooltipTypeBase = {
36
36
  };
37
37
 
38
38
  export type TooltipType<ChildrenRenderProps = {}, TooltipProps = {}> = (<
39
- Tag extends Intergalactic.InternalTypings.ComponentTag = typeof Box,
39
+ Tag extends Intergalactic.Tag = typeof Box,
40
40
  >(
41
41
  props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<
42
42
  Tag,
@@ -44,7 +44,7 @@ export type TooltipType<ChildrenRenderProps = {}, TooltipProps = {}> = (<
44
44
  ChildrenRenderProps & TooltipChartContext
45
45
  >,
46
46
  ) => Intergalactic.InternalTypings.ComponentRenderingResults) &
47
- Intergalactic.InternalTypings.ComponentAdditive<Intergalactic.InternalTypings.ComponentTag> &
47
+ Intergalactic.InternalTypings.ComponentAdditive<Intergalactic.Tag> &
48
48
  TooltipTypeBase;
49
49
 
50
50
  /**
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { DataStructureHints, PartialDataSummarizationConfig } from './hints';
3
- export declare type A11yViewProps = {
3
+ export type A11yViewProps = {
4
4
  id: string;
5
5
  data: Record<string, unknown>[];
6
6
  hints: DataStructureHints;
@@ -1,4 +1,4 @@
1
- declare type FocusableElement = Element & {
1
+ type FocusableElement = Element & {
2
2
  focus: () => void;
3
3
  };
4
4
  export declare const heavyFindNextFocusableElement: (base: Element, trace?: Map<Element, true>) => FocusableElement | null;
@@ -1,8 +1,8 @@
1
1
  import { SerializableDataType } from './insights';
2
- declare type DeepPartial<T> = T extends object ? {
2
+ type DeepPartial<T> = T extends object ? {
3
3
  [P in keyof T]?: DeepPartial<T[P]>;
4
4
  } : T;
5
- export declare type DataStructureHints = {
5
+ export type DataStructureHints = {
6
6
  fields: {
7
7
  verticalAxes: Set<string | number>;
8
8
  horizontalAxes: Set<string | number>;
@@ -38,7 +38,7 @@ export declare type DataStructureHints = {
38
38
  } | null;
39
39
  dataType: SerializableDataType | null;
40
40
  };
41
- export declare type DataSummarizationConfig = {
41
+ export type DataSummarizationConfig = {
42
42
  trendTangens: {
43
43
  static: number;
44
44
  weak: number;
@@ -61,7 +61,7 @@ export declare type DataSummarizationConfig = {
61
61
  override: string | undefined;
62
62
  additionalFields: string[];
63
63
  };
64
- export declare type PartialDataSummarizationConfig = DeepPartial<DataSummarizationConfig>;
64
+ export type PartialDataSummarizationConfig = DeepPartial<DataSummarizationConfig>;
65
65
  export declare const makeDataHintsContainer: () => DataStructureHints;
66
66
  export declare const makeDataHintsHandlers: (mutableContainer: DataStructureHints) => {
67
67
  specifyDataRowFields: (x?: string, y?: string, value?: string) => void;
@@ -74,6 +74,6 @@ export declare const makeDataHintsHandlers: (mutableContainer: DataStructureHint
74
74
  setTitle: (describedDataAxes: 'vertical' | 'horizontal', title: string) => void;
75
75
  setPointsDensity: (horizontalAxes: number, verticalAxes: number) => void;
76
76
  };
77
- export declare type DataHintsHandler = ReturnType<typeof makeDataHintsHandlers>;
77
+ export type DataHintsHandler = ReturnType<typeof makeDataHintsHandlers>;
78
78
  export declare const makeDataSummarizationConfig: (config?: PartialDataSummarizationConfig) => DataSummarizationConfig;
79
79
  export {};
@@ -1,5 +1,5 @@
1
1
  import { DataStructureHints, DataSummarizationConfig } from './hints';
2
- export declare type TrendNode = {
2
+ export type TrendNode = {
3
3
  type: 'trend';
4
4
  priority: number;
5
5
  change: {
@@ -11,10 +11,10 @@ export declare type TrendNode = {
11
11
  to: unknown;
12
12
  dataKey: string | number;
13
13
  };
14
- export declare type GeneralTrendNode = Omit<TrendNode, 'type'> & {
14
+ export type GeneralTrendNode = Omit<TrendNode, 'type'> & {
15
15
  type: 'general-trend';
16
16
  };
17
- export declare type ComparisonNode = {
17
+ export type ComparisonNode = {
18
18
  type: 'comparison';
19
19
  label?: string;
20
20
  priority: number;
@@ -23,8 +23,8 @@ export declare type ComparisonNode = {
23
23
  label: string;
24
24
  }[];
25
25
  };
26
- declare type ClusterRelativeSize = 'significantly-smaller' | 'smaller' | 'slightly-smaller' | 'average' | 'slightly-bigger' | 'bigger' | 'significantly-bigger';
27
- export declare type ClusterNode = {
26
+ type ClusterRelativeSize = 'significantly-smaller' | 'smaller' | 'slightly-smaller' | 'average' | 'slightly-bigger' | 'bigger' | 'significantly-bigger';
27
+ export type ClusterNode = {
28
28
  type: 'cluster';
29
29
  priority: number;
30
30
  size: number;
@@ -37,9 +37,9 @@ export declare type ClusterNode = {
37
37
  };
38
38
  relativeSize: ClusterRelativeSize;
39
39
  };
40
- export declare type Insight = TrendNode | GeneralTrendNode | ComparisonNode | ClusterNode;
41
- export declare type SerializableDataType = 'time-series' | 'points-cloud' | 'values-set' | 'grouped-values' | 'indexed-groups';
42
- export declare type AnalyzedData = {
40
+ export type Insight = TrendNode | GeneralTrendNode | ComparisonNode | ClusterNode;
41
+ export type SerializableDataType = 'time-series' | 'points-cloud' | 'values-set' | 'grouped-values' | 'indexed-groups';
42
+ export type AnalyzedData = {
43
43
  insights: Insight[];
44
44
  dataType: SerializableDataType;
45
45
  dataRange: {
@@ -1,6 +1,6 @@
1
1
  import { IntlShape } from '@formatjs/intl';
2
2
  import type { localizedMessages as localizedMessagesTypeBase } from './translations/view/__intergalactic-dynamic-locales';
3
- export declare type Intl = IntlShape<typeof localizedMessagesTypeBase['en']>;
3
+ export type Intl = IntlShape<typeof localizedMessagesTypeBase['en']>;
4
4
  export declare const getIntl: (locale: string, translations: {
5
5
  [messageId: string]: string;
6
6
  }, availableLocales: {
@@ -1,3 +1,3 @@
1
1
  export declare const normalizeLocale: (providedLocale: string, translations?: {
2
2
  [locale: string]: {};
3
- }) => string;
3
+ }) => string | null;
@@ -3,15 +3,15 @@ import { DataSummarizationConfig } from './hints';
3
3
  import { Intl } from './intl';
4
4
  export declare const formatValue: (intl: Intl, value: unknown, { siblingsTimeMark, maxListSymbols, datesWithTime, }?: {
5
5
  siblingsTimeMark?: unknown;
6
- maxListSymbols?: number;
7
- datesWithTime?: boolean;
6
+ maxListSymbols?: number | undefined;
7
+ datesWithTime?: boolean | undefined;
8
8
  }) => string;
9
9
  export declare const serialize: ({ insights, dataType, dataRange, dataTitle, entitiesCount }: AnalyzedData, { datesWithTime, maxListSymbols, clustersLimit, valuesLimit, groupsLimit, }: DataSummarizationConfig, { locale, translations, availableLocales, }: {
10
10
  locale: string;
11
11
  translations?: {
12
12
  [messageId: string]: string;
13
- };
13
+ } | undefined;
14
14
  availableLocales?: {
15
15
  [localeId: string]: any;
16
- };
16
+ } | undefined;
17
17
  }) => string | null;
@@ -3,4 +3,4 @@ export declare const summarize: (data: Record<string, unknown>[] | Record<string
3
3
  [messageId: string]: string;
4
4
  }, availableLocales: {
5
5
  [localeId: string]: any;
6
- }) => string;
6
+ }) => string | null;
@@ -0,0 +1,2 @@
1
+ declare const createElement: any;
2
+ export default createElement;
@@ -36,8 +36,10 @@ export * from './StackedArea';
36
36
 
37
37
  /** It becomes resolvable after building and moving file to lib dir */
38
38
 
39
+ // @ts-ignore
39
40
  export { default as RadialTree } from './RadialTree';
40
41
 
42
+ // @ts-ignore
41
43
  export * from './RadialTree';
42
44
 
43
45
  export { default as Radar } from './Radar';
@@ -1,11 +1,12 @@
1
1
  import { Numeric } from 'd3-array';
2
2
  import { ScaleIdentity, ScaleTime, ScaleContinuousNumeric, ScaleBand, ScalePoint } from 'd3-scale';
3
+ import React from 'react';
3
4
  declare const CONSTANT: {
4
5
  readonly VIRTUAL_ELEMENT: symbol;
5
6
  };
6
7
  export { CONSTANT };
7
8
  export declare const eventToPoint: (event: React.MouseEvent<HTMLElement>, svgRoot: SVGElement) => number[];
8
- declare type InvertableScale = ScaleIdentity | ScaleBand<unknown> | ScaleTime<unknown, unknown> | ScaleContinuousNumeric<unknown, unknown>;
9
+ type InvertableScale = ScaleIdentity | ScaleBand<{}> | ScaleTime<unknown, unknown> | ScaleContinuousNumeric<unknown, unknown>;
9
10
  export declare const invert: <Scale extends InvertableScale = InvertableScale>(scale: Scale, value: number) => number | Date;
10
11
  export declare const definedNullData: (x: number, y: number) => (plot: {
11
12
  [xOrY: number]: unknown;
@@ -13,15 +14,15 @@ export declare const definedNullData: (x: number, y: number) => (plot: {
13
14
  export declare const definedData: (x: number, y: number) => (plot: {
14
15
  [xOrY: number]: unknown;
15
16
  }) => boolean;
16
- export declare const scaleOfBandwidth: <Scale extends ScaleBand<{}>>(scale: Scale, value: number) => number;
17
+ export declare const scaleOfBandwidth: <Scale extends ScaleBand<{}>>(scale: Scale, value: number) => number | undefined;
17
18
  export declare const minMax: <Key extends string = string, Data extends {
18
- [key: string]: Numeric;
19
+ [key: string]: Numeric | null | undefined;
19
20
  }[] = {
20
- [key: string]: Numeric;
21
+ [key: string]: Numeric | null | undefined;
21
22
  }[]>(data: Data, key: Key) => [min: Data[0][Key], max: Data[0][Key]];
22
23
  export declare const getNullData: <Name extends string = string, Data extends { [name in Name]?: unknown; } = {}>(data: Data[], defined: (data: Data) => boolean, name: Name) => Data[];
23
- declare type IndexFromDataScale = ScaleIdentity | ScaleTime<unknown, unknown> | ScaleContinuousNumeric<unknown, unknown> | ScaleBand<{}> | ScalePoint<{}>;
24
- export declare const getIndexFromData: <Key extends string, Data extends { [key in Key]: number; } = { [key_1 in Key]: number; }, Scale extends IndexFromDataScale = IndexFromDataScale>(data: Data[], scale: Scale, key: Key, value: number) => number;
24
+ type IndexFromDataScale = ScaleIdentity | ScaleTime<unknown, unknown> | ScaleContinuousNumeric<unknown, unknown> | ScaleBand<{}> | ScalePoint<{}>;
25
+ export declare const getIndexFromData: <Key extends string, Data extends { [key in Key]: number; } = { [key_1 in Key]: number; }, Scale extends IndexFromDataScale = IndexFromDataScale>(data: Data[], scale: Scale, key: Key, value: number) => number | null;
25
26
  export declare const roundedPath: (x: number, y: number, w: number, h: number, r: number, tl?: boolean, tr?: boolean, bl?: boolean, br?: boolean) => string;
26
27
  export declare const getBandwidth: <Scale extends ScaleBand<{}>>(scale: Scale) => number;
27
28
  export declare const memoize: <Func extends (...args: any[]) => any>(func: Func) => Func;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/d3-chart",
3
3
  "description": "Semrush D3 Chart Component",
4
- "version": "3.0.0-beta.0",
4
+ "version": "3.0.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -10,10 +10,10 @@
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@formatjs/intl": "2.3.0",
13
- "@semcore/animation": "2.0.0-beta.0",
14
- "@semcore/flex-box": "5.0.0-beta.0",
15
- "@semcore/popper": "5.0.0-beta.0",
16
- "@semcore/utils": "4.0.0-beta.0",
13
+ "@semcore/animation": "2.0.0",
14
+ "@semcore/flex-box": "5.0.0",
15
+ "@semcore/popper": "5.0.0",
16
+ "@semcore/utils": "4.0.0",
17
17
  "@types/d3-shape": "^3.1.0",
18
18
  "@upsetjs/venn.js": "1.4.1",
19
19
  "d3-array": "3.1.6",
@@ -22,11 +22,10 @@
22
22
  "d3-scale": "3.3.0",
23
23
  "d3-shape": "3.1.0",
24
24
  "d3-transition": "3.0.1",
25
- "hoist-non-react-statics": "3.3.2",
26
- "resize-observer-polyfill": "1.5.1"
25
+ "hoist-non-react-statics": "3.3.2"
27
26
  },
28
27
  "peerDependencies": {
29
- "@semcore/core": "2.0.0-beta.0",
28
+ "@semcore/core": "2.0.0",
30
29
  "react": "16.8 - 18",
31
30
  "react-dom": "16.8 - 18"
32
31
  },
@@ -41,12 +40,13 @@
41
40
  "@semcore/checkbox": "*",
42
41
  "@semcore/dropdown-menu": "*",
43
42
  "@semcore/icon": "*",
44
- "@semcore/utils": "*",
45
43
  "@semcore/testing-utils": "1.0.0",
46
44
  "@semcore/typography": "*",
45
+ "@semcore/utils": "*",
47
46
  "@types/d3-array": "^3.0.2",
48
47
  "@types/d3-scale": "^4.0.2",
49
- "@types/d3-transition": "^3.0.1"
48
+ "@types/d3-transition": "^3.0.1",
49
+ "@types/react": "18.0.21"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "pnpm semcore-builder --source=js,ts"