reke-ui 0.5.2 → 0.5.4

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.
Files changed (159) hide show
  1. package/custom-elements.json +764 -3
  2. package/dist/components/reke-bar-chart/reke-bar-chart.d.ts +99 -0
  3. package/dist/components/reke-bar-chart/reke-bar-chart.d.ts.map +1 -0
  4. package/dist/components/reke-bar-chart/reke-bar-chart.js +319 -0
  5. package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts +2 -0
  6. package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts.map +1 -0
  7. package/dist/components/reke-bar-chart/reke-bar-chart.styles.js +36 -0
  8. package/dist/components/reke-dialog/reke-dialog.d.ts +19 -0
  9. package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -1
  10. package/dist/components/reke-dialog/reke-dialog.js +40 -15
  11. package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -1
  12. package/dist/components/reke-dialog/reke-dialog.styles.js +110 -0
  13. package/dist/components/reke-pie-chart/reke-pie-chart.d.ts +52 -1
  14. package/dist/components/reke-pie-chart/reke-pie-chart.d.ts.map +1 -1
  15. package/dist/components/reke-pie-chart/reke-pie-chart.js +181 -42
  16. package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts.map +1 -1
  17. package/dist/components/reke-pie-chart/reke-pie-chart.styles.js +47 -0
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +21 -20
  21. package/dist/node_modules/echarts/lib/chart/bar/BarSeries.js +50 -0
  22. package/dist/node_modules/echarts/lib/chart/bar/BarView.js +431 -0
  23. package/dist/node_modules/echarts/lib/chart/bar/BaseBarSeries.js +65 -0
  24. package/dist/node_modules/echarts/lib/chart/bar/install.js +22 -0
  25. package/dist/node_modules/echarts/lib/chart/helper/Symbol.js +142 -0
  26. package/dist/node_modules/echarts/lib/chart/helper/SymbolDraw.js +99 -0
  27. package/dist/node_modules/echarts/lib/chart/helper/axisSnippets.js +19 -0
  28. package/dist/node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js +50 -0
  29. package/dist/node_modules/echarts/lib/chart/helper/createSeriesData.js +55 -0
  30. package/dist/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +3 -3
  31. package/dist/node_modules/echarts/lib/chart/helper/labelHelper.js +24 -0
  32. package/dist/node_modules/echarts/lib/chart/line/LineSeries.js +60 -0
  33. package/dist/node_modules/echarts/lib/chart/line/LineView.js +471 -0
  34. package/dist/node_modules/echarts/lib/chart/line/helper.js +34 -0
  35. package/dist/node_modules/echarts/lib/chart/line/install.js +16 -0
  36. package/dist/node_modules/echarts/lib/chart/line/lineAnimationDiff.js +59 -0
  37. package/dist/node_modules/echarts/lib/chart/line/poly.js +135 -0
  38. package/dist/node_modules/echarts/lib/chart/pie/PieSeries.js +32 -32
  39. package/dist/node_modules/echarts/lib/chart/pie/PieView.js +69 -69
  40. package/dist/node_modules/echarts/lib/chart/pie/labelLayout.js +25 -25
  41. package/dist/node_modules/echarts/lib/chart/pie/pieLayout.js +16 -16
  42. package/dist/node_modules/echarts/lib/component/axis/AxisBuilder.js +153 -153
  43. package/dist/node_modules/echarts/lib/component/axis/AxisView.js +13 -13
  44. package/dist/node_modules/echarts/lib/component/axis/CartesianAxisView.js +106 -0
  45. package/dist/node_modules/echarts/lib/component/axis/axisSplitHelper.js +50 -0
  46. package/dist/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +20 -20
  47. package/dist/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +30 -30
  48. package/dist/node_modules/echarts/lib/component/axisPointer/viewHelper.js +13 -13
  49. package/dist/node_modules/echarts/lib/component/dataZoom/AxisProxy.js +114 -0
  50. package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomModel.js +189 -0
  51. package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomView.js +15 -0
  52. package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js +21 -0
  53. package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomView.js +67 -0
  54. package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js +75 -0
  55. package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomView.js +465 -0
  56. package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomAction.js +17 -0
  57. package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js +55 -0
  58. package/dist/node_modules/echarts/lib/component/dataZoom/helper.js +88 -0
  59. package/dist/node_modules/echarts/lib/component/dataZoom/installCommon.js +14 -0
  60. package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomInside.js +10 -0
  61. package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomSlider.js +9 -0
  62. package/dist/node_modules/echarts/lib/component/dataZoom/roams.js +132 -0
  63. package/dist/node_modules/echarts/lib/component/grid/install.js +9 -0
  64. package/dist/node_modules/echarts/lib/component/grid/installSimple.js +32 -0
  65. package/dist/node_modules/echarts/lib/component/helper/RoamController.js +172 -0
  66. package/dist/node_modules/echarts/lib/component/helper/cursorHelper.js +17 -0
  67. package/dist/node_modules/echarts/lib/component/helper/interactionMutex.js +15 -0
  68. package/dist/node_modules/echarts/lib/component/helper/sliderMove.js +29 -0
  69. package/dist/node_modules/echarts/lib/component/legend/LegendModel.js +31 -31
  70. package/dist/node_modules/echarts/lib/component/legend/LegendView.js +61 -61
  71. package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +29 -29
  72. package/dist/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +4 -4
  73. package/dist/node_modules/echarts/lib/component/tooltip/TooltipView.js +105 -105
  74. package/dist/node_modules/echarts/lib/coord/Axis.js +92 -0
  75. package/dist/node_modules/echarts/lib/coord/CoordinateSystem.js +6 -0
  76. package/dist/node_modules/echarts/lib/coord/axisAlignTicks.js +76 -0
  77. package/dist/node_modules/echarts/lib/coord/axisCommonTypes.js +9 -0
  78. package/dist/node_modules/echarts/lib/coord/axisDefault.js +124 -0
  79. package/dist/node_modules/echarts/lib/coord/axisHelper.js +123 -14
  80. package/dist/node_modules/echarts/lib/coord/axisModelCommonMixin.js +9 -0
  81. package/dist/node_modules/echarts/lib/coord/axisModelCreator.js +39 -0
  82. package/dist/node_modules/echarts/lib/coord/axisNiceTicks.js +64 -0
  83. package/dist/node_modules/echarts/lib/coord/axisStatistics.js +101 -22
  84. package/dist/node_modules/echarts/lib/coord/axisStatisticsMetricsImpl.js +43 -0
  85. package/dist/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +151 -5
  86. package/dist/node_modules/echarts/lib/coord/cartesian/Axis2D.js +24 -0
  87. package/dist/node_modules/echarts/lib/coord/cartesian/AxisModel.js +18 -0
  88. package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian.js +23 -0
  89. package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian2D.js +69 -0
  90. package/dist/node_modules/echarts/lib/coord/cartesian/Grid.js +314 -0
  91. package/dist/node_modules/echarts/lib/coord/cartesian/GridModel.js +40 -0
  92. package/dist/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +43 -12
  93. package/dist/node_modules/echarts/lib/coord/scaleRawExtentInfo.js +175 -0
  94. package/dist/node_modules/echarts/lib/core/CoordinateSystem.js +39 -16
  95. package/dist/node_modules/echarts/lib/core/echarts.js +421 -421
  96. package/dist/node_modules/echarts/lib/data/OrdinalMeta.js +30 -0
  97. package/dist/node_modules/echarts/lib/data/SeriesData.js +18 -18
  98. package/dist/node_modules/echarts/lib/data/helper/createDimensions.js +6 -6
  99. package/dist/node_modules/echarts/lib/data/helper/dataStackHelper.js +59 -0
  100. package/dist/node_modules/echarts/lib/data/helper/dataValueHelper.js +13 -13
  101. package/dist/node_modules/echarts/lib/data/helper/dimensionHelper.js +7 -4
  102. package/dist/node_modules/echarts/lib/data/helper/sourceHelper.js +40 -8
  103. package/dist/node_modules/echarts/lib/data/helper/sourceManager.js +3 -3
  104. package/dist/node_modules/echarts/lib/data/helper/transform.js +8 -8
  105. package/dist/node_modules/echarts/lib/extension.js +10 -10
  106. package/dist/node_modules/echarts/lib/label/labelGuideHelper.js +10 -10
  107. package/dist/node_modules/echarts/lib/label/labelStyle.js +34 -25
  108. package/dist/node_modules/echarts/lib/label/sectorLabel.js +83 -0
  109. package/dist/node_modules/echarts/lib/layout/barCommon.js +19 -0
  110. package/dist/node_modules/echarts/lib/layout/barGrid.js +165 -0
  111. package/dist/node_modules/echarts/lib/layout/points.js +37 -0
  112. package/dist/node_modules/echarts/lib/loading/default.js +6 -6
  113. package/dist/node_modules/echarts/lib/model/Component.js +39 -39
  114. package/dist/node_modules/echarts/lib/model/Global.js +122 -122
  115. package/dist/node_modules/echarts/lib/model/Series.js +78 -78
  116. package/dist/node_modules/echarts/lib/model/referHelper.js +58 -0
  117. package/dist/node_modules/echarts/lib/processor/dataSample.js +43 -0
  118. package/dist/node_modules/echarts/lib/scale/Interval.js +68 -0
  119. package/dist/node_modules/echarts/lib/scale/Log.js +100 -0
  120. package/dist/node_modules/echarts/lib/scale/Ordinal.js +92 -0
  121. package/dist/node_modules/echarts/lib/scale/Scale.js +13 -0
  122. package/dist/node_modules/echarts/lib/scale/Time.js +242 -0
  123. package/dist/node_modules/echarts/lib/scale/break.js +10 -2
  124. package/dist/node_modules/echarts/lib/scale/helper.js +61 -3
  125. package/dist/node_modules/echarts/lib/scale/minorTicks.js +22 -0
  126. package/dist/node_modules/echarts/lib/scale/scaleMapper.js +89 -7
  127. package/dist/node_modules/echarts/lib/util/clazz.js +35 -35
  128. package/dist/node_modules/echarts/lib/util/component.js +16 -16
  129. package/dist/node_modules/echarts/lib/util/cycleCache.js +4 -1
  130. package/dist/node_modules/echarts/lib/util/decal.js +11 -11
  131. package/dist/node_modules/echarts/lib/util/format.js +1 -1
  132. package/dist/node_modules/echarts/lib/util/graphic.js +170 -170
  133. package/dist/node_modules/echarts/lib/util/layout.js +23 -23
  134. package/dist/node_modules/echarts/lib/util/model.js +128 -68
  135. package/dist/node_modules/echarts/lib/util/number.js +55 -37
  136. package/dist/node_modules/echarts/lib/util/shape/sausage.js +25 -0
  137. package/dist/node_modules/echarts/lib/util/states.js +96 -82
  138. package/dist/node_modules/echarts/lib/util/styleCompat.js +10 -0
  139. package/dist/node_modules/echarts/lib/util/symbol.js +24 -21
  140. package/dist/node_modules/echarts/lib/util/time.js +154 -18
  141. package/dist/node_modules/echarts/lib/util/vendor.js +26 -0
  142. package/dist/node_modules/echarts/lib/view/Chart.js +19 -19
  143. package/dist/node_modules/echarts/lib/view/Component.js +7 -7
  144. package/dist/node_modules/echarts/lib/visual/style.js +5 -5
  145. package/dist/node_modules/zrender/lib/Element.js +35 -35
  146. package/dist/node_modules/zrender/lib/canvas/graphic.js +36 -36
  147. package/dist/node_modules/zrender/lib/core/PathProxy.js +25 -25
  148. package/dist/node_modules/zrender/lib/core/event.js +4 -1
  149. package/dist/node_modules/zrender/lib/core/util.js +69 -64
  150. package/dist/node_modules/zrender/lib/graphic/TSpan.js +7 -7
  151. package/dist/node_modules/zrender/lib/graphic/Text.js +37 -37
  152. package/dist/node_modules/zrender/lib/graphic/helper/parseText.js +59 -59
  153. package/dist/node_modules/zrender/lib/tool/color.js +60 -41
  154. package/dist/react.d.ts +10 -0
  155. package/dist/react.d.ts.map +1 -1
  156. package/dist/react.js +85 -73
  157. package/dist/shared/tailwind.js +1 -1
  158. package/dist/tokens/reke-tokens.css +1 -0
  159. package/package.json +5 -1
package/dist/index.js CHANGED
@@ -1,23 +1,24 @@
1
1
  import { RekeElement as e } from "./shared/base-element.js";
2
2
  import { RekeAlert as t } from "./components/reke-alert/reke-alert.js";
3
3
  import { RekeBadge as n } from "./components/reke-badge/reke-badge.js";
4
- import { RekeButton as r } from "./components/reke-button/reke-button.js";
5
- import { RekeCard as i } from "./components/reke-card/reke-card.js";
6
- import { RekeCheckbox as a } from "./components/reke-checkbox/reke-checkbox.js";
7
- import { RekeChip as o } from "./components/reke-chip/reke-chip.js";
8
- import { RekeCombobox as s } from "./components/reke-combobox/reke-combobox.js";
9
- import { RekeDateRange as c } from "./components/reke-date-range/reke-date-range.js";
10
- import { RekeDialog as l } from "./components/reke-dialog/reke-dialog.js";
11
- import { RekeFileUpload as u } from "./components/reke-file-upload/reke-file-upload.js";
12
- import { RekeInput as d } from "./components/reke-input/reke-input.js";
13
- import { RekeMenu as f } from "./components/reke-menu/reke-menu.js";
14
- import { RekeMenuItem as p } from "./components/reke-menu-item/reke-menu-item.js";
15
- import { RekePieChart as m } from "./components/reke-pie-chart/reke-pie-chart.js";
16
- import { RekeProgress as h } from "./components/reke-progress/reke-progress.js";
17
- import { RekeSelect as g } from "./components/reke-select/reke-select.js";
18
- import { RekeTable as _ } from "./components/reke-table/reke-table.js";
19
- import { RekeTextarea as v } from "./components/reke-textarea/reke-textarea.js";
20
- import { RekeToast as y } from "./components/reke-toast/reke-toast.js";
21
- import { RekeToggle as b } from "./components/reke-toggle/reke-toggle.js";
22
- import { RekeTooltip as x } from "./components/reke-tooltip/reke-tooltip.js";
23
- export { t as RekeAlert, n as RekeBadge, r as RekeButton, i as RekeCard, a as RekeCheckbox, o as RekeChip, s as RekeCombobox, c as RekeDateRange, l as RekeDialog, e as RekeElement, u as RekeFileUpload, d as RekeInput, f as RekeMenu, p as RekeMenuItem, m as RekePieChart, h as RekeProgress, g as RekeSelect, _ as RekeTable, v as RekeTextarea, y as RekeToast, b as RekeToggle, x as RekeTooltip };
4
+ import { RekeBarChart as r } from "./components/reke-bar-chart/reke-bar-chart.js";
5
+ import { RekeButton as i } from "./components/reke-button/reke-button.js";
6
+ import { RekeCard as a } from "./components/reke-card/reke-card.js";
7
+ import { RekeCheckbox as o } from "./components/reke-checkbox/reke-checkbox.js";
8
+ import { RekeChip as s } from "./components/reke-chip/reke-chip.js";
9
+ import { RekeCombobox as c } from "./components/reke-combobox/reke-combobox.js";
10
+ import { RekeDateRange as l } from "./components/reke-date-range/reke-date-range.js";
11
+ import { RekeDialog as u } from "./components/reke-dialog/reke-dialog.js";
12
+ import { RekeFileUpload as d } from "./components/reke-file-upload/reke-file-upload.js";
13
+ import { RekeInput as f } from "./components/reke-input/reke-input.js";
14
+ import { RekeMenu as p } from "./components/reke-menu/reke-menu.js";
15
+ import { RekeMenuItem as m } from "./components/reke-menu-item/reke-menu-item.js";
16
+ import { RekePieChart as h } from "./components/reke-pie-chart/reke-pie-chart.js";
17
+ import { RekeProgress as g } from "./components/reke-progress/reke-progress.js";
18
+ import { RekeSelect as _ } from "./components/reke-select/reke-select.js";
19
+ import { RekeTable as v } from "./components/reke-table/reke-table.js";
20
+ import { RekeTextarea as y } from "./components/reke-textarea/reke-textarea.js";
21
+ import { RekeToast as b } from "./components/reke-toast/reke-toast.js";
22
+ import { RekeToggle as x } from "./components/reke-toggle/reke-toggle.js";
23
+ import { RekeTooltip as S } from "./components/reke-tooltip/reke-tooltip.js";
24
+ export { t as RekeAlert, n as RekeBadge, r as RekeBarChart, i as RekeButton, a as RekeCard, o as RekeCheckbox, s as RekeChip, c as RekeCombobox, l as RekeDateRange, u as RekeDialog, e as RekeElement, d as RekeFileUpload, f as RekeInput, p as RekeMenu, m as RekeMenuItem, h as RekePieChart, g as RekeProgress, _ as RekeSelect, v as RekeTable, y as RekeTextarea, b as RekeToast, x as RekeToggle, S as RekeTooltip };
@@ -0,0 +1,50 @@
1
+ import { __extends as e } from "../../../node_modules/tslib/tslib.es6.js";
2
+ import { preparePipelineContext as t } from "../../util/model.js";
3
+ import n from "../helper/createSeriesData.js";
4
+ import { inheritDefaultOption as r } from "../../util/component.js";
5
+ import i from "../../visual/tokens.js";
6
+ import a from "./BaseBarSeries.js";
7
+ //#region node_modules/echarts/lib/chart/bar/BarSeries.js
8
+ var o = function(o) {
9
+ e(s, o);
10
+ function s() {
11
+ var e = o !== null && o.apply(this, arguments) || this;
12
+ return e.type = s.type, e;
13
+ }
14
+ return s.prototype.getInitialData = function() {
15
+ return n(null, this, {
16
+ useEncodeDefaulter: !0,
17
+ createInvertedIndices: !!this.get("realtimeSort", !0) || null
18
+ });
19
+ }, s.prototype.getProgressive = function() {
20
+ return this.get("large") ? this.get("progressive") : !1;
21
+ }, s.prototype.__preparePipelineContext = function(e, n) {
22
+ var r = t(this, e, n);
23
+ return r.progressiveRender && (r.large = !0), r;
24
+ }, s.prototype.brushSelector = function(e, t, n) {
25
+ return n.rect(t.getItemLayout(e));
26
+ }, s.type = "series.bar", s.dependencies = ["grid", "polar"], s.defaultOption = r(a.defaultOption, {
27
+ clip: !0,
28
+ roundCap: !1,
29
+ showBackground: !1,
30
+ backgroundStyle: {
31
+ color: "rgba(180, 180, 180, 0.2)",
32
+ borderColor: null,
33
+ borderWidth: 0,
34
+ borderType: "solid",
35
+ borderRadius: 0,
36
+ shadowBlur: 0,
37
+ shadowColor: null,
38
+ shadowOffsetX: 0,
39
+ shadowOffsetY: 0,
40
+ opacity: 1
41
+ },
42
+ select: { itemStyle: {
43
+ borderColor: i.color.primary,
44
+ borderWidth: 2
45
+ } },
46
+ realtimeSort: !1
47
+ }), s;
48
+ }(a);
49
+ //#endregion
50
+ export { o as default };
@@ -0,0 +1,431 @@
1
+ import { __extends as e } from "../../../node_modules/tslib/tslib.es6.js";
2
+ import { each as t, extend as n, map as r } from "../../../../zrender/lib/core/util.js";
3
+ import i from "../../../../zrender/lib/graphic/Path.js";
4
+ import a from "../../../../zrender/lib/graphic/shape/Rect.js";
5
+ import { warn as o } from "../../util/log.js";
6
+ import { getIncrementalId as s } from "../../util/model.js";
7
+ import { getECData as c } from "../../util/innerStore.js";
8
+ import { setStatesStylesFromModel as l, toggleHoverEmphasis as u } from "../../util/states.js";
9
+ import d from "../../../../zrender/lib/graphic/Group.js";
10
+ import f from "../../../../zrender/lib/graphic/shape/Sector.js";
11
+ import { initProps as p, removeElementWithFadeOut as m, saveOldStyle as h, updateProps as g } from "../../animation/basicTransition.js";
12
+ import { traverseElements as _ } from "../../util/graphic.js";
13
+ import { getLabelStatesModels as v, labelInner as y, setLabelStyle as b, setLabelValueAnimation as x } from "../../label/labelStyle.js";
14
+ import { getDefaultInterpolatedLabel as S, getDefaultLabel as C } from "../helper/labelHelper.js";
15
+ import w from "../../view/Chart.js";
16
+ import { createClipPath as T } from "../helper/createClipPathFromCoordSys.js";
17
+ import { isCoordinateSystemType as E } from "../../coord/CoordinateSystem.js";
18
+ import { throttle as D } from "../../util/throttle.js";
19
+ import O from "../../util/shape/sausage.js";
20
+ import { createSectorCalculateTextPosition as k, setSectorTextRotation as A } from "../../label/sectorLabel.js";
21
+ import { getSectorCornerRadius as j } from "../helper/sectorHelper.js";
22
+ //#region node_modules/echarts/lib/chart/bar/BarView.js
23
+ var M = Math.max, N = Math.min, P = function(t) {
24
+ e(n, t);
25
+ function n() {
26
+ var e = t.call(this) || this;
27
+ return e.type = "bar", e._isFirstFrame = !0, e;
28
+ }
29
+ return n.prototype.render = function(e, t, n, r) {
30
+ this._model = e, this._removeOnRenderedListener(n), this._updateDrawMode(e);
31
+ var i = e.get("coordinateSystem");
32
+ i === "cartesian2d" || i === "polar" ? (this._progressiveEls = null, this._isLargeDraw ? this._renderLarge(e, t, n) : this._renderNormal(e, t, n, r)) : process.env.NODE_ENV !== "production" && o("Only cartesian2d and polar supported for bar.");
33
+ }, n.prototype.incrementalPrepareRender = function(e) {
34
+ this._clear(), this._updateDrawMode(e), this._updateLargeClip(e);
35
+ }, n.prototype.incrementalRender = function(e, t) {
36
+ this._progressiveEls = [], this._incrementalRenderLarge(e, t);
37
+ }, n.prototype.eachRendered = function(e) {
38
+ _(this._progressiveEls || this.group, e);
39
+ }, n.prototype._updateDrawMode = function(e) {
40
+ var t = e.pipelineContext.large;
41
+ (this._isLargeDraw == null || t !== this._isLargeDraw) && (this._isLargeDraw = t, this._clear());
42
+ }, n.prototype._renderNormal = function(e, t, n, r) {
43
+ var i = this.group, a = e.getData(), o = this._data, s = e.coordinateSystem, c = s.getBaseAxis(), l;
44
+ s.type === "cartesian2d" ? l = c.isHorizontal() : s.type === "polar" && (l = c.dim === "angle");
45
+ var u = e.isAnimationEnabled() ? e : null, f = L(e, s);
46
+ f && this._enableRealtimeSort(f, a, n);
47
+ var _ = e.get("clip", !0) || f, v = s.getArea();
48
+ i.removeClipPath();
49
+ var b = e.get("roundCap", !0), x = e.get("showBackground", !0), S = e.getModel("backgroundStyle"), C = S.get("borderRadius") || 0, w = [], T = this._backgroundEls, E = r && r.isInitSort, D = r && r.type === "changeAxisOrder";
50
+ function O(e) {
51
+ var t = U[s.type](a, e);
52
+ if (!t) return null;
53
+ var n = ee(s, l, t);
54
+ return n.useStyle(S.getItemStyle()), s.type === "cartesian2d" ? n.setShape("r", C) : n.setShape("cornerRadius", C), w[e] = n, n;
55
+ }
56
+ a.diff(o).add(function(t) {
57
+ var n = a.getItemModel(t), r = U[s.type](a, t, n);
58
+ if (r && (x && O(t), !(!a.hasValue(t) || !H[s.type](r)))) {
59
+ var o = !1;
60
+ _ && (o = F[s.type](v, r));
61
+ var d = I[s.type](e, a, t, r, l, u, c.model, !1, b);
62
+ f && (d.forceLabelAnimation = !0), K(d, a, t, n, r, e, l, s.type === "polar"), E ? d.attr({ shape: r }) : f ? R(f, u, d, r, t, l, !1, !1) : p(d, { shape: r }, e, t), a.setItemGraphicEl(t, d), i.add(d), d.ignore = o;
63
+ }
64
+ }).update(function(t, n) {
65
+ var r = a.getItemModel(t), d = U[s.type](a, t, r);
66
+ if (d) {
67
+ if (x) {
68
+ var p = void 0;
69
+ T.length === 0 ? p = O(n) : (p = T[n], p.useStyle(S.getItemStyle()), s.type === "cartesian2d" ? p.setShape("r", C) : p.setShape("cornerRadius", C), w[t] = p);
70
+ var k = U[s.type](a, t), A = $(l, k, s);
71
+ g(p, { shape: A }, u, t);
72
+ }
73
+ var j = o.getItemGraphicEl(n);
74
+ if (!a.hasValue(t) || !H[s.type](d)) {
75
+ i.remove(j);
76
+ return;
77
+ }
78
+ var M = !1;
79
+ if (_ && (M = F[s.type](v, d), M && i.remove(j)), j && (j.type === "sector" && b || j.type === "sausage" && !b) && (j && m(j, e, n), j = null), j ? h(j) : j = I[s.type](e, a, t, d, l, u, c.model, !0, b), f && (j.forceLabelAnimation = !0), D) {
80
+ var N = j.getTextContent();
81
+ if (N) {
82
+ var P = y(N);
83
+ P.prevValue != null && (P.prevValue = P.value);
84
+ }
85
+ } else K(j, a, t, r, d, e, l, s.type === "polar");
86
+ E ? j.attr({ shape: d }) : f ? R(f, u, j, d, t, l, !0, D) : g(j, { shape: d }, e, t, null), a.setItemGraphicEl(t, j), j.ignore = M, i.add(j);
87
+ }
88
+ }).remove(function(t) {
89
+ var n = o.getItemGraphicEl(t);
90
+ n && m(n, e, t);
91
+ }).execute();
92
+ var k = this._backgroundGroup ||= new d();
93
+ k.removeAll();
94
+ for (var A = 0; A < w.length; ++A) k.add(w[A]);
95
+ i.add(k), this._backgroundEls = w, this._data = a;
96
+ }, n.prototype._renderLarge = function(e, t, n) {
97
+ this._clear(), X(e, this.group), this._updateLargeClip(e);
98
+ }, n.prototype._incrementalRenderLarge = function(e, t) {
99
+ this._removeBackground(), X(t, this.group, this._progressiveEls, !0);
100
+ }, n.prototype._updateLargeClip = function(e) {
101
+ var t = e.get("clip", !0) && T(e.coordinateSystem, !1, e), n = this.group;
102
+ t ? n.setClipPath(t) : n.removeClipPath();
103
+ }, n.prototype._enableRealtimeSort = function(e, t, n) {
104
+ var r = this;
105
+ if (t.count()) {
106
+ var i = e.baseAxis;
107
+ if (this._isFirstFrame) this._dispatchInitSort(t, e, n), this._isFirstFrame = !1;
108
+ else {
109
+ var a = function(e) {
110
+ var n = t.getItemGraphicEl(e), r = n && n.shape;
111
+ return r && Math.abs(i.isHorizontal() ? r.height : r.width) || 0;
112
+ };
113
+ this._onRendered = function() {
114
+ r._updateSortWithinSameData(t, a, i, n);
115
+ }, n.getZr().on("rendered", this._onRendered);
116
+ }
117
+ }
118
+ }, n.prototype._dataSort = function(e, t, n) {
119
+ var i = [];
120
+ return e.each(e.mapDimension(t.dim), function(e, t) {
121
+ var r = n(t);
122
+ r ??= NaN, i.push({
123
+ dataIndex: t,
124
+ mappedValue: r,
125
+ ordinalNumber: e
126
+ });
127
+ }), i.sort(function(e, t) {
128
+ return t.mappedValue - e.mappedValue;
129
+ }), { ordinalNumbers: r(i, function(e) {
130
+ return e.ordinalNumber;
131
+ }) };
132
+ }, n.prototype._isOrderChangedWithinSameData = function(e, t, n) {
133
+ for (var r = n.scale, i = e.mapDimension(n.dim), a = Number.MAX_VALUE, o = 0, s = r.getOrdinalMeta().categories.length; o < s; ++o) {
134
+ var c = e.rawIndexOf(i, r.getRawOrdinalNumber(o)), l = c < 0 ? Number.MIN_VALUE : t(e.indexOfRawIndex(c));
135
+ if (l > a) return !0;
136
+ a = l;
137
+ }
138
+ return !1;
139
+ }, n.prototype._isOrderDifferentInView = function(e, t) {
140
+ for (var n = t.scale, r = n.getExtent(), i = Math.max(0, r[0]), a = Math.min(r[1], n.getOrdinalMeta().categories.length - 1); i <= a; ++i) if (e.ordinalNumbers[i] !== n.getRawOrdinalNumber(i)) return !0;
141
+ }, n.prototype._updateSortWithinSameData = function(e, t, n, r) {
142
+ if (this._isOrderChangedWithinSameData(e, t, n)) {
143
+ var i = this._dataSort(e, n, t);
144
+ this._isOrderDifferentInView(i, n) && (this._removeOnRenderedListener(r), r.dispatchAction({
145
+ type: "changeAxisOrder",
146
+ componentType: n.dim + "Axis",
147
+ axisId: n.index,
148
+ sortInfo: i
149
+ }));
150
+ }
151
+ }, n.prototype._dispatchInitSort = function(e, t, n) {
152
+ var r = t.baseAxis, i = this._dataSort(e, r, function(n) {
153
+ return e.get(e.mapDimension(t.otherAxis.dim), n);
154
+ });
155
+ n.dispatchAction({
156
+ type: "changeAxisOrder",
157
+ componentType: r.dim + "Axis",
158
+ isInitSort: !0,
159
+ axisId: r.index,
160
+ sortInfo: i
161
+ });
162
+ }, n.prototype.remove = function(e, t) {
163
+ this._clear(this._model), this._removeOnRenderedListener(t);
164
+ }, n.prototype.dispose = function(e, t) {
165
+ this._removeOnRenderedListener(t);
166
+ }, n.prototype._removeOnRenderedListener = function(e) {
167
+ this._onRendered &&= (e.getZr().off("rendered", this._onRendered), null);
168
+ }, n.prototype._clear = function(e) {
169
+ var t = this.group, n = this._data;
170
+ e && e.isAnimationEnabled() && n && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], n.eachItemGraphicEl(function(t) {
171
+ m(t, e, c(t).dataIndex);
172
+ })) : t.removeAll(), this._data = null, this._isFirstFrame = !0;
173
+ }, n.prototype._removeBackground = function() {
174
+ this.group.remove(this._backgroundGroup), this._backgroundGroup = null;
175
+ }, n.type = "bar", n;
176
+ }(w), F = {
177
+ cartesian2d: function(e, t) {
178
+ var n = t.width < 0 ? -1 : 1, r = t.height < 0 ? -1 : 1;
179
+ n < 0 && (t.x += t.width, t.width = -t.width), r < 0 && (t.y += t.height, t.height = -t.height);
180
+ var i = e.x + e.width, a = e.y + e.height, o = M(t.x, e.x), s = N(t.x + t.width, i), c = M(t.y, e.y), l = N(t.y + t.height, a), u = s < o, d = l < c;
181
+ return t.x = u && o > i ? s : o, t.y = d && c > a ? l : c, t.width = u ? 0 : s - o, t.height = d ? 0 : l - c, n < 0 && (t.x += t.width, t.width = -t.width), r < 0 && (t.y += t.height, t.height = -t.height), u || d;
182
+ },
183
+ polar: function(e, t) {
184
+ var n = t.r0 <= t.r ? 1 : -1;
185
+ if (n < 0) {
186
+ var r = t.r;
187
+ t.r = t.r0, t.r0 = r;
188
+ }
189
+ var i = N(t.r, e.r), a = M(t.r0, e.r0);
190
+ t.r = i, t.r0 = a;
191
+ var o = i - a < 0;
192
+ if (n < 0) {
193
+ var r = t.r;
194
+ t.r = t.r0, t.r0 = r;
195
+ }
196
+ return o;
197
+ }
198
+ }, I = {
199
+ cartesian2d: function(e, t, r, i, o, s, c, l, u) {
200
+ var d = new a({
201
+ shape: n({}, i),
202
+ z2: 1
203
+ });
204
+ if (d.__dataIndex = r, d.name = "item", s) {
205
+ var f = d.shape, p = o ? "height" : "width";
206
+ f[p] = 0;
207
+ }
208
+ return d;
209
+ },
210
+ polar: function(e, t, n, r, i, a, o, s, c) {
211
+ var l = !i && c ? O : f, u = new l({
212
+ shape: r,
213
+ z2: 1
214
+ });
215
+ if (u.name = "item", u.calculateTextPosition = k(G(i), { isRoundCap: l === O }), a) {
216
+ var d = u.shape, m = i ? "r" : "endAngle", h = {};
217
+ d[m] = i ? r.r0 : r.startAngle, h[m] = r[m], (s ? g : p)(u, { shape: h }, a);
218
+ }
219
+ return u;
220
+ }
221
+ };
222
+ function L(e, t) {
223
+ var n = e.get("realtimeSort", !0), r = t.getBaseAxis();
224
+ if (process.env.NODE_ENV !== "production" && n && (r.type !== "category" && o("`realtimeSort` will not work because this bar series is not based on a category axis."), t.type !== "cartesian2d" && o("`realtimeSort` will not work because this bar series is not on cartesian2d.")), n && r.type === "category" && t.type === "cartesian2d") return {
225
+ baseAxis: r,
226
+ otherAxis: t.getOtherAxis(r)
227
+ };
228
+ }
229
+ function R(e, t, n, r, i, a, o, s) {
230
+ var c, l;
231
+ a ? (l = {
232
+ x: r.x,
233
+ width: r.width
234
+ }, c = {
235
+ y: r.y,
236
+ height: r.height
237
+ }) : (l = {
238
+ y: r.y,
239
+ height: r.height
240
+ }, c = {
241
+ x: r.x,
242
+ width: r.width
243
+ }), s || (o ? g : p)(n, { shape: c }, t, i, null);
244
+ var u = t ? e.baseAxis.model : null;
245
+ (o ? g : p)(n, { shape: l }, u, i);
246
+ }
247
+ function z(e, t) {
248
+ for (var n = 0; n < t.length; n++) if (!isFinite(e[t[n]])) return !0;
249
+ return !1;
250
+ }
251
+ var B = [
252
+ "x",
253
+ "y",
254
+ "width",
255
+ "height"
256
+ ], V = [
257
+ "cx",
258
+ "cy",
259
+ "r",
260
+ "startAngle",
261
+ "endAngle"
262
+ ], H = {
263
+ cartesian2d: function(e) {
264
+ return !z(e, B);
265
+ },
266
+ polar: function(e) {
267
+ return !z(e, V);
268
+ }
269
+ }, U = {
270
+ cartesian2d: function(e, t, n) {
271
+ var r = e.getItemLayout(t);
272
+ if (!r) return null;
273
+ var i = n ? q(n, r) : 0, a = r.width > 0 ? 1 : -1, o = r.height > 0 ? 1 : -1;
274
+ return {
275
+ x: r.x + a * i / 2,
276
+ y: r.y + o * i / 2,
277
+ width: r.width - a * i,
278
+ height: r.height - o * i
279
+ };
280
+ },
281
+ polar: function(e, t, n) {
282
+ var r = e.getItemLayout(t);
283
+ return {
284
+ cx: r.cx,
285
+ cy: r.cy,
286
+ r0: r.r0,
287
+ r: r.r,
288
+ startAngle: r.startAngle,
289
+ endAngle: r.endAngle,
290
+ clockwise: r.clockwise
291
+ };
292
+ }
293
+ };
294
+ function W(e) {
295
+ return e.startAngle != null && e.endAngle != null && e.startAngle === e.endAngle;
296
+ }
297
+ function G(e) {
298
+ return function(e) {
299
+ var t = e ? "Arc" : "Angle";
300
+ return function(e) {
301
+ switch (e) {
302
+ case "start":
303
+ case "insideStart":
304
+ case "end":
305
+ case "insideEnd": return e + t;
306
+ default: return e;
307
+ }
308
+ };
309
+ }(e);
310
+ }
311
+ function K(e, r, i, a, o, s, c, d) {
312
+ var f = r.getItemVisual(i, "style");
313
+ if (!d) {
314
+ var p = a.get(["itemStyle", "borderRadius"]) || 0;
315
+ e.setShape("r", p);
316
+ } else if (!s.get("roundCap")) {
317
+ var m = e.shape;
318
+ n(m, j(a.getModel("itemStyle"), m, !0)), e.setShape(m);
319
+ }
320
+ e.useStyle(f);
321
+ var h = a.getShallow("cursor");
322
+ h && e.attr("cursor", h);
323
+ var g = d ? c ? o.r >= o.r0 ? "endArc" : "startArc" : o.endAngle >= o.startAngle ? "endAngle" : "startAngle" : c ? te(o, s.coordinateSystem) : ne(o, s.coordinateSystem), _ = v(a);
324
+ b(e, _, {
325
+ labelFetcher: s,
326
+ labelDataIndex: i,
327
+ defaultText: C(s.getData(), i),
328
+ inheritColor: f.fill,
329
+ defaultOpacity: f.opacity,
330
+ defaultOutsidePosition: g
331
+ });
332
+ var y = e.getTextContent();
333
+ if (d && y) {
334
+ var w = a.get(["label", "position"]);
335
+ e.textConfig.inside = w === "middle" ? !0 : null, A(e, w === "outside" ? g : w, G(c), a.get(["label", "rotate"]));
336
+ }
337
+ x(y, _, s.getRawValue(i), function(e) {
338
+ return S(r, e);
339
+ });
340
+ var T = a.getModel(["emphasis"]);
341
+ u(e, T.get("focus"), T.get("blurScope"), T.get("disabled")), l(e, a), W(o) && (e.style.fill = "none", e.style.stroke = "none", t(e.states, function(e) {
342
+ e.style && (e.style.fill = e.style.stroke = "none");
343
+ }));
344
+ }
345
+ function q(e, t) {
346
+ var n = e.get(["itemStyle", "borderColor"]);
347
+ if (!n || n === "none") return 0;
348
+ var r = e.get(["itemStyle", "borderWidth"]) || 0, i = isNaN(t.width) ? Number.MAX_VALUE : Math.abs(t.width), a = isNaN(t.height) ? Number.MAX_VALUE : Math.abs(t.height);
349
+ return Math.min(r, i, a);
350
+ }
351
+ var J = function() {
352
+ function e() {}
353
+ return e;
354
+ }(), Y = function(t) {
355
+ e(n, t);
356
+ function n(e) {
357
+ var n = t.call(this, e) || this;
358
+ return n.type = "largeBar", n;
359
+ }
360
+ return n.prototype.getDefaultShape = function() {
361
+ return new J();
362
+ }, n.prototype.buildPath = function(e, t) {
363
+ for (var n = t.points, r = this.baseDimIdx, i = 1 - this.baseDimIdx, a = [], o = [], s = this.barWidth, c = 0; c < n.length; c += 3) o[r] = s, o[i] = n[c + 2], a[r] = n[c + r], a[i] = n[c + i], e.rect(a[0], a[1], o[0], o[1]);
364
+ }, n;
365
+ }(i);
366
+ function X(e, t, n, r) {
367
+ var i = e.getData(), a = +!!i.getLayout("valueAxisHorizontal"), o = i.getLayout("largeDataIndices"), l = i.getLayout("size"), u = e.getModel("backgroundStyle"), d = i.getLayout("largeBackgroundPoints"), f = r ? s(e) : 0;
368
+ if (d) {
369
+ var p = new Y({
370
+ shape: { points: d },
371
+ incremental: f,
372
+ silent: !0,
373
+ z2: 0
374
+ });
375
+ p.baseDimIdx = a, p.largeDataIndices = o, p.barWidth = l, p.useStyle(u.getItemStyle()), t.add(p), n && n.push(p);
376
+ }
377
+ var m = new Y({
378
+ shape: { points: i.getLayout("largePoints") },
379
+ incremental: f,
380
+ ignoreCoarsePointer: !0,
381
+ z2: 1
382
+ });
383
+ m.baseDimIdx = a, m.largeDataIndices = o, m.barWidth = l, t.add(m), m.useStyle(i.getVisual("style")), m.style.stroke = null, c(m).seriesIndex = e.seriesIndex, e.get("silent") || (m.on("mousedown", Z), m.on("mousemove", Z)), n && n.push(m);
384
+ }
385
+ var Z = D(function(e) {
386
+ var t = this, n = Q(t, e.offsetX, e.offsetY);
387
+ c(t).dataIndex = n >= 0 ? n : null;
388
+ }, 30, !1);
389
+ function Q(e, t, n) {
390
+ for (var r = e.baseDimIdx, i = 1 - r, a = e.shape.points, o = e.largeDataIndices, s = [], c = [], l = e.barWidth, u = 0, d = a.length / 3; u < d; u++) {
391
+ var f = u * 3;
392
+ if (c[r] = l, c[i] = a[f + 2], s[r] = a[f + r], s[i] = a[f + i], c[i] < 0 && (s[i] += c[i], c[i] = -c[i]), t >= s[0] && t <= s[0] + c[0] && n >= s[1] && n <= s[1] + c[1]) return o[u];
393
+ }
394
+ return -1;
395
+ }
396
+ function $(e, t, n) {
397
+ if (E(n, "cartesian2d")) {
398
+ var r = t, i = n.getArea();
399
+ return {
400
+ x: e ? r.x : i.x,
401
+ y: e ? i.y : r.y,
402
+ width: e ? r.width : i.width,
403
+ height: e ? i.height : r.height
404
+ };
405
+ } else {
406
+ var i = n.getArea(), a = t;
407
+ return {
408
+ cx: i.cx,
409
+ cy: i.cy,
410
+ r0: e ? i.r0 : a.r0,
411
+ r: e ? i.r : a.r,
412
+ startAngle: e ? a.startAngle : 0,
413
+ endAngle: e ? a.endAngle : Math.PI * 2
414
+ };
415
+ }
416
+ }
417
+ function ee(e, t, n) {
418
+ return new (e.type === "polar" ? f : a)({
419
+ shape: $(t, n, e),
420
+ silent: !0,
421
+ z2: 0
422
+ });
423
+ }
424
+ function te(e, t) {
425
+ return e.height === 0 ? t.getOtherAxis(t.getBaseAxis()).inverse ? "bottom" : "top" : e.height > 0 ? "bottom" : "top";
426
+ }
427
+ function ne(e, t) {
428
+ return e.width === 0 ? t.getOtherAxis(t.getBaseAxis()).inverse ? "left" : "right" : e.width >= 0 ? "right" : "left";
429
+ }
430
+ //#endregion
431
+ export { P as default };
@@ -0,0 +1,65 @@
1
+ import { __extends as e } from "../../../node_modules/tslib/tslib.es6.js";
2
+ import { each as t } from "../../../../zrender/lib/core/util.js";
3
+ import n from "../helper/createSeriesData.js";
4
+ import r from "../../model/Series.js";
5
+ //#region node_modules/echarts/lib/chart/bar/BaseBarSeries.js
6
+ var i = function(r) {
7
+ e(i, r);
8
+ function i() {
9
+ var e = r !== null && r.apply(this, arguments) || this;
10
+ return e.type = i.type, e;
11
+ }
12
+ return i.prototype.getInitialData = function(e, t) {
13
+ return n(null, this, { useEncodeDefaulter: !0 });
14
+ }, i.prototype.getMarkerPosition = function(e, n, r) {
15
+ var i = this.coordinateSystem;
16
+ if (i && i.clampData) {
17
+ var a = i.clampData(e), o = i.dataToPoint(a);
18
+ if (r) t(i.getAxes(), function(e, t) {
19
+ if (e.type === "category" && n != null) {
20
+ var r = e.getTicksCoords(), i = e.getTickModel().get("alignWithLabel"), s = a[t], c = n[t] === "x1" || n[t] === "y1";
21
+ if (c && !i && (s += 1), r.length < 2) return;
22
+ if (r.length === 2) {
23
+ o[t] = e.toGlobalCoord(e.getExtent()[+!!c]);
24
+ return;
25
+ }
26
+ for (var l = void 0, u = void 0, d = 1, f = 0; f < r.length; f++) {
27
+ var p = r[f].coord, m = f === r.length - 1 ? r[f - 1].tickValue + d : r[f].tickValue;
28
+ if (m === s) {
29
+ u = p;
30
+ break;
31
+ } else if (m < s) l = p;
32
+ else if (l != null && m > s) {
33
+ u = (p + l) / 2;
34
+ break;
35
+ }
36
+ f === 1 && (d = m - r[0].tickValue);
37
+ }
38
+ u ?? (l ? l && (u = r[r.length - 1].coord) : u = r[0].coord), o[t] = e.toGlobalCoord(u);
39
+ }
40
+ });
41
+ else {
42
+ var s = this.getData(), c = s.getLayout("offset"), l = s.getLayout("size"), u = +!i.getBaseAxis().isHorizontal();
43
+ o[u] += c + l / 2;
44
+ }
45
+ return o;
46
+ }
47
+ return [NaN, NaN];
48
+ }, i.prototype.__requireStartValue = function(e) {
49
+ return this.getBaseAxis() !== e;
50
+ }, i.type = "series.__base_bar__", i.defaultOption = {
51
+ z: 2,
52
+ coordinateSystem: "cartesian2d",
53
+ legendHoverLink: !0,
54
+ barMinHeight: 0,
55
+ barMinAngle: 0,
56
+ large: !1,
57
+ largeThreshold: 400,
58
+ progressive: 3e3,
59
+ progressiveChunkMode: "mod",
60
+ defaultBarGap: "10%"
61
+ }, i;
62
+ }(r);
63
+ r.registerClass(i);
64
+ //#endregion
65
+ export { i as default };
@@ -0,0 +1,22 @@
1
+ import e from "../../processor/dataSample.js";
2
+ import { createCrossSeriesLayoutHandler as t, createProgressiveLayout as n, registerBarGridAxisHandlers as r } from "../../layout/barGrid.js";
3
+ import i from "./BarSeries.js";
4
+ import a from "./BarView.js";
5
+ //#region node_modules/echarts/lib/chart/bar/install.js
6
+ function o(o) {
7
+ o.registerChartView(a), o.registerSeriesModel(i), o.registerLayout(o.PRIORITY.VISUAL.LAYOUT, t("bar")), o.registerLayout(o.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, n("bar")), o.registerProcessor(o.PRIORITY.PROCESSOR.STATISTIC, e("bar")), o.registerAction({
8
+ type: "changeAxisOrder",
9
+ event: "changeAxisOrder",
10
+ update: "update"
11
+ }, function(e, t) {
12
+ var n = e.componentType || "series";
13
+ t.eachComponent({
14
+ mainType: n,
15
+ query: e
16
+ }, function(t) {
17
+ e.sortInfo && t.axis.setCategorySortInfo(e.sortInfo);
18
+ });
19
+ }), r(o);
20
+ }
21
+ //#endregion
22
+ export { o as install };