@semcore/d3-chart 2.3.4 → 2.3.6
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 +12 -0
- package/lib/cjs/Area.js +13 -13
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +8 -8
- package/lib/cjs/Bubble.js +15 -15
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/Donut.js +13 -13
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +11 -11
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +1 -4
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +8 -8
- package/lib/cjs/Hover.js +8 -8
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +10 -10
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Plot.js +6 -6
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/RadialTree.js +16 -16
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/ReferenceLine.js +10 -10
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +11 -11
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +0 -3
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +0 -3
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +10 -10
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +7 -7
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +3 -3
- package/lib/cjs/a11y/PlotA11yView.js +4 -4
- package/lib/cjs/createElement.js +3 -3
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/types/Area.d.js +2 -0
- package/lib/cjs/types/Area.d.js.map +1 -0
- package/lib/cjs/types/Axis.d.js +2 -0
- package/lib/cjs/types/Axis.d.js.map +1 -0
- package/lib/cjs/types/Bar.d.js +2 -0
- package/lib/cjs/types/Bar.d.js.map +1 -0
- package/lib/cjs/types/Bubble.d.js +2 -0
- package/lib/cjs/types/Bubble.d.js.map +1 -0
- package/lib/cjs/types/ClipPath.d.js +2 -0
- package/lib/cjs/types/ClipPath.d.js.map +1 -0
- package/lib/cjs/types/Donut.d.js +2 -0
- package/lib/cjs/types/Donut.d.js.map +1 -0
- package/lib/cjs/types/GroupBar.d.js +2 -0
- package/lib/cjs/types/GroupBar.d.js.map +1 -0
- package/lib/cjs/types/HorizontalBar.d.js +2 -0
- package/lib/cjs/types/HorizontalBar.d.js.map +1 -0
- package/lib/cjs/types/Hover.d.js +2 -0
- package/lib/cjs/types/Hover.d.js.map +1 -0
- package/lib/cjs/types/Line.d.js +2 -0
- package/lib/cjs/types/Line.d.js.map +1 -0
- package/lib/cjs/types/Plot.d.js +2 -0
- package/lib/cjs/types/Plot.d.js.map +1 -0
- package/lib/cjs/types/ReferenceLine.d.js +2 -0
- package/lib/cjs/types/ReferenceLine.d.js.map +1 -0
- package/lib/cjs/types/ResponsiveContainer.d.js +2 -0
- package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -0
- package/lib/cjs/types/ScatterPlot.d.js +2 -0
- package/lib/cjs/types/ScatterPlot.d.js.map +1 -0
- package/lib/cjs/types/StackBar.d.js +2 -0
- package/lib/cjs/types/StackBar.d.js.map +1 -0
- package/lib/cjs/types/StackedArea.d.js +2 -0
- package/lib/cjs/types/StackedArea.d.js.map +1 -0
- package/lib/cjs/types/Tooltip.d.js +2 -0
- package/lib/cjs/types/Tooltip.d.js.map +1 -0
- package/lib/cjs/types/Venn.d.js +2 -0
- package/lib/cjs/types/Venn.d.js.map +1 -0
- package/lib/cjs/types/context.d.js +2 -0
- package/lib/cjs/types/context.d.js.map +1 -0
- package/lib/cjs/types/index.d.js +378 -0
- package/lib/cjs/types/index.d.js.map +1 -0
- package/lib/es6/Area.js +12 -12
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +8 -8
- package/lib/es6/Bubble.js +15 -15
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/Donut.js +11 -11
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +11 -11
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +1 -4
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +8 -8
- package/lib/es6/Hover.js +6 -6
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Plot.js +7 -7
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/RadialTree.js +18 -19
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/ReferenceLine.js +10 -10
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +11 -11
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +0 -3
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +0 -3
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +10 -10
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +7 -7
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +3 -3
- package/lib/es6/a11y/PlotA11yView.js +4 -4
- package/lib/es6/createElement.js +2 -2
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/types/Area.d.js +2 -0
- package/lib/es6/types/Area.d.js.map +1 -0
- package/lib/es6/types/Axis.d.js +2 -0
- package/lib/es6/types/Axis.d.js.map +1 -0
- package/lib/es6/types/Bar.d.js +2 -0
- package/lib/es6/types/Bar.d.js.map +1 -0
- package/lib/es6/types/Bubble.d.js +2 -0
- package/lib/es6/types/Bubble.d.js.map +1 -0
- package/lib/es6/types/ClipPath.d.js +2 -0
- package/lib/es6/types/ClipPath.d.js.map +1 -0
- package/lib/es6/types/Donut.d.js +2 -0
- package/lib/es6/types/Donut.d.js.map +1 -0
- package/lib/es6/types/GroupBar.d.js +2 -0
- package/lib/es6/types/GroupBar.d.js.map +1 -0
- package/lib/es6/types/HorizontalBar.d.js +2 -0
- package/lib/es6/types/HorizontalBar.d.js.map +1 -0
- package/lib/es6/types/Hover.d.js +2 -0
- package/lib/es6/types/Hover.d.js.map +1 -0
- package/lib/es6/types/Line.d.js +2 -0
- package/lib/es6/types/Line.d.js.map +1 -0
- package/lib/es6/types/Plot.d.js +2 -0
- package/lib/es6/types/Plot.d.js.map +1 -0
- package/lib/es6/types/ReferenceLine.d.js +2 -0
- package/lib/es6/types/ReferenceLine.d.js.map +1 -0
- package/lib/es6/types/ResponsiveContainer.d.js +2 -0
- package/lib/es6/types/ResponsiveContainer.d.js.map +1 -0
- package/lib/es6/types/ScatterPlot.d.js +2 -0
- package/lib/es6/types/ScatterPlot.d.js.map +1 -0
- package/lib/es6/types/StackBar.d.js +2 -0
- package/lib/es6/types/StackBar.d.js.map +1 -0
- package/lib/es6/types/StackedArea.d.js +2 -0
- package/lib/es6/types/StackedArea.d.js.map +1 -0
- package/lib/es6/types/Tooltip.d.js +2 -0
- package/lib/es6/types/Tooltip.d.js.map +1 -0
- package/lib/es6/types/Venn.d.js +2 -0
- package/lib/es6/types/Venn.d.js.map +1 -0
- package/lib/es6/types/context.d.js +2 -0
- package/lib/es6/types/context.d.js.map +1 -0
- package/lib/{cjs/types/index.d.ts → es6/types/index.d.js} +4 -22
- package/lib/es6/types/index.d.js.map +1 -0
- package/package.json +5 -2
- package/lib/cjs/types/Area.d.ts +0 -48
- package/lib/cjs/types/Axis.d.ts +0 -64
- package/lib/cjs/types/Bar.d.ts +0 -52
- package/lib/cjs/types/Bubble.d.ts +0 -32
- package/lib/cjs/types/ClipPath.d.ts +0 -26
- package/lib/cjs/types/Donut.d.ts +0 -46
- package/lib/cjs/types/GroupBar.d.ts +0 -20
- package/lib/cjs/types/HorizontalBar.d.ts +0 -29
- package/lib/cjs/types/Hover.d.ts +0 -15
- package/lib/cjs/types/Line.d.ts +0 -50
- package/lib/cjs/types/Plot.d.ts +0 -91
- package/lib/cjs/types/ReferenceLine.d.ts +0 -31
- package/lib/cjs/types/ResponsiveContainer.d.ts +0 -20
- package/lib/cjs/types/ScatterPlot.d.ts +0 -27
- package/lib/cjs/types/StackBar.d.ts +0 -26
- package/lib/cjs/types/StackedArea.d.ts +0 -26
- package/lib/cjs/types/Tooltip.d.ts +0 -33
- package/lib/cjs/types/Venn.d.ts +0 -45
- package/lib/cjs/types/context.d.ts +0 -6
- package/lib/es6/types/Area.d.ts +0 -48
- package/lib/es6/types/Axis.d.ts +0 -64
- package/lib/es6/types/Bar.d.ts +0 -52
- package/lib/es6/types/Bubble.d.ts +0 -32
- package/lib/es6/types/ClipPath.d.ts +0 -26
- package/lib/es6/types/Donut.d.ts +0 -46
- package/lib/es6/types/GroupBar.d.ts +0 -20
- package/lib/es6/types/HorizontalBar.d.ts +0 -29
- package/lib/es6/types/Hover.d.ts +0 -15
- package/lib/es6/types/Line.d.ts +0 -50
- package/lib/es6/types/Plot.d.ts +0 -91
- package/lib/es6/types/ReferenceLine.d.ts +0 -31
- package/lib/es6/types/ResponsiveContainer.d.ts +0 -20
- package/lib/es6/types/ScatterPlot.d.ts +0 -27
- package/lib/es6/types/StackBar.d.ts +0 -26
- package/lib/es6/types/StackedArea.d.ts +0 -26
- package/lib/es6/types/Tooltip.d.ts +0 -33
- package/lib/es6/types/Venn.d.ts +0 -45
- package/lib/es6/types/context.d.ts +0 -6
- package/lib/es6/types/index.d.ts +0 -59
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupBar.d.js","names":[],"sources":["../../../src/types/GroupBar.d.ts"],"sourcesContent":["import { CProps, ReturnEl } from '@semcore/core';\nimport { IBarContext, IBarProps } from './Bar';\nimport { IHorizontalBarProps } from './HorizontalBar';\nimport IContext from './context';\n\nexport interface IGroupBarProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n /** Scale for group bars */\n scaleGroup?: any;\n}\n\ndeclare const GroupBar: (<T>(props: CProps<IGroupBarProps & T>) => ReturnEl) & {\n Bar: <T>(props: CProps<IBarProps & T, IBarContext>) => ReturnEl;\n HorizontalBar: <T>(props: CProps<IHorizontalBarProps & T, IBarContext>) => ReturnEl;\n};\n\nexport default GroupBar;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HorizontalBar.d.js","names":[],"sources":["../../../src/types/HorizontalBar.d.ts"],"sourcesContent":["import { CProps, ReturnEl } from '@semcore/core';\nimport IContext from './context';\nimport { IBarContext, IBackgroundProps } from './Bar';\n\nexport interface IHorizontalBarProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for 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}\n\ndeclare const HorizontalBar: (<T>(\n props: CProps<IHorizontalBarProps & T, IBarContext>,\n) => ReturnEl) & {\n Background: <T>(props: CProps<IBackgroundProps & T>) => ReturnEl;\n};\n\nexport default HorizontalBar;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hover.d.js","names":[],"sources":["../../../src/types/Hover.d.ts"],"sourcesContent":["import { CProps, ReturnEl } from '@semcore/core';\nimport IContext from './context';\n\nexport interface IHoverProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n}\n\ndeclare const HoverLine: <T>(props: CProps<IHoverProps & T>) => ReturnEl;\n\ndeclare const HoverRect: <T>(props: CProps<IHoverProps & T>) => ReturnEl;\n\nexport { HoverLine, HoverRect };\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Line.d.js","names":[],"sources":["../../../src/types/Line.d.ts"],"sourcesContent":["import { CProps, ReturnEl } from '@semcore/core';\nimport IContext from './context';\nimport { CurveFactory } from 'd3-shape';\nimport { IFadeInOutProps } from '@semcore/animation';\n\nexport interface ILineProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for 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}\n\nexport interface ILineDotsProps extends IContext, IFadeInOutProps {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Index active of element */\n activeIndex?: number;\n}\n\nexport interface ILineDotsContext {\n /** Value element of data */\n value?: any;\n /** Index element of data */\n index?: number;\n}\n\nexport interface ILineNullProps extends IContext {\n /** Hide property */\n hide?: boolean;\n}\n\ndeclare const Line: (<T>(props: CProps<ILineProps & T>) => ReturnEl) & {\n Dots: <T>(props: CProps<ILineDotsProps & T, ILineDotsContext>) => ReturnEl;\n Null: <T>(props: CProps<ILineNullProps & T>) => ReturnEl;\n};\n\nexport default Line;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import { IBoxProps } from '@semcore/flex-box';\nimport { CProps, ReturnEl } from '@semcore/core';\nimport IContext from './context';\n\nexport interface IPlotProps extends IContext, IBoxProps {\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\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};\n\ndeclare const Plot: <T>(props: CProps<IPlotProps & T>) => ReturnEl;\n\nexport default Plot;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReferenceLine.d.js","names":[],"sources":["../../../src/types/ReferenceLine.d.ts"],"sourcesContent":["import { CProps, ReturnEl } from '@semcore/core';\nimport IContext from './context';\n\nexport interface IReferenceLineProps extends IContext {\n /** The position of the title relative reference line\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value: any;\n}\n\nexport interface IReferenceLineTitleProps extends IContext {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value: any;\n}\n\nexport interface IReferenceLineBackgroundProps extends IContext {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value: any;\n}\n\ndeclare const ReferenceLine: (<T>(props: CProps<IReferenceLineProps & T>) => ReturnEl) & {\n Title: <T>(props: CProps<IReferenceLineTitleProps & T>) => ReturnEl;\n Background: <T>(props: CProps<IReferenceLineBackgroundProps & T>) => ReturnEl;\n};\n\nexport default ReferenceLine;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponsiveContainer.d.js","names":[],"sources":["../../../src/types/ResponsiveContainer.d.ts"],"sourcesContent":["import { IBoxProps } from '@semcore/flex-box';\nimport { CProps, ReturnEl } from '@semcore/core';\n\nexport interface IResponsiveContainerProps extends IBoxProps {\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\nexport interface IResponsiveContainerContext {\n width?: number;\n height?: number;\n}\n\ndeclare const ResponsiveContainer: <T>(\n props: CProps<IResponsiveContainerProps & T, IResponsiveContainerContext>,\n) => ReturnEl;\n\nexport default ResponsiveContainer;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScatterPlot.d.js","names":[],"sources":["../../../src/types/ScatterPlot.d.ts"],"sourcesContent":["import { CProps, ReturnEl } from '@semcore/core';\nimport IContext from './context';\n\nexport interface IScatterPlotProps extends IContext {\n /** Field from data for XAxis */\n x: string;\n /** Field from data for YAxis */\n y: string;\n /** Field from data for 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}\n\ndeclare const ScatterPlot: <T>(props: CProps<IScatterPlotProps & T>) => ReturnEl;\n\nexport default ScatterPlot;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StackBar.d.js","names":[],"sources":["../../../src/types/StackBar.d.ts"],"sourcesContent":["import { CProps, ReturnEl } from '@semcore/core';\nimport IContext from './context';\nimport { IBarContext, IBarProps } from './Bar';\nimport { IHorizontalBarProps } from './HorizontalBar';\n\nexport interface IStackBarProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n /** Stack generators\n * @default d3.stack() */\n stack?: any;\n}\n\nexport interface IStackBarContext {\n /** Series is an array of points, where each point corresponds to the element in the input data. */\n series: any[];\n}\n\ndeclare const StackBar: (<T>(props: CProps<IStackBarProps & T, IStackBarContext>) => ReturnEl) & {\n Bar: <T>(props: CProps<IBarProps & T, IBarContext>) => ReturnEl;\n HorizontalBar: <T>(props: CProps<IHorizontalBarProps & T, IBarContext>) => ReturnEl;\n};\n\nexport default StackBar;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StackedArea.d.js","names":[],"sources":["../../../src/types/StackedArea.d.ts"],"sourcesContent":["import { CProps, ReturnEl } from '@semcore/core';\nimport IContext from './context';\nimport Area from './Area';\n\nexport interface IStackedAreaProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n /** Stack generators\n * @default d3.stack() */\n stack?: any;\n}\n\nexport interface IStackedAreaContext {\n /** Series is an array of points, where each point corresponds to the element in the input data. */\n series: any[];\n}\n\ndeclare const StackedArea: (<T>(\n props: CProps<IStackedAreaProps & T, IStackedAreaContext>,\n) => ReturnEl) & {\n Area: typeof Area;\n};\n\nexport default StackedArea;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.d.js","names":[],"sources":["../../../src/types/Tooltip.d.ts"],"sourcesContent":["import { ComponentProps } from 'react';\nimport Popper, { IPopperProps, IPopperTriggerProps } from '@semcore/popper';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { IBoxProps } from '@semcore/flex-box';\nimport IContext from './context';\n\nexport interface ITooltipChartProps extends IPopperProps, IPopperTriggerProps, IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n}\n\nexport interface ITooltipChartContext {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n /** Index active value for Axis x */\n xIndex: number | null;\n /** Index active value for Axis y */\n yIndex: number | null;\n}\n\ndeclare const Tooltip: (<T>(\n props: CProps<ITooltipChartProps & T, ITooltipChartContext>,\n) => ReturnEl) & {\n Trigger: <T>(props: CProps<ComponentProps<typeof Popper.Trigger> & T>) => ReturnEl;\n Popper: <T>(props: CProps<ComponentProps<typeof Popper.Popper> & T>) => ReturnEl;\n Title: <T>(props: CProps<IBoxProps & T>) => ReturnEl;\n Dot: <T>(props: CProps<IBoxProps & { color?: string } & T>) => ReturnEl;\n Footer: <T>(props: CProps<T>) => null;\n};\n\nexport default Tooltip;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Venn.d.js","names":[],"sources":["../../../src/types/Venn.d.ts"],"sourcesContent":["import { CProps, ReturnEl } from '@semcore/core';\nimport IContext from './context';\nimport { IFadeInOutProps } from '@semcore/animation';\n\nexport interface IVennProps extends IContext, IFadeInOutProps {\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\nexport interface ICircleProps extends IContext {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /** Color circle\n @default #3AB011\n **/\n color?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n}\n\nexport interface IIntersectionProps extends IContext, IFadeInOutProps {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n}\n\ndeclare const Venn: (<T>(props: CProps<IVennProps & T>) => ReturnEl) & {\n Circle: <T>(props: CProps<ICircleProps & T>) => ReturnEl;\n Intersection: <T>(props: CProps<IIntersectionProps & T>) => ReturnEl;\n};\n\nexport default Venn;\n"],"mappings":""}
|
|
@@ -0,0 +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"],"mappings":""}
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
var _exportNames = {
|
|
9
|
+
Plot: true,
|
|
10
|
+
ResponsiveContainer: true,
|
|
11
|
+
Line: true,
|
|
12
|
+
Bar: true,
|
|
13
|
+
HorizontalBar: true,
|
|
14
|
+
GroupBar: true,
|
|
15
|
+
StackBar: true,
|
|
16
|
+
Area: true,
|
|
17
|
+
StackedArea: true,
|
|
18
|
+
RadialTree: true,
|
|
19
|
+
Donut: true,
|
|
20
|
+
Tooltip: true,
|
|
21
|
+
ScatterPlot: true,
|
|
22
|
+
Bubble: true,
|
|
23
|
+
ReferenceLine: true,
|
|
24
|
+
Venn: true
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "Area", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _Area["default"];
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "Bar", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _Bar["default"];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "Bubble", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _Bubble["default"];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "Donut", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function get() {
|
|
47
|
+
return _Donut["default"];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "GroupBar", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _GroupBar["default"];
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "HorizontalBar", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function get() {
|
|
59
|
+
return _HorizontalBar["default"];
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "Line", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function get() {
|
|
65
|
+
return _Line["default"];
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "Plot", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function get() {
|
|
71
|
+
return _Plot["default"];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "RadialTree", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function get() {
|
|
77
|
+
return _RadialTree["default"];
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "ReferenceLine", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function get() {
|
|
83
|
+
return _ReferenceLine["default"];
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, "ResponsiveContainer", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function get() {
|
|
89
|
+
return _ResponsiveContainer["default"];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "ScatterPlot", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function get() {
|
|
95
|
+
return _ScatterPlot["default"];
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "StackBar", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function get() {
|
|
101
|
+
return _StackBar["default"];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(exports, "StackedArea", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function get() {
|
|
107
|
+
return _StackedArea["default"];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, "Tooltip", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function get() {
|
|
113
|
+
return _Tooltip["default"];
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "Venn", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function get() {
|
|
119
|
+
return _Venn["default"];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
var _Plot = _interopRequireWildcard(require("./Plot"));
|
|
124
|
+
|
|
125
|
+
Object.keys(_Plot).forEach(function (key) {
|
|
126
|
+
if (key === "default" || key === "__esModule") return;
|
|
127
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
128
|
+
if (key in exports && exports[key] === _Plot[key]) return;
|
|
129
|
+
Object.defineProperty(exports, key, {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function get() {
|
|
132
|
+
return _Plot[key];
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
var _Axis = require("./Axis");
|
|
138
|
+
|
|
139
|
+
Object.keys(_Axis).forEach(function (key) {
|
|
140
|
+
if (key === "default" || key === "__esModule") return;
|
|
141
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
142
|
+
if (key in exports && exports[key] === _Axis[key]) return;
|
|
143
|
+
Object.defineProperty(exports, key, {
|
|
144
|
+
enumerable: true,
|
|
145
|
+
get: function get() {
|
|
146
|
+
return _Axis[key];
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
var _Hover = require("./Hover");
|
|
152
|
+
|
|
153
|
+
Object.keys(_Hover).forEach(function (key) {
|
|
154
|
+
if (key === "default" || key === "__esModule") return;
|
|
155
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
156
|
+
if (key in exports && exports[key] === _Hover[key]) return;
|
|
157
|
+
Object.defineProperty(exports, key, {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get: function get() {
|
|
160
|
+
return _Hover[key];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
var _ResponsiveContainer = _interopRequireWildcard(require("./ResponsiveContainer"));
|
|
166
|
+
|
|
167
|
+
Object.keys(_ResponsiveContainer).forEach(function (key) {
|
|
168
|
+
if (key === "default" || key === "__esModule") return;
|
|
169
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
170
|
+
if (key in exports && exports[key] === _ResponsiveContainer[key]) return;
|
|
171
|
+
Object.defineProperty(exports, key, {
|
|
172
|
+
enumerable: true,
|
|
173
|
+
get: function get() {
|
|
174
|
+
return _ResponsiveContainer[key];
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
var _Line = _interopRequireWildcard(require("./Line"));
|
|
180
|
+
|
|
181
|
+
Object.keys(_Line).forEach(function (key) {
|
|
182
|
+
if (key === "default" || key === "__esModule") return;
|
|
183
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
184
|
+
if (key in exports && exports[key] === _Line[key]) return;
|
|
185
|
+
Object.defineProperty(exports, key, {
|
|
186
|
+
enumerable: true,
|
|
187
|
+
get: function get() {
|
|
188
|
+
return _Line[key];
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
var _Bar = _interopRequireWildcard(require("./Bar"));
|
|
194
|
+
|
|
195
|
+
Object.keys(_Bar).forEach(function (key) {
|
|
196
|
+
if (key === "default" || key === "__esModule") return;
|
|
197
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
198
|
+
if (key in exports && exports[key] === _Bar[key]) return;
|
|
199
|
+
Object.defineProperty(exports, key, {
|
|
200
|
+
enumerable: true,
|
|
201
|
+
get: function get() {
|
|
202
|
+
return _Bar[key];
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
var _HorizontalBar = _interopRequireWildcard(require("./HorizontalBar"));
|
|
208
|
+
|
|
209
|
+
Object.keys(_HorizontalBar).forEach(function (key) {
|
|
210
|
+
if (key === "default" || key === "__esModule") return;
|
|
211
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
212
|
+
if (key in exports && exports[key] === _HorizontalBar[key]) return;
|
|
213
|
+
Object.defineProperty(exports, key, {
|
|
214
|
+
enumerable: true,
|
|
215
|
+
get: function get() {
|
|
216
|
+
return _HorizontalBar[key];
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
var _GroupBar = _interopRequireWildcard(require("./GroupBar"));
|
|
222
|
+
|
|
223
|
+
Object.keys(_GroupBar).forEach(function (key) {
|
|
224
|
+
if (key === "default" || key === "__esModule") return;
|
|
225
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
226
|
+
if (key in exports && exports[key] === _GroupBar[key]) return;
|
|
227
|
+
Object.defineProperty(exports, key, {
|
|
228
|
+
enumerable: true,
|
|
229
|
+
get: function get() {
|
|
230
|
+
return _GroupBar[key];
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
var _StackBar = _interopRequireWildcard(require("./StackBar"));
|
|
236
|
+
|
|
237
|
+
Object.keys(_StackBar).forEach(function (key) {
|
|
238
|
+
if (key === "default" || key === "__esModule") return;
|
|
239
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
240
|
+
if (key in exports && exports[key] === _StackBar[key]) return;
|
|
241
|
+
Object.defineProperty(exports, key, {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get: function get() {
|
|
244
|
+
return _StackBar[key];
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
var _Area = _interopRequireWildcard(require("./Area"));
|
|
250
|
+
|
|
251
|
+
Object.keys(_Area).forEach(function (key) {
|
|
252
|
+
if (key === "default" || key === "__esModule") return;
|
|
253
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
254
|
+
if (key in exports && exports[key] === _Area[key]) return;
|
|
255
|
+
Object.defineProperty(exports, key, {
|
|
256
|
+
enumerable: true,
|
|
257
|
+
get: function get() {
|
|
258
|
+
return _Area[key];
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
var _StackedArea = _interopRequireWildcard(require("./StackedArea"));
|
|
264
|
+
|
|
265
|
+
Object.keys(_StackedArea).forEach(function (key) {
|
|
266
|
+
if (key === "default" || key === "__esModule") return;
|
|
267
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
268
|
+
if (key in exports && exports[key] === _StackedArea[key]) return;
|
|
269
|
+
Object.defineProperty(exports, key, {
|
|
270
|
+
enumerable: true,
|
|
271
|
+
get: function get() {
|
|
272
|
+
return _StackedArea[key];
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
var _RadialTree = _interopRequireWildcard(require("./RadialTree"));
|
|
278
|
+
|
|
279
|
+
Object.keys(_RadialTree).forEach(function (key) {
|
|
280
|
+
if (key === "default" || key === "__esModule") return;
|
|
281
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
282
|
+
if (key in exports && exports[key] === _RadialTree[key]) return;
|
|
283
|
+
Object.defineProperty(exports, key, {
|
|
284
|
+
enumerable: true,
|
|
285
|
+
get: function get() {
|
|
286
|
+
return _RadialTree[key];
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
var _Donut = _interopRequireWildcard(require("./Donut"));
|
|
292
|
+
|
|
293
|
+
Object.keys(_Donut).forEach(function (key) {
|
|
294
|
+
if (key === "default" || key === "__esModule") return;
|
|
295
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
296
|
+
if (key in exports && exports[key] === _Donut[key]) return;
|
|
297
|
+
Object.defineProperty(exports, key, {
|
|
298
|
+
enumerable: true,
|
|
299
|
+
get: function get() {
|
|
300
|
+
return _Donut[key];
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
var _Tooltip = _interopRequireWildcard(require("./Tooltip"));
|
|
306
|
+
|
|
307
|
+
Object.keys(_Tooltip).forEach(function (key) {
|
|
308
|
+
if (key === "default" || key === "__esModule") return;
|
|
309
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
310
|
+
if (key in exports && exports[key] === _Tooltip[key]) return;
|
|
311
|
+
Object.defineProperty(exports, key, {
|
|
312
|
+
enumerable: true,
|
|
313
|
+
get: function get() {
|
|
314
|
+
return _Tooltip[key];
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
var _ScatterPlot = _interopRequireWildcard(require("./ScatterPlot"));
|
|
320
|
+
|
|
321
|
+
Object.keys(_ScatterPlot).forEach(function (key) {
|
|
322
|
+
if (key === "default" || key === "__esModule") return;
|
|
323
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
324
|
+
if (key in exports && exports[key] === _ScatterPlot[key]) return;
|
|
325
|
+
Object.defineProperty(exports, key, {
|
|
326
|
+
enumerable: true,
|
|
327
|
+
get: function get() {
|
|
328
|
+
return _ScatterPlot[key];
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
var _Bubble = _interopRequireWildcard(require("./Bubble"));
|
|
334
|
+
|
|
335
|
+
Object.keys(_Bubble).forEach(function (key) {
|
|
336
|
+
if (key === "default" || key === "__esModule") return;
|
|
337
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
338
|
+
if (key in exports && exports[key] === _Bubble[key]) return;
|
|
339
|
+
Object.defineProperty(exports, key, {
|
|
340
|
+
enumerable: true,
|
|
341
|
+
get: function get() {
|
|
342
|
+
return _Bubble[key];
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
var _ReferenceLine = _interopRequireWildcard(require("./ReferenceLine"));
|
|
348
|
+
|
|
349
|
+
Object.keys(_ReferenceLine).forEach(function (key) {
|
|
350
|
+
if (key === "default" || key === "__esModule") return;
|
|
351
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
352
|
+
if (key in exports && exports[key] === _ReferenceLine[key]) return;
|
|
353
|
+
Object.defineProperty(exports, key, {
|
|
354
|
+
enumerable: true,
|
|
355
|
+
get: function get() {
|
|
356
|
+
return _ReferenceLine[key];
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
var _Venn = _interopRequireWildcard(require("./Venn"));
|
|
362
|
+
|
|
363
|
+
Object.keys(_Venn).forEach(function (key) {
|
|
364
|
+
if (key === "default" || key === "__esModule") return;
|
|
365
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
366
|
+
if (key in exports && exports[key] === _Venn[key]) return;
|
|
367
|
+
Object.defineProperty(exports, key, {
|
|
368
|
+
enumerable: true,
|
|
369
|
+
get: function get() {
|
|
370
|
+
return _Venn[key];
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
376
|
+
|
|
377
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
378
|
+
//# sourceMappingURL=index.d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"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// eslint-disable-next-line import/no-unresolved\nexport { default as RadialTree } from './RadialTree';\n// eslint-disable-next-line import/no-unresolved\nexport * from './RadialTree';\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;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAIA;;AAEA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/lib/es6/Area.js
CHANGED
|
@@ -13,31 +13,31 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
13
13
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { area, curveLinear, line } from 'd3-shape';
|
|
16
|
-
import Dots from './Dots';
|
|
17
16
|
import { Component, sstyled } from '@semcore/core';
|
|
17
|
+
import uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';
|
|
18
|
+
import findComponent from '@semcore/utils/lib/findComponent';
|
|
19
|
+
import Dots from './Dots';
|
|
18
20
|
import createElement from './createElement';
|
|
19
21
|
import { definedData, scaleOfBandwidth, getNullData, definedNullData } from './utils';
|
|
20
22
|
import ClipPath from './ClipPath';
|
|
21
|
-
import uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';
|
|
22
|
-
import findComponent from '@semcore/utils/lib/findComponent';
|
|
23
23
|
|
|
24
24
|
/*__reshadow-styles__:"./style/area.shadow.css"*/
|
|
25
25
|
var style = (
|
|
26
26
|
/*__reshadow_css_start__*/
|
|
27
27
|
_sstyled.insert(
|
|
28
28
|
/*__inner_css_start__*/
|
|
29
|
-
".
|
|
29
|
+
".___SArea_1o1u1_gg_{fill:#2bb3ff;fill-opacity:.2}.___SArea_1o1u1_gg_.__color_1o1u1_gg_{fill:var(--color_1o1u1)}.___SAreaLine_1o1u1_gg_{stroke:#2bb3ff;stroke-width:3;fill:transparent}.___SAreaLine_1o1u1_gg_.__color_1o1u1_gg_{stroke:var(--color_1o1u1)}.___SArea_1o1u1_gg_,.___SAreaLine_1o1u1_gg_{transition-property:d;transition-duration:var(--duration_1o1u1);transition-timing-function:ease-in-out}.___SNull_1o1u1_gg_{fill:transparent;stroke:#8a8e9b;stroke-dasharray:4}.___SNull_1o1u1_gg_.__hide_1o1u1_gg_{display:none}"
|
|
30
30
|
/*__inner_css_end__*/
|
|
31
|
-
, "
|
|
31
|
+
, "1o1u1_gg_")
|
|
32
32
|
/*__reshadow_css_end__*/
|
|
33
33
|
, {
|
|
34
|
-
"__SArea": "
|
|
35
|
-
"_color": "
|
|
36
|
-
"--color": "--
|
|
37
|
-
"__SAreaLine": "
|
|
38
|
-
"--duration": "--
|
|
39
|
-
"__SNull": "
|
|
40
|
-
"_hide": "
|
|
34
|
+
"__SArea": "___SArea_1o1u1_gg_",
|
|
35
|
+
"_color": "__color_1o1u1_gg_",
|
|
36
|
+
"--color": "--color_1o1u1",
|
|
37
|
+
"__SAreaLine": "___SAreaLine_1o1u1_gg_",
|
|
38
|
+
"--duration": "--duration_1o1u1",
|
|
39
|
+
"__SNull": "___SNull_1o1u1_gg_",
|
|
40
|
+
"_hide": "__hide_1o1u1_gg_"
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
var AreaRoot = /*#__PURE__*/function (_Component) {
|
package/lib/es6/Area.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Area.js","names":["React","area","curveLinear","line","
|
|
1
|
+
{"version":3,"file":"Area.js","names":["React","area","curveLinear","line","Component","sstyled","uniqueIDEnhancement","findComponent","Dots","createElement","definedData","scaleOfBandwidth","getNullData","definedNullData","ClipPath","AreaRoot","asProps","x","y","color","data","d3Line","d3","duration","uid","SArea","Element","SAreaLine","styles","hide","size","Children","advanceMode","Area","Line","displayName","dataHintsHandler","specifyDataRowFields","establishDataType","rect","setAttribute","style","y0","$rootProps","curve","scale","xScale","yScale","yRange","range","defined","p","y1","props","Null","SNull"],"sources":["../../src/Area.jsx"],"sourcesContent":["import React from 'react';\nimport { area, curveLinear, line } from 'd3-shape';\nimport { Component, sstyled } from '@semcore/core';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport findComponent from '@semcore/utils/lib/findComponent';\nimport Dots from './Dots';\nimport createElement from './createElement';\nimport { definedData, scaleOfBandwidth, getNullData, definedNullData } from './utils';\nimport ClipPath from './ClipPath';\n\nimport style from './style/area.shadow.css';\n\nclass AreaRoot extends Component {\n static displayName = 'Area';\n static style = style;\n static enhance = [uniqueIDEnhancement()];\n\n static defaultProps = ({ x, y, y0, $rootProps, curve = curveLinear, scale }) => {\n const [xScale, yScale] = scale || $rootProps.scale;\n const yRange = yScale.range();\n\n return {\n d3: area()\n .defined(definedData(x, y))\n .curve(curve)\n .x((p) => scaleOfBandwidth(xScale, p[x]))\n .y0((p) => (p[y0] ? scaleOfBandwidth(yScale, p[y0]) : yRange[0]))\n .y1((p) => scaleOfBandwidth(yScale, p[y])),\n d3Line: line()\n .defined(definedData(x, y))\n .curve(curve)\n .x((p) => scaleOfBandwidth(xScale, p[x]))\n .y((p) => scaleOfBandwidth(yScale, p[y])),\n duration: 500,\n };\n };\n\n getDotsProps() {\n const { x, y, color, data, d3Line } = this.asProps;\n\n return {\n x,\n y,\n data,\n d3: d3Line,\n color,\n };\n }\n\n getNullProps() {\n const { x, y, color, data, d3Line } = this.asProps;\n return {\n data: getNullData(data, definedNullData(x, y), y),\n d3: d3Line,\n color,\n };\n }\n\n getLineProps() {\n const { duration, color, data, d3Line, uid } = this.asProps;\n\n return {\n uid,\n data,\n d3: d3Line,\n color,\n duration,\n };\n }\n\n render() {\n const SArea = this.Element;\n const SAreaLine = 'path';\n const { styles, hide, d3, d3Line, data, color, uid, size, duration, x, y, Children } =\n this.asProps;\n const advanceMode = !!findComponent(Children, [Area.Line.displayName]);\n\n this.asProps.dataHintsHandler.specifyDataRowFields(x, y);\n this.asProps.dataHintsHandler.establishDataType('time-series');\n\n return sstyled(styles)(\n <>\n {!advanceMode && (\n <SAreaLine\n aria-hidden\n clipPath={`url(#${uid})`}\n d={d3Line(data)}\n color={color}\n use:duration={`${duration}ms`}\n />\n )}\n <SArea\n aria-hidden\n clipPath={`url(#${uid})`}\n render=\"path\"\n d={d3(data)}\n hide={hide}\n color={color}\n use:duration={`${duration}ms`}\n />\n {duration && (\n <ClipPath\n aria-hidden\n setAttributeTag={(rect) => {\n rect.setAttribute('width', size[0]);\n }}\n id={uid}\n x=\"0\"\n y=\"0\"\n width={0}\n height={size[1]}\n transition={`width ${duration}ms ease-in-out`}\n />\n )}\n </>,\n );\n }\n}\n\nfunction Line(props) {\n const { Element: SAreaLine, styles, d3, data, color, duration, uid } = props;\n return sstyled(styles)(\n <SAreaLine\n render=\"path\"\n clipPath={`url(#${uid})`}\n d={d3(data)}\n color={color}\n use:duration={`${duration}ms`}\n />,\n );\n}\n\nfunction Null(props) {\n const { Element: SNull, styles, d3, data, hide, color } = props;\n return sstyled(styles)(<SNull render=\"path\" d={d3(data)} hide={hide} color={color} />);\n}\n\nconst Area = createElement(AreaRoot, {\n Dots,\n Null,\n Line,\n});\n\nexport default Area;\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EA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