@nocobase/plugin-map 2.0.0-alpha.46 → 2.0.0-alpha.48

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 (35) hide show
  1. package/dist/client/components/AMap/Map.d.ts +0 -1
  2. package/dist/client/components/GoogleMaps/Map.d.ts +2 -2
  3. package/dist/client/index.js +1 -1
  4. package/dist/client/models/MapActionGroupModel.d.ts +11 -0
  5. package/dist/client/models/MapBlockComponent.d.ts +10 -0
  6. package/dist/client/models/MapBlockModel.d.ts +25 -0
  7. package/dist/client/models/components/AMap/Block.d.ts +10 -0
  8. package/dist/client/models/components/AMap/Map.d.ts +48 -0
  9. package/dist/client/models/components/AMap/Search.d.ts +15 -0
  10. package/dist/client/models/components/AMap/index.d.ts +10 -0
  11. package/dist/client/models/components/Configuration.d.ts +10 -0
  12. package/dist/client/models/components/GoogleMaps/Block.d.ts +10 -0
  13. package/dist/client/models/components/GoogleMaps/Map.d.ts +40 -0
  14. package/dist/client/models/components/GoogleMaps/Search.d.ts +16 -0
  15. package/dist/client/models/components/GoogleMaps/index.d.ts +10 -0
  16. package/dist/client/models/components/GoogleMaps/utils.d.ts +13 -0
  17. package/dist/client/models/components/Map.d.ts +13 -0
  18. package/dist/client/models/components/MapComponent.d.ts +10 -0
  19. package/dist/client/models/components/index.d.ts +13 -0
  20. package/dist/externalVersion.js +7 -6
  21. package/dist/locale/zh-CN.json +4 -1
  22. package/package.json +2 -2
  23. /package/dist/client/{fields/fieldModels → models}/MapComponent.d.ts +0 -0
  24. /package/dist/client/{fields → models}/fieldModels/CircleFieldModel.d.ts +0 -0
  25. /package/dist/client/{fields → models}/fieldModels/DisplayCircleFieldModel.d.ts +0 -0
  26. /package/dist/client/{fields → models}/fieldModels/DisplayLineStringFieldModel.d.ts +0 -0
  27. /package/dist/client/{fields → models}/fieldModels/DisplayMapFieldModel.d.ts +0 -0
  28. /package/dist/client/{fields → models}/fieldModels/DisplayPointFieldModel.d.ts +0 -0
  29. /package/dist/client/{fields → models}/fieldModels/DisplayPolygonFieldModel.d.ts +0 -0
  30. /package/dist/client/{fields → models}/fieldModels/LineStringFieldModel.d.ts +0 -0
  31. /package/dist/client/{fields → models}/fieldModels/MapFieldModel.d.ts +0 -0
  32. /package/dist/client/{fields → models}/fieldModels/PointFieldModel.d.ts +0 -0
  33. /package/dist/client/{fields → models}/fieldModels/PolygonFieldModel.d.ts +0 -0
  34. /package/dist/client/{fields → models}/fieldModels/index.d.ts +0 -0
  35. /package/dist/client/{fields → models}/fieldModels/setDefaultZoomLevel.d.ts +0 -0
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { ActionGroupModel } from '@nocobase/client';
10
+ export declare class MapActionGroupModel extends ActionGroupModel {
11
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const MapBlockComponent: React.FC<any>;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { MultiRecordResource } from '@nocobase/flow-engine';
10
+ import { CollectionBlockModel } from '@nocobase/client';
11
+ import React from 'react';
12
+ export declare class MapBlockModel extends CollectionBlockModel {
13
+ static scene: import("@nocobase/client").BlockSceneType;
14
+ selectedRecordKeys: any[];
15
+ get resource(): MultiRecordResource<any>;
16
+ onInit(options: any): void;
17
+ createResource(ctx: any, params: any): MultiRecordResource<unknown>;
18
+ renderConfiguireActions(): React.JSX.Element;
19
+ getSelectedRecordKeys(): any[];
20
+ setSelectedRecordKeys(keys: any): void;
21
+ getInputArgs(): {};
22
+ protected onMount(): void;
23
+ set onOpenView(fn: any);
24
+ renderComponent(): React.JSX.Element;
25
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const AMapBlock: (props: any) => React.JSX.Element;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import '@amap/amap-jsapi-types';
10
+ import React from 'react';
11
+ import { MapEditorType } from '../../../types';
12
+ export interface AMapComponentProps {
13
+ value?: any;
14
+ onChange?: (value: number[]) => void;
15
+ disabled?: boolean;
16
+ mapType: string;
17
+ /**
18
+ * only ReadPretty
19
+ */
20
+ readonly: string;
21
+ zoom: number;
22
+ type: MapEditorType;
23
+ style?: React.CSSProperties;
24
+ overlayCommonOptions?: AMap.PolylineOptions & AMap.PolygonOptions;
25
+ block?: boolean;
26
+ height?: number;
27
+ }
28
+ export interface AMapForwardedRefProps {
29
+ setOverlay: (t: MapEditorType, v: any, o?: AMap.PolylineOptions & AMap.PolygonOptions & AMap.MarkerOptions) => any;
30
+ getOverlay: (t: MapEditorType, v: any, o?: AMap.PolylineOptions & AMap.PolygonOptions & AMap.MarkerOptions) => any;
31
+ createMouseTool: (type: MapEditorType) => void;
32
+ createEditor: (type: MapEditorType) => void;
33
+ executeMouseTool: (type: MapEditorType) => void;
34
+ aMap: any;
35
+ map: AMap.Map;
36
+ editor: () => {
37
+ getTarget: () => AMap.Polygon;
38
+ setTarget: (o: any) => void;
39
+ close: () => void;
40
+ on: (event: string, callback: (e: any) => void) => void;
41
+ };
42
+ mouseTool: () => {
43
+ close: (clear?: boolean) => void;
44
+ };
45
+ overlay: AMap.Polygon;
46
+ errMessage?: string;
47
+ }
48
+ export declare const AMapCom: React.ForwardRefExoticComponent<AMapComponentProps & React.RefAttributes<AMapForwardedRefProps>>;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ interface SearchProps {
11
+ aMap: any;
12
+ toCenter: (p: any) => void;
13
+ }
14
+ export declare const Search: (props: SearchProps) => React.JSX.Element;
15
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './Block';
10
+ export * from './Map';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const Configuration: () => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const GoogleMapsBlock: (props: any) => React.JSX.Element;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ /// <reference types="google.maps" />
10
+ import React from 'react';
11
+ import { MapEditorType } from '../../../types';
12
+ export type OverlayOptions = google.maps.PolygonOptions & google.maps.MarkerOptions & google.maps.PolylineOptions;
13
+ export declare const getDrawingMode: (type: MapEditorType) => "polygon" | "circle" | "marker" | "polyline";
14
+ export interface GoogleMapsCompProps {
15
+ value?: any;
16
+ onChange?: (value: number[]) => void;
17
+ disabled?: boolean;
18
+ mapType: string;
19
+ /**
20
+ * only ReadPretty
21
+ */
22
+ readonly: string;
23
+ zoom: number;
24
+ type: MapEditorType;
25
+ style?: React.CSSProperties;
26
+ overlayCommonOptions?: OverlayOptions;
27
+ block?: boolean;
28
+ height?: number;
29
+ }
30
+ export interface GoogleMapForwardedRefProps {
31
+ setOverlay: (t: MapEditorType, v: any, o?: OverlayOptions) => google.maps.MVCObject;
32
+ getOverlay: (t: MapEditorType, v: any, o?: OverlayOptions) => google.maps.MVCObject;
33
+ setFitView: (overlays: google.maps.MVCObject[]) => void;
34
+ createDraw: (onlyCreate?: boolean, additionalOptions?: OverlayOptions) => any;
35
+ map: google.maps.Map;
36
+ overlay: google.maps.MVCObject;
37
+ drawingManager: google.maps.drawing.DrawingManager;
38
+ errMessage?: string;
39
+ }
40
+ export declare const GoogleMapsCom: React.ForwardRefExoticComponent<GoogleMapsCompProps & React.RefAttributes<GoogleMapForwardedRefProps>>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ /// <reference types="google.maps" />
10
+ import React from 'react';
11
+ interface SearchProps {
12
+ toCenter: (p: any) => void;
13
+ mapRef: React.RefObject<google.maps.Map>;
14
+ }
15
+ export declare const Search: (props: SearchProps) => React.JSX.Element;
16
+ export default Search;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './Block';
10
+ export * from './Map';
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const getIcon: (url: any) => google.maps.Icon;
10
+ export declare const getCurrentPosition: () => Promise<{
11
+ lat: number;
12
+ lng: number;
13
+ }>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ import { AMapComponentProps } from './AMap';
11
+ type MapProps = AMapComponentProps;
12
+ declare const Map: (props: MapProps) => React.JSX.Element;
13
+ export { Map };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const MapComponent: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './AMap';
10
+ export * from './Configuration';
11
+ export * from './GoogleMaps';
12
+ export * from './Map';
13
+ export * from './MapComponent';
@@ -8,10 +8,10 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.0.0-alpha.46",
11
+ "@nocobase/client": "2.0.0-alpha.48",
12
12
  "react": "18.2.0",
13
- "@nocobase/server": "2.0.0-alpha.46",
14
- "@nocobase/test": "2.0.0-alpha.46",
13
+ "@nocobase/server": "2.0.0-alpha.48",
14
+ "@nocobase/test": "2.0.0-alpha.48",
15
15
  "@formily/react": "2.3.7",
16
16
  "lodash": "4.17.21",
17
17
  "react-i18next": "11.18.6",
@@ -21,8 +21,9 @@ module.exports = {
21
21
  "antd": "5.24.2",
22
22
  "@formily/shared": "2.3.7",
23
23
  "@formily/core": "2.3.7",
24
- "@nocobase/flow-engine": "2.0.0-alpha.46",
25
- "@nocobase/actions": "2.0.0-alpha.46",
26
- "@nocobase/database": "2.0.0-alpha.46",
24
+ "@nocobase/flow-engine": "2.0.0-alpha.48",
25
+ "@nocobase/plugin-action-bulk-update": "2.0.0-alpha.48",
26
+ "@nocobase/actions": "2.0.0-alpha.48",
27
+ "@nocobase/database": "2.0.0-alpha.48",
27
28
  "ahooks": "3.7.8"
28
29
  };
@@ -50,5 +50,8 @@
50
50
  "Concatenation order field": "连接顺序字段",
51
51
  "securityJsCode or serviceHost is required": "securityJsCode 或 serviceHost 是必填",
52
52
  "Access key is required": "访问密钥是必填",
53
- "Api key is required": "Api key 是必填"
53
+ "Api key is required": "Api key 是必填",
54
+ "Map Field & Marker field": "地图字段和标记字段",
55
+ "Map block settings":"地图区块设置",
56
+ "Map field settings":"地图字段设置"
54
57
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "Block: Map",
4
4
  "displayName.ru-RU": "Блок: Карта",
5
5
  "displayName.zh-CN": "区块:地图",
6
- "version": "2.0.0-alpha.46",
6
+ "version": "2.0.0-alpha.48",
7
7
  "description": "Map block, support Gaode map and Google map, you can also extend more map types.",
8
8
  "description.ru-RU": "Блок карты, поддерживает карты Gaode и Google, можно расширить поддержку других типов карт.",
9
9
  "description.zh-CN": "地图区块,支持高德地图和 Google 地图,你也可以扩展更多地图类型。",
@@ -39,7 +39,7 @@
39
39
  "@nocobase/test": "2.x",
40
40
  "@nocobase/utils": "2.x"
41
41
  },
42
- "gitHead": "ebf3cbeea4957a914e3157f3c6b570dba685c46f",
42
+ "gitHead": "456be3a6e92f984fe283590c80d3ea9423695ba6",
43
43
  "keywords": [
44
44
  "Blocks"
45
45
  ]