@visactor/react-vchart 1.8.2 → 1.8.3
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/cjs/VChart.d.ts +3 -1
- package/cjs/VChart.js +11 -3
- package/cjs/VChart.js.map +1 -1
- package/cjs/VChartSimple.d.ts +6 -0
- package/cjs/VChartSimple.js +10 -0
- package/cjs/VChartSimple.js.map +1 -0
- package/cjs/charts/AreaChart.d.ts +3 -1
- package/cjs/charts/AreaChart.js +11 -2
- package/cjs/charts/AreaChart.js.map +1 -1
- package/cjs/charts/BarChart.d.ts +3 -1
- package/cjs/charts/BarChart.js +11 -2
- package/cjs/charts/BarChart.js.map +1 -1
- package/cjs/charts/BaseChart.d.ts +5 -3
- package/cjs/charts/BaseChart.js +35 -39
- package/cjs/charts/BaseChart.js.map +1 -1
- package/cjs/charts/BoxPlotChart.d.ts +2 -0
- package/cjs/charts/BoxPlotChart.js +11 -2
- package/cjs/charts/BoxPlotChart.js.map +1 -1
- package/cjs/charts/CircularProgressChart.d.ts +2 -0
- package/cjs/charts/CircularProgressChart.js +11 -2
- package/cjs/charts/CircularProgressChart.js.map +1 -1
- package/cjs/charts/CommonChart.d.ts +2 -0
- package/cjs/charts/CommonChart.js +11 -2
- package/cjs/charts/CommonChart.js.map +1 -1
- package/cjs/charts/FunnelChart.d.ts +2 -0
- package/cjs/charts/FunnelChart.js +11 -2
- package/cjs/charts/FunnelChart.js.map +1 -1
- package/cjs/charts/HistogramChart.d.ts +2 -0
- package/cjs/charts/HistogramChart.js +11 -2
- package/cjs/charts/HistogramChart.js.map +1 -1
- package/cjs/charts/LineChart.d.ts +3 -1
- package/cjs/charts/LineChart.js +11 -2
- package/cjs/charts/LineChart.js.map +1 -1
- package/cjs/charts/LinearProgressChart.d.ts +2 -0
- package/cjs/charts/LinearProgressChart.js +11 -2
- package/cjs/charts/LinearProgressChart.js.map +1 -1
- package/cjs/charts/MapChart.d.ts +3 -1
- package/cjs/charts/MapChart.js +11 -2
- package/cjs/charts/MapChart.js.map +1 -1
- package/cjs/charts/PieChart.d.ts +3 -1
- package/cjs/charts/PieChart.js +11 -2
- package/cjs/charts/PieChart.js.map +1 -1
- package/cjs/charts/RadarChart.d.ts +3 -1
- package/cjs/charts/RadarChart.js +11 -2
- package/cjs/charts/RadarChart.js.map +1 -1
- package/cjs/charts/RangeColumnChart.d.ts +3 -1
- package/cjs/charts/RangeColumnChart.js +11 -2
- package/cjs/charts/RangeColumnChart.js.map +1 -1
- package/cjs/charts/RoseChart.d.ts +3 -1
- package/cjs/charts/RoseChart.js +11 -3
- package/cjs/charts/RoseChart.js.map +1 -1
- package/cjs/charts/ScatterChart.d.ts +3 -1
- package/cjs/charts/ScatterChart.js +12 -2
- package/cjs/charts/ScatterChart.js.map +1 -1
- package/cjs/charts/SequenceChart.d.ts +3 -1
- package/cjs/charts/SequenceChart.js +11 -2
- package/cjs/charts/SequenceChart.js.map +1 -1
- package/cjs/charts/WordCloudChart.d.ts +3 -1
- package/cjs/charts/WordCloudChart.js +11 -2
- package/cjs/charts/WordCloudChart.js.map +1 -1
- package/cjs/charts/index.js.map +1 -1
- package/cjs/components/Axis.js.map +1 -1
- package/cjs/components/BaseComponent.js.map +1 -1
- package/cjs/components/Brush.js.map +1 -1
- package/cjs/components/Crosshair.js.map +1 -1
- package/cjs/components/DataZoom.js.map +1 -1
- package/cjs/components/Indicator.js.map +1 -1
- package/cjs/components/Legend.js.map +1 -1
- package/cjs/components/Mark.js.map +1 -1
- package/cjs/components/MarkArea.js.map +1 -1
- package/cjs/components/MarkLine.js.map +1 -1
- package/cjs/components/MarkPoint.js.map +1 -1
- package/cjs/components/Player.js.map +1 -1
- package/cjs/components/Region.js +1 -2
- package/cjs/components/Region.js.map +1 -1
- package/cjs/components/ScrollBar.js +2 -1
- package/cjs/components/ScrollBar.js.map +1 -1
- package/cjs/components/Title.js.map +1 -1
- package/cjs/components/Tooltip.js.map +1 -1
- package/cjs/components/index.js.map +1 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/containers/withContainer.js.map +1 -1
- package/cjs/context/chart.d.ts +2 -2
- package/cjs/context/chart.js.map +1 -1
- package/cjs/context/stage.d.ts +2 -2
- package/cjs/context/stage.js.map +1 -1
- package/cjs/context/view.js.map +1 -1
- package/cjs/eventsUtils.d.ts +2 -0
- package/cjs/eventsUtils.js +2 -1
- package/cjs/eventsUtils.js.map +1 -1
- package/cjs/index.d.ts +2 -2
- package/cjs/index.js +3 -10
- package/cjs/index.js.map +1 -1
- package/cjs/series/Area.d.ts +1 -1
- package/cjs/series/Area.js.map +1 -1
- package/cjs/series/Bar.d.ts +1 -1
- package/cjs/series/Bar.js.map +1 -1
- package/cjs/series/BaseSeries.js.map +1 -1
- package/cjs/series/BoxPlot.d.ts +1 -1
- package/cjs/series/BoxPlot.js.map +1 -1
- package/cjs/series/CircularProgress.d.ts +1 -1
- package/cjs/series/CircularProgress.js.map +1 -1
- package/cjs/series/Dot.d.ts +1 -1
- package/cjs/series/Dot.js.map +1 -1
- package/cjs/series/Funnel.d.ts +1 -1
- package/cjs/series/Funnel.js.map +1 -1
- package/cjs/series/Line.d.ts +1 -1
- package/cjs/series/Line.js.map +1 -1
- package/cjs/series/LinearProgress.d.ts +1 -1
- package/cjs/series/LinearProgress.js +1 -2
- package/cjs/series/LinearProgress.js.map +1 -1
- package/cjs/series/Link.d.ts +1 -1
- package/cjs/series/Link.js +2 -1
- package/cjs/series/Link.js.map +1 -1
- package/cjs/series/Map.d.ts +1 -1
- package/cjs/series/Map.js.map +1 -1
- package/cjs/series/Pie.d.ts +1 -1
- package/cjs/series/Pie.js.map +1 -1
- package/cjs/series/Radar.d.ts +1 -1
- package/cjs/series/Radar.js.map +1 -1
- package/cjs/series/RangeColumn.d.ts +1 -1
- package/cjs/series/RangeColumn.js.map +1 -1
- package/cjs/series/Rose.d.ts +1 -1
- package/cjs/series/Rose.js.map +1 -1
- package/cjs/series/Scatter.d.ts +1 -1
- package/cjs/series/Scatter.js.map +1 -1
- package/cjs/series/Series.d.ts +1 -1
- package/cjs/series/Series.js +1 -1
- package/cjs/series/Series.js.map +1 -1
- package/cjs/series/WordCloud.d.ts +1 -1
- package/cjs/series/WordCloud.js.map +1 -1
- package/cjs/series/index.js.map +1 -1
- package/cjs/util.js.map +1 -1
- package/esm/VChart.d.ts +3 -1
- package/esm/VChart.js +7 -1
- package/esm/VChart.js.map +1 -1
- package/esm/VChartSimple.d.ts +6 -0
- package/esm/VChartSimple.js +4 -0
- package/esm/VChartSimple.js.map +1 -0
- package/esm/charts/AreaChart.d.ts +3 -1
- package/esm/charts/AreaChart.js +6 -1
- package/esm/charts/AreaChart.js.map +1 -1
- package/esm/charts/BarChart.d.ts +3 -1
- package/esm/charts/BarChart.js +6 -1
- package/esm/charts/BarChart.js.map +1 -1
- package/esm/charts/BaseChart.d.ts +5 -3
- package/esm/charts/BaseChart.js +34 -41
- package/esm/charts/BaseChart.js.map +1 -1
- package/esm/charts/BoxPlotChart.d.ts +2 -0
- package/esm/charts/BoxPlotChart.js +6 -1
- package/esm/charts/BoxPlotChart.js.map +1 -1
- package/esm/charts/CircularProgressChart.d.ts +2 -0
- package/esm/charts/CircularProgressChart.js +6 -1
- package/esm/charts/CircularProgressChart.js.map +1 -1
- package/esm/charts/CommonChart.d.ts +2 -0
- package/esm/charts/CommonChart.js +6 -1
- package/esm/charts/CommonChart.js.map +1 -1
- package/esm/charts/FunnelChart.d.ts +2 -0
- package/esm/charts/FunnelChart.js +6 -1
- package/esm/charts/FunnelChart.js.map +1 -1
- package/esm/charts/HistogramChart.d.ts +2 -0
- package/esm/charts/HistogramChart.js +6 -1
- package/esm/charts/HistogramChart.js.map +1 -1
- package/esm/charts/LineChart.d.ts +3 -1
- package/esm/charts/LineChart.js +6 -1
- package/esm/charts/LineChart.js.map +1 -1
- package/esm/charts/LinearProgressChart.d.ts +2 -0
- package/esm/charts/LinearProgressChart.js +6 -1
- package/esm/charts/LinearProgressChart.js.map +1 -1
- package/esm/charts/MapChart.d.ts +3 -1
- package/esm/charts/MapChart.js +6 -1
- package/esm/charts/MapChart.js.map +1 -1
- package/esm/charts/PieChart.d.ts +3 -1
- package/esm/charts/PieChart.js +6 -1
- package/esm/charts/PieChart.js.map +1 -1
- package/esm/charts/RadarChart.d.ts +3 -1
- package/esm/charts/RadarChart.js +6 -1
- package/esm/charts/RadarChart.js.map +1 -1
- package/esm/charts/RangeColumnChart.d.ts +3 -1
- package/esm/charts/RangeColumnChart.js +6 -1
- package/esm/charts/RangeColumnChart.js.map +1 -1
- package/esm/charts/RoseChart.d.ts +3 -1
- package/esm/charts/RoseChart.js +6 -2
- package/esm/charts/RoseChart.js.map +1 -1
- package/esm/charts/ScatterChart.d.ts +3 -1
- package/esm/charts/ScatterChart.js +7 -1
- package/esm/charts/ScatterChart.js.map +1 -1
- package/esm/charts/SequenceChart.d.ts +3 -1
- package/esm/charts/SequenceChart.js +6 -1
- package/esm/charts/SequenceChart.js.map +1 -1
- package/esm/charts/WordCloudChart.d.ts +3 -1
- package/esm/charts/WordCloudChart.js +6 -1
- package/esm/charts/WordCloudChart.js.map +1 -1
- package/esm/charts/index.js.map +1 -1
- package/esm/components/Axis.js.map +1 -1
- package/esm/components/BaseComponent.js.map +1 -1
- package/esm/components/Brush.js.map +1 -1
- package/esm/components/Crosshair.js.map +1 -1
- package/esm/components/DataZoom.js.map +1 -1
- package/esm/components/Indicator.js.map +1 -1
- package/esm/components/Legend.js.map +1 -1
- package/esm/components/Mark.js.map +1 -1
- package/esm/components/MarkArea.js.map +1 -1
- package/esm/components/MarkLine.js.map +1 -1
- package/esm/components/MarkPoint.js.map +1 -1
- package/esm/components/Player.js.map +1 -1
- package/esm/components/Region.js +1 -2
- package/esm/components/Region.js.map +1 -1
- package/esm/components/ScrollBar.js +2 -1
- package/esm/components/ScrollBar.js.map +1 -1
- package/esm/components/Title.js.map +1 -1
- package/esm/components/Tooltip.js.map +1 -1
- package/esm/components/index.js.map +1 -1
- package/esm/constants.js.map +1 -1
- package/esm/containers/withContainer.js.map +1 -1
- package/esm/context/chart.d.ts +2 -2
- package/esm/context/chart.js.map +1 -1
- package/esm/context/stage.d.ts +2 -2
- package/esm/context/stage.js.map +1 -1
- package/esm/context/view.js.map +1 -1
- package/esm/eventsUtils.d.ts +2 -0
- package/esm/eventsUtils.js +2 -1
- package/esm/eventsUtils.js.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.js +2 -2
- package/esm/index.js.map +1 -1
- package/esm/series/Area.d.ts +1 -1
- package/esm/series/Area.js.map +1 -1
- package/esm/series/Bar.d.ts +1 -1
- package/esm/series/Bar.js.map +1 -1
- package/esm/series/BaseSeries.js.map +1 -1
- package/esm/series/BoxPlot.d.ts +1 -1
- package/esm/series/BoxPlot.js.map +1 -1
- package/esm/series/CircularProgress.d.ts +1 -1
- package/esm/series/CircularProgress.js.map +1 -1
- package/esm/series/Dot.d.ts +1 -1
- package/esm/series/Dot.js.map +1 -1
- package/esm/series/Funnel.d.ts +1 -1
- package/esm/series/Funnel.js.map +1 -1
- package/esm/series/Line.d.ts +1 -1
- package/esm/series/Line.js.map +1 -1
- package/esm/series/LinearProgress.d.ts +1 -1
- package/esm/series/LinearProgress.js +1 -2
- package/esm/series/LinearProgress.js.map +1 -1
- package/esm/series/Link.d.ts +1 -1
- package/esm/series/Link.js +2 -1
- package/esm/series/Link.js.map +1 -1
- package/esm/series/Map.d.ts +1 -1
- package/esm/series/Map.js.map +1 -1
- package/esm/series/Pie.d.ts +1 -1
- package/esm/series/Pie.js.map +1 -1
- package/esm/series/Radar.d.ts +1 -1
- package/esm/series/Radar.js.map +1 -1
- package/esm/series/RangeColumn.d.ts +1 -1
- package/esm/series/RangeColumn.js.map +1 -1
- package/esm/series/Rose.d.ts +1 -1
- package/esm/series/Rose.js.map +1 -1
- package/esm/series/Scatter.d.ts +1 -1
- package/esm/series/Scatter.js.map +1 -1
- package/esm/series/Series.d.ts +1 -1
- package/esm/series/Series.js +1 -1
- package/esm/series/Series.js.map +1 -1
- package/esm/series/WordCloud.d.ts +1 -1
- package/esm/series/WordCloud.js.map +1 -1
- package/esm/series/index.js.map +1 -1
- package/esm/util.js.map +1 -1
- package/package.json +6 -6
package/esm/series/Area.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAI7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Area.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IAreaSeriesSpec } from '@visactor/vchart';\n\nexport type AreaProps = BaseSeriesProps & Omit<IAreaSeriesSpec, 'type'>;\nexport const Area = createSeries<AreaProps>('Area', ['area'], 'area');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAI7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Area.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IAreaSeriesSpec } from '@visactor/vchart';\n\nexport type AreaProps = BaseSeriesProps & Omit<IAreaSeriesSpec, 'type'>;\nexport const Area = createSeries<AreaProps>('Area', ['area'], 'area');\n"]}
|
package/esm/series/Bar.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IBarSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IBarSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type BarProps = BaseSeriesProps & Omit<IBarSeriesSpec, 'type'>;
|
|
4
4
|
export declare const Bar: import("react").FC<BaseSeriesProps & Omit<IBarSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
package/esm/series/Bar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Bar.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\n\nimport { IBarSeriesSpec } from '@visactor/vchart';\n\nexport type BarProps = BaseSeriesProps & Omit<IBarSeriesSpec, 'type'>;\n\nexport const Bar = createSeries<BarProps>('Bar', ['bar'], 'bar');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Bar.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\n\nimport type { IBarSeriesSpec } from '@visactor/vchart';\n\nexport type BarProps = BaseSeriesProps & Omit<IBarSeriesSpec, 'type'>;\n\nexport const Bar = createSeries<BarProps>('Bar', ['bar'], 'bar');\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/BaseSeries.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,gBAAgB,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,sBAAsB,EAEtB,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAA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;YAEvC,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC;SACnC;aAAM;YACL,MAAM,aAAa,GAAG,WAAW,CAAI,KAAK,EAAE,WAAW,CAAC,CAAC;YAEzD,SAAS,CAAC,aAAa,CAAC,CAAC;YACzB,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE;gBAC/C,UAAU,CAAC,OAAO,GAAG,aAAa,CAAC;gBACnC,eAAe,CAAC,aAAa,CAAC,CAAC;aAChC;SACF;QAED,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YACnB,OAAO,GAAG,EAAE;gBACV,eAAe,EAAE,CAAC;gBAClB,eAAe,EAAE,CAAC;YACpB,CAAC,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;IACjC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","file":"BaseSeries.js","sourcesContent":["import React from 'react';\nimport { isNil, isEqual, pickWithout } from '@visactor/vutils';\nimport RootChartContext from '../context/chart';\nimport {\n REACT_TO_VCHART_EVENTS,\n EventsProps,\n findEventProps,\n COMMON_EVENTK_KEYS,\n VCHART_TO_REACT_EVENTS\n} from '../eventsUtils';\nimport { uid } from '../util';\n\nexport interface BaseSeriesProps extends EventsProps {\n id?: string | number;\n}\n\nexport const createSeries = <T extends BaseSeriesProps>(componentName: string, markNames: string[], type?: string) => {\n const ignoreKeys = ['id', 'updateId'];\n const notSpecKeys = COMMON_EVENTK_KEYS.concat(ignoreKeys);\n\n const Comp: React.FC<T & { updateId?: number }> = props => {\n const context = React.useContext(RootChartContext);\n\n const id = React.useRef<string | number>(isNil(props.id) ? uid(type ?? 'series') : props.id);\n\n const seriesSpec = React.useRef<Partial<T>>();\n const bindedEvents = React.useRef<Record<string, boolean>>({});\n const updateId = React.useRef<number>(props.updateId);\n\n const handleEvent = (e: any) => {\n const markIds = markNames.map(markName => `${id.current}-${markName}`);\n if (e?.mark && markIds.includes(e.mark.getUserId())) {\n props[VCHART_TO_REACT_EVENTS[e.event.type]](e);\n }\n };\n\n const addMarkEvent = (events: EventsProps) => {\n if (!events || !context.chart) {\n return;\n }\n\n if (bindedEvents) {\n Object.keys(bindedEvents).forEach(eventKey => {\n if (!events[eventKey]) {\n context.chart.off(REACT_TO_VCHART_EVENTS[eventKey], handleEvent);\n }\n bindedEvents.current[eventKey] = false;\n });\n }\n\n Object.keys(events).forEach(eventKey => {\n if (!bindedEvents?.[eventKey]) {\n context.chart.on(REACT_TO_VCHART_EVENTS[eventKey], handleEvent);\n\n if (!bindedEvents) {\n bindedEvents.current = {};\n }\n bindedEvents.current[eventKey] = true;\n }\n });\n };\n\n const removeMarkEvent = () => {\n addMarkEvent({});\n };\n\n const addMarkId = (spec: any) => {\n markNames.forEach(markName => {\n const defaultMarkId = `${id.current}-${markName}`;\n\n if (isNil(spec[markName])) {\n spec[markName] = { id: defaultMarkId };\n } else if (isNil(spec[markName].id)) {\n spec[markName].id = defaultMarkId;\n }\n });\n };\n\n const insertToContext = (props: Partial<T>) => {\n if (context.specFromChildren) {\n if (!context.specFromChildren.series) {\n context.specFromChildren.series = [];\n }\n\n const spec = isNil(type) ? { ...props, id: id.current } : { ...props, id: id.current, type };\n\n addMarkId(spec);\n context.specFromChildren.series.push(spec);\n context.isChildrenUpdated = true;\n }\n };\n\n const updateToContext = (props: Partial<T>) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (!context.specFromChildren.series) {\n insertToContext(props);\n return;\n }\n\n const series = context.specFromChildren.series;\n const index = series.findIndex((entry: any) => entry.id === id.current);\n\n if (index >= 0) {\n series[index] = isNil(type) ? { ...props, id: id.current } : { ...props, id: id.current, type };\n addMarkId(series[index]);\n } else {\n insertToContext(props);\n }\n context.isChildrenUpdated = true;\n };\n\n const deleteToContext = () => {\n if (!context.specFromChildren) {\n return;\n }\n const series = context.specFromChildren.series ?? [];\n const index = series.findIndex((entry: any) => entry.id === id.current);\n\n if (index >= 0) {\n const newSeries = series.slice(0, index - 1).concat(series.slice(index + 1));\n context.specFromChildren.series = newSeries;\n context.isChildrenUpdated = true;\n }\n };\n\n addMarkEvent(findEventProps(props));\n if (props.updateId !== updateId.current) {\n // chart render\n updateId.current = props.updateId;\n } else {\n const newSeriesSpec = pickWithout<T>(props, notSpecKeys);\n\n addMarkId(newSeriesSpec);\n if (!isEqual(newSeriesSpec, seriesSpec.current)) {\n seriesSpec.current = newSeriesSpec;\n updateToContext(newSeriesSpec);\n }\n }\n\n React.useEffect(() => {\n return () => {\n deleteToContext();\n removeMarkEvent();\n };\n }, []);\n\n return null;\n };\n\n Comp.displayName = componentName;\n return Comp;\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/BaseSeries.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,gBAAgB,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,sBAAsB,EAEtB,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAM9B,MAAM,CAAC,MAAM,YAAY,GAAG,CAA4B,aAAqB,EAAE,SAAmB,EAAE,IAAa,EAAE,EAAE;IACnH,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACtC,MAAM,WAAW,GAAG,kBAAkB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAE1D,MAAM,IAAI,GAAwC,KAAK,CAAC,EAAE;QACxD,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAEnD,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAkB,KAAK,CAAC,KAAK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e,EAAE,CAAC;gBAClB,eAAe,EAAE,CAAC;YACpB,CAAC,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;IACjC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","file":"BaseSeries.js","sourcesContent":["import React from 'react';\nimport { isNil, isEqual, pickWithout } from '@visactor/vutils';\nimport RootChartContext from '../context/chart';\nimport {\n REACT_TO_VCHART_EVENTS,\n EventsProps,\n findEventProps,\n COMMON_EVENTK_KEYS,\n VCHART_TO_REACT_EVENTS\n} from '../eventsUtils';\nimport { uid } from '../util';\n\nexport interface BaseSeriesProps extends EventsProps {\n id?: string | number;\n}\n\nexport const createSeries = <T extends BaseSeriesProps>(componentName: string, markNames: string[], type?: string) => {\n const ignoreKeys = ['id', 'updateId'];\n const notSpecKeys = COMMON_EVENTK_KEYS.concat(ignoreKeys);\n\n const Comp: React.FC<T & { updateId?: number }> = props => {\n const context = React.useContext(RootChartContext);\n\n const id = React.useRef<string | number>(isNil(props.id) ? uid(type ?? 'series') : props.id);\n\n const seriesSpec = React.useRef<Partial<T>>();\n const bindedEvents = React.useRef<Record<string, boolean>>({});\n const updateId = React.useRef<number>(props.updateId);\n\n const handleEvent = (e: any) => {\n const markIds = markNames.map(markName => `${id.current}-${markName}`);\n if (e?.mark && markIds.includes(e.mark.getUserId())) {\n props[VCHART_TO_REACT_EVENTS[e.event.type]](e);\n }\n };\n\n const addMarkEvent = (events: EventsProps) => {\n if (!events || !context.chart) {\n return;\n }\n\n if (bindedEvents) {\n Object.keys(bindedEvents).forEach(eventKey => {\n if (!events[eventKey]) {\n context.chart.off(REACT_TO_VCHART_EVENTS[eventKey], handleEvent);\n }\n bindedEvents.current[eventKey] = false;\n });\n }\n\n Object.keys(events).forEach(eventKey => {\n if (!bindedEvents?.[eventKey]) {\n context.chart.on(REACT_TO_VCHART_EVENTS[eventKey], handleEvent);\n\n if (!bindedEvents) {\n bindedEvents.current = {};\n }\n bindedEvents.current[eventKey] = true;\n }\n });\n };\n\n const removeMarkEvent = () => {\n addMarkEvent({});\n };\n\n const addMarkId = (spec: any) => {\n markNames.forEach(markName => {\n const defaultMarkId = `${id.current}-${markName}`;\n\n if (isNil(spec[markName])) {\n spec[markName] = { id: defaultMarkId };\n } else if (isNil(spec[markName].id)) {\n spec[markName].id = defaultMarkId;\n }\n });\n };\n\n const insertToContext = (props: Partial<T>) => {\n if (context.specFromChildren) {\n if (!context.specFromChildren.series) {\n context.specFromChildren.series = [];\n }\n\n const spec = isNil(type) ? { ...props, id: id.current } : { ...props, id: id.current, type };\n\n addMarkId(spec);\n context.specFromChildren.series.push(spec);\n context.isChildrenUpdated = true;\n }\n };\n\n const updateToContext = (props: Partial<T>) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (!context.specFromChildren.series) {\n insertToContext(props);\n return;\n }\n\n const series = context.specFromChildren.series;\n const index = series.findIndex((entry: any) => entry.id === id.current);\n\n if (index >= 0) {\n series[index] = isNil(type) ? { ...props, id: id.current } : { ...props, id: id.current, type };\n addMarkId(series[index]);\n } else {\n insertToContext(props);\n }\n context.isChildrenUpdated = true;\n };\n\n const deleteToContext = () => {\n if (!context.specFromChildren) {\n return;\n }\n const series = context.specFromChildren.series ?? [];\n const index = series.findIndex((entry: any) => entry.id === id.current);\n\n if (index >= 0) {\n const newSeries = series.slice(0, index - 1).concat(series.slice(index + 1));\n context.specFromChildren.series = newSeries;\n context.isChildrenUpdated = true;\n }\n };\n\n addMarkEvent(findEventProps(props));\n if (props.updateId !== updateId.current) {\n // chart render\n updateId.current = props.updateId;\n } else {\n const newSeriesSpec = pickWithout<T>(props, notSpecKeys);\n\n addMarkId(newSeriesSpec);\n if (!isEqual(newSeriesSpec, seriesSpec.current)) {\n seriesSpec.current = newSeriesSpec;\n updateToContext(newSeriesSpec);\n }\n }\n\n React.useEffect(() => {\n return () => {\n deleteToContext();\n removeMarkEvent();\n };\n }, []);\n\n return null;\n };\n\n Comp.displayName = componentName;\n return Comp;\n};\n"]}
|
package/esm/series/BoxPlot.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IBoxPlotSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IBoxPlotSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type BoxPlotProps = BaseSeriesProps & Omit<IBoxPlotSeriesSpec, 'type'>;
|
|
4
4
|
export declare const BoxPlot: import("react").FC<BaseSeriesProps & Omit<IBoxPlotSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/BoxPlot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAe,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC","file":"BoxPlot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IBoxPlotSeriesSpec } from '@visactor/vchart';\n\nexport type BoxPlotProps = BaseSeriesProps & Omit<IBoxPlotSeriesSpec, 'type'>;\n\nexport const BoxPlot = createSeries<BoxPlotProps>('BoxPlot', ['boxPlot'], 'boxPlot');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/BoxPlot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAe,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC","file":"BoxPlot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IBoxPlotSeriesSpec } from '@visactor/vchart';\n\nexport type BoxPlotProps = BaseSeriesProps & Omit<IBoxPlotSeriesSpec, 'type'>;\n\nexport const BoxPlot = createSeries<BoxPlotProps>('BoxPlot', ['boxPlot'], 'boxPlot');\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { ICircularProgressSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { ICircularProgressSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type CircularProgressProps = BaseSeriesProps & Omit<ICircularProgressSeriesSpec, 'type'>;
|
|
4
4
|
export declare const CircularProgress: import("react").FC<BaseSeriesProps & Omit<ICircularProgressSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/CircularProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAC1C,kBAAkB,EAClB,CAAC,kBAAkB,CAAC,EACpB,kBAAkB,CACnB,CAAC","file":"CircularProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { ICircularProgressSeriesSpec } from '@visactor/vchart';\n\nexport type CircularProgressProps = BaseSeriesProps & Omit<ICircularProgressSeriesSpec, 'type'>;\n\nexport const CircularProgress = createSeries<CircularProgressProps>(\n 'CircularProgress',\n ['circularProgress'],\n 'circularProgress'\n);\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/CircularProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAC1C,kBAAkB,EAClB,CAAC,kBAAkB,CAAC,EACpB,kBAAkB,CACnB,CAAC","file":"CircularProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { ICircularProgressSeriesSpec } from '@visactor/vchart';\n\nexport type CircularProgressProps = BaseSeriesProps & Omit<ICircularProgressSeriesSpec, 'type'>;\n\nexport const CircularProgress = createSeries<CircularProgressProps>(\n 'CircularProgress',\n ['circularProgress'],\n 'circularProgress'\n);\n"]}
|
package/esm/series/Dot.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IDotSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IDotSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type DotProps = BaseSeriesProps & Omit<IDotSeriesSpec, 'type'>;
|
|
4
4
|
export declare const Dot: import("react").FC<BaseSeriesProps & Omit<IDotSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
package/esm/series/Dot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Dot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Dot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IDotSeriesSpec } from '@visactor/vchart';\n\nexport type DotProps = BaseSeriesProps & Omit<IDotSeriesSpec, 'type'>;\n\nexport const Dot = createSeries<DotProps>('Dot', ['dot'], 'dot');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Dot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Dot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IDotSeriesSpec } from '@visactor/vchart';\n\nexport type DotProps = BaseSeriesProps & Omit<IDotSeriesSpec, 'type'>;\n\nexport const Dot = createSeries<DotProps>('Dot', ['dot'], 'dot');\n"]}
|
package/esm/series/Funnel.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IFunnelSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IFunnelSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type FunnelProps = BaseSeriesProps & Omit<IFunnelSeriesSpec, 'type'>;
|
|
4
4
|
export declare const Funnel: import("react").FC<BaseSeriesProps & Omit<IFunnelSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
package/esm/series/Funnel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Funnel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAc,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC","file":"Funnel.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IFunnelSeriesSpec } from '@visactor/vchart';\n\nexport type FunnelProps = BaseSeriesProps & Omit<IFunnelSeriesSpec, 'type'>;\n\nexport const Funnel = createSeries<FunnelProps>('Funnel', ['funnel'], 'funnel');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Funnel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAc,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC","file":"Funnel.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IFunnelSeriesSpec } from '@visactor/vchart';\n\nexport type FunnelProps = BaseSeriesProps & Omit<IFunnelSeriesSpec, 'type'>;\n\nexport const Funnel = createSeries<FunnelProps>('Funnel', ['funnel'], 'funnel');\n"]}
|
package/esm/series/Line.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { ILineSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { ILineSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type LineProps = BaseSeriesProps & Omit<ILineSeriesSpec, 'type'>;
|
|
4
4
|
export declare const Line: import("react").FC<BaseSeriesProps & Omit<ILineSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
package/esm/series/Line.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Line.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { ILineSeriesSpec } from '@visactor/vchart';\n\nexport type LineProps = BaseSeriesProps & Omit<ILineSeriesSpec, 'type'>;\n\nexport const Line = createSeries<LineProps>('Line', ['line'], 'line');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Line.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { ILineSeriesSpec } from '@visactor/vchart';\n\nexport type LineProps = BaseSeriesProps & Omit<ILineSeriesSpec, 'type'>;\n\nexport const Line = createSeries<LineProps>('Line', ['line'], 'line');\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { ILinearProgressSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { ILinearProgressSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type LinearProgressProps = BaseSeriesProps & Omit<ILinearProgressSeriesSpec, 'type'>;
|
|
4
4
|
export declare const LinearProgress: import("react").FC<BaseSeriesProps & Omit<ILinearProgressSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { createSeries } from "./BaseSeries";
|
|
2
2
|
|
|
3
|
-
export const LinearProgress = createSeries("LinearProgress", [ "linearProgress" ], "linearProgress");
|
|
4
|
-
//# sourceMappingURL=LinearProgress.js.map
|
|
3
|
+
export const LinearProgress = createSeries("LinearProgress", [ "linearProgress" ], "linearProgress");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/LinearProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAsB,gBAAgB,EAAE,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,CAAC","file":"LinearProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { ILinearProgressSeriesSpec } from '@visactor/vchart';\n\nexport type LinearProgressProps = BaseSeriesProps & Omit<ILinearProgressSeriesSpec, 'type'>;\n\nexport const LinearProgress = createSeries<LinearProgressProps>('LinearProgress', ['linearProgress'], 'linearProgress');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/LinearProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAsB,gBAAgB,EAAE,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,CAAC","file":"LinearProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { ILinearProgressSeriesSpec } from '@visactor/vchart';\n\nexport type LinearProgressProps = BaseSeriesProps & Omit<ILinearProgressSeriesSpec, 'type'>;\n\nexport const LinearProgress = createSeries<LinearProgressProps>('LinearProgress', ['linearProgress'], 'linearProgress');\n"]}
|
package/esm/series/Link.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { ILinkSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { ILinkSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type LinkProps = BaseSeriesProps & Omit<ILinkSeriesSpec, 'type'>;
|
|
4
4
|
export declare const Link: import("react").FC<BaseSeriesProps & Omit<ILinkSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
package/esm/series/Link.js
CHANGED
package/esm/series/Link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Link.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { ILinkSeriesSpec } from '@visactor/vchart';\n\nexport type LinkProps = BaseSeriesProps & Omit<ILinkSeriesSpec, 'type'>;\n\nexport const Link = createSeries<LinkProps>('Link', ['link'], 'link');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Link.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { ILinkSeriesSpec } from '@visactor/vchart';\n\nexport type LinkProps = BaseSeriesProps & Omit<ILinkSeriesSpec, 'type'>;\n\nexport const Link = createSeries<LinkProps>('Link', ['link'], 'link');\n"]}
|
package/esm/series/Map.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IMapSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IMapSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type MapProps = BaseSeriesProps & Omit<IMapSeriesSpec, 'type'>;
|
|
4
4
|
export declare const Map: import("react").FC<BaseSeriesProps & Omit<IMapSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
package/esm/series/Map.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Map.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Map.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IMapSeriesSpec } from '@visactor/vchart';\n\nexport type MapProps = BaseSeriesProps & Omit<IMapSeriesSpec, 'type'>;\n\nexport const Map = createSeries<MapProps>('Map', ['map'], 'map');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Map.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Map.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IMapSeriesSpec } from '@visactor/vchart';\n\nexport type MapProps = BaseSeriesProps & Omit<IMapSeriesSpec, 'type'>;\n\nexport const Map = createSeries<MapProps>('Map', ['map'], 'map');\n"]}
|
package/esm/series/Pie.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IPieSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IPieSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type PieProps = BaseSeriesProps & Omit<IPieSeriesSpec, 'type'>;
|
|
4
4
|
export declare const Pie: import("react").FC<BaseSeriesProps & Omit<IPieSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
package/esm/series/Pie.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Pie.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Pie.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IPieSeriesSpec } from '@visactor/vchart';\n\nexport type PieProps = BaseSeriesProps & Omit<IPieSeriesSpec, 'type'>;\n\nexport const Pie = createSeries<PieProps>('Pie', ['pie'], 'pie');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Pie.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Pie.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IPieSeriesSpec } from '@visactor/vchart';\n\nexport type PieProps = BaseSeriesProps & Omit<IPieSeriesSpec, 'type'>;\n\nexport const Pie = createSeries<PieProps>('Pie', ['pie'], 'pie');\n"]}
|
package/esm/series/Radar.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IRadarSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IRadarSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type RadarProps = BaseSeriesProps & Omit<IRadarSeriesSpec, 'type'>;
|
|
4
4
|
export declare const Radar: import("react").FC<BaseSeriesProps & Omit<IRadarSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
package/esm/series/Radar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Radar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,KAAK,GAAG,YAAY,CAAa,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC","file":"Radar.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IRadarSeriesSpec } from '@visactor/vchart';\n\nexport type RadarProps = BaseSeriesProps & Omit<IRadarSeriesSpec, 'type'>;\n\nexport const Radar = createSeries<RadarProps>('Radar', ['radar'], 'radar');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Radar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,KAAK,GAAG,YAAY,CAAa,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC","file":"Radar.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IRadarSeriesSpec } from '@visactor/vchart';\n\nexport type RadarProps = BaseSeriesProps & Omit<IRadarSeriesSpec, 'type'>;\n\nexport const Radar = createSeries<RadarProps>('Radar', ['radar'], 'radar');\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IRangeColumnSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IRangeColumnSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type RangeColumnProps = BaseSeriesProps & Omit<IRangeColumnSeriesSpec, 'type'>;
|
|
4
4
|
export declare const RangeColumn: import("react").FC<BaseSeriesProps & Omit<IRangeColumnSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/RangeColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAmB,aAAa,EAAE,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,CAAC","file":"RangeColumn.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IRangeColumnSeriesSpec } from '@visactor/vchart';\n\nexport type RangeColumnProps = BaseSeriesProps & Omit<IRangeColumnSeriesSpec, 'type'>;\n\nexport const RangeColumn = createSeries<RangeColumnProps>('RangeColumn', ['rangeColumn'], 'rangeColumn');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/RangeColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAmB,aAAa,EAAE,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,CAAC","file":"RangeColumn.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IRangeColumnSeriesSpec } from '@visactor/vchart';\n\nexport type RangeColumnProps = BaseSeriesProps & Omit<IRangeColumnSeriesSpec, 'type'>;\n\nexport const RangeColumn = createSeries<RangeColumnProps>('RangeColumn', ['rangeColumn'], 'rangeColumn');\n"]}
|
package/esm/series/Rose.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IRoseSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IRoseSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type RoseProps = BaseSeriesProps & Omit<IRoseSeriesSpec, 'type'>;
|
|
4
4
|
export declare const Rose: import("react").FC<BaseSeriesProps & Omit<IRoseSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
package/esm/series/Rose.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Rose.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Rose.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IRoseSeriesSpec } from '@visactor/vchart';\n\nexport type RoseProps = BaseSeriesProps & Omit<IRoseSeriesSpec, 'type'>;\n\nexport const Rose = createSeries<RoseProps>('Rose', ['rose'], 'rose');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Rose.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Rose.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IRoseSeriesSpec } from '@visactor/vchart';\n\nexport type RoseProps = BaseSeriesProps & Omit<IRoseSeriesSpec, 'type'>;\n\nexport const Rose = createSeries<RoseProps>('Rose', ['rose'], 'rose');\n"]}
|
package/esm/series/Scatter.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IScatterSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IScatterSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type ScatterProps = BaseSeriesProps & Omit<IScatterSeriesSpec, 'type'>;
|
|
4
4
|
export declare const Scatter: import("react").FC<BaseSeriesProps & Omit<IScatterSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Scatter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAe,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC","file":"Scatter.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IScatterSeriesSpec } from '@visactor/vchart';\n\nexport type ScatterProps = BaseSeriesProps & Omit<IScatterSeriesSpec, 'type'>;\n\nexport const Scatter = createSeries<ScatterProps>('Scatter', ['scatter'], 'scatter');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Scatter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAe,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC","file":"Scatter.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IScatterSeriesSpec } from '@visactor/vchart';\n\nexport type ScatterProps = BaseSeriesProps & Omit<IScatterSeriesSpec, 'type'>;\n\nexport const Scatter = createSeries<ScatterProps>('Scatter', ['scatter'], 'scatter');\n"]}
|
package/esm/series/Series.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IBarSeriesSpec, IAreaSeriesSpec, IBoxPlotSeriesSpec, ICircularProgressSeriesSpec, IDotSeriesSpec, IFunnelSeriesSpec, ILineSeriesSpec, ILinearProgressSeriesSpec, ILinkSeriesSpec, IMapSeriesSpec, IPieSeriesSpec, IRadarSeriesSpec, IRangeColumnSeriesSpec, IRoseSeriesSpec, IScatterSeriesSpec, IWordCloudSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IBarSeriesSpec, IAreaSeriesSpec, IBoxPlotSeriesSpec, ICircularProgressSeriesSpec, IDotSeriesSpec, IFunnelSeriesSpec, ILineSeriesSpec, ILinearProgressSeriesSpec, ILinkSeriesSpec, IMapSeriesSpec, IPieSeriesSpec, IRadarSeriesSpec, IRangeColumnSeriesSpec, IRoseSeriesSpec, IScatterSeriesSpec, IWordCloudSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type SeriesProps = (IBarSeriesSpec | IAreaSeriesSpec | IBoxPlotSeriesSpec | ICircularProgressSeriesSpec | IDotSeriesSpec | IFunnelSeriesSpec | ILineSeriesSpec | ILinearProgressSeriesSpec | ILinkSeriesSpec | IMapSeriesSpec | IPieSeriesSpec | IRadarSeriesSpec | IRangeColumnSeriesSpec | IRoseSeriesSpec | IScatterSeriesSpec | IWordCloudSeriesSpec) & BaseSeriesProps;
|
|
4
4
|
export declare const Series: import("react").FC<SeriesProps & {
|
|
5
5
|
updateId?: number;
|
package/esm/series/Series.js
CHANGED
package/esm/series/Series.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Series.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAuC7D,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAc,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC","file":"Series.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport {\n IBarSeriesSpec,\n IAreaSeriesSpec,\n IBoxPlotSeriesSpec,\n ICircularProgressSeriesSpec,\n IDotSeriesSpec,\n IFunnelSeriesSpec,\n ILineSeriesSpec,\n ILinearProgressSeriesSpec,\n ILinkSeriesSpec,\n IMapSeriesSpec,\n IPieSeriesSpec,\n IRadarSeriesSpec,\n IRangeColumnSeriesSpec,\n IRoseSeriesSpec,\n IScatterSeriesSpec,\n IWordCloudSeriesSpec\n} from '@visactor/vchart';\nexport type SeriesProps = (\n | IBarSeriesSpec\n | IAreaSeriesSpec\n | IBoxPlotSeriesSpec\n | ICircularProgressSeriesSpec\n | IDotSeriesSpec\n | IFunnelSeriesSpec\n | ILineSeriesSpec\n | ILinearProgressSeriesSpec\n | ILinkSeriesSpec\n | IMapSeriesSpec\n | IPieSeriesSpec\n | IRadarSeriesSpec\n | IRangeColumnSeriesSpec\n | IRoseSeriesSpec\n | IScatterSeriesSpec\n | IWordCloudSeriesSpec\n) &\n BaseSeriesProps;\n\nexport const Series = createSeries<SeriesProps>('Series', ['bar', 'line', 'area']);\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/Series.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAuC7D,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAc,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC","file":"Series.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type {\n IBarSeriesSpec,\n IAreaSeriesSpec,\n IBoxPlotSeriesSpec,\n ICircularProgressSeriesSpec,\n IDotSeriesSpec,\n IFunnelSeriesSpec,\n ILineSeriesSpec,\n ILinearProgressSeriesSpec,\n ILinkSeriesSpec,\n IMapSeriesSpec,\n IPieSeriesSpec,\n IRadarSeriesSpec,\n IRangeColumnSeriesSpec,\n IRoseSeriesSpec,\n IScatterSeriesSpec,\n IWordCloudSeriesSpec\n} from '@visactor/vchart';\nexport type SeriesProps = (\n | IBarSeriesSpec\n | IAreaSeriesSpec\n | IBoxPlotSeriesSpec\n | ICircularProgressSeriesSpec\n | IDotSeriesSpec\n | IFunnelSeriesSpec\n | ILineSeriesSpec\n | ILinearProgressSeriesSpec\n | ILinkSeriesSpec\n | IMapSeriesSpec\n | IPieSeriesSpec\n | IRadarSeriesSpec\n | IRangeColumnSeriesSpec\n | IRoseSeriesSpec\n | IScatterSeriesSpec\n | IWordCloudSeriesSpec\n) &\n BaseSeriesProps;\n\nexport const Series = createSeries<SeriesProps>('Series', ['bar', 'line', 'area']);\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IWordCloudSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IWordCloudSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type WordCloudProps = BaseSeriesProps & Omit<IWordCloudSeriesSpec, 'type'>;
|
|
4
4
|
export declare const WordCloud: import("react").FC<BaseSeriesProps & Omit<IWordCloudSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/WordCloud.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAiB,WAAW,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC","file":"WordCloud.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IWordCloudSeriesSpec } from '@visactor/vchart';\n\nexport type WordCloudProps = BaseSeriesProps & Omit<IWordCloudSeriesSpec, 'type'>;\n\nexport const WordCloud = createSeries<WordCloudProps>('WordCloud', ['wordCloud'], 'wordCloud');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/WordCloud.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAiB,WAAW,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC","file":"WordCloud.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IWordCloudSeriesSpec } from '@visactor/vchart';\n\nexport type WordCloudProps = BaseSeriesProps & Omit<IWordCloudSeriesSpec, 'type'>;\n\nexport const WordCloud = createSeries<WordCloudProps>('WordCloud', ['wordCloud'], 'wordCloud');\n"]}
|
package/esm/series/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAEzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC","file":"index.js","sourcesContent":["export * from './Series';\n\nexport * from './Line';\nexport * from './Area';\nexport * from './Bar';\nexport * from './Scatter';\nexport * from './Map';\nexport * from './Pie';\nexport * from './Rose';\nexport * from './Radar';\nexport * from './Dot';\nexport * from './Link';\nexport * from './CircularProgress';\nexport * from './WordCloud';\nexport * from './Funnel';\nexport * from './LinearProgress';\nexport * from './RangeColumn';\nexport * from './BoxPlot';\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAEzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC","file":"index.js","sourcesContent":["export * from './Series';\n\nexport * from './Line';\nexport * from './Area';\nexport * from './Bar';\nexport * from './Scatter';\nexport * from './Map';\nexport * from './Pie';\nexport * from './Rose';\nexport * from './Radar';\nexport * from './Dot';\nexport * from './Link';\nexport * from './CircularProgress';\nexport * from './WordCloud';\nexport * from './Funnel';\nexport * from './LinearProgress';\nexport * from './RangeColumn';\nexport * from './BoxPlot';\n"]}
|
package/esm/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAuC,MAAM,kBAAkB,CAAC;AACvF,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,MAAe,EAAE,EAAE;IACrC,IAAI,MAAM,EAAE;QACV,OAAO,GAAG,MAAM,IAAI,EAAE,EAAE,EAAE,CAAC;KAC5B;IAED,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC;AACnB,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAS,EAAE,EAAE;IAC1C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,OAAO,IAAI,CAAC;KACb;IACD,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,EAAE,CAAC;KACX;IACD,OAAO,IAAI,CAAC,WAAW,IAAI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unction, isPlainObject } from '@visactor/vutils';\nimport React, { ReactNode } from 'react';\nimport { isFragment } from 'react-is';\n\nlet id = 0;\n\nexport const uid = (prefix?: string) => {\n if (prefix) {\n return `${prefix}-${id++}`;\n }\n\n return `${id++}`;\n};\n\n/**\n * Get the display name of a component\n * @param {Object} Comp Specified Component\n * @return {String} Display name of Component\n */\nexport const getDisplayName = (Comp: any) => {\n if (typeof Comp === 'string') {\n return Comp;\n }\n if (!Comp) {\n return '';\n }\n return Comp.displayName || Comp.name;\n};\n\nexport const typeOfComponent = (component: any, customTypeKey = '__TYPE'): string => {\n return (\n (component?.props && component.props[customTypeKey]) ||\n (typeof component?.type === 'string' && component.type) ||\n (component?.type &&\n typeof component.type === 'symbol' &&\n component.type.toString() === 'Symbol(react.fragment)' &&\n 'react.fragment') ||\n (typeof component?.type === 'function' && component.type) ||\n (typeof component?.type === 'object' &&\n component.type.$$typeof.toString() === 'Symbol(react.forward_ref)' &&\n 'react.forward_ref') ||\n (typeof component === 'string' && 'string') ||\n (typeof component === 'function' && 'function') ||\n undefined\n );\n};\n\nexport const toArray = <T = ReactNode, TC = ReactNode>(children: T): TC[] => {\n let result: TC[] = [];\n\n React.Children.forEach(children, child => {\n if (isNil(child)) return;\n\n if (isFragment(child)) {\n result = result.concat(toArray(child.props.children));\n } else {\n result.push(child as unknown as TC);\n }\n });\n\n return result;\n};\n\n/*\n * Find and return all matched children by type. `type` can be a React element class or\n * string\n */\nexport const findAllByType = <T extends React.ReactNode, TC = unknown>(\n children: React.ReactNode,\n type: TC | TC[]\n): T[] => {\n const result: T[] = [];\n let types: string[] = [];\n\n if (isArray(type)) {\n types = type.map(t => getDisplayName(t));\n } else {\n types = [getDisplayName(type)];\n }\n\n toArray(children).forEach(child => {\n const childType = getDisplayName(typeOfComponent(child));\n\n if (types.indexOf(childType) !== -1) {\n result.push(child as T);\n }\n });\n\n return result;\n};\n/*\n * Return the first matched child by type, return null otherwise.\n * `type` can be a React element class or string.\n */\nexport const findChildByType = <T extends React.ReactNode, TC = unknown>(children: React.ReactNode, type: TC): T => {\n const result = findAllByType<T, TC>(children, type);\n\n return result?.[0];\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAuC,MAAM,kBAAkB,CAAC;AACvF,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,MAAe,EAAE,EAAE;IACrC,IAAI,MAAM,EAAE;QACV,OAAO,GAAG,MAAM,IAAI,EAAE,EAAE,EAAE,CAAC;KAC5B;IAED,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC;AACnB,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAS,EAAE,EAAE;IAC1C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,OAAO,IAAI,CAAC;KACb;IACD,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,EAAE,CAAC;KACX;IACD,OAAO,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,IAAI,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAc,EAAE,aAAa,GAAG,QAAQ,EAAU,EAAE;IAClF,OAAO,CACL,CAAC,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,KAAI,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACpD,CAAC,OAAO,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,CAAA,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC;QACvD,CAAC,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI;YACd,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ;YAClC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AI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;KAC1C;SAAM;QACL,KAAK,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;KAChC;IAED,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAChC,MAAM,SAAS,GAAG,cAAc,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;QAEzD,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE;YACnC,MAAM,CAAC,IAAI,CAAC,KAAU,CAAC,CAAC;SACzB;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAKF,MAAM,CAAC,MAAM,eAAe,GAAG,CAA0C,QAAyB,EAAE,IAAQ,EAAK,EAAE;IACjH,MAAM,MAAM,GAAG,aAAa,CAAQ,QAAQ,EAAE,IAAI,CAAC,CAAC;IAEpD,OAAO,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC","file":"util.js","sourcesContent":["import { isNil, isArray, isString, isFunction, isPlainObject } from '@visactor/vutils';\nimport React, { ReactNode } from 'react';\nimport { isFragment } from 'react-is';\n\nlet id = 0;\n\nexport const uid = (prefix?: string) => {\n if (prefix) {\n return `${prefix}-${id++}`;\n }\n\n return `${id++}`;\n};\n\n/**\n * Get the display name of a component\n * @param {Object} Comp Specified Component\n * @return {String} Display name of Component\n */\nexport const getDisplayName = (Comp: any) => {\n if (typeof Comp === 'string') {\n return Comp;\n }\n if (!Comp) {\n return '';\n }\n return Comp.displayName || Comp.name;\n};\n\nexport const typeOfComponent = (component: any, customTypeKey = '__TYPE'): string => {\n return (\n (component?.props && component.props[customTypeKey]) ||\n (typeof component?.type === 'string' && component.type) ||\n (component?.type &&\n typeof component.type === 'symbol' &&\n component.type.toString() === 'Symbol(react.fragment)' &&\n 'react.fragment') ||\n (typeof component?.type === 'function' && component.type) ||\n (typeof component?.type === 'object' &&\n component.type.$$typeof.toString() === 'Symbol(react.forward_ref)' &&\n 'react.forward_ref') ||\n (typeof component === 'string' && 'string') ||\n (typeof component === 'function' && 'function') ||\n undefined\n );\n};\n\nexport const toArray = <T = ReactNode, TC = ReactNode>(children: T): TC[] => {\n let result: TC[] = [];\n\n React.Children.forEach(children, child => {\n if (isNil(child)) return;\n\n if (isFragment(child)) {\n result = result.concat(toArray(child.props.children));\n } else {\n result.push(child as unknown as TC);\n }\n });\n\n return result;\n};\n\n/*\n * Find and return all matched children by type. `type` can be a React element class or\n * string\n */\nexport const findAllByType = <T extends React.ReactNode, TC = unknown>(\n children: React.ReactNode,\n type: TC | TC[]\n): T[] => {\n const result: T[] = [];\n let types: string[] = [];\n\n if (isArray(type)) {\n types = type.map(t => getDisplayName(t));\n } else {\n types = [getDisplayName(type)];\n }\n\n toArray(children).forEach(child => {\n const childType = getDisplayName(typeOfComponent(child));\n\n if (types.indexOf(childType) !== -1) {\n result.push(child as T);\n }\n });\n\n return result;\n};\n/*\n * Return the first matched child by type, return null otherwise.\n * `type` can be a React element class or string.\n */\nexport const findChildByType = <T extends React.ReactNode, TC = unknown>(children: React.ReactNode, type: TC): T => {\n const result = findAllByType<T, TC>(children, type);\n\n return result?.[0];\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/react-vchart",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"description": "The react version of VChart 4.x",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@visactor/vchart": "1.8.
|
|
26
|
-
"@visactor/vutils": "~0.17.
|
|
27
|
-
"@visactor/vrender-core": "~0.17.
|
|
28
|
-
"@visactor/vrender-kits": "~0.17.
|
|
29
|
-
"@visactor/vgrammar-core": "~0.10.
|
|
25
|
+
"@visactor/vchart": "1.8.3",
|
|
26
|
+
"@visactor/vutils": "~0.17.3",
|
|
27
|
+
"@visactor/vrender-core": "~0.17.9",
|
|
28
|
+
"@visactor/vrender-kits": "~0.17.9",
|
|
29
|
+
"@visactor/vgrammar-core": "~0.10.5",
|
|
30
30
|
"react-is": "^18.2.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|