reke-ui 0.2.1 → 0.4.0
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/custom-elements.json +1873 -499
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/components/reke-chip/reke-chip.d.ts +7 -0
- package/dist/components/reke-chip/reke-chip.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.js +8 -2
- package/dist/components/reke-chip/reke-chip.styles.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.styles.js +32 -0
- package/dist/components/reke-combobox/reke-combobox.d.ts +90 -0
- package/dist/components/reke-combobox/reke-combobox.d.ts.map +1 -0
- package/dist/components/reke-combobox/reke-combobox.js +206 -0
- package/dist/components/reke-combobox/reke-combobox.styles.d.ts +2 -0
- package/dist/components/reke-combobox/reke-combobox.styles.d.ts.map +1 -0
- package/dist/components/reke-combobox/reke-combobox.styles.js +290 -0
- package/dist/components/reke-input/reke-input.d.ts +14 -0
- package/dist/components/reke-input/reke-input.d.ts.map +1 -1
- package/dist/components/reke-input/reke-input.js +41 -22
- package/dist/components/reke-input/reke-input.styles.d.ts.map +1 -1
- package/dist/components/reke-input/reke-input.styles.js +44 -16
- package/dist/components/reke-menu/reke-menu.d.ts +51 -0
- package/dist/components/reke-menu/reke-menu.d.ts.map +1 -0
- package/dist/components/reke-menu/reke-menu.js +106 -0
- package/dist/components/reke-menu/reke-menu.styles.d.ts +2 -0
- package/dist/components/reke-menu/reke-menu.styles.d.ts.map +1 -0
- package/dist/components/reke-menu/reke-menu.styles.js +25 -0
- package/dist/components/reke-menu-item/reke-menu-item.d.ts +32 -0
- package/dist/components/reke-menu-item/reke-menu-item.d.ts.map +1 -0
- package/dist/components/reke-menu-item/reke-menu-item.js +49 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.d.ts +2 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.d.ts.map +1 -0
- package/dist/components/reke-menu-item/reke-menu-item.styles.js +53 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts +59 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts.map +1 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.js +117 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts +2 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts.map +1 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.js +28 -0
- package/dist/components/reke-table/reke-table.d.ts +12 -0
- package/dist/components/reke-table/reke-table.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.js +45 -7
- package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.styles.js +28 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -11
- package/dist/node_modules/echarts/lib/animation/basicTransition.js +70 -0
- package/dist/node_modules/echarts/lib/chart/custom/customSeriesRegister.js +7 -0
- package/dist/node_modules/echarts/lib/chart/helper/createRenderPlanner.js +11 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +11 -0
- package/dist/node_modules/echarts/lib/chart/helper/sectorHelper.js +19 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieSeries.js +112 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieView.js +119 -0
- package/dist/node_modules/echarts/lib/chart/pie/install.js +12 -0
- package/dist/node_modules/echarts/lib/chart/pie/labelLayout.js +190 -0
- package/dist/node_modules/echarts/lib/chart/pie/pieLayout.js +72 -0
- package/dist/node_modules/echarts/lib/component/axis/AxisBuilder.js +554 -0
- package/dist/node_modules/echarts/lib/component/axis/AxisView.js +36 -0
- package/dist/node_modules/echarts/lib/component/axis/axisAction.js +4 -0
- package/dist/node_modules/echarts/lib/component/axis/axisBreakHelper.js +5 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js +57 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/AxisPointerView.js +28 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +174 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +65 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/axisTrigger.js +189 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js +27 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/globalListener.js +56 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/install.js +25 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/modelHelper.js +117 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/viewHelper.js +103 -0
- package/dist/node_modules/echarts/lib/component/helper/listComponent.js +20 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendModel.js +184 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendView.js +227 -0
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendModel.js +45 -0
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +145 -0
- package/dist/node_modules/echarts/lib/component/legend/install.js +9 -0
- package/dist/node_modules/echarts/lib/component/legend/installLegendPlain.js +12 -0
- package/dist/node_modules/echarts/lib/component/legend/installLegendScroll.js +11 -0
- package/dist/node_modules/echarts/lib/component/legend/legendAction.js +38 -0
- package/dist/node_modules/echarts/lib/component/legend/legendFilter.js +12 -0
- package/dist/node_modules/echarts/lib/component/legend/scrollableLegendAction.js +15 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js +170 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipModel.js +55 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +102 -0
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipView.js +367 -0
- package/dist/node_modules/echarts/lib/component/tooltip/helper.js +37 -0
- package/dist/node_modules/echarts/lib/component/tooltip/install.js +19 -0
- package/dist/node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.js +56 -0
- package/dist/node_modules/echarts/lib/component/tooltip/tooltipMarkup.js +173 -0
- package/dist/node_modules/echarts/lib/coord/axisBand.js +31 -0
- package/dist/node_modules/echarts/lib/coord/axisHelper.js +21 -0
- package/dist/node_modules/echarts/lib/coord/axisStatistics.js +38 -0
- package/dist/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +14 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +31 -0
- package/dist/node_modules/echarts/lib/core/CoordinateSystem.js +50 -0
- package/dist/node_modules/echarts/lib/core/ExtensionAPI.js +32 -0
- package/dist/node_modules/echarts/lib/core/Scheduler.js +203 -0
- package/dist/node_modules/echarts/lib/core/echarts.js +986 -0
- package/dist/node_modules/echarts/lib/core/impl.js +11 -0
- package/dist/node_modules/echarts/lib/core/lifecycle.js +5 -0
- package/dist/node_modules/echarts/lib/core/locale.js +27 -0
- package/dist/node_modules/echarts/lib/core/task.js +81 -0
- package/dist/node_modules/echarts/lib/data/DataDiffer.js +68 -0
- package/dist/node_modules/echarts/lib/data/DataStore.js +359 -0
- package/dist/node_modules/echarts/lib/data/SeriesData.js +328 -0
- package/dist/node_modules/echarts/lib/data/SeriesDimensionDefine.js +10 -0
- package/dist/node_modules/echarts/lib/data/Source.js +132 -0
- package/dist/node_modules/echarts/lib/data/helper/SeriesDataSchema.js +80 -0
- package/dist/node_modules/echarts/lib/data/helper/createDimensions.js +105 -0
- package/dist/node_modules/echarts/lib/data/helper/dataProvider.js +155 -0
- package/dist/node_modules/echarts/lib/data/helper/dataValueHelper.js +87 -0
- package/dist/node_modules/echarts/lib/data/helper/dimensionHelper.js +50 -0
- package/dist/node_modules/echarts/lib/data/helper/sourceHelper.js +98 -0
- package/dist/node_modules/echarts/lib/data/helper/sourceManager.js +115 -0
- package/dist/node_modules/echarts/lib/data/helper/transform.js +145 -0
- package/dist/node_modules/echarts/lib/extension.js +62 -0
- package/dist/node_modules/echarts/lib/i18n/langEN.js +148 -0
- package/dist/node_modules/echarts/lib/i18n/langZH.js +148 -0
- package/dist/node_modules/echarts/lib/label/labelGuideHelper.js +106 -0
- package/dist/node_modules/echarts/lib/label/labelLayoutHelper.js +152 -0
- package/dist/node_modules/echarts/lib/label/labelStyle.js +190 -0
- package/dist/node_modules/echarts/lib/legacy/dataSelectAction.js +53 -0
- package/dist/node_modules/echarts/lib/loading/default.js +85 -0
- package/dist/node_modules/echarts/lib/model/Component.js +64 -0
- package/dist/node_modules/echarts/lib/model/Global.js +320 -0
- package/dist/node_modules/echarts/lib/model/Model.js +50 -0
- package/dist/node_modules/echarts/lib/model/OptionManager.js +78 -0
- package/dist/node_modules/echarts/lib/model/Series.js +216 -0
- package/dist/node_modules/echarts/lib/model/globalDefault.js +94 -0
- package/dist/node_modules/echarts/lib/model/internalComponentCreator.js +14 -0
- package/dist/node_modules/echarts/lib/model/mixin/areaStyle.js +16 -0
- package/dist/node_modules/echarts/lib/model/mixin/dataFormat.js +63 -0
- package/dist/node_modules/echarts/lib/model/mixin/itemStyle.js +24 -0
- package/dist/node_modules/echarts/lib/model/mixin/lineStyle.js +23 -0
- package/dist/node_modules/echarts/lib/model/mixin/makeStyleMapper.js +17 -0
- package/dist/node_modules/echarts/lib/model/mixin/palette.js +32 -0
- package/dist/node_modules/echarts/lib/model/mixin/textStyle.js +36 -0
- package/dist/node_modules/echarts/lib/preprocessor/backwardCompat.js +89 -0
- package/dist/node_modules/echarts/lib/preprocessor/helper/compatStyle.js +118 -0
- package/dist/node_modules/echarts/lib/processor/dataFilter.js +18 -0
- package/dist/node_modules/echarts/lib/processor/dataStack.js +52 -0
- package/dist/node_modules/echarts/lib/processor/negativeDataFilter.js +16 -0
- package/dist/node_modules/echarts/lib/renderer/installCanvasRenderer.js +7 -0
- package/dist/node_modules/echarts/lib/scale/break.js +9 -0
- package/dist/node_modules/echarts/lib/scale/helper.js +9 -0
- package/dist/node_modules/echarts/lib/scale/scaleMapper.js +26 -0
- package/dist/node_modules/echarts/lib/theme/dark.js +159 -0
- package/dist/node_modules/echarts/lib/util/ECEventProcessor.js +52 -0
- package/dist/node_modules/echarts/lib/util/clazz.js +99 -0
- package/dist/node_modules/echarts/lib/util/component.js +75 -0
- package/dist/node_modules/echarts/lib/util/cycleCache.js +14 -0
- package/dist/node_modules/echarts/lib/util/decal.js +162 -0
- package/dist/node_modules/echarts/lib/util/event.js +7 -0
- package/dist/node_modules/echarts/lib/util/format.js +87 -0
- package/dist/node_modules/echarts/lib/util/graphic.js +361 -0
- package/dist/node_modules/echarts/lib/util/innerStore.js +13 -0
- package/dist/node_modules/echarts/lib/util/layout.js +174 -0
- package/dist/node_modules/echarts/lib/util/log.js +54 -0
- package/dist/node_modules/echarts/lib/util/model.js +296 -0
- package/dist/node_modules/echarts/lib/util/number.js +132 -0
- package/dist/node_modules/echarts/lib/util/states.js +323 -0
- package/dist/node_modules/echarts/lib/util/symbol.js +146 -0
- package/dist/node_modules/echarts/lib/util/throttle.js +37 -0
- package/dist/node_modules/echarts/lib/util/time.js +43 -0
- package/dist/node_modules/echarts/lib/util/types.js +13 -0
- package/dist/node_modules/echarts/lib/view/Chart.js +81 -0
- package/dist/node_modules/echarts/lib/view/Component.js +16 -0
- package/dist/node_modules/echarts/lib/visual/LegendVisualProvider.js +18 -0
- package/dist/node_modules/echarts/lib/visual/decal.js +25 -0
- package/dist/node_modules/echarts/lib/visual/helper.js +23 -0
- package/dist/node_modules/echarts/lib/visual/style.js +79 -0
- package/dist/node_modules/echarts/lib/visual/symbol.js +47 -0
- package/dist/node_modules/echarts/lib/visual/tokens.js +108 -0
- package/dist/node_modules/echarts/node_modules/tslib/tslib.es6.js +18 -0
- package/dist/node_modules/zrender/lib/Element.js +442 -0
- package/dist/node_modules/zrender/lib/Handler.js +167 -0
- package/dist/node_modules/zrender/lib/Storage.js +68 -0
- package/dist/node_modules/zrender/lib/animation/Animation.js +65 -0
- package/dist/node_modules/zrender/lib/animation/Animator.js +348 -0
- package/dist/node_modules/zrender/lib/animation/Clip.js +31 -0
- package/dist/node_modules/zrender/lib/animation/cubicEasing.js +17 -0
- package/dist/node_modules/zrender/lib/animation/easing.js +104 -0
- package/dist/node_modules/zrender/lib/animation/requestAnimationFrame.js +7 -0
- package/dist/node_modules/zrender/lib/canvas/Layer.js +135 -0
- package/dist/node_modules/zrender/lib/canvas/Painter.js +352 -0
- package/dist/node_modules/zrender/lib/canvas/dashStyle.js +17 -0
- package/dist/node_modules/zrender/lib/canvas/graphic.js +199 -0
- package/dist/node_modules/zrender/lib/canvas/helper.js +33 -0
- package/dist/node_modules/zrender/lib/config.js +7 -0
- package/dist/node_modules/zrender/lib/contain/arc.js +20 -0
- package/dist/node_modules/zrender/lib/contain/cubic.js +9 -0
- package/dist/node_modules/zrender/lib/contain/line.js +12 -0
- package/dist/node_modules/zrender/lib/contain/path.js +133 -0
- package/dist/node_modules/zrender/lib/contain/quadratic.js +9 -0
- package/dist/node_modules/zrender/lib/contain/text.js +106 -0
- package/dist/node_modules/zrender/lib/contain/util.js +7 -0
- package/dist/node_modules/zrender/lib/contain/windingLine.js +10 -0
- package/dist/node_modules/zrender/lib/core/BoundingRect.js +111 -0
- package/dist/node_modules/zrender/lib/core/Eventful.js +82 -0
- package/dist/node_modules/zrender/lib/core/GestureMgr.js +56 -0
- package/dist/node_modules/zrender/lib/core/LRU.js +49 -0
- package/dist/node_modules/zrender/lib/core/OrientedBoundingRect.js +41 -0
- package/dist/node_modules/zrender/lib/core/PathProxy.js +288 -0
- package/dist/node_modules/zrender/lib/core/Point.js +72 -0
- package/dist/node_modules/zrender/lib/core/Transformable.js +96 -0
- package/dist/node_modules/zrender/lib/core/WeakMap.js +25 -0
- package/dist/node_modules/zrender/lib/core/bbox.js +40 -0
- package/dist/node_modules/zrender/lib/core/curve.js +142 -0
- package/dist/node_modules/zrender/lib/core/dom.js +74 -0
- package/dist/node_modules/zrender/lib/core/env.js +22 -0
- package/dist/node_modules/zrender/lib/core/event.js +58 -0
- package/dist/node_modules/zrender/lib/core/fourPointsTransform.js +109 -0
- package/dist/node_modules/zrender/lib/core/matrix.js +39 -0
- package/dist/node_modules/zrender/lib/core/platform.js +42 -0
- package/dist/node_modules/zrender/lib/core/timsort.js +246 -0
- package/dist/node_modules/zrender/lib/core/util.js +314 -0
- package/dist/node_modules/zrender/lib/core/vector.js +52 -0
- package/dist/node_modules/zrender/lib/dom/HandlerProxy.js +190 -0
- package/dist/node_modules/zrender/lib/graphic/CompoundPath.js +25 -0
- package/dist/node_modules/zrender/lib/graphic/Displayable.js +133 -0
- package/dist/node_modules/zrender/lib/graphic/Gradient.js +14 -0
- package/dist/node_modules/zrender/lib/graphic/Group.js +86 -0
- package/dist/node_modules/zrender/lib/graphic/Image.js +49 -0
- package/dist/node_modules/zrender/lib/graphic/IncrementalDisplayable.js +65 -0
- package/dist/node_modules/zrender/lib/graphic/LinearGradient.js +13 -0
- package/dist/node_modules/zrender/lib/graphic/Path.js +200 -0
- package/dist/node_modules/zrender/lib/graphic/RadialGradient.js +13 -0
- package/dist/node_modules/zrender/lib/graphic/TSpan.js +39 -0
- package/dist/node_modules/zrender/lib/graphic/Text.js +216 -0
- package/dist/node_modules/zrender/lib/graphic/helper/image.js +39 -0
- package/dist/node_modules/zrender/lib/graphic/helper/parseText.js +226 -0
- package/dist/node_modules/zrender/lib/graphic/helper/poly.js +21 -0
- package/dist/node_modules/zrender/lib/graphic/helper/roundRect.js +9 -0
- package/dist/node_modules/zrender/lib/graphic/helper/roundSector.js +85 -0
- package/dist/node_modules/zrender/lib/graphic/helper/smoothBezier.js +26 -0
- package/dist/node_modules/zrender/lib/graphic/helper/subPixelOptimize.js +25 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Arc.js +28 -0
- package/dist/node_modules/zrender/lib/graphic/shape/BezierCurve.js +40 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Circle.js +22 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Ellipse.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Line.js +37 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Polygon.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Polyline.js +28 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Rect.js +31 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Ring.js +23 -0
- package/dist/node_modules/zrender/lib/graphic/shape/Sector.js +25 -0
- package/dist/node_modules/zrender/lib/mixin/Draggable.js +28 -0
- package/dist/node_modules/zrender/lib/svg/helper.js +19 -0
- package/dist/node_modules/zrender/lib/tool/color.js +1039 -0
- package/dist/node_modules/zrender/lib/tool/path.js +153 -0
- package/dist/node_modules/zrender/lib/tool/transformPath.js +41 -0
- package/dist/node_modules/zrender/lib/zrender.js +124 -0
- package/dist/node_modules/zrender/node_modules/tslib/tslib.es6.js +18 -0
- package/dist/react-bridge/table.d.ts.map +1 -1
- package/dist/react-bridge/table.js +36 -21
- package/dist/react.d.ts +17 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +73 -52
- package/dist/shared/base-element.d.ts +1 -0
- package/dist/shared/base-element.d.ts.map +1 -1
- package/dist/shared/base-element.js +6 -0
- package/dist/shared/tailwind.js +1 -1
- package/dist/tokens/reke-tokens.css +15 -0
- package/package.json +18 -1
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { bind as e, clone as t, each as n, isArray as r, isString as i, retrieve2 as a } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import { __extends as o } from "../../../node_modules/tslib/tslib.es6.js";
|
|
3
|
+
import s from "../../../../zrender/lib/graphic/Group.js";
|
|
4
|
+
import c from "../../../../zrender/lib/graphic/shape/Rect.js";
|
|
5
|
+
import l from "../../../../zrender/lib/graphic/Text.js";
|
|
6
|
+
import { updateProps as u } from "../../animation/basicTransition.js";
|
|
7
|
+
import { createIcon as d } from "../../util/graphic.js";
|
|
8
|
+
import { box as f } from "../../util/layout.js";
|
|
9
|
+
import p from "./LegendView.js";
|
|
10
|
+
//#region node_modules/echarts/lib/component/legend/ScrollableLegendView.js
|
|
11
|
+
var m = s, h = ["width", "height"], g = ["x", "y"], _ = function(s) {
|
|
12
|
+
o(p, s);
|
|
13
|
+
function p() {
|
|
14
|
+
var e = s !== null && s.apply(this, arguments) || this;
|
|
15
|
+
return e.type = p.type, e.newlineDisabled = !0, e._currentIndex = 0, e;
|
|
16
|
+
}
|
|
17
|
+
return p.prototype.init = function() {
|
|
18
|
+
s.prototype.init.call(this), this.group.add(this._containerGroup = new m()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new m());
|
|
19
|
+
}, p.prototype.resetInner = function() {
|
|
20
|
+
s.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
|
|
21
|
+
}, p.prototype.renderInner = function(t, n, i, a, o, c, u) {
|
|
22
|
+
var f = this;
|
|
23
|
+
s.prototype.renderInner.call(this, t, n, i, a, o, c, u);
|
|
24
|
+
var p = this._controllerGroup, m = n.get("pageIconSize", !0), h = r(m) ? m : [m, m];
|
|
25
|
+
_("pagePrev", 0);
|
|
26
|
+
var g = n.getModel("pageTextStyle");
|
|
27
|
+
p.add(new l({
|
|
28
|
+
name: "pageText",
|
|
29
|
+
style: {
|
|
30
|
+
text: "xx/xx",
|
|
31
|
+
fill: g.getTextColor(),
|
|
32
|
+
font: g.getFont(),
|
|
33
|
+
verticalAlign: "middle",
|
|
34
|
+
align: "center"
|
|
35
|
+
},
|
|
36
|
+
silent: !0
|
|
37
|
+
})), _("pageNext", 1);
|
|
38
|
+
function _(t, r) {
|
|
39
|
+
var i = t + "DataIndex", o = d(n.get("pageIcons", !0)[n.getOrient().name][r], { onclick: e(f._pageGo, f, i, n, a) }, {
|
|
40
|
+
x: -h[0] / 2,
|
|
41
|
+
y: -h[1] / 2,
|
|
42
|
+
width: h[0],
|
|
43
|
+
height: h[1]
|
|
44
|
+
});
|
|
45
|
+
o.name = t, p.add(o);
|
|
46
|
+
}
|
|
47
|
+
}, p.prototype.layoutInner = function(e, n, r, i, a, o) {
|
|
48
|
+
var s = this.getSelectorGroup(), c = e.getOrient().index, l = h[c], u = g[c], d = h[1 - c], p = g[1 - c];
|
|
49
|
+
a && f("horizontal", s, e.get("selectorItemGap", !0));
|
|
50
|
+
var m = e.get("selectorButtonGap", !0), _ = s.getBoundingRect(), v = [-_.x, -_.y], y = t(r);
|
|
51
|
+
a && (y[l] = r[l] - _[l] - m);
|
|
52
|
+
var b = this._layoutContentAndController(e, i, y, c, l, d, p, u);
|
|
53
|
+
if (a) {
|
|
54
|
+
if (o === "end") v[c] += b[l] + m;
|
|
55
|
+
else {
|
|
56
|
+
var x = _[l] + m;
|
|
57
|
+
v[c] -= x, b[u] -= x;
|
|
58
|
+
}
|
|
59
|
+
b[l] += _[l] + m, v[1 - c] += b[p] + b[d] / 2 - _[d] / 2, b[d] = Math.max(b[d], _[d]), b[p] = Math.min(b[p], _[p] + v[1 - c]), s.x = v[0], s.y = v[1], s.markRedraw();
|
|
60
|
+
}
|
|
61
|
+
return b;
|
|
62
|
+
}, p.prototype._layoutContentAndController = function(e, t, n, r, i, o, s, l) {
|
|
63
|
+
var d = this.getContentGroup(), p = this._containerGroup, m = this._controllerGroup;
|
|
64
|
+
f(e.get("orient"), d, e.get("itemGap"), r ? n.width : null, r ? null : n.height), f("horizontal", m, e.get("pageButtonItemGap", !0));
|
|
65
|
+
var h = d.getBoundingRect(), g = m.getBoundingRect(), _ = this._showController = h[i] > n[i], v = [-h.x, -h.y];
|
|
66
|
+
t || (v[r] = d[l]);
|
|
67
|
+
var y = [0, 0], b = [-g.x, -g.y], x = a(e.get("pageButtonGap", !0), e.get("itemGap", !0));
|
|
68
|
+
_ && (e.get("pageButtonPosition", !0) === "end" ? b[r] += n[i] - g[i] : y[r] += g[i] + x), b[1 - r] += h[o] / 2 - g[o] / 2, d.setPosition(v), p.setPosition(y), m.setPosition(b);
|
|
69
|
+
var S = {
|
|
70
|
+
x: 0,
|
|
71
|
+
y: 0
|
|
72
|
+
};
|
|
73
|
+
if (S[i] = _ ? n[i] : h[i], S[o] = Math.max(h[o], g[o]), S[s] = Math.min(0, g[s] + b[1 - r]), p.__rectSize = n[i], _) {
|
|
74
|
+
var C = {
|
|
75
|
+
x: 0,
|
|
76
|
+
y: 0
|
|
77
|
+
};
|
|
78
|
+
C[i] = Math.max(n[i] - g[i] - x, 0), C[o] = S[o], p.setClipPath(new c({ shape: C })), p.__rectSize = C[i];
|
|
79
|
+
} else m.eachChild(function(e) {
|
|
80
|
+
e.attr({
|
|
81
|
+
invisible: !0,
|
|
82
|
+
silent: !0
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
var w = this._getPageInfo(e);
|
|
86
|
+
return w.pageIndex != null && u(d, {
|
|
87
|
+
x: w.contentPosition[0],
|
|
88
|
+
y: w.contentPosition[1]
|
|
89
|
+
}, _ ? e : null), this._updatePageInfoView(e, w), S;
|
|
90
|
+
}, p.prototype._pageGo = function(e, t, n) {
|
|
91
|
+
var r = this._getPageInfo(t)[e];
|
|
92
|
+
r != null && n.dispatchAction({
|
|
93
|
+
type: "legendScroll",
|
|
94
|
+
scrollDataIndex: r,
|
|
95
|
+
legendId: t.id
|
|
96
|
+
});
|
|
97
|
+
}, p.prototype._updatePageInfoView = function(e, t) {
|
|
98
|
+
var r = this._controllerGroup;
|
|
99
|
+
n(["pagePrev", "pageNext"], function(n) {
|
|
100
|
+
var i = t[n + "DataIndex"] != null, a = r.childOfName(n);
|
|
101
|
+
a && (a.setStyle("fill", i ? e.get("pageIconColor", !0) : e.get("pageIconInactiveColor", !0)), a.cursor = i ? "pointer" : "default");
|
|
102
|
+
});
|
|
103
|
+
var a = r.childOfName("pageText"), o = e.get("pageFormatter"), s = t.pageIndex, c = s == null ? 0 : s + 1, l = t.pageCount;
|
|
104
|
+
a && o && a.setStyle("text", i(o) ? o.replace("{current}", c == null ? "" : c + "").replace("{total}", l == null ? "" : l + "") : o({
|
|
105
|
+
current: c,
|
|
106
|
+
total: l
|
|
107
|
+
}));
|
|
108
|
+
}, p.prototype._getPageInfo = function(e) {
|
|
109
|
+
var t = e.get("scrollDataIndex", !0), n = this.getContentGroup(), r = this._containerGroup.__rectSize, i = e.getOrient().index, a = h[i], o = g[i], s = this._findTargetItemIndex(t), c = n.children(), l = c[s], u = c.length, d = +!!u, f = {
|
|
110
|
+
contentPosition: [n.x, n.y],
|
|
111
|
+
pageCount: d,
|
|
112
|
+
pageIndex: d - 1,
|
|
113
|
+
pagePrevDataIndex: null,
|
|
114
|
+
pageNextDataIndex: null
|
|
115
|
+
};
|
|
116
|
+
if (!l) return f;
|
|
117
|
+
var p = b(l);
|
|
118
|
+
f.contentPosition[i] = -p.s;
|
|
119
|
+
for (var m = s + 1, _ = p, v = p, y = null; m <= u; ++m) y = b(c[m]), (!y && v.e > _.s + r || y && !x(y, _.s)) && (_ = v.i > _.i ? v : y, _ && (f.pageNextDataIndex ??= _.i, ++f.pageCount)), v = y;
|
|
120
|
+
for (var m = s - 1, _ = p, v = p, y = null; m >= -1; --m) y = b(c[m]), (!y || !x(v, y.s)) && _.i < v.i && (v = _, f.pagePrevDataIndex ??= _.i, ++f.pageCount, ++f.pageIndex), _ = y;
|
|
121
|
+
return f;
|
|
122
|
+
function b(e) {
|
|
123
|
+
if (e) {
|
|
124
|
+
var t = e.getBoundingRect(), n = t[o] + e[o];
|
|
125
|
+
return {
|
|
126
|
+
s: n,
|
|
127
|
+
e: n + t[a],
|
|
128
|
+
i: e.__legendDataIndex
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function x(e, t) {
|
|
133
|
+
return e.e >= t && e.s <= t + r;
|
|
134
|
+
}
|
|
135
|
+
}, p.prototype._findTargetItemIndex = function(e) {
|
|
136
|
+
if (!this._showController) return 0;
|
|
137
|
+
var t, n = this.getContentGroup(), r;
|
|
138
|
+
return n.eachChild(function(n, i) {
|
|
139
|
+
var a = n.__legendDataIndex;
|
|
140
|
+
r == null && a != null && (r = i), a === e && (t = i);
|
|
141
|
+
}), t ?? r;
|
|
142
|
+
}, p.type = "legend.scroll", p;
|
|
143
|
+
}(p);
|
|
144
|
+
//#endregion
|
|
145
|
+
export { _ as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { use as e } from "../../extension.js";
|
|
2
|
+
import { install as t } from "./installLegendPlain.js";
|
|
3
|
+
import { install as n } from "./installLegendScroll.js";
|
|
4
|
+
//#region node_modules/echarts/lib/component/legend/install.js
|
|
5
|
+
function r(r) {
|
|
6
|
+
e(t), e(n);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { r as install };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import e from "./LegendModel.js";
|
|
2
|
+
import t from "./LegendView.js";
|
|
3
|
+
import { installLegendAction as n } from "./legendAction.js";
|
|
4
|
+
import { legendFilterStageHandler as r } from "./legendFilter.js";
|
|
5
|
+
//#region node_modules/echarts/lib/component/legend/installLegendPlain.js
|
|
6
|
+
function i(i) {
|
|
7
|
+
i.registerComponentModel(e), i.registerComponentView(t), i.registerProcessor(i.PRIORITY.PROCESSOR.SERIES_FILTER, r), i.registerSubTypeDefaulter("legend", function() {
|
|
8
|
+
return "plain";
|
|
9
|
+
}), n(i);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { i as install };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { use as e } from "../../extension.js";
|
|
2
|
+
import { install as t } from "./installLegendPlain.js";
|
|
3
|
+
import n from "./ScrollableLegendModel.js";
|
|
4
|
+
import r from "./ScrollableLegendView.js";
|
|
5
|
+
import i from "./scrollableLegendAction.js";
|
|
6
|
+
//#region node_modules/echarts/lib/component/legend/installLegendScroll.js
|
|
7
|
+
function a(a) {
|
|
8
|
+
e(t), a.registerComponentModel(n), a.registerComponentView(r), i(a);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { a as install };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { curry as e, each as t, hasOwn as n } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
//#region node_modules/echarts/lib/component/legend/legendAction.js
|
|
3
|
+
function r(e, n, r) {
|
|
4
|
+
var a = e === "allSelect" || e === "inverseSelect", o = {}, s = [];
|
|
5
|
+
r.eachComponent({
|
|
6
|
+
mainType: "legend",
|
|
7
|
+
query: n
|
|
8
|
+
}, function(t) {
|
|
9
|
+
a ? t[e]() : t[e](n.name), i(t, o), s.push(t.componentIndex);
|
|
10
|
+
});
|
|
11
|
+
var c = {};
|
|
12
|
+
return r.eachComponent("legend", function(e) {
|
|
13
|
+
t(o, function(t, n) {
|
|
14
|
+
e[t ? "select" : "unSelect"](n);
|
|
15
|
+
}), i(e, c);
|
|
16
|
+
}), a ? {
|
|
17
|
+
selected: c,
|
|
18
|
+
legendIndex: s
|
|
19
|
+
} : {
|
|
20
|
+
name: n.name,
|
|
21
|
+
selected: c
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function i(e, r) {
|
|
25
|
+
var i = r || {};
|
|
26
|
+
return t(e.getData(), function(t) {
|
|
27
|
+
var r = t.get("name");
|
|
28
|
+
if (!(r === "\n" || r === "")) {
|
|
29
|
+
var a = e.isSelected(r);
|
|
30
|
+
n(i, r) ? i[r] = i[r] && a : i[r] = a;
|
|
31
|
+
}
|
|
32
|
+
}), i;
|
|
33
|
+
}
|
|
34
|
+
function a(t) {
|
|
35
|
+
t.registerAction("legendToggleSelect", "legendselectchanged", e(r, "toggleSelected")), t.registerAction("legendAllSelect", "legendselectall", e(r, "allSelect")), t.registerAction("legendInverseSelect", "legendinverseselect", e(r, "inverseSelect")), t.registerAction("legendSelect", "legendselected", e(r, "select")), t.registerAction("legendUnSelect", "legendunselected", e(r, "unSelect"));
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { a as installLegendAction };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createSimpleOverallStageHandler2 as e } from "../../util/model.js";
|
|
2
|
+
//#region node_modules/echarts/lib/component/legend/legendFilter.js
|
|
3
|
+
var t = e(n);
|
|
4
|
+
function n(e) {
|
|
5
|
+
var t = e.findComponents({ mainType: "legend" });
|
|
6
|
+
t && t.length && e.filterSeries(function(e) {
|
|
7
|
+
for (var n = 0; n < t.length; n++) if (!t[n].isSelected(e.name)) return !1;
|
|
8
|
+
return !0;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { t as legendFilterStageHandler };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region node_modules/echarts/lib/component/legend/scrollableLegendAction.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
e.registerAction("legendScroll", "legendscroll", function(e, t) {
|
|
4
|
+
var n = e.scrollDataIndex;
|
|
5
|
+
n != null && t.eachComponent({
|
|
6
|
+
mainType: "legend",
|
|
7
|
+
subType: "scroll",
|
|
8
|
+
query: e
|
|
9
|
+
}, function(e) {
|
|
10
|
+
e.setScrollDataIndex(n);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { e as default };
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { bind as e, each as t, indexOf as n, isArray as r, isDom as i, isFunction as a, isString as o, retrieve2 as s } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import c from "../../../../zrender/lib/core/env.js";
|
|
3
|
+
import { transformLocalCoord as l, transformLocalCoordClear as u } from "../../../../zrender/lib/core/dom.js";
|
|
4
|
+
import { convertToColorString as d, normalizeCssArray as f, toCamelCase as p } from "../../util/format.js";
|
|
5
|
+
import { getPaddingFromTooltipModel as m } from "./tooltipMarkup.js";
|
|
6
|
+
import { normalizeEvent as h } from "../../../../zrender/lib/core/event.js";
|
|
7
|
+
import { TRANSFORM_VENDOR as g, TRANSITION_VENDOR as _, getComputedStyle as v, shouldTooltipConfine as y, toCSSVendorPrefix as b } from "./helper.js";
|
|
8
|
+
//#region node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js
|
|
9
|
+
var x = b(_, "transition"), S = b(g, "transform"), C = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (c.transform3dSupported ? "will-change:transform;" : "");
|
|
10
|
+
function w(e) {
|
|
11
|
+
return e = e === "left" ? "right" : e === "right" ? "left" : e === "top" ? "bottom" : "top", e;
|
|
12
|
+
}
|
|
13
|
+
function T(e, t, r) {
|
|
14
|
+
if (!o(r) || r === "inside") return "";
|
|
15
|
+
var i = e.get("backgroundColor"), a = e.get("borderWidth");
|
|
16
|
+
t = d(t);
|
|
17
|
+
var s = w(r), c = Math.max(Math.round(a) * 1.5, 6), l = "", u = S + ":", f;
|
|
18
|
+
n(["left", "right"], s) > -1 ? (l += "top:50%", u += "translateY(-50%) rotate(" + (f = s === "left" ? -225 : -45) + "deg)") : (l += "left:50%", u += "translateX(-50%) rotate(" + (f = s === "top" ? 225 : 45) + "deg)");
|
|
19
|
+
var p = f * Math.PI / 180, m = c + a, h = m * Math.abs(Math.cos(p)) + m * Math.abs(Math.sin(p)), g = Math.round(((h - Math.SQRT2 * a) / 2 + Math.SQRT2 * a - (h - m) / 2) * 100) / 100;
|
|
20
|
+
l += ";" + s + ":-" + g + "px";
|
|
21
|
+
var _ = t + " solid " + a + "px;";
|
|
22
|
+
return "<div style=\"" + [
|
|
23
|
+
"position:absolute;width:" + c + "px;height:" + c + "px;z-index:-1;",
|
|
24
|
+
l + ";" + u + ";",
|
|
25
|
+
"border-bottom:" + _,
|
|
26
|
+
"border-right:" + _,
|
|
27
|
+
"background-color:" + i + ";"
|
|
28
|
+
].join("") + "\"></div>";
|
|
29
|
+
}
|
|
30
|
+
function E(e, t, n) {
|
|
31
|
+
var r = "cubic-bezier(0.23,1,0.32,1)", i = "", a = "";
|
|
32
|
+
return n && (i = " " + e / 2 + "s " + r, a = "opacity" + i + ",visibility" + i), t || (i = " " + e + "s " + r, a += (a.length ? "," : "") + (c.transformSupported ? "" + S + i : ",left" + i + ",top" + i)), x + ":" + a;
|
|
33
|
+
}
|
|
34
|
+
function D(e, t, n) {
|
|
35
|
+
var r = e.toFixed(0) + "px", i = t.toFixed(0) + "px";
|
|
36
|
+
if (!c.transformSupported) return n ? "top:" + i + ";left:" + r + ";" : [["top", i], ["left", r]];
|
|
37
|
+
var a = c.transform3dSupported, o = "translate" + (a ? "3d" : "") + "(" + r + "," + i + (a ? ",0" : "") + ")";
|
|
38
|
+
return n ? "top:0;left:0;" + S + ":" + o + ";" : [
|
|
39
|
+
["top", 0],
|
|
40
|
+
["left", 0],
|
|
41
|
+
[g, o]
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
function O(e) {
|
|
45
|
+
var n = [], r = e.get("fontSize"), i = e.getTextColor();
|
|
46
|
+
i && n.push("color:" + i), n.push("font:" + e.getFont());
|
|
47
|
+
var a = s(e.get("lineHeight"), Math.round(r * 3 / 2));
|
|
48
|
+
r && n.push("line-height:" + a + "px");
|
|
49
|
+
var o = e.get("textShadowColor"), c = e.get("textShadowBlur") || 0, l = e.get("textShadowOffsetX") || 0, u = e.get("textShadowOffsetY") || 0;
|
|
50
|
+
return o && c && n.push("text-shadow:" + l + "px " + u + "px " + c + "px " + o), t(["decoration", "align"], function(t) {
|
|
51
|
+
var r = e.get(t);
|
|
52
|
+
r && n.push("text-" + t + ":" + r);
|
|
53
|
+
}), n.join(";");
|
|
54
|
+
}
|
|
55
|
+
function k(e, n, r, i) {
|
|
56
|
+
var a = [], o = e.get("transitionDuration"), s = e.get("backgroundColor"), c = e.get("shadowBlur"), l = e.get("shadowColor"), u = e.get("shadowOffsetX"), d = e.get("shadowOffsetY"), h = e.getModel("textStyle"), g = m(e, "html"), _ = u + "px " + d + "px " + c + "px " + l;
|
|
57
|
+
return a.push("box-shadow:" + _), n && o > 0 && a.push(E(o, r, i)), s && a.push("background-color:" + s), t([
|
|
58
|
+
"width",
|
|
59
|
+
"color",
|
|
60
|
+
"radius"
|
|
61
|
+
], function(t) {
|
|
62
|
+
var n = "border-" + t, r = p(n), i = e.get(r);
|
|
63
|
+
i != null && a.push(n + ":" + i + (t === "color" ? "" : "px"));
|
|
64
|
+
}), a.push(O(h)), g != null && a.push("padding:" + f(g).join("px ") + "px"), a.join(";") + ";";
|
|
65
|
+
}
|
|
66
|
+
function A(e, t, n, r, i) {
|
|
67
|
+
var a = t && t.painter;
|
|
68
|
+
if (n) {
|
|
69
|
+
var o = a && a.getViewportRoot();
|
|
70
|
+
o && l(e, o, n, r, i);
|
|
71
|
+
} else {
|
|
72
|
+
e[0] = r, e[1] = i;
|
|
73
|
+
var s = a && a.getViewportRootOffset();
|
|
74
|
+
s && (e[0] += s.offsetLeft, e[1] += s.offsetTop);
|
|
75
|
+
}
|
|
76
|
+
e[2] = e[0] / t.getWidth(), e[3] = e[1] / t.getHeight();
|
|
77
|
+
}
|
|
78
|
+
var j = function() {
|
|
79
|
+
function n(e, t) {
|
|
80
|
+
if (this._show = !1, this._styleCoord = [
|
|
81
|
+
0,
|
|
82
|
+
0,
|
|
83
|
+
0,
|
|
84
|
+
0
|
|
85
|
+
], this._enterable = !0, this._alwaysShowContent = !1, this._firstShow = !0, this._longHide = !0, c.wxa) return null;
|
|
86
|
+
var n = document.createElement("div");
|
|
87
|
+
n.domBelongToZr = !0, this.el = n;
|
|
88
|
+
var r = this._zr = e.getZr(), s = t.appendTo, l = s && (o(s) ? document.querySelector(s) : i(s) ? s : a(s) && s(e.getDom()));
|
|
89
|
+
A(this._styleCoord, r, l, e.getWidth() / 2, e.getHeight() / 2), (l || e.getDom()).appendChild(n), this._api = e, this._container = l;
|
|
90
|
+
var u = this;
|
|
91
|
+
n.onmouseenter = function() {
|
|
92
|
+
u._enterable && (clearTimeout(u._hideTimeout), u._show = !0), u._inContent = !0;
|
|
93
|
+
}, n.onmousemove = function(e) {
|
|
94
|
+
if (e ||= window.event, !u._enterable) {
|
|
95
|
+
var t = r.handler;
|
|
96
|
+
h(r.painter.getViewportRoot(), e, !0), t.dispatch("mousemove", e);
|
|
97
|
+
}
|
|
98
|
+
}, n.onmouseleave = function() {
|
|
99
|
+
u._inContent = !1, u._enterable && u._show && u.hideLater(u._hideDelay);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return n.prototype.update = function(e) {
|
|
103
|
+
if (!this._container) {
|
|
104
|
+
var t = this._api.getDom(), n = v(t, "position"), r = t.style;
|
|
105
|
+
r.position !== "absolute" && n !== "absolute" && (r.position = "relative");
|
|
106
|
+
}
|
|
107
|
+
var i = e.get("alwaysShowContent");
|
|
108
|
+
i && this._moveIfResized(), this._alwaysShowContent = i, this._enableDisplayTransition = e.get("displayTransition") && e.get("transitionDuration") > 0, this.el.className = e.get("className") || "";
|
|
109
|
+
}, n.prototype.show = function(e, t) {
|
|
110
|
+
clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
|
|
111
|
+
var n = this.el, r = n.style, i = this._styleCoord;
|
|
112
|
+
n.innerHTML ? r.cssText = C + k(e, !this._firstShow, this._longHide, this._enableDisplayTransition) + D(i[0], i[1], !0) + ("border-color:" + d(t) + ";") + (e.get("extraCssText") || "") + (";pointer-events:" + (this._enterable ? "auto" : "none")) : r.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1;
|
|
113
|
+
}, n.prototype.setContent = function(e, t, n, a, s) {
|
|
114
|
+
var c = this.el;
|
|
115
|
+
if (e == null) {
|
|
116
|
+
c.innerHTML = "";
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
var l = "";
|
|
120
|
+
if (o(s) && n.get("trigger") === "item" && !y(n) && (l = T(n, a, s)), o(e)) c.innerHTML = e + l;
|
|
121
|
+
else if (e) {
|
|
122
|
+
c.innerHTML = "", r(e) || (e = [e]);
|
|
123
|
+
for (var u = 0; u < e.length; u++) i(e[u]) && e[u].parentNode !== c && c.appendChild(e[u]);
|
|
124
|
+
if (l && c.childNodes.length) {
|
|
125
|
+
var d = document.createElement("div");
|
|
126
|
+
d.innerHTML = l, c.appendChild(d);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}, n.prototype.setEnterable = function(e) {
|
|
130
|
+
this._enterable = e;
|
|
131
|
+
}, n.prototype.getSize = function() {
|
|
132
|
+
var e = this.el;
|
|
133
|
+
return e ? [e.offsetWidth, e.offsetHeight] : [0, 0];
|
|
134
|
+
}, n.prototype.moveTo = function(e, n) {
|
|
135
|
+
if (this.el) {
|
|
136
|
+
var r = this._styleCoord;
|
|
137
|
+
if (A(r, this._zr, this._container, e, n), r[0] != null && r[1] != null) {
|
|
138
|
+
var i = this.el.style;
|
|
139
|
+
t(D(r[0], r[1]), function(e) {
|
|
140
|
+
i[e[0]] = e[1];
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}, n.prototype._moveIfResized = function() {
|
|
145
|
+
var e = this._styleCoord[2], t = this._styleCoord[3];
|
|
146
|
+
this.moveTo(e * this._zr.getWidth(), t * this._zr.getHeight());
|
|
147
|
+
}, n.prototype.hide = function() {
|
|
148
|
+
var e = this, t = this.el.style;
|
|
149
|
+
this._enableDisplayTransition ? (t.visibility = "hidden", t.opacity = "0") : t.display = "none", c.transform3dSupported && (t.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout(function() {
|
|
150
|
+
return e._longHide = !0;
|
|
151
|
+
}, 500);
|
|
152
|
+
}, n.prototype.hideLater = function(t) {
|
|
153
|
+
this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(e(this.hide, this), t)) : this.hide());
|
|
154
|
+
}, n.prototype.isShow = function() {
|
|
155
|
+
return this._show;
|
|
156
|
+
}, n.prototype.dispose = function() {
|
|
157
|
+
clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
|
|
158
|
+
var e = this._zr;
|
|
159
|
+
u(e && e.painter && e.painter.getViewportRoot(), this._container);
|
|
160
|
+
var t = this.el;
|
|
161
|
+
if (t) {
|
|
162
|
+
t.onmouseenter = t.onmousemove = t.onmouseleave = null;
|
|
163
|
+
var n = t.parentNode;
|
|
164
|
+
n && n.removeChild(t);
|
|
165
|
+
}
|
|
166
|
+
this.el = this._container = null;
|
|
167
|
+
}, n;
|
|
168
|
+
}();
|
|
169
|
+
//#endregion
|
|
170
|
+
export { j as default };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { __extends as e } from "../../../node_modules/tslib/tslib.es6.js";
|
|
2
|
+
import t from "../../model/Component.js";
|
|
3
|
+
import n from "../../visual/tokens.js";
|
|
4
|
+
//#region node_modules/echarts/lib/component/tooltip/TooltipModel.js
|
|
5
|
+
var r = function(t) {
|
|
6
|
+
e(r, t);
|
|
7
|
+
function r() {
|
|
8
|
+
var e = t !== null && t.apply(this, arguments) || this;
|
|
9
|
+
return e.type = r.type, e;
|
|
10
|
+
}
|
|
11
|
+
return r.type = "tooltip", r.dependencies = ["axisPointer"], r.defaultOption = {
|
|
12
|
+
z: 60,
|
|
13
|
+
show: !0,
|
|
14
|
+
showContent: !0,
|
|
15
|
+
trigger: "item",
|
|
16
|
+
triggerOn: "mousemove|click|mousewheel",
|
|
17
|
+
alwaysShowContent: !1,
|
|
18
|
+
renderMode: "auto",
|
|
19
|
+
confine: null,
|
|
20
|
+
showDelay: 0,
|
|
21
|
+
hideDelay: 100,
|
|
22
|
+
transitionDuration: .4,
|
|
23
|
+
displayTransition: !0,
|
|
24
|
+
enterable: !1,
|
|
25
|
+
backgroundColor: n.color.neutral00,
|
|
26
|
+
shadowBlur: 10,
|
|
27
|
+
shadowColor: "rgba(0, 0, 0, .2)",
|
|
28
|
+
shadowOffsetX: 1,
|
|
29
|
+
shadowOffsetY: 2,
|
|
30
|
+
borderRadius: 4,
|
|
31
|
+
borderWidth: 1,
|
|
32
|
+
defaultBorderColor: n.color.border,
|
|
33
|
+
padding: null,
|
|
34
|
+
extraCssText: "",
|
|
35
|
+
axisPointer: {
|
|
36
|
+
type: "line",
|
|
37
|
+
axis: "auto",
|
|
38
|
+
animation: "auto",
|
|
39
|
+
animationDurationUpdate: 200,
|
|
40
|
+
animationEasingUpdate: "exponentialOut",
|
|
41
|
+
crossStyle: {
|
|
42
|
+
color: n.color.borderShade,
|
|
43
|
+
width: 1,
|
|
44
|
+
type: "dashed",
|
|
45
|
+
textStyle: {}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
textStyle: {
|
|
49
|
+
color: n.color.tertiary,
|
|
50
|
+
fontSize: 14
|
|
51
|
+
}
|
|
52
|
+
}, r;
|
|
53
|
+
}(t);
|
|
54
|
+
//#endregion
|
|
55
|
+
export { r as default };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { bind as e, each as t, isObject as n } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import { throwError as r } from "../../util/log.js";
|
|
3
|
+
import i from "../../../../zrender/lib/graphic/Text.js";
|
|
4
|
+
import { getPaddingFromTooltipModel as a } from "./tooltipMarkup.js";
|
|
5
|
+
//#region node_modules/echarts/lib/component/tooltip/TooltipRichContent.js
|
|
6
|
+
var o = function() {
|
|
7
|
+
function o(e) {
|
|
8
|
+
this._show = !1, this._styleCoord = [
|
|
9
|
+
0,
|
|
10
|
+
0,
|
|
11
|
+
0,
|
|
12
|
+
0
|
|
13
|
+
], this._alwaysShowContent = !1, this._enterable = !0, this._zr = e.getZr(), l(this._styleCoord, this._zr, e.getWidth() / 2, e.getHeight() / 2);
|
|
14
|
+
}
|
|
15
|
+
return o.prototype.update = function(e) {
|
|
16
|
+
var t = e.get("alwaysShowContent");
|
|
17
|
+
t && this._moveIfResized(), this._alwaysShowContent = t;
|
|
18
|
+
}, o.prototype.show = function() {
|
|
19
|
+
this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0;
|
|
20
|
+
}, o.prototype.setContent = function(e, o, s, c, l) {
|
|
21
|
+
var u = this;
|
|
22
|
+
n(e) && r(process.env.NODE_ENV === "production" ? "" : "Passing DOM nodes as content is not supported in richText tooltip!"), this.el && this._zr.remove(this.el);
|
|
23
|
+
var d = s.getModel("textStyle");
|
|
24
|
+
this.el = new i({
|
|
25
|
+
style: {
|
|
26
|
+
rich: o.richTextStyles,
|
|
27
|
+
text: e,
|
|
28
|
+
lineHeight: 22,
|
|
29
|
+
borderWidth: 1,
|
|
30
|
+
borderColor: c,
|
|
31
|
+
textShadowColor: d.get("textShadowColor"),
|
|
32
|
+
fill: s.get(["textStyle", "color"]),
|
|
33
|
+
padding: a(s, "richText"),
|
|
34
|
+
verticalAlign: "top",
|
|
35
|
+
align: "left"
|
|
36
|
+
},
|
|
37
|
+
z: s.get("z")
|
|
38
|
+
}), t([
|
|
39
|
+
"backgroundColor",
|
|
40
|
+
"borderRadius",
|
|
41
|
+
"shadowColor",
|
|
42
|
+
"shadowBlur",
|
|
43
|
+
"shadowOffsetX",
|
|
44
|
+
"shadowOffsetY"
|
|
45
|
+
], function(e) {
|
|
46
|
+
u.el.style[e] = s.get(e);
|
|
47
|
+
}), t([
|
|
48
|
+
"textShadowBlur",
|
|
49
|
+
"textShadowOffsetX",
|
|
50
|
+
"textShadowOffsetY"
|
|
51
|
+
], function(e) {
|
|
52
|
+
u.el.style[e] = d.get(e) || 0;
|
|
53
|
+
}), this._zr.add(this.el);
|
|
54
|
+
var f = this;
|
|
55
|
+
this.el.on("mouseover", function() {
|
|
56
|
+
f._enterable && (clearTimeout(f._hideTimeout), f._show = !0), f._inContent = !0;
|
|
57
|
+
}), this.el.on("mouseout", function() {
|
|
58
|
+
f._enterable && f._show && f.hideLater(f._hideDelay), f._inContent = !1;
|
|
59
|
+
});
|
|
60
|
+
}, o.prototype.setEnterable = function(e) {
|
|
61
|
+
this._enterable = e;
|
|
62
|
+
}, o.prototype.getSize = function() {
|
|
63
|
+
var e = this.el, t = this.el.getBoundingRect(), n = c(e.style);
|
|
64
|
+
return [t.width + n.left + n.right, t.height + n.top + n.bottom];
|
|
65
|
+
}, o.prototype.moveTo = function(e, t) {
|
|
66
|
+
var n = this.el;
|
|
67
|
+
if (n) {
|
|
68
|
+
var r = this._styleCoord;
|
|
69
|
+
l(r, this._zr, e, t), e = r[0], t = r[1];
|
|
70
|
+
var i = n.style, a = s(i.borderWidth || 0), o = c(i);
|
|
71
|
+
n.x = e + a + o.left, n.y = t + a + o.top, n.markRedraw();
|
|
72
|
+
}
|
|
73
|
+
}, o.prototype._moveIfResized = function() {
|
|
74
|
+
var e = this._styleCoord[2], t = this._styleCoord[3];
|
|
75
|
+
this.moveTo(e * this._zr.getWidth(), t * this._zr.getHeight());
|
|
76
|
+
}, o.prototype.hide = function() {
|
|
77
|
+
this.el && this.el.hide(), this._show = !1;
|
|
78
|
+
}, o.prototype.hideLater = function(t) {
|
|
79
|
+
this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(e(this.hide, this), t)) : this.hide());
|
|
80
|
+
}, o.prototype.isShow = function() {
|
|
81
|
+
return this._show;
|
|
82
|
+
}, o.prototype.dispose = function() {
|
|
83
|
+
this._zr.remove(this.el);
|
|
84
|
+
}, o;
|
|
85
|
+
}();
|
|
86
|
+
function s(e) {
|
|
87
|
+
return Math.max(0, e);
|
|
88
|
+
}
|
|
89
|
+
function c(e) {
|
|
90
|
+
var t = s(e.shadowBlur || 0), n = s(e.shadowOffsetX || 0), r = s(e.shadowOffsetY || 0);
|
|
91
|
+
return {
|
|
92
|
+
left: s(t - n),
|
|
93
|
+
right: s(t + n),
|
|
94
|
+
top: s(t - r),
|
|
95
|
+
bottom: s(t + r)
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function l(e, t, n, r) {
|
|
99
|
+
e[0] = n, e[1] = r, e[2] = e[0] / t.getWidth(), e[3] = e[1] / t.getHeight();
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { o as default };
|