@next-bricks/data-view 1.5.0 → 1.6.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 +14 -10
- package/dist/chunks/1143.2494e37f.js +2 -0
- package/dist/chunks/1143.2494e37f.js.map +1 -0
- package/dist/chunks/3910.cd76fadc.js +2 -0
- package/dist/chunks/3910.cd76fadc.js.map +1 -0
- package/dist/chunks/bubbles-indicator.34eea7ea.js +2 -0
- package/dist/chunks/bubbles-indicator.34eea7ea.js.map +1 -0
- package/dist/chunks/globe-with-gear-indicator.25c9901b.js +2 -0
- package/dist/chunks/globe-with-gear-indicator.25c9901b.js.map +1 -0
- package/dist/chunks/main.1bce9b12.js +2 -0
- package/dist/chunks/main.1bce9b12.js.map +1 -0
- package/dist/examples.json +26 -23
- package/dist/images/0fec7781.png +0 -0
- package/dist/images/2235938c.png +0 -0
- package/dist/images/45a4740b.png +0 -0
- package/dist/images/81f40f95.png +0 -0
- package/dist/images/86a2105c.png +0 -0
- package/dist/images/a457f803.png +0 -0
- package/dist/images/b91eed9d.png +0 -0
- package/dist/{index.c11ec70a.js → index.b0b43bc4.js} +2 -2
- package/dist/index.b0b43bc4.js.map +1 -0
- package/dist/manifest.json +228 -194
- package/dist/types.json +690 -572
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/bubbles-indicator/index.d.ts +45 -0
- package/dist-types/bubbles-indicator/index.spec.d.ts +1 -0
- package/docs/bubbles-indicator.md +42 -0
- package/package.json +2 -2
- package/dist/chunks/8374.9cc215b5.js +0 -2
- package/dist/chunks/8374.9cc215b5.js.map +0 -1
- package/dist/chunks/globe-with-gear-indicator.38da7193.js +0 -2
- package/dist/chunks/globe-with-gear-indicator.38da7193.js.map +0 -1
- package/dist/chunks/main.d5b7fc71.js +0 -2
- package/dist/chunks/main.d5b7fc71.js.map +0 -1
- package/dist/index.c11ec70a.js.map +0 -1
|
@@ -0,0 +1,45 @@
|
|
|
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/PangMenZhengDaoBiaoTiTi.css";
|
|
6
|
+
export interface BubblesIndicatorProps {
|
|
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 BubblesIndicator extends ReactNextElement implements BubblesIndicatorProps {
|
|
23
|
+
/** 指标数据列表(显示在环上)
|
|
24
|
+
*
|
|
25
|
+
* 注意:最多显示12项数据
|
|
26
|
+
*/
|
|
27
|
+
accessor dataSource: DataItem[] | undefined;
|
|
28
|
+
/** 中心数据(显示在中心水晶球内) */
|
|
29
|
+
accessor centerDataSource: DataItem | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* 左上角指标数据列表
|
|
32
|
+
*/
|
|
33
|
+
accessor cornerDataSource: CornerDataItem[] | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* 最大缩放比例
|
|
36
|
+
*
|
|
37
|
+
* @default 1
|
|
38
|
+
*/
|
|
39
|
+
accessor maxScale: number | undefined;
|
|
40
|
+
render(): React.JSX.Element;
|
|
41
|
+
}
|
|
42
|
+
export interface BubblesIndicatorComponentProps extends BubblesIndicatorProps {
|
|
43
|
+
root: BubblesIndicator;
|
|
44
|
+
}
|
|
45
|
+
export declare function BubblesIndicatorComponent({ root, dataSource, centerDataSource, cornerDataSource, maxScale, }: BubblesIndicatorComponentProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
构件 `data-view.bubbles-indicator`
|
|
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.bubbles-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
|
+
cornerDataSource:
|
|
30
|
+
- label: 资产增长
|
|
31
|
+
value: 43
|
|
32
|
+
color: red
|
|
33
|
+
- label: 资产减少
|
|
34
|
+
value: 21
|
|
35
|
+
color: green
|
|
36
|
+
# Currently this brick only works within dark theme
|
|
37
|
+
lifeCycle:
|
|
38
|
+
onPageLoad:
|
|
39
|
+
action: theme.setTheme
|
|
40
|
+
args:
|
|
41
|
+
- dark-v2
|
|
42
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/data-view",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.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": "e02ad0bd2d9a38c2a756cbdc49ccb17586eb0db0"
|
|
45
45
|
}
|