@next-bricks/data-view 1.8.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.
@@ -6,6 +6,10 @@ 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
  */
@@ -19,7 +23,7 @@ export declare class ChinaMapChart extends ReactNextElement {
19
23
  *
20
24
  * 注意:该属性不同时兼容 detail 插槽
21
25
  */
22
- accessor fillContainer: boolean;
26
+ accessor fillContainer: boolean | undefined;
23
27
  render(): React.JSX.Element;
24
28
  }
25
29
  interface DataSource {
@@ -31,6 +35,7 @@ interface DataSource {
31
35
  }
32
36
  export interface ChinaMapChartProps {
33
37
  root: HTMLElement;
38
+ province?: string;
34
39
  onDetailOpenChange: (open: boolean, data: Record<string, any>) => void;
35
40
  dataSource: DataSource[];
36
41
  detailContentStyle?: CSSProperties;
@@ -53,6 +53,34 @@ children:
53
53
  - dark-v2
54
54
  ```
55
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
+
56
84
  ### With detail
57
85
 
58
86
  ```yaml preview height="600px"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/data-view",
3
- "version": "1.8.0",
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": "6f101f9a1838aeae7c794b53e5403f74f297ddef"
44
+ "gitHead": "0396db8768dd44a2f8f2ac481c16faa1f803cfe8"
45
45
  }