@next-bricks/data-view 1.7.0 → 1.9.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 -11
- package/dist/chunks/32.b45f5151.js +2 -0
- package/dist/chunks/32.b45f5151.js.map +1 -0
- package/dist/chunks/6873.5f62fd24.js +1 -0
- package/dist/chunks/8968.09a0d05a.js +1 -0
- package/dist/chunks/9123.5fbb5f01.js +1 -0
- package/dist/chunks/bubbles-indicator.9c56af44.js +2 -0
- package/dist/chunks/bubbles-indicator.9c56af44.js.map +1 -0
- package/dist/chunks/china-map-chart.331f7837.js +2 -0
- package/dist/chunks/china-map-chart.331f7837.js.map +1 -0
- package/dist/chunks/crystal-ball-indicator.67278de8.js +2 -0
- package/dist/chunks/crystal-ball-indicator.67278de8.js.map +1 -0
- package/dist/chunks/globe-with-gear-indicator.a35ef0d2.js +2 -0
- package/dist/chunks/globe-with-gear-indicator.a35ef0d2.js.map +1 -0
- package/dist/chunks/{globe-with-halo-indicator.0762631d.js → globe-with-halo-indicator.ed913008.js} +2 -2
- package/dist/chunks/globe-with-halo-indicator.ed913008.js.map +1 -0
- package/dist/chunks/globe-with-orbit-indicator.14c59388.js +2 -0
- package/dist/chunks/globe-with-orbit-indicator.14c59388.js.map +1 -0
- package/dist/chunks/main.e9cbbef8.js +2 -0
- package/dist/chunks/main.e9cbbef8.js.map +1 -0
- package/dist/examples.json +20 -20
- package/dist/images/7e4100fd.png +0 -0
- package/dist/images/eae6fa62.png +0 -0
- package/dist/index.7f21c4d4.js +2 -0
- package/dist/index.7f21c4d4.js.map +1 -0
- package/dist/manifest.json +294 -284
- package/dist/types.json +561 -547
- package/dist-types/china-map-chart/index.d.ts +14 -1
- package/dist-types/shared/useContainerScale.d.ts +2 -1
- package/docs/china-map-chart.md +59 -2
- package/package.json +2 -2
- package/dist/chunks/2938.1d24bf3a.js +0 -2
- package/dist/chunks/2938.1d24bf3a.js.map +0 -1
- package/dist/chunks/6565.de76a169.js +0 -2
- package/dist/chunks/6565.de76a169.js.map +0 -1
- package/dist/chunks/bubbles-indicator.56727686.js +0 -2
- package/dist/chunks/bubbles-indicator.56727686.js.map +0 -1
- package/dist/chunks/china-map-chart.eb43bf10.js +0 -2
- package/dist/chunks/china-map-chart.eb43bf10.js.map +0 -1
- package/dist/chunks/crystal-ball-indicator.7d4537b8.js +0 -2
- package/dist/chunks/crystal-ball-indicator.7d4537b8.js.map +0 -1
- package/dist/chunks/globe-with-gear-indicator.e8196cc6.js +0 -2
- package/dist/chunks/globe-with-gear-indicator.e8196cc6.js.map +0 -1
- package/dist/chunks/globe-with-halo-indicator.0762631d.js.map +0 -1
- package/dist/chunks/globe-with-orbit-indicator.36fcd0e1.js +0 -2
- package/dist/chunks/globe-with-orbit-indicator.36fcd0e1.js.map +0 -1
- package/dist/chunks/main.a5af19c9.js +0 -2
- package/dist/chunks/main.a5af19c9.js.map +0 -1
- package/dist/images/698229b4.png +0 -0
- package/dist/index.477c735f.js +0 -2
- package/dist/index.477c735f.js.map +0 -1
|
@@ -6,14 +6,24 @@ import "@next-core/theme";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class ChinaMapChart extends ReactNextElement {
|
|
8
8
|
#private;
|
|
9
|
+
/**
|
|
10
|
+
* 省份名称,例如“广东”。如果设置,则只显示该省份的地图,否则显示全国地图
|
|
11
|
+
*/
|
|
12
|
+
accessor province: string | undefined;
|
|
9
13
|
/**
|
|
10
14
|
* 数据源
|
|
11
15
|
*/
|
|
12
16
|
accessor dataSource: DataSource[] | undefined;
|
|
13
17
|
/**
|
|
14
|
-
*
|
|
18
|
+
* 描述内容样式
|
|
15
19
|
*/
|
|
16
20
|
accessor detailContentStyle: CSSProperties | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* 是否铺满容器
|
|
23
|
+
*
|
|
24
|
+
* 注意:该属性不同时兼容 detail 插槽
|
|
25
|
+
*/
|
|
26
|
+
accessor fillContainer: boolean | undefined;
|
|
17
27
|
render(): React.JSX.Element;
|
|
18
28
|
}
|
|
19
29
|
interface DataSource {
|
|
@@ -24,9 +34,12 @@ interface DataSource {
|
|
|
24
34
|
[x: string]: any;
|
|
25
35
|
}
|
|
26
36
|
export interface ChinaMapChartProps {
|
|
37
|
+
root: HTMLElement;
|
|
38
|
+
province?: string;
|
|
27
39
|
onDetailOpenChange: (open: boolean, data: Record<string, any>) => void;
|
|
28
40
|
dataSource: DataSource[];
|
|
29
41
|
detailContentStyle?: CSSProperties;
|
|
42
|
+
fillContainer?: boolean;
|
|
30
43
|
}
|
|
31
44
|
export declare function ChinaMapChartComponent(props: ChinaMapChartProps): React.JSX.Element;
|
|
32
45
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 根据容器尺寸进行缩放
|
|
3
3
|
*/
|
|
4
|
-
export declare function useContainerScale({ width: baseWidth, height: baseHeight, root, maxScale, }: {
|
|
4
|
+
export declare function useContainerScale({ width: baseWidth, height: baseHeight, root, maxScale, disabled, }: {
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
7
7
|
root: HTMLElement;
|
|
8
8
|
/** 最大缩放比例,默认为 1 */
|
|
9
9
|
maxScale?: number;
|
|
10
|
+
disabled?: boolean;
|
|
10
11
|
}): number | null;
|
package/docs/china-map-chart.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
### Basic
|
|
6
6
|
|
|
7
|
-
```yaml preview
|
|
7
|
+
```yaml preview height="600px"
|
|
8
8
|
brick: data-view.china-map-chart
|
|
9
9
|
properties:
|
|
10
10
|
dataSource:
|
|
@@ -24,9 +24,66 @@ lifeCycle:
|
|
|
24
24
|
- dark-v2
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
### Fill container
|
|
28
|
+
|
|
29
|
+
```yaml preview height="600px"
|
|
30
|
+
brick: div
|
|
31
|
+
properties:
|
|
32
|
+
style:
|
|
33
|
+
height: calc(100vh - 4em)
|
|
34
|
+
position: relative
|
|
35
|
+
children:
|
|
36
|
+
- brick: data-view.china-map-chart
|
|
37
|
+
properties:
|
|
38
|
+
fillContainer: true
|
|
39
|
+
dataSource:
|
|
40
|
+
- text: "西藏 12311"
|
|
41
|
+
city: 西藏
|
|
42
|
+
- text: "四川 89781169"
|
|
43
|
+
city: 四川
|
|
44
|
+
- text: "台湾 234181"
|
|
45
|
+
city: 台湾
|
|
46
|
+
- text: "江西 21348"
|
|
47
|
+
city: 江西
|
|
48
|
+
# Currently this brick only looks well within dark theme
|
|
49
|
+
lifeCycle:
|
|
50
|
+
onPageLoad:
|
|
51
|
+
action: theme.setTheme
|
|
52
|
+
args:
|
|
53
|
+
- dark-v2
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Province map
|
|
57
|
+
|
|
58
|
+
```yaml preview height="600px"
|
|
59
|
+
brick: div
|
|
60
|
+
properties:
|
|
61
|
+
style:
|
|
62
|
+
height: calc(100vh - 4em)
|
|
63
|
+
position: relative
|
|
64
|
+
children:
|
|
65
|
+
- brick: data-view.china-map-chart
|
|
66
|
+
properties:
|
|
67
|
+
fillContainer: true
|
|
68
|
+
province: 广东
|
|
69
|
+
dataSource:
|
|
70
|
+
- text: "广州 12311"
|
|
71
|
+
city: 广州
|
|
72
|
+
- text: "深圳 89781169"
|
|
73
|
+
city: 深圳
|
|
74
|
+
- text: "湛江 234181"
|
|
75
|
+
city: 湛江
|
|
76
|
+
# Currently this brick only looks well within dark theme
|
|
77
|
+
lifeCycle:
|
|
78
|
+
onPageLoad:
|
|
79
|
+
action: theme.setTheme
|
|
80
|
+
args:
|
|
81
|
+
- dark-v2
|
|
82
|
+
```
|
|
83
|
+
|
|
27
84
|
### With detail
|
|
28
85
|
|
|
29
|
-
```yaml preview
|
|
86
|
+
```yaml preview height="600px"
|
|
30
87
|
brick: data-view.china-map-chart
|
|
31
88
|
properties:
|
|
32
89
|
detailContentStyle:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/data-view",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.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": "0396db8768dd44a2f8f2ac481c16faa1f803cfe8"
|
|
45
45
|
}
|