@next-bricks/data-view 1.6.2 → 1.7.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/dist/bricks.json +11 -7
- package/dist/chunks/{3910.4e6c75b8.js → 6565.de76a169.js} +2 -2
- package/dist/chunks/6565.de76a169.js.map +1 -0
- package/dist/chunks/bubbles-indicator.56727686.js +2 -0
- package/dist/chunks/bubbles-indicator.56727686.js.map +1 -0
- package/dist/chunks/crystal-ball-indicator.7d4537b8.js +2 -0
- package/dist/chunks/crystal-ball-indicator.7d4537b8.js.map +1 -0
- package/dist/chunks/globe-with-gear-indicator.e8196cc6.js +2 -0
- package/dist/chunks/globe-with-gear-indicator.e8196cc6.js.map +1 -0
- package/dist/chunks/globe-with-halo-indicator.0762631d.js +2 -0
- package/dist/chunks/globe-with-halo-indicator.0762631d.js.map +1 -0
- package/dist/chunks/globe-with-orbit-indicator.36fcd0e1.js +2 -0
- package/dist/chunks/globe-with-orbit-indicator.36fcd0e1.js.map +1 -0
- package/dist/chunks/{main.f5a25c33.js → main.a5af19c9.js} +2 -2
- package/dist/chunks/{main.f5a25c33.js.map → main.a5af19c9.js.map} +1 -1
- package/dist/examples.json +12 -9
- package/dist/images/15af7907.png +0 -0
- package/dist/images/43f65465.png +0 -0
- package/dist/images/7ddba157.png +0 -0
- package/dist/images/923db8f8.png +0 -0
- package/dist/index.477c735f.js +2 -0
- package/dist/index.477c735f.js.map +1 -0
- package/dist/manifest.json +142 -108
- package/dist/media/8023ccd1.mp4 +0 -0
- package/dist/types.json +615 -483
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/bubbles-indicator/index.d.ts +4 -0
- package/dist-types/globe-with-halo-indicator/RotatingArc.d.ts +7 -1
- package/dist-types/globe-with-orbit-indicator/index.d.ts +46 -0
- package/dist-types/globe-with-orbit-indicator/index.spec.d.ts +1 -0
- package/dist-types/shared/CornerIndicator.d.ts +10 -0
- package/dist-types/shared/formatValue.d.ts +9 -0
- package/dist-types/shared/useCenterScale.d.ts +4 -0
- package/dist-types/shared/useContainerScale.d.ts +10 -0
- package/docs/globe-with-orbit-indicator.md +44 -0
- package/package.json +2 -2
- package/dist/chunks/3910.4e6c75b8.js.map +0 -1
- package/dist/chunks/bubbles-indicator.0568641b.js +0 -2
- package/dist/chunks/bubbles-indicator.0568641b.js.map +0 -1
- package/dist/chunks/crystal-ball-indicator.d8cd86a8.js +0 -2
- package/dist/chunks/crystal-ball-indicator.d8cd86a8.js.map +0 -1
- package/dist/chunks/globe-with-gear-indicator.25c9901b.js +0 -2
- package/dist/chunks/globe-with-gear-indicator.25c9901b.js.map +0 -1
- package/dist/chunks/globe-with-halo-indicator.5491f30c.js +0 -2
- package/dist/chunks/globe-with-halo-indicator.5491f30c.js.map +0 -1
- package/dist/images/0fec7781.png +0 -0
- package/dist/index.e4bffdda.js +0 -2
- package/dist/index.e4bffdda.js.map +0 -1
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
2
|
+
export interface RotatingArcProps {
|
|
3
|
+
cx: number;
|
|
4
|
+
cy: number;
|
|
5
|
+
rx: number;
|
|
6
|
+
ry: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function RotatingArc({ cx, cy, rx, ry }: RotatingArcProps): React.JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import "@next-core/theme";
|
|
4
|
+
import "../fonts/ALiBaBaPuHuiTi.css";
|
|
5
|
+
import "../fonts/HarmonyOSSans.css";
|
|
6
|
+
export interface GlobeWithOrbitIndicatorProps {
|
|
7
|
+
dataSource?: DataItem[];
|
|
8
|
+
centerDataSource?: DataItem;
|
|
9
|
+
cornerDataSource?: CornerDataItem[];
|
|
10
|
+
maxScale?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface DataItem {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string | number;
|
|
15
|
+
}
|
|
16
|
+
export interface CornerDataItem extends DataItem {
|
|
17
|
+
color?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 地球加轨道的数据展示构件。
|
|
21
|
+
*/
|
|
22
|
+
export declare class GlobeWithOrbitIndicator extends ReactNextElement implements GlobeWithOrbitIndicatorProps {
|
|
23
|
+
/**
|
|
24
|
+
* 指标数据列表(显示在轨道上)
|
|
25
|
+
*
|
|
26
|
+
* 注意:最多显示8项数据
|
|
27
|
+
*/
|
|
28
|
+
accessor dataSource: DataItem[] | undefined;
|
|
29
|
+
/** 中心数据(显示在中心地球内) */
|
|
30
|
+
accessor centerDataSource: DataItem | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* 左上角指标数据列表
|
|
33
|
+
*/
|
|
34
|
+
accessor cornerDataSource: CornerDataItem[] | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* 最大缩放比例
|
|
37
|
+
*
|
|
38
|
+
* @default 1
|
|
39
|
+
*/
|
|
40
|
+
accessor maxScale: number | undefined;
|
|
41
|
+
render(): React.JSX.Element;
|
|
42
|
+
}
|
|
43
|
+
export interface GlobeWithOrbitIndicatorComponentProps extends GlobeWithOrbitIndicatorProps {
|
|
44
|
+
root: GlobeWithOrbitIndicator;
|
|
45
|
+
}
|
|
46
|
+
export declare function GlobeWithOrbitIndicatorComponent({ root, dataSource, centerDataSource, cornerDataSource, maxScale, }: GlobeWithOrbitIndicatorComponentProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface CornerDataItem {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CornerIndicatorProps {
|
|
8
|
+
cornerDataSource?: CornerDataItem[];
|
|
9
|
+
}
|
|
10
|
+
export declare function CornerIndicator({ cornerDataSource }: CornerIndicatorProps): React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function formatValue(value: string | number): string;
|
|
2
|
+
/**
|
|
3
|
+
* 判断一个值是否是有意义的数字,包括数字和可以转换为数字的字符串。
|
|
4
|
+
*
|
|
5
|
+
* 但不包括 NaN、Infinity、-Infinity 等。
|
|
6
|
+
*
|
|
7
|
+
* Ref https://github.com/jonschlinkert/is-number/blob/master/index.js
|
|
8
|
+
*/
|
|
9
|
+
export declare function isMeaningfulNumber(value: unknown): value is number | string;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
地球加轨道的数据展示构件。
|
|
2
|
+
|
|
3
|
+
## Examples
|
|
4
|
+
|
|
5
|
+
### Basic
|
|
6
|
+
|
|
7
|
+
```yaml preview height="660px"
|
|
8
|
+
brick: div
|
|
9
|
+
properties:
|
|
10
|
+
style:
|
|
11
|
+
height: calc(100vh - 2em)
|
|
12
|
+
children:
|
|
13
|
+
- brick: data-view.globe-with-orbit-indicator
|
|
14
|
+
properties:
|
|
15
|
+
centerDataSource:
|
|
16
|
+
label: 资产总数
|
|
17
|
+
value: 30123
|
|
18
|
+
dataSource:
|
|
19
|
+
- label: 低值易耗品
|
|
20
|
+
value: 3889
|
|
21
|
+
- label: 摊销资产
|
|
22
|
+
value: 2087
|
|
23
|
+
- label: 固定资产
|
|
24
|
+
value: 12088
|
|
25
|
+
- label: 无形资产
|
|
26
|
+
value: 1082
|
|
27
|
+
- label: 在建工程
|
|
28
|
+
value: 10997
|
|
29
|
+
- label: 其他资产
|
|
30
|
+
value: 4203
|
|
31
|
+
cornerDataSource:
|
|
32
|
+
- label: 资产增长
|
|
33
|
+
value: 43
|
|
34
|
+
color: red
|
|
35
|
+
- label: 资产减少
|
|
36
|
+
value: 21
|
|
37
|
+
color: green
|
|
38
|
+
# Currently this brick only works within dark theme
|
|
39
|
+
lifeCycle:
|
|
40
|
+
onPageLoad:
|
|
41
|
+
action: theme.setTheme
|
|
42
|
+
args:
|
|
43
|
+
- dark-v2
|
|
44
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/data-view",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/data-view",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@next-bricks/icons": "*"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "dd4350a3be9be41b821be43c9a4dbdd87e1d0068"
|
|
45
45
|
}
|