@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.
Files changed (51) hide show
  1. package/dist/bricks.json +11 -11
  2. package/dist/chunks/32.b45f5151.js +2 -0
  3. package/dist/chunks/32.b45f5151.js.map +1 -0
  4. package/dist/chunks/6873.5f62fd24.js +1 -0
  5. package/dist/chunks/8968.09a0d05a.js +1 -0
  6. package/dist/chunks/9123.5fbb5f01.js +1 -0
  7. package/dist/chunks/bubbles-indicator.9c56af44.js +2 -0
  8. package/dist/chunks/bubbles-indicator.9c56af44.js.map +1 -0
  9. package/dist/chunks/china-map-chart.331f7837.js +2 -0
  10. package/dist/chunks/china-map-chart.331f7837.js.map +1 -0
  11. package/dist/chunks/crystal-ball-indicator.67278de8.js +2 -0
  12. package/dist/chunks/crystal-ball-indicator.67278de8.js.map +1 -0
  13. package/dist/chunks/globe-with-gear-indicator.a35ef0d2.js +2 -0
  14. package/dist/chunks/globe-with-gear-indicator.a35ef0d2.js.map +1 -0
  15. package/dist/chunks/{globe-with-halo-indicator.0762631d.js → globe-with-halo-indicator.ed913008.js} +2 -2
  16. package/dist/chunks/globe-with-halo-indicator.ed913008.js.map +1 -0
  17. package/dist/chunks/globe-with-orbit-indicator.14c59388.js +2 -0
  18. package/dist/chunks/globe-with-orbit-indicator.14c59388.js.map +1 -0
  19. package/dist/chunks/main.e9cbbef8.js +2 -0
  20. package/dist/chunks/main.e9cbbef8.js.map +1 -0
  21. package/dist/examples.json +20 -20
  22. package/dist/images/7e4100fd.png +0 -0
  23. package/dist/images/eae6fa62.png +0 -0
  24. package/dist/index.7f21c4d4.js +2 -0
  25. package/dist/index.7f21c4d4.js.map +1 -0
  26. package/dist/manifest.json +294 -284
  27. package/dist/types.json +561 -547
  28. package/dist-types/china-map-chart/index.d.ts +14 -1
  29. package/dist-types/shared/useContainerScale.d.ts +2 -1
  30. package/docs/china-map-chart.md +59 -2
  31. package/package.json +2 -2
  32. package/dist/chunks/2938.1d24bf3a.js +0 -2
  33. package/dist/chunks/2938.1d24bf3a.js.map +0 -1
  34. package/dist/chunks/6565.de76a169.js +0 -2
  35. package/dist/chunks/6565.de76a169.js.map +0 -1
  36. package/dist/chunks/bubbles-indicator.56727686.js +0 -2
  37. package/dist/chunks/bubbles-indicator.56727686.js.map +0 -1
  38. package/dist/chunks/china-map-chart.eb43bf10.js +0 -2
  39. package/dist/chunks/china-map-chart.eb43bf10.js.map +0 -1
  40. package/dist/chunks/crystal-ball-indicator.7d4537b8.js +0 -2
  41. package/dist/chunks/crystal-ball-indicator.7d4537b8.js.map +0 -1
  42. package/dist/chunks/globe-with-gear-indicator.e8196cc6.js +0 -2
  43. package/dist/chunks/globe-with-gear-indicator.e8196cc6.js.map +0 -1
  44. package/dist/chunks/globe-with-halo-indicator.0762631d.js.map +0 -1
  45. package/dist/chunks/globe-with-orbit-indicator.36fcd0e1.js +0 -2
  46. package/dist/chunks/globe-with-orbit-indicator.36fcd0e1.js.map +0 -1
  47. package/dist/chunks/main.a5af19c9.js +0 -2
  48. package/dist/chunks/main.a5af19c9.js.map +0 -1
  49. package/dist/images/698229b4.png +0 -0
  50. package/dist/index.477c735f.js +0 -2
  51. 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;
@@ -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.7.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": "dd4350a3be9be41b821be43c9a4dbdd87e1d0068"
44
+ "gitHead": "0396db8768dd44a2f8f2ac481c16faa1f803cfe8"
45
45
  }