@ebiz/designer-components 0.0.18-tj.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -0
- package/dist/designer-components.css +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.mjs +110735 -0
- package/package.json +40 -0
- package/src/App.vue +26 -0
- package/src/apiService/SIMPLE_DATA_SERVICE.md +285 -0
- package/src/apiService/simpleDataService.js +174 -0
- package/src/assets/base.css +86 -0
- package/src/assets/logo.svg +1 -0
- package/src/assets/main.css +1 -0
- package/src/assets/styles/charts/main.less +30 -0
- package/src/components/Button.vue +103 -0
- package/src/components/DataContainer.vue +39 -0
- package/src/components/EbizDivider.vue +97 -0
- package/src/components/EbizFileUpload.vue +202 -0
- package/src/components/EbizMindmap/README.md +8 -0
- package/src/components/EbizMindmap/components/GridNode.vue +102 -0
- package/src/components/EbizMindmap/components/node.vue +92 -0
- package/src/components/EbizMindmap/components/vueNode.vue +64 -0
- package/src/components/EbizMindmap/index.vue +383 -0
- package/src/components/EbizOkrTree.vue +99 -0
- package/src/components/EbizRemoteSelect.vue +167 -0
- package/src/components/EbizRouteBreadcrumb.vue +47 -0
- package/src/components/EbizSelect.vue +95 -0
- package/src/components/EbizSpace.vue +101 -0
- package/src/components/EbizStatsCard.vue +114 -0
- package/src/components/EbizSwiper.vue +114 -0
- package/src/components/EbizSwiperItem.vue +14 -0
- package/src/components/EbizTabHeader.vue +149 -0
- package/src/components/EbizTitle.vue +93 -0
- package/src/components/Form.vue +27 -0
- package/src/components/Home.vue +8 -0
- package/src/components/MyComponent.vue +39 -0
- package/src/components/Table.vue +45 -0
- package/src/components/TdesignButton.vue +130 -0
- package/src/components/TdesignCalendar/index.vue +143 -0
- package/src/components/TdesignCard.vue +196 -0
- package/src/components/TdesignCollapse.vue +143 -0
- package/src/components/TdesignCollapsePanel.vue +80 -0
- package/src/components/TdesignDatePicker.vue +125 -0
- package/src/components/TdesignForm.vue +134 -0
- package/src/components/TdesignFormItem.vue +106 -0
- package/src/components/TdesignIcon.vue +68 -0
- package/src/components/TdesignImage.vue +163 -0
- package/src/components/TdesignImageViewer.vue +201 -0
- package/src/components/TdesignInput.vue +243 -0
- package/src/components/TdesignSelect.vue +445 -0
- package/src/components/TdesignTag.vue +118 -0
- package/src/components/charts/chart.js +47 -0
- package/src/components/charts/components/AssembleBubbleChart/BaseOption.js +50 -0
- package/src/components/charts/components/AssembleBubbleChart/chartToken.js +17 -0
- package/src/components/charts/components/AssembleBubbleChart/handleOption.js +66 -0
- package/src/components/charts/components/AssembleBubbleChart/handleRootData.js +165 -0
- package/src/components/charts/components/AssembleBubbleChart/handleSeriesData.js +70 -0
- package/src/components/charts/components/AssembleBubbleChart/index.js +65 -0
- package/src/components/charts/components/AutonaviMapChart/index.js +162 -0
- package/src/components/charts/components/BaiduMapChart/index.js +148 -0
- package/src/components/charts/components/BarChart/barChartOption.js +76 -0
- package/src/components/charts/components/BarChart/chartToken.js +17 -0
- package/src/components/charts/components/BarChart/handleOptipn.js +102 -0
- package/src/components/charts/components/BarChart/handleSeries.js +716 -0
- package/src/components/charts/components/BarChart/handleVisualMap.js +48 -0
- package/src/components/charts/components/BarChart/index.js +151 -0
- package/src/components/charts/components/BaseChart/index.js +122 -0
- package/src/components/charts/components/BoxplotChart/chartToken.js +17 -0
- package/src/components/charts/components/BoxplotChart/handleOption.js +64 -0
- package/src/components/charts/components/BoxplotChart/handleSeries.js +150 -0
- package/src/components/charts/components/BoxplotChart/index.js +47 -0
- package/src/components/charts/components/BubbleChart/chartToken.js +17 -0
- package/src/components/charts/components/BubbleChart/handleData.js +33 -0
- package/src/components/charts/components/BubbleChart/handleOptipn.js +63 -0
- package/src/components/charts/components/BubbleChart/handleSeries.js +86 -0
- package/src/components/charts/components/BubbleChart/handleTrendLine.js +119 -0
- package/src/components/charts/components/BubbleChart/handleVisualMap.js +50 -0
- package/src/components/charts/components/BubbleChart/index.js +96 -0
- package/src/components/charts/components/BulletChart/bulletChartOption.js +82 -0
- package/src/components/charts/components/BulletChart/chartToken.js +17 -0
- package/src/components/charts/components/BulletChart/handleOptipn.js +74 -0
- package/src/components/charts/components/BulletChart/handleSeries.js +143 -0
- package/src/components/charts/components/BulletChart/index.js +93 -0
- package/src/components/charts/components/CandlestickChart/BaseOption.js +44 -0
- package/src/components/charts/components/CandlestickChart/chartToken.js +17 -0
- package/src/components/charts/components/CandlestickChart/hanleOption.js +130 -0
- package/src/components/charts/components/CandlestickChart/hanleSeries.js +123 -0
- package/src/components/charts/components/CandlestickChart/index.js +68 -0
- package/src/components/charts/components/CircleProcessChart/chartToken.js +17 -0
- package/src/components/charts/components/CircleProcessChart/handleOption.js +68 -0
- package/src/components/charts/components/CircleProcessChart/handleSeries.js +127 -0
- package/src/components/charts/components/CircleProcessChart/index.js +63 -0
- package/src/components/charts/components/FlowChart/Layout.js +211 -0
- package/src/components/charts/components/FlowChart/LineBezier.js +120 -0
- package/src/components/charts/components/FlowChart/LineDirect.js +42 -0
- package/src/components/charts/components/FlowChart/LineManager.js +278 -0
- package/src/components/charts/components/FlowChart/LineMode.js +44 -0
- package/src/components/charts/components/FlowChart/LineRound.js +335 -0
- package/src/components/charts/components/FlowChart/NodeManager.js +185 -0
- package/src/components/charts/components/FlowChart/dagre.js +8829 -0
- package/src/components/charts/components/FlowChart/frameworkFn.js +38 -0
- package/src/components/charts/components/FlowChart/index.js +268 -0
- package/src/components/charts/components/FlowChart/index.less +90 -0
- package/src/components/charts/components/FlowChart/insert.js +40 -0
- package/src/components/charts/components/FlowChart/util.js +43 -0
- package/src/components/charts/components/FunnelChart/chartToken.js +17 -0
- package/src/components/charts/components/FunnelChart/handleLegend.js +44 -0
- package/src/components/charts/components/FunnelChart/handleSeries.js +77 -0
- package/src/components/charts/components/FunnelChart/index.js +44 -0
- package/src/components/charts/components/GanttChart/CoordinateSystem.js +358 -0
- package/src/components/charts/components/GanttChart/TimeLine.js +379 -0
- package/src/components/charts/components/GanttChart/constant.js +71 -0
- package/src/components/charts/components/GanttChart/index.js +51 -0
- package/src/components/charts/components/GanttChart/index.less +267 -0
- package/src/components/charts/components/GanttChart/util.js +335 -0
- package/src/components/charts/components/GaugeChart/BaseOption.js +22 -0
- package/src/components/charts/components/GaugeChart/chartToken.js +17 -0
- package/src/components/charts/components/GaugeChart/handleOptipn.js +22 -0
- package/src/components/charts/components/GaugeChart/handleSeries.js +504 -0
- package/src/components/charts/components/GaugeChart/index.js +53 -0
- package/src/components/charts/components/GraphChart/index.js +34 -0
- package/src/components/charts/components/GraphTreeChart/BaseOption.js +42 -0
- package/src/components/charts/components/GraphTreeChart/handleData.js +118 -0
- package/src/components/charts/components/GraphTreeChart/handleOption.js +142 -0
- package/src/components/charts/components/GraphTreeChart/index.js +65 -0
- package/src/components/charts/components/GraphTreeChart/mixTree.js +36 -0
- package/src/components/charts/components/GraphTreeChart/utils.js +75 -0
- package/src/components/charts/components/HeatMapChart/BaseOption.js +66 -0
- package/src/components/charts/components/HeatMapChart/chartToken.js +17 -0
- package/src/components/charts/components/HeatMapChart/handleData.js +138 -0
- package/src/components/charts/components/HeatMapChart/handleOptipn.js +227 -0
- package/src/components/charts/components/HeatMapChart/handleSeries.js +82 -0
- package/src/components/charts/components/HeatMapChart/handleVisualMap.js +91 -0
- package/src/components/charts/components/HeatMapChart/index.js +70 -0
- package/src/components/charts/components/HillChart/baseOption.js +50 -0
- package/src/components/charts/components/HillChart/chartToken.js +17 -0
- package/src/components/charts/components/HillChart/handleOption.js +193 -0
- package/src/components/charts/components/HillChart/handleSeries.js +39 -0
- package/src/components/charts/components/HillChart/index.js +96 -0
- package/src/components/charts/components/HoneycombChart/NodeManager.js +172 -0
- package/src/components/charts/components/HoneycombChart/TipManager.js +75 -0
- package/src/components/charts/components/HoneycombChart/index.js +117 -0
- package/src/components/charts/components/HoneycombChart/index.less +49 -0
- package/src/components/charts/components/JadeJueChart/BaseOption.js +40 -0
- package/src/components/charts/components/JadeJueChart/chartToken.js +17 -0
- package/src/components/charts/components/JadeJueChart/handleOption.js +262 -0
- package/src/components/charts/components/JadeJueChart/handleSeries.js +246 -0
- package/src/components/charts/components/JadeJueChart/index.js +71 -0
- package/src/components/charts/components/JadeJueChart/labelFormatter.js +131 -0
- package/src/components/charts/components/LineChart/AreaChart/bottomArea.js +177 -0
- package/src/components/charts/components/LineChart/AreaChart/chartToken.js +17 -0
- package/src/components/charts/components/LineChart/AreaChart/index.js +18 -0
- package/src/components/charts/components/LineChart/AreaChart/topArea.js +139 -0
- package/src/components/charts/components/LineChart/chartToken.js +17 -0
- package/src/components/charts/components/LineChart/handleOptipn.js +145 -0
- package/src/components/charts/components/LineChart/handlePredict.js +73 -0
- package/src/components/charts/components/LineChart/handleSeries.js +266 -0
- package/src/components/charts/components/LineChart/handleVisualMap.js +138 -0
- package/src/components/charts/components/LineChart/index.js +133 -0
- package/src/components/charts/components/LiquidfillChart/chartToken.js +17 -0
- package/src/components/charts/components/LiquidfillChart/handleSeries.js +170 -0
- package/src/components/charts/components/LiquidfillChart/index.js +43 -0
- package/src/components/charts/components/LiquidfillChart/plugSeries.js +78 -0
- package/src/components/charts/components/LiquidfillChart/plugShape.js +163 -0
- package/src/components/charts/components/LiquidfillChart/plugView.js +537 -0
- package/src/components/charts/components/MilestoneChart/Layout.js +183 -0
- package/src/components/charts/components/MilestoneChart/Node.js +319 -0
- package/src/components/charts/components/MilestoneChart/assets/next.svg +7 -0
- package/src/components/charts/components/MilestoneChart/assets/prev.svg +7 -0
- package/src/components/charts/components/MilestoneChart/assets/prompt.svg +9 -0
- package/src/components/charts/components/MilestoneChart/index.js +108 -0
- package/src/components/charts/components/MilestoneChart/index.less +244 -0
- package/src/components/charts/components/MilestoneChart/insertDom.js +32 -0
- package/src/components/charts/components/MilestoneChart/insertIcon.js +24 -0
- package/src/components/charts/components/MilestoneChart/insertSvg.js +109 -0
- package/src/components/charts/components/OrganizationChart/NodeManager.js +188 -0
- package/src/components/charts/components/OrganizationChart/RotateManager.js +349 -0
- package/src/components/charts/components/OrganizationChart/index.js +124 -0
- package/src/components/charts/components/OrganizationChart/index.less +112 -0
- package/src/components/charts/components/PieChart/chartToken.js +17 -0
- package/src/components/charts/components/PieChart/handleLabel.js +94 -0
- package/src/components/charts/components/PieChart/handleMulti.js +131 -0
- package/src/components/charts/components/PieChart/handleSeries.js +236 -0
- package/src/components/charts/components/PieChart/index.js +58 -0
- package/src/components/charts/components/PolarBarChart/chartToken.js +17 -0
- package/src/components/charts/components/PolarBarChart/handleOption.js +102 -0
- package/src/components/charts/components/PolarBarChart/handleSeries.js +127 -0
- package/src/components/charts/components/PolarBarChart/index.js +62 -0
- package/src/components/charts/components/ProcessChart/BaseOption.js +296 -0
- package/src/components/charts/components/ProcessChart/chartToken.js +17 -0
- package/src/components/charts/components/ProcessChart/handleData.js +156 -0
- package/src/components/charts/components/ProcessChart/handleOption.js +212 -0
- package/src/components/charts/components/ProcessChart/handleSeries.js +369 -0
- package/src/components/charts/components/ProcessChart/index.js +76 -0
- package/src/components/charts/components/RadarChart/BaseOption.js +248 -0
- package/src/components/charts/components/RadarChart/GradientRadar/index.js +421 -0
- package/src/components/charts/components/RadarChart/chartToken.js +17 -0
- package/src/components/charts/components/RadarChart/handleOptipn.js +316 -0
- package/src/components/charts/components/RadarChart/handleSeries.js +120 -0
- package/src/components/charts/components/RadarChart/index.js +77 -0
- package/src/components/charts/components/RegionChart/chartToken.js +17 -0
- package/src/components/charts/components/RegionChart/handleOption.js +29 -0
- package/src/components/charts/components/RegionChart/index.js +49 -0
- package/src/components/charts/components/RiverChart/Belt.js +181 -0
- package/src/components/charts/components/RiverChart/Manager.js +173 -0
- package/src/components/charts/components/RiverChart/Node.js +425 -0
- package/src/components/charts/components/RiverChart/baseOption.js +51 -0
- package/src/components/charts/components/RiverChart/index.js +79 -0
- package/src/components/charts/components/RiverChart/index.less +42 -0
- package/src/components/charts/components/RiverChart/util.js +160 -0
- package/src/components/charts/components/SankeyChart/BaseOption.js +74 -0
- package/src/components/charts/components/SankeyChart/chartToken.js +17 -0
- package/src/components/charts/components/SankeyChart/handleOption.js +258 -0
- package/src/components/charts/components/SankeyChart/index.js +111 -0
- package/src/components/charts/components/SankeyChart/tooltip.js +53 -0
- package/src/components/charts/components/ScatterChart/chartToken.js +17 -0
- package/src/components/charts/components/ScatterChart/handleMarkPoint.js +74 -0
- package/src/components/charts/components/ScatterChart/handleOptipn.js +66 -0
- package/src/components/charts/components/ScatterChart/handleSeries.js +48 -0
- package/src/components/charts/components/ScatterChart/index.js +60 -0
- package/src/components/charts/components/SnowFlakeChart/BranchManager.js +324 -0
- package/src/components/charts/components/SnowFlakeChart/CommonConstant.js +111 -0
- package/src/components/charts/components/SnowFlakeChart/LeafManager.js +76 -0
- package/src/components/charts/components/SnowFlakeChart/NodeManager.js +240 -0
- package/src/components/charts/components/SnowFlakeChart/TagManager.js +80 -0
- package/src/components/charts/components/SnowFlakeChart/assets/down.svg +8 -0
- package/src/components/charts/components/SnowFlakeChart/assets/errorBg-leaf.png +0 -0
- package/src/components/charts/components/SnowFlakeChart/assets/errorBg.png +0 -0
- package/src/components/charts/components/SnowFlakeChart/assets/image2L.svg +7 -0
- package/src/components/charts/components/SnowFlakeChart/assets/image2R.svg +7 -0
- package/src/components/charts/components/SnowFlakeChart/assets/image5L.svg +7 -0
- package/src/components/charts/components/SnowFlakeChart/assets/image5R.svg +7 -0
- package/src/components/charts/components/SnowFlakeChart/assets/normalBg-leaf.png +0 -0
- package/src/components/charts/components/SnowFlakeChart/assets/normalBg.png +0 -0
- package/src/components/charts/components/SnowFlakeChart/assets/outerBorder.svg +24 -0
- package/src/components/charts/components/SnowFlakeChart/assets/outerBorderOverAll.svg +18 -0
- package/src/components/charts/components/SnowFlakeChart/assets/up.svg +8 -0
- package/src/components/charts/components/SnowFlakeChart/assets/warningBg-leaf.png +0 -0
- package/src/components/charts/components/SnowFlakeChart/assets/warningBg.png +0 -0
- package/src/components/charts/components/SnowFlakeChart/assets/wirelessL.svg +7 -0
- package/src/components/charts/components/SnowFlakeChart/assets/wirelessR.svg +7 -0
- package/src/components/charts/components/SnowFlakeChart/defaultOption.js +285 -0
- package/src/components/charts/components/SnowFlakeChart/index.js +408 -0
- package/src/components/charts/components/SnowFlakeChart/index.less +503 -0
- package/src/components/charts/components/SnowFlakeChart/line/LineArrow.js +62 -0
- package/src/components/charts/components/SnowFlakeChart/line/LineDashed.js +29 -0
- package/src/components/charts/components/SnowFlakeChart/line/LineDotted.js +29 -0
- package/src/components/charts/components/SnowFlakeChart/line/LineStraight.js +28 -0
- package/src/components/charts/components/SnowFlakeChart/line/index.js +202 -0
- package/src/components/charts/components/SnowFlakeChart/util.js +430 -0
- package/src/components/charts/components/SunburstChart/chartToken.js +17 -0
- package/src/components/charts/components/SunburstChart/handleSeries.js +48 -0
- package/src/components/charts/components/SunburstChart/index.js +41 -0
- package/src/components/charts/components/TerraceChart/defaultGradient.js +116 -0
- package/src/components/charts/components/TerraceChart/defaultPath.js +30 -0
- package/src/components/charts/components/TerraceChart/index.js +276 -0
- package/src/components/charts/components/TerraceChart/index.less +171 -0
- package/src/components/charts/components/TerraceChart/insert.js +35 -0
- package/src/components/charts/components/TerraceChart/loading.js +34 -0
- package/src/components/charts/components/TimelineChart/chartToken.js +17 -0
- package/src/components/charts/components/TimelineChart/index.js +109 -0
- package/src/components/charts/components/TimelineChart/index.less +152 -0
- package/src/components/charts/components/TimelineChart/insertDom.js +45 -0
- package/src/components/charts/components/TimelineChart/timeline.js +461 -0
- package/src/components/charts/components/TreeChart/chartToken.js +17 -0
- package/src/components/charts/components/TreeChart/handleOptipn.js +101 -0
- package/src/components/charts/components/TreeChart/handleSeries.js +148 -0
- package/src/components/charts/components/TreeChart/index.js +50 -0
- package/src/components/charts/components/TreeMapChart/handleOptipn.js +57 -0
- package/src/components/charts/components/TreeMapChart/handleSeries.js +57 -0
- package/src/components/charts/components/TreeMapChart/handleVisualMap.js +31 -0
- package/src/components/charts/components/TreeMapChart/index.js +56 -0
- package/src/components/charts/components/WaveChart/chartToken.js +17 -0
- package/src/components/charts/components/WaveChart/index.js +418 -0
- package/src/components/charts/components/WaveChart/index.less +77 -0
- package/src/components/charts/components/WaveChart/insert.js +38 -0
- package/src/components/charts/components/WaveChart/loading.js +34 -0
- package/src/components/charts/components/WordCloudChart/BaseOption.js +19 -0
- package/src/components/charts/components/WordCloudChart/chartToken.js +17 -0
- package/src/components/charts/components/WordCloudChart/handleOptipn.js +20 -0
- package/src/components/charts/components/WordCloudChart/handleSeries.js +106 -0
- package/src/components/charts/components/WordCloudChart/index.js +67 -0
- package/src/components/charts/core.js +386 -0
- package/src/components/charts/feature/adaptive/index.js +46 -0
- package/src/components/charts/feature/adaptive/series/AssembleBubbleChart.js +22 -0
- package/src/components/charts/feature/adaptive/series/BarChart.js +27 -0
- package/src/components/charts/feature/adaptive/series/BoxplotChart.js +26 -0
- package/src/components/charts/feature/adaptive/series/BubbleChart.js +26 -0
- package/src/components/charts/feature/adaptive/series/BulletChart.js +27 -0
- package/src/components/charts/feature/adaptive/series/CircleProcessChart.js +25 -0
- package/src/components/charts/feature/adaptive/series/FunnelChart.js +22 -0
- package/src/components/charts/feature/adaptive/series/HeatMapChart.js +26 -0
- package/src/components/charts/feature/adaptive/series/JadeJueChart.js +24 -0
- package/src/components/charts/feature/adaptive/series/LineChart.js +26 -0
- package/src/components/charts/feature/adaptive/series/LiquidfillChart.js +26 -0
- package/src/components/charts/feature/adaptive/series/PieChart.js +25 -0
- package/src/components/charts/feature/adaptive/series/PolarBarChart.js +22 -0
- package/src/components/charts/feature/adaptive/series/ScatterChart.js +26 -0
- package/src/components/charts/feature/adaptive/series/SunburstChart.js +25 -0
- package/src/components/charts/feature/adaptive/utils/axis.js +26 -0
- package/src/components/charts/feature/adaptive/utils/label.js +30 -0
- package/src/components/charts/feature/adaptive/utils/legend.js +30 -0
- package/src/components/charts/feature/adaptive/utils/title.js +30 -0
- package/src/components/charts/feature/adaptive/utils/tooltip.js +30 -0
- package/src/components/charts/feature/axistip/index.js +116 -0
- package/src/components/charts/feature/card/chartToken.js +17 -0
- package/src/components/charts/feature/card/index.js +225 -0
- package/src/components/charts/feature/card/index.less +166 -0
- package/src/components/charts/feature/drag/index.js +353 -0
- package/src/components/charts/feature/drag/index.less +53 -0
- package/src/components/charts/feature/equalLabel/index.js +63 -0
- package/src/components/charts/feature/expandLegend/constants.js +22 -0
- package/src/components/charts/feature/expandLegend/index.js +190 -0
- package/src/components/charts/feature/expandLegend/index.less +1044 -0
- package/src/components/charts/feature/expandLegend/mutiSelect/constants.js +40 -0
- package/src/components/charts/feature/expandLegend/mutiSelect/index.js +157 -0
- package/src/components/charts/feature/expandLegend/mutiSelect/item.js +133 -0
- package/src/components/charts/feature/expandLegend/mutiSelect/position.js +44 -0
- package/src/components/charts/feature/expandLegend/mutiSelect/search.js +79 -0
- package/src/components/charts/feature/expandLegend/mutiSelectLegend/constants.js +41 -0
- package/src/components/charts/feature/expandLegend/mutiSelectLegend/group.js +112 -0
- package/src/components/charts/feature/expandLegend/mutiSelectLegend/index.js +97 -0
- package/src/components/charts/feature/expandLegend/mutiSelectLegend/item.js +115 -0
- package/src/components/charts/feature/expandLegend/mutiSelectLegend/more.js +101 -0
- package/src/components/charts/feature/expandLegend/mutiSelectLegend/paging.js +103 -0
- package/src/components/charts/feature/expandLegend/mutiSelectLegend/scroll.js +33 -0
- package/src/components/charts/feature/expandLegend/mutiSelectList/constants.js +34 -0
- package/src/components/charts/feature/expandLegend/mutiSelectList/index.js +181 -0
- package/src/components/charts/feature/expandLegend/mutiSelectList/statisticList.js +146 -0
- package/src/components/charts/feature/expandLegend/singleSelect/constants.js +40 -0
- package/src/components/charts/feature/expandLegend/singleSelect/index.js +170 -0
- package/src/components/charts/feature/expandLegend/singleSelect/item.js +74 -0
- package/src/components/charts/feature/expandLegend/singleSelect/position.js +34 -0
- package/src/components/charts/feature/expandLegend/singleSelect/search.js +76 -0
- package/src/components/charts/feature/expandLegend/singleSelectLegend/constants.js +41 -0
- package/src/components/charts/feature/expandLegend/singleSelectLegend/group.js +116 -0
- package/src/components/charts/feature/expandLegend/singleSelectLegend/index.js +97 -0
- package/src/components/charts/feature/expandLegend/singleSelectLegend/item.js +113 -0
- package/src/components/charts/feature/expandLegend/singleSelectLegend/more.js +40 -0
- package/src/components/charts/feature/expandLegend/singleSelectLegend/scroll.js +33 -0
- package/src/components/charts/feature/expandLegend/tips/constants.js +21 -0
- package/src/components/charts/feature/expandLegend/tips/index.js +168 -0
- package/src/components/charts/feature/fluctuation/index.js +65 -0
- package/src/components/charts/feature/linter/dialog/index.js +111 -0
- package/src/components/charts/feature/linter/index.js +131 -0
- package/src/components/charts/feature/linter/lints/charts/Bar.js +46 -0
- package/src/components/charts/feature/linter/lints/charts/Line.js +31 -0
- package/src/components/charts/feature/linter/lints/charts/Pie.js +39 -0
- package/src/components/charts/feature/linter/lints/charts/Radar.js +38 -0
- package/src/components/charts/feature/linter/lints/charts/index.js +37 -0
- package/src/components/charts/feature/linter/lints/modules/angleAxis.js +47 -0
- package/src/components/charts/feature/linter/lints/modules/color.js +19 -0
- package/src/components/charts/feature/linter/lints/modules/dataZoom.js +52 -0
- package/src/components/charts/feature/linter/lints/modules/index.js +64 -0
- package/src/components/charts/feature/linter/lints/modules/legend.js +64 -0
- package/src/components/charts/feature/linter/lints/modules/radar.js +59 -0
- package/src/components/charts/feature/linter/lints/modules/radiusAxis.js +49 -0
- package/src/components/charts/feature/linter/lints/modules/title.js +44 -0
- package/src/components/charts/feature/linter/lints/modules/tooltip.js +29 -0
- package/src/components/charts/feature/linter/lints/modules/util.js +97 -0
- package/src/components/charts/feature/linter/lints/modules/xAxis.js +52 -0
- package/src/components/charts/feature/linter/lints/modules/yAxis.js +52 -0
- package/src/components/charts/feature/mediaScreen/index.js +95 -0
- package/src/components/charts/feature/mini/miniBarChart.js +58 -0
- package/src/components/charts/feature/mini/miniCircleProcessChart.js +32 -0
- package/src/components/charts/feature/mini/miniLineChart.js +58 -0
- package/src/components/charts/feature/mini/miniProcessChart.js +64 -0
- package/src/components/charts/feature/nodeRender/angular-node.js +100 -0
- package/src/components/charts/feature/nodeRender/index.js +31 -0
- package/src/components/charts/feature/nodeRender/react-node.js +83 -0
- package/src/components/charts/feature/nodeRender/vue-node.js +109 -0
- package/src/components/charts/feature/performance/lttb.js +85 -0
- package/src/components/charts/feature/readScreen/index.js +19 -0
- package/src/components/charts/feature/token/color/bpit/dark.js +67 -0
- package/src/components/charts/feature/token/color/bpit/index.js +20 -0
- package/src/components/charts/feature/token/color/bpit/light.js +66 -0
- package/src/components/charts/feature/token/color/cloud/board-dark.js +260 -0
- package/src/components/charts/feature/token/color/cloud/board.js +276 -0
- package/src/components/charts/feature/token/color/cloud/dark.js +78 -0
- package/src/components/charts/feature/token/color/cloud/index.js +20 -0
- package/src/components/charts/feature/token/color/cloud/light.js +77 -0
- package/src/components/charts/feature/token/color/hdesign/board.js +204 -0
- package/src/components/charts/feature/token/color/hdesign/dark.js +78 -0
- package/src/components/charts/feature/token/color/hdesign/index.js +20 -0
- package/src/components/charts/feature/token/color/hdesign/light.js +79 -0
- package/src/components/charts/feature/token/color/ict/board.js +190 -0
- package/src/components/charts/feature/token/color/ict/dark.js +61 -0
- package/src/components/charts/feature/token/color/ict/index.js +20 -0
- package/src/components/charts/feature/token/color/ict/light.js +62 -0
- package/src/components/charts/feature/token/color/index.js +29 -0
- package/src/components/charts/feature/token/color/util.js +42 -0
- package/src/components/charts/feature/token/factory/chartsToken/AreaChart.js +20 -0
- package/src/components/charts/feature/token/factory/chartsToken/AssembleBubbleChart.js +26 -0
- package/src/components/charts/feature/token/factory/chartsToken/BarChart.js +27 -0
- package/src/components/charts/feature/token/factory/chartsToken/BoxplotChart.js +27 -0
- package/src/components/charts/feature/token/factory/chartsToken/BubbleChart.js +22 -0
- package/src/components/charts/feature/token/factory/chartsToken/BulletChart.js +23 -0
- package/src/components/charts/feature/token/factory/chartsToken/CandlestickChart.js +20 -0
- package/src/components/charts/feature/token/factory/chartsToken/ChartCard.js +33 -0
- package/src/components/charts/feature/token/factory/chartsToken/CircleProcessChart.js +23 -0
- package/src/components/charts/feature/token/factory/chartsToken/FunnelChart.js +26 -0
- package/src/components/charts/feature/token/factory/chartsToken/GaugeChart.js +27 -0
- package/src/components/charts/feature/token/factory/chartsToken/HeatMapChart.js +21 -0
- package/src/components/charts/feature/token/factory/chartsToken/HillChart.js +21 -0
- package/src/components/charts/feature/token/factory/chartsToken/JadeJueChart.js +28 -0
- package/src/components/charts/feature/token/factory/chartsToken/LineChart.js +36 -0
- package/src/components/charts/feature/token/factory/chartsToken/LiquidfillChart.js +22 -0
- package/src/components/charts/feature/token/factory/chartsToken/PieChart.js +49 -0
- package/src/components/charts/feature/token/factory/chartsToken/PolarBarChart.js +22 -0
- package/src/components/charts/feature/token/factory/chartsToken/ProcessChart.js +40 -0
- package/src/components/charts/feature/token/factory/chartsToken/RadarChart.js +36 -0
- package/src/components/charts/feature/token/factory/chartsToken/RegionChart.js +20 -0
- package/src/components/charts/feature/token/factory/chartsToken/SankeyChart.js +22 -0
- package/src/components/charts/feature/token/factory/chartsToken/ScatterChart.js +21 -0
- package/src/components/charts/feature/token/factory/chartsToken/SunburstChart.js +22 -0
- package/src/components/charts/feature/token/factory/chartsToken/TimelineChart.js +21 -0
- package/src/components/charts/feature/token/factory/chartsToken/TreeChart.js +21 -0
- package/src/components/charts/feature/token/factory/chartsToken/WaveChart.js +23 -0
- package/src/components/charts/feature/token/factory/chartsToken/WordCloudChart.js +21 -0
- package/src/components/charts/feature/token/factory/chartsToken/index.js +79 -0
- package/src/components/charts/feature/token/factory/getAliasToken.js +41 -0
- package/src/components/charts/feature/token/factory/getExportColors.js +46 -0
- package/src/components/charts/feature/token/factory/getGlobalToken.js +25 -0
- package/src/components/charts/feature/token/factory/getModelToken.js +389 -0
- package/src/components/charts/feature/token/factory/getSceneToken.js +41 -0
- package/src/components/charts/feature/token/factory/globalToken/border.js +21 -0
- package/src/components/charts/feature/token/factory/globalToken/borderRadius.js +22 -0
- package/src/components/charts/feature/token/factory/globalToken/font.js +26 -0
- package/src/components/charts/feature/token/factory/globalToken/index.js +28 -0
- package/src/components/charts/feature/token/factory/globalToken/lineType.js +19 -0
- package/src/components/charts/feature/token/factory/globalToken/size.js +22 -0
- package/src/components/charts/feature/token/factory/globalToken/space.js +25 -0
- package/src/components/charts/feature/token/factory/index.js +39 -0
- package/src/components/charts/feature/token/factory/mergeToken.js +72 -0
- package/src/components/charts/feature/token/index.js +176 -0
- package/src/components/charts/feature/token/readme.md +11 -0
- package/src/components/charts/feature/token/theme/bpit/index.js +19 -0
- package/src/components/charts/feature/token/theme/cloud/getAliasToken.js +247 -0
- package/src/components/charts/feature/token/theme/cloud/getSceneToken.js +74 -0
- package/src/components/charts/feature/token/theme/cloud/index.js +19 -0
- package/src/components/charts/feature/token/theme/hdesign/getAliasToken.js +249 -0
- package/src/components/charts/feature/token/theme/hdesign/getSceneToken.js +75 -0
- package/src/components/charts/feature/token/theme/hdesign/index.js +19 -0
- package/src/components/charts/feature/token/theme/ict/getAliasToken.js +249 -0
- package/src/components/charts/feature/token/theme/ict/getSceneToken.js +72 -0
- package/src/components/charts/feature/token/theme/ict/index.js +19 -0
- package/src/components/charts/feature/wcag/index.js +335 -0
- package/src/components/charts/feature/xss/index.js +52 -0
- package/src/components/charts/framework/charts/CircleArcChart/index.js +142 -0
- package/src/components/charts/framework/charts/CircleChart/index.js +140 -0
- package/src/components/charts/framework/charts/CustomizeChart/index.js +166 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/index.js +141 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/initDom.js +20 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/Node.js +148 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/center.js +71 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/collide.js +151 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/constant.js +17 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/dispatch.js +95 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/index.js +19 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/jiggle.js +16 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/lcg.js +23 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/link.js +128 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/manyBody.js +127 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/quadtree.js +393 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/radial.js +68 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/simulation.js +171 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/timer.js +121 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/x.js +52 -0
- package/src/components/charts/framework/charts/ForceDirectedChart/libs/y.js +52 -0
- package/src/components/charts/framework/charts/GridChart/index.js +174 -0
- package/src/components/charts/framework/charts/LinearArcChart/index.js +143 -0
- package/src/components/charts/framework/charts/MindmapChart/index.js +166 -0
- package/src/components/charts/framework/charts/MindmapChart/index.less +85 -0
- package/src/components/charts/framework/core/Base.js +53 -0
- package/src/components/charts/framework/core/Relation.js +78 -0
- package/src/components/charts/framework/module/animation/Animate.js +434 -0
- package/src/components/charts/framework/module/animation/Animation.js +76 -0
- package/src/components/charts/framework/module/animation/AnimationGroup.js +137 -0
- package/src/components/charts/framework/module/animation/Easing.js +225 -0
- package/src/components/charts/framework/module/animation/Interpolation.js +88 -0
- package/src/components/charts/framework/module/animation/index.js +20 -0
- package/src/components/charts/framework/module/arrow/Manager.js +133 -0
- package/src/components/charts/framework/module/arrow/index.js +96 -0
- package/src/components/charts/framework/module/canvas/grid.js +288 -0
- package/src/components/charts/framework/module/canvas/index.js +434 -0
- package/src/components/charts/framework/module/canvas/index.less +102 -0
- package/src/components/charts/framework/module/canvas/initDom.js +66 -0
- package/src/components/charts/framework/module/canvas/tool.js +62 -0
- package/src/components/charts/framework/module/connector/Manager.js +103 -0
- package/src/components/charts/framework/module/connector/index.js +99 -0
- package/src/components/charts/framework/module/connector/index.less +36 -0
- package/src/components/charts/framework/module/connector/type/dot.js +21 -0
- package/src/components/charts/framework/module/connector/type/expand.js +211 -0
- package/src/components/charts/framework/module/contextmenu/index.js +149 -0
- package/src/components/charts/framework/module/contextmenu/index.less +40 -0
- package/src/components/charts/framework/module/data/Manager.js +56 -0
- package/src/components/charts/framework/module/data/index.js +0 -0
- package/src/components/charts/framework/module/legend/Item.js +218 -0
- package/src/components/charts/framework/module/legend/constants.js +14 -0
- package/src/components/charts/framework/module/legend/getSymbol.js +86 -0
- package/src/components/charts/framework/module/legend/index.js +119 -0
- package/src/components/charts/framework/module/legend/util.js +81 -0
- package/src/components/charts/framework/module/line/Animation.js +125 -0
- package/src/components/charts/framework/module/line/Manager.js +299 -0
- package/src/components/charts/framework/module/line/Tag.js +61 -0
- package/src/components/charts/framework/module/line/bufferRender.js +74 -0
- package/src/components/charts/framework/module/line/cross/pathPoints.js +233 -0
- package/src/components/charts/framework/module/line/cross/vectorUtil.js +67 -0
- package/src/components/charts/framework/module/line/customize.js +29 -0
- package/src/components/charts/framework/module/line/index.js +260 -0
- package/src/components/charts/framework/module/line/index.less +24 -0
- package/src/components/charts/framework/module/line/type/Bezier.js +90 -0
- package/src/components/charts/framework/module/line/type/Circle.js +38 -0
- package/src/components/charts/framework/module/line/type/Direct.js +23 -0
- package/src/components/charts/framework/module/line/type/Ellipse.js +88 -0
- package/src/components/charts/framework/module/line/type/Round.js +245 -0
- package/src/components/charts/framework/module/lineLayout/CircleShape/calculate.js +71 -0
- package/src/components/charts/framework/module/lineLayout/CircleShape/index.js +32 -0
- package/src/components/charts/framework/module/lineLayout/CircleShape/init.js +34 -0
- package/src/components/charts/framework/module/lineLayout/RectShape/calculate.js +174 -0
- package/src/components/charts/framework/module/lineLayout/RectShape/index.js +43 -0
- package/src/components/charts/framework/module/lineLayout/RectShape/init.js +79 -0
- package/src/components/charts/framework/module/lineLayout/RectShape/sharing.js +57 -0
- package/src/components/charts/framework/module/lineLayout/index.js +30 -0
- package/src/components/charts/framework/module/node/Manager.js +190 -0
- package/src/components/charts/framework/module/node/bufferRender.js +73 -0
- package/src/components/charts/framework/module/node/convertData/index.js +24 -0
- package/src/components/charts/framework/module/node/convertData/returnSelf.js +16 -0
- package/src/components/charts/framework/module/node/convertData/transform.js +24 -0
- package/src/components/charts/framework/module/node/convertData/treeToLink.js +36 -0
- package/src/components/charts/framework/module/node/index.js +187 -0
- package/src/components/charts/framework/module/nodeLayout/circle/excute.js +270 -0
- package/src/components/charts/framework/module/nodeLayout/circle/index.js +24 -0
- package/src/components/charts/framework/module/nodeLayout/customize/index.js +16 -0
- package/src/components/charts/framework/module/nodeLayout/defaults/excute.js +27 -0
- package/src/components/charts/framework/module/nodeLayout/defaults/index.js +20 -0
- package/src/components/charts/framework/module/nodeLayout/grid/excute.js +392 -0
- package/src/components/charts/framework/module/nodeLayout/grid/index.js +20 -0
- package/src/components/charts/framework/module/nodeLayout/index.js +27 -0
- package/src/components/charts/framework/module/nodeLayout/linearArc/index.js +34 -0
- package/src/components/charts/framework/module/nodeLayout/nonLayeredTidyTree/NodeBox.js +165 -0
- package/src/components/charts/framework/module/nodeLayout/nonLayeredTidyTree/algorithm.js +261 -0
- package/src/components/charts/framework/module/nodeLayout/nonLayeredTidyTree/index.js +278 -0
- package/src/components/charts/framework/module/readme.js +127 -0
- package/src/components/charts/index.js +65 -0
- package/src/components/charts/index.less +29 -0
- package/src/components/charts/option/PolarSys/index.js +43 -0
- package/src/components/charts/option/RectSys/index.js +58 -0
- package/src/components/charts/option/base/index.js +25 -0
- package/src/components/charts/option/config/angleAxis/base.js +56 -0
- package/src/components/charts/option/config/angleAxis/index.js +43 -0
- package/src/components/charts/option/config/animation/index.js +64 -0
- package/src/components/charts/option/config/datazoom/base.js +123 -0
- package/src/components/charts/option/config/datazoom/index.js +61 -0
- package/src/components/charts/option/config/grid/base.js +22 -0
- package/src/components/charts/option/config/grid/index.js +32 -0
- package/src/components/charts/option/config/legend/base.js +80 -0
- package/src/components/charts/option/config/legend/icon.js +21 -0
- package/src/components/charts/option/config/legend/index.js +63 -0
- package/src/components/charts/option/config/legend/itemStyle.js +17 -0
- package/src/components/charts/option/config/legend/ldata.js +29 -0
- package/src/components/charts/option/config/legend/pageIcon.js +54 -0
- package/src/components/charts/option/config/legend/position.js +19 -0
- package/src/components/charts/option/config/legend/size.js +17 -0
- package/src/components/charts/option/config/legend/textStyle.js +16 -0
- package/src/components/charts/option/config/mark/index.js +74 -0
- package/src/components/charts/option/config/polar/base.js +30 -0
- package/src/components/charts/option/config/polar/index.js +36 -0
- package/src/components/charts/option/config/polarTitle/base.js +40 -0
- package/src/components/charts/option/config/polarTitle/index.js +52 -0
- package/src/components/charts/option/config/polarTitle/subtextStyle.js +21 -0
- package/src/components/charts/option/config/polarTitle/textStyle.js +22 -0
- package/src/components/charts/option/config/radiusAxis/base.js +55 -0
- package/src/components/charts/option/config/radiusAxis/index.js +41 -0
- package/src/components/charts/option/config/rectTitle/base.js +31 -0
- package/src/components/charts/option/config/rectTitle/index.js +53 -0
- package/src/components/charts/option/config/toolbox/base.js +42 -0
- package/src/components/charts/option/config/toolbox/index.js +12 -0
- package/src/components/charts/option/config/tooltip/axisPointer.js +31 -0
- package/src/components/charts/option/config/tooltip/base.js +62 -0
- package/src/components/charts/option/config/tooltip/formatter.js +64 -0
- package/src/components/charts/option/config/tooltip/index.js +41 -0
- package/src/components/charts/option/config/visualMap/index.js +91 -0
- package/src/components/charts/option/config/xAxis/axisLabel.js +35 -0
- package/src/components/charts/option/config/xAxis/axisLine.js +29 -0
- package/src/components/charts/option/config/xAxis/axisMargin.js +31 -0
- package/src/components/charts/option/config/xAxis/base.js +66 -0
- package/src/components/charts/option/config/xAxis/boundaryGap.js +17 -0
- package/src/components/charts/option/config/xAxis/index.js +52 -0
- package/src/components/charts/option/config/xAxis/name.js +18 -0
- package/src/components/charts/option/config/xAxis/xdata.js +23 -0
- package/src/components/charts/option/config/xAxis/xkey.js +21 -0
- package/src/components/charts/option/config/yAxis/axisOptimization.js +32 -0
- package/src/components/charts/option/config/yAxis/base.js +59 -0
- package/src/components/charts/option/config/yAxis/index.js +68 -0
- package/src/components/charts/option/config/yAxis/ydata.js +28 -0
- package/src/components/charts/option/init/index.js +204 -0
- package/src/components/charts/register.js +178 -0
- package/src/components/charts/theme.js +62 -0
- package/src/components/charts/util/Sequence.js +21 -0
- package/src/components/charts/util/centerDom.js +92 -0
- package/src/components/charts/util/cloneDeep.js +29 -0
- package/src/components/charts/util/color.js +193 -0
- package/src/components/charts/util/constants.js +125 -0
- package/src/components/charts/util/convert.js +49 -0
- package/src/components/charts/util/debounce.js +24 -0
- package/src/components/charts/util/defendXSS.js +81 -0
- package/src/components/charts/util/dom.js +90 -0
- package/src/components/charts/util/equal.js +62 -0
- package/src/components/charts/util/event.js +25 -0
- package/src/components/charts/util/hashMap.js +111 -0
- package/src/components/charts/util/init/insert.js +165 -0
- package/src/components/charts/util/math.js +183 -0
- package/src/components/charts/util/merge.js +78 -0
- package/src/components/charts/util/paint.js +98 -0
- package/src/components/charts/util/sort/max.js +64 -0
- package/src/components/charts/util/sort/min.js +64 -0
- package/src/components/charts/util/throttle.js +34 -0
- package/src/components/charts/util/tips.js +25 -0
- package/src/components/charts/util/type.js +46 -0
- package/src/components/ebiz-form/components/cascader.vue +61 -0
- package/src/components/ebiz-form/components/checkbox.vue +37 -0
- package/src/components/ebiz-form/components/city.vue +137 -0
- package/src/components/ebiz-form/components/date-panel.vue +52 -0
- package/src/components/ebiz-form/components/date-range-panel.vue +52 -0
- package/src/components/ebiz-form/components/date-range.vue +56 -0
- package/src/components/ebiz-form/components/date.vue +52 -0
- package/src/components/ebiz-form/components/editor-multi-language.vue +47 -0
- package/src/components/ebiz-form/components/editor.vue +78 -0
- package/src/components/ebiz-form/components/file-multi-language.vue +52 -0
- package/src/components/ebiz-form/components/file.vue +149 -0
- package/src/components/ebiz-form/components/images-multi-language.vue +52 -0
- package/src/components/ebiz-form/components/images.vue +129 -0
- package/src/components/ebiz-form/components/img-multi-language.vue +51 -0
- package/src/components/ebiz-form/components/img.vue +129 -0
- package/src/components/ebiz-form/components/number.vue +50 -0
- package/src/components/ebiz-form/components/radio.vue +28 -0
- package/src/components/ebiz-form/components/select.vue +119 -0
- package/src/components/ebiz-form/components/switch.vue +23 -0
- package/src/components/ebiz-form/components/text-multi-language.vue +47 -0
- package/src/components/ebiz-form/components/text.vue +52 -0
- package/src/components/ebiz-form/components/textarea-multi-language.vue +48 -0
- package/src/components/ebiz-form/components/textarea.vue +29 -0
- package/src/components/ebiz-form/components/video-multi-language.vue +51 -0
- package/src/components/ebiz-form/components/video.vue +97 -0
- package/src/components/ebiz-form/index.vue +157 -0
- package/src/components/icons/IconCommunity.vue +7 -0
- package/src/components/icons/IconDocumentation.vue +7 -0
- package/src/components/icons/IconEcosystem.vue +7 -0
- package/src/components/icons/IconSupport.vue +7 -0
- package/src/components/icons/IconTooling.vue +19 -0
- package/src/index.js +84 -0
- package/src/main.js +57 -0
- package/src/router/index.js +155 -0
- package/src/utils/formatCode.js +24 -0
- package/src/utils/generateImportStatement.js +52 -0
- package/src/utils/hasJsx.js +25 -0
- package/src/utils/index.js +166 -0
- package/src/utils/mergeOptions.js +29 -0
- package/src/utils/parseRequiredBlocks.js +18 -0
- package/src/utils/upload.ts +126 -0
- package/src/utils/vue-sfc-validator.js +155 -0
- package/src/views/Button.vue +20 -0
- package/src/views/DataContainer.vue +20 -0
- package/src/views/EbizSpace.vue +186 -0
- package/src/views/EbizSwiper.vue +158 -0
- package/src/views/Form.vue +20 -0
- package/src/views/Home.vue +79 -0
- package/src/views/Mindmap.vue +20 -0
- package/src/views/MyComponent.vue +20 -0
- package/src/views/OkrTree.vue +20 -0
- package/src/views/RemoteSelect.vue +20 -0
- package/src/views/Table.vue +20 -0
- package/src/views/TagDemo.vue +102 -0
- package/src/views/TdesignButton.vue +191 -0
- package/src/views/TdesignCalendar.vue +95 -0
- package/src/views/TdesignCard.vue +297 -0
- package/src/views/TdesignCollapse.vue +294 -0
- package/src/views/TdesignDatePicker.vue +188 -0
- package/src/views/TdesignForm.vue +249 -0
- package/src/views/TdesignIcon.vue +204 -0
- package/src/views/TdesignImage.vue +216 -0
- package/src/views/TdesignImageViewer.vue +199 -0
- package/src/views/TdesignInput.vue +253 -0
- package/src/views/TdesignSelect.vue +474 -0
- package/src/views/TdesignSwiper.vue +158 -0
- package/src/views/Title.vue +20 -0
@@ -0,0 +1,103 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2024 - present OpenTiny HUICharts Authors.
|
3
|
+
* Copyright (c) 2024 - present Huawei Cloud Computing Technologies Co., Ltd.
|
4
|
+
*
|
5
|
+
* Use of this source code is governed by an MIT-style license.
|
6
|
+
*
|
7
|
+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
8
|
+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
9
|
+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
10
|
+
*
|
11
|
+
*/
|
12
|
+
import Connector from './index';
|
13
|
+
|
14
|
+
class ConnectorManager{
|
15
|
+
constructor(chartInstance, lineData, option){
|
16
|
+
// 所有数据
|
17
|
+
this.data = {};
|
18
|
+
// 所有实例
|
19
|
+
this.instances = {};
|
20
|
+
// 连接点所有数据
|
21
|
+
lineData.forEach(line => {
|
22
|
+
let {startConnector,endConnector} = line;
|
23
|
+
this.data[startConnector.id] = startConnector;
|
24
|
+
this.data[endConnector.id] = endConnector;
|
25
|
+
});
|
26
|
+
this.createInstance(option,chartInstance,this.data);
|
27
|
+
}
|
28
|
+
|
29
|
+
//创建连接点实例对象
|
30
|
+
createInstance(option, chartInstance,data) {
|
31
|
+
let showConnector = option?.connector?.show || false;
|
32
|
+
Object.keys(data).forEach(key => {
|
33
|
+
let item = this.data[key];
|
34
|
+
if(showConnector) {
|
35
|
+
this.instances[item.id] = new Connector(item, option, chartInstance,data);
|
36
|
+
}
|
37
|
+
})
|
38
|
+
}
|
39
|
+
|
40
|
+
|
41
|
+
// exist(connector){
|
42
|
+
// return connector.index > 0;
|
43
|
+
// }
|
44
|
+
|
45
|
+
getData(){
|
46
|
+
return this.data;
|
47
|
+
}
|
48
|
+
|
49
|
+
getInstances(){
|
50
|
+
return this.instances;
|
51
|
+
}
|
52
|
+
|
53
|
+
reCreate(chartInstance, lineData, option) {
|
54
|
+
Object.keys(this.instances).forEach(key => {
|
55
|
+
let item = this.instances[key];
|
56
|
+
item.uninstall(key);
|
57
|
+
})
|
58
|
+
//连接点所有数据
|
59
|
+
lineData.forEach(line => {
|
60
|
+
let {startConnector,endConnector} = line;
|
61
|
+
this.data[startConnector.id] = startConnector;
|
62
|
+
this.data[endConnector.id] = endConnector;
|
63
|
+
});
|
64
|
+
this.createInstance(option,chartInstance,this.data);
|
65
|
+
}
|
66
|
+
|
67
|
+
refresh(chartInstance, lineData, option){
|
68
|
+
let showConnector = option?.connector?.show || false;
|
69
|
+
if(showConnector) {
|
70
|
+
// 旧连接点数据
|
71
|
+
let oldData = this.data;
|
72
|
+
// 新连接点数据
|
73
|
+
let newData = [];
|
74
|
+
lineData.forEach(line => {
|
75
|
+
let {startConnector,endConnector} = line;
|
76
|
+
newData[startConnector.id] = startConnector;
|
77
|
+
newData[endConnector.id] = endConnector;
|
78
|
+
});
|
79
|
+
// 更新连接点
|
80
|
+
Object.keys(newData).forEach(key => {
|
81
|
+
// 新增的连接点处理
|
82
|
+
if(!oldData[key]) {
|
83
|
+
this.createInstance(option,chartInstance,newData[key]);
|
84
|
+
}
|
85
|
+
// 对连接点进行更新处理
|
86
|
+
this.instances[key] && this.instances[key].update(key,newData[key],option);
|
87
|
+
|
88
|
+
})
|
89
|
+
// 删除的连接点处理
|
90
|
+
Object.keys(this.data).forEach(key => {
|
91
|
+
if(!newData[key]) {
|
92
|
+
this.instances[key] && this.instances[key].uninstall(key,this.instances);
|
93
|
+
}
|
94
|
+
})
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
}
|
102
|
+
|
103
|
+
export default ConnectorManager;
|
@@ -0,0 +1,99 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2024 - present OpenTiny HUICharts Authors.
|
3
|
+
* Copyright (c) 2024 - present Huawei Cloud Computing Technologies Co., Ltd.
|
4
|
+
*
|
5
|
+
* Use of this source code is governed by an MIT-style license.
|
6
|
+
*
|
7
|
+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
8
|
+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
9
|
+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
10
|
+
*
|
11
|
+
*/
|
12
|
+
import dot from './type/dot';
|
13
|
+
import expand from './type/expand';
|
14
|
+
|
15
|
+
const DOT = 'dot';// 圆点样式
|
16
|
+
const EXPAND= 'expand';// 展开样式
|
17
|
+
|
18
|
+
const CONNECTOR = {
|
19
|
+
[DOT]: dot,
|
20
|
+
[EXPAND]: expand,
|
21
|
+
};
|
22
|
+
|
23
|
+
class Connector{
|
24
|
+
constructor(data, option, chartInstance){
|
25
|
+
// 连接点数据
|
26
|
+
this.data = data;
|
27
|
+
// 绘画连接点
|
28
|
+
this.render(option, chartInstance);
|
29
|
+
this.chartInstance = chartInstance;
|
30
|
+
}
|
31
|
+
|
32
|
+
// 绘画节点
|
33
|
+
render(option,chartInstance) {
|
34
|
+
const data = this.data;
|
35
|
+
const nodeDom = document.getElementById(data.nodeId);
|
36
|
+
const render = option.connector?.render;
|
37
|
+
let connectorType = Object.assign({type: 'dot'},option.connector);
|
38
|
+
let connectorStyle = connectorType.style;
|
39
|
+
let connectorDom;
|
40
|
+
let dom = document.createElement('div');
|
41
|
+
dom.id = data.id;
|
42
|
+
dom.setAttribute('class', 'connector-con');
|
43
|
+
dom.setAttribute('style', `left: ${data.x}px; top: ${data.y}px;`)
|
44
|
+
if(render && render(data)) {
|
45
|
+
let parser = new DOMParser();
|
46
|
+
let doc = parser.parseFromString(render(data), "text/html");
|
47
|
+
connectorDom = doc.body.firstChild;
|
48
|
+
} else {
|
49
|
+
let connectorIns = new CONNECTOR[connectorType.type]();
|
50
|
+
if(option.layout) {
|
51
|
+
connectorDom = connectorIns.render(data, chartInstance);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
connectorStyle && connectorDom && Object.keys(connectorStyle).forEach(item => {
|
55
|
+
connectorDom.style[item] = connectorStyle[item]
|
56
|
+
})
|
57
|
+
if(connectorDom) {
|
58
|
+
dom.appendChild(connectorDom);
|
59
|
+
}
|
60
|
+
nodeDom && nodeDom.appendChild(dom);
|
61
|
+
// 绑定事件
|
62
|
+
this.clickEvent(dom,data,option);
|
63
|
+
}
|
64
|
+
|
65
|
+
// 绑定click事件
|
66
|
+
clickEvent(dom,data,option) {
|
67
|
+
let onClick = option.connector?.onClick;
|
68
|
+
dom.addEventListener("click", function() {
|
69
|
+
onClick && onClick(data);
|
70
|
+
})
|
71
|
+
}
|
72
|
+
|
73
|
+
// 卸载节点
|
74
|
+
uninstall(id,instances){
|
75
|
+
let element = document.getElementById(id);
|
76
|
+
element && element.remove();
|
77
|
+
instances[id] && delete instances[id];
|
78
|
+
this.Alldata[id] && delete this.Alldata[id];
|
79
|
+
}
|
80
|
+
|
81
|
+
// 更新节点信息
|
82
|
+
update(id,data,option){
|
83
|
+
let dom = document.getElementById(id);
|
84
|
+
if(dom) {
|
85
|
+
dom.setAttribute('style', `left: ${data.x}px; top: ${data.y}px;`);
|
86
|
+
let connectorStyle = option?.connector?.style;
|
87
|
+
connectorStyle && Object.keys(connectorStyle).forEach(item => {
|
88
|
+
dom.style[item] = connectorStyle[item]
|
89
|
+
})
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
|
94
|
+
}
|
95
|
+
|
96
|
+
|
97
|
+
export default Connector;
|
98
|
+
|
99
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2024 - present OpenTiny HUICharts Authors.
|
3
|
+
* Copyright (c) 2024 - present Huawei Cloud Computing Technologies Co., Ltd.
|
4
|
+
*
|
5
|
+
* Use of this source code is governed by an MIT-style license.
|
6
|
+
*
|
7
|
+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
8
|
+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
9
|
+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
10
|
+
*
|
11
|
+
*/
|
12
|
+
.connector-con{
|
13
|
+
position: absolute;
|
14
|
+
display: flex;
|
15
|
+
justify-content: center;
|
16
|
+
align-items: center;
|
17
|
+
transform: translate(-50%, -50%);
|
18
|
+
.connector-dot {
|
19
|
+
width: 6px;
|
20
|
+
height: 6px;
|
21
|
+
position: absolute;
|
22
|
+
border: 1px solid #d9d9d9;
|
23
|
+
background: #fff;
|
24
|
+
border-radius: 50%
|
25
|
+
}
|
26
|
+
.connector-expand {
|
27
|
+
width: 16px;
|
28
|
+
height: 16px;
|
29
|
+
border-radius: 50%;
|
30
|
+
background: #fff;
|
31
|
+
box-shadow: 1px 1px 5px rgba(0,0,0,0.25);
|
32
|
+
z-index: 10;
|
33
|
+
text-align: center;
|
34
|
+
line-height: 16px;
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2024 - present OpenTiny HUICharts Authors.
|
3
|
+
* Copyright (c) 2024 - present Huawei Cloud Computing Technologies Co., Ltd.
|
4
|
+
*
|
5
|
+
* Use of this source code is governed by an MIT-style license.
|
6
|
+
*
|
7
|
+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
8
|
+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
9
|
+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
10
|
+
*
|
11
|
+
*/
|
12
|
+
// 渲染空心圆点样式
|
13
|
+
export default class Dot {
|
14
|
+
constructor() {}
|
15
|
+
|
16
|
+
render() {
|
17
|
+
let dom = document.createElement('div');
|
18
|
+
dom.setAttribute('class', `connector-dot`);
|
19
|
+
return dom;
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,211 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2024 - present OpenTiny HUICharts Authors.
|
3
|
+
* Copyright (c) 2024 - present Huawei Cloud Computing Technologies Co., Ltd.
|
4
|
+
*
|
5
|
+
* Use of this source code is governed by an MIT-style license.
|
6
|
+
*
|
7
|
+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
8
|
+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
9
|
+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
10
|
+
*
|
11
|
+
*/
|
12
|
+
import { AnimationGroup } from '../../animation/index';
|
13
|
+
|
14
|
+
function getIcon(isOpen){
|
15
|
+
const iconKey = isOpen ? 'open' : 'close';
|
16
|
+
const Icon = {
|
17
|
+
open: 'M20,11.25 C20.4142136,11.25 20.75,11.5857864 20.75,12 C20.75,12.3796958 20.4678461,12.693491 20.1017706,12.7431534 L20,12.75 L4,12.75 C3.58578644,12.75 3.25,12.4142136 3.25,12 C3.25,11.6203042 3.53215388,11.306509 3.89822944,11.2568466 L4,11.25 L20,11.25 Z',
|
18
|
+
close: 'M12,3.25 C12.3796958,3.25 12.693491,3.53215388 12.7431534,3.89822944 L12.75,4 L12.75,11.25 L20,11.25 C20.4142136,11.25 20.75,11.5857864 20.75,12 C20.75,12.3796958 20.4678461,12.693491 20.1017706,12.7431534 L20,12.75 L12.75,12.75 L12.75,20 C12.75,20.4142136 12.4142136,20.75 12,20.75 C11.6203042,20.75 11.306509,20.4678461 11.2568466,20.1017706 L11.25,20 L11.25,12.75 L4,12.75 C3.58578644,12.75 3.25,12.4142136 3.25,12 C3.25,11.6203042 3.53215388,11.306509 3.89822944,11.2568466 L4,11.25 L11.25,11.25 L11.25,4 C11.25,3.58578644 11.5857864,3.25 12,3.25 Z',
|
19
|
+
}
|
20
|
+
const expandIcon = `
|
21
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 24 24" version="1.1">
|
22
|
+
<g stroke-width="1" fill="none" fill-rule="evenodd">
|
23
|
+
<g>
|
24
|
+
<rect fill="#191919" opacity="0" x="0" y="0" width="16" height="16"></rect>
|
25
|
+
<path d="${Icon[iconKey]}" id="形状结合" fill="#191919"></path>
|
26
|
+
</g>
|
27
|
+
</g>
|
28
|
+
</svg>`;
|
29
|
+
return expandIcon;
|
30
|
+
}
|
31
|
+
|
32
|
+
export default class Expand {
|
33
|
+
// connector数据
|
34
|
+
data;
|
35
|
+
// 是否展开
|
36
|
+
isOpen= true;
|
37
|
+
// 图表实例
|
38
|
+
chartInstance;
|
39
|
+
|
40
|
+
constructor(data, chartInstance) {}
|
41
|
+
|
42
|
+
render(data, chartInstance) {
|
43
|
+
this.data = data;
|
44
|
+
this.chartInstance = chartInstance;
|
45
|
+
let canExpand = this.hasChildren(chartInstance.nodeManager.getData().edges, data.nodeId);
|
46
|
+
if (data.port === 'start' && canExpand) {
|
47
|
+
this.dom = document.createElement('div');
|
48
|
+
this.dom.setAttribute('class', `connector-expand`);
|
49
|
+
this.dom.innerHTML = getIcon(this.isOpen)
|
50
|
+
this.dom.addEventListener("click", ()=>{
|
51
|
+
this.toggleIcon();
|
52
|
+
this.setAnimation();
|
53
|
+
})
|
54
|
+
}
|
55
|
+
return this.dom;
|
56
|
+
}
|
57
|
+
|
58
|
+
// 切换图标
|
59
|
+
toggleIcon() {
|
60
|
+
this.isOpen = !this.isOpen;
|
61
|
+
this.dom.innerHTML = getIcon(this.isOpen);
|
62
|
+
}
|
63
|
+
|
64
|
+
// 执行展开收起动画
|
65
|
+
setAnimation() {
|
66
|
+
let { lineManager, nodeManager } = this.chartInstance;
|
67
|
+
let nodesData = nodeManager.getData();
|
68
|
+
let edges = nodesData.edges;
|
69
|
+
let startNode = nodeManager.getNodeData(this.data.nodeId);
|
70
|
+
let animateNodes = [];
|
71
|
+
this.findAnimateNodes(this.data.id, edges, animateNodes);
|
72
|
+
const group = new AnimationGroup();
|
73
|
+
|
74
|
+
let updateStartConnector = (animateLine,params,isOpen) => {
|
75
|
+
for (const lineId in edges) {
|
76
|
+
const line = edges[lineId];
|
77
|
+
if (line.start === animateLine.end) {
|
78
|
+
line.startConnector.absolute.x = (!isOpen ? animateLine.startConnector.x : line.startConnector.x) + params.left;
|
79
|
+
line.startConnector.absolute.y = (!isOpen ? animateLine.startConnector.y : line.startConnector.y) + params.top;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
};
|
83
|
+
for (let index = 0; index < animateNodes.length; index++) {
|
84
|
+
const id = animateNodes[index];
|
85
|
+
// 需要位移的节点
|
86
|
+
let endNode = nodeManager.getNodeData(id);
|
87
|
+
let endNodeDom = nodeManager.getDom(id);
|
88
|
+
// 以该节点为end的连线
|
89
|
+
let endLine = edges.filter(obj => obj.end === id)[0];
|
90
|
+
let nodeStart = {
|
91
|
+
left: this.isOpen ? startNode.x : endNode.x,
|
92
|
+
top: this.isOpen ? startNode.y : endNode.y,
|
93
|
+
opacity: this.isOpen || endNode.fold ? 0 : 1
|
94
|
+
}
|
95
|
+
// 记录该次折叠信息
|
96
|
+
this.collapseRecord(startNode, endNode, this.data);
|
97
|
+
// 如果折叠状态不存在,初次操作时为折叠---用于后续设置 透明度 和 样式 ‘pointer-events’
|
98
|
+
if (endNode.fold == undefined) endNode.fold = true;
|
99
|
+
// actionsId 记录初次操作折叠的节点id
|
100
|
+
// 如果操作id与actionsId相同,且isOpen为true,则该节点已展开至记录的起始位置;删除节点状态 fold和actionsId
|
101
|
+
if (this.isOpen && endNode.actionsId == this.data.nodeId) {
|
102
|
+
delete endNode.fold;
|
103
|
+
delete endNode.actionsId;
|
104
|
+
}else if (!endNode.actionsId) {
|
105
|
+
endNode.actionsId = this.data.nodeId;
|
106
|
+
}
|
107
|
+
// 根据isOpen使用折叠信息记录的起始位置
|
108
|
+
let nodeEnd = {
|
109
|
+
left: this.isOpen ? endNode.actions[this.data.nodeId].start.x : endNode.actions[this.data.nodeId].end.x,
|
110
|
+
top: this.isOpen ? endNode.actions[this.data.nodeId].start.y : endNode.actions[this.data.nodeId].end.y,
|
111
|
+
opacity: this.isOpen && !endNode.actions[this.data.nodeId].fold && !endNode.fold ? 1 : 0
|
112
|
+
}
|
113
|
+
group.add(endNodeDom, {
|
114
|
+
start: nodeStart,
|
115
|
+
end: nodeEnd,
|
116
|
+
duration: lineManager.RE_CREATE_TIME,
|
117
|
+
onAfterUpdate: (params, elapsed, element)=> {
|
118
|
+
let animateLine = Object.assign({},endLine)
|
119
|
+
animateLine.endConnector.absolute.x = animateLine.endConnector.x + params.left;
|
120
|
+
animateLine.endConnector.absolute.y = animateLine.endConnector.y + params.top;
|
121
|
+
updateStartConnector(animateLine, params, this.isOpen);
|
122
|
+
lineManager.update(animateLine);
|
123
|
+
},
|
124
|
+
onFinish: () => {
|
125
|
+
endNode.x = nodeEnd.left;
|
126
|
+
endNode.y = nodeEnd.top;
|
127
|
+
!this.isOpen && lineManager.hide(endLine);
|
128
|
+
if (endNodeDom) endNodeDom.style['pointer-events'] = this.isOpen ? 'auto' : 'none';
|
129
|
+
if (this.isOpen && !endNode.actions[this.data.nodeId]?.fold && endNode.fold && endNodeDom) endNodeDom.style['pointer-events'] = 'none';
|
130
|
+
//折叠完成,删除该次折叠信息
|
131
|
+
if (this.isOpen) delete endNode.actions[this.data.nodeId];
|
132
|
+
}
|
133
|
+
});
|
134
|
+
}
|
135
|
+
group.start();
|
136
|
+
}
|
137
|
+
|
138
|
+
// 查找所有需要展开收起的节点的id集合
|
139
|
+
findAnimateNodes(id, edges, animateNodes, endId) {
|
140
|
+
edges.forEach(item => {
|
141
|
+
let splitID = item.id.split("-to-");
|
142
|
+
if (item.start == endId || splitID[0] == id) {
|
143
|
+
animateNodes.push(item.end);
|
144
|
+
this.findAnimateNodes(splitID[1], edges, animateNodes, item.end);
|
145
|
+
}
|
146
|
+
});
|
147
|
+
}
|
148
|
+
|
149
|
+
//递归查找子节点
|
150
|
+
childId(id, edgeData, childIdArr){
|
151
|
+
edgeData.forEach(item => {
|
152
|
+
if(item.start == id) {
|
153
|
+
childIdArr.push(item.end);
|
154
|
+
this.childId(item.end, edgeData, childIdArr);
|
155
|
+
}
|
156
|
+
})
|
157
|
+
}
|
158
|
+
|
159
|
+
// 查询节点是否存在子节点
|
160
|
+
hasChildren(edgeData, id) {
|
161
|
+
let childIdArr = [];
|
162
|
+
// 获取所有节点id下面的子节点,放到childIdArr
|
163
|
+
this.childId(id, edgeData, childIdArr);
|
164
|
+
// 去除相同的节点
|
165
|
+
childIdArr = [...new Set(childIdArr)];
|
166
|
+
if(childIdArr.length > 0) {
|
167
|
+
let singleNum = 0;// 只有一个父节点的数量
|
168
|
+
childIdArr.forEach(child => {
|
169
|
+
let num = 0;
|
170
|
+
for (let k = 0; k < edgeData.length; k++) {
|
171
|
+
if(edgeData[k].end === child) {
|
172
|
+
num++;
|
173
|
+
}
|
174
|
+
// 子节点的父节点数量大于1,则终止循环
|
175
|
+
if(num > 1){
|
176
|
+
break
|
177
|
+
}
|
178
|
+
if(k == edgeData.length - 1) {
|
179
|
+
singleNum++
|
180
|
+
}
|
181
|
+
}
|
182
|
+
})
|
183
|
+
// 如果所有的子节点的父节点都是唯一的
|
184
|
+
if(singleNum == childIdArr.length) {
|
185
|
+
return true;
|
186
|
+
} else {
|
187
|
+
return false;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
// 记录折叠信息,折叠操作的id,起始坐标, 节点对于该操作记录的折叠状态
|
193
|
+
collapseRecord(startNode, endNode, data) {
|
194
|
+
if (!endNode.actions) endNode.actions = {};
|
195
|
+
if (!endNode.actions[data.nodeId]) {
|
196
|
+
endNode.actions[data.nodeId] = {
|
197
|
+
fold: true,
|
198
|
+
start: {
|
199
|
+
x: endNode.x,
|
200
|
+
y: endNode.y
|
201
|
+
},
|
202
|
+
end: {
|
203
|
+
x: startNode.x,
|
204
|
+
y: startNode.y
|
205
|
+
}
|
206
|
+
}
|
207
|
+
} else {
|
208
|
+
endNode.actions[data.nodeId].fold = false;
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
@@ -0,0 +1,149 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2024 - present OpenTiny HUICharts Authors.
|
3
|
+
* Copyright (c) 2024 - present Huawei Cloud Computing Technologies Co., Ltd.
|
4
|
+
*
|
5
|
+
* Use of this source code is governed by an MIT-style license.
|
6
|
+
*
|
7
|
+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
8
|
+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
9
|
+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
10
|
+
*
|
11
|
+
*/
|
12
|
+
const TRIGGER_CLASSNAMES = ['huicharts-node', 'huicharts-line-wrap', 'huicharts-legend-itemContainer', 'huicharts-container'];
|
13
|
+
const IGNORE_CONTAINER_CLASS = 'huicharts-legend-container';
|
14
|
+
|
15
|
+
export default class Contextmenu {
|
16
|
+
constructor(context, menuOption) {
|
17
|
+
this.showMenu = false;
|
18
|
+
this.context = context;
|
19
|
+
this.menuOption = menuOption; // 配置对象
|
20
|
+
this.handleShow = this.updateMenu.bind(this);
|
21
|
+
this.handleClose = this.closeContextmenu.bind(this);
|
22
|
+
this.bindEvent();
|
23
|
+
}
|
24
|
+
|
25
|
+
bindEvent () {
|
26
|
+
this.context.root.addEventListener('contextmenu', this.handleShow)
|
27
|
+
}
|
28
|
+
|
29
|
+
uninstall() {
|
30
|
+
this.showMenu = false;
|
31
|
+
this.context.root.removeEventListener('click', this.handleClose)
|
32
|
+
document.removeEventListener('click', this.handleClose)
|
33
|
+
this.context.root.removeEventListener('contextmenu', this.handleShow)
|
34
|
+
}
|
35
|
+
|
36
|
+
updateMenu (event) {
|
37
|
+
event.preventDefault();
|
38
|
+
// 判断触发器的class集合
|
39
|
+
const clsNames = new Set(TRIGGER_CLASSNAMES);
|
40
|
+
const { menuOption } = this;
|
41
|
+
const targetEl = event.target;
|
42
|
+
let currentEl = event.target;
|
43
|
+
let targetCls = '';
|
44
|
+
while (currentEl) {
|
45
|
+
const currClsNames = currentEl.getAttribute("class")?.split(' ') || [];
|
46
|
+
targetCls = currClsNames.filter(name => clsNames.has(name))[0];
|
47
|
+
if (targetCls || currentEl === document.body) {
|
48
|
+
break;
|
49
|
+
}
|
50
|
+
if (currClsNames.some(name => name === IGNORE_CONTAINER_CLASS)) {
|
51
|
+
this.closeContextmenu(event);
|
52
|
+
return false; // 右键在图例的空白区域
|
53
|
+
}
|
54
|
+
currentEl = currentEl.parentNode;
|
55
|
+
}
|
56
|
+
let menu = undefined;
|
57
|
+
let targetId = undefined;
|
58
|
+
if (targetCls === 'huicharts-node') {
|
59
|
+
menu = menuOption.node;
|
60
|
+
targetId = currentEl.getAttribute('id');
|
61
|
+
} else if (targetCls === 'huicharts-line-wrap') {
|
62
|
+
menu = menuOption.line;
|
63
|
+
targetId = currentEl.children[0]?.getAttribute('id');
|
64
|
+
} else if (targetCls === 'huicharts-legend-itemContainer') {
|
65
|
+
menu = menuOption.legend;
|
66
|
+
targetId = currentEl.getAttribute('id');
|
67
|
+
} else if (targetCls === 'huicharts-container') {
|
68
|
+
menu = menuOption.canvas;
|
69
|
+
targetId = 'huicharts-container';
|
70
|
+
}
|
71
|
+
|
72
|
+
if (menu) {
|
73
|
+
this.closeContextmenu(event)
|
74
|
+
this.context.root.addEventListener('click', this.handleClose)
|
75
|
+
document.addEventListener('click', this.handleClose)
|
76
|
+
this.createMenuElement(event, menu, targetId);
|
77
|
+
this.showMenu = true;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
// 创建menu元素
|
82
|
+
createMenuElement (event, menuObj, targetId) {
|
83
|
+
const ulElement = document.createElement("ul");
|
84
|
+
ulElement.classList.add("huicharts-contextmenu");
|
85
|
+
if (Array.isArray(menuObj.data)) {
|
86
|
+
for (let item of menuObj.data) {
|
87
|
+
const liElement = document.createElement("li");
|
88
|
+
if (menuObj.itemRender) {
|
89
|
+
const renderElement = menuObj.itemRender(item, targetId);
|
90
|
+
if (renderElement instanceof Node) {
|
91
|
+
liElement.appendChild(renderElement);
|
92
|
+
} else {
|
93
|
+
liElement.innerHTML = renderElement;
|
94
|
+
}
|
95
|
+
} else {
|
96
|
+
if (item.icon) {
|
97
|
+
liElement.innerHTML = `<img class="menu-icon" src="${item.icon}" alt="" />`;
|
98
|
+
}
|
99
|
+
liElement.innerHTML += `<span class="menu-text">${item.label}</span> `;
|
100
|
+
}
|
101
|
+
liElement.classList.add("huicharts-contextmenu-item");
|
102
|
+
liElement.onclick = (event) => {
|
103
|
+
event.stopPropagation()
|
104
|
+
menuObj.onclick?.(item, targetId, event)
|
105
|
+
this.closeContextmenu(event)
|
106
|
+
};
|
107
|
+
ulElement.appendChild(liElement);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
this.context.root.appendChild(ulElement);
|
112
|
+
this.adjustMenuPosition(event, ulElement);
|
113
|
+
}
|
114
|
+
|
115
|
+
// 调整menu展示的位置
|
116
|
+
adjustMenuPosition (event, menuContainerEl) {
|
117
|
+
const { root } = this.context; // 图表根容器
|
118
|
+
const { width: rootWidth, height: rootHeight, left: rootLeft, top: rootTop } = root.getBoundingClientRect();
|
119
|
+
const { offsetWidth: menuWidth, offsetHeight: menuHeight } = menuContainerEl;
|
120
|
+
const [offsetX = 4, offsetY = 4] = this.menuOption.offset || [4, 4]; // 菜单容器偏移量
|
121
|
+
let left = event.clientX - rootLeft + offsetX;
|
122
|
+
let top = event.clientY - rootTop + offsetY;
|
123
|
+
if (left + menuWidth > rootWidth) { // 右侧超出,向左移位
|
124
|
+
left = rootWidth - menuWidth - offsetX;
|
125
|
+
}
|
126
|
+
if (top + menuHeight > rootHeight) { // 底部超出,向上移位
|
127
|
+
top = rootHeight - menuHeight - offsetY;
|
128
|
+
}
|
129
|
+
menuContainerEl.setAttribute('style', `position: absolute; top: ${top}px; left: ${left}px;`);
|
130
|
+
}
|
131
|
+
|
132
|
+
closeContextmenu (event) {
|
133
|
+
if (!this.showMenu) {
|
134
|
+
return
|
135
|
+
}
|
136
|
+
event?.stopPropagation();
|
137
|
+
this.showMenu = false;
|
138
|
+
const contextmenu = this.context.root.querySelectorAll('.huicharts-contextmenu');
|
139
|
+
contextmenu.forEach((el) => {
|
140
|
+
el.parentNode.removeChild(el);
|
141
|
+
});
|
142
|
+
this.context.root.removeEventListener('click', this.handleClose);
|
143
|
+
document.removeEventListener('click', this.handleClose);
|
144
|
+
}
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2024 - present OpenTiny HUICharts Authors.
|
3
|
+
* Copyright (c) 2024 - present Huawei Cloud Computing Technologies Co., Ltd.
|
4
|
+
*
|
5
|
+
* Use of this source code is governed by an MIT-style license.
|
6
|
+
*
|
7
|
+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
8
|
+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
9
|
+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
10
|
+
*
|
11
|
+
*/
|
12
|
+
.huicharts-contextmenu {
|
13
|
+
position: absolute;
|
14
|
+
z-index: 10000;
|
15
|
+
padding: 8px 10px;
|
16
|
+
border-radius: 4px;
|
17
|
+
box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.18);
|
18
|
+
background: #fff;
|
19
|
+
|
20
|
+
.huicharts-contextmenu-item {
|
21
|
+
display: flex;
|
22
|
+
align-items: center;
|
23
|
+
justify-content: flex-start;
|
24
|
+
padding: 4px 6px;
|
25
|
+
margin: 2px 0;
|
26
|
+
font-size: 12px;
|
27
|
+
|
28
|
+
.menu-icon {
|
29
|
+
width: 20px;
|
30
|
+
height: 20px;
|
31
|
+
margin-right: 6px;
|
32
|
+
}
|
33
|
+
|
34
|
+
&:hover {
|
35
|
+
background-color: #d9d9d9;
|
36
|
+
border-radius: 2px;
|
37
|
+
cursor: default;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|