@semcore/d3-chart 3.9.0 → 3.10.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 (48) hide show
  1. package/CHANGELOG.md +12 -1
  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 +10 -10
  6. package/lib/cjs/Donut.js +7 -7
  7. package/lib/cjs/Dots.js +15 -11
  8. package/lib/cjs/Dots.js.map +1 -1
  9. package/lib/cjs/HorizontalBar.js +8 -8
  10. package/lib/cjs/Hover.js +3 -3
  11. package/lib/cjs/Line.js +8 -8
  12. package/lib/cjs/Plot.js +3 -3
  13. package/lib/cjs/Radar.js +17 -17
  14. package/lib/cjs/RadialTree.js +12 -12
  15. package/lib/cjs/ReferenceLine.js +9 -9
  16. package/lib/cjs/ScatterPlot.js +7 -7
  17. package/lib/cjs/Tooltip.js +8 -8
  18. package/lib/cjs/Venn.js +7 -7
  19. package/lib/cjs/a11y/PlotA11yModule.js +2 -2
  20. package/lib/cjs/a11y/PlotA11yView.js +3 -3
  21. package/lib/cjs/style/dot.shadow.css +3 -3
  22. package/lib/cjs/types/Axis.d.js.map +1 -1
  23. package/lib/cjs/types/Line.d.js.map +1 -1
  24. package/lib/es6/Area.js +9 -9
  25. package/lib/es6/Axis.js +14 -14
  26. package/lib/es6/Bar.js +8 -8
  27. package/lib/es6/Bubble.js +10 -10
  28. package/lib/es6/Donut.js +7 -7
  29. package/lib/es6/Dots.js +15 -11
  30. package/lib/es6/Dots.js.map +1 -1
  31. package/lib/es6/HorizontalBar.js +8 -8
  32. package/lib/es6/Hover.js +3 -3
  33. package/lib/es6/Line.js +8 -8
  34. package/lib/es6/Plot.js +3 -3
  35. package/lib/es6/Radar.js +17 -17
  36. package/lib/es6/RadialTree.js +12 -12
  37. package/lib/es6/ReferenceLine.js +9 -9
  38. package/lib/es6/ScatterPlot.js +7 -7
  39. package/lib/es6/Tooltip.js +8 -8
  40. package/lib/es6/Venn.js +7 -7
  41. package/lib/es6/a11y/PlotA11yModule.js +2 -2
  42. package/lib/es6/a11y/PlotA11yView.js +3 -3
  43. package/lib/es6/style/dot.shadow.css +3 -3
  44. package/lib/es6/types/Axis.d.js.map +1 -1
  45. package/lib/es6/types/Line.d.js.map +1 -1
  46. package/lib/types/Axis.d.ts +0 -4
  47. package/lib/types/Line.d.ts +4 -0
  48. package/package.json +3 -2
@@ -10,8 +10,8 @@ import { normalizeLocale } from './locale';
10
10
  import { localizedMessages } from './translations/module/__intergalactic-dynamic-locales';
11
11
  import { Root, sstyled } from '@semcore/core';
12
12
  /*__reshadow-styles__:"../style/plotA11yModule.shadow.css"*/
13
- var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlotA11yModule_48pyq_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_48pyq_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}" /*__inner_css_end__*/, "48pyq_gg_") /*__reshadow_css_end__*/, {
14
- "__SPlotA11yModule": "___SPlotA11yModule_48pyq_gg_"
13
+ var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlotA11yModule_w59g6_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_w59g6_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}" /*__inner_css_end__*/, "w59g6_gg_") /*__reshadow_css_end__*/, {
14
+ "__SPlotA11yModule": "___SPlotA11yModule_w59g6_gg_"
15
15
  });
16
16
  import { Context as I18nContext, useI18n } from '@semcore/utils/lib/enhances/WithI18n';
17
17
  import { Box } from '@semcore/flex-box';
@@ -13,9 +13,9 @@ import { getIntl } from './intl';
13
13
  import { summarize } from './summarize';
14
14
  import { Root, sstyled } from '@semcore/core';
15
15
  /*__reshadow-styles__:"../style/plotA11yView.shadow.css"*/
16
- var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlotA11yView_cr7x6_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);border:3px solid var(--intergalactic-border-primary, #c4c7cf);font-size:var(--intergalactic-fs-50, 10px);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_cr7x6_gg_.__focus-within_cr7x6_gg_,.___SPlotA11yView_cr7x6_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_cr7x6_gg_:focus,.___SPlotA11yView_cr7x6_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_cr7x6_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x, 8px);display:block}.___SPlotA11yView_cr7x6_gg_ table,.___SPlotA11yView_cr7x6_gg_ td,.___SPlotA11yView_cr7x6_gg_ th{border:1px solid var(--intergalactic-border-primary, #c4c7cf)}" /*__inner_css_end__*/, "cr7x6_gg_") /*__reshadow_css_end__*/, {
17
- "__SPlotA11yView": "___SPlotA11yView_cr7x6_gg_",
18
- "_focus-within": "__focus-within_cr7x6_gg_"
16
+ var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlotA11yView_1l74d_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);border:3px solid var(--intergalactic-border-primary, #c4c7cf);font-size:var(--intergalactic-fs-50, 10px);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_1l74d_gg_.__focus-within_1l74d_gg_,.___SPlotA11yView_1l74d_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_1l74d_gg_:focus,.___SPlotA11yView_1l74d_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_1l74d_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x, 8px);display:block}.___SPlotA11yView_1l74d_gg_ table,.___SPlotA11yView_1l74d_gg_ td,.___SPlotA11yView_1l74d_gg_ th{border:1px solid var(--intergalactic-border-primary, #c4c7cf)}" /*__inner_css_end__*/, "1l74d_gg_") /*__reshadow_css_end__*/, {
17
+ "__SPlotA11yView": "___SPlotA11yView_1l74d_gg_",
18
+ "_focus-within": "__focus-within_1l74d_gg_"
19
19
  });
20
20
  import { Box } from '@semcore/flex-box';
21
21
  import { useAsyncI18nMessages } from '@semcore/utils/lib/enhances/i18nEnhance';
@@ -9,7 +9,7 @@ SDots {
9
9
  SDot {
10
10
  stroke-width: 2px;
11
11
  stroke: var(--intergalactic-chart-grid-border, #ffffff);
12
- r: 6px;
12
+ r: var(--radius);
13
13
  fill: var(--intergalactic-chart-palette-order-1, #2bb3ff);
14
14
  transition-property: cx, cy;
15
15
  transition-timing-function: ease-in-out;
@@ -20,7 +20,7 @@ SDot[hide] {
20
20
  }
21
21
 
22
22
  SDot[active] {
23
- r: 8px;
23
+ r: calc(var(--radius) * 8/6);
24
24
  }
25
25
 
26
26
  SDot[color] {
@@ -29,4 +29,4 @@ SDot[color] {
29
29
 
30
30
  SDot[transparent] {
31
31
  opacity: 0.3;
32
- }
32
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"Axis.d.js","names":[],"sources":["../../../src/types/Axis.d.ts"],"sourcesContent":["import { IntergalacticD3Component } from './Plot';\nimport { Context } from './context';\nimport { UnknownProperties } from '@semcore/core';\n\n/** @deprecated */\nexport interface IXAxisProps extends XAxisProps, UnknownProperties {}\nexport type XAxisProps = Context & {\n /** The position of the axis relative chart\n * @default 'button' */\n position?: 'top' | 'right' | 'bottom' | 'left' | number;\n /** Element hide property\n * @default false */\n hide?: boolean;\n /** Values for axis ticks */\n /** @deprecated */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IYAxisProps extends YAxisProps, UnknownProperties {}\nexport type YAxisProps = Context & {\n /** The position of the axis relative chart\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left' | number;\n /** Element hide property\n * @default true */\n hide?: boolean;\n /** Values for axis ticks */\n /** @deprecated */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IAxisTicksProps extends AxisTicksProps, UnknownProperties {}\nexport type AxisTicksProps = Context & {\n /** The position of the axis relative chart */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Element hide property */\n hide?: boolean;\n /** Values for axis ticks */\n /** @deprecated */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IAxisGridProps extends AxisGridProps, UnknownProperties {}\nexport type AxisGridProps = Context & {\n /** Values for axis ticks */\n /** @deprecated */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IAxisTitleProps extends AxisTitleProps, UnknownProperties {}\nexport type AxisTitleProps = Context & {\n /** The position of the axis relative chart */\n position?: 'top' | 'right' | 'bottom' | 'left';\n\n /** For vertical titles disables characters rotation while puts\n * characters into the vertical column for better reading in some languages.\n * @default true for `zh` and `ja` locales and false for all others.\n */\n verticalWritingMode?: boolean;\n};\n\n/** @deprecated */\nexport interface IAxisTicksContext extends AxisTicksContext, UnknownProperties {}\nexport type AxisTicksContext = {\n /** Value element of data */\n /** @deprecated */\n value: any;\n /** Index element of data */\n index: number;\n};\n\ndeclare const XAxis: IntergalacticD3Component<'path', XAxisProps> & {\n Ticks: IntergalacticD3Component<'path', AxisTicksProps, AxisTicksContext>;\n Grid: IntergalacticD3Component<'path', AxisGridProps>;\n Title: IntergalacticD3Component<'text', AxisTitleProps>;\n};\n\ndeclare const YAxis: IntergalacticD3Component<'path', YAxisProps> & {\n Ticks: IntergalacticD3Component<'path', AxisTicksProps, AxisTicksContext>;\n Grid: IntergalacticD3Component<'path', AxisGridProps>;\n Title: IntergalacticD3Component<'text', AxisTitleProps>;\n};\n\nexport { XAxis, YAxis };\n"],"mappings":""}
1
+ {"version":3,"file":"Axis.d.js","names":[],"sources":["../../../src/types/Axis.d.ts"],"sourcesContent":["import { IntergalacticD3Component } from './Plot';\nimport { Context } from './context';\nimport { UnknownProperties } from '@semcore/core';\n\n/** @deprecated */\nexport interface IXAxisProps extends XAxisProps, UnknownProperties {}\nexport type XAxisProps = Context & {\n /** The position of the axis relative chart\n * @default 'button' */\n position?: 'top' | 'right' | 'bottom' | 'left' | number;\n /** Element hide property\n * @default false */\n hide?: boolean;\n /** Values for axis ticks */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IYAxisProps extends YAxisProps, UnknownProperties {}\nexport type YAxisProps = Context & {\n /** The position of the axis relative chart\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left' | number;\n /** Element hide property\n * @default true */\n hide?: boolean;\n /** Values for axis ticks */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IAxisTicksProps extends AxisTicksProps, UnknownProperties {}\nexport type AxisTicksProps = Context & {\n /** The position of the axis relative chart */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Element hide property */\n hide?: boolean;\n /** Values for axis ticks */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IAxisGridProps extends AxisGridProps, UnknownProperties {}\nexport type AxisGridProps = Context & {\n /** Values for axis ticks */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IAxisTitleProps extends AxisTitleProps, UnknownProperties {}\nexport type AxisTitleProps = Context & {\n /** The position of the axis relative chart */\n position?: 'top' | 'right' | 'bottom' | 'left';\n\n /** For vertical titles disables characters rotation while puts\n * characters into the vertical column for better reading in some languages.\n * @default true for `zh` and `ja` locales and false for all others.\n */\n verticalWritingMode?: boolean;\n};\n\n/** @deprecated */\nexport interface IAxisTicksContext extends AxisTicksContext, UnknownProperties {}\nexport type AxisTicksContext = {\n /** Value element of data */\n /** @deprecated */\n value: any;\n /** Index element of data */\n index: number;\n};\n\ndeclare const XAxis: IntergalacticD3Component<'path', XAxisProps> & {\n Ticks: IntergalacticD3Component<'path', AxisTicksProps, AxisTicksContext>;\n Grid: IntergalacticD3Component<'path', AxisGridProps>;\n Title: IntergalacticD3Component<'text', AxisTitleProps>;\n};\n\ndeclare const YAxis: IntergalacticD3Component<'path', YAxisProps> & {\n Ticks: IntergalacticD3Component<'path', AxisTicksProps, AxisTicksContext>;\n Grid: IntergalacticD3Component<'path', AxisGridProps>;\n Title: IntergalacticD3Component<'text', AxisTitleProps>;\n};\n\nexport { XAxis, YAxis };\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Line.d.js","names":[],"sources":["../../../src/types/Line.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { CurveFactory } from 'd3-shape';\nimport { FadeInOutProps } from '@semcore/animation';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface ILineProps extends LineProps, UnknownProperties {}\nexport type LineProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Curve method */\n curve?: CurveFactory;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface ILineDotsProps extends LineDotsProps, UnknownProperties {}\nexport type LineDotsProps = Context &\n FadeInOutProps & {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Index active of element */\n activeIndex?: number;\n };\n\n/** @deprecated */\nexport interface ILineDotsContext extends LineDotsContext, UnknownProperties {}\nexport type LineDotsContext = {\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Index element of data */\n index?: number;\n};\n\n/** @deprecated */\nexport interface ILineNullProps extends LineNullProps, UnknownProperties {}\nexport type LineNullProps = Context & {\n /** Hide property */\n hide?: boolean;\n};\n\ndeclare const Line: IntergalacticD3Component<'line', LineProps, Context> & {\n Dots: IntergalacticD3Component<'circle', LineDotsProps, LineDotsContext>;\n Null: IntergalacticD3Component<'path', LineNullProps>;\n};\n\nexport default Line;\n"],"mappings":""}
1
+ {"version":3,"file":"Line.d.js","names":[],"sources":["../../../src/types/Line.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { CurveFactory } from 'd3-shape';\nimport { FadeInOutProps } from '@semcore/animation';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface ILineProps extends LineProps, UnknownProperties {}\nexport type LineProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Curve method */\n curve?: CurveFactory;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface ILineDotsProps extends LineDotsProps, UnknownProperties {}\nexport type LineDotsProps = Context &\n FadeInOutProps & {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Index active of element */\n activeIndex?: number;\n /** Dot radius, radius of active dot is 4/3 times larger\n * @default 6\n */\n radius?: number;\n };\n\n/** @deprecated */\nexport interface ILineDotsContext extends LineDotsContext, UnknownProperties {}\nexport type LineDotsContext = {\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Index element of data */\n index?: number;\n};\n\n/** @deprecated */\nexport interface ILineNullProps extends LineNullProps, UnknownProperties {}\nexport type LineNullProps = Context & {\n /** Hide property */\n hide?: boolean;\n};\n\ndeclare const Line: IntergalacticD3Component<'line', LineProps, Context> & {\n Dots: IntergalacticD3Component<'circle', LineDotsProps, LineDotsContext>;\n Null: IntergalacticD3Component<'path', LineNullProps>;\n};\n\nexport default Line;\n"],"mappings":""}
@@ -12,7 +12,6 @@ export type XAxisProps = Context & {
12
12
  * @default false */
13
13
  hide?: boolean;
14
14
  /** Values for axis ticks */
15
- /** @deprecated */
16
15
  ticks?: any[];
17
16
  };
18
17
 
@@ -26,7 +25,6 @@ export type YAxisProps = Context & {
26
25
  * @default true */
27
26
  hide?: boolean;
28
27
  /** Values for axis ticks */
29
- /** @deprecated */
30
28
  ticks?: any[];
31
29
  };
32
30
 
@@ -38,7 +36,6 @@ export type AxisTicksProps = Context & {
38
36
  /** Element hide property */
39
37
  hide?: boolean;
40
38
  /** Values for axis ticks */
41
- /** @deprecated */
42
39
  ticks?: any[];
43
40
  };
44
41
 
@@ -46,7 +43,6 @@ export type AxisTicksProps = Context & {
46
43
  export interface IAxisGridProps extends AxisGridProps, UnknownProperties {}
47
44
  export type AxisGridProps = Context & {
48
45
  /** Values for axis ticks */
49
- /** @deprecated */
50
46
  ticks?: any[];
51
47
  };
52
48
 
@@ -36,6 +36,10 @@ export type LineDotsProps = Context &
36
36
  hide?: boolean;
37
37
  /** Index active of element */
38
38
  activeIndex?: number;
39
+ /** Dot radius, radius of active dot is 4/3 times larger
40
+ * @default 6
41
+ */
42
+ radius?: number;
39
43
  };
40
44
 
41
45
  /** @deprecated */
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.9.0",
4
+ "version": "3.10.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -10,7 +10,8 @@
10
10
  "license": "MIT",
11
11
  "exports": {
12
12
  "require": "./lib/cjs/index.js",
13
- "import": "./lib/es6/index.js"
13
+ "import": "./lib/es6/index.js",
14
+ "types": "./lib/types/index.d.ts"
14
15
  },
15
16
  "dependencies": {
16
17
  "@formatjs/intl": "2.3.0",