@tsingroc/tsingroc-components 5.0.0-alpha.13 → 5.0.0-alpha.14
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/dist/components/AutoResizedECharts.d.ts +1 -3
- package/dist/components/AutoResizedECharts.js +2 -4
- package/dist/components/ConnectedECharts.d.ts +3 -6
- package/dist/components/ConnectedECharts.js +2 -4
- package/dist/components/LeftAlignedECharts.d.ts +3 -5
- package/dist/components/LeftAlignedECharts.js +2 -4
- package/package.json +1 -1
|
@@ -15,7 +15,5 @@ export declare const withAutoResize: EChartsHOCType;
|
|
|
15
15
|
*
|
|
16
16
|
* @see {@linkcode withAutoResize}
|
|
17
17
|
*/
|
|
18
|
-
declare const AutoResizedECharts: import("./ECharts").EChartsComponentType<{}
|
|
19
|
-
displayName: string;
|
|
20
|
-
};
|
|
18
|
+
declare const AutoResizedECharts: import("./ECharts").EChartsComponentType<{}>;
|
|
21
19
|
export default AutoResizedECharts;
|
|
@@ -14,7 +14,7 @@ import EChartsInstance from "./ECharts";
|
|
|
14
14
|
* `minmax(..., ...fr)` 而不可直接使用 `fr`。不这么做会导致图像只能放大而无法缩小。
|
|
15
15
|
*/
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
export const withAutoResize = ECharts => props
|
|
17
|
+
export const withAutoResize = ECharts => function AutoResizedECharts(props) {
|
|
18
18
|
"use memo";
|
|
19
19
|
|
|
20
20
|
const $ = _c(9);
|
|
@@ -92,7 +92,5 @@ export const withAutoResize = ECharts => props => {
|
|
|
92
92
|
*
|
|
93
93
|
* @see {@linkcode withAutoResize}
|
|
94
94
|
*/
|
|
95
|
-
const AutoResizedECharts =
|
|
96
|
-
displayName: "AutoResizedECharts"
|
|
97
|
-
});
|
|
95
|
+
const AutoResizedECharts = withAutoResize(EChartsInstance);
|
|
98
96
|
export default AutoResizedECharts;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as echarts from "echarts/core";
|
|
2
1
|
import { type ReactNode } from "react";
|
|
3
|
-
import type { EChartsHOCType
|
|
2
|
+
import type { EChartsHOCType } from "./ECharts";
|
|
4
3
|
/**
|
|
5
4
|
* 为 {@linkcode ConnectedECharts}/{@linkcode withConnector | withConnector(ECharts)}
|
|
6
5
|
* 提供联动上下文,只有同一个上下文内的 ECharts 会联动。
|
|
@@ -23,9 +22,7 @@ export declare const withConnector: EChartsHOCType<{
|
|
|
23
22
|
* @see {@linkcode withConnector}
|
|
24
23
|
* @see {@linkcode withAutoResize}
|
|
25
24
|
*/
|
|
26
|
-
declare const ConnectedECharts: import("./ECharts").EChartsComponentType<
|
|
25
|
+
declare const ConnectedECharts: import("./ECharts").EChartsComponentType<{
|
|
27
26
|
group?: string;
|
|
28
|
-
}
|
|
29
|
-
displayName: string;
|
|
30
|
-
};
|
|
27
|
+
}>;
|
|
31
28
|
export default ConnectedECharts;
|
|
@@ -36,7 +36,7 @@ export function EChartsConnector(t0) {
|
|
|
36
36
|
* 可以使用 {@linkcode EChartsConnector} 将同一个页面上的 ECharts
|
|
37
37
|
* 划分为多个组,不同组的 ECharts 不会联动。也可以使用 `group` 属性手动指定联动组。
|
|
38
38
|
*/
|
|
39
|
-
export const withConnector = ECharts => props
|
|
39
|
+
export const withConnector = ECharts => function ConnectedECharts(props) {
|
|
40
40
|
"use memo";
|
|
41
41
|
|
|
42
42
|
const $ = _c(10);
|
|
@@ -94,7 +94,5 @@ export const withConnector = ECharts => props => {
|
|
|
94
94
|
* @see {@linkcode withConnector}
|
|
95
95
|
* @see {@linkcode withAutoResize}
|
|
96
96
|
*/
|
|
97
|
-
const ConnectedECharts =
|
|
98
|
-
displayName: "ConnectedECharts"
|
|
99
|
-
});
|
|
97
|
+
const ConnectedECharts = withConnector(AutoResizedECharts);
|
|
100
98
|
export default ConnectedECharts;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { EChartsHOCType
|
|
2
|
+
import type { EChartsHOCType } from "./ECharts";
|
|
3
3
|
/**
|
|
4
4
|
* 为 {@linkcode LeftAlignedECharts} 和
|
|
5
5
|
* {@linkcode withLeftAlign | withLeftAlign(ECharts)}
|
|
@@ -34,9 +34,7 @@ export declare const withLeftAlign: EChartsHOCType;
|
|
|
34
34
|
* @see {@linkcode withConnector}
|
|
35
35
|
* @see {@linkcode withAutoResize}
|
|
36
36
|
*/
|
|
37
|
-
declare const LeftAlignedECharts: import("./ECharts").EChartsComponentType<
|
|
37
|
+
declare const LeftAlignedECharts: import("./ECharts").EChartsComponentType<{
|
|
38
38
|
group?: string;
|
|
39
|
-
}
|
|
40
|
-
displayName: string;
|
|
41
|
-
};
|
|
39
|
+
}>;
|
|
42
40
|
export default LeftAlignedECharts;
|
|
@@ -116,7 +116,7 @@ function getLabelsWidth(instance) {
|
|
|
116
116
|
* - grid 坐标系的 `left` 属性会被该组件覆盖,最终效果总是会使得纵轴标签最宽的坐标系的标签紧贴容器左边缘(即 `left === 0`)。
|
|
117
117
|
* - 左对齐时原本的过渡动画会被打断。
|
|
118
118
|
*/
|
|
119
|
-
export const withLeftAlign = ECharts => props
|
|
119
|
+
export const withLeftAlign = ECharts => function LeftAlignedECharts(props) {
|
|
120
120
|
"use memo";
|
|
121
121
|
|
|
122
122
|
const $ = _c(27);
|
|
@@ -264,7 +264,5 @@ export const withLeftAlign = ECharts => props => {
|
|
|
264
264
|
* @see {@linkcode withConnector}
|
|
265
265
|
* @see {@linkcode withAutoResize}
|
|
266
266
|
*/
|
|
267
|
-
const LeftAlignedECharts =
|
|
268
|
-
displayName: "LeftAlignedECharts"
|
|
269
|
-
});
|
|
267
|
+
const LeftAlignedECharts = withLeftAlign(ConnectedECharts);
|
|
270
268
|
export default LeftAlignedECharts;
|