@antv/gpt-vis 0.6.1 → 1.0.0-beta.2
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/README.md +185 -114
- package/README.zh-CN.md +187 -112
- package/dist/cjs/gpt-vis/index.d.ts +115 -0
- package/dist/cjs/gpt-vis/index.js +196 -0
- package/dist/cjs/index.d.ts +57 -13
- package/dist/cjs/index.js +85 -35
- package/dist/cjs/syntax/index.d.ts +2 -0
- package/dist/cjs/{Text/mini-charts/hooks → syntax}/index.js +9 -7
- package/dist/cjs/syntax/parser.d.ts +82 -0
- package/dist/cjs/syntax/parser.js +348 -0
- package/dist/cjs/types/index.d.ts +33 -2
- package/dist/cjs/types/index.js +0 -6
- package/dist/cjs/util/container.d.ts +5 -0
- package/dist/cjs/{utils/map/util.js → util/container.js} +18 -13
- package/dist/cjs/util/theme.d.ts +26 -0
- package/dist/cjs/{theme.js → util/theme.js} +70 -14
- package/dist/cjs/vis/area/index.d.ts +60 -0
- package/dist/cjs/vis/area/index.js +152 -0
- package/dist/cjs/vis/bar/index.d.ts +60 -0
- package/dist/cjs/vis/bar/index.js +123 -0
- package/dist/cjs/vis/boxplot/index.d.ts +59 -0
- package/dist/cjs/vis/boxplot/index.js +111 -0
- package/dist/cjs/vis/column/index.d.ts +60 -0
- package/dist/cjs/vis/column/index.js +122 -0
- package/dist/cjs/vis/dual-axes/index.d.ts +64 -0
- package/dist/cjs/vis/dual-axes/index.js +148 -0
- package/dist/cjs/vis/fishbone-diagram/index.d.ts +35 -0
- package/dist/cjs/vis/fishbone-diagram/index.js +183 -0
- package/dist/cjs/vis/flow-diagram/index.d.ts +27 -0
- package/dist/cjs/vis/flow-diagram/index.js +271 -0
- package/dist/cjs/vis/funnel/index.d.ts +54 -0
- package/dist/cjs/vis/funnel/index.js +190 -0
- package/dist/cjs/vis/histogram/index.d.ts +47 -0
- package/dist/cjs/vis/histogram/index.js +108 -0
- package/dist/cjs/vis/indented-tree/index.d.ts +40 -0
- package/dist/cjs/vis/indented-tree/index.js +375 -0
- package/dist/cjs/vis/line/index.d.ts +59 -0
- package/dist/cjs/vis/line/index.js +105 -0
- package/dist/cjs/vis/liquid/index.d.ts +44 -0
- package/dist/cjs/vis/liquid/index.js +88 -0
- package/dist/cjs/vis/mindmap/index.d.ts +32 -0
- package/dist/cjs/vis/mindmap/index.js +214 -0
- package/dist/cjs/vis/network-graph/index.d.ts +59 -0
- package/dist/cjs/vis/network-graph/index.js +166 -0
- package/dist/cjs/vis/organization-chart/index.d.ts +64 -0
- package/dist/cjs/vis/organization-chart/index.js +191 -0
- package/dist/cjs/vis/pie/index.d.ts +55 -0
- package/dist/cjs/vis/pie/index.js +108 -0
- package/dist/cjs/vis/radar/index.d.ts +58 -0
- package/dist/cjs/vis/radar/index.js +153 -0
- package/dist/cjs/vis/sankey/index.d.ts +56 -0
- package/dist/cjs/vis/sankey/index.js +94 -0
- package/dist/cjs/vis/scatter/index.d.ts +54 -0
- package/dist/cjs/vis/scatter/index.js +95 -0
- package/dist/cjs/vis/summary/index.d.ts +41 -0
- package/dist/cjs/vis/summary/index.js +71 -0
- package/dist/cjs/vis/table/index.d.ts +50 -0
- package/dist/cjs/vis/table/index.js +209 -0
- package/dist/cjs/vis/treemap/index.d.ts +68 -0
- package/dist/cjs/vis/treemap/index.js +106 -0
- package/dist/cjs/vis/venn/index.d.ts +55 -0
- package/dist/cjs/vis/venn/index.js +115 -0
- package/dist/cjs/vis/violin/index.d.ts +59 -0
- package/dist/cjs/vis/violin/index.js +156 -0
- package/dist/cjs/vis/waterfall/index.d.ts +64 -0
- package/dist/cjs/vis/waterfall/index.js +195 -0
- package/dist/cjs/vis/word-cloud/index.d.ts +53 -0
- package/dist/cjs/vis/word-cloud/index.js +90 -0
- package/dist/cjs/vis-wrapper/icons.d.ts +8 -0
- package/dist/cjs/vis-wrapper/icons.js +63 -0
- package/dist/cjs/vis-wrapper/index.d.ts +25 -0
- package/dist/cjs/vis-wrapper/index.js +242 -0
- package/dist/cjs/vis-wrapper/styles.d.ts +8 -0
- package/dist/cjs/vis-wrapper/styles.js +221 -0
- package/dist/esm/gpt-vis/index.d.ts +115 -0
- package/dist/esm/gpt-vis/index.js +245 -0
- package/dist/esm/index.d.ts +57 -13
- package/dist/esm/index.js +28 -15
- package/dist/esm/syntax/index.d.ts +2 -0
- package/dist/esm/syntax/index.js +1 -0
- package/dist/esm/syntax/parser.d.ts +82 -0
- package/dist/esm/syntax/parser.js +559 -0
- package/dist/esm/types/index.d.ts +33 -2
- package/dist/esm/types/index.js +0 -1
- package/dist/esm/util/container.d.ts +5 -0
- package/dist/esm/util/container.js +20 -0
- package/dist/esm/util/theme.d.ts +26 -0
- package/dist/esm/util/theme.js +150 -0
- package/dist/esm/vis/area/index.d.ts +60 -0
- package/dist/esm/vis/area/index.js +231 -0
- package/dist/esm/vis/bar/index.d.ts +60 -0
- package/dist/esm/vis/bar/index.js +204 -0
- package/dist/esm/vis/boxplot/index.d.ts +59 -0
- package/dist/esm/vis/boxplot/index.js +177 -0
- package/dist/esm/vis/column/index.d.ts +60 -0
- package/dist/esm/vis/column/index.js +199 -0
- package/dist/esm/vis/dual-axes/index.d.ts +64 -0
- package/dist/esm/vis/dual-axes/index.js +235 -0
- package/dist/esm/vis/fishbone-diagram/index.d.ts +35 -0
- package/dist/esm/vis/fishbone-diagram/index.js +218 -0
- package/dist/esm/vis/flow-diagram/index.d.ts +27 -0
- package/dist/esm/vis/flow-diagram/index.js +342 -0
- package/dist/esm/vis/funnel/index.d.ts +54 -0
- package/dist/esm/vis/funnel/index.js +247 -0
- package/dist/esm/vis/histogram/index.d.ts +47 -0
- package/dist/esm/vis/histogram/index.js +147 -0
- package/dist/esm/vis/indented-tree/index.d.ts +40 -0
- package/dist/esm/vis/indented-tree/index.js +564 -0
- package/dist/esm/vis/line/index.d.ts +59 -0
- package/dist/esm/vis/line/index.js +173 -0
- package/dist/esm/vis/liquid/index.d.ts +44 -0
- package/dist/esm/vis/liquid/index.js +131 -0
- package/dist/esm/vis/mindmap/index.d.ts +32 -0
- package/dist/esm/vis/mindmap/index.js +315 -0
- package/dist/esm/vis/network-graph/index.d.ts +59 -0
- package/dist/esm/vis/network-graph/index.js +240 -0
- package/dist/esm/vis/organization-chart/index.d.ts +64 -0
- package/dist/esm/vis/organization-chart/index.js +269 -0
- package/dist/esm/vis/pie/index.d.ts +55 -0
- package/dist/esm/vis/pie/index.js +164 -0
- package/dist/esm/vis/radar/index.d.ts +58 -0
- package/dist/esm/vis/radar/index.js +238 -0
- package/dist/esm/vis/sankey/index.d.ts +56 -0
- package/dist/esm/vis/sankey/index.js +136 -0
- package/dist/esm/vis/scatter/index.d.ts +54 -0
- package/dist/esm/vis/scatter/index.js +159 -0
- package/dist/esm/vis/summary/index.d.ts +41 -0
- package/dist/esm/vis/summary/index.js +101 -0
- package/dist/esm/vis/table/index.d.ts +50 -0
- package/dist/esm/vis/table/index.js +167 -0
- package/dist/esm/vis/treemap/index.d.ts +68 -0
- package/dist/esm/vis/treemap/index.js +159 -0
- package/dist/esm/vis/venn/index.d.ts +55 -0
- package/dist/esm/vis/venn/index.js +167 -0
- package/dist/esm/vis/violin/index.d.ts +59 -0
- package/dist/esm/vis/violin/index.js +246 -0
- package/dist/esm/vis/waterfall/index.d.ts +64 -0
- package/dist/esm/vis/waterfall/index.js +263 -0
- package/dist/esm/vis/word-cloud/index.d.ts +53 -0
- package/dist/esm/vis/word-cloud/index.js +129 -0
- package/dist/esm/vis-wrapper/icons.d.ts +8 -0
- package/dist/esm/vis-wrapper/icons.js +29 -0
- package/dist/esm/vis-wrapper/index.d.ts +25 -0
- package/dist/esm/vis-wrapper/index.js +242 -0
- package/dist/esm/vis-wrapper/styles.d.ts +8 -0
- package/dist/esm/vis-wrapper/styles.js +21 -0
- package/dist/umd/index.min.js +1 -1
- package/package.json +18 -59
- package/README.ja-JP.md +0 -164
- package/dist/cjs/Area/index.d.ts +0 -11
- package/dist/cjs/Area/index.js +0 -105
- package/dist/cjs/Bar/index.d.ts +0 -14
- package/dist/cjs/Bar/index.js +0 -101
- package/dist/cjs/Boxplot/index.d.ts +0 -11
- package/dist/cjs/Boxplot/index.js +0 -88
- package/dist/cjs/ChartCodeRender/Loading.d.ts +0 -6
- package/dist/cjs/ChartCodeRender/Loading.js +0 -54
- package/dist/cjs/ChartCodeRender/VisChart.d.ts +0 -19
- package/dist/cjs/ChartCodeRender/VisChart.js +0 -338
- package/dist/cjs/ChartCodeRender/icon.d.ts +0 -10
- package/dist/cjs/ChartCodeRender/icon.js +0 -162
- package/dist/cjs/ChartCodeRender/index.d.ts +0 -8
- package/dist/cjs/ChartCodeRender/index.js +0 -113
- package/dist/cjs/ChartCodeRender/styles.d.ts +0 -19
- package/dist/cjs/ChartCodeRender/styles.js +0 -232
- package/dist/cjs/ChartCodeRender/type.d.ts +0 -176
- package/dist/cjs/ChartCodeRender/type.js +0 -17
- package/dist/cjs/ChartCodeRender/utils.d.ts +0 -1
- package/dist/cjs/ChartCodeRender/utils.js +0 -51
- package/dist/cjs/Column/index.d.ts +0 -14
- package/dist/cjs/Column/index.js +0 -102
- package/dist/cjs/ConfigProvider/context.d.ts +0 -3
- package/dist/cjs/ConfigProvider/context.js +0 -41
- package/dist/cjs/ConfigProvider/hooks/index.d.ts +0 -1
- package/dist/cjs/ConfigProvider/hooks/index.js +0 -23
- package/dist/cjs/ConfigProvider/hooks/useConfig.d.ts +0 -13
- package/dist/cjs/ConfigProvider/hooks/useConfig.js +0 -109
- package/dist/cjs/ConfigProvider/index.d.ts +0 -7
- package/dist/cjs/ConfigProvider/index.js +0 -43
- package/dist/cjs/DualAxes/index.d.ts +0 -20
- package/dist/cjs/DualAxes/index.js +0 -84
- package/dist/cjs/DualAxes/util.d.ts +0 -9
- package/dist/cjs/DualAxes/util.js +0 -77
- package/dist/cjs/FishboneDiagram/index.d.ts +0 -7
- package/dist/cjs/FishboneDiagram/index.js +0 -66
- package/dist/cjs/FlowDiagram/helper.d.ts +0 -7
- package/dist/cjs/FlowDiagram/helper.js +0 -83
- package/dist/cjs/FlowDiagram/index.d.ts +0 -6
- package/dist/cjs/FlowDiagram/index.js +0 -107
- package/dist/cjs/Funnel/index.d.ts +0 -12
- package/dist/cjs/Funnel/index.js +0 -173
- package/dist/cjs/GPTVis/Lite.d.ts +0 -19
- package/dist/cjs/GPTVis/Lite.js +0 -81
- package/dist/cjs/GPTVis/hooks/useContext.d.ts +0 -8
- package/dist/cjs/GPTVis/hooks/useContext.js +0 -49
- package/dist/cjs/GPTVis/hooks/useEvent.d.ts +0 -1
- package/dist/cjs/GPTVis/hooks/useEvent.js +0 -33
- package/dist/cjs/GPTVis/index.d.ts +0 -6
- package/dist/cjs/GPTVis/index.js +0 -42
- package/dist/cjs/HeatMap/index.d.ts +0 -12
- package/dist/cjs/HeatMap/index.js +0 -67
- package/dist/cjs/Histogram/index.d.ts +0 -8
- package/dist/cjs/Histogram/index.js +0 -79
- package/dist/cjs/IndentedTree/index.d.ts +0 -7
- package/dist/cjs/IndentedTree/index.js +0 -78
- package/dist/cjs/Line/index.d.ts +0 -11
- package/dist/cjs/Line/index.js +0 -94
- package/dist/cjs/Liquid/index.d.ts +0 -11
- package/dist/cjs/Liquid/index.js +0 -85
- package/dist/cjs/Map/Component/MapView.d.ts +0 -3
- package/dist/cjs/Map/Component/MapView.js +0 -40
- package/dist/cjs/Map/Component/Marker.d.ts +0 -3
- package/dist/cjs/Map/Component/Marker.js +0 -53
- package/dist/cjs/Map/Component/Polyline.d.ts +0 -3
- package/dist/cjs/Map/Component/Polyline.js +0 -50
- package/dist/cjs/Map/Component/index.d.ts +0 -4
- package/dist/cjs/Map/Component/index.js +0 -45
- package/dist/cjs/Map/data.json +0 -305
- package/dist/cjs/Map/index.d.ts +0 -5
- package/dist/cjs/Map/index.js +0 -61
- package/dist/cjs/MindMap/index.d.ts +0 -7
- package/dist/cjs/MindMap/index.js +0 -75
- package/dist/cjs/NetworkGraph/index.d.ts +0 -6
- package/dist/cjs/NetworkGraph/index.js +0 -75
- package/dist/cjs/OrganizationChart/index.d.ts +0 -6
- package/dist/cjs/OrganizationChart/index.js +0 -95
- package/dist/cjs/PathMap/index.d.ts +0 -6
- package/dist/cjs/PathMap/index.js +0 -58
- package/dist/cjs/Pie/index.d.ts +0 -23
- package/dist/cjs/Pie/index.js +0 -94
- package/dist/cjs/PinMap/index.d.ts +0 -6
- package/dist/cjs/PinMap/index.js +0 -44
- package/dist/cjs/PinMap/maker.svg +0 -1
- package/dist/cjs/Radar/index.d.ts +0 -13
- package/dist/cjs/Radar/index.js +0 -153
- package/dist/cjs/Sankey/index.d.ts +0 -14
- package/dist/cjs/Sankey/index.js +0 -110
- package/dist/cjs/Scatter/index.d.ts +0 -13
- package/dist/cjs/Scatter/index.js +0 -103
- package/dist/cjs/Spreadsheet/index.d.ts +0 -28
- package/dist/cjs/Spreadsheet/index.js +0 -113
- package/dist/cjs/Table/index.d.ts +0 -9
- package/dist/cjs/Table/index.js +0 -91
- package/dist/cjs/Text/VisText.d.ts +0 -4
- package/dist/cjs/Text/VisText.js +0 -82
- package/dist/cjs/Text/config.d.ts +0 -18
- package/dist/cjs/Text/config.js +0 -91
- package/dist/cjs/Text/custom-icons/index.d.ts +0 -3
- package/dist/cjs/Text/custom-icons/index.js +0 -66
- package/dist/cjs/Text/index.d.ts +0 -3
- package/dist/cjs/Text/index.js +0 -42
- package/dist/cjs/Text/mini-charts/hooks/getElementFontSize.d.ts +0 -1
- package/dist/cjs/Text/mini-charts/hooks/getElementFontSize.js +0 -65
- package/dist/cjs/Text/mini-charts/hooks/index.d.ts +0 -1
- package/dist/cjs/Text/mini-charts/hooks/useSvgWrapper.d.ts +0 -5
- package/dist/cjs/Text/mini-charts/hooks/useSvgWrapper.js +0 -65
- package/dist/cjs/Text/mini-charts/index.d.ts +0 -2
- package/dist/cjs/Text/mini-charts/index.js +0 -25
- package/dist/cjs/Text/mini-charts/line/SingleLineChart.d.ts +0 -3
- package/dist/cjs/Text/mini-charts/line/SingleLineChart.js +0 -63
- package/dist/cjs/Text/mini-charts/line/index.d.ts +0 -1
- package/dist/cjs/Text/mini-charts/line/index.js +0 -29
- package/dist/cjs/Text/mini-charts/line/scaleLinear.d.ts +0 -4
- package/dist/cjs/Text/mini-charts/line/scaleLinear.js +0 -35
- package/dist/cjs/Text/mini-charts/line/useLineCompute.d.ts +0 -6
- package/dist/cjs/Text/mini-charts/line/useLineCompute.js +0 -103
- package/dist/cjs/Text/mini-charts/proportion/getArcPath.d.ts +0 -1
- package/dist/cjs/Text/mini-charts/proportion/getArcPath.js +0 -51
- package/dist/cjs/Text/mini-charts/proportion/index.d.ts +0 -3
- package/dist/cjs/Text/mini-charts/proportion/index.js +0 -71
- package/dist/cjs/Text/theme.d.ts +0 -24
- package/dist/cjs/Text/theme.js +0 -52
- package/dist/cjs/Text/types.d.ts +0 -20
- package/dist/cjs/Text/types.js +0 -17
- package/dist/cjs/Text/utils/getThemeColor.d.ts +0 -11
- package/dist/cjs/Text/utils/getThemeColor.js +0 -46
- package/dist/cjs/Text/utils/index.d.ts +0 -2
- package/dist/cjs/Text/utils/index.js +0 -25
- package/dist/cjs/Text/utils/useAntdDarkAlgorithm.d.ts +0 -2
- package/dist/cjs/Text/utils/useAntdDarkAlgorithm.js +0 -40
- package/dist/cjs/Treemap/index.d.ts +0 -10
- package/dist/cjs/Treemap/index.js +0 -93
- package/dist/cjs/Venn/index.d.ts +0 -32
- package/dist/cjs/Venn/index.js +0 -87
- package/dist/cjs/Violin/index.d.ts +0 -10
- package/dist/cjs/Violin/index.js +0 -190
- package/dist/cjs/Waterfall/index.d.ts +0 -25
- package/dist/cjs/Waterfall/index.js +0 -184
- package/dist/cjs/WordCloud/index.d.ts +0 -9
- package/dist/cjs/WordCloud/index.js +0 -76
- package/dist/cjs/constants/index.d.ts +0 -2
- package/dist/cjs/constants/index.js +0 -35
- package/dist/cjs/export-map.browser.d.ts +0 -4
- package/dist/cjs/export-map.browser.js +0 -48
- package/dist/cjs/export-map.d.ts +0 -10
- package/dist/cjs/export-map.js +0 -41
- package/dist/cjs/export.d.ts +0 -76
- package/dist/cjs/export.js +0 -159
- package/dist/cjs/render.d.ts +0 -2
- package/dist/cjs/render.js +0 -67
- package/dist/cjs/theme.d.ts +0 -2
- package/dist/cjs/types/chart.d.ts +0 -88
- package/dist/cjs/types/chart.js +0 -61
- package/dist/cjs/types/config.d.ts +0 -25
- package/dist/cjs/types/config.js +0 -17
- package/dist/cjs/types/map.d.ts +0 -242
- package/dist/cjs/types/map.js +0 -17
- package/dist/cjs/utils/config.d.ts +0 -5
- package/dist/cjs/utils/config.js +0 -76
- package/dist/cjs/utils/graph.d.ts +0 -18
- package/dist/cjs/utils/graph.js +0 -64
- package/dist/cjs/utils/index.d.ts +0 -1
- package/dist/cjs/utils/index.js +0 -23
- package/dist/cjs/utils/map/context.d.ts +0 -3
- package/dist/cjs/utils/map/context.js +0 -45
- package/dist/cjs/utils/map/controls.d.ts +0 -0
- package/dist/cjs/utils/map/controls.js +0 -0
- package/dist/cjs/utils/map/index.d.ts +0 -6
- package/dist/cjs/utils/map/index.js +0 -33
- package/dist/cjs/utils/map/markers.d.ts +0 -2
- package/dist/cjs/utils/map/markers.js +0 -88
- package/dist/cjs/utils/map/polyline.d.ts +0 -2
- package/dist/cjs/utils/map/polyline.js +0 -52
- package/dist/cjs/utils/map/style.d.ts +0 -45
- package/dist/cjs/utils/map/style.js +0 -112
- package/dist/cjs/utils/map/util.d.ts +0 -1
- package/dist/cjs/utils/map/view.d.ts +0 -5
- package/dist/cjs/utils/map/view.js +0 -100
- package/dist/cjs/utils/palette.d.ts +0 -2
- package/dist/cjs/utils/palette.js +0 -54
- package/dist/cjs/utils/plot.d.ts +0 -5
- package/dist/cjs/utils/plot.js +0 -90
- package/dist/cjs/version.d.ts +0 -2
- package/dist/cjs/version.js +0 -25
- package/dist/esm/Area/index.d.ts +0 -11
- package/dist/esm/Area/index.js +0 -108
- package/dist/esm/Bar/index.d.ts +0 -14
- package/dist/esm/Bar/index.js +0 -92
- package/dist/esm/Boxplot/index.d.ts +0 -11
- package/dist/esm/Boxplot/index.js +0 -86
- package/dist/esm/ChartCodeRender/Loading.d.ts +0 -6
- package/dist/esm/ChartCodeRender/Loading.js +0 -21
- package/dist/esm/ChartCodeRender/VisChart.d.ts +0 -19
- package/dist/esm/ChartCodeRender/VisChart.js +0 -450
- package/dist/esm/ChartCodeRender/icon.d.ts +0 -10
- package/dist/esm/ChartCodeRender/icon.js +0 -103
- package/dist/esm/ChartCodeRender/index.d.ts +0 -8
- package/dist/esm/ChartCodeRender/index.js +0 -99
- package/dist/esm/ChartCodeRender/styles.d.ts +0 -19
- package/dist/esm/ChartCodeRender/styles.js +0 -61
- package/dist/esm/ChartCodeRender/type.d.ts +0 -176
- package/dist/esm/ChartCodeRender/type.js +0 -1
- package/dist/esm/ChartCodeRender/utils.d.ts +0 -1
- package/dist/esm/ChartCodeRender/utils.js +0 -37
- package/dist/esm/Column/index.d.ts +0 -14
- package/dist/esm/Column/index.js +0 -93
- package/dist/esm/ConfigProvider/context.d.ts +0 -3
- package/dist/esm/ConfigProvider/context.js +0 -3
- package/dist/esm/ConfigProvider/hooks/index.d.ts +0 -1
- package/dist/esm/ConfigProvider/hooks/index.js +0 -1
- package/dist/esm/ConfigProvider/hooks/useConfig.d.ts +0 -13
- package/dist/esm/ConfigProvider/hooks/useConfig.js +0 -71
- package/dist/esm/ConfigProvider/index.d.ts +0 -7
- package/dist/esm/ConfigProvider/index.js +0 -17
- package/dist/esm/DualAxes/index.d.ts +0 -20
- package/dist/esm/DualAxes/index.js +0 -77
- package/dist/esm/DualAxes/util.d.ts +0 -9
- package/dist/esm/DualAxes/util.js +0 -77
- package/dist/esm/FishboneDiagram/index.d.ts +0 -7
- package/dist/esm/FishboneDiagram/index.js +0 -43
- package/dist/esm/FlowDiagram/helper.d.ts +0 -7
- package/dist/esm/FlowDiagram/helper.js +0 -76
- package/dist/esm/FlowDiagram/index.d.ts +0 -6
- package/dist/esm/FlowDiagram/index.js +0 -72
- package/dist/esm/Funnel/index.d.ts +0 -12
- package/dist/esm/Funnel/index.js +0 -171
- package/dist/esm/GPTVis/Lite.d.ts +0 -19
- package/dist/esm/GPTVis/Lite.js +0 -57
- package/dist/esm/GPTVis/hooks/useContext.d.ts +0 -8
- package/dist/esm/GPTVis/hooks/useContext.js +0 -9
- package/dist/esm/GPTVis/hooks/useEvent.d.ts +0 -1
- package/dist/esm/GPTVis/hooks/useEvent.js +0 -6
- package/dist/esm/GPTVis/index.d.ts +0 -6
- package/dist/esm/GPTVis/index.js +0 -25
- package/dist/esm/HeatMap/index.d.ts +0 -12
- package/dist/esm/HeatMap/index.js +0 -45
- package/dist/esm/Histogram/index.d.ts +0 -8
- package/dist/esm/Histogram/index.js +0 -75
- package/dist/esm/IndentedTree/index.d.ts +0 -7
- package/dist/esm/IndentedTree/index.js +0 -68
- package/dist/esm/Line/index.d.ts +0 -11
- package/dist/esm/Line/index.js +0 -92
- package/dist/esm/Liquid/index.d.ts +0 -11
- package/dist/esm/Liquid/index.js +0 -100
- package/dist/esm/Map/Component/MapView.d.ts +0 -3
- package/dist/esm/Map/Component/MapView.js +0 -18
- package/dist/esm/Map/Component/Marker.d.ts +0 -3
- package/dist/esm/Map/Component/Marker.js +0 -40
- package/dist/esm/Map/Component/Polyline.d.ts +0 -3
- package/dist/esm/Map/Component/Polyline.js +0 -35
- package/dist/esm/Map/Component/index.d.ts +0 -4
- package/dist/esm/Map/Component/index.js +0 -4
- package/dist/esm/Map/data.json +0 -305
- package/dist/esm/Map/index.d.ts +0 -5
- package/dist/esm/Map/index.js +0 -50
- package/dist/esm/MindMap/index.d.ts +0 -7
- package/dist/esm/MindMap/index.js +0 -69
- package/dist/esm/NetworkGraph/index.d.ts +0 -6
- package/dist/esm/NetworkGraph/index.js +0 -64
- package/dist/esm/OrganizationChart/index.d.ts +0 -6
- package/dist/esm/OrganizationChart/index.js +0 -75
- package/dist/esm/PathMap/index.d.ts +0 -6
- package/dist/esm/PathMap/index.js +0 -41
- package/dist/esm/Pie/index.d.ts +0 -23
- package/dist/esm/Pie/index.js +0 -96
- package/dist/esm/PinMap/index.d.ts +0 -6
- package/dist/esm/PinMap/index.js +0 -22
- package/dist/esm/PinMap/maker.svg +0 -1
- package/dist/esm/Radar/index.d.ts +0 -13
- package/dist/esm/Radar/index.js +0 -150
- package/dist/esm/Sankey/index.d.ts +0 -14
- package/dist/esm/Sankey/index.js +0 -98
- package/dist/esm/Scatter/index.d.ts +0 -13
- package/dist/esm/Scatter/index.js +0 -95
- package/dist/esm/Spreadsheet/index.d.ts +0 -28
- package/dist/esm/Spreadsheet/index.js +0 -129
- package/dist/esm/Table/index.d.ts +0 -9
- package/dist/esm/Table/index.js +0 -30
- package/dist/esm/Text/VisText.d.ts +0 -4
- package/dist/esm/Text/VisText.js +0 -55
- package/dist/esm/Text/config.d.ts +0 -18
- package/dist/esm/Text/config.js +0 -82
- package/dist/esm/Text/custom-icons/index.d.ts +0 -3
- package/dist/esm/Text/custom-icons/index.js +0 -37
- package/dist/esm/Text/index.d.ts +0 -3
- package/dist/esm/Text/index.js +0 -2
- package/dist/esm/Text/mini-charts/hooks/getElementFontSize.d.ts +0 -1
- package/dist/esm/Text/mini-charts/hooks/getElementFontSize.js +0 -32
- package/dist/esm/Text/mini-charts/hooks/index.d.ts +0 -1
- package/dist/esm/Text/mini-charts/hooks/index.js +0 -1
- package/dist/esm/Text/mini-charts/hooks/useSvgWrapper.d.ts +0 -5
- package/dist/esm/Text/mini-charts/hooks/useSvgWrapper.js +0 -37
- package/dist/esm/Text/mini-charts/index.d.ts +0 -2
- package/dist/esm/Text/mini-charts/index.js +0 -2
- package/dist/esm/Text/mini-charts/line/SingleLineChart.d.ts +0 -3
- package/dist/esm/Text/mini-charts/line/SingleLineChart.js +0 -62
- package/dist/esm/Text/mini-charts/line/index.d.ts +0 -1
- package/dist/esm/Text/mini-charts/line/index.js +0 -1
- package/dist/esm/Text/mini-charts/line/scaleLinear.d.ts +0 -4
- package/dist/esm/Text/mini-charts/line/scaleLinear.js +0 -19
- package/dist/esm/Text/mini-charts/line/useLineCompute.d.ts +0 -6
- package/dist/esm/Text/mini-charts/line/useLineCompute.js +0 -118
- package/dist/esm/Text/mini-charts/proportion/getArcPath.d.ts +0 -1
- package/dist/esm/Text/mini-charts/proportion/getArcPath.js +0 -19
- package/dist/esm/Text/mini-charts/proportion/index.d.ts +0 -3
- package/dist/esm/Text/mini-charts/proportion/index.js +0 -64
- package/dist/esm/Text/theme.d.ts +0 -24
- package/dist/esm/Text/theme.js +0 -24
- package/dist/esm/Text/types.d.ts +0 -20
- package/dist/esm/Text/types.js +0 -1
- package/dist/esm/Text/utils/getThemeColor.d.ts +0 -11
- package/dist/esm/Text/utils/getThemeColor.js +0 -29
- package/dist/esm/Text/utils/index.d.ts +0 -2
- package/dist/esm/Text/utils/index.js +0 -2
- package/dist/esm/Text/utils/useAntdDarkAlgorithm.d.ts +0 -2
- package/dist/esm/Text/utils/useAntdDarkAlgorithm.js +0 -14
- package/dist/esm/Treemap/index.d.ts +0 -10
- package/dist/esm/Treemap/index.js +0 -88
- package/dist/esm/Venn/index.d.ts +0 -32
- package/dist/esm/Venn/index.js +0 -69
- package/dist/esm/Violin/index.d.ts +0 -10
- package/dist/esm/Violin/index.js +0 -199
- package/dist/esm/Waterfall/index.d.ts +0 -25
- package/dist/esm/Waterfall/index.js +0 -185
- package/dist/esm/WordCloud/index.d.ts +0 -9
- package/dist/esm/WordCloud/index.js +0 -59
- package/dist/esm/constants/index.d.ts +0 -2
- package/dist/esm/constants/index.js +0 -9
- package/dist/esm/export-map.browser.d.ts +0 -4
- package/dist/esm/export-map.browser.js +0 -5
- package/dist/esm/export-map.d.ts +0 -10
- package/dist/esm/export-map.js +0 -9
- package/dist/esm/export.d.ts +0 -76
- package/dist/esm/export.js +0 -51
- package/dist/esm/render.d.ts +0 -2
- package/dist/esm/render.js +0 -32
- package/dist/esm/theme.d.ts +0 -2
- package/dist/esm/theme.js +0 -103
- package/dist/esm/types/chart.d.ts +0 -88
- package/dist/esm/types/chart.js +0 -33
- package/dist/esm/types/config.d.ts +0 -25
- package/dist/esm/types/config.js +0 -1
- package/dist/esm/types/map.d.ts +0 -242
- package/dist/esm/types/map.js +0 -1
- package/dist/esm/utils/config.d.ts +0 -5
- package/dist/esm/utils/config.js +0 -53
- package/dist/esm/utils/graph.d.ts +0 -18
- package/dist/esm/utils/graph.js +0 -55
- package/dist/esm/utils/index.d.ts +0 -1
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/utils/map/context.d.ts +0 -3
- package/dist/esm/utils/map/context.js +0 -42
- package/dist/esm/utils/map/controls.d.ts +0 -0
- package/dist/esm/utils/map/controls.js +0 -0
- package/dist/esm/utils/map/index.d.ts +0 -6
- package/dist/esm/utils/map/index.js +0 -6
- package/dist/esm/utils/map/markers.d.ts +0 -2
- package/dist/esm/utils/map/markers.js +0 -69
- package/dist/esm/utils/map/polyline.d.ts +0 -2
- package/dist/esm/utils/map/polyline.js +0 -31
- package/dist/esm/utils/map/style.d.ts +0 -45
- package/dist/esm/utils/map/style.js +0 -80
- package/dist/esm/utils/map/util.d.ts +0 -1
- package/dist/esm/utils/map/util.js +0 -11
- package/dist/esm/utils/map/view.d.ts +0 -5
- package/dist/esm/utils/map/view.js +0 -83
- package/dist/esm/utils/palette.d.ts +0 -2
- package/dist/esm/utils/palette.js +0 -2
- package/dist/esm/utils/plot.d.ts +0 -5
- package/dist/esm/utils/plot.js +0 -86
- package/dist/esm/version.d.ts +0 -2
- package/dist/esm/version.js +0 -1
- package/dist/umd/376.async.js +0 -1
- package/dist/umd/index.min.css +0 -1
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["children", "className", "node"];
|
|
3
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
-
import { get } from 'lodash';
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import { DEFAULT_CHART_COMPONENTS } from "../export";
|
|
14
|
-
import { RenderVisChart } from "./VisChart";
|
|
15
|
-
var RenderDefaultCode = function RenderDefaultCode(props) {
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17
|
-
var children = props.children,
|
|
18
|
-
_props$className = props.className,
|
|
19
|
-
className = _props$className === void 0 ? '' : _props$className,
|
|
20
|
-
node = props.node,
|
|
21
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
22
|
-
return /*#__PURE__*/React.createElement("code", _extends({}, rest, {
|
|
23
|
-
className: className
|
|
24
|
-
}), children);
|
|
25
|
-
};
|
|
26
|
-
var withCodeBlock = function withCodeBlock(options) {
|
|
27
|
-
// Render code block component
|
|
28
|
-
return function CodeBlock(props) {
|
|
29
|
-
var _className$match;
|
|
30
|
-
var children = props.children,
|
|
31
|
-
_props$className2 = props.className,
|
|
32
|
-
className = _props$className2 === void 0 ? '' : _props$className2;
|
|
33
|
-
var content = String(children).trim();
|
|
34
|
-
var isVisChart = className.includes('language-vis-chart');
|
|
35
|
-
var components = options.components,
|
|
36
|
-
languageRenderers = options.languageRenderers,
|
|
37
|
-
DefaultRenderer = options.defaultRenderer,
|
|
38
|
-
debug = options.debug,
|
|
39
|
-
_options$loadingTimeo = options.loadingTimeout,
|
|
40
|
-
loadingTimeout = _options$loadingTimeo === void 0 ? 5000 : _options$loadingTimeo,
|
|
41
|
-
style = options.style,
|
|
42
|
-
errorRender = options.errorRender,
|
|
43
|
-
componentErrorRender = options.componentErrorRender,
|
|
44
|
-
showTabs = options.showTabs,
|
|
45
|
-
showCodeTab = options.showCodeTab,
|
|
46
|
-
showChartTab = options.showChartTab,
|
|
47
|
-
defaultTab = options.defaultTab,
|
|
48
|
-
textLabels = options.textLabels,
|
|
49
|
-
locale = options.locale;
|
|
50
|
-
|
|
51
|
-
// If the code block is a VisChart, render the corresponding chart component
|
|
52
|
-
if (isVisChart) {
|
|
53
|
-
return /*#__PURE__*/React.createElement(RenderVisChart, {
|
|
54
|
-
style: style,
|
|
55
|
-
content: content,
|
|
56
|
-
components: components,
|
|
57
|
-
debug: debug,
|
|
58
|
-
loadingTimeout: loadingTimeout,
|
|
59
|
-
errorRender: errorRender,
|
|
60
|
-
componentErrorRender: componentErrorRender
|
|
61
|
-
// Pass new props to RenderVisChart
|
|
62
|
-
,
|
|
63
|
-
showTabs: showTabs,
|
|
64
|
-
showCodeTab: showCodeTab,
|
|
65
|
-
showChartTab: showChartTab,
|
|
66
|
-
defaultTab: defaultTab,
|
|
67
|
-
textLabels: textLabels,
|
|
68
|
-
locale: locale
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// If the code block math extraRenderer languageName, the corresponding extra languageRenderers component
|
|
73
|
-
var languageName = ((_className$match = className.match(/language-(.*)/)) === null || _className$match === void 0 ? void 0 : _className$match[1]) || '';
|
|
74
|
-
var extraLanguageRenderers = languageRenderers;
|
|
75
|
-
var ExtraRendererComponent = extraLanguageRenderers && extraLanguageRenderers[languageName];
|
|
76
|
-
if (ExtraRendererComponent) {
|
|
77
|
-
return /*#__PURE__*/React.createElement(ExtraRendererComponent, props);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// If the code block is not a VisChart, render plain code
|
|
81
|
-
return DefaultRenderer ? /*#__PURE__*/React.createElement(DefaultRenderer, props) : /*#__PURE__*/React.createElement(RenderDefaultCode, props);
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
// Create a higher-order component (HOC) with chart code
|
|
86
|
-
export var withChartCode = function withChartCode(options) {
|
|
87
|
-
return withCodeBlock(options);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Includes built-in chart components such as line charts, pie charts, etc.
|
|
92
|
-
* @param componentsArray
|
|
93
|
-
* @returns
|
|
94
|
-
*/
|
|
95
|
-
export var withDefaultChartCode = function withDefaultChartCode(options) {
|
|
96
|
-
return withChartCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
97
|
-
components: _objectSpread(_objectSpread({}, DEFAULT_CHART_COMPONENTS), get(options, 'components', {}))
|
|
98
|
-
}));
|
|
99
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface StyledGPTVisProps {
|
|
3
|
-
type?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare const StyledGPTVis: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledGPTVisProps>> & string;
|
|
6
|
-
export declare const TextButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
7
|
-
export declare const ChartWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
8
|
-
export declare const TabContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
9
|
-
export declare const TabHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
-
export declare const TabLeftGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
-
export declare const TabRightGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
-
export declare const TabContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
|
-
export declare const ErrorMessage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
14
|
-
export declare const GlobalStyles: import("react").NamedExoticComponent<import("styled-components").ExecutionProps & object>;
|
|
15
|
-
export declare const StyledTabButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
16
|
-
active?: boolean | undefined;
|
|
17
|
-
}>> & string;
|
|
18
|
-
export declare const Divider: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
19
|
-
export {};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import styled, { createGlobalStyle } from 'styled-components';
|
|
2
|
-
export var StyledGPTVis = styled.div.withConfig({
|
|
3
|
-
displayName: "StyledGPTVis",
|
|
4
|
-
componentId: "gpt-vis-c7ef__sc-2dc7ka-0"
|
|
5
|
-
})(["min-width:300px;max-width:100%;height:", ";overflow:hidden;position:relative;padding:16px;"], function (_ref) {
|
|
6
|
-
var type = _ref.type;
|
|
7
|
-
return type === 'table' || type === 'spreadsheet' ? 'auto' : '300px';
|
|
8
|
-
});
|
|
9
|
-
export var TextButton = styled.button.withConfig({
|
|
10
|
-
displayName: "TextButton",
|
|
11
|
-
componentId: "gpt-vis-c7ef__sc-2dc7ka-1"
|
|
12
|
-
})(["border:none;box-shadow:none;background:transparent;color:#494949;height:26px;padding:0 8px;font-size:12px;transition:all 0.2s cubic-bezier(0.645,0.045,0.355,1);transform:scale(1);border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:4px;cursor:pointer;outline:none;font-family:inherit;&:hover,&:focus{color:#666;background:#e8e8e8;transform:scale(1.02);}&:active{background:#e8e8e8;transform:scale(0.98);}.anticon{font-size:12px;}&:disabled{cursor:not-allowed;opacity:0.6;&:hover,&:focus,&:active{background:transparent;transform:scale(1);}}"]);
|
|
13
|
-
export var ChartWrapper = styled.div.withConfig({
|
|
14
|
-
displayName: "ChartWrapper",
|
|
15
|
-
componentId: "gpt-vis-c7ef__sc-2dc7ka-2"
|
|
16
|
-
})(["width:100%;height:100%;overflow:scroll;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar{display:none;}h5{font-size:12px;font-weight:400;color:#666;height:150px;display:flex;align-items:center;justify-content:center;}& > *{max-width:100%;max-height:100%;}"]);
|
|
17
|
-
export var TabContainer = styled.div.withConfig({
|
|
18
|
-
displayName: "TabContainer",
|
|
19
|
-
componentId: "gpt-vis-c7ef__sc-2dc7ka-3"
|
|
20
|
-
})(["border-radius:8px;overflow:hidden;"]);
|
|
21
|
-
export var TabHeader = styled.div.withConfig({
|
|
22
|
-
displayName: "TabHeader",
|
|
23
|
-
componentId: "gpt-vis-c7ef__sc-2dc7ka-4"
|
|
24
|
-
})(["display:flex;justify-content:space-between;align-items:center;background:#f5f5f5;padding:6px 14px 6px 6px;gap:2px;position:relative;z-index:10;"]);
|
|
25
|
-
export var TabLeftGroup = styled.div.withConfig({
|
|
26
|
-
displayName: "TabLeftGroup",
|
|
27
|
-
componentId: "gpt-vis-c7ef__sc-2dc7ka-5"
|
|
28
|
-
})(["display:flex;gap:2px;"]);
|
|
29
|
-
export var TabRightGroup = styled.div.withConfig({
|
|
30
|
-
displayName: "TabRightGroup",
|
|
31
|
-
componentId: "gpt-vis-c7ef__sc-2dc7ka-6"
|
|
32
|
-
})(["display:flex;gap:4px;align-items:center;"]);
|
|
33
|
-
export var TabContent = styled.div.withConfig({
|
|
34
|
-
displayName: "TabContent",
|
|
35
|
-
componentId: "gpt-vis-c7ef__sc-2dc7ka-7"
|
|
36
|
-
})(["background:#fff;overflow:hidden;position:relative;background:#fafafa;"]);
|
|
37
|
-
export var ErrorMessage = styled.div.withConfig({
|
|
38
|
-
displayName: "ErrorMessage",
|
|
39
|
-
componentId: "gpt-vis-c7ef__sc-2dc7ka-8"
|
|
40
|
-
})(["padding:16px;height:150px;font-size:12px;color:#666;border-radius:4px;display:flex;align-items:center;justify-content:center;"]);
|
|
41
|
-
export var GlobalStyles = createGlobalStyle(["pre:has(.gpt-vis){overflow:hidden;}"]);
|
|
42
|
-
export var StyledTabButton = styled.button.withConfig({
|
|
43
|
-
displayName: "StyledTabButton",
|
|
44
|
-
componentId: "gpt-vis-c7ef__sc-2dc7ka-9"
|
|
45
|
-
})(["border:none;box-shadow:none;background:", ";color:#494949;border-radius:8px;height:26px;width:52px;font-size:12px;transition:all 0.2s cubic-bezier(0.645,0.045,0.355,1);transform:scale(1);cursor:pointer;outline:none;font-family:inherit;display:inline-flex;align-items:center;justify-content:center;", " &:hover,&:focus{background:", ";color:#494949;box-shadow:", ";transform:scale(1.02);}&:active{background:", ";transform:scale(0.96);box-shadow:", ";transition:all 0.1s cubic-bezier(0.645,0.045,0.355,1);}"], function (props) {
|
|
46
|
-
return props.active ? '#fff' : 'transparent';
|
|
47
|
-
}, function (props) {
|
|
48
|
-
return props.active && "\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);\n ";
|
|
49
|
-
}, function (props) {
|
|
50
|
-
return props.active ? '#fff' : '#f0f0f0';
|
|
51
|
-
}, function (props) {
|
|
52
|
-
return props.active ? '0 2px 6px rgba(0, 0, 0, 0.12)' : '0 1px 3px rgba(0, 0, 0, 0.06)';
|
|
53
|
-
}, function (props) {
|
|
54
|
-
return props.active ? '#fff' : '#e8e8e8';
|
|
55
|
-
}, function (props) {
|
|
56
|
-
return props.active ? '0 1px 2px rgba(0, 0, 0, 0.1)' : '0 1px 2px rgba(0, 0, 0, 0.04)';
|
|
57
|
-
});
|
|
58
|
-
export var Divider = styled.div.withConfig({
|
|
59
|
-
displayName: "Divider",
|
|
60
|
-
componentId: "gpt-vis-c7ef__sc-2dc7ka-10"
|
|
61
|
-
})(["width:1px;height:16px;background-color:#d9d9d9;margin:0 8px;flex-shrink:0;"]);
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import type { Components, ExtraProps } from 'react-markdown';
|
|
3
|
-
/**
|
|
4
|
-
* Text labels type for internationalization
|
|
5
|
-
* 文本标签类型 - 用于国际化
|
|
6
|
-
*/
|
|
7
|
-
export type TextLabels = {
|
|
8
|
-
chartTab?: string;
|
|
9
|
-
codeTab?: string;
|
|
10
|
-
download?: string;
|
|
11
|
-
copy?: string;
|
|
12
|
-
copied?: string;
|
|
13
|
-
renderError?: string;
|
|
14
|
-
parseError?: string;
|
|
15
|
-
unsupportedChart?: string;
|
|
16
|
-
loading?: string;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Chart enhancement options - contains all new feature configurations
|
|
20
|
-
* 图表增强选项 - 包含所有新增的功能配置
|
|
21
|
-
*/
|
|
22
|
-
export type ChartEnhancementOptions = {
|
|
23
|
-
/**
|
|
24
|
-
* Controls whether tabs are displayed (default: true)
|
|
25
|
-
* 控制是否显示标签页 (默认: true)
|
|
26
|
-
*/
|
|
27
|
-
showTabs?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Controls whether code tab is shown (default: true)
|
|
30
|
-
* 控制是否显示代码标签页 (默认: true)
|
|
31
|
-
*/
|
|
32
|
-
showCodeTab?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Controls whether chart tab is shown (default: true)
|
|
35
|
-
* 控制是否显示图表标签页 (默认: true)
|
|
36
|
-
*/
|
|
37
|
-
showChartTab?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Default active tab (default: 'chart')
|
|
40
|
-
* 默认激活的标签页 (默认: 'chart')
|
|
41
|
-
*/
|
|
42
|
-
defaultTab?: 'chart' | 'code';
|
|
43
|
-
/**
|
|
44
|
-
* Custom text labels
|
|
45
|
-
* 自定义文本标签
|
|
46
|
-
*/
|
|
47
|
-
textLabels?: TextLabels;
|
|
48
|
-
/**
|
|
49
|
-
* Locale setting for default text labels (default: 'zh-CN')
|
|
50
|
-
* Supports: 'zh-CN' | 'en-US' | 'pt-BR'
|
|
51
|
-
* 语言区域设置,用于默认文本标签 (默认: 'zh-CN')
|
|
52
|
-
* 支持: 'zh-CN' | 'en-US' | 'pt-BR'
|
|
53
|
-
*/
|
|
54
|
-
locale?: string;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Error render function type
|
|
58
|
-
* 错误渲染函数类型
|
|
59
|
-
*/
|
|
60
|
-
export type ErrorRender = {
|
|
61
|
-
/** Error object | 错误对象 */
|
|
62
|
-
error?: Error;
|
|
63
|
-
/** Original content | 原始内容 */
|
|
64
|
-
content: string;
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Component error render type
|
|
68
|
-
* 组件错误渲染类型
|
|
69
|
-
*/
|
|
70
|
-
export type ComponentErrorRender = {
|
|
71
|
-
/** Error object | 错误对象 */
|
|
72
|
-
error?: Error;
|
|
73
|
-
/** Original content | 原始内容 */
|
|
74
|
-
content: string;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Options for withChartCode HOC
|
|
78
|
-
* withChartCode 高阶组件选项
|
|
79
|
-
*/
|
|
80
|
-
export type WithChartCodeOptions = {
|
|
81
|
-
/**
|
|
82
|
-
* Additional chart components to load
|
|
83
|
-
* 要额外加载的图表组件
|
|
84
|
-
*/
|
|
85
|
-
components: ChartComponents;
|
|
86
|
-
/**
|
|
87
|
-
* Custom renderers for other language code blocks
|
|
88
|
-
* 自定义其它语言代码块渲染器
|
|
89
|
-
*/
|
|
90
|
-
languageRenderers?: LanguageRenderers;
|
|
91
|
-
/**
|
|
92
|
-
* Default code renderer
|
|
93
|
-
* 默认的代码渲染器
|
|
94
|
-
*/
|
|
95
|
-
defaultRenderer?: CodeRenderer;
|
|
96
|
-
/**
|
|
97
|
-
* Enable debug logging
|
|
98
|
-
* 打开调试日志
|
|
99
|
-
*/
|
|
100
|
-
debug?: boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Loading animation timeout, default 5s
|
|
103
|
-
* 设置loading动画的超时时间,默认为 5s
|
|
104
|
-
*/
|
|
105
|
-
loadingTimeout?: number;
|
|
106
|
-
/**
|
|
107
|
-
* Chart styles, configure container styles
|
|
108
|
-
* 图表样式,配置容器样式
|
|
109
|
-
*/
|
|
110
|
-
style?: React.CSSProperties;
|
|
111
|
-
/**
|
|
112
|
-
* Custom component error render function
|
|
113
|
-
* 自定义组件错误渲染函数
|
|
114
|
-
*/
|
|
115
|
-
componentErrorRender?: (errorInfo: ComponentErrorRender) => React.ReactElement;
|
|
116
|
-
/**
|
|
117
|
-
* Custom error render function
|
|
118
|
-
* 自定义错误渲染函数
|
|
119
|
-
*/
|
|
120
|
-
errorRender?: (errorInfo: ErrorRender) => React.ReactElement;
|
|
121
|
-
} & ChartEnhancementOptions;
|
|
122
|
-
/**
|
|
123
|
-
* RenderVisChart component props type
|
|
124
|
-
* RenderVisChart 组件属性类型
|
|
125
|
-
*/
|
|
126
|
-
export type RenderVisChartProps = {
|
|
127
|
-
/** Chart content string | 图表内容字符串 */
|
|
128
|
-
content: string;
|
|
129
|
-
/** Chart components dictionary | 图表组件字典 */
|
|
130
|
-
components: ChartComponents;
|
|
131
|
-
/** Enable debug mode | 启用调试模式 */
|
|
132
|
-
debug?: boolean;
|
|
133
|
-
/** Loading timeout in milliseconds | 加载超时时间(毫秒) */
|
|
134
|
-
loadingTimeout: number;
|
|
135
|
-
/** Container styles | 容器样式 */
|
|
136
|
-
style?: React.CSSProperties;
|
|
137
|
-
/** Custom component error renderer | 自定义组件错误渲染器 */
|
|
138
|
-
componentErrorRender?: (errorInfo: ComponentErrorRender) => React.ReactElement;
|
|
139
|
-
/** Custom error renderer | 自定义错误渲染器 */
|
|
140
|
-
errorRender?: (errorInfo: ErrorRender) => React.ReactElement;
|
|
141
|
-
} & ChartEnhancementOptions;
|
|
142
|
-
/**
|
|
143
|
-
* Chart render data interface, for future extension, this is just an example
|
|
144
|
-
* 图表渲染数据接口,后续拓展,这里只是写个示例
|
|
145
|
-
*/
|
|
146
|
-
export interface ChartJson {
|
|
147
|
-
/** Chart type | 图表类型 */
|
|
148
|
-
type: string;
|
|
149
|
-
/** Chart data | 图表数据 */
|
|
150
|
-
data: any;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Chart components dictionary
|
|
154
|
-
* 图表组件字典
|
|
155
|
-
*/
|
|
156
|
-
export interface ChartComponents {
|
|
157
|
-
[key: string]: FC<any>;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Code block renderer interface
|
|
161
|
-
* 代码块渲染器接口
|
|
162
|
-
*/
|
|
163
|
-
export type CodeBlockComponent = Components['code'];
|
|
164
|
-
/**
|
|
165
|
-
* Code renderer type
|
|
166
|
-
* 代码渲染器类型
|
|
167
|
-
*/
|
|
168
|
-
type CodeRenderer = FC<React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement> & ExtraProps>;
|
|
169
|
-
/**
|
|
170
|
-
* Custom renderers for other language code blocks
|
|
171
|
-
* 自定义其它语言代码块渲染器
|
|
172
|
-
*/
|
|
173
|
-
interface LanguageRenderers {
|
|
174
|
-
[key: string]: CodeRenderer;
|
|
175
|
-
}
|
|
176
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const handleCopyCode: (data: any) => Promise<void>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
-
import copy from 'copy-text-to-clipboard';
|
|
6
|
-
export var handleCopyCode = /*#__PURE__*/function () {
|
|
7
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
8
|
-
var codeText, success;
|
|
9
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10
|
-
while (1) switch (_context.prev = _context.next) {
|
|
11
|
-
case 0:
|
|
12
|
-
_context.prev = 0;
|
|
13
|
-
codeText = JSON.stringify(data, null, 2);
|
|
14
|
-
success = copy(codeText);
|
|
15
|
-
if (success) {
|
|
16
|
-
_context.next = 5;
|
|
17
|
-
break;
|
|
18
|
-
}
|
|
19
|
-
throw new Error('复制失败');
|
|
20
|
-
case 5:
|
|
21
|
-
_context.next = 11;
|
|
22
|
-
break;
|
|
23
|
-
case 7:
|
|
24
|
-
_context.prev = 7;
|
|
25
|
-
_context.t0 = _context["catch"](0);
|
|
26
|
-
console.error('复制失败:', _context.t0);
|
|
27
|
-
throw _context.t0;
|
|
28
|
-
case 11:
|
|
29
|
-
case "end":
|
|
30
|
-
return _context.stop();
|
|
31
|
-
}
|
|
32
|
-
}, _callee, null, [[0, 7]]);
|
|
33
|
-
}));
|
|
34
|
-
return function handleCopyCode(_x) {
|
|
35
|
-
return _ref.apply(this, arguments);
|
|
36
|
-
};
|
|
37
|
-
}();
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ColumnConfig } from '@ant-design/plots';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { BasePlotProps, Style, Theme } from '../types';
|
|
4
|
-
export type ColumnDataItem = {
|
|
5
|
-
category: string | number;
|
|
6
|
-
value: number;
|
|
7
|
-
[key: string]: string | number;
|
|
8
|
-
};
|
|
9
|
-
export type ColumnProps = BasePlotProps<ColumnDataItem> & Partial<ColumnConfig> & Theme & Style & {
|
|
10
|
-
group?: boolean;
|
|
11
|
-
stack?: boolean;
|
|
12
|
-
};
|
|
13
|
-
declare const Column: (props: ColumnProps) => React.JSX.Element;
|
|
14
|
-
export default Column;
|
package/dist/esm/Column/index.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import { Column as ADCColumn } from '@ant-design/plots';
|
|
8
|
-
import { get } from 'lodash';
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { usePlotConfig } from "../ConfigProvider/hooks";
|
|
11
|
-
import { THEME_MAP } from "../theme";
|
|
12
|
-
var defaultConfig = function defaultConfig(props) {
|
|
13
|
-
var data = props.data,
|
|
14
|
-
_props$xField = props.xField,
|
|
15
|
-
xField = _props$xField === void 0 ? 'category' : _props$xField,
|
|
16
|
-
_props$yField = props.yField,
|
|
17
|
-
yField = _props$yField === void 0 ? 'value' : _props$yField,
|
|
18
|
-
_props$style = props.style,
|
|
19
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
20
|
-
_props$theme = props.theme,
|
|
21
|
-
theme = _props$theme === void 0 ? {} : _props$theme;
|
|
22
|
-
var backgroundColor = style.backgroundColor,
|
|
23
|
-
palette = style.palette;
|
|
24
|
-
var hasGroupField = get(data, '[0].group') !== undefined;
|
|
25
|
-
var hasPalette = !!(palette !== null && palette !== void 0 && palette[0]);
|
|
26
|
-
var axisYTitle = get(props, 'axis.y.title');
|
|
27
|
-
var paletteConfig = {
|
|
28
|
-
color: undefined
|
|
29
|
-
};
|
|
30
|
-
var radiusStyle = {
|
|
31
|
-
radiusTopLeft: 4,
|
|
32
|
-
radiusTopRight: 4
|
|
33
|
-
};
|
|
34
|
-
if ((theme === null || theme === void 0 ? void 0 : theme.type) === 'academy') {
|
|
35
|
-
radiusStyle = {
|
|
36
|
-
radiusTopLeft: 0,
|
|
37
|
-
radiusTopRight: 0
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
if (hasPalette) {
|
|
41
|
-
paletteConfig = {
|
|
42
|
-
color: {
|
|
43
|
-
range: palette
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
return _objectSpread(_objectSpread({
|
|
48
|
-
xField: xField,
|
|
49
|
-
yField: yField,
|
|
50
|
-
colorField: hasGroupField ? 'group' : xField,
|
|
51
|
-
tooltip: function tooltip(d) {
|
|
52
|
-
var tooltipName = hasGroupField ? d['group'] : axisYTitle || d[xField];
|
|
53
|
-
return {
|
|
54
|
-
name: tooltipName,
|
|
55
|
-
value: d[yField]
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
style: _objectSpread(_objectSpread({}, radiusStyle), {}, {
|
|
59
|
-
columnWidthRatio: 0.8
|
|
60
|
-
}),
|
|
61
|
-
scale: _objectSpread({
|
|
62
|
-
y: {
|
|
63
|
-
nice: true
|
|
64
|
-
}
|
|
65
|
-
}, paletteConfig)
|
|
66
|
-
}, backgroundColor ? {
|
|
67
|
-
viewStyle: {
|
|
68
|
-
viewFill: backgroundColor
|
|
69
|
-
}
|
|
70
|
-
} : {
|
|
71
|
-
viewStyle: undefined
|
|
72
|
-
}), {}, {
|
|
73
|
-
legend: hasGroupField ? {} : false,
|
|
74
|
-
group: hasGroupField
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
var Column = function Column(props) {
|
|
78
|
-
var _props$theme2;
|
|
79
|
-
var themeConfig = THEME_MAP[(_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 ? _props$theme2 : 'default'];
|
|
80
|
-
var data = props.data,
|
|
81
|
-
_props$group = props.group,
|
|
82
|
-
group = _props$group === void 0 ? false : _props$group,
|
|
83
|
-
_props$stack = props.stack,
|
|
84
|
-
stack = _props$stack === void 0 ? false : _props$stack;
|
|
85
|
-
var hasGroupField = get(data, '[0].group') !== undefined;
|
|
86
|
-
var config = usePlotConfig('Column', defaultConfig, _objectSpread(_objectSpread({}, props), {}, {
|
|
87
|
-
theme: themeConfig,
|
|
88
|
-
group: hasGroupField && group,
|
|
89
|
-
stack: hasGroupField && stack
|
|
90
|
-
}));
|
|
91
|
-
return /*#__PURE__*/React.createElement(ADCColumn, config);
|
|
92
|
-
};
|
|
93
|
-
export default Column;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './useConfig';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./useConfig";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { GraphOptions } from '@ant-design/graphs';
|
|
2
|
-
import type { CommonConfig } from '@ant-design/plots';
|
|
3
|
-
import type { MapProps } from '../../Map';
|
|
4
|
-
import type { Charts } from '../../types';
|
|
5
|
-
export declare function useComponentGlobalConfig(name: Charts): Record<string, any> | undefined;
|
|
6
|
-
export declare function usePlotConfig<T extends CommonConfig>(name: Charts, defaultConfig: Partial<T> | ((props: Partial<T>) => Partial<T>), props: Partial<T>): Partial<T>;
|
|
7
|
-
export declare function useMapConfig<T extends MapProps>(name: Charts, props: T): {
|
|
8
|
-
mapType: string | undefined;
|
|
9
|
-
token: string | undefined;
|
|
10
|
-
} & T;
|
|
11
|
-
export declare function useGraphConfig<T extends Omit<GraphOptions, 'data'>>(name: Charts, defaultConfig: Partial<T>, props: Partial<T>): {
|
|
12
|
-
[x: string]: any;
|
|
13
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
var _excluded = ["style"];
|
|
2
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { mergeGraphOptions } from "../../utils/config";
|
|
12
|
-
import { transform2ADCProps } from "../../utils/plot";
|
|
13
|
-
import { ConfigContext } from "../context";
|
|
14
|
-
function useConfig() {
|
|
15
|
-
var context = React.useContext(ConfigContext);
|
|
16
|
-
return context;
|
|
17
|
-
}
|
|
18
|
-
export function useComponentGlobalConfig(name) {
|
|
19
|
-
var globalConfig = useConfig();
|
|
20
|
-
var _globalConfig$compone = globalConfig.components,
|
|
21
|
-
components = _globalConfig$compone === void 0 ? {} : _globalConfig$compone;
|
|
22
|
-
var config = components === null || components === void 0 ? void 0 : components[name];
|
|
23
|
-
return config;
|
|
24
|
-
}
|
|
25
|
-
function usePlotGlobalConfig(name) {
|
|
26
|
-
var componentConfig = useComponentGlobalConfig(name);
|
|
27
|
-
var _useConfig = useConfig(),
|
|
28
|
-
plotConfig = _useConfig.plot;
|
|
29
|
-
var config = _objectSpread(_objectSpread({}, plotConfig), componentConfig);
|
|
30
|
-
return config;
|
|
31
|
-
}
|
|
32
|
-
export function usePlotConfig(name, defaultConfig, props) {
|
|
33
|
-
var globalConfig = usePlotGlobalConfig(name);
|
|
34
|
-
var mergedProps = _objectSpread(_objectSpread({}, globalConfig), props);
|
|
35
|
-
var transformedProps = transform2ADCProps(mergedProps);
|
|
36
|
-
var _defaultConfig = typeof defaultConfig === 'function' ? defaultConfig(transformedProps) : defaultConfig;
|
|
37
|
-
|
|
38
|
-
// The style property has already been expanded in defaultConfig, so it needs to be stripped here.
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
40
|
-
var style = transformedProps.style,
|
|
41
|
-
restTransformedProps = _objectWithoutProperties(transformedProps, _excluded);
|
|
42
|
-
var config = _objectSpread(_objectSpread({}, _defaultConfig), restTransformedProps);
|
|
43
|
-
return config;
|
|
44
|
-
}
|
|
45
|
-
function useMapGlobalConfig(name) {
|
|
46
|
-
var componentConfig = useComponentGlobalConfig(name);
|
|
47
|
-
var _useConfig2 = useConfig(),
|
|
48
|
-
mapConfig = _useConfig2.map;
|
|
49
|
-
var transformedProps = {
|
|
50
|
-
mapType: mapConfig === null || mapConfig === void 0 ? void 0 : mapConfig.style,
|
|
51
|
-
token: mapConfig === null || mapConfig === void 0 ? void 0 : mapConfig.token
|
|
52
|
-
};
|
|
53
|
-
var config = _objectSpread(_objectSpread({}, transformedProps), componentConfig);
|
|
54
|
-
return config;
|
|
55
|
-
}
|
|
56
|
-
export function useMapConfig(name, props) {
|
|
57
|
-
var globalConfig = useMapGlobalConfig(name);
|
|
58
|
-
var mapConfig = _objectSpread(_objectSpread({}, globalConfig), props);
|
|
59
|
-
return mapConfig;
|
|
60
|
-
}
|
|
61
|
-
function useGraphGlobalConfig(name) {
|
|
62
|
-
var _useConfig3 = useConfig(),
|
|
63
|
-
_useConfig3$graph = _useConfig3.graph,
|
|
64
|
-
graphConfig = _useConfig3$graph === void 0 ? {} : _useConfig3$graph;
|
|
65
|
-
var componentConfig = useComponentGlobalConfig(name);
|
|
66
|
-
return mergeGraphOptions(graphConfig, componentConfig || {});
|
|
67
|
-
}
|
|
68
|
-
export function useGraphConfig(name, defaultConfig, props) {
|
|
69
|
-
var globalConfig = useGraphGlobalConfig(name);
|
|
70
|
-
return mergeGraphOptions(defaultConfig, globalConfig, props);
|
|
71
|
-
}
|