@nocobase/plugin-map 1.2.12-alpha → 1.3.0-alpha.20240710084543
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/package.json +2 -2
- package/dist/client/block/MapActionInitializers.d.ts +0 -16
- package/dist/client/block/MapBlock.Settings.d.ts +0 -78
- package/dist/client/block/MapBlock.d.ts +0 -10
- package/dist/client/block/MapBlockDesigner.d.ts +0 -10
- package/dist/client/block/MapBlockInitializer.d.ts +0 -10
- package/dist/client/block/MapBlockProvider.d.ts +0 -13
- package/dist/client/block/createMapBlockUISchema.d.ts +0 -14
- package/dist/client/block/index.d.ts +0 -10
- package/dist/client/block/utils.d.ts +0 -9
- package/dist/client/components/AMap/Block.d.ts +0 -10
- package/dist/client/components/AMap/Map.d.ts +0 -47
- package/dist/client/components/AMap/Search.d.ts +0 -15
- package/dist/client/components/AMap/index.d.ts +0 -10
- package/dist/client/components/Configuration.d.ts +0 -10
- package/dist/client/components/Designer.d.ts +0 -11
- package/dist/client/components/GoogleMaps/Block.d.ts +0 -10
- package/dist/client/components/GoogleMaps/Map.d.ts +0 -39
- package/dist/client/components/GoogleMaps/Search.d.ts +0 -16
- package/dist/client/components/GoogleMaps/index.d.ts +0 -10
- package/dist/client/components/GoogleMaps/utils.d.ts +0 -13
- package/dist/client/components/Map.d.ts +0 -15
- package/dist/client/components/MapBlock.d.ts +0 -10
- package/dist/client/components/MapComponent.d.ts +0 -10
- package/dist/client/components/ReadPretty.d.ts +0 -11
- package/dist/client/components/hook.d.ts +0 -9
- package/dist/client/components/index.d.ts +0 -14
- package/dist/client/constants.d.ts +0 -14
- package/dist/client/fields/circle.d.ts +0 -28
- package/dist/client/fields/fieldSettingsComponentMap.d.ts +0 -10
- package/dist/client/fields/index.d.ts +0 -10
- package/dist/client/fields/lineString.d.ts +0 -28
- package/dist/client/fields/point.d.ts +0 -28
- package/dist/client/fields/polygon.d.ts +0 -28
- package/dist/client/fields/schema.d.ts +0 -51
- package/dist/client/hooks/index.d.ts +0 -9
- package/dist/client/hooks/useMapConfiguration.d.ts +0 -11
- package/dist/client/index.d.ts +0 -13
- package/dist/client/index.js +0 -124
- package/dist/client/locale/index.d.ts +0 -12
- package/dist/client/types.d.ts +0 -9
- package/dist/client/utils.d.ts +0 -9
- package/dist/externalVersion.js +0 -28
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -48
- package/dist/locale/en-US.json +0 -51
- package/dist/locale/ko_KR.json +0 -51
- package/dist/locale/pt-BR.json +0 -45
- package/dist/locale/zh-CN.json +0 -51
- package/dist/server/actions/index.d.ts +0 -11
- package/dist/server/actions/index.js +0 -74
- package/dist/server/collections/mapConfiguration.d.ts +0 -10
- package/dist/server/collections/mapConfiguration.js +0 -60
- package/dist/server/constants.d.ts +0 -9
- package/dist/server/constants.js +0 -36
- package/dist/server/fields/circle.d.ts +0 -20
- package/dist/server/fields/circle.js +0 -77
- package/dist/server/fields/index.d.ts +0 -12
- package/dist/server/fields/index.js +0 -36
- package/dist/server/fields/lineString.d.ts +0 -20
- package/dist/server/fields/lineString.js +0 -84
- package/dist/server/fields/point.d.ts +0 -20
- package/dist/server/fields/point.js +0 -87
- package/dist/server/fields/polygon.d.ts +0 -20
- package/dist/server/fields/polygon.js +0 -83
- package/dist/server/helpers/index.d.ts +0 -14
- package/dist/server/helpers/index.js +0 -67
- package/dist/server/index.d.ts +0 -9
- package/dist/server/index.js +0 -42
- package/dist/server/interfaces/index.d.ts +0 -23
- package/dist/server/interfaces/index.js +0 -80
- package/dist/server/plugin.d.ts +0 -19
- package/dist/server/plugin.js +0 -100
- package/dist/server/value-parsers/index.d.ts +0 -21
- package/dist/server/value-parsers/index.js +0 -86
- package/dist/swagger/index.d.ts +0 -85
- package/dist/swagger/index.js +0 -109
package/dist/locale/zh-CN.json
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Map": "地图",
|
|
3
|
-
"Map-based geometry": "基于地图的几何图形",
|
|
4
|
-
"Map type": "地图类型",
|
|
5
|
-
"Point": "点",
|
|
6
|
-
"Line": "线",
|
|
7
|
-
"Circle": "圆",
|
|
8
|
-
"Polygon": "多边形",
|
|
9
|
-
"Access key": "访问密钥",
|
|
10
|
-
"securityJsCode or serviceHost": "securityJsCode 或 serviceHost",
|
|
11
|
-
"AMap": "高德地图",
|
|
12
|
-
"Google Maps": "谷歌地图",
|
|
13
|
-
"Clear": "清空",
|
|
14
|
-
"Click to select the starting point and double-click to end the drawing": "点击选择起点,双击结束绘制",
|
|
15
|
-
"Clear the canvas": "清空画布",
|
|
16
|
-
"Are you sure to clear the canvas?": "您确定要清空画布吗?",
|
|
17
|
-
"Confirm": "确定",
|
|
18
|
-
"Cancel": "取消",
|
|
19
|
-
"Enter keywords to search": "输入地方名关键字搜索(必须包含省/市)",
|
|
20
|
-
"The AccessKey is incorrect, please check it": "访问密钥不正确,请检查",
|
|
21
|
-
"Please configure the AMap securityCode or serviceHost correctly": "请正确配置高德地图 securityCode 或 serviceHost",
|
|
22
|
-
"Map Manager": "地图管理",
|
|
23
|
-
"Configuration": "配置",
|
|
24
|
-
"Saved successfully": "保存成功",
|
|
25
|
-
"Saved failed": "保存失败",
|
|
26
|
-
"Edit": "编辑",
|
|
27
|
-
"Save": "保存",
|
|
28
|
-
"Please configure the AccessKey and SecurityJsCode first": "请先配置 AccessKey 和 SecurityJsCode",
|
|
29
|
-
"Go to the configuration page": "前往配置页面",
|
|
30
|
-
"Zoom": "缩放",
|
|
31
|
-
"Set default zoom level": "设置默认缩放级别",
|
|
32
|
-
"The default zoom level of the map": "地图默认缩放级别",
|
|
33
|
-
"Edit field title": "编辑字段标题",
|
|
34
|
-
"Field title": "字段标题",
|
|
35
|
-
"Edit tooltip": "编辑提示信息",
|
|
36
|
-
"Delete field": "删除字段",
|
|
37
|
-
"Required": "必填",
|
|
38
|
-
"Pattern": "模式",
|
|
39
|
-
"Operator": "运算符",
|
|
40
|
-
"Editable": "可编辑",
|
|
41
|
-
"Readonly": "只读(禁止编辑)",
|
|
42
|
-
"Easy-reading": "只读(阅读模式)",
|
|
43
|
-
"Edit description": "编辑描述",
|
|
44
|
-
"Map field": "地图字段",
|
|
45
|
-
"Marker field": "标记字段",
|
|
46
|
-
"Load google maps failed, Please check the Api key and refresh the page": "加载谷歌地图失败,请检查 Api key 并刷新页面",
|
|
47
|
-
"Create map block": "创建地图区块",
|
|
48
|
-
"Start point": "起点",
|
|
49
|
-
"End point": "终点",
|
|
50
|
-
"Concatenation order field": "连接顺序字段"
|
|
51
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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 { Context } from '@nocobase/actions';
|
|
10
|
-
export declare const getConfiguration: (ctx: Context, next: any) => Promise<any>;
|
|
11
|
-
export declare const setConfiguration: (ctx: Context, next: any) => Promise<any>;
|
|
@@ -1,74 +0,0 @@
|
|
|
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
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var actions_exports = {};
|
|
28
|
-
__export(actions_exports, {
|
|
29
|
-
getConfiguration: () => getConfiguration,
|
|
30
|
-
setConfiguration: () => setConfiguration
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(actions_exports);
|
|
33
|
-
var import_constants = require("../constants");
|
|
34
|
-
const getConfiguration = async (ctx, next) => {
|
|
35
|
-
const {
|
|
36
|
-
params: { type }
|
|
37
|
-
} = ctx.action;
|
|
38
|
-
const repo = ctx.db.getRepository(import_constants.MapConfigurationCollectionName);
|
|
39
|
-
const record = await repo.findOne({
|
|
40
|
-
filter: {
|
|
41
|
-
type
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
ctx.body = record;
|
|
45
|
-
return next();
|
|
46
|
-
};
|
|
47
|
-
const setConfiguration = async (ctx, next) => {
|
|
48
|
-
const { params: values } = ctx.action;
|
|
49
|
-
const repo = ctx.db.getRepository(import_constants.MapConfigurationCollectionName);
|
|
50
|
-
const record = await repo.findOne({
|
|
51
|
-
filter: {
|
|
52
|
-
type: values.type
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
if (record) {
|
|
56
|
-
await repo.update({
|
|
57
|
-
values,
|
|
58
|
-
filter: {
|
|
59
|
-
type: values.type
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
} else {
|
|
63
|
-
await repo.create({
|
|
64
|
-
values
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
ctx.body = "ok";
|
|
68
|
-
return next();
|
|
69
|
-
};
|
|
70
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
71
|
-
0 && (module.exports = {
|
|
72
|
-
getConfiguration,
|
|
73
|
-
setConfiguration
|
|
74
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
declare const _default: import("@nocobase/database").CollectionOptions;
|
|
10
|
-
export default _default;
|
|
@@ -1,60 +0,0 @@
|
|
|
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
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var mapConfiguration_exports = {};
|
|
28
|
-
__export(mapConfiguration_exports, {
|
|
29
|
-
default: () => mapConfiguration_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(mapConfiguration_exports);
|
|
32
|
-
var import_database = require("@nocobase/database");
|
|
33
|
-
var import_constants = require("../constants");
|
|
34
|
-
var mapConfiguration_default = (0, import_database.defineCollection)({
|
|
35
|
-
dumpRules: {
|
|
36
|
-
group: "third-party"
|
|
37
|
-
},
|
|
38
|
-
name: import_constants.MapConfigurationCollectionName,
|
|
39
|
-
shared: true,
|
|
40
|
-
fields: [
|
|
41
|
-
{
|
|
42
|
-
title: "Access key",
|
|
43
|
-
comment: "\u8BBF\u95EE\u5BC6\u94A5",
|
|
44
|
-
name: "accessKey",
|
|
45
|
-
type: "string"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
title: "securityJsCode",
|
|
49
|
-
comment: "securityJsCode or serviceHOST",
|
|
50
|
-
name: "securityJsCode",
|
|
51
|
-
type: "string"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
title: "Map type",
|
|
55
|
-
comment: "\u5730\u56FE\u7C7B\u578B",
|
|
56
|
-
name: "type",
|
|
57
|
-
type: "string"
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
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 MapConfigurationCollectionName = "mapConfiguration";
|
package/dist/server/constants.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var constants_exports = {};
|
|
28
|
-
__export(constants_exports, {
|
|
29
|
-
MapConfigurationCollectionName: () => MapConfigurationCollectionName
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(constants_exports);
|
|
32
|
-
const MapConfigurationCollectionName = "mapConfiguration";
|
|
33
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
-
0 && (module.exports = {
|
|
35
|
-
MapConfigurationCollectionName
|
|
36
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
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 { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@nocobase/database';
|
|
10
|
-
declare class Circle extends DataTypes.ABSTRACT {
|
|
11
|
-
key: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class CircleField extends Field {
|
|
14
|
-
constructor(options?: any, context?: FieldContext);
|
|
15
|
-
get dataType(): typeof Circle;
|
|
16
|
-
}
|
|
17
|
-
export interface CircleFieldOptions extends BaseColumnFieldOptions {
|
|
18
|
-
type: 'circle';
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,77 +0,0 @@
|
|
|
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
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var circle_exports = {};
|
|
28
|
-
__export(circle_exports, {
|
|
29
|
-
CircleField: () => CircleField
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(circle_exports);
|
|
32
|
-
var import_database = require("@nocobase/database");
|
|
33
|
-
var import_helpers = require("../helpers");
|
|
34
|
-
class Circle extends import_database.DataTypes.ABSTRACT {
|
|
35
|
-
key = "Circle";
|
|
36
|
-
}
|
|
37
|
-
class CircleField extends import_database.Field {
|
|
38
|
-
constructor(options, context) {
|
|
39
|
-
const { name } = options;
|
|
40
|
-
super(
|
|
41
|
-
{
|
|
42
|
-
get() {
|
|
43
|
-
const value = this.getDataValue(name);
|
|
44
|
-
if ((0, import_helpers.isPg)(context)) {
|
|
45
|
-
if (typeof value === "string") {
|
|
46
|
-
return (0, import_helpers.toValue)(`(${value})`);
|
|
47
|
-
}
|
|
48
|
-
return value ? [value.x, value.y, value.radius] : null;
|
|
49
|
-
} else {
|
|
50
|
-
return value;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
set(value) {
|
|
54
|
-
if (!(value == null ? void 0 : value.length))
|
|
55
|
-
value = null;
|
|
56
|
-
else if ((0, import_helpers.isPg)(context)) {
|
|
57
|
-
value = value.join(",");
|
|
58
|
-
}
|
|
59
|
-
this.setDataValue(name, value);
|
|
60
|
-
},
|
|
61
|
-
...options
|
|
62
|
-
},
|
|
63
|
-
context
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
get dataType() {
|
|
67
|
-
if ((0, import_helpers.isPg)(this.context)) {
|
|
68
|
-
return Circle;
|
|
69
|
-
} else {
|
|
70
|
-
return import_database.DataTypes.JSON;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
-
0 && (module.exports = {
|
|
76
|
-
CircleField
|
|
77
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
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 './point';
|
|
10
|
-
export * from './lineString';
|
|
11
|
-
export * from './polygon';
|
|
12
|
-
export * from './circle';
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __copyProps = (to, from, except, desc) => {
|
|
15
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
23
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
-
var fields_exports = {};
|
|
25
|
-
module.exports = __toCommonJS(fields_exports);
|
|
26
|
-
__reExport(fields_exports, require("./point"), module.exports);
|
|
27
|
-
__reExport(fields_exports, require("./lineString"), module.exports);
|
|
28
|
-
__reExport(fields_exports, require("./polygon"), module.exports);
|
|
29
|
-
__reExport(fields_exports, require("./circle"), module.exports);
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
...require("./point"),
|
|
33
|
-
...require("./lineString"),
|
|
34
|
-
...require("./polygon"),
|
|
35
|
-
...require("./circle")
|
|
36
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
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 { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@nocobase/database';
|
|
10
|
-
declare class LineString extends DataTypes.ABSTRACT {
|
|
11
|
-
key: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class LineStringField extends Field {
|
|
14
|
-
constructor(options?: any, context?: FieldContext);
|
|
15
|
-
get dataType(): DataTypes.GeometryDataType | typeof LineString;
|
|
16
|
-
}
|
|
17
|
-
export interface LineStringOptions extends BaseColumnFieldOptions {
|
|
18
|
-
type: 'lineString';
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,84 +0,0 @@
|
|
|
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
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var lineString_exports = {};
|
|
28
|
-
__export(lineString_exports, {
|
|
29
|
-
LineStringField: () => LineStringField
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(lineString_exports);
|
|
32
|
-
var import_database = require("@nocobase/database");
|
|
33
|
-
var import_helpers = require("../helpers");
|
|
34
|
-
class LineString extends import_database.DataTypes.ABSTRACT {
|
|
35
|
-
key = "Path";
|
|
36
|
-
}
|
|
37
|
-
class LineStringField extends import_database.Field {
|
|
38
|
-
constructor(options, context) {
|
|
39
|
-
const { name } = options;
|
|
40
|
-
super(
|
|
41
|
-
{
|
|
42
|
-
get() {
|
|
43
|
-
const value = this.getDataValue(name);
|
|
44
|
-
if ((0, import_helpers.isPg)(context)) {
|
|
45
|
-
return (0, import_helpers.toValue)(value);
|
|
46
|
-
} else if ((0, import_helpers.isMysql)(context)) {
|
|
47
|
-
return (value == null ? void 0 : value.coordinates) || null;
|
|
48
|
-
} else {
|
|
49
|
-
return value;
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
set(value) {
|
|
53
|
-
if (!(value == null ? void 0 : value.length))
|
|
54
|
-
value = null;
|
|
55
|
-
else if ((0, import_helpers.isPg)(context)) {
|
|
56
|
-
value = (0, import_helpers.joinComma)(value.map(import_helpers.joinComma));
|
|
57
|
-
} else if ((0, import_helpers.isMysql)(context)) {
|
|
58
|
-
value = {
|
|
59
|
-
type: "LineString",
|
|
60
|
-
coordinates: value
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
this.setDataValue(name, value);
|
|
64
|
-
},
|
|
65
|
-
...options
|
|
66
|
-
},
|
|
67
|
-
context
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
get dataType() {
|
|
71
|
-
if ((0, import_helpers.isPg)(this.context)) {
|
|
72
|
-
return LineString;
|
|
73
|
-
}
|
|
74
|
-
if ((0, import_helpers.isMysql)(this.context)) {
|
|
75
|
-
return import_database.DataTypes.GEOMETRY("LINESTRING");
|
|
76
|
-
} else {
|
|
77
|
-
return import_database.DataTypes.JSON;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
-
0 && (module.exports = {
|
|
83
|
-
LineStringField
|
|
84
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
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 { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@nocobase/database';
|
|
10
|
-
declare class Point extends DataTypes.ABSTRACT {
|
|
11
|
-
key: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class PointField extends Field {
|
|
14
|
-
constructor(options?: any, context?: FieldContext);
|
|
15
|
-
get dataType(): typeof Point | DataTypes.GeometryDataType;
|
|
16
|
-
}
|
|
17
|
-
export interface PointFieldOptions extends BaseColumnFieldOptions {
|
|
18
|
-
type: 'point';
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,87 +0,0 @@
|
|
|
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
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var point_exports = {};
|
|
28
|
-
__export(point_exports, {
|
|
29
|
-
PointField: () => PointField
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(point_exports);
|
|
32
|
-
var import_database = require("@nocobase/database");
|
|
33
|
-
var import_helpers = require("../helpers");
|
|
34
|
-
class Point extends import_database.DataTypes.ABSTRACT {
|
|
35
|
-
key = "Point";
|
|
36
|
-
}
|
|
37
|
-
class PointField extends import_database.Field {
|
|
38
|
-
constructor(options, context) {
|
|
39
|
-
const { name } = options;
|
|
40
|
-
super(
|
|
41
|
-
{
|
|
42
|
-
get() {
|
|
43
|
-
const value = this.getDataValue(name);
|
|
44
|
-
if ((0, import_helpers.isPg)(context)) {
|
|
45
|
-
if (typeof value === "string") {
|
|
46
|
-
return (0, import_helpers.toValue)(value);
|
|
47
|
-
}
|
|
48
|
-
return value ? [value.x, value.y] : null;
|
|
49
|
-
} else if ((0, import_helpers.isMysql)(context)) {
|
|
50
|
-
return (value == null ? void 0 : value.coordinates) || null;
|
|
51
|
-
} else {
|
|
52
|
-
return value;
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
set(value) {
|
|
56
|
-
if (!(value == null ? void 0 : value.length))
|
|
57
|
-
value = null;
|
|
58
|
-
else if ((0, import_helpers.isPg)(context)) {
|
|
59
|
-
value = (0, import_helpers.joinComma)(value);
|
|
60
|
-
} else if ((0, import_helpers.isMysql)(context)) {
|
|
61
|
-
value = {
|
|
62
|
-
type: "Point",
|
|
63
|
-
coordinates: value
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
this.setDataValue(name, value);
|
|
67
|
-
},
|
|
68
|
-
...options
|
|
69
|
-
},
|
|
70
|
-
context
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
get dataType() {
|
|
74
|
-
if ((0, import_helpers.isPg)(this.context)) {
|
|
75
|
-
return Point;
|
|
76
|
-
}
|
|
77
|
-
if ((0, import_helpers.isMysql)(this.context)) {
|
|
78
|
-
return import_database.DataTypes.GEOMETRY("POINT");
|
|
79
|
-
} else {
|
|
80
|
-
return import_database.DataTypes.JSON;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
-
0 && (module.exports = {
|
|
86
|
-
PointField
|
|
87
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
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 { BaseColumnFieldOptions, DataTypes, Field, FieldContext } from '@nocobase/database';
|
|
10
|
-
declare class Polygon extends DataTypes.ABSTRACT {
|
|
11
|
-
key: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class PolygonField extends Field {
|
|
14
|
-
constructor(options?: any, context?: FieldContext);
|
|
15
|
-
get dataType(): DataTypes.GeometryDataType | typeof Polygon;
|
|
16
|
-
}
|
|
17
|
-
export interface PolygonFieldOptions extends BaseColumnFieldOptions {
|
|
18
|
-
type: 'polygon';
|
|
19
|
-
}
|
|
20
|
-
export {};
|