@nocobase/plugin-map 0.9.1-alpha.2 → 0.9.2-alpha.1

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 (85) hide show
  1. package/docs/en-US/changelog.md +1 -0
  2. package/docs/en-US/index.md +1 -0
  3. package/docs/en-US/installation.md +1 -0
  4. package/docs/en-US/tabs.json +18 -0
  5. package/docs/en-US/usage.md +1 -0
  6. package/docs/zh-CN/changelog.md +1 -0
  7. package/docs/zh-CN/index.md +1 -0
  8. package/docs/zh-CN/installation.md +1 -0
  9. package/docs/zh-CN/tabs.json +18 -0
  10. package/docs/zh-CN/usage.md +1 -0
  11. package/lib/client/block/MapActionInitializers.d.ts +89 -0
  12. package/lib/client/block/MapActionInitializers.js +93 -0
  13. package/lib/client/block/MapBlock.d.ts +1 -0
  14. package/lib/client/block/MapBlock.js +358 -0
  15. package/lib/client/block/MapBlockDesigner.d.ts +1 -0
  16. package/lib/client/block/MapBlockDesigner.js +196 -0
  17. package/lib/client/block/MapBlockInitializer.d.ts +1 -0
  18. package/lib/client/block/MapBlockInitializer.js +122 -0
  19. package/lib/client/block/MapBlockProvider.d.ts +5 -0
  20. package/lib/client/block/MapBlockProvider.js +91 -0
  21. package/lib/client/block/index.d.ts +2 -0
  22. package/lib/client/block/index.js +58 -0
  23. package/lib/client/block/utils.d.ts +56 -0
  24. package/lib/client/block/utils.js +102 -0
  25. package/lib/client/components/AMap.d.ts +32 -6
  26. package/lib/client/components/AMap.js +152 -203
  27. package/lib/client/components/Configuration.js +11 -45
  28. package/lib/client/components/Designer.js +6 -40
  29. package/lib/client/components/Map.d.ts +4 -1
  30. package/lib/client/components/Map.js +4 -18
  31. package/lib/client/components/ReadPretty.js +12 -29
  32. package/lib/client/components/Search.js +31 -65
  33. package/lib/client/constants.js +0 -2
  34. package/lib/client/fields/circle.js +3 -8
  35. package/lib/client/fields/index.js +0 -5
  36. package/lib/client/fields/lineString.js +3 -8
  37. package/lib/client/fields/point.js +3 -8
  38. package/lib/client/fields/polygon.js +3 -8
  39. package/lib/client/fields/schema.d.ts +1 -2
  40. package/lib/client/fields/schema.js +3 -18
  41. package/lib/client/hooks/index.js +0 -2
  42. package/lib/client/hooks/useMapConfiguration.d.ts +1 -0
  43. package/lib/client/hooks/useMapConfiguration.js +28 -8
  44. package/lib/client/index.d.ts +1 -0
  45. package/lib/client/index.js +8 -26
  46. package/lib/client/initialize.d.ts +1 -1
  47. package/lib/client/initialize.js +4 -21
  48. package/lib/client/locale/index.js +6 -13
  49. package/lib/client/locale/pt-BR.d.ts +46 -0
  50. package/lib/client/locale/pt-BR.js +54 -0
  51. package/lib/client/locale/zh-CN.d.ts +5 -2
  52. package/lib/client/locale/zh-CN.js +21 -18
  53. package/lib/index.js +0 -2
  54. package/lib/server/actions/index.js +0 -11
  55. package/lib/server/collections/mapConfiguration.d.ts +1 -1
  56. package/lib/server/collections/mapConfiguration.js +1 -3
  57. package/lib/server/fields/circle.js +3 -22
  58. package/lib/server/fields/index.js +0 -8
  59. package/lib/server/fields/lineString.js +3 -22
  60. package/lib/server/fields/point.js +3 -23
  61. package/lib/server/fields/polygon.js +3 -21
  62. package/lib/server/helpers/index.js +0 -12
  63. package/lib/server/index.js +0 -2
  64. package/lib/server/plugin.js +0 -24
  65. package/lib/server/value-parsers/index.js +0 -21
  66. package/package.json +8 -5
  67. package/src/client/block/MapActionInitializers.tsx +97 -0
  68. package/src/client/block/MapBlock.tsx +308 -0
  69. package/src/client/block/MapBlockDesigner.tsx +161 -0
  70. package/src/client/block/MapBlockInitializer.tsx +76 -0
  71. package/src/client/block/MapBlockProvider.tsx +55 -0
  72. package/src/client/block/index.tsx +35 -0
  73. package/src/client/block/utils.ts +81 -0
  74. package/src/client/components/AMap.tsx +148 -71
  75. package/src/client/components/Configuration.tsx +2 -1
  76. package/src/client/components/Map.tsx +5 -2
  77. package/src/client/components/ReadPretty.tsx +6 -5
  78. package/src/client/fields/schema.ts +4 -7
  79. package/src/client/hooks/useMapConfiguration.ts +32 -9
  80. package/src/client/index.tsx +11 -7
  81. package/src/client/initialize.tsx +2 -2
  82. package/src/client/locale/index.ts +4 -3
  83. package/src/client/locale/pt-BR.ts +49 -0
  84. package/src/client/locale/zh-CN.ts +22 -19
  85. package/src/server/collections/mapConfiguration.ts +8 -8
@@ -1,32 +1,32 @@
1
1
  const locale = {
2
2
  'Map-based geometry': '基于地图的几何图形',
3
3
  'Map type': '地图类型',
4
- 'Point': '点',
5
- 'Line': '线',
6
- 'Circle': '圆',
7
- 'Polygon': '多边形',
4
+ Point: '点',
5
+ Line: '线',
6
+ Circle: '圆',
7
+ Polygon: '多边形',
8
8
  'Access key': '访问密钥',
9
9
  'securityJsCode or serviceHost': 'securityJsCode 或 serviceHost',
10
- 'AMap': '高德地图',
10
+ AMap: '高德地图',
11
11
  'Google Maps': '谷歌地图',
12
- 'Clear': '清空',
12
+ Clear: '清空',
13
13
  'Click to select the starting point and double-click to end the drawing': '点击选择起点,双击结束绘制',
14
14
  'Clear the canvas': '清空画布',
15
15
  'Are you sure to clear the canvas?': '您确定要清空画布吗?',
16
- 'Confirm': '确定',
17
- 'Cancel': '取消',
16
+ Confirm: '确定',
17
+ Cancel: '取消',
18
18
  'Enter keywords to search': '输入地方名关键字搜索(必须包含省/市)',
19
19
  'The AccessKey is incorrect, please check it': '访问密钥不正确,请检查',
20
20
  'Please configure the AMap securityCode or serviceHost correctly': '请正确配置高德地图 securityCode 或 serviceHost',
21
21
  'Map Manager': '地图管理',
22
- 'Configuration': '配置',
22
+ Configuration: '配置',
23
23
  'Saved successfully': '保存成功',
24
24
  'Saved failed': '保存失败',
25
- 'Edit': '编辑',
26
- 'Save': '保存',
25
+ Edit: '编辑',
26
+ Save: '保存',
27
27
  'Please configure the AccessKey and SecurityJsCode first': '请先配置 AccessKey 和 SecurityJsCode',
28
28
  'Go to the configuration page': '前往配置页面',
29
- 'Zoom': '缩放',
29
+ Zoom: '缩放',
30
30
  'Set default zoom level': '设置默认缩放级别',
31
31
  'The default zoom level of the map': '地图默认缩放级别',
32
32
  // Designer
@@ -34,12 +34,15 @@ const locale = {
34
34
  'Field title': '字段标题',
35
35
  'Edit tooltip': '编辑提示信息',
36
36
  'Delete field': '删除字段',
37
- "Required": "必填",
38
- 'Pattern': '模式',
39
- "Editable": "可编辑",
40
- "Readonly": "只读(禁止编辑)",
41
- "Easy-reading": "只读(阅读模式)",
42
- "Edit description": "编辑描述",
43
- }
37
+ Required: '必填',
38
+ Pattern: '模式',
39
+ "Operator": "运算符",
40
+ Editable: '可编辑',
41
+ Readonly: '只读(禁止编辑)',
42
+ 'Easy-reading': '只读(阅读模式)',
43
+ 'Edit description': '编辑描述',
44
+ 'Map field': '地图字段',
45
+ 'Marker field': '标记字段',
46
+ };
44
47
 
45
48
  export default locale;
@@ -1,8 +1,8 @@
1
- import { CollectionOptions } from "@nocobase/client";
2
- import { MapConfigurationCollectionName } from "../constants";
1
+ import { CollectionOptions } from '@nocobase/client';
2
+ import { MapConfigurationCollectionName } from '../constants';
3
3
 
4
4
  export default {
5
- namespace: 'map',
5
+ namespace: 'map.mapConfiguration',
6
6
  duplicator: 'optional',
7
7
  name: MapConfigurationCollectionName,
8
8
  title: '{{t("Map Manager")}}',
@@ -11,19 +11,19 @@ export default {
11
11
  title: 'Access key',
12
12
  comment: '访问密钥',
13
13
  name: 'accessKey',
14
- type: 'string'
14
+ type: 'string',
15
15
  },
16
16
  {
17
17
  title: 'securityJsCode',
18
18
  comment: 'securityJsCode or serviceHOST',
19
19
  name: 'securityJsCode',
20
- type: 'string'
20
+ type: 'string',
21
21
  },
22
22
  {
23
23
  title: 'Map type',
24
24
  comment: '地图类型',
25
25
  name: 'type',
26
26
  type: 'string',
27
- }
28
- ]
29
- } as CollectionOptions
27
+ },
28
+ ],
29
+ } as CollectionOptions;