@semcore/d3-chart 2.17.5 → 3.0.0-beta.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.
- package/CHANGELOG.md +18 -2
- package/lib/cjs/Area.js +9 -9
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +11 -10
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +18 -13
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/Donut.js +10 -8
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +9 -9
- package/lib/cjs/HorizontalBar.js +11 -10
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +33 -11
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +8 -8
- package/lib/cjs/Plot.js +3 -3
- package/lib/cjs/Radar.js +82 -71
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +92 -74
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/ReferenceLine.js +9 -9
- package/lib/cjs/ResponsiveContainer.js +1 -2
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +15 -10
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/Tooltip.js +8 -8
- package/lib/cjs/Venn.js +10 -8
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +3 -3
- package/lib/cjs/a11y/hints.js.map +1 -1
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/createElement.d.js +2 -0
- package/lib/cjs/createElement.d.js.map +1 -0
- package/lib/cjs/types/Area.d.js.map +1 -1
- package/lib/cjs/types/Axis.d.js.map +1 -1
- package/lib/cjs/types/Bar.d.js.map +1 -1
- package/lib/cjs/types/Bubble.d.js.map +1 -1
- package/lib/cjs/types/ClipPath.d.js.map +1 -1
- package/lib/cjs/types/Donut.d.js.map +1 -1
- package/lib/cjs/types/GroupBar.d.js.map +1 -1
- package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/cjs/types/Line.d.js.map +1 -1
- package/lib/cjs/types/Plot.d.js +0 -2
- package/lib/cjs/types/Plot.d.js.map +1 -1
- package/lib/cjs/types/Radar.d.js +2 -0
- package/lib/cjs/types/Radar.d.js.map +1 -0
- package/lib/cjs/types/ReferenceLine.d.js.map +1 -1
- package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
- package/lib/cjs/types/StackBar.d.js.map +1 -1
- package/lib/cjs/types/StackedArea.d.js.map +1 -1
- package/lib/cjs/types/Tooltip.d.js.map +1 -1
- package/lib/cjs/types/Venn.d.js.map +1 -1
- package/lib/cjs/types/context.d.js.map +1 -1
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/Area.js +9 -9
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +11 -10
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +18 -13
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/Donut.js +10 -8
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +9 -9
- package/lib/es6/HorizontalBar.js +11 -10
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +36 -12
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +8 -8
- package/lib/es6/Plot.js +3 -3
- package/lib/es6/Radar.js +84 -72
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +90 -72
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/ReferenceLine.js +9 -9
- package/lib/es6/ResponsiveContainer.js +0 -1
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +15 -10
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/Tooltip.js +8 -8
- package/lib/es6/Venn.js +10 -8
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +3 -3
- package/lib/es6/a11y/hints.js.map +1 -1
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/createElement.d.js +2 -0
- package/lib/es6/createElement.d.js.map +1 -0
- package/lib/es6/types/Area.d.js.map +1 -1
- package/lib/es6/types/Axis.d.js.map +1 -1
- package/lib/es6/types/Bar.d.js.map +1 -1
- package/lib/es6/types/Bubble.d.js.map +1 -1
- package/lib/es6/types/ClipPath.d.js.map +1 -1
- package/lib/es6/types/Donut.d.js.map +1 -1
- package/lib/es6/types/GroupBar.d.js.map +1 -1
- package/lib/es6/types/HorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/es6/types/Line.d.js.map +1 -1
- package/lib/es6/types/Plot.d.js +1 -1
- package/lib/es6/types/Plot.d.js.map +1 -1
- package/lib/es6/types/Radar.d.js +2 -0
- package/lib/es6/types/Radar.d.js.map +1 -0
- package/lib/es6/types/ReferenceLine.d.js.map +1 -1
- package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/es6/types/ScatterPlot.d.js.map +1 -1
- package/lib/es6/types/StackBar.d.js.map +1 -1
- package/lib/es6/types/StackedArea.d.js.map +1 -1
- package/lib/es6/types/Tooltip.d.js.map +1 -1
- package/lib/es6/types/Venn.d.js.map +1 -1
- package/lib/es6/types/context.d.js.map +1 -1
- package/lib/es6/types/index.d.js +3 -0
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/es6/utils.js.map +1 -1
- package/lib/types/Area.d.ts +26 -17
- package/lib/types/Axis.d.ts +40 -23
- package/lib/types/Bar.d.ts +32 -16
- package/lib/types/Bubble.d.ts +30 -12
- package/lib/types/ClipPath.d.ts +7 -5
- package/lib/types/Donut.d.ts +29 -13
- package/lib/types/GroupBar.d.ts +15 -12
- package/lib/types/HorizontalBar.d.ts +12 -12
- package/lib/types/Hover.d.ts +32 -8
- package/lib/types/Line.d.ts +33 -23
- package/lib/types/Plot.d.ts +34 -22
- package/lib/types/Radar.d.ts +145 -0
- package/lib/types/RadialTree.d.ts +53 -28
- package/lib/types/ReferenceLine.d.ts +27 -14
- package/lib/types/ResponsiveContainer.d.ts +18 -10
- package/lib/types/ScatterPlot.d.ts +25 -9
- package/lib/types/StackBar.d.ts +20 -14
- package/lib/types/StackedArea.d.ts +16 -12
- package/lib/types/Tooltip.d.ts +55 -23
- package/lib/types/Venn.d.ts +47 -29
- package/lib/types/a11y/PlotA11yModule.d.ts +1 -1
- package/lib/types/a11y/focus.d.ts +1 -1
- package/lib/types/a11y/hints.d.ts +5 -5
- package/lib/types/a11y/insights.d.ts +8 -8
- package/lib/types/a11y/intl.d.ts +1 -1
- package/lib/types/a11y/locale.d.ts +1 -1
- package/lib/types/a11y/serialize.d.ts +4 -4
- package/lib/types/a11y/summarize.d.ts +1 -1
- package/lib/types/context.d.ts +10 -0
- package/lib/types/createElement.d.ts +2 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/utils.d.ts +10 -7
- package/package.json +10 -10
- package/lib/cjs/types/Radar.js +0 -2
- package/lib/cjs/types/Radar.js.map +0 -1
- package/lib/es6/types/Radar.js +0 -2
- package/lib/es6/types/Radar.js.map +0 -1
- package/lib/types/types/Radar.d.ts +0 -95
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Area.d.js","names":[],"sources":["../../../src/types/Area.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Area.d.js","names":[],"sources":["../../../src/types/Area.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { CurveFactory } from 'd3-shape';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IAreaProps extends AreaProps, UnknownProperties {}\nexport type AreaProps = 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 IAreaDotsProps extends AreaDotsProps, UnknownProperties {}\nexport type AreaDotsProps = Context & {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface IAreaDotsContext extends AreaDotsContext, UnknownProperties {}\nexport type AreaDotsContext = {\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Index element of data */\n index?: number;\n};\n\n/** @deprecated */\nexport interface IAreaNullProps extends AreaNullProps, UnknownProperties {}\nexport type AreaNullProps = Context & {\n /** Hide property */\n hide?: boolean;\n};\n\ndeclare const Area: IntergalacticD3Component<'path', AreaProps, Context> & {\n Dots: IntergalacticD3Component<'circle', AreaDotsProps, AreaDotsContext>;\n Null: IntergalacticD3Component<'path', AreaNullProps, Context>;\n Line: IntergalacticD3Component<'path', Context, Context>;\n};\n\nexport default Area;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Axis.d.js","names":[],"sources":["../../../src/types/Axis.d.ts"],"sourcesContent":["import {
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bar.d.js","names":[],"sources":["../../../src/types/Bar.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Bar.d.js","names":[],"sources":["../../../src/types/Bar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IBarProps extends BarProps, UnknownProperties {}\nexport type BarProps = 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 /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of curvature\n * @default 2\n */\n r?: number | number[];\n /** Minimal height\n * @default 2\n */\n hMin?: number;\n /**\n * Bar click handler\n */\n onClick?: (data: { [key: string]: string | number }, event: Event) => void;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface IBarContext extends BarContext, UnknownProperties {}\nexport type BarContext = {\n /** @deprecated */\n value: unknown;\n /** Index in `data` array */\n index: number;\n x: number;\n y: number;\n width: number;\n height: number;\n};\n\n/** @deprecated */\nexport interface IBackgroundProps extends BackgroundProps, UnknownProperties {}\nexport type BackgroundProps = Context & {\n /** Coordinate x */\n x?: number | string;\n /** Coordinate y */\n y?: number | string;\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Width rect */\n width?: number | string;\n /** Height rect */\n height?: number | string;\n};\n\ntype BackgroundContext = Context & {\n /** Index in `data` array */\n index: number;\n};\n\ndeclare const Bar: IntergalacticD3Component<'rect', BarProps, BarContext> & {\n Background: IntergalacticD3Component<'rect', BackgroundProps, BackgroundContext>;\n};\n\nexport default Bar;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bubble.d.js","names":[],"sources":["../../../src/types/Bubble.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Bubble.d.js","names":[],"sources":["../../../src/types/Bubble.d.ts"],"sourcesContent":["import { Intergalactic, UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IBubbleProps extends BubbleProps, UnknownProperties {}\nexport type BubbleProps = 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 /** Field name from `data` array item for the circle radius */\n value: string;\n /** Field name from `data` array item for the circle label */\n label?: string;\n /** Circle color */\n color?: string;\n /** Cross in the center of the bubble\n * @default true\n */\n markedCross?: boolean;\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 IBubbleContext extends BubbleContext, UnknownProperties {}\nexport type BubbleContext = {\n /** Index element of data */\n index: number;\n};\n\ndeclare const Bubble: IntergalacticD3Component<Intergalactic.Tag, BubbleProps, BubbleContext> & {\n Tooltip: TooltipType<\n BubbleProps & {\n /**\n * @deprecated Use `index` instead.\n */\n xIndex: number;\n /**\n * Index of item in the `data` array used to render related bubble.\n */\n index: number;\n }\n >;\n};\n\nexport default Bubble;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClipPath.d.js","names":[],"sources":["../../../src/types/ClipPath.d.ts"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"ClipPath.d.js","names":[],"sources":["../../../src/types/ClipPath.d.ts"],"sourcesContent":["import React from 'react';\nimport { UnknownProperties } from '@semcore/core';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IClipPath extends ClipPath, UnknownProperties {}\nexport type ClipPath = {\n /**\n * HTML tag name for the displayed item\n * @default rect\n */\n tag?: string;\n /**\n * HTML selector\n */\n id?: string;\n /**\n * CSS property\n */\n transition?: string;\n /**\n * Function which run after mounted clipPath\n */\n setAttributeTag?: (rect: React.ReactNode) => void;\n};\n\ndeclare const ClipPath: IntergalacticD3Component<'clipPath', ClipPath>;\n\nexport default ClipPath;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Donut.d.js","names":[],"sources":["../../../src/types/Donut.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Donut.d.js","names":[],"sources":["../../../src/types/Donut.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IDonutProps extends DonutProps, UnknownProperties {}\nexport type DonutProps = Context & {\n /** Inner radius\n * @default 0\n * */\n innerRadius?: number;\n /** Outer radius\n * @default calculated by the formula from width, height\n * */\n outerRadius?: number;\n /** Semi donut */\n halfsize?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n};\n\n/** @deprecated */\nexport interface IPieProps extends PieProps, UnknownProperties {}\nexport type PieProps = Context & {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /**\n * Human readable name of the segment\n * */\n name: string;\n /** Color pie\n @default #50aef4\n **/\n color?: string;\n /**\n * Active sector\n * */\n active?: boolean;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface IEmptyDataProps extends EmptyDataProps, UnknownProperties {}\nexport type EmptyDataProps = Context & {};\n\n/** @deprecated */\nexport interface ILabelProps extends LabelProps, UnknownProperties {}\nexport type LabelProps = Context & {\n label?: string;\n};\n\ndeclare const Donut: IntergalacticD3Component<'g', DonutProps> & {\n Pie: IntergalacticD3Component<'path', PieProps>;\n EmptyData: IntergalacticD3Component<'path', IEmptyDataProps>;\n Label: IntergalacticD3Component<'text', LabelProps>;\n Tooltip: TooltipType<PieProps>;\n};\n\nexport default Donut;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupBar.d.js","names":[],"sources":["../../../src/types/GroupBar.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"GroupBar.d.js","names":[],"sources":["../../../src/types/GroupBar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { BarContext, BarProps } from './Bar';\nimport { HorizontalBarProps } from './HorizontalBar';\nimport { Context } from './context';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IGroupBarProps extends GroupBarProps, UnknownProperties {}\nexport type GroupBarProps = 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 /** Scale for group bars */\n /** @deprecated */\n scaleGroup?: any;\n};\n\ndeclare const GroupBar: IntergalacticD3Component<'g', GroupBarProps> & {\n Bar: IntergalacticD3Component<'path', BarProps>;\n HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext>;\n};\n\nexport default GroupBar;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalBar.d.js","names":[],"sources":["../../../src/types/HorizontalBar.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"HorizontalBar.d.js","names":[],"sources":["../../../src/types/HorizontalBar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { BarContext, BackgroundProps } from './Bar';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IHorizontalBarProps extends HorizontalBarProps, UnknownProperties {}\nexport type HorizontalBarProps = 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 /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of curvature\n * @default 2\n */\n r?: number | number[];\n /** Enables element transparency */\n transparent?: boolean;\n};\n\ndeclare const HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext> & {\n Background: IntergalacticD3Component<'rect', BackgroundProps, Context>;\n};\n\nexport default HorizontalBar;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hover.d.js","names":[],"sources":["../../../src/types/Hover.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport {
|
|
1
|
+
{"version":3,"file":"Hover.d.js","names":[],"sources":["../../../src/types/Hover.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { ReturnEl } from '@semcore/core';\nimport { TooltipTypeBase } from './Tooltip';\nimport { IBoxProps } from '@semcore/flex-box';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IHoverProps extends HoverProps, UnknownProperties {}\nexport type HoverProps = 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};\n\ntype HoverTooltip = (<X, Y>(\n props: {\n /** Field name from `data` array item for the XAxis */\n x?: X;\n /** Field name from `data` array item for the YAxis */\n y?: Y;\n children: (props: {\n /** Index in `data` array of the current item */\n xIndex: X extends string ? string : never;\n /** Index in `data` array of the current item */\n yIndex: Y extends string ? string : never;\n }) => { children: ReturnEl };\n } & Omit<IBoxProps, 'children'>,\n) => ReturnEl) &\n TooltipTypeBase;\n\ndeclare const HoverLine: IntergalacticD3Component<'g', HoverProps> & {\n Tooltip: HoverTooltip;\n};\n\ndeclare const HoverRect: IntergalacticD3Component<'g', HoverProps> & {\n Tooltip: HoverTooltip;\n};\nexport { HoverLine, HoverRect };\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Line.d.js","names":[],"sources":["../../../src/types/Line.d.ts"],"sourcesContent":["import {
|
|
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":""}
|
package/lib/cjs/types/Plot.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plot.d.js","names":[
|
|
1
|
+
{"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import { BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Context } from './context';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n BoxProps & {\n /** Width of the svg element\n * @default 0*/\n width?: number;\n /** Height of the svg element\n * @default 0*/\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** @deprecated */\n eventEmitter?: unknown;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<BaseTag>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radar.d.js","names":[],"sources":["../../../src/types/Radar.d.ts"],"sourcesContent":["import { Context } from './context';\nimport { UnknownProperties } from '@semcore/core';\nimport { CurveFactory } from 'd3-shape';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IRadarProps extends RadarProps, UnknownProperties {}\nexport type RadarProps = Context & {\n /**\n * Scale for radar element\n * */\n /** @deprecated */\n scale: any;\n /**\n * Graph type to be displayed\n * @default 'polygon'\n * */\n type?: 'polygon' | 'circle';\n /**\n * Indent from the edge of svg to graph\n * */\n offset?: number;\n\n /**\n * Label font size\n * @default 12\n * */\n textSize?: number;\n\n /**\n * Base angle of chart rotation\n * @default 0\n * @example Math.PI/3\n * */\n angleOffset?: number;\n};\n\n/** @deprecated */\nexport interface IRadarAxisProps extends RadarAxisProps, UnknownProperties {}\nexport type RadarAxisProps = Context & {\n /**\n * Sets the field name for categories\n * */\n dataKey: string;\n};\n\n/** @deprecated */\nexport interface IRadarAxisTicksProps extends RadarAxisTicksProps, UnknownProperties {}\nexport type RadarAxisTicksProps = {\n /**\n * Distance between auxiliary lines\n * @default 100\n * */\n tickSize?: number;\n};\n\n/** @deprecated */\nexport interface IRadarAxisLabelsProps extends RadarAxisLabelsProps, UnknownProperties {}\nexport type RadarAxisLabelsProps = {\n /**\n * Indent from graph to label\n * @default 10\n * */\n labelOffset?: number;\n};\n\ntype RadarAxisLabelsContext = Context & {\n xDirection: 'middle' | 'start' | 'end';\n yDirection: 'alphabetic' | 'mathematical' | 'middle';\n x: number;\n y: number;\n};\n\n/** @deprecated */\nexport interface IRadialPolygonProps extends RadialPolygonProps, UnknownProperties {}\nexport type RadialPolygonProps = Context & {\n /**\n * Sets the field name for data\n * */\n dataKey: string;\n /**\n * Curve method\n * @default curveLinearClosed\n * */\n curve?: CurveFactory;\n /**\n * Sets the color of the entire polygon\n * */\n color?: string;\n /**\n * Sets the fill color\n * */\n fill?: string;\n};\n\n/** @deprecated */\nexport interface IRadialPolygonLineProps extends RadialPolygonLineProps, UnknownProperties {}\nexport type RadialPolygonLineProps = {\n /**\n * Sets the line color\n * */\n color?: string;\n};\n\n/** @deprecated */\nexport interface IRadialPolygonDotsProps extends RadialPolygonDotsProps, UnknownProperties {}\nexport type RadialPolygonDotsProps = {\n /**\n * Sets the dot color\n * */\n color?: string;\n};\n\n/** @deprecated */\nexport interface IRadarHoverProps extends RadarHoverProps, UnknownProperties {}\nexport type RadarHoverProps = BoxProps & Context & {};\n\ndeclare const Radar: IntergalacticD3Component<'g', RadarProps, Context> & {\n Axis: IntergalacticD3Component<'path', RadarAxisProps, Context> & {\n Ticks: IntergalacticD3Component<'path', RadarAxisTicksProps, Context>;\n Labels: IntergalacticD3Component<'text', RadarAxisLabelsProps, RadarAxisLabelsContext>;\n };\n Polygon: IntergalacticD3Component<'path', RadialPolygonProps, Context> & {\n Line: IntergalacticD3Component<'line', RadialPolygonLineProps, Context>;\n Dots: IntergalacticD3Component<'circle', RadialPolygonDotsProps, Context>;\n };\n Hover: IntergalacticD3Component<'path', RadarHoverProps, Context>;\n Tooltip: TooltipType<\n RadarHoverProps & {\n /** Index in `data` array of the current items */\n index: number;\n }\n >;\n};\n\nexport declare function getLabelOffsetPosition(\n xDirection: 'middle' | 'start' | 'end',\n yDirection: 'alphabetic' | 'mathematical' | 'middle',\n width: number,\n height: number,\n): [xOffset: number, yOffset: number];\n\nexport default Radar;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceLine.d.js","names":[],"sources":["../../../src/types/ReferenceLine.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ReferenceLine.d.js","names":[],"sources":["../../../src/types/ReferenceLine.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated **/\nexport interface IReferenceLineProps extends ReferenceLineProps, UnknownProperties {}\nexport type ReferenceLineProps = Context & {\n /** The position of the title relative reference line\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n /** @deprecated */\n value?: any;\n\n title?: string;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineTitleProps extends ReferenceLineTitleProps, UnknownProperties {}\nexport type ReferenceLineTitleProps = Context & {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n /** @deprecated */\n value: any;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineBackgroundProps\n extends ReferenceLineBackgroundProps,\n UnknownProperties {}\nexport type ReferenceLineBackgroundProps = Context & {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n /** @deprecated */\n value?: any;\n};\n\ndeclare const ReferenceLine: IntergalacticD3Component<'line', ReferenceLineProps, Context> & {\n Title: IntergalacticD3Component<'text', ReferenceLineTitleProps, Context>;\n Background: IntergalacticD3Component<'rect', ReferenceLineBackgroundProps, Context>;\n};\n\nexport default ReferenceLine;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponsiveContainer.d.js","names":[],"sources":["../../../src/types/ResponsiveContainer.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ResponsiveContainer.d.js","names":[],"sources":["../../../src/types/ResponsiveContainer.d.ts"],"sourcesContent":["import { BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties } from '@semcore/core';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IResponsiveContainerProps extends ResponsiveContainerProps, UnknownProperties {}\nexport type ResponsiveContainerProps = BoxProps & {\n /** Relation between height and width dimensions block */\n aspect?: number;\n /** Callback which will be called after changing the block size */\n onResize?: (size: [number, number], entries: ResizeObserverEntry[]) => void;\n};\n\n/** @deprecated */\nexport interface IResponsiveContainerContext\n extends ResponsiveContainerContext,\n UnknownProperties {}\nexport type ResponsiveContainerContext = {\n width?: number;\n height?: number;\n};\n\ndeclare const ResponsiveContainer: IntergalacticD3Component<\n 'div',\n ResponsiveContainerProps,\n ResponsiveContainerContext\n>;\n\nexport default ResponsiveContainer;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScatterPlot.d.js","names":[],"sources":["../../../src/types/ScatterPlot.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ScatterPlot.d.js","names":[],"sources":["../../../src/types/ScatterPlot.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IScatterPlotProps extends ScatterPlotProps, UnknownProperties {}\nexport type ScatterPlotProps = 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 /** Field name from `data` array item for the circle value */\n value?: string;\n /** Circle color */\n color?: string;\n /** Circle value color */\n valueColor?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of circles\n * @default 5.5 or 12 with value\n */\n r?: number;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\ndeclare const ScatterPlot: IntergalacticD3Component<'g', ScatterPlotProps, Context> & {\n Tooltip: TooltipType<\n ScatterPlotProps & {\n /**\n * @deprecated Use `index` instead.\n */\n xIndex: number;\n /**\n * Index of item in the `data` array used to render related circle.\n */\n index: number;\n }\n >;\n};\n\nexport default ScatterPlot;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackBar.d.js","names":[],"sources":["../../../src/types/StackBar.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"StackBar.d.js","names":[],"sources":["../../../src/types/StackBar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { BarContext, BarProps } from './Bar';\nimport { HorizontalBarProps } from './HorizontalBar';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IStackBarProps extends StackBarProps, UnknownProperties {}\nexport type StackBarProps = 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 /** Stack generators\n * @default d3.stack() */\n /** @deprecated */\n stack?: any;\n};\n\n/** @deprecated */\nexport interface IStackBarContext extends StackBarContext, UnknownProperties {}\nexport type StackBarContext = {\n /** Series is an array of points, where each point corresponds to the element in the input data. */\n /** @deprecated */\n series: any[];\n};\n\ndeclare const StackBar: IntergalacticD3Component<'g', StackBarProps, StackBarContext> & {\n Bar: IntergalacticD3Component<'path', BarProps, BarContext>;\n HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext>;\n};\n\nexport default StackBar;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedArea.d.js","names":[],"sources":["../../../src/types/StackedArea.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"StackedArea.d.js","names":[],"sources":["../../../src/types/StackedArea.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport Area from './Area';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IStackedAreaProps extends StackedAreaProps, UnknownProperties {}\nexport type StackedAreaProps = 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 /** Stack generators\n * @default d3.stack() */\n /** @deprecated */\n stack?: any;\n};\n\n/** @deprecated */\nexport interface IStackedAreaContext extends StackedAreaContext, UnknownProperties {}\nexport type StackedAreaContext = {\n /** Series is an array of points, where each point corresponds to the element in the input data. */\n /** @deprecated */\n series: any[];\n};\n\ndeclare const StackedArea: IntergalacticD3Component<'g', StackedAreaProps, StackedAreaContext> & {\n Area: typeof Area;\n};\n\nexport default StackedArea;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.js","names":[],"sources":["../../../src/types/Tooltip.d.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Tooltip.d.js","names":[],"sources":["../../../src/types/Tooltip.d.ts"],"sourcesContent":["import Popper, { PopperProps, PopperTriggerProps } from '@semcore/popper';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { Context } from './context';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface ITooltipChartProps extends TooltipChartProps, UnknownProperties {}\nexport type TooltipChartProps = PopperProps &\n PopperTriggerProps &\n 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 };\n\n/** @deprecated */\nexport interface ITooltipChartContext extends TooltipChartContext, UnknownProperties {\n /** Index active value for Axis x */\n xIndex: number | null;\n /** Index active value for Axis y */\n yIndex: number | null;\n}\nexport type TooltipChartContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n};\n\nexport type TooltipTypeBase = {\n Trigger: typeof Popper.Trigger;\n Popper: typeof Popper.Popper;\n Title: typeof Box;\n Dot: IntergalacticD3Component<'div', BoxProps & { color?: string }, TooltipChartContext>;\n Footer: typeof Box;\n};\n\nexport type TooltipType<ChildrenRenderProps = {}, TooltipProps = {}> = (<\n Tag extends Intergalactic.Tag = typeof Box,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<\n Tag,\n TooltipProps,\n ChildrenRenderProps & TooltipChartContext\n >,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<Intergalactic.Tag> &\n TooltipTypeBase;\n\n/**\n * @deprecated Consider migration to better typed Bubble.Tooltip, HoverLine.Tooltip,\n * HoverRect.Tooltip, Donut.Tooltip, Radar.Tooltip,\n * ScatterPlot.Tooltip or Venn.Tooltip.\n *\n * Migration examples:\n * 1. `<Tooltip tag={HoverLine}>...</Tooltip>` => `<HoverLine.Tooltip>...</HoverLine.Tooltip>`\n * 2. `<Tooltip tag={HoverRect}>...</Tooltip>` => `<HoverRect.Tooltip>...</HoverRect.Tooltip>`\n * 3. `<Tooltip tag={Radar.Hover}>...</Tooltip>` => `<Radar.Tooltip>...</Radar.Tooltip>`\n * 4. `<Tooltip>...</Tooltip>` => `<Bubble.Tooltip>...</Bubble.Tooltip>`\n * 5. `<Tooltip>...</Tooltip>` => `<Donut.Tooltip>...</Donut.Tooltip>`\n * 6. `<Tooltip>...</Tooltip>` => `<ScatterPlot.Tooltip>...</ScatterPlot.Tooltip>`\n * 7. `<Tooltip>...</Tooltip>` => `<Venn.Tooltip>...</Venn.Tooltip>`\n */\ndeclare const Tooltip: TooltipType;\n\nexport default Tooltip;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Venn.d.js","names":[],"sources":["../../../src/types/Venn.d.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Venn.d.js","names":[],"sources":["../../../src/types/Venn.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { FadeInOutProps } from '@semcore/animation';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IVennProps extends VennProps, UnknownProperties {}\nexport type VennProps = Context &\n FadeInOutProps & {\n /**\n * Rotate sets in the chart\n * @default Math.PI / 2\n */\n orientation?: number;\n /**\n * The function for sorting sets inside the chart\n * @default (circle1, circle2) => circle2.radius - circle1.radius\n */\n orientationOrder?: (c1: number, c2: number) => number;\n };\n\n/** @deprecated */\nexport interface ICircleProps extends CircleProps, UnknownProperties {}\nexport type CircleProps = Context & {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /**\n * Human readable name of the circle\n * */\n name: string;\n /** Color circle\n @default #3AB011\n **/\n color?: string;\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 IIntersectionProps extends IntersectionProps, UnknownProperties {}\nexport type IntersectionProps = Context &\n FadeInOutProps & {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /**\n * Human readable name of the intersection\n * */\n name: string;\n /** Enables element transparency */\n transparent?: boolean;\n };\n\ndeclare const Venn: IntergalacticD3Component<'g', VennProps, Context> & {\n Circle: IntergalacticD3Component<'circle', CircleProps, Context>;\n Intersection: IntergalacticD3Component<'path', IntersectionProps, Context>;\n Tooltip: TooltipType<CircleProps>;\n};\n\nexport default Venn;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.js","names":[],"sources":["../../../src/types/context.d.ts"],"sourcesContent":["export default interface IContext {\n /** Data for graphic */\n data?: any;\n /** Scale for svg element */\n scale?: any[];\n\n [key: string]: unknown;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"context.d.js","names":[],"sources":["../../../src/types/context.d.ts"],"sourcesContent":["export type Context = {\n /** Data for graphic */\n data?: unknown;\n /** Scale for svg element */\n scale?: unknown[];\n};\n\n/** @deprecated */\nexport default interface IContext {\n /** Data for graphic */\n /** @deprecated */\n data?: any;\n /** Scale for svg element */\n /** @deprecated */\n scale?: any[];\n\n [key: string]: unknown;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":["_Plot","_interopRequireWildcard","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Axis","_Hover","_ResponsiveContainer","_Line","_Bar","_HorizontalBar","_GroupBar","_StackBar","_Area","_StackedArea","_RadialTree","_Radar","_Donut","_Tooltip","_ScatterPlot","_Bubble","_ReferenceLine","_Venn"],"sources":["../../../src/types/index.d.ts"],"sourcesContent":["// Utils\nexport declare function minMax(data: any, key: string | number): any;\n\n// Color\nexport declare const colors: { [key: string]: string };\n\nexport { default as Plot } from './Plot';\nexport * from './Plot';\n\nexport * from './Axis';\nexport * from './Hover';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport * from './ResponsiveContainer';\n\nexport { default as Line } from './Line';\nexport * from './Line';\n\nexport { default as Bar } from './Bar';\nexport * from './Bar';\n\nexport { default as HorizontalBar } from './HorizontalBar';\nexport * from './HorizontalBar';\n\nexport { default as GroupBar } from './GroupBar';\nexport * from './GroupBar';\n\nexport { default as StackBar } from './StackBar';\nexport * from './StackBar';\n\nexport { default as Area } from './Area';\nexport * from './Area';\n\nexport { default as StackedArea } from './StackedArea';\nexport * from './StackedArea';\n\n/** It becomes resolvable after building and moving file to lib dir */\n\nexport { default as RadialTree } from './RadialTree';\n\nexport * from './RadialTree';\n\nexport { default as Radar } from './Radar';\nexport * from './Radar';\n\nexport { default as Donut } from './Donut';\nexport * from './Donut';\n\nexport { default as Tooltip } from './Tooltip';\nexport * from './Tooltip';\n\nexport { default as ScatterPlot } from './ScatterPlot';\nexport * from './ScatterPlot';\n\nexport { default as Bubble } from './Bubble';\nexport * from './Bubble';\n\nexport { default as ReferenceLine } from './ReferenceLine';\nexport * from './ReferenceLine';\n\nexport { default as Venn } from './Venn';\nexport * from './Venn';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACAC,MAAA,CAAAC,IAAA,CAAAJ,KAAA,EAAAK,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAN,KAAA,CAAAM,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAd,KAAA,CAAAM,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAS,KAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,KAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,KAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,KAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,MAAA,GAAAd,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AAA,GAAAvB,uBAAA,CAAAC,OAAA;AACAC,MAAA,CAAAC,IAAA,CAAAoB,YAAA,EAAAnB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAkB,YAAA,CAAAlB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAU,YAAA,CAAAlB,GAAA;IAAA;EAAA;AAAA;
|
|
1
|
+
{"version":3,"file":"index.d.js","names":["_Plot","_interopRequireWildcard","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Axis","_Hover","_ResponsiveContainer","_Line","_Bar","_HorizontalBar","_GroupBar","_StackBar","_Area","_StackedArea","_RadialTree","_Radar","_Donut","_Tooltip","_ScatterPlot","_Bubble","_ReferenceLine","_Venn"],"sources":["../../../src/types/index.d.ts"],"sourcesContent":["// Utils\nexport declare function minMax(data: any, key: string | number): any;\n\n// Color\nexport declare const colors: { [key: string]: string };\n\nexport { default as Plot } from './Plot';\nexport * from './Plot';\n\nexport * from './Axis';\nexport * from './Hover';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport * from './ResponsiveContainer';\n\nexport { default as Line } from './Line';\nexport * from './Line';\n\nexport { default as Bar } from './Bar';\nexport * from './Bar';\n\nexport { default as HorizontalBar } from './HorizontalBar';\nexport * from './HorizontalBar';\n\nexport { default as GroupBar } from './GroupBar';\nexport * from './GroupBar';\n\nexport { default as StackBar } from './StackBar';\nexport * from './StackBar';\n\nexport { default as Area } from './Area';\nexport * from './Area';\n\nexport { default as StackedArea } from './StackedArea';\nexport * from './StackedArea';\n\n/** It becomes resolvable after building and moving file to lib dir */\n\n// @ts-ignore\nexport { default as RadialTree } from './RadialTree';\n\n// @ts-ignore\nexport * from './RadialTree';\n\nexport { default as Radar } from './Radar';\nexport * from './Radar';\n\nexport { default as Donut } from './Donut';\nexport * from './Donut';\n\nexport { default as Tooltip } from './Tooltip';\nexport * from './Tooltip';\n\nexport { default as ScatterPlot } from './ScatterPlot';\nexport * from './ScatterPlot';\n\nexport { default as Bubble } from './Bubble';\nexport * from './Bubble';\n\nexport { default as ReferenceLine } from './ReferenceLine';\nexport * from './ReferenceLine';\n\nexport { default as Venn } from './Venn';\nexport * from './Venn';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACAC,MAAA,CAAAC,IAAA,CAAAJ,KAAA,EAAAK,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAN,KAAA,CAAAM,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAd,KAAA,CAAAM,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAS,KAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,KAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GA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A,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAyB,cAAA,CAAAzB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAiB,cAAA,CAAAzB,GAAA;IAAA;EAAA;AAAA;AAEA,IAAA0B,KAAA,GAAA/B,uBAAA,CAAAC,OAAA;AACAC,MAAA,CAAAC,IAAA,CAAA4B,KAAA,EAAA3B,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAA0B,KAAA,CAAA1B,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAkB,KAAA,CAAA1B,GAAA;IAAA;EAAA;AAAA"}
|
package/lib/cjs/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["_d3Array","require","_d3Scale","CONSTANT","VIRTUAL_ELEMENT","Symbol","exports","eventToPoint","event","svgRoot","node","currentTarget","target","rect","getBoundingClientRect","clientX","left","clientLeft","clientY","top","clientTop","invert","scale","value","range","domain","paddingOuter","step","scaleQuantize","slice","reverse","definedNullData","x","y","plot","definedData","undefined","scaleOfBandwidth","bandwidth","minMax","data","key","extent","d","getNullData","defined","name","reduce","acc","i","push","_defineProperty2","prev","next","defNext","find","_objectSpread4","length","defPrev","getIndexFromData","bisect","bisector","center","index","findIndex","console","warn","roundedPath","w","h","r","tl","arguments","tr","bl","br","result","concat","getBandwidth","Math","abs","memoize","func","results","_len","args","Array","_key","argsKey","join","apply","measureText","text","fontSize","span","document","createElement","style","_iterator","_createForOfIteratorHelper2","split","_step","s","n","done","line","append","createTextNode","err","e","f","display","body","textWidth","offsetWidth","textHeight","offsetHeight","remove","max","idCounter","uniqueId","prefix"],"sources":["../../src/utils.ts"],"sourcesContent":["import { extent, bisector, Numeric } from 'd3-array';\nimport {\n scaleQuantize,\n ScaleIdentity,\n ScaleTime,\n ScaleContinuousNumeric,\n ScaleBand,\n ScalePoint,\n NumberValue,\n} from 'd3-scale';\nimport React from 'react';\n\nconst CONSTANT = {\n VIRTUAL_ELEMENT: Symbol('VIRTUAL_ELEMENT'),\n} as const;\n\nexport { CONSTANT };\n\nexport const eventToPoint = (event: React.MouseEvent<HTMLElement>, svgRoot: SVGElement) => {\n const node = (event.currentTarget || event.target) as HTMLElement;\n const rect = svgRoot.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n};\n\ntype InvertableScale =\n | ScaleIdentity\n | ScaleBand<unknown>\n | ScaleTime<unknown, unknown>\n | ScaleContinuousNumeric<unknown, unknown>;\nexport const invert = <Scale extends InvertableScale = InvertableScale>(\n scale: Scale,\n value: number,\n) => {\n if ('invert' in scale && scale.invert) return scale.invert(value);\n\n const range = scale.range() as [number, number];\n const domain = scale.domain();\n if ('paddingOuter' in scale) {\n range[0] += scale.paddingOuter() * scale.step();\n range[1] -= scale.paddingOuter() * scale.step();\n }\n\n return scaleQuantize()\n .domain((range[0] <= range[1] ? range : range.slice().reverse()) as NumberValue[])\n .range((range[0] <= range[1] ? domain : domain.slice().reverse()) as number[])(value);\n};\n\nexport const definedNullData = (x: number, y: number) => (plot: { [xOrY: number]: unknown }) =>\n plot[x] !== null && plot[y] !== null;\n\nexport const definedData = (x: number, y: number) => (plot: { [xOrY: number]: unknown }) =>\n plot[x] !== null && plot[x] !== undefined && plot[y] !== null && plot[y] !== undefined;\n\nexport const scaleOfBandwidth = <Scale extends ScaleBand<{}>>(scale: Scale, value: number) =>\n scale.bandwidth ? scale(value)! + scale.bandwidth() / 2 : scale(value);\n\nexport const minMax = <\n Key extends string = string,\n Data extends Iterable<{ [key in Key]: Numeric | null | undefined }> = Iterable<{\n [key in Key]: Numeric | null | undefined;\n }>,\n>(\n data: Data,\n key: Key,\n) => {\n if (typeof key === 'string') {\n return extent(data, (d) => d[key]);\n }\n return extent(data, key);\n};\n\nexport const getNullData = <\n Name extends string = string,\n Data extends { [name in Name]?: unknown | null } = {},\n>(\n data: Data[],\n defined: (data: Data) => boolean,\n name: Name,\n) =>\n data.reduce((acc, d, i, data) => {\n if (defined(d)) {\n acc.push({\n [name]: null,\n } as Data);\n } else {\n const prev = data[i - 1];\n const next = data[i + 1];\n\n if (i === 0) {\n const defNext = data.find(defined);\n acc.push({\n ...d,\n [name]: defNext ? defNext[name] : null,\n });\n }\n\n // prev\n if (prev && defined(prev)) {\n acc.push(prev);\n }\n\n // next\n if (next && defined(next)) {\n acc.push(next);\n }\n\n if (data.length - 1 === i) {\n const defPrev = data.slice().reverse().find(defined);\n acc.push({\n ...d,\n [name]: defPrev ? defPrev[name] : null,\n });\n }\n }\n return acc;\n }, [] as Data[]);\n\ntype IndexFromDataScale =\n | ScaleIdentity\n | ScaleTime<unknown, unknown>\n | ScaleContinuousNumeric<unknown, unknown>\n | ScaleBand<{}>\n | ScalePoint<{}>;\nexport const getIndexFromData = <\n Data extends {\n [key: string]: number;\n } = {},\n Scale extends IndexFromDataScale = IndexFromDataScale,\n>(\n data: Data[],\n scale: Scale,\n key: string,\n value: number,\n) => {\n // detect line chart\n if ('invert' in scale && typeof scale.invert === 'function') {\n const bisect = bisector((d: { [key: string]: number }) => d[key]).center;\n return bisect(data, value);\n }\n // detect bar chart\n else if ('step' in scale && typeof scale.step !== 'undefined') {\n // console.log({ key, scale, value });\n const index = data.findIndex((d) => d[key] === value);\n return index >= 0 ? index : null;\n } else {\n console.warn('[d3-chart/utils/getIndexFromData] encountered incompatible scale type');\n return null;\n }\n};\n\nexport const roundedPath = (\n x: number,\n y: number,\n w: number,\n h: number,\n r: number,\n tl = false,\n tr = false,\n bl = false,\n br = false,\n) => {\n let result = `M${x + r},${y}`;\n result += `h${w - 2 * r}`;\n if (tr) {\n result += `a${r},${r} 0 0 1 ${r},${r}`;\n } else {\n result += `h${r}`;\n result += `v${r}`;\n }\n result += `v${h - 2 * r}`;\n if (br) {\n result += `a${r},${r} 0 0 1 ${-r},${r}`;\n } else {\n result += `v${r}`;\n result += `h${-r}`;\n }\n result += `h${2 * r - w}`;\n if (bl) {\n result += `a${r},${r} 0 0 1 ${-r},${-r}`;\n } else {\n result += `h${-r}`;\n result += `v${-r}`;\n }\n result += `v${2 * r - h}`;\n if (tl) {\n result += `a${r},${r} 0 0 1 ${r},${-r}`;\n } else {\n result += `v${-r}`;\n result += `h${r}`;\n }\n result += 'z';\n return result;\n};\n\nexport const getBandwidth = <Scale extends ScaleBand<{}>>(scale: Scale) => {\n if ('bandwidth' in scale) {\n return scale.bandwidth();\n }\n\n const range = scale.range();\n const domain = scale.domain();\n return Math.abs(range[range.length - 1] - range[0]) / domain.length;\n};\n\nexport const memoize = <Func extends (...args: any[]) => any>(func: Func): Func => {\n const results: { [cacheKey: string]: any } = {};\n return ((...args: any[]) => {\n const argsKey = args.join(',');\n if (!results[argsKey]) {\n results[argsKey] = func(...args);\n }\n return results[argsKey];\n }) as Func;\n};\n\nexport const measureText = memoize((text: string, fontSize?: number) => {\n if (!text) return 0;\n\n const span = document.createElement('span');\n if (fontSize) {\n span.style.fontSize = `${fontSize}px`;\n }\n for (const line of text.split('\\n')) {\n span.append(document.createTextNode(line));\n span.append(document.createElement('br'));\n }\n span.style.display = 'inline-block';\n document.body.append(span);\n const textWidth = span.offsetWidth;\n const textHeight = span.offsetHeight;\n span.remove();\n return Math.max(textWidth, textHeight);\n});\n\nlet idCounter = 0;\nexport const uniqueId = (prefix = 'id-') => `${prefix}${idCounter++}`;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,Q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,CAAC;IAC3C;EAAC,SAAAY,GAAA;IAAAV,SAAA,CAAAW,CAAA,CAAAD,GAAA;EAAA;IAAAV,SAAA,CAAAY,CAAA;EAAA;EACDhB,IAAI,CAACG,KAAK,CAACc,OAAO,GAAG,cAAc;EACnChB,QAAQ,CAACiB,IAAI,CAACN,MAAM,CAACZ,IAAI,CAAC;EAC1B,IAAMmB,SAAS,GAAGnB,IAAI,CAACoB,WAAW;EAClC,IAAMC,UAAU,GAAGrB,IAAI,CAACsB,YAAY;EACpCtB,IAAI,CAACuB,MAAM,EAAE;EACb,OAAOtC,IAAI,CAACuC,GAAG,CAACL,SAAS,EAAEE,UAAU,CAAC;AACxC,CAAC,CAAC;AAAC7G,OAAA,CAAAqF,WAAA,GAAAA,WAAA;AAEH,IAAI4B,SAAS,GAAG,CAAC;AACV,IAAMC,QAAQ,GAAG,SAAXA,QAAQA,CAAA;EAAA,IAAIC,MAAM,GAAAjD,SAAA,CAAAf,MAAA,QAAAe,SAAA,QAAApC,SAAA,GAAAoC,SAAA,MAAG,KAAK;EAAA,UAAAK,MAAA,CAAQ4C,MAAM,EAAA5C,MAAA,CAAG0C,SAAS,EAAE;AAAA,CAAE;AAACjH,OAAA,CAAAkH,QAAA,GAAAA,QAAA"}
|
|
1
|
+
{"version":3,"file":"utils.js","names":["_d3Array","require","_d3Scale","CONSTANT","VIRTUAL_ELEMENT","Symbol","exports","eventToPoint","event","svgRoot","node","currentTarget","target","rect","getBoundingClientRect","clientX","left","clientLeft","clientY","top","clientTop","invert","scale","value","range","domain","paddingOuter","step","scaleQuantize","slice","reverse","definedNullData","x","y","plot","definedData","undefined","scaleOfBandwidth","bandwidth","minMax","data","key","extent","d","getNullData","defined","name","reduce","acc","i","push","_defineProperty2","prev","next","defNext","find","_objectSpread4","length","defPrev","getIndexFromData","bisect","bisector","center","index","findIndex","console","warn","roundedPath","w","h","r","tl","arguments","tr","bl","br","result","concat","getBandwidth","Math","abs","memoize","func","results","_len","args","Array","_key","argsKey","join","apply","measureText","text","fontSize","span","document","createElement","style","_iterator","_createForOfIteratorHelper2","split","_step","s","n","done","line","append","createTextNode","err","e","f","display","body","textWidth","offsetWidth","textHeight","offsetHeight","remove","max","idCounter","uniqueId","prefix"],"sources":["../../src/utils.ts"],"sourcesContent":["import { extent, bisector, Numeric } from 'd3-array';\nimport {\n scaleQuantize,\n ScaleIdentity,\n ScaleTime,\n ScaleContinuousNumeric,\n ScaleBand,\n ScalePoint,\n NumberValue,\n} from 'd3-scale';\nimport React from 'react';\n\nconst CONSTANT = {\n VIRTUAL_ELEMENT: Symbol('VIRTUAL_ELEMENT'),\n} as const;\n\nexport { CONSTANT };\n\nexport const eventToPoint = (event: React.MouseEvent<HTMLElement>, svgRoot: SVGElement) => {\n const node = (event.currentTarget || event.target) as HTMLElement;\n const rect = svgRoot.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n};\n\ntype InvertableScale =\n | ScaleIdentity\n | ScaleBand<{}>\n | ScaleTime<unknown, unknown>\n | ScaleContinuousNumeric<unknown, unknown>;\nexport const invert = <Scale extends InvertableScale = InvertableScale>(\n scale: Scale,\n value: number,\n) => {\n if ('invert' in scale && scale.invert) return scale.invert(value);\n\n const range = scale.range() as [number, number];\n const domain = scale.domain();\n if ('paddingOuter' in scale) {\n range[0] += scale.paddingOuter() * scale.step();\n range[1] -= scale.paddingOuter() * scale.step();\n }\n\n return scaleQuantize()\n .domain((range[0] <= range[1] ? range : range.slice().reverse()) as NumberValue[])\n .range((range[0] <= range[1] ? domain : domain.slice().reverse()) as number[])(value);\n};\n\nexport const definedNullData = (x: number, y: number) => (plot: { [xOrY: number]: unknown }) =>\n plot[x] !== null && plot[y] !== null;\n\nexport const definedData = (x: number, y: number) => (plot: { [xOrY: number]: unknown }) =>\n plot[x] !== null && plot[x] !== undefined && plot[y] !== null && plot[y] !== undefined;\n\nexport const scaleOfBandwidth = <Scale extends ScaleBand<{}>>(scale: Scale, value: number) =>\n scale.bandwidth ? scale(value)! + scale.bandwidth() / 2 : scale(value);\n\nexport const minMax = <\n Key extends string = string,\n Data extends { [key: string]: Numeric | null | undefined }[] = {\n [key: string]: Numeric | null | undefined;\n }[],\n>(\n data: Data,\n key: Key,\n): [min: Data[0][Key], max: Data[0][Key]] => {\n if (typeof key === 'string') {\n return extent(data, (d) => d[key]) as any;\n }\n return extent(data, key) as any;\n};\n\nexport const getNullData = <\n Name extends string = string,\n Data extends { [name in Name]?: unknown | null } = {},\n>(\n data: Data[],\n defined: (data: Data) => boolean,\n name: Name,\n) =>\n data.reduce((acc, d, i, data) => {\n if (defined(d)) {\n acc.push({\n [name]: null,\n } as Data);\n } else {\n const prev = data[i - 1];\n const next = data[i + 1];\n\n if (i === 0) {\n const defNext = data.find(defined);\n acc.push({\n ...d,\n [name]: defNext ? defNext[name] : null,\n });\n }\n\n // prev\n if (prev && defined(prev)) {\n acc.push(prev);\n }\n\n // next\n if (next && defined(next)) {\n acc.push(next);\n }\n\n if (data.length - 1 === i) {\n const defPrev = data.slice().reverse().find(defined);\n acc.push({\n ...d,\n [name]: defPrev ? defPrev[name] : null,\n });\n }\n }\n return acc;\n }, [] as Data[]);\n\ntype IndexFromDataScale =\n | ScaleIdentity\n | ScaleTime<unknown, unknown>\n | ScaleContinuousNumeric<unknown, unknown>\n | ScaleBand<{}>\n | ScalePoint<{}>;\nexport const getIndexFromData = <\n Key extends string,\n Data extends {\n [key in Key]: number;\n } = { [key in Key]: number },\n Scale extends IndexFromDataScale = IndexFromDataScale,\n>(\n data: Data[],\n scale: Scale,\n key: Key,\n value: number,\n) => {\n // detect line chart\n if ('invert' in scale && typeof scale.invert === 'function') {\n const bisect = bisector((d: { [key: string]: number }) => d[key]).center;\n return bisect(data, value);\n }\n // detect bar chart\n else if ('step' in scale && typeof scale.step !== 'undefined') {\n // console.log({ key, scale, value });\n const index = data.findIndex((d) => d[key] === value);\n return index >= 0 ? index : null;\n } else {\n console.warn('[d3-chart/utils/getIndexFromData] encountered incompatible scale type');\n return null;\n }\n};\n\nexport const roundedPath = (\n x: number,\n y: number,\n w: number,\n h: number,\n r: number,\n tl = false,\n tr = false,\n bl = false,\n br = false,\n) => {\n let result = `M${x + r},${y}`;\n result += `h${w - 2 * r}`;\n if (tr) {\n result += `a${r},${r} 0 0 1 ${r},${r}`;\n } else {\n result += `h${r}`;\n result += `v${r}`;\n }\n result += `v${h - 2 * r}`;\n if (br) {\n result += `a${r},${r} 0 0 1 ${-r},${r}`;\n } else {\n result += `v${r}`;\n result += `h${-r}`;\n }\n result += `h${2 * r - w}`;\n if (bl) {\n result += `a${r},${r} 0 0 1 ${-r},${-r}`;\n } else {\n result += `h${-r}`;\n result += `v${-r}`;\n }\n result += `v${2 * r - h}`;\n if (tl) {\n result += `a${r},${r} 0 0 1 ${r},${-r}`;\n } else {\n result += `v${-r}`;\n result += `h${r}`;\n }\n result += 'z';\n return result;\n};\n\nexport const getBandwidth = <Scale extends ScaleBand<{}>>(scale: Scale) => {\n if ('bandwidth' in scale) {\n return scale.bandwidth();\n }\n\n const range = (scale as any).range();\n const domain = (scale as any).domain();\n return Math.abs(range[range.length - 1] - range[0]) / domain.length;\n};\n\nexport const memoize = <Func extends (...args: any[]) => any>(func: Func): Func => {\n const results: { [cacheKey: string]: any } = {};\n return ((...args: any[]) => {\n const argsKey = args.join(',');\n if (!results[argsKey]) {\n results[argsKey] = func(...args);\n }\n return results[argsKey];\n }) as Func;\n};\n\nexport const measureText = memoize((text: string, fontSize?: number) => {\n if (!text) return 0;\n\n const span = document.createElement('span');\n if (fontSize) {\n span.style.fontSize = `${fontSize}px`;\n }\n for (const line of text.split('\\n')) {\n span.append(document.createTextNode(line));\n span.append(document.createElement('br'));\n }\n span.style.display = 'inline-block';\n document.body.append(span);\n const textWidth = span.offsetWidth;\n const textHeight = span.offsetHeight;\n span.remove();\n return Math.max(textWidth, textHeight);\n});\n\nlet idCounter = 0;\nexport const uniqueId = (prefix = 'id-') => `${prefix}${idCounter++}`;\n"],"mappings":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CAACC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3C;EAAC,SAAAY,GAAA;IAAAV,SAAA,CAAAW,CAAA,CAAAD,GAAA;EAAA;IAAAV,SAAA,CAAAY,CAAA;EAAA;EACDhB,IAAI,CAACG,KAAK,CAACc,OAAO,GAAG,cAAc;EACnChB,QAAQ,CAACiB,IAAI,CAACN,MAAM,CAACZ,IAAI,CAAC;EAC1B,IAAMmB,SAAS,GAAGnB,IAAI,CAACoB,WAAW;EAClC,IAAMC,UAAU,GAAGrB,IAAI,CAACsB,YAAY;EACpCtB,IAAI,CAACuB,MAAM,EAAE;EACb,OAAOtC,IAAI,CAACuC,GAAG,CAACL,SAAS,EAAEE,UAAU,CAAC;AACxC,CAAC,CAAC;AAAC7G,OAAA,CAAAqF,WAAA,GAAAA,WAAA;AAEH,IAAI4B,SAAS,GAAG,CAAC;AACV,IAAMC,QAAQ,GAAG,SAAXA,QAAQA,CAAA;EAAA,IAAIC,MAAM,GAAAjD,SAAA,CAAAf,MAAA,QAAAe,SAAA,QAAApC,SAAA,GAAAoC,SAAA,MAAG,KAAK;EAAA,UAAAK,MAAA,CAAQ4C,MAAM,EAAA5C,MAAA,CAAG0C,SAAS,EAAE;AAAA,CAAE;AAACjH,OAAA,CAAAkH,QAAA,GAAAA,QAAA"}
|
package/lib/es6/Area.js
CHANGED
|
@@ -15,15 +15,15 @@ import createElement from './createElement';
|
|
|
15
15
|
import { definedData, scaleOfBandwidth, getNullData, definedNullData } from './utils';
|
|
16
16
|
import ClipPath from './ClipPath';
|
|
17
17
|
/*__reshadow-styles__:"./style/area.shadow.css"*/
|
|
18
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
19
|
-
"__SArea": "
|
|
20
|
-
"_color": "
|
|
21
|
-
"--color": "--
|
|
22
|
-
"_transparent": "
|
|
23
|
-
"__SAreaLine": "
|
|
24
|
-
"--duration": "--
|
|
25
|
-
"__SNull": "
|
|
26
|
-
"_hide": "
|
|
18
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SArea_113x8_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);fill-opacity:.2}.___SArea_113x8_gg_.__color_113x8_gg_{fill:var(--color_113x8)}.___SArea_113x8_gg_.__transparent_113x8_gg_{opacity:.3}.___SAreaLine_113x8_gg_{stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke-width:3;fill:transparent}.___SAreaLine_113x8_gg_.__color_113x8_gg_{stroke:var(--color_113x8)}.___SAreaLine_113x8_gg_.__transparent_113x8_gg_{opacity:.3}.___SAreaLine_113x8_gg_,.___SArea_113x8_gg_{transition-property:d;transition-duration:var(--duration_113x8);transition-timing-function:ease-in-out}.___SNull_113x8_gg_{fill:transparent;stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf);stroke-dasharray:4}.___SNull_113x8_gg_.__hide_113x8_gg_{display:none}" /*__inner_css_end__*/, "113x8_gg_") /*__reshadow_css_end__*/, {
|
|
19
|
+
"__SArea": "___SArea_113x8_gg_",
|
|
20
|
+
"_color": "__color_113x8_gg_",
|
|
21
|
+
"--color": "--color_113x8",
|
|
22
|
+
"_transparent": "__transparent_113x8_gg_",
|
|
23
|
+
"__SAreaLine": "___SAreaLine_113x8_gg_",
|
|
24
|
+
"--duration": "--duration_113x8",
|
|
25
|
+
"__SNull": "___SNull_113x8_gg_",
|
|
26
|
+
"_hide": "__hide_113x8_gg_"
|
|
27
27
|
});
|
|
28
28
|
var AreaRoot = /*#__PURE__*/function (_Component) {
|
|
29
29
|
_inherits(AreaRoot, _Component);
|
package/lib/es6/Axis.js
CHANGED
|
@@ -12,20 +12,20 @@ import { Component, sstyled } from '@semcore/core';
|
|
|
12
12
|
import createElement from './createElement';
|
|
13
13
|
import { scaleOfBandwidth } from './utils';
|
|
14
14
|
/*__reshadow-styles__:"./style/axis.shadow.css"*/
|
|
15
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
16
|
-
"__SAxis": "
|
|
17
|
-
"_hide": "
|
|
18
|
-
"__STick": "
|
|
19
|
-
"__SGrid": "
|
|
20
|
-
"__STitle": "
|
|
21
|
-
"--transform-origin": "--transform-
|
|
22
|
-
"_position_top": "
|
|
23
|
-
"_position_bottom": "
|
|
24
|
-
"_position_right": "
|
|
25
|
-
"_position_left": "
|
|
26
|
-
"_verticalWritingMode": "
|
|
27
|
-
"_position_custom_0": "
|
|
28
|
-
"_position_custom_1": "
|
|
15
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SAxis_rna6f_gg_{stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SAxis_rna6f_gg_.__hide_rna6f_gg_,.___STick_rna6f_gg_.__hide_rna6f_gg_{display:none}.___STick_rna6f_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79)}.___SGrid_rna6f_gg_{fill:transparent;stroke:var(--intergalactic-border-secondary, #e0e1e9)}.___STitle_rna6f_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-text-hint, #6c6e79);transform-origin:var(--transform-origin_rna6f)}.___STitle_rna6f_gg_._position_top_rna6f_gg_{text-anchor:middle}.___STitle_rna6f_gg_._position_bottom_rna6f_gg_{text-anchor:middle;alignment-baseline:hanging}.___STitle_rna6f_gg_._position_left_rna6f_gg_,.___STitle_rna6f_gg_._position_right_rna6f_gg_{transform:rotate(-90deg);text-anchor:middle;alignment-baseline:middle}.___STitle_rna6f_gg_._position_left_rna6f_gg_.__verticalWritingMode_rna6f_gg_,.___STitle_rna6f_gg_._position_right_rna6f_gg_.__verticalWritingMode_rna6f_gg_{writing-mode:vertical-rl;transform:none}.___STick_rna6f_gg_._position_top_rna6f_gg_{transform:translateY(-12px);text-anchor:middle}.___STick_rna6f_gg_._position_bottom_rna6f_gg_{transform:translateY(12px);text-anchor:middle;alignment-baseline:hanging}.___STick_rna6f_gg_._position_right_rna6f_gg_{transform:translateX(16px);text-anchor:start;alignment-baseline:middle}.___STick_rna6f_gg_._position_left_rna6f_gg_{transform:translateX(-16px);text-anchor:end;alignment-baseline:middle}.___STick_rna6f_gg_._position_custom_0_rna6f_gg_{transform:translateY(12px);text-anchor:middle;alignment-baseline:hanging}.___STick_rna6f_gg_._position_custom_1_rna6f_gg_{transform:translateX(-16px);text-anchor:end;alignment-baseline:middle}" /*__inner_css_end__*/, "rna6f_gg_") /*__reshadow_css_end__*/, {
|
|
16
|
+
"__SAxis": "___SAxis_rna6f_gg_",
|
|
17
|
+
"_hide": "__hide_rna6f_gg_",
|
|
18
|
+
"__STick": "___STick_rna6f_gg_",
|
|
19
|
+
"__SGrid": "___SGrid_rna6f_gg_",
|
|
20
|
+
"__STitle": "___STitle_rna6f_gg_",
|
|
21
|
+
"--transform-origin": "--transform-origin_rna6f",
|
|
22
|
+
"_position_top": "_position_top_rna6f_gg_",
|
|
23
|
+
"_position_bottom": "_position_bottom_rna6f_gg_",
|
|
24
|
+
"_position_right": "_position_right_rna6f_gg_",
|
|
25
|
+
"_position_left": "_position_left_rna6f_gg_",
|
|
26
|
+
"_verticalWritingMode": "__verticalWritingMode_rna6f_gg_",
|
|
27
|
+
"_position_custom_0": "_position_custom_0_rna6f_gg_",
|
|
28
|
+
"_position_custom_1": "_position_custom_1_rna6f_gg_"
|
|
29
29
|
});
|
|
30
30
|
var CUSTOM_0 = Symbol('custom_0');
|
|
31
31
|
var CUSTOM_1 = Symbol('custom_1');
|
package/lib/es6/Bar.js
CHANGED
|
@@ -13,14 +13,14 @@ import createElement from './createElement';
|
|
|
13
13
|
import ClipPath from './ClipPath';
|
|
14
14
|
import { getBandwidth, roundedPath } from './utils';
|
|
15
15
|
/*__reshadow-styles__:"./style/bar.shadow.css"*/
|
|
16
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
17
|
-
"__SBar": "
|
|
18
|
-
"--duration": "--
|
|
19
|
-
"_color": "
|
|
20
|
-
"--color": "--
|
|
21
|
-
"_hide": "
|
|
22
|
-
"_transparent": "
|
|
23
|
-
"__SBackground": "
|
|
16
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SBar_1ywra_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_1ywra);transition-timing-function:ease-in-out}.___SBar_1ywra_gg_.__color_1ywra_gg_{fill:var(--color_1ywra)}.___SBar_1ywra_gg_.__hide_1ywra_gg_{display:none}.___SBar_1ywra_gg_.__transparent_1ywra_gg_{opacity:.3}.___SBackground_1ywra_gg_{fill:var(--intergalactic-chart-palette-order-other-data, #c4c7cf)}" /*__inner_css_end__*/, "1ywra_gg_") /*__reshadow_css_end__*/, {
|
|
17
|
+
"__SBar": "___SBar_1ywra_gg_",
|
|
18
|
+
"--duration": "--duration_1ywra",
|
|
19
|
+
"_color": "__color_1ywra_gg_",
|
|
20
|
+
"--color": "--color_1ywra",
|
|
21
|
+
"_hide": "__hide_1ywra_gg_",
|
|
22
|
+
"_transparent": "__transparent_1ywra_gg_",
|
|
23
|
+
"__SBackground": "___SBackground_1ywra_gg_"
|
|
24
24
|
});
|
|
25
25
|
export var MIN_HEIGHT = 2;
|
|
26
26
|
var calcPartBarY = function calcPartBarY(y, minHeight, height) {
|
|
@@ -40,12 +40,13 @@ var BarRoot = /*#__PURE__*/function (_Component) {
|
|
|
40
40
|
}
|
|
41
41
|
_createClass(BarRoot, [{
|
|
42
42
|
key: "getBackgroundProps",
|
|
43
|
-
value: function getBackgroundProps(
|
|
43
|
+
value: function getBackgroundProps(_props, index) {
|
|
44
44
|
var _this$asProps = this.asProps,
|
|
45
45
|
x = _this$asProps.x,
|
|
46
46
|
data = _this$asProps.data;
|
|
47
47
|
return {
|
|
48
|
-
value: data[index][x]
|
|
48
|
+
value: data[index][x],
|
|
49
|
+
index: index
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
52
|
}, {
|