reke-ui 0.3.0 → 0.4.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 +6 -0
- package/custom-elements.json +1888 -445
- 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 +21 -1
- package/dist/components/reke-combobox/reke-combobox.d.ts.map +1 -1
- package/dist/components/reke-combobox/reke-combobox.js +76 -16
- package/dist/components/reke-combobox/reke-combobox.styles.d.ts.map +1 -1
- package/dist/components/reke-combobox/reke-combobox.styles.js +128 -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 +202 -3
- package/dist/components/reke-table/reke-table.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.js +244 -64
- package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.styles.js +29 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -7
- 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 +8 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +58 -46
- 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 +15 -1
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
import { extend as e, filter as t, guid as n, indexOf as r, isArrayLike as i, isGradientObject as a, isObject as o, isTypedArray as s, keys as c, logError as l, mixin as u, reduce as d } from "./core/util.js";
|
|
2
|
+
import { invert as f } from "./core/matrix.js";
|
|
3
|
+
import p, { TRANSFORMABLE_PROPS as m } from "./core/Transformable.js";
|
|
4
|
+
import { parse as h, stringify as g } from "./tool/color.js";
|
|
5
|
+
import _, { cloneValue as v } from "./animation/Animator.js";
|
|
6
|
+
import y from "./core/BoundingRect.js";
|
|
7
|
+
import b from "./core/Eventful.js";
|
|
8
|
+
import { calculateTextPosition as x, parsePercent as S } from "./contain/text.js";
|
|
9
|
+
import { DARK_LABEL_COLOR as C, LIGHT_LABEL_COLOR as w } from "./config.js";
|
|
10
|
+
//#region node_modules/zrender/lib/Element.js
|
|
11
|
+
var T = "__zr_normal__", E = m.concat(["ignore"]), D = d(m, function(e, t) {
|
|
12
|
+
return e[t] = !0, e;
|
|
13
|
+
}, { ignore: !1 }), O = {}, k = new y(0, 0, 0, 0), A = [], j = function() {
|
|
14
|
+
function t(e) {
|
|
15
|
+
this.id = n(), this.animators = [], this.currentStates = [], this.states = {}, this._init(e);
|
|
16
|
+
}
|
|
17
|
+
return t.prototype._init = function(e) {
|
|
18
|
+
this.attr(e);
|
|
19
|
+
}, t.prototype.drift = function(e, t, n) {
|
|
20
|
+
switch (this.draggable) {
|
|
21
|
+
case "horizontal":
|
|
22
|
+
t = 0;
|
|
23
|
+
break;
|
|
24
|
+
case "vertical":
|
|
25
|
+
e = 0;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
var r = this.transform;
|
|
29
|
+
r ||= this.transform = [
|
|
30
|
+
1,
|
|
31
|
+
0,
|
|
32
|
+
0,
|
|
33
|
+
1,
|
|
34
|
+
0,
|
|
35
|
+
0
|
|
36
|
+
], r[4] += e, r[5] += t, this.decomposeTransform(), this.markRedraw();
|
|
37
|
+
}, t.prototype.beforeUpdate = function() {}, t.prototype.afterUpdate = function() {}, t.prototype.update = function() {
|
|
38
|
+
this.updateTransform(), this.__dirty && this.updateInnerText();
|
|
39
|
+
}, t.prototype.updateInnerText = function(e) {
|
|
40
|
+
var t = this._textContent;
|
|
41
|
+
if (t && (!t.ignore || e)) {
|
|
42
|
+
this.textConfig ||= {};
|
|
43
|
+
var n = this.textConfig, r = n.local, i = t.innerTransformable, a = void 0, o = void 0, s = !1;
|
|
44
|
+
i.parent = r ? this : null;
|
|
45
|
+
var c = !1;
|
|
46
|
+
i.copyTransform(t);
|
|
47
|
+
var l = n.position != null, u = n.autoOverflowArea, d = void 0;
|
|
48
|
+
if ((u || l) && (d = k, n.layoutRect ? d.copy(n.layoutRect) : d.copy(this.getBoundingRect()), r || d.applyTransform(this.transform)), l) {
|
|
49
|
+
this.calculateTextPosition ? this.calculateTextPosition(O, n, d) : x(O, n, d), i.x = O.x, i.y = O.y, a = O.align, o = O.verticalAlign;
|
|
50
|
+
var p = n.origin;
|
|
51
|
+
if (p && n.rotation != null) {
|
|
52
|
+
var m = void 0, h = void 0;
|
|
53
|
+
p === "center" ? (m = d.width * .5, h = d.height * .5) : (m = S(p[0], d.width), h = S(p[1], d.height)), c = !0, i.originX = -i.x + m + (r ? 0 : d.x), i.originY = -i.y + h + (r ? 0 : d.y);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
n.rotation != null && (i.rotation = n.rotation);
|
|
57
|
+
var g = n.offset;
|
|
58
|
+
g && (i.x += g[0], i.y += g[1], c || (i.originX = -g[0], i.originY = -g[1]));
|
|
59
|
+
var _ = this._innerTextDefaultStyle ||= {};
|
|
60
|
+
if (u) {
|
|
61
|
+
var v = _.overflowRect = _.overflowRect || new y(0, 0, 0, 0);
|
|
62
|
+
i.getLocalTransform(A), f(A, A), y.copy(v, d), v.applyTransform(A);
|
|
63
|
+
} else _.overflowRect = null;
|
|
64
|
+
var b = n.inside == null ? typeof n.position == "string" && n.position.indexOf("inside") >= 0 : n.inside, C = void 0, w = void 0, T = void 0;
|
|
65
|
+
b && this.canBeInsideText() ? (C = n.insideFill, w = n.insideStroke, (C == null || C === "auto") && (C = this.getInsideTextFill()), (w == null || w === "auto") && (w = this.getInsideTextStroke(C), T = !0)) : (C = n.outsideFill, w = n.outsideStroke, (C == null || C === "auto") && (C = this.getOutsideFill()), (w == null || w === "auto") && (w = this.getOutsideStroke(C), T = !0)), C ||= "#000", (C !== _.fill || w !== _.stroke || T !== _.autoStroke || a !== _.align || o !== _.verticalAlign) && (s = !0, _.fill = C, _.stroke = w, _.autoStroke = T, _.align = a, _.verticalAlign = o, t.setDefaultTextStyle(_)), t.__dirty |= 1, s && t.dirtyStyle(!0);
|
|
66
|
+
}
|
|
67
|
+
}, t.prototype.canBeInsideText = function() {
|
|
68
|
+
return !0;
|
|
69
|
+
}, t.prototype.getInsideTextFill = function() {
|
|
70
|
+
return "#fff";
|
|
71
|
+
}, t.prototype.getInsideTextStroke = function(e) {
|
|
72
|
+
return "#000";
|
|
73
|
+
}, t.prototype.getOutsideFill = function() {
|
|
74
|
+
return this.__zr && this.__zr.isDarkMode() ? w : C;
|
|
75
|
+
}, t.prototype.getOutsideStroke = function(e) {
|
|
76
|
+
var t = this.__zr && this.__zr.getBackgroundColor(), n = typeof t == "string" && h(t);
|
|
77
|
+
n ||= [
|
|
78
|
+
255,
|
|
79
|
+
255,
|
|
80
|
+
255,
|
|
81
|
+
1
|
|
82
|
+
];
|
|
83
|
+
for (var r = n[3], i = this.__zr.isDarkMode(), a = 0; a < 3; a++) n[a] = n[a] * r + (i ? 0 : 255) * (1 - r);
|
|
84
|
+
return n[3] = 1, g(n, "rgba");
|
|
85
|
+
}, t.prototype.traverse = function(e, t) {}, t.prototype.attrKV = function(t, n) {
|
|
86
|
+
t === "textConfig" ? this.setTextConfig(n) : t === "textContent" ? this.setTextContent(n) : t === "clipPath" ? this.setClipPath(n) : t === "extra" ? (this.extra = this.extra || {}, e(this.extra, n)) : this[t] = n;
|
|
87
|
+
}, t.prototype.hide = function() {
|
|
88
|
+
this.ignore = !0, this.markRedraw();
|
|
89
|
+
}, t.prototype.show = function() {
|
|
90
|
+
this.ignore = !1, this.markRedraw();
|
|
91
|
+
}, t.prototype.attr = function(e, t) {
|
|
92
|
+
if (typeof e == "string") this.attrKV(e, t);
|
|
93
|
+
else if (o(e)) for (var n = c(e), r = 0; r < n.length; r++) {
|
|
94
|
+
var i = n[r];
|
|
95
|
+
this.attrKV(i, e[i]);
|
|
96
|
+
}
|
|
97
|
+
return this.markRedraw(), this;
|
|
98
|
+
}, t.prototype.saveCurrentToNormalState = function(e) {
|
|
99
|
+
this._innerSaveToNormal(e);
|
|
100
|
+
for (var t = this._normalState, n = 0; n < this.animators.length; n++) {
|
|
101
|
+
var r = this.animators[n], i = r.__fromStateTransition;
|
|
102
|
+
if (!(r.getLoop() || i && i !== "__zr_normal__")) {
|
|
103
|
+
var a = r.targetName, o = a ? t[a] : t;
|
|
104
|
+
r.saveTo(o);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}, t.prototype._innerSaveToNormal = function(e) {
|
|
108
|
+
var t = this._normalState;
|
|
109
|
+
t ||= this._normalState = {}, e.textConfig && !t.textConfig && (t.textConfig = this.textConfig), this._savePrimaryToNormal(e, t, E);
|
|
110
|
+
}, t.prototype._savePrimaryToNormal = function(e, t, n) {
|
|
111
|
+
for (var r = 0; r < n.length; r++) {
|
|
112
|
+
var i = n[r];
|
|
113
|
+
e[i] != null && !(i in t) && (t[i] = this[i]);
|
|
114
|
+
}
|
|
115
|
+
}, t.prototype.hasState = function() {
|
|
116
|
+
return this.currentStates.length > 0;
|
|
117
|
+
}, t.prototype.getState = function(e) {
|
|
118
|
+
return this.states[e];
|
|
119
|
+
}, t.prototype.ensureState = function(e) {
|
|
120
|
+
var t = this.states;
|
|
121
|
+
return t[e] || (t[e] = {}), t[e];
|
|
122
|
+
}, t.prototype.clearStates = function(e) {
|
|
123
|
+
this.useState(T, !1, e);
|
|
124
|
+
}, t.prototype.useState = function(e, t, n, i) {
|
|
125
|
+
var a = e === T;
|
|
126
|
+
if (!(!this.hasState() && a)) {
|
|
127
|
+
var o = this.currentStates, s = this.stateTransition;
|
|
128
|
+
if (!(r(o, e) >= 0 && (t || o.length === 1))) {
|
|
129
|
+
var c;
|
|
130
|
+
if (this.stateProxy && !a && (c = this.stateProxy(e)), c ||= this.states && this.states[e], !c && !a) {
|
|
131
|
+
l("State " + e + " not exists.");
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
a || this.saveCurrentToNormalState(c);
|
|
135
|
+
var u = this._textContent, d = z(this, u, c, i);
|
|
136
|
+
d && !this.__inHover && (this.__inHover = d), this._applyStateObj(e, c, this._normalState, t, V(this, n, s), s);
|
|
137
|
+
var f = this._textGuide;
|
|
138
|
+
return u && u.useState(e, t, n, !!d), f && f.useState(e, t, n, !!d), a ? (this.currentStates = [], this._normalState = {}) : t ? this.currentStates.push(e) : this.currentStates = [e], this._updateAnimationTargets(), this.markRedraw(), !d && this.__inHover && (this.__inHover = 0, this.__dirty &= -2), c;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}, t.prototype.useStates = function(e, t, n) {
|
|
142
|
+
if (!e.length) this.clearStates();
|
|
143
|
+
else {
|
|
144
|
+
var r = [], i = this.currentStates, a = e.length, o = a === i.length;
|
|
145
|
+
if (o) {
|
|
146
|
+
for (var s = 0; s < a; s++) if (e[s] !== i[s]) {
|
|
147
|
+
o = !1;
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (o) return;
|
|
152
|
+
for (var s = 0; s < a; s++) {
|
|
153
|
+
var c = e[s], l = void 0;
|
|
154
|
+
this.stateProxy && (l = this.stateProxy(c, e)), l ||= this.states[c], l && r.push(l);
|
|
155
|
+
}
|
|
156
|
+
var u = r[a - 1], d = this._textContent, f = z(this, d, u, n);
|
|
157
|
+
f && !this.__inHover && (this.__inHover = f);
|
|
158
|
+
var p = this._mergeStates(r), m = this.stateTransition;
|
|
159
|
+
this.saveCurrentToNormalState(p), this._applyStateObj(e.join(","), p, this._normalState, !1, V(this, t, m), m);
|
|
160
|
+
var h = this._textGuide;
|
|
161
|
+
d && d.useStates(e, t, !!f), h && h.useStates(e, t, !!f), this._updateAnimationTargets(), this.currentStates = e.slice(), this.markRedraw(), !f && this.__inHover && (this.__inHover = 0, this.__dirty &= -2);
|
|
162
|
+
}
|
|
163
|
+
}, t.prototype.isSilent = function() {
|
|
164
|
+
for (var e = this; e;) {
|
|
165
|
+
if (e.silent) return !0;
|
|
166
|
+
var t = e.__hostTarget;
|
|
167
|
+
e = t ? e.ignoreHostSilent ? null : t : e.parent;
|
|
168
|
+
}
|
|
169
|
+
return !1;
|
|
170
|
+
}, t.prototype._updateAnimationTargets = function() {
|
|
171
|
+
for (var e = 0; e < this.animators.length; e++) {
|
|
172
|
+
var t = this.animators[e];
|
|
173
|
+
t.targetName && t.changeTarget(this[t.targetName]);
|
|
174
|
+
}
|
|
175
|
+
}, t.prototype.removeState = function(e) {
|
|
176
|
+
var t = r(this.currentStates, e);
|
|
177
|
+
if (t >= 0) {
|
|
178
|
+
var n = this.currentStates.slice();
|
|
179
|
+
n.splice(t, 1), this.useStates(n);
|
|
180
|
+
}
|
|
181
|
+
}, t.prototype.replaceState = function(e, t, n) {
|
|
182
|
+
var i = this.currentStates.slice(), a = r(i, e), o = r(i, t) >= 0;
|
|
183
|
+
a >= 0 ? o ? i.splice(a, 1) : i[a] = t : n && !o && i.push(t), this.useStates(i);
|
|
184
|
+
}, t.prototype.toggleState = function(e, t) {
|
|
185
|
+
t ? this.useState(e, !0) : this.removeState(e);
|
|
186
|
+
}, t.prototype._mergeStates = function(t) {
|
|
187
|
+
for (var n = {}, r, i = 0; i < t.length; i++) {
|
|
188
|
+
var a = t[i];
|
|
189
|
+
e(n, a), a.textConfig && (r ||= {}, e(r, a.textConfig));
|
|
190
|
+
}
|
|
191
|
+
return r && (n.textConfig = r), n;
|
|
192
|
+
}, t.prototype._applyStateObj = function(t, n, r, i, a, o) {
|
|
193
|
+
if (this.__inHover !== 1) {
|
|
194
|
+
var s = !(n && i);
|
|
195
|
+
n && n.textConfig ? (this.textConfig = e({}, i ? this.textConfig : r.textConfig), e(this.textConfig, n.textConfig)) : s && r.textConfig && (this.textConfig = r.textConfig);
|
|
196
|
+
for (var c = {}, l = !1, u = 0; u < E.length; u++) {
|
|
197
|
+
var d = E[u], f = a && D[d];
|
|
198
|
+
n && n[d] != null ? f ? (l = !0, c[d] = n[d]) : this[d] = n[d] : s && r[d] != null && (f ? (l = !0, c[d] = r[d]) : this[d] = r[d]);
|
|
199
|
+
}
|
|
200
|
+
if (!a) for (var u = 0; u < this.animators.length; u++) {
|
|
201
|
+
var p = this.animators[u], m = p.targetName;
|
|
202
|
+
p.getLoop() || p.__changeFinalValue(m ? (n || r)[m] : n || r);
|
|
203
|
+
}
|
|
204
|
+
l && this._transitionState(t, c, o);
|
|
205
|
+
}
|
|
206
|
+
}, t.prototype._attachComponent = function(e) {
|
|
207
|
+
if (e.__zr && !e.__hostTarget) {
|
|
208
|
+
if (process.env.NODE_ENV !== "production") throw Error("Text element has been added to zrender.");
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
if (e === this) {
|
|
212
|
+
if (process.env.NODE_ENV !== "production") throw Error("Recursive component attachment.");
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
var t = this.__zr;
|
|
216
|
+
t && e.addSelfToZr(t), e.__zr = t, e.__hostTarget = this;
|
|
217
|
+
}, t.prototype._detachComponent = function(e) {
|
|
218
|
+
e.__zr && e.removeSelfFromZr(e.__zr), e.__zr = null, e.__hostTarget = null;
|
|
219
|
+
}, t.prototype.getClipPath = function() {
|
|
220
|
+
return this._clipPath;
|
|
221
|
+
}, t.prototype.setClipPath = function(e) {
|
|
222
|
+
this._clipPath && this._clipPath !== e && this.removeClipPath(), this._attachComponent(e), this._clipPath = e, this.markRedraw();
|
|
223
|
+
}, t.prototype.removeClipPath = function() {
|
|
224
|
+
var e = this._clipPath;
|
|
225
|
+
e && (this._detachComponent(e), this._clipPath = null, this.markRedraw());
|
|
226
|
+
}, t.prototype.getTextContent = function() {
|
|
227
|
+
return this._textContent;
|
|
228
|
+
}, t.prototype.setTextContent = function(e) {
|
|
229
|
+
var t = this._textContent;
|
|
230
|
+
if (t !== e) {
|
|
231
|
+
if (t && t !== e && this.removeTextContent(), process.env.NODE_ENV !== "production" && e.__zr && !e.__hostTarget) throw Error("Text element has been added to zrender.");
|
|
232
|
+
e.innerTransformable = new p(), this._attachComponent(e), this._textContent = e, this.markRedraw();
|
|
233
|
+
}
|
|
234
|
+
}, t.prototype.setTextConfig = function(t) {
|
|
235
|
+
this.textConfig ||= {}, e(this.textConfig, t), this.markRedraw();
|
|
236
|
+
}, t.prototype.removeTextConfig = function() {
|
|
237
|
+
this.textConfig = null, this.markRedraw();
|
|
238
|
+
}, t.prototype.removeTextContent = function() {
|
|
239
|
+
var e = this._textContent;
|
|
240
|
+
e && (e.innerTransformable = null, this._detachComponent(e), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw());
|
|
241
|
+
}, t.prototype.getTextGuideLine = function() {
|
|
242
|
+
return this._textGuide;
|
|
243
|
+
}, t.prototype.setTextGuideLine = function(e) {
|
|
244
|
+
this._textGuide && this._textGuide !== e && this.removeTextGuideLine(), this._attachComponent(e), this._textGuide = e, this.markRedraw();
|
|
245
|
+
}, t.prototype.removeTextGuideLine = function() {
|
|
246
|
+
var e = this._textGuide;
|
|
247
|
+
e && (this._detachComponent(e), this._textGuide = null, this.markRedraw());
|
|
248
|
+
}, t.prototype.markRedraw = function() {
|
|
249
|
+
this.__dirty |= 1;
|
|
250
|
+
var e = this.__zr;
|
|
251
|
+
e && (this.__inHover ? e.refreshHover() : e.refresh()), this.__hostTarget && this.__hostTarget.markRedraw();
|
|
252
|
+
}, t.prototype.dirty = function() {
|
|
253
|
+
this.markRedraw();
|
|
254
|
+
}, t.prototype.addSelfToZr = function(e) {
|
|
255
|
+
if (this.__zr !== e) {
|
|
256
|
+
this.__zr = e;
|
|
257
|
+
var t = this.animators;
|
|
258
|
+
if (t) for (var n = 0; n < t.length; n++) e.animation.addAnimator(t[n]);
|
|
259
|
+
this._clipPath && this._clipPath.addSelfToZr(e), this._textContent && this._textContent.addSelfToZr(e), this._textGuide && this._textGuide.addSelfToZr(e);
|
|
260
|
+
}
|
|
261
|
+
}, t.prototype.removeSelfFromZr = function(e) {
|
|
262
|
+
if (this.__zr) {
|
|
263
|
+
this.__zr = null;
|
|
264
|
+
var t = this.animators;
|
|
265
|
+
if (t) for (var n = 0; n < t.length; n++) e.animation.removeAnimator(t[n]);
|
|
266
|
+
this._clipPath && this._clipPath.removeSelfFromZr(e), this._textContent && this._textContent.removeSelfFromZr(e), this._textGuide && this._textGuide.removeSelfFromZr(e);
|
|
267
|
+
}
|
|
268
|
+
}, t.prototype.animate = function(e, t, n) {
|
|
269
|
+
var r = e ? this[e] : this;
|
|
270
|
+
if (process.env.NODE_ENV !== "production" && !r) {
|
|
271
|
+
l("Property \"" + e + "\" is not existed in element " + this.id);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
var i = new _(r, t, n);
|
|
275
|
+
return e && (i.targetName = e), this.addAnimator(i, e), i;
|
|
276
|
+
}, t.prototype.addAnimator = function(e, t) {
|
|
277
|
+
var n = this.__zr, i = this;
|
|
278
|
+
e.during(function() {
|
|
279
|
+
i.updateDuringAnimation(t);
|
|
280
|
+
}).done(function() {
|
|
281
|
+
var t = i.animators, n = r(t, e);
|
|
282
|
+
n >= 0 && t.splice(n, 1);
|
|
283
|
+
}), this.animators.push(e), n && n.animation.addAnimator(e), n && n.wakeUp();
|
|
284
|
+
}, t.prototype.updateDuringAnimation = function(e) {
|
|
285
|
+
this.markRedraw();
|
|
286
|
+
}, t.prototype.stopAnimation = function(e, t) {
|
|
287
|
+
for (var n = this.animators, r = n.length, i = [], a = 0; a < r; a++) {
|
|
288
|
+
var o = n[a];
|
|
289
|
+
!e || e === o.scope ? o.stop(t) : i.push(o);
|
|
290
|
+
}
|
|
291
|
+
return this.animators = i, this;
|
|
292
|
+
}, t.prototype.animateTo = function(e, t, n) {
|
|
293
|
+
M(this, e, t, n);
|
|
294
|
+
}, t.prototype.animateFrom = function(e, t, n) {
|
|
295
|
+
M(this, e, t, n, !0);
|
|
296
|
+
}, t.prototype._transitionState = function(e, t, n, r) {
|
|
297
|
+
for (var i = M(this, t, n, r), a = 0; a < i.length; a++) i[a].__fromStateTransition = e;
|
|
298
|
+
}, t.prototype.getBoundingRect = function() {
|
|
299
|
+
return null;
|
|
300
|
+
}, t.prototype.getPaintRect = function() {
|
|
301
|
+
return null;
|
|
302
|
+
}, t.initDefaultProps = (function() {
|
|
303
|
+
var e = t.prototype;
|
|
304
|
+
e.type = "element", e.name = "", e.ignore = e.silent = e.ignoreHostSilent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = !1, e.__inHover = 0, e.__dirty = 1;
|
|
305
|
+
var n = {};
|
|
306
|
+
function r(e, t, r) {
|
|
307
|
+
n[e + t + r] || (console.warn("DEPRECATED: '" + e + "' has been deprecated. use '" + t + "', '" + r + "' instead"), n[e + t + r] = !0);
|
|
308
|
+
}
|
|
309
|
+
function i(t, n, i, a) {
|
|
310
|
+
Object.defineProperty(e, t, {
|
|
311
|
+
get: function() {
|
|
312
|
+
if (process.env.NODE_ENV !== "production" && r(t, i, a), !this[n]) {
|
|
313
|
+
var e = this[n] = [];
|
|
314
|
+
o(this, e);
|
|
315
|
+
}
|
|
316
|
+
return this[n];
|
|
317
|
+
},
|
|
318
|
+
set: function(e) {
|
|
319
|
+
process.env.NODE_ENV !== "production" && r(t, i, a), this[i] = e[0], this[a] = e[1], this[n] = e, o(this, e);
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
function o(e, t) {
|
|
323
|
+
Object.defineProperty(t, 0, {
|
|
324
|
+
get: function() {
|
|
325
|
+
return e[i];
|
|
326
|
+
},
|
|
327
|
+
set: function(t) {
|
|
328
|
+
e[i] = t;
|
|
329
|
+
}
|
|
330
|
+
}), Object.defineProperty(t, 1, {
|
|
331
|
+
get: function() {
|
|
332
|
+
return e[a];
|
|
333
|
+
},
|
|
334
|
+
set: function(t) {
|
|
335
|
+
e[a] = t;
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
Object.defineProperty && (i("position", "_legacyPos", "x", "y"), i("scale", "_legacyScale", "scaleX", "scaleY"), i("origin", "_legacyOrigin", "originX", "originY"));
|
|
341
|
+
})(), t;
|
|
342
|
+
}();
|
|
343
|
+
u(j, b), u(j, p);
|
|
344
|
+
function M(e, t, n, r, i) {
|
|
345
|
+
n ||= {};
|
|
346
|
+
var a = [];
|
|
347
|
+
R(e, "", e, t, n, r, a, i);
|
|
348
|
+
var o = a.length, s = !1, c = n.done, l = n.aborted, u = function() {
|
|
349
|
+
s = !0, o--, o <= 0 && (s ? c && c() : l && l());
|
|
350
|
+
}, d = function() {
|
|
351
|
+
o--, o <= 0 && (s ? c && c() : l && l());
|
|
352
|
+
};
|
|
353
|
+
o || c && c(), a.length > 0 && n.during && a[0].during(function(e, t) {
|
|
354
|
+
n.during(t);
|
|
355
|
+
});
|
|
356
|
+
for (var f = 0; f < a.length; f++) {
|
|
357
|
+
var p = a[f];
|
|
358
|
+
u && p.done(u), d && p.aborted(d), n.force && p.duration(n.duration), p.start(n.easing);
|
|
359
|
+
}
|
|
360
|
+
return a;
|
|
361
|
+
}
|
|
362
|
+
function N(e, t, n) {
|
|
363
|
+
for (var r = 0; r < n; r++) e[r] = t[r];
|
|
364
|
+
}
|
|
365
|
+
function P(e) {
|
|
366
|
+
return i(e[0]);
|
|
367
|
+
}
|
|
368
|
+
function F(e, t, n) {
|
|
369
|
+
if (i(t[n])) if (i(e[n]) || (e[n] = []), s(t[n])) {
|
|
370
|
+
var r = t[n].length;
|
|
371
|
+
e[n].length !== r && (e[n] = new t[n].constructor(r), N(e[n], t[n], r));
|
|
372
|
+
} else {
|
|
373
|
+
var a = t[n], o = e[n], c = a.length;
|
|
374
|
+
if (P(a)) for (var l = a[0].length, u = 0; u < c; u++) o[u] ? N(o[u], a[u], l) : o[u] = Array.prototype.slice.call(a[u]);
|
|
375
|
+
else N(o, a, c);
|
|
376
|
+
o.length = a.length;
|
|
377
|
+
}
|
|
378
|
+
else e[n] = t[n];
|
|
379
|
+
}
|
|
380
|
+
function I(e, t) {
|
|
381
|
+
return e === t || i(e) && i(t) && L(e, t);
|
|
382
|
+
}
|
|
383
|
+
function L(e, t) {
|
|
384
|
+
var n = e.length;
|
|
385
|
+
if (n !== t.length) return !1;
|
|
386
|
+
for (var r = 0; r < n; r++) if (e[r] !== t[r]) return !1;
|
|
387
|
+
return !0;
|
|
388
|
+
}
|
|
389
|
+
function R(e, n, s, l, u, d, f, p) {
|
|
390
|
+
for (var m = c(l), h = u.duration, g = u.delay, y = u.additive, b = u.setToFinal, x = !o(d), S = e.animators, C = [], w = 0; w < m.length; w++) {
|
|
391
|
+
var T = m[w], E = l[T];
|
|
392
|
+
if (E != null && s[T] != null && (x || d[T])) if (o(E) && !i(E) && !a(E)) {
|
|
393
|
+
if (n) {
|
|
394
|
+
p || (s[T] = E, e.updateDuringAnimation(n));
|
|
395
|
+
continue;
|
|
396
|
+
}
|
|
397
|
+
R(e, T, s[T], E, u, d && d[T], f, p);
|
|
398
|
+
} else C.push(T);
|
|
399
|
+
else p || (s[T] = E, e.updateDuringAnimation(n), C.push(T));
|
|
400
|
+
}
|
|
401
|
+
var D = C.length;
|
|
402
|
+
if (!y && D) for (var O = 0; O < S.length; O++) {
|
|
403
|
+
var k = S[O];
|
|
404
|
+
if (k.targetName === n && k.stopTracks(C)) {
|
|
405
|
+
var A = r(S, k);
|
|
406
|
+
S.splice(A, 1);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
if (u.force || (C = t(C, function(e) {
|
|
410
|
+
return !I(l[e], s[e]);
|
|
411
|
+
}), D = C.length), D > 0 || u.force && !f.length) {
|
|
412
|
+
var j = void 0, M = void 0, N = void 0;
|
|
413
|
+
if (p) {
|
|
414
|
+
M = {}, b && (j = {});
|
|
415
|
+
for (var O = 0; O < D; O++) {
|
|
416
|
+
var T = C[O];
|
|
417
|
+
M[T] = s[T], b ? j[T] = l[T] : s[T] = l[T];
|
|
418
|
+
}
|
|
419
|
+
} else if (b) {
|
|
420
|
+
N = {};
|
|
421
|
+
for (var O = 0; O < D; O++) {
|
|
422
|
+
var T = C[O];
|
|
423
|
+
N[T] = v(s[T]), F(s, l, T);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
var k = new _(s, !1, !1, y ? t(S, function(e) {
|
|
427
|
+
return e.targetName === n;
|
|
428
|
+
}) : null);
|
|
429
|
+
k.targetName = n, u.scope && (k.scope = u.scope), b && j && k.whenWithKeys(0, j, C), N && k.whenWithKeys(0, N, C), k.whenWithKeys(h ?? 500, p ? M : l, C).delay(g || 0), e.addAnimator(k, n), f.push(k);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
function z(e, t, n, r) {
|
|
433
|
+
return !(n && n.hoverLayer || r) || B(e) || t && B(t) ? 0 : 1;
|
|
434
|
+
}
|
|
435
|
+
function B(e) {
|
|
436
|
+
return e.type === "text" || e.type === "tspan";
|
|
437
|
+
}
|
|
438
|
+
function V(e, t, n) {
|
|
439
|
+
return !t && !e.__inHover && n && n.duration > 0;
|
|
440
|
+
}
|
|
441
|
+
//#endregion
|
|
442
|
+
export { j as default };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { each as e } from "./core/util.js";
|
|
2
|
+
import { __extends as t } from "../node_modules/tslib/tslib.es6.js";
|
|
3
|
+
import { dist as n } from "./core/vector.js";
|
|
4
|
+
import r from "./core/BoundingRect.js";
|
|
5
|
+
import i from "./core/Eventful.js";
|
|
6
|
+
import { stop as a } from "./core/event.js";
|
|
7
|
+
import o from "./mixin/Draggable.js";
|
|
8
|
+
import { GestureMgr as s } from "./core/GestureMgr.js";
|
|
9
|
+
//#region node_modules/zrender/lib/Handler.js
|
|
10
|
+
var c = "silent";
|
|
11
|
+
function l(e, t, n) {
|
|
12
|
+
return {
|
|
13
|
+
type: e,
|
|
14
|
+
event: n,
|
|
15
|
+
target: t.target,
|
|
16
|
+
topTarget: t.topTarget,
|
|
17
|
+
cancelBubble: !1,
|
|
18
|
+
offsetX: n.zrX,
|
|
19
|
+
offsetY: n.zrY,
|
|
20
|
+
gestureEvent: n.gestureEvent,
|
|
21
|
+
pinchX: n.pinchX,
|
|
22
|
+
pinchY: n.pinchY,
|
|
23
|
+
pinchScale: n.pinchScale,
|
|
24
|
+
wheelDelta: n.zrDelta,
|
|
25
|
+
zrByTouch: n.zrByTouch,
|
|
26
|
+
which: n.which,
|
|
27
|
+
stop: u
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function u() {
|
|
31
|
+
a(this.event);
|
|
32
|
+
}
|
|
33
|
+
var d = function(e) {
|
|
34
|
+
t(n, e);
|
|
35
|
+
function n() {
|
|
36
|
+
var t = e !== null && e.apply(this, arguments) || this;
|
|
37
|
+
return t.handler = null, t;
|
|
38
|
+
}
|
|
39
|
+
return n.prototype.dispose = function() {}, n.prototype.setCursor = function() {}, n;
|
|
40
|
+
}(i), f = function() {
|
|
41
|
+
function e(e, t) {
|
|
42
|
+
this.x = e, this.y = t;
|
|
43
|
+
}
|
|
44
|
+
return e;
|
|
45
|
+
}(), p = [
|
|
46
|
+
"click",
|
|
47
|
+
"dblclick",
|
|
48
|
+
"mousewheel",
|
|
49
|
+
"mouseout",
|
|
50
|
+
"mouseup",
|
|
51
|
+
"mousedown",
|
|
52
|
+
"mousemove",
|
|
53
|
+
"contextmenu"
|
|
54
|
+
], m = new r(0, 0, 0, 0), h = function(n) {
|
|
55
|
+
t(i, n);
|
|
56
|
+
function i(e, t, r, i, a) {
|
|
57
|
+
var s = n.call(this) || this;
|
|
58
|
+
return s._hovered = new f(0, 0), s.storage = e, s.painter = t, s.painterRoot = i, s._pointerSize = a, r ||= new d(), s.proxy = null, s.setHandlerProxy(r), s._draggingMgr = new o(s), s;
|
|
59
|
+
}
|
|
60
|
+
return i.prototype.setHandlerProxy = function(t) {
|
|
61
|
+
this.proxy && this.proxy.dispose(), t && (e(p, function(e) {
|
|
62
|
+
t.on && t.on(e, this[e], this);
|
|
63
|
+
}, this), t.handler = this), this.proxy = t;
|
|
64
|
+
}, i.prototype.mousemove = function(e) {
|
|
65
|
+
var t = e.zrX, n = e.zrY, r = v(this, t, n), i = this._hovered, a = i.target;
|
|
66
|
+
a && !a.__zr && (i = this.findHover(i.x, i.y), a = i.target);
|
|
67
|
+
var o = this._hovered = r ? new f(t, n) : this.findHover(t, n), s = o.target, c = this.proxy;
|
|
68
|
+
c.setCursor && c.setCursor(s ? s.cursor : "default"), a && s !== a && this.dispatchToElement(i, "mouseout", e), this.dispatchToElement(o, "mousemove", e), s && s !== a && this.dispatchToElement(o, "mouseover", e);
|
|
69
|
+
}, i.prototype.mouseout = function(e) {
|
|
70
|
+
var t = e.zrEventControl;
|
|
71
|
+
t !== "only_globalout" && this.dispatchToElement(this._hovered, "mouseout", e), t !== "no_globalout" && this.trigger("globalout", {
|
|
72
|
+
type: "globalout",
|
|
73
|
+
event: e
|
|
74
|
+
});
|
|
75
|
+
}, i.prototype.resize = function() {
|
|
76
|
+
this._hovered = new f(0, 0);
|
|
77
|
+
}, i.prototype.dispatch = function(e, t) {
|
|
78
|
+
var n = this[e];
|
|
79
|
+
n && n.call(this, t);
|
|
80
|
+
}, i.prototype.dispose = function() {
|
|
81
|
+
this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null;
|
|
82
|
+
}, i.prototype.setCursorStyle = function(e) {
|
|
83
|
+
var t = this.proxy;
|
|
84
|
+
t.setCursor && t.setCursor(e);
|
|
85
|
+
}, i.prototype.dispatchToElement = function(e, t, n) {
|
|
86
|
+
e ||= {};
|
|
87
|
+
var r = e.target;
|
|
88
|
+
if (!(r && r.silent)) {
|
|
89
|
+
for (var i = "on" + t, a = l(t, e, n); r && (r[i] && (a.cancelBubble = !!r[i].call(r, a)), r.trigger(t, a), r = r.__hostTarget ? r.__hostTarget : r.parent, !a.cancelBubble););
|
|
90
|
+
a.cancelBubble || (this.trigger(t, a), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer(function(e) {
|
|
91
|
+
typeof e[i] == "function" && e[i].call(e, a), e.trigger && e.trigger(t, a);
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
}, i.prototype.findHover = function(e, t, n) {
|
|
95
|
+
var i = this.storage.getDisplayList(), a = new f(e, t);
|
|
96
|
+
if (_(i, a, e, t, n), this._pointerSize && !a.target) {
|
|
97
|
+
for (var o = [], s = this._pointerSize, c = s / 2, l = new r(e - c, t - c, s, s), u = i.length - 1; u >= 0; u--) {
|
|
98
|
+
var d = i[u];
|
|
99
|
+
d !== n && !d.ignore && !d.ignoreCoarsePointer && (!d.parent || !d.parent.ignoreCoarsePointer) && (m.copy(d.getBoundingRect()), d.transform && m.applyTransform(d.transform), m.intersect(l) && o.push(d));
|
|
100
|
+
}
|
|
101
|
+
if (o.length) {
|
|
102
|
+
for (var p = 4, h = Math.PI / 12, g = Math.PI * 2, v = 0; v < c; v += p) for (var y = 0; y < g; y += h) if (_(o, a, e + v * Math.cos(y), t + v * Math.sin(y), n), a.target) return a;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return a;
|
|
106
|
+
}, i.prototype.processGesture = function(e, t) {
|
|
107
|
+
this._gestureMgr ||= new s();
|
|
108
|
+
var n = this._gestureMgr;
|
|
109
|
+
t === "start" && n.clear();
|
|
110
|
+
var r = n.recognize(e, this.findHover(e.zrX, e.zrY, null).target, this.proxy.dom);
|
|
111
|
+
if (t === "end" && n.clear(), r) {
|
|
112
|
+
var i = r.type;
|
|
113
|
+
e.gestureEvent = i;
|
|
114
|
+
var a = new f();
|
|
115
|
+
a.target = r.target, this.dispatchToElement(a, i, r.event);
|
|
116
|
+
}
|
|
117
|
+
}, i;
|
|
118
|
+
}(i);
|
|
119
|
+
e([
|
|
120
|
+
"click",
|
|
121
|
+
"mousedown",
|
|
122
|
+
"mouseup",
|
|
123
|
+
"mousewheel",
|
|
124
|
+
"dblclick",
|
|
125
|
+
"contextmenu"
|
|
126
|
+
], function(e) {
|
|
127
|
+
h.prototype[e] = function(t) {
|
|
128
|
+
var r = t.zrX, i = t.zrY, a = v(this, r, i), o, s;
|
|
129
|
+
if ((e !== "mouseup" || !a) && (o = this.findHover(r, i), s = o.target), e === "mousedown") this._downEl = s, this._downPoint = [t.zrX, t.zrY], this._upEl = s;
|
|
130
|
+
else if (e === "mouseup") this._upEl = s;
|
|
131
|
+
else if (e === "click") {
|
|
132
|
+
if (this._downEl !== this._upEl || !this._downPoint || n(this._downPoint, [t.zrX, t.zrY]) > 4) return;
|
|
133
|
+
this._downPoint = null;
|
|
134
|
+
}
|
|
135
|
+
this.dispatchToElement(o, e, t);
|
|
136
|
+
};
|
|
137
|
+
});
|
|
138
|
+
function g(e, t, n) {
|
|
139
|
+
if (e[e.rectHover ? "rectContain" : "contain"](t, n)) {
|
|
140
|
+
for (var r = e, i = void 0, a = !1; r;) {
|
|
141
|
+
if (r.ignoreClip && (a = !0), !a) {
|
|
142
|
+
var o = r.getClipPath();
|
|
143
|
+
if (o && !o.contain(t, n)) return !1;
|
|
144
|
+
}
|
|
145
|
+
r.silent && (i = !0);
|
|
146
|
+
var s = r.__hostTarget;
|
|
147
|
+
r = s ? r.ignoreHostSilent ? null : s : r.parent;
|
|
148
|
+
}
|
|
149
|
+
return i ? c : !0;
|
|
150
|
+
}
|
|
151
|
+
return !1;
|
|
152
|
+
}
|
|
153
|
+
function _(e, t, n, r, i) {
|
|
154
|
+
for (var a = e.length - 1; a >= 0; a--) {
|
|
155
|
+
var o = e[a], s = void 0;
|
|
156
|
+
if (o !== i && !o.ignore && (s = g(o, n, r)) && (!t.topTarget && (t.topTarget = o), s !== c)) {
|
|
157
|
+
t.target = o;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function v(e, t, n) {
|
|
163
|
+
var r = e.painter;
|
|
164
|
+
return t < 0 || t > r.getWidth() || n < 0 || n > r.getHeight();
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
export { h as default };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { indexOf as e } from "./core/util.js";
|
|
2
|
+
import t from "./core/timsort.js";
|
|
3
|
+
//#region node_modules/zrender/lib/Storage.js
|
|
4
|
+
var n = !1;
|
|
5
|
+
function r() {
|
|
6
|
+
n || (n = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"));
|
|
7
|
+
}
|
|
8
|
+
function i(e, t) {
|
|
9
|
+
return e.zlevel === t.zlevel ? e.z === t.z ? e.z2 - t.z2 : e.z - t.z : e.zlevel - t.zlevel;
|
|
10
|
+
}
|
|
11
|
+
var a = function() {
|
|
12
|
+
function n() {
|
|
13
|
+
this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = i;
|
|
14
|
+
}
|
|
15
|
+
return n.prototype.traverse = function(e, t) {
|
|
16
|
+
for (var n = 0; n < this._roots.length; n++) this._roots[n].traverse(e, t);
|
|
17
|
+
}, n.prototype.getDisplayList = function(e, t) {
|
|
18
|
+
t ||= !1;
|
|
19
|
+
var n = this._displayList;
|
|
20
|
+
return (e || !n.length) && this.updateDisplayList(t), n;
|
|
21
|
+
}, n.prototype.updateDisplayList = function(e) {
|
|
22
|
+
this._displayListLen = 0;
|
|
23
|
+
for (var n = this._roots, r = this._displayList, a = 0, o = n.length; a < o; a++) this._updateAndAddDisplayable(n[a], null, e);
|
|
24
|
+
r.length = this._displayListLen, t(r, i);
|
|
25
|
+
}, n.prototype._updateAndAddDisplayable = function(e, t, n) {
|
|
26
|
+
if (!(e.ignore && !n)) {
|
|
27
|
+
e.beforeUpdate(), e.update(), e.afterUpdate();
|
|
28
|
+
var i = e.getClipPath(), a = t && t.length, o = 0, s = e.__clipPaths;
|
|
29
|
+
if (!e.ignoreClip && (a || i)) {
|
|
30
|
+
if (s ||= e.__clipPaths = [], a) for (var c = 0; c < t.length; c++) s[o++] = t[c];
|
|
31
|
+
for (var l = i, u = e; l;) l.parent = u, l.updateTransform(), s[o++] = l, u = l, l = l.getClipPath();
|
|
32
|
+
}
|
|
33
|
+
if (s && (s.length = o), e.childrenRef) {
|
|
34
|
+
for (var d = e.childrenRef(), f = 0; f < d.length; f++) {
|
|
35
|
+
var p = d[f];
|
|
36
|
+
e.__dirty && (p.__dirty |= 1), this._updateAndAddDisplayable(p, s, n);
|
|
37
|
+
}
|
|
38
|
+
e.__dirty = 0;
|
|
39
|
+
} else {
|
|
40
|
+
var m = e;
|
|
41
|
+
isNaN(m.z) && (r(), m.z = 0), isNaN(m.z2) && (r(), m.z2 = 0), isNaN(m.zlevel) && (r(), m.zlevel = 0), this._displayList[this._displayListLen++] = m;
|
|
42
|
+
}
|
|
43
|
+
var h = e.getDecalElement && e.getDecalElement();
|
|
44
|
+
h && this._updateAndAddDisplayable(h, s, n);
|
|
45
|
+
var g = e.getTextGuideLine();
|
|
46
|
+
g && this._updateAndAddDisplayable(g, s, n);
|
|
47
|
+
var _ = e.getTextContent();
|
|
48
|
+
_ && this._updateAndAddDisplayable(_, s, n);
|
|
49
|
+
}
|
|
50
|
+
}, n.prototype.addRoot = function(e) {
|
|
51
|
+
e.__zr && e.__zr.storage === this || this._roots.push(e);
|
|
52
|
+
}, n.prototype.delRoot = function(t) {
|
|
53
|
+
if (t instanceof Array) {
|
|
54
|
+
for (var n = 0, r = t.length; n < r; n++) this.delRoot(t[n]);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
var i = e(this._roots, t);
|
|
58
|
+
i >= 0 && this._roots.splice(i, 1);
|
|
59
|
+
}, n.prototype.delAllRoots = function() {
|
|
60
|
+
this._roots = [], this._displayList = [], this._displayListLen = 0;
|
|
61
|
+
}, n.prototype.getRoots = function() {
|
|
62
|
+
return this._roots;
|
|
63
|
+
}, n.prototype.dispose = function() {
|
|
64
|
+
this._displayList = null, this._roots = null;
|
|
65
|
+
}, n;
|
|
66
|
+
}();
|
|
67
|
+
//#endregion
|
|
68
|
+
export { a as default };
|