reke-ui 0.3.0 → 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 +991 -20
- 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 +1 -0
- package/dist/components/reke-table/reke-table.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.js +6 -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 +14 -1
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { assert as e, bind as t, clone as n, createHashMap as r, each as i, extend as a, isArray as o, isArrayLike as s, isFunction as c, isNumber as l, isObject as u, isString as d, keys as f, map as p, slice as m } from "../../../zrender/lib/core/util.js";
|
|
2
|
+
import { convertOptionIdName as h, isDataItemOption as g } from "../util/model.js";
|
|
3
|
+
import { setCommonECData as _ } from "../util/innerStore.js";
|
|
4
|
+
import "../util/types.js";
|
|
5
|
+
import v from "./SeriesDimensionDefine.js";
|
|
6
|
+
import { isSourceInstance as y } from "./Source.js";
|
|
7
|
+
import b from "./DataStore.js";
|
|
8
|
+
import { isSeriesDataSchema as x } from "./helper/SeriesDataSchema.js";
|
|
9
|
+
import S from "../model/Model.js";
|
|
10
|
+
import C from "./DataDiffer.js";
|
|
11
|
+
import { DefaultDataProvider as w } from "./helper/dataProvider.js";
|
|
12
|
+
import { summarizeDimensions as T } from "./helper/dimensionHelper.js";
|
|
13
|
+
//#region node_modules/echarts/lib/data/SeriesData.js
|
|
14
|
+
var E = u, D = p, O = typeof Int32Array > "u" ? Array : Int32Array, k = "e\0\0", A = -1, j = [
|
|
15
|
+
"hasItemOption",
|
|
16
|
+
"_nameList",
|
|
17
|
+
"_idList",
|
|
18
|
+
"_invertedIndicesMap",
|
|
19
|
+
"_dimSummary",
|
|
20
|
+
"userOutput",
|
|
21
|
+
"_rawData",
|
|
22
|
+
"_dimValueGetter",
|
|
23
|
+
"_nameDimIdx",
|
|
24
|
+
"_idDimIdx",
|
|
25
|
+
"_nameRepeatCount"
|
|
26
|
+
], M = ["_approximateExtent"], N, P, F, I, L, R, z, B = function() {
|
|
27
|
+
function u(t, n) {
|
|
28
|
+
this.type = "list", this._dimOmitted = !1, this._nameList = [], this._idList = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this._itemLayouts = [], this._graphicEls = [], this._approximateExtent = {}, this._calculationInfo = {}, this.hasItemOption = !1, this.TRANSFERABLE_METHODS = [
|
|
29
|
+
"cloneShallow",
|
|
30
|
+
"downSample",
|
|
31
|
+
"minmaxDownSample",
|
|
32
|
+
"lttbDownSample",
|
|
33
|
+
"map"
|
|
34
|
+
], this.CHANGABLE_METHODS = ["filterSelf", "selectRange"], this.DOWNSAMPLE_METHODS = [
|
|
35
|
+
"downSample",
|
|
36
|
+
"minmaxDownSample",
|
|
37
|
+
"lttbDownSample"
|
|
38
|
+
];
|
|
39
|
+
var a, o = !1;
|
|
40
|
+
x(t) ? (a = t.dimensions, this._dimOmitted = t.isDimensionOmitted(), this._schema = t) : (o = !0, a = t), a ||= ["x", "y"];
|
|
41
|
+
for (var s = {}, c = [], l = {}, u = !1, f = {}, p = 0; p < a.length; p++) {
|
|
42
|
+
var m = a[p], h = d(m) ? new v({ name: m }) : m instanceof v ? m : new v(m), g = h.name;
|
|
43
|
+
h.type = h.type || "float", h.coordDim || (h.coordDim = g, h.coordDimIndex = 0);
|
|
44
|
+
var _ = h.otherDims = h.otherDims || {};
|
|
45
|
+
c.push(g), s[g] = h, f[g] != null && (u = !0), h.createInvertedIndices && (l[g] = []), process.env.NODE_ENV !== "production" && e(o || h.storeDimIndex >= 0), o && (h.storeDimIndex = p), _.itemName === 0 && (this._nameDimIdx = h.storeDimIndex), _.itemId === 0 && (this._idDimIdx = h.storeDimIndex);
|
|
46
|
+
}
|
|
47
|
+
if (this.dimensions = c, this._dimInfos = s, this._initGetDimensionInfo(u), this.hostModel = n, this._invertedIndicesMap = l, this._dimOmitted) {
|
|
48
|
+
var y = this._dimIdxToName = r();
|
|
49
|
+
i(c, function(e) {
|
|
50
|
+
y.set(s[e].storeDimIndex, e);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return u.prototype.getDimension = function(e) {
|
|
55
|
+
var t = this._recognizeDimIndex(e);
|
|
56
|
+
if (t == null) return e;
|
|
57
|
+
if (t = e, !this._dimOmitted) return this.dimensions[t];
|
|
58
|
+
var n = this._dimIdxToName.get(t);
|
|
59
|
+
if (n != null) return n;
|
|
60
|
+
var r = this._schema.getSourceDimension(t);
|
|
61
|
+
if (r) return r.name;
|
|
62
|
+
}, u.prototype.getDimensionIndex = function(e) {
|
|
63
|
+
var t = this._recognizeDimIndex(e);
|
|
64
|
+
if (t != null) return t;
|
|
65
|
+
if (e == null) return -1;
|
|
66
|
+
var n = this._getDimInfo(e);
|
|
67
|
+
return n ? n.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(e) : -1;
|
|
68
|
+
}, u.prototype._recognizeDimIndex = function(e) {
|
|
69
|
+
if (l(e) || e != null && !isNaN(e) && !this._getDimInfo(e) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(e) < 0)) return +e;
|
|
70
|
+
}, u.prototype._getStoreDimIndex = function(e) {
|
|
71
|
+
var t = this.getDimensionIndex(e);
|
|
72
|
+
if (process.env.NODE_ENV !== "production" && t == null) throw Error("Unknown dimension " + e);
|
|
73
|
+
return t;
|
|
74
|
+
}, u.prototype.getDimensionInfo = function(e) {
|
|
75
|
+
return this._getDimInfo(this.getDimension(e));
|
|
76
|
+
}, u.prototype._initGetDimensionInfo = function(e) {
|
|
77
|
+
var t = this._dimInfos;
|
|
78
|
+
this._getDimInfo = e ? function(e) {
|
|
79
|
+
return t.hasOwnProperty(e) ? t[e] : void 0;
|
|
80
|
+
} : function(e) {
|
|
81
|
+
return t[e];
|
|
82
|
+
};
|
|
83
|
+
}, u.prototype.getDimensionsOnCoord = function() {
|
|
84
|
+
return this._dimSummary.dataDimsOnCoord.slice();
|
|
85
|
+
}, u.prototype.mapDimension = function(e, t) {
|
|
86
|
+
var n = this._dimSummary;
|
|
87
|
+
if (t == null) return n.encodeFirstDimNotExtra[e];
|
|
88
|
+
var r = n.encode[e];
|
|
89
|
+
return r ? r[t] : null;
|
|
90
|
+
}, u.prototype.mapDimensionsAll = function(e) {
|
|
91
|
+
return (this._dimSummary.encode[e] || []).slice();
|
|
92
|
+
}, u.prototype.getStore = function() {
|
|
93
|
+
return this._store;
|
|
94
|
+
}, u.prototype.initData = function(e, t, n) {
|
|
95
|
+
var r = this, i;
|
|
96
|
+
if (e instanceof b && (i = e), !i) {
|
|
97
|
+
var a = this.dimensions, o = y(e) || s(e) ? new w(e, a.length) : e;
|
|
98
|
+
i = new b();
|
|
99
|
+
var c = D(a, function(e) {
|
|
100
|
+
return {
|
|
101
|
+
type: r._dimInfos[e].type,
|
|
102
|
+
property: e
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
i.initData(o, c, n);
|
|
106
|
+
}
|
|
107
|
+
this._store = i, this._nameList = (t || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, i.count()), this._dimSummary = T(this, this._schema), this.userOutput = this._dimSummary.userOutput;
|
|
108
|
+
}, u.prototype.appendData = function(e) {
|
|
109
|
+
var t = this._store.appendData(e);
|
|
110
|
+
this._doInit(t[0], t[1]);
|
|
111
|
+
}, u.prototype.appendValues = function(e, t) {
|
|
112
|
+
var n = this._store.appendValues(e, t && t.length), r = n.start, i = n.end, a = this._shouldMakeIdFromName();
|
|
113
|
+
if (this._updateOrdinalMeta(), t) for (var o = r; o < i; o++) {
|
|
114
|
+
var s = o - r;
|
|
115
|
+
this._nameList[o] = t[s], a && z(this, o);
|
|
116
|
+
}
|
|
117
|
+
}, u.prototype._updateOrdinalMeta = function() {
|
|
118
|
+
for (var e = this._store, t = this.dimensions, n = 0; n < t.length; n++) {
|
|
119
|
+
var r = this._dimInfos[t[n]];
|
|
120
|
+
r.ordinalMeta && e.collectOrdinalMeta(r.storeDimIndex, r.ordinalMeta);
|
|
121
|
+
}
|
|
122
|
+
}, u.prototype._shouldMakeIdFromName = function() {
|
|
123
|
+
var e = this._store.getProvider();
|
|
124
|
+
return this._idDimIdx == null && e.getSource().sourceFormat !== "typedArray" && !e.fillStorage;
|
|
125
|
+
}, u.prototype._doInit = function(e, t) {
|
|
126
|
+
if (!(e >= t)) {
|
|
127
|
+
var n = this._store.getProvider();
|
|
128
|
+
this._updateOrdinalMeta();
|
|
129
|
+
var r = this._nameList, i = this._idList;
|
|
130
|
+
if (n.getSource().sourceFormat === "original" && !n.pure) for (var a = [], o = e; o < t; o++) {
|
|
131
|
+
var s = n.getItem(o, a);
|
|
132
|
+
if (!this.hasItemOption && g(s) && (this.hasItemOption = !0), s) {
|
|
133
|
+
var c = s.name;
|
|
134
|
+
r[o] == null && c != null && (r[o] = h(c, null));
|
|
135
|
+
var l = s.id;
|
|
136
|
+
i[o] == null && l != null && (i[o] = h(l, null));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (this._shouldMakeIdFromName()) for (var o = e; o < t; o++) z(this, o);
|
|
140
|
+
N(this);
|
|
141
|
+
}
|
|
142
|
+
}, u.prototype.getApproximateExtent = function(e, t) {
|
|
143
|
+
return this._approximateExtent[e] || this._store.getDataExtent(this._getStoreDimIndex(e), t);
|
|
144
|
+
}, u.prototype.setApproximateExtent = function(e, t) {
|
|
145
|
+
t = this.getDimension(t), this._approximateExtent[t] = e.slice();
|
|
146
|
+
}, u.prototype.getCalculationInfo = function(e) {
|
|
147
|
+
return this._calculationInfo[e];
|
|
148
|
+
}, u.prototype.setCalculationInfo = function(e, t) {
|
|
149
|
+
E(e) ? a(this._calculationInfo, e) : this._calculationInfo[e] = t;
|
|
150
|
+
}, u.prototype.getName = function(e) {
|
|
151
|
+
var t = this.getRawIndex(e), n = this._nameList[t];
|
|
152
|
+
return n == null && this._nameDimIdx != null && (n = F(this, this._nameDimIdx, t)), n ??= "", n;
|
|
153
|
+
}, u.prototype._getCategory = function(e, t) {
|
|
154
|
+
var n = this._store.get(e, t), r = this._store.getOrdinalMeta(e);
|
|
155
|
+
return r ? r.categories[n] : n;
|
|
156
|
+
}, u.prototype.getId = function(e) {
|
|
157
|
+
return P(this, this.getRawIndex(e));
|
|
158
|
+
}, u.prototype.count = function() {
|
|
159
|
+
return this._store.count();
|
|
160
|
+
}, u.prototype.get = function(e, t) {
|
|
161
|
+
var n = this._store, r = this._dimInfos[e];
|
|
162
|
+
if (r) return n.get(r.storeDimIndex, t);
|
|
163
|
+
}, u.prototype.getByRawIndex = function(e, t) {
|
|
164
|
+
var n = this._store, r = this._dimInfos[e];
|
|
165
|
+
if (r) return n.getByRawIndex(r.storeDimIndex, t);
|
|
166
|
+
}, u.prototype.getIndices = function() {
|
|
167
|
+
return this._store.getIndices();
|
|
168
|
+
}, u.prototype.getDataExtent = function(e) {
|
|
169
|
+
return this._store.getDataExtent(this._getStoreDimIndex(e), null);
|
|
170
|
+
}, u.prototype.getSum = function(e) {
|
|
171
|
+
return this._store.getSum(this._getStoreDimIndex(e));
|
|
172
|
+
}, u.prototype.getMedian = function(e) {
|
|
173
|
+
return this._store.getMedian(this._getStoreDimIndex(e));
|
|
174
|
+
}, u.prototype.getValues = function(e, t) {
|
|
175
|
+
var n = this, r = this._store;
|
|
176
|
+
return o(e) ? r.getValues(D(e, function(e) {
|
|
177
|
+
return n._getStoreDimIndex(e);
|
|
178
|
+
}), t) : r.getValues(e);
|
|
179
|
+
}, u.prototype.hasValue = function(e) {
|
|
180
|
+
for (var t = this._dimSummary.dataDimIndicesOnCoord, n = 0, r = t.length; n < r; n++) if (isNaN(this._store.get(t[n], e))) return !1;
|
|
181
|
+
return !0;
|
|
182
|
+
}, u.prototype.indexOfName = function(e) {
|
|
183
|
+
for (var t = 0, n = this._store.count(); t < n; t++) if (this.getName(t) === e) return t;
|
|
184
|
+
return -1;
|
|
185
|
+
}, u.prototype.getRawIndex = function(e) {
|
|
186
|
+
return this._store.getRawIndex(e);
|
|
187
|
+
}, u.prototype.indexOfRawIndex = function(e) {
|
|
188
|
+
return this._store.indexOfRawIndex(e);
|
|
189
|
+
}, u.prototype.rawIndexOf = function(e, t) {
|
|
190
|
+
var n = e && this._invertedIndicesMap[e];
|
|
191
|
+
if (process.env.NODE_ENV !== "production" && !n) throw Error("Do not supported yet");
|
|
192
|
+
var r = n && n[t];
|
|
193
|
+
return r == null || isNaN(r) ? A : r;
|
|
194
|
+
}, u.prototype.each = function(e, n, r) {
|
|
195
|
+
c(e) && (r = n, n = e, e = []);
|
|
196
|
+
var i = r || this, a = D(I(e), this._getStoreDimIndex, this);
|
|
197
|
+
this._store.each(a, i ? t(n, i) : n);
|
|
198
|
+
}, u.prototype.filterSelf = function(e, n, r) {
|
|
199
|
+
c(e) && (r = n, n = e, e = []);
|
|
200
|
+
var i = r || this, a = D(I(e), this._getStoreDimIndex, this);
|
|
201
|
+
return this._store = this._store.filter(a, i ? t(n, i) : n), this;
|
|
202
|
+
}, u.prototype.selectRange = function(e) {
|
|
203
|
+
var t = this, n = {}, r = f(e), a = [];
|
|
204
|
+
return i(r, function(r) {
|
|
205
|
+
var i = t._getStoreDimIndex(r);
|
|
206
|
+
n[i] = e[r], a.push(i);
|
|
207
|
+
}), this._store = this._store.selectRange(n), this;
|
|
208
|
+
}, u.prototype.mapArray = function(e, t, n) {
|
|
209
|
+
c(e) && (n = t, t = e, e = []), n ||= this;
|
|
210
|
+
var r = [];
|
|
211
|
+
return this.each(e, function() {
|
|
212
|
+
r.push(t && t.apply(this, arguments));
|
|
213
|
+
}, n), r;
|
|
214
|
+
}, u.prototype.map = function(e, n, r, i) {
|
|
215
|
+
var a = r || i || this, o = D(I(e), this._getStoreDimIndex, this), s = R(this);
|
|
216
|
+
return s._store = this._store.map(o, a ? t(n, a) : n), s;
|
|
217
|
+
}, u.prototype.modify = function(e, n, r, a) {
|
|
218
|
+
var o = this, s = r || a || this;
|
|
219
|
+
process.env.NODE_ENV !== "production" && i(I(e), function(e) {
|
|
220
|
+
o.getDimensionInfo(e).isCalculationCoord || console.error("Danger: only stack dimension can be modified");
|
|
221
|
+
});
|
|
222
|
+
var c = D(I(e), this._getStoreDimIndex, this);
|
|
223
|
+
this._store.modify(c, s ? t(n, s) : n);
|
|
224
|
+
}, u.prototype.downSample = function(e, t, n, r) {
|
|
225
|
+
var i = R(this);
|
|
226
|
+
return i._store = this._store.downSample(this._getStoreDimIndex(e), t, n, r), i;
|
|
227
|
+
}, u.prototype.minmaxDownSample = function(e, t) {
|
|
228
|
+
var n = R(this);
|
|
229
|
+
return n._store = this._store.minmaxDownSample(this._getStoreDimIndex(e), t), n;
|
|
230
|
+
}, u.prototype.lttbDownSample = function(e, t) {
|
|
231
|
+
var n = R(this);
|
|
232
|
+
return n._store = this._store.lttbDownSample(this._getStoreDimIndex(e), t), n;
|
|
233
|
+
}, u.prototype.getRawDataItem = function(e) {
|
|
234
|
+
return this._store.getRawDataItem(e);
|
|
235
|
+
}, u.prototype.getItemModel = function(e) {
|
|
236
|
+
var t = this.hostModel;
|
|
237
|
+
return new S(this.getRawDataItem(e), t, t && t.ecModel);
|
|
238
|
+
}, u.prototype.diff = function(e) {
|
|
239
|
+
var t = this;
|
|
240
|
+
return new C(e ? e.getStore().getIndices() : [], this.getStore().getIndices(), function(t) {
|
|
241
|
+
return P(e, t);
|
|
242
|
+
}, function(e) {
|
|
243
|
+
return P(t, e);
|
|
244
|
+
});
|
|
245
|
+
}, u.prototype.getVisual = function(e) {
|
|
246
|
+
var t = this._visual;
|
|
247
|
+
return t && t[e];
|
|
248
|
+
}, u.prototype.setVisual = function(e, t) {
|
|
249
|
+
this._visual = this._visual || {}, E(e) ? a(this._visual, e) : this._visual[e] = t;
|
|
250
|
+
}, u.prototype.getItemVisual = function(e, t) {
|
|
251
|
+
var n = this._itemVisuals[e];
|
|
252
|
+
return (n && n[t]) ?? this.getVisual(t);
|
|
253
|
+
}, u.prototype.hasItemVisual = function() {
|
|
254
|
+
return this._itemVisuals.length > 0;
|
|
255
|
+
}, u.prototype.ensureUniqueItemVisual = function(e, t) {
|
|
256
|
+
var n = this._itemVisuals, r = n[e];
|
|
257
|
+
r ||= n[e] = {};
|
|
258
|
+
var i = r[t];
|
|
259
|
+
return i ?? (i = this.getVisual(t), o(i) ? i = i.slice() : E(i) && (i = a({}, i)), r[t] = i), i;
|
|
260
|
+
}, u.prototype.setItemVisual = function(e, t, n) {
|
|
261
|
+
var r = this._itemVisuals[e] || {};
|
|
262
|
+
this._itemVisuals[e] = r, E(t) ? a(r, t) : r[t] = n;
|
|
263
|
+
}, u.prototype.clearAllVisual = function() {
|
|
264
|
+
this._visual = {}, this._itemVisuals = [];
|
|
265
|
+
}, u.prototype.setLayout = function(e, t) {
|
|
266
|
+
E(e) ? a(this._layout, e) : this._layout[e] = t;
|
|
267
|
+
}, u.prototype.getLayout = function(e) {
|
|
268
|
+
return this._layout[e];
|
|
269
|
+
}, u.prototype.getItemLayout = function(e) {
|
|
270
|
+
return this._itemLayouts[e];
|
|
271
|
+
}, u.prototype.setItemLayout = function(e, t, n) {
|
|
272
|
+
this._itemLayouts[e] = n ? a(this._itemLayouts[e] || {}, t) : t;
|
|
273
|
+
}, u.prototype.clearItemLayouts = function() {
|
|
274
|
+
this._itemLayouts.length = 0;
|
|
275
|
+
}, u.prototype.setItemGraphicEl = function(e, t) {
|
|
276
|
+
_(this.hostModel && this.hostModel.seriesIndex, this.dataType, e, t), this._graphicEls[e] = t;
|
|
277
|
+
}, u.prototype.getItemGraphicEl = function(e) {
|
|
278
|
+
return this._graphicEls[e];
|
|
279
|
+
}, u.prototype.eachItemGraphicEl = function(e, t) {
|
|
280
|
+
i(this._graphicEls, function(n, r) {
|
|
281
|
+
n && e && e.call(t, n, r);
|
|
282
|
+
});
|
|
283
|
+
}, u.prototype.cloneShallow = function(e) {
|
|
284
|
+
return e ||= new u(this._schema ? this._schema : D(this.dimensions, this._getDimInfo, this), this.hostModel), L(e, this), e._store = this._store, e;
|
|
285
|
+
}, u.prototype.wrapMethod = function(e, t) {
|
|
286
|
+
var n = this[e];
|
|
287
|
+
c(n) && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(e), this[e] = function() {
|
|
288
|
+
var e = n.apply(this, arguments);
|
|
289
|
+
return t.apply(this, [e].concat(m(arguments)));
|
|
290
|
+
});
|
|
291
|
+
}, u.internalField = function() {
|
|
292
|
+
N = function(e) {
|
|
293
|
+
var t = e._invertedIndicesMap;
|
|
294
|
+
i(t, function(n, r) {
|
|
295
|
+
var i = e._dimInfos[r], a = i.ordinalMeta, o = e._store;
|
|
296
|
+
if (a) {
|
|
297
|
+
n = t[r] = new O(a.categories.length);
|
|
298
|
+
for (var s = 0; s < n.length; s++) n[s] = A;
|
|
299
|
+
for (var s = 0; s < o.count(); s++) n[o.get(i.storeDimIndex, s)] = s;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
}, F = function(e, t, n) {
|
|
303
|
+
return h(e._getCategory(t, n), null);
|
|
304
|
+
}, P = function(e, t) {
|
|
305
|
+
var n = e._idList[t];
|
|
306
|
+
return n == null && e._idDimIdx != null && (n = F(e, e._idDimIdx, t)), n ??= k + t, n;
|
|
307
|
+
}, I = function(e) {
|
|
308
|
+
return o(e) || (e = e == null ? [] : [e]), e;
|
|
309
|
+
}, R = function(e) {
|
|
310
|
+
var t = new u(e._schema ? e._schema : D(e.dimensions, e._getDimInfo, e), e.hostModel);
|
|
311
|
+
return L(t, e), t;
|
|
312
|
+
}, L = function(e, t) {
|
|
313
|
+
i(j.concat(t.__wrappedMethods || []), function(n) {
|
|
314
|
+
t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
315
|
+
}), e.__wrappedMethods = t.__wrappedMethods, i(M, function(r) {
|
|
316
|
+
e[r] = n(t[r]);
|
|
317
|
+
}), e._calculationInfo = a({}, t._calculationInfo);
|
|
318
|
+
}, z = function(e, t) {
|
|
319
|
+
var n = e._nameList, r = e._idList, i = e._nameDimIdx, a = e._idDimIdx, o = n[t], s = r[t];
|
|
320
|
+
if (o == null && i != null && (n[t] = o = F(e, i, t)), s == null && a != null && (r[t] = s = F(e, a, t)), s == null && o != null) {
|
|
321
|
+
var c = e._nameRepeatCount, l = c[o] = (c[o] || 0) + 1;
|
|
322
|
+
s = o, l > 1 && (s += "__ec__" + l), r[t] = s;
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
}(), u;
|
|
326
|
+
}();
|
|
327
|
+
//#endregion
|
|
328
|
+
export { B as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { extend as e } from "../../../zrender/lib/core/util.js";
|
|
2
|
+
//#region node_modules/echarts/lib/data/SeriesDimensionDefine.js
|
|
3
|
+
var t = function() {
|
|
4
|
+
function t(t) {
|
|
5
|
+
this.otherDims = {}, t != null && e(this, t);
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
}();
|
|
9
|
+
//#endregion
|
|
10
|
+
export { t as default };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { assert as e, clone as t, createHashMap as n, each as r, hasOwn as i, isArray as a, isArrayLike as o, isNumber as s, isObject as c, isString as l, isTypedArray as u, keys as d, map as f } from "../../../zrender/lib/core/util.js";
|
|
2
|
+
import { getDataItemValue as p } from "../util/model.js";
|
|
3
|
+
import { SOURCE_FORMAT_ARRAY_ROWS as m, SOURCE_FORMAT_KEYED_COLUMNS as h, SOURCE_FORMAT_OBJECT_ROWS as g, SOURCE_FORMAT_ORIGINAL as _, SOURCE_FORMAT_TYPED_ARRAY as v, SOURCE_FORMAT_UNKNOWN as y } from "../util/types.js";
|
|
4
|
+
import { BE_ORDINAL as b, guessOrdinal as x } from "./helper/sourceHelper.js";
|
|
5
|
+
//#region node_modules/echarts/lib/data/Source.js
|
|
6
|
+
var S = function() {
|
|
7
|
+
function e(e) {
|
|
8
|
+
this.data = e.data || (e.sourceFormat === "keyedColumns" ? {} : []), this.sourceFormat = e.sourceFormat || "unknown", this.seriesLayoutBy = e.seriesLayoutBy || "column", this.startIndex = e.startIndex || 0, this.dimensionsDetectedCount = e.dimensionsDetectedCount, this.metaRawOption = e.metaRawOption;
|
|
9
|
+
var t = this.dimensionsDefine = e.dimensionsDefine;
|
|
10
|
+
if (t) for (var n = 0; n < t.length; n++) {
|
|
11
|
+
var r = t[n];
|
|
12
|
+
r.type == null && x(this, n) === b.Must && (r.type = "ordinal");
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return e;
|
|
16
|
+
}();
|
|
17
|
+
function C(e) {
|
|
18
|
+
return e instanceof S;
|
|
19
|
+
}
|
|
20
|
+
function w(e, n, r) {
|
|
21
|
+
r ||= D(e);
|
|
22
|
+
var i = n.seriesLayoutBy, a = O(e, r, i, n.sourceHeader, n.dimensions);
|
|
23
|
+
return new S({
|
|
24
|
+
data: e,
|
|
25
|
+
sourceFormat: r,
|
|
26
|
+
seriesLayoutBy: i,
|
|
27
|
+
dimensionsDefine: a.dimensionsDefine,
|
|
28
|
+
startIndex: a.startIndex,
|
|
29
|
+
dimensionsDetectedCount: a.dimensionsDetectedCount,
|
|
30
|
+
metaRawOption: t(n)
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function T(e) {
|
|
34
|
+
return new S({
|
|
35
|
+
data: e,
|
|
36
|
+
sourceFormat: u(e) ? v : _
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function E(e) {
|
|
40
|
+
return new S({
|
|
41
|
+
data: e.data,
|
|
42
|
+
sourceFormat: e.sourceFormat,
|
|
43
|
+
seriesLayoutBy: e.seriesLayoutBy,
|
|
44
|
+
dimensionsDefine: t(e.dimensionsDefine),
|
|
45
|
+
startIndex: e.startIndex,
|
|
46
|
+
dimensionsDetectedCount: e.dimensionsDetectedCount
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function D(e) {
|
|
50
|
+
var t = y;
|
|
51
|
+
if (u(e)) t = v;
|
|
52
|
+
else if (a(e)) {
|
|
53
|
+
e.length === 0 && (t = m);
|
|
54
|
+
for (var n = 0, r = e.length; n < r; n++) {
|
|
55
|
+
var s = e[n];
|
|
56
|
+
if (s != null) {
|
|
57
|
+
if (a(s) || u(s)) {
|
|
58
|
+
t = m;
|
|
59
|
+
break;
|
|
60
|
+
} else if (c(s)) {
|
|
61
|
+
t = g;
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
} else if (c(e)) {
|
|
67
|
+
for (var l in e) if (i(e, l) && o(e[l])) {
|
|
68
|
+
t = h;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return t;
|
|
73
|
+
}
|
|
74
|
+
function O(t, n, i, o, c) {
|
|
75
|
+
var u, d;
|
|
76
|
+
if (!t) return {
|
|
77
|
+
dimensionsDefine: A(c),
|
|
78
|
+
startIndex: d,
|
|
79
|
+
dimensionsDetectedCount: u
|
|
80
|
+
};
|
|
81
|
+
if (n === "arrayRows") {
|
|
82
|
+
var f = t;
|
|
83
|
+
o === "auto" || o == null ? j(function(e) {
|
|
84
|
+
e != null && e !== "-" && (l(e) ? d ??= 1 : d = 0);
|
|
85
|
+
}, i, f, 10) : d = s(o) ? o : +!!o, !c && d === 1 && (c = [], j(function(e, t) {
|
|
86
|
+
c[t] = e == null ? "" : e + "";
|
|
87
|
+
}, i, f, Infinity)), u = c ? c.length : i === "row" ? f.length : f[0] ? f[0].length : null;
|
|
88
|
+
} else if (n === "objectRows") c ||= k(t);
|
|
89
|
+
else if (n === "keyedColumns") c || (c = [], r(t, function(e, t) {
|
|
90
|
+
c.push(t);
|
|
91
|
+
}));
|
|
92
|
+
else if (n === "original") {
|
|
93
|
+
var m = p(t[0]);
|
|
94
|
+
u = a(m) && m.length || 1;
|
|
95
|
+
} else n === "typedArray" && process.env.NODE_ENV !== "production" && e(!!c, "dimensions must be given if data is TypedArray.");
|
|
96
|
+
return {
|
|
97
|
+
startIndex: d,
|
|
98
|
+
dimensionsDefine: A(c),
|
|
99
|
+
dimensionsDetectedCount: u
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function k(e) {
|
|
103
|
+
for (var t = 0, n; t < e.length && !(n = e[t++]););
|
|
104
|
+
if (n) return d(n);
|
|
105
|
+
}
|
|
106
|
+
function A(e) {
|
|
107
|
+
if (e) {
|
|
108
|
+
var t = n();
|
|
109
|
+
return f(e, function(e, n) {
|
|
110
|
+
e = c(e) ? e : { name: e };
|
|
111
|
+
var r = {
|
|
112
|
+
name: e.name,
|
|
113
|
+
displayName: e.displayName,
|
|
114
|
+
type: e.type
|
|
115
|
+
};
|
|
116
|
+
if (r.name == null) return r;
|
|
117
|
+
r.name += "", r.displayName ??= r.name;
|
|
118
|
+
var i = t.get(r.name);
|
|
119
|
+
return i ? r.name += "-" + i.count++ : t.set(r.name, { count: 1 }), r;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function j(e, t, n, r) {
|
|
124
|
+
if (t === "row") for (var i = 0; i < n.length && i < r; i++) e(n[i] ? n[i][0] : null, i);
|
|
125
|
+
else for (var a = n[0] || [], i = 0; i < a.length && i < r; i++) e(a[i], i);
|
|
126
|
+
}
|
|
127
|
+
function M(e) {
|
|
128
|
+
var t = e.sourceFormat;
|
|
129
|
+
return t === "objectRows" || t === "keyedColumns";
|
|
130
|
+
}
|
|
131
|
+
//#endregion
|
|
132
|
+
export { E as cloneSourceShallow, w as createSource, T as createSourceFromSeriesDataOption, D as detectSourceFormat, C as isSourceInstance, M as shouldRetrieveDataByName };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { createHashMap as e, isObject as t, retrieve2 as n } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import { makeInner as r } from "../../util/model.js";
|
|
3
|
+
import { shouldRetrieveDataByName as i } from "../Source.js";
|
|
4
|
+
//#region node_modules/echarts/lib/data/helper/SeriesDataSchema.js
|
|
5
|
+
var a = r(), o = {
|
|
6
|
+
float: "f",
|
|
7
|
+
int: "i",
|
|
8
|
+
ordinal: "o",
|
|
9
|
+
number: "n",
|
|
10
|
+
time: "t"
|
|
11
|
+
}, s = function() {
|
|
12
|
+
function e(e) {
|
|
13
|
+
this.dimensions = e.dimensions, this._dimOmitted = e.dimensionOmitted, this.source = e.source, this._fullDimCount = e.fullDimensionCount, this._updateDimOmitted(e.dimensionOmitted);
|
|
14
|
+
}
|
|
15
|
+
return e.prototype.isDimensionOmitted = function() {
|
|
16
|
+
return this._dimOmitted;
|
|
17
|
+
}, e.prototype._updateDimOmitted = function(e) {
|
|
18
|
+
this._dimOmitted = e, e && (this._dimNameMap ||= u(this.source));
|
|
19
|
+
}, e.prototype.getSourceDimensionIndex = function(e) {
|
|
20
|
+
return n(this._dimNameMap.get(e), -1);
|
|
21
|
+
}, e.prototype.getSourceDimension = function(e) {
|
|
22
|
+
var t = this.source.dimensionsDefine;
|
|
23
|
+
if (t) return t[e];
|
|
24
|
+
}, e.prototype.makeStoreSchema = function() {
|
|
25
|
+
for (var e = this._fullDimCount, t = i(this.source), n = !d(e), r = "", a = [], s = 0, c = 0; s < e; s++) {
|
|
26
|
+
var l = void 0, u = void 0, f = void 0, p = this.dimensions[c];
|
|
27
|
+
if (p && p.storeDimIndex === s) l = t ? p.name : null, u = p.type, f = p.ordinalMeta, c++;
|
|
28
|
+
else {
|
|
29
|
+
var m = this.getSourceDimension(s);
|
|
30
|
+
m && (l = t ? m.name : null, u = m.type);
|
|
31
|
+
}
|
|
32
|
+
a.push({
|
|
33
|
+
property: l,
|
|
34
|
+
type: u,
|
|
35
|
+
ordinalMeta: f
|
|
36
|
+
}), t && l != null && (!p || !p.isCalculationCoord) && (r += n ? l.replace(/\`/g, "`1").replace(/\$/g, "`2") : l), r += "$", r += o[u] || "f", f && (r += f.uid), r += "$";
|
|
37
|
+
}
|
|
38
|
+
var h = this.source;
|
|
39
|
+
return {
|
|
40
|
+
dimensions: a,
|
|
41
|
+
hash: [
|
|
42
|
+
h.seriesLayoutBy,
|
|
43
|
+
h.startIndex,
|
|
44
|
+
r
|
|
45
|
+
].join("$$")
|
|
46
|
+
};
|
|
47
|
+
}, e.prototype.makeOutputDimensionNames = function() {
|
|
48
|
+
for (var e = [], t = 0, n = 0; t < this._fullDimCount; t++) {
|
|
49
|
+
var r = void 0, i = this.dimensions[n];
|
|
50
|
+
if (i && i.storeDimIndex === t) i.isCalculationCoord || (r = i.name), n++;
|
|
51
|
+
else {
|
|
52
|
+
var a = this.getSourceDimension(t);
|
|
53
|
+
a && (r = a.name);
|
|
54
|
+
}
|
|
55
|
+
e.push(r);
|
|
56
|
+
}
|
|
57
|
+
return e;
|
|
58
|
+
}, e.prototype.appendCalculationDimension = function(e) {
|
|
59
|
+
this.dimensions.push(e), e.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0);
|
|
60
|
+
}, e;
|
|
61
|
+
}();
|
|
62
|
+
function c(e) {
|
|
63
|
+
return e instanceof s;
|
|
64
|
+
}
|
|
65
|
+
function l(n) {
|
|
66
|
+
for (var r = e(), i = 0; i < (n || []).length; i++) {
|
|
67
|
+
var a = n[i], o = t(a) ? a.name : a;
|
|
68
|
+
o != null && r.get(o) == null && r.set(o, i);
|
|
69
|
+
}
|
|
70
|
+
return r;
|
|
71
|
+
}
|
|
72
|
+
function u(e) {
|
|
73
|
+
var t = a(e);
|
|
74
|
+
return t.dimNameMap ||= l(e.dimensionsDefine);
|
|
75
|
+
}
|
|
76
|
+
function d(e) {
|
|
77
|
+
return e > 30;
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { s as SeriesDataSchema, l as createDimNameMap, u as ensureSourceDimNameMap, c as isSeriesDataSchema, d as shouldOmitUnusedDimensions };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { createHashMap as e, defaults as t, each as n, extend as r, isObject as i, isString as a } from "../../../../zrender/lib/core/util.js";
|
|
2
|
+
import { normalizeToArray as o, removeDuplicates as s } from "../../util/model.js";
|
|
3
|
+
import { VISUAL_DIMENSIONS as c } from "../../util/types.js";
|
|
4
|
+
import l from "../SeriesDimensionDefine.js";
|
|
5
|
+
import { BE_ORDINAL as u, guessOrdinal as d } from "./sourceHelper.js";
|
|
6
|
+
import { createSourceFromSeriesDataOption as f, isSourceInstance as p } from "../Source.js";
|
|
7
|
+
import { CtorInt32Array as m } from "../DataStore.js";
|
|
8
|
+
import { SeriesDataSchema as h, createDimNameMap as g, ensureSourceDimNameMap as _, shouldOmitUnusedDimensions as v } from "./SeriesDataSchema.js";
|
|
9
|
+
//#region node_modules/echarts/lib/data/helper/createDimensions.js
|
|
10
|
+
function y(y, S) {
|
|
11
|
+
p(y) || (y = f(y)), S ||= {};
|
|
12
|
+
var C = S.coordDimensions || [], w = S.dimensionsDefine || y.dimensionsDefine || [], T = e(), E = [], D = b(y, C, w, S.dimensionsCount), O = S.canOmitUnusedDimensions && v(D), k = w === y.dimensionsDefine, A = k ? _(y) : g(w), j = S.encodeDefine;
|
|
13
|
+
!j && S.encodeDefaulter && (j = S.encodeDefaulter(y, D));
|
|
14
|
+
for (var M = e(j), N = new m(D), P = 0; P < N.length; P++) N[P] = -1;
|
|
15
|
+
function F(e) {
|
|
16
|
+
var t = N[e];
|
|
17
|
+
if (t < 0) {
|
|
18
|
+
var n = w[e], r = i(n) ? n : { name: n }, a = new l(), o = r.name;
|
|
19
|
+
return o != null && A.get(o) != null && (a.name = a.displayName = o), r.type != null && (a.type = r.type), r.displayName != null && (a.displayName = r.displayName), N[e] = E.length, a.storeDimIndex = e, E.push(a), a;
|
|
20
|
+
}
|
|
21
|
+
return E[t];
|
|
22
|
+
}
|
|
23
|
+
if (!O) for (var P = 0; P < D; P++) F(P);
|
|
24
|
+
M.each(function(e, t) {
|
|
25
|
+
var r = o(e).slice();
|
|
26
|
+
if (r.length === 1 && !a(r[0]) && r[0] < 0) {
|
|
27
|
+
M.set(t, !1);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
var i = M.set(t, []);
|
|
31
|
+
n(r, function(e, n) {
|
|
32
|
+
var r = a(e) ? A.get(e) : e;
|
|
33
|
+
r != null && r < D && (i[n] = r, L(F(r), t, n));
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
var I = 0;
|
|
37
|
+
n(C, function(e) {
|
|
38
|
+
var s, c, l, u;
|
|
39
|
+
if (a(e)) s = e, u = {};
|
|
40
|
+
else {
|
|
41
|
+
u = e, s = u.name;
|
|
42
|
+
var d = u.ordinalMeta;
|
|
43
|
+
u.ordinalMeta = null, u = r({}, u), u.ordinalMeta = d, c = u.dimsDef, l = u.otherDims, u.name = u.coordDim = u.coordDimIndex = u.dimsDef = u.otherDims = null;
|
|
44
|
+
}
|
|
45
|
+
var f = M.get(s);
|
|
46
|
+
if (f !== !1) {
|
|
47
|
+
if (f = o(f), !f.length) for (var p = 0; p < (c && c.length || 1); p++) {
|
|
48
|
+
for (; I < D && F(I).coordDim != null;) I++;
|
|
49
|
+
I < D && f.push(I++);
|
|
50
|
+
}
|
|
51
|
+
n(f, function(e, n) {
|
|
52
|
+
var r = F(e);
|
|
53
|
+
if (k && u.type != null && (r.type = u.type), L(t(r, u), s, n), r.name == null && c) {
|
|
54
|
+
var a = c[n];
|
|
55
|
+
!i(a) && (a = { name: a }), r.name = r.displayName = a.name, r.defaultTooltip = a.defaultTooltip;
|
|
56
|
+
}
|
|
57
|
+
l && t(r.otherDims, l);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
function L(e, t, n) {
|
|
62
|
+
c.get(t) == null ? (e.coordDim = t, e.coordDimIndex = n, T.set(t, !0)) : e.otherDims[t] = n;
|
|
63
|
+
}
|
|
64
|
+
var R = S.generateCoord, z = S.generateCoordCount, B = z != null;
|
|
65
|
+
z = R ? z || 1 : 0;
|
|
66
|
+
var V = R || "value";
|
|
67
|
+
function H(e) {
|
|
68
|
+
e.name ??= e.coordDim;
|
|
69
|
+
}
|
|
70
|
+
if (O) n(E, function(e) {
|
|
71
|
+
H(e);
|
|
72
|
+
}), E.sort(function(e, t) {
|
|
73
|
+
return e.storeDimIndex - t.storeDimIndex;
|
|
74
|
+
});
|
|
75
|
+
else for (var U = 0; U < D; U++) {
|
|
76
|
+
var W = F(U);
|
|
77
|
+
W.coordDim ?? (W.coordDim = x(V, T, B), W.coordDimIndex = 0, (!R || z <= 0) && (W.isExtraCoord = !0), z--), H(W), W.type == null && (d(y, U) === u.Must || W.isExtraCoord && (W.otherDims.itemName != null || W.otherDims.seriesName != null)) && (W.type = "ordinal");
|
|
78
|
+
}
|
|
79
|
+
return s(E, function(e) {
|
|
80
|
+
return e.name;
|
|
81
|
+
}, function(e, t) {
|
|
82
|
+
t > 0 && (e.name += t - 1);
|
|
83
|
+
}), new h({
|
|
84
|
+
source: y,
|
|
85
|
+
dimensions: E,
|
|
86
|
+
fullDimensionCount: D,
|
|
87
|
+
dimensionOmitted: O
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function b(e, t, r, a) {
|
|
91
|
+
var o = Math.max(e.dimensionsDetectedCount || 1, t.length, r.length, a || 0);
|
|
92
|
+
return n(t, function(e) {
|
|
93
|
+
var t;
|
|
94
|
+
i(e) && (t = e.dimsDef) && (o = Math.max(o, t.length));
|
|
95
|
+
}), o;
|
|
96
|
+
}
|
|
97
|
+
function x(e, t, n) {
|
|
98
|
+
if (n || t.hasKey(e)) {
|
|
99
|
+
for (var r = 0; t.hasKey(e + r);) r++;
|
|
100
|
+
e += r;
|
|
101
|
+
}
|
|
102
|
+
return t.set(e, !0), e;
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
export { y as default };
|