@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
package/dist/esm/GPTVis/Lite.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
var _excluded = ["children", "components", "rehypePlugins", "remarkPlugins", "eventSubs"];
|
|
2
|
-
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); }
|
|
3
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
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 EventEmitter from '@antv/event-emitter';
|
|
12
|
-
import React, { memo, useEffect, useMemo } from 'react';
|
|
13
|
-
import Markdown from 'react-markdown';
|
|
14
|
-
import rehypeRaw from 'rehype-raw';
|
|
15
|
-
import remarkGfm from 'remark-gfm';
|
|
16
|
-
import { GPTVisContext } from "./hooks/useContext";
|
|
17
|
-
import { useEventPublish } from "./hooks/useEvent";
|
|
18
|
-
var GPTVisLite = function GPTVisLite(_ref) {
|
|
19
|
-
var children = _ref.children,
|
|
20
|
-
components = _ref.components,
|
|
21
|
-
rehypePlugins = _ref.rehypePlugins,
|
|
22
|
-
remarkPlugins = _ref.remarkPlugins,
|
|
23
|
-
eventSubs = _ref.eventSubs,
|
|
24
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
-
var eventBus = useMemo(function () {
|
|
26
|
-
return new EventEmitter();
|
|
27
|
-
}, []);
|
|
28
|
-
var contextValue = useMemo(function () {
|
|
29
|
-
return {
|
|
30
|
-
eventBus: eventBus
|
|
31
|
-
};
|
|
32
|
-
}, [eventBus]);
|
|
33
|
-
useEffect(function () {
|
|
34
|
-
if (eventSubs) {
|
|
35
|
-
var events = Object.keys(eventSubs);
|
|
36
|
-
for (var _i = 0, _events = events; _i < _events.length; _i++) {
|
|
37
|
-
var eventName = _events[_i];
|
|
38
|
-
eventBus.on(eventName, eventSubs[eventName]);
|
|
39
|
-
}
|
|
40
|
-
return function () {
|
|
41
|
-
for (var _i2 = 0, _events2 = events; _i2 < _events2.length; _i2++) {
|
|
42
|
-
var _eventName = _events2[_i2];
|
|
43
|
-
eventBus.off(_eventName, eventSubs[_eventName]);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}, [eventBus, eventSubs]);
|
|
48
|
-
return /*#__PURE__*/React.createElement(GPTVisContext.Provider, {
|
|
49
|
-
value: contextValue
|
|
50
|
-
}, /*#__PURE__*/React.createElement(Markdown, _extends({
|
|
51
|
-
components: components,
|
|
52
|
-
rehypePlugins: [rehypeRaw].concat(_toConsumableArray(rehypePlugins ? rehypePlugins : [])),
|
|
53
|
-
remarkPlugins: [remarkGfm].concat(_toConsumableArray(remarkPlugins ? remarkPlugins : []))
|
|
54
|
-
}, rest), children));
|
|
55
|
-
};
|
|
56
|
-
export { useEventPublish };
|
|
57
|
-
export default /*#__PURE__*/memo(GPTVisLite);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type EventEmitter from '@antv/event-emitter';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
type GPTVisContextValue = {
|
|
4
|
-
eventBus: EventEmitter;
|
|
5
|
-
};
|
|
6
|
-
export declare const GPTVisContext: React.Context<GPTVisContextValue>;
|
|
7
|
-
export declare function useGPTVisContext<T = GPTVisContextValue>(): T;
|
|
8
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export var GPTVisContext = /*#__PURE__*/React.createContext(null);
|
|
3
|
-
export function useGPTVisContext() {
|
|
4
|
-
var context = React.useContext(GPTVisContext);
|
|
5
|
-
if (context === undefined || Object.keys(context).length === 0) {
|
|
6
|
-
throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");
|
|
7
|
-
}
|
|
8
|
-
return context;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useEventPublish: () => (evt: string, ...args: any[]) => void;
|
package/dist/esm/GPTVis/index.js
DELETED
|
@@ -1,25 +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", "components"];
|
|
3
|
-
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); }
|
|
4
|
-
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; }
|
|
5
|
-
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; }
|
|
6
|
-
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; }
|
|
7
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
-
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); }
|
|
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 React, { memo } from 'react';
|
|
12
|
-
import { withDefaultChartCode } from "../ChartCodeRender";
|
|
13
|
-
import { default as GPTVisLite } from "./Lite";
|
|
14
|
-
var CodeBlock = withDefaultChartCode();
|
|
15
|
-
var GPTVis = function GPTVis(_ref) {
|
|
16
|
-
var children = _ref.children,
|
|
17
|
-
components = _ref.components,
|
|
18
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
-
return /*#__PURE__*/React.createElement(GPTVisLite, _extends({
|
|
20
|
-
components: _objectSpread({
|
|
21
|
-
code: CodeBlock
|
|
22
|
-
}, components)
|
|
23
|
-
}, rest), children);
|
|
24
|
-
};
|
|
25
|
-
export default /*#__PURE__*/memo(GPTVis);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type FC } from 'react';
|
|
2
|
-
import type { MapProps } from '../Map';
|
|
3
|
-
type GeoData = {
|
|
4
|
-
longitude: number;
|
|
5
|
-
latitude: number;
|
|
6
|
-
value: number;
|
|
7
|
-
};
|
|
8
|
-
export type HeatMapProps = MapProps & {
|
|
9
|
-
data?: GeoData[];
|
|
10
|
-
};
|
|
11
|
-
declare const HeatMap: FC<HeatMapProps>;
|
|
12
|
-
export default HeatMap;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var _excluded = ["children", "data"];
|
|
2
|
-
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); }
|
|
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
|
-
import { HeatmapLayer } from '@antv/larkmap';
|
|
6
|
-
import React, { useMemo } from 'react';
|
|
7
|
-
import { useMapConfig } from "../ConfigProvider/hooks";
|
|
8
|
-
import Map from "../Map";
|
|
9
|
-
var heapLayerOptions = {
|
|
10
|
-
autoFit: true,
|
|
11
|
-
shape: 'heatmap',
|
|
12
|
-
size: {
|
|
13
|
-
field: 'value',
|
|
14
|
-
value: [0, 1]
|
|
15
|
-
},
|
|
16
|
-
style: {
|
|
17
|
-
intensity: 3,
|
|
18
|
-
radius: 20,
|
|
19
|
-
opacity: 1,
|
|
20
|
-
rampColors: {
|
|
21
|
-
colors: ['#FF4818', '#F7B74A', '#FFF598', '#F27DEB', '#8C1EB2', '#421EB2'],
|
|
22
|
-
positions: [0, 0.2, 0.4, 0.6, 0.8, 1.0]
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
var HeatMap = function HeatMap(props) {
|
|
27
|
-
var _useMapConfig = useMapConfig('HeatMap', props),
|
|
28
|
-
children = _useMapConfig.children,
|
|
29
|
-
data = _useMapConfig.data,
|
|
30
|
-
mapConfigRest = _objectWithoutProperties(_useMapConfig, _excluded);
|
|
31
|
-
var source = useMemo(function () {
|
|
32
|
-
return {
|
|
33
|
-
data: data || [],
|
|
34
|
-
parser: {
|
|
35
|
-
type: 'json',
|
|
36
|
-
x: 'longitude',
|
|
37
|
-
y: 'latitude'
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}, [data]);
|
|
41
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Map, mapConfigRest, /*#__PURE__*/React.createElement(HeatmapLayer, _extends({}, heapLayerOptions, {
|
|
42
|
-
source: source
|
|
43
|
-
})), children));
|
|
44
|
-
};
|
|
45
|
-
export default HeatMap;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { BasePlotProps, Style, Theme } from '../types';
|
|
3
|
-
export type HistogramProps = BasePlotProps<number> & Theme & Style & {
|
|
4
|
-
binNumber: number;
|
|
5
|
-
binField?: (d: number) => number;
|
|
6
|
-
};
|
|
7
|
-
declare const Histogram: (props: HistogramProps) => React.JSX.Element;
|
|
8
|
-
export default Histogram;
|
|
@@ -1,75 +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 { Histogram as ADCHistogram } from '@ant-design/plots';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { usePlotConfig } from "../ConfigProvider/hooks";
|
|
10
|
-
import { THEME_MAP } from "../theme";
|
|
11
|
-
|
|
12
|
-
// binNumber和binWidth为互斥属性,选其一即可
|
|
13
|
-
|
|
14
|
-
var defaultConfig = function defaultConfig(props) {
|
|
15
|
-
var _props$binField = props.binField,
|
|
16
|
-
binField = _props$binField === void 0 ? function (d) {
|
|
17
|
-
return d;
|
|
18
|
-
} : _props$binField,
|
|
19
|
-
binNumber = props.binNumber,
|
|
20
|
-
_props$style = props.style,
|
|
21
|
-
style = _props$style === void 0 ? {} : _props$style;
|
|
22
|
-
var backgroundColor = style.backgroundColor,
|
|
23
|
-
palette = style.palette;
|
|
24
|
-
var hasPalette = !!(palette !== null && palette !== void 0 && palette[0]);
|
|
25
|
-
var paletteConfig = {
|
|
26
|
-
color: undefined
|
|
27
|
-
};
|
|
28
|
-
if (hasPalette) {
|
|
29
|
-
paletteConfig = {
|
|
30
|
-
color: {
|
|
31
|
-
range: palette
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
return _objectSpread({
|
|
36
|
-
binField: binField,
|
|
37
|
-
binNumber: binNumber,
|
|
38
|
-
style: {
|
|
39
|
-
inset: 0.5,
|
|
40
|
-
minHeight: 1,
|
|
41
|
-
columnWidthRatio: 1
|
|
42
|
-
},
|
|
43
|
-
legend: false,
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
encode: {
|
|
46
|
-
x: function x(d) {
|
|
47
|
-
return d;
|
|
48
|
-
},
|
|
49
|
-
y: 'count',
|
|
50
|
-
color: function color() {
|
|
51
|
-
return 'all';
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
scale: _objectSpread({
|
|
55
|
-
y: {
|
|
56
|
-
nice: true
|
|
57
|
-
}
|
|
58
|
-
}, paletteConfig)
|
|
59
|
-
}, backgroundColor ? {
|
|
60
|
-
viewStyle: {
|
|
61
|
-
viewFill: backgroundColor
|
|
62
|
-
}
|
|
63
|
-
} : {
|
|
64
|
-
viewStyle: undefined
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
var Histogram = function Histogram(props) {
|
|
68
|
-
var _props$theme;
|
|
69
|
-
var themeConfig = THEME_MAP[(_props$theme = props.theme) !== null && _props$theme !== void 0 ? _props$theme : 'default'];
|
|
70
|
-
var config = usePlotConfig('Histogram', defaultConfig, _objectSpread(_objectSpread({}, props), {}, {
|
|
71
|
-
theme: themeConfig
|
|
72
|
-
}));
|
|
73
|
-
return /*#__PURE__*/React.createElement(ADCHistogram, config);
|
|
74
|
-
};
|
|
75
|
-
export default Histogram;
|
|
@@ -1,68 +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 = ["data"];
|
|
3
|
-
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); }
|
|
4
|
-
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; }
|
|
5
|
-
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; }
|
|
6
|
-
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; }
|
|
7
|
-
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; }
|
|
8
|
-
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; }
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
-
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); }
|
|
11
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
17
|
-
import { IndentedTree as ADCIndentedTree } from '@ant-design/graphs';
|
|
18
|
-
import React, { useMemo } from 'react';
|
|
19
|
-
import { useGraphConfig } from "../ConfigProvider/hooks";
|
|
20
|
-
import { G6THEME_MAP } from "../theme";
|
|
21
|
-
import { visTreeData2GraphData } from "../utils/graph";
|
|
22
|
-
var getDefaultConfig = function getDefaultConfig(props) {
|
|
23
|
-
var _props$theme = props.theme,
|
|
24
|
-
theme = _props$theme === void 0 ? 'default' : _props$theme;
|
|
25
|
-
return {
|
|
26
|
-
type: 'linear',
|
|
27
|
-
autoFit: 'view',
|
|
28
|
-
autoResize: true,
|
|
29
|
-
zoomRange: [0.1, 5],
|
|
30
|
-
zoom: 1,
|
|
31
|
-
node: {
|
|
32
|
-
animation: {
|
|
33
|
-
update: false,
|
|
34
|
-
translate: false
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
edge: {
|
|
38
|
-
animation: {
|
|
39
|
-
update: false,
|
|
40
|
-
translate: false
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
transforms: function transforms(prev) {
|
|
44
|
-
return [].concat(_toConsumableArray(prev.filter(function (transform) {
|
|
45
|
-
return transform.type !== 'collapse-expand-react-node';
|
|
46
|
-
})), [_objectSpread(_objectSpread({}, prev.find(function (transform) {
|
|
47
|
-
return transform.type === 'collapse-expand-react-node';
|
|
48
|
-
})), {}, {
|
|
49
|
-
enable: true
|
|
50
|
-
}), _objectSpread(_objectSpread({}, prev.find(function (transform) {
|
|
51
|
-
return transform.key === 'assign-color-by-branch';
|
|
52
|
-
}) || {}), G6THEME_MAP[theme])]);
|
|
53
|
-
},
|
|
54
|
-
behaviors: ['drag-canvas']
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
var IndentedTree = function IndentedTree(props) {
|
|
58
|
-
var propsData = props.data,
|
|
59
|
-
restProps = _objectWithoutProperties(props, _excluded);
|
|
60
|
-
var data = useMemo(function () {
|
|
61
|
-
return visTreeData2GraphData(propsData);
|
|
62
|
-
}, [propsData]);
|
|
63
|
-
var config = useGraphConfig('IndentedTree', getDefaultConfig(props), restProps);
|
|
64
|
-
return /*#__PURE__*/React.createElement(ADCIndentedTree, _extends({
|
|
65
|
-
data: data
|
|
66
|
-
}, config));
|
|
67
|
-
};
|
|
68
|
-
export default IndentedTree;
|
package/dist/esm/Line/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { LineConfig } from '@ant-design/plots';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { BasePlotProps, Style, Theme } from '../types';
|
|
4
|
-
export type LineDataItem = {
|
|
5
|
-
time: string | number;
|
|
6
|
-
value: number;
|
|
7
|
-
[key: string]: string | number;
|
|
8
|
-
};
|
|
9
|
-
export type LineProps = BasePlotProps<LineDataItem> & Partial<LineConfig> & Theme & Style;
|
|
10
|
-
declare const Line: (props: LineProps) => React.JSX.Element;
|
|
11
|
-
export default Line;
|
package/dist/esm/Line/index.js
DELETED
|
@@ -1,92 +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 { Line as ADCLine } 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 ? 'time' : _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
|
-
var palette = style.palette,
|
|
21
|
-
lineWidth = style.lineWidth,
|
|
22
|
-
backgroundColor = style.backgroundColor,
|
|
23
|
-
_style$startAtZero = style.startAtZero,
|
|
24
|
-
startAtZero = _style$startAtZero === void 0 ? false : _style$startAtZero;
|
|
25
|
-
var hasGroupField = get(data, '[0].group') !== undefined;
|
|
26
|
-
var axisYTitle = get(props, 'axis.y.title');
|
|
27
|
-
var hasPalette = !!(palette !== null && palette !== void 0 && palette[0]);
|
|
28
|
-
var encode = {};
|
|
29
|
-
var paletteConfig = {
|
|
30
|
-
color: undefined
|
|
31
|
-
};
|
|
32
|
-
if (hasGroupField) {
|
|
33
|
-
encode = {
|
|
34
|
-
x: xField,
|
|
35
|
-
y: yField,
|
|
36
|
-
color: 'group'
|
|
37
|
-
};
|
|
38
|
-
} else {
|
|
39
|
-
encode = {
|
|
40
|
-
x: xField,
|
|
41
|
-
y: yField,
|
|
42
|
-
color: function color() {
|
|
43
|
-
return 'all';
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
if (hasPalette) {
|
|
48
|
-
paletteConfig = {
|
|
49
|
-
color: {
|
|
50
|
-
range: palette
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
return _objectSpread({
|
|
55
|
-
xField: xField,
|
|
56
|
-
yField: yField,
|
|
57
|
-
colorField: hasGroupField ? 'group' : undefined,
|
|
58
|
-
encode: encode,
|
|
59
|
-
legend: hasGroupField ? {} : false,
|
|
60
|
-
tooltip: function tooltip(d) {
|
|
61
|
-
var tooltipName = axisYTitle || d[xField];
|
|
62
|
-
return {
|
|
63
|
-
name: tooltipName,
|
|
64
|
-
value: d[yField]
|
|
65
|
-
};
|
|
66
|
-
},
|
|
67
|
-
scale: _objectSpread({
|
|
68
|
-
y: {
|
|
69
|
-
nice: true,
|
|
70
|
-
zero: startAtZero
|
|
71
|
-
}
|
|
72
|
-
}, paletteConfig),
|
|
73
|
-
style: {
|
|
74
|
-
lineWidth: lineWidth || 2
|
|
75
|
-
}
|
|
76
|
-
}, backgroundColor ? {
|
|
77
|
-
viewStyle: {
|
|
78
|
-
viewFill: backgroundColor
|
|
79
|
-
}
|
|
80
|
-
} : {
|
|
81
|
-
viewStyle: undefined
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
var Line = function Line(props) {
|
|
85
|
-
var _props$theme;
|
|
86
|
-
var themeConfig = THEME_MAP[(_props$theme = props.theme) !== null && _props$theme !== void 0 ? _props$theme : 'default'];
|
|
87
|
-
var config = usePlotConfig('Line', defaultConfig, _objectSpread(_objectSpread({}, props), {}, {
|
|
88
|
-
theme: themeConfig
|
|
89
|
-
}));
|
|
90
|
-
return /*#__PURE__*/React.createElement(ADCLine, config);
|
|
91
|
-
};
|
|
92
|
-
export default Line;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Style, Theme } from '../types';
|
|
3
|
-
export type LiquidProps = Theme & Style & {
|
|
4
|
-
percent: number;
|
|
5
|
-
shape?: 'rect' | 'circle' | 'pin' | 'triangle';
|
|
6
|
-
title?: string;
|
|
7
|
-
width?: number;
|
|
8
|
-
height?: number;
|
|
9
|
-
};
|
|
10
|
-
declare const Liquid: (props: LiquidProps) => React.JSX.Element;
|
|
11
|
-
export default Liquid;
|
package/dist/esm/Liquid/index.js
DELETED
|
@@ -1,100 +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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
-
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; }
|
|
9
|
-
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; }
|
|
10
|
-
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; }
|
|
11
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
12
|
-
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); }
|
|
13
|
-
import { Liquid as ADCLiquid } from '@ant-design/plots';
|
|
14
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
15
|
-
import { usePlotConfig } from "../ConfigProvider/hooks";
|
|
16
|
-
import { THEME_MAP } from "../theme";
|
|
17
|
-
var defaultConfig = function defaultConfig(props) {
|
|
18
|
-
var percent = props.percent,
|
|
19
|
-
_props$shape = props.shape,
|
|
20
|
-
shape = _props$shape === void 0 ? 'circle' : _props$shape,
|
|
21
|
-
_props$style = props.style,
|
|
22
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
23
|
-
_props$width = props.width,
|
|
24
|
-
width = _props$width === void 0 ? 600 : _props$width,
|
|
25
|
-
_props$height = props.height,
|
|
26
|
-
height = _props$height === void 0 ? 400 : _props$height;
|
|
27
|
-
var backgroundColor = style.backgroundColor,
|
|
28
|
-
palette = style.palette;
|
|
29
|
-
var inferFontSize = Math.min(width, height) / 10;
|
|
30
|
-
var fontSize = Math.min(Math.max(inferFontSize, 24), 64);
|
|
31
|
-
var hasPalette = !!(palette !== null && palette !== void 0 && palette[0]);
|
|
32
|
-
var paletteConfig = {
|
|
33
|
-
fill: undefined,
|
|
34
|
-
outlineStroke: undefined
|
|
35
|
-
};
|
|
36
|
-
if (hasPalette) {
|
|
37
|
-
paletteConfig = {
|
|
38
|
-
fill: palette[0],
|
|
39
|
-
outlineStroke: palette[0]
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
return _objectSpread(_objectSpread({
|
|
43
|
-
percent: percent,
|
|
44
|
-
style: _objectSpread({
|
|
45
|
-
shape: shape,
|
|
46
|
-
contentFontSize: fontSize,
|
|
47
|
-
contentFill: '#000',
|
|
48
|
-
contentStroke: '#fff',
|
|
49
|
-
contentLineWidth: 2,
|
|
50
|
-
outlineBorder: 4,
|
|
51
|
-
outlineDistance: 4,
|
|
52
|
-
waveLength: 128
|
|
53
|
-
}, paletteConfig)
|
|
54
|
-
}, backgroundColor ? {
|
|
55
|
-
viewStyle: {
|
|
56
|
-
viewFill: backgroundColor
|
|
57
|
-
}
|
|
58
|
-
} : {}), {}, {
|
|
59
|
-
interaction: {
|
|
60
|
-
tooltip: false
|
|
61
|
-
},
|
|
62
|
-
animate: false
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
var Liquid = function Liquid(props) {
|
|
66
|
-
var _props$theme;
|
|
67
|
-
var themeConfig = THEME_MAP[(_props$theme = props.theme) !== null && _props$theme !== void 0 ? _props$theme : 'default'];
|
|
68
|
-
var containerRef = useRef(null);
|
|
69
|
-
var _useState = useState({
|
|
70
|
-
width: 0,
|
|
71
|
-
height: 0
|
|
72
|
-
}),
|
|
73
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
74
|
-
size = _useState2[0],
|
|
75
|
-
setSize = _useState2[1];
|
|
76
|
-
var config = usePlotConfig('Liquid', defaultConfig, _objectSpread(_objectSpread({}, props), {}, {
|
|
77
|
-
theme: themeConfig,
|
|
78
|
-
width: size.width,
|
|
79
|
-
height: size.height
|
|
80
|
-
}));
|
|
81
|
-
useEffect(function () {
|
|
82
|
-
if (containerRef.current) {
|
|
83
|
-
var _containerRef$current = containerRef.current,
|
|
84
|
-
offsetWidth = _containerRef$current.offsetWidth,
|
|
85
|
-
offsetHeight = _containerRef$current.offsetHeight;
|
|
86
|
-
setSize({
|
|
87
|
-
width: offsetWidth,
|
|
88
|
-
height: offsetHeight
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}, []);
|
|
92
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
93
|
-
ref: containerRef,
|
|
94
|
-
style: {
|
|
95
|
-
width: '100%',
|
|
96
|
-
height: '100%'
|
|
97
|
-
}
|
|
98
|
-
}, /*#__PURE__*/React.createElement(ADCLiquid, config));
|
|
99
|
-
};
|
|
100
|
-
export default Liquid;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { useScene } from '@antv/larkmap';
|
|
2
|
-
import { useEffect } from 'react';
|
|
3
|
-
import { fitBounds, setMapStatus, setMapView } from "../../utils/map";
|
|
4
|
-
|
|
5
|
-
// 更新地图视野
|
|
6
|
-
export default (function (props) {
|
|
7
|
-
var scene = useScene();
|
|
8
|
-
useEffect(function () {
|
|
9
|
-
setMapView(props, scene);
|
|
10
|
-
}, []);
|
|
11
|
-
useEffect(function () {
|
|
12
|
-
setMapStatus(props, scene);
|
|
13
|
-
}, [props.enableRotate, props.enableScroll, props.enableZoom]);
|
|
14
|
-
useEffect(function () {
|
|
15
|
-
fitBounds(props, scene);
|
|
16
|
-
}, [props.includePoints, props.markers, props.polyline, props.includePadding]);
|
|
17
|
-
return null;
|
|
18
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import { useScene } from '@antv/larkmap';
|
|
8
|
-
import { useEffect, useState } from 'react';
|
|
9
|
-
import { setMapContext, setMarkers } from "../../utils/map";
|
|
10
|
-
// 渲染标记点
|
|
11
|
-
export default (function (props) {
|
|
12
|
-
var scene = useScene();
|
|
13
|
-
var _useState = useState([]),
|
|
14
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
15
|
-
layers = _useState2[0],
|
|
16
|
-
setLayers = _useState2[1];
|
|
17
|
-
var removeLayers = function removeLayers() {
|
|
18
|
-
layers.forEach(function (item) {
|
|
19
|
-
scene.removeLayer(item);
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
useEffect(function () {
|
|
23
|
-
var _setMapContext;
|
|
24
|
-
if (!props.markers) return;
|
|
25
|
-
// 异步调用
|
|
26
|
-
(_setMapContext = setMapContext(props, scene)) === null || _setMapContext === void 0 || _setMapContext.then(function () {
|
|
27
|
-
// 初始化资源
|
|
28
|
-
var markerLayer = setMarkers(props.markers || []);
|
|
29
|
-
removeLayers();
|
|
30
|
-
markerLayer.forEach(function (item) {
|
|
31
|
-
scene.addLayer(item);
|
|
32
|
-
});
|
|
33
|
-
setLayers(markerLayer);
|
|
34
|
-
});
|
|
35
|
-
return function () {
|
|
36
|
-
removeLayers();
|
|
37
|
-
};
|
|
38
|
-
}, [props.markers]);
|
|
39
|
-
return null;
|
|
40
|
-
});
|