@nocobase/plugin-map 2.1.0-alpha.4 → 2.1.0-alpha.40
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/LICENSE +201 -661
- package/README.md +79 -10
- package/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/dist/client/694.c68fa63538a70259.js +10 -0
- package/dist/client/720.f7ca9eb1235e7ba8.js +10 -0
- package/dist/client/hooks/useMapConfig.d.ts +2 -2
- package/dist/client/hooks/useMapConfiguration.d.ts +1 -0
- package/dist/client/index.js +1 -1
- package/dist/client/types.d.ts +1 -1
- package/dist/client/utils.d.ts +1 -1
- package/dist/client-v2/577.be08ec2df548391b.js +10 -0
- package/dist/client-v2/641.a19dd82baa053f9e.js +10 -0
- package/dist/client-v2/694.5f486a695fdeb42a.js +10 -0
- package/dist/client-v2/720.6ede563c5d95f038.js +10 -0
- package/dist/client-v2/872.53cbb217b7708463.js +10 -0
- package/dist/{client/models/MapBlockComponent.d.ts → client-v2/constants.d.ts} +4 -2
- package/dist/client-v2/hooks/index.d.ts +9 -0
- package/dist/client-v2/hooks/useMapConfig.d.ts +11 -0
- package/dist/client-v2/index.d.ts +9 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/locale.d.ts +11 -0
- package/dist/client-v2/models/MapActionGroupModel.d.ts +14 -0
- package/dist/client-v2/models/MapBlockComponent.d.ts +12 -0
- package/dist/{client → client-v2}/models/MapBlockModel.d.ts +14 -2
- package/dist/{client → client-v2}/models/components/AMap/Map.d.ts +1 -1
- package/dist/{client → client-v2}/models/components/GoogleMaps/Map.d.ts +1 -1
- package/dist/{client → client-v2}/models/fieldModels/DisplayMapFieldModel.d.ts +3 -1
- package/dist/{client → client-v2}/models/fieldModels/MapFieldModel.d.ts +1 -1
- package/dist/{client/models/components → client-v2/pages}/Configuration.d.ts +2 -1
- package/dist/client-v2/plugin.d.ts +13 -0
- package/dist/externalVersion.js +8 -8
- package/dist/{client/models/MapActionGroupModel.d.ts → shared/configuration.d.ts} +2 -3
- package/dist/shared/configuration.js +39 -0
- package/dist/shared/constants.d.ts +10 -0
- package/dist/shared/constants.js +43 -0
- package/dist/shared/theme.d.ts +10 -0
- package/dist/shared/theme.js +39 -0
- package/dist/shared/types.d.ts +9 -0
- package/dist/shared/types.js +24 -0
- package/dist/shared/utils.d.ts +13 -0
- package/dist/shared/utils.js +98 -0
- package/package.json +5 -3
- package/dist/client/models/components/Map.d.ts +0 -13
- package/dist/client/models/components/MapComponent.d.ts +0 -10
- package/dist/client/models/components/index.d.ts +0 -13
- /package/dist/{client → client-v2}/models/MapComponent.d.ts +0 -0
- /package/dist/{client → client-v2}/models/components/AMap/Block.d.ts +0 -0
- /package/dist/{client → client-v2}/models/components/AMap/Search.d.ts +0 -0
- /package/dist/{client → client-v2}/models/components/AMap/index.d.ts +0 -0
- /package/dist/{client → client-v2}/models/components/GoogleMaps/Block.d.ts +0 -0
- /package/dist/{client → client-v2}/models/components/GoogleMaps/Search.d.ts +0 -0
- /package/dist/{client → client-v2}/models/components/GoogleMaps/index.d.ts +0 -0
- /package/dist/{client → client-v2}/models/components/GoogleMaps/utils.d.ts +0 -0
- /package/dist/{client → client-v2}/models/fieldModels/CircleFieldModel.d.ts +0 -0
- /package/dist/{client → client-v2}/models/fieldModels/DisplayCircleFieldModel.d.ts +0 -0
- /package/dist/{client → client-v2}/models/fieldModels/DisplayLineStringFieldModel.d.ts +0 -0
- /package/dist/{client → client-v2}/models/fieldModels/DisplayPointFieldModel.d.ts +0 -0
- /package/dist/{client → client-v2}/models/fieldModels/DisplayPolygonFieldModel.d.ts +0 -0
- /package/dist/{client → client-v2}/models/fieldModels/LineStringFieldModel.d.ts +0 -0
- /package/dist/{client → client-v2}/models/fieldModels/PointFieldModel.d.ts +0 -0
- /package/dist/{client → client-v2}/models/fieldModels/PolygonFieldModel.d.ts +0 -0
- /package/dist/{client → client-v2}/models/fieldModels/index.d.ts +0 -0
- /package/dist/{client → client-v2}/models/fieldModels/setDefaultZoomLevel.d.ts +0 -0
package/dist/externalVersion.js
CHANGED
|
@@ -8,12 +8,14 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.1.0-alpha.40",
|
|
12
12
|
"react": "18.2.0",
|
|
13
|
-
"@nocobase/
|
|
14
|
-
"@nocobase/
|
|
13
|
+
"@nocobase/flow-engine": "2.1.0-alpha.40",
|
|
14
|
+
"@nocobase/client-v2": "2.1.0-alpha.40",
|
|
15
|
+
"@nocobase/server": "2.1.0-alpha.40",
|
|
16
|
+
"@nocobase/test": "2.1.0-alpha.40",
|
|
15
17
|
"@formily/react": "2.3.7",
|
|
16
|
-
"lodash": "4.
|
|
18
|
+
"lodash": "4.18.1",
|
|
17
19
|
"react-i18next": "11.18.6",
|
|
18
20
|
"@ant-design/icons": "5.6.1",
|
|
19
21
|
"@formily/antd-v5": "1.2.3",
|
|
@@ -21,9 +23,7 @@ module.exports = {
|
|
|
21
23
|
"antd": "5.24.2",
|
|
22
24
|
"@formily/shared": "2.3.7",
|
|
23
25
|
"@formily/core": "2.3.7",
|
|
24
|
-
"@nocobase/
|
|
25
|
-
"@nocobase/
|
|
26
|
-
"@nocobase/actions": "2.1.0-alpha.4",
|
|
27
|
-
"@nocobase/database": "2.1.0-alpha.4",
|
|
26
|
+
"@nocobase/actions": "2.1.0-alpha.40",
|
|
27
|
+
"@nocobase/database": "2.1.0-alpha.40",
|
|
28
28
|
"ahooks": "3.7.8"
|
|
29
29
|
};
|
|
@@ -6,6 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
export declare
|
|
11
|
-
}
|
|
9
|
+
export declare const MapConfigurationResourceKey = "map-configuration";
|
|
10
|
+
export declare const getSSKey: (type: string) => string;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 configuration_exports = {};
|
|
28
|
+
__export(configuration_exports, {
|
|
29
|
+
MapConfigurationResourceKey: () => MapConfigurationResourceKey,
|
|
30
|
+
getSSKey: () => getSSKey
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(configuration_exports);
|
|
33
|
+
const MapConfigurationResourceKey = "map-configuration";
|
|
34
|
+
const getSSKey = (type) => `NOCOBASE_PLUGIN_MAP_CONFIGURATION_${type}`;
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
MapConfigurationResourceKey,
|
|
38
|
+
getSSKey
|
|
39
|
+
});
|
|
@@ -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 declare const selectedImage: string;
|
|
10
|
+
export declare const defaultImage: string;
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
defaultImage: () => defaultImage,
|
|
30
|
+
selectedImage: () => selectedImage
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(constants_exports);
|
|
33
|
+
var import_theme = require("./theme");
|
|
34
|
+
const markerSvg = (color) => `data:image/svg+xml;utf8,${encodeURIComponent(
|
|
35
|
+
`<svg xmlns="http://www.w3.org/2000/svg" width="38" height="63" viewBox="0 0 38 63"><path fill="${color}" d="M19 0C8.5 0 0 8.5 0 19c0 14.2 19 44 19 44s19-29.8 19-44C38 8.5 29.5 0 19 0Z"/><circle fill="white" cx="19" cy="19" r="8"/></svg>`
|
|
36
|
+
)}`;
|
|
37
|
+
const selectedImage = markerSvg(import_theme.mapSelectedColor);
|
|
38
|
+
const defaultImage = markerSvg(import_theme.mapActiveColor);
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
defaultImage,
|
|
42
|
+
selectedImage
|
|
43
|
+
});
|
|
@@ -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 declare const mapActiveColor = "#4e9bff";
|
|
10
|
+
export declare const mapSelectedColor = "#F18b62";
|
|
@@ -0,0 +1,39 @@
|
|
|
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 theme_exports = {};
|
|
28
|
+
__export(theme_exports, {
|
|
29
|
+
mapActiveColor: () => mapActiveColor,
|
|
30
|
+
mapSelectedColor: () => mapSelectedColor
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(theme_exports);
|
|
33
|
+
const mapActiveColor = "#4e9bff";
|
|
34
|
+
const mapSelectedColor = "#F18b62";
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
mapActiveColor,
|
|
38
|
+
mapSelectedColor
|
|
39
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
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 type MapEditorType = 'point' | 'polygon' | 'lineString' | 'circle';
|
|
@@ -0,0 +1,24 @@
|
|
|
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var types_exports = {};
|
|
24
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -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 getSource: (data: Record<string, any>, fields?: string[], type?: string) => any;
|
|
10
|
+
export declare const runIdleTask: (callback: () => void) => void;
|
|
11
|
+
export declare const normalizeErrorMessage: (error: unknown, fallbackMessage: string) => string;
|
|
12
|
+
export declare const compileTemplate: (value: any, t?: (key: string, options?: any) => string) => any;
|
|
13
|
+
export declare const getLabelFormatValue: (uiSchema: any, value: any) => any;
|
|
@@ -0,0 +1,98 @@
|
|
|
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 utils_exports = {};
|
|
28
|
+
__export(utils_exports, {
|
|
29
|
+
compileTemplate: () => compileTemplate,
|
|
30
|
+
getLabelFormatValue: () => getLabelFormatValue,
|
|
31
|
+
getSource: () => getSource,
|
|
32
|
+
normalizeErrorMessage: () => normalizeErrorMessage,
|
|
33
|
+
runIdleTask: () => runIdleTask
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(utils_exports);
|
|
36
|
+
const getSource = (data, fields, type) => {
|
|
37
|
+
const res = fields == null ? void 0 : fields.reduce((obj, field, index) => {
|
|
38
|
+
if (index === fields.length - 1 && (type === "o2m" || type === "m2m")) {
|
|
39
|
+
return obj == null ? void 0 : obj.map((item) => item[field]).filter((v) => v !== null && v !== void 0);
|
|
40
|
+
}
|
|
41
|
+
return obj == null ? void 0 : obj[field];
|
|
42
|
+
}, data);
|
|
43
|
+
return type === "o2m" || type === "m2m" ? res : [res];
|
|
44
|
+
};
|
|
45
|
+
const runIdleTask = (callback) => {
|
|
46
|
+
if (window.requestIdleCallback) {
|
|
47
|
+
window.requestIdleCallback(() => {
|
|
48
|
+
callback();
|
|
49
|
+
});
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
window.setTimeout(callback, 1);
|
|
53
|
+
};
|
|
54
|
+
const normalizeErrorMessage = (error, fallbackMessage) => {
|
|
55
|
+
if (typeof error === "string") {
|
|
56
|
+
return error;
|
|
57
|
+
}
|
|
58
|
+
if (error instanceof Error && error.message) {
|
|
59
|
+
return error.message;
|
|
60
|
+
}
|
|
61
|
+
if (error && typeof error === "object" && "message" in error) {
|
|
62
|
+
const { message } = error;
|
|
63
|
+
if (typeof message === "string" && message) {
|
|
64
|
+
return message;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return fallbackMessage;
|
|
68
|
+
};
|
|
69
|
+
const compileTemplate = (value, t) => {
|
|
70
|
+
if (typeof value !== "string") {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
return value.replace(/\{\{\s*t\(['"]([^'"]+)['"](?:,\s*([^}]+))?\)\s*\}\}/g, (_, key) => {
|
|
74
|
+
return t ? t(key) : key;
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
const getLabelFormatValue = (uiSchema, value) => {
|
|
78
|
+
var _a;
|
|
79
|
+
if (value == null) {
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
const enumOptions = (uiSchema == null ? void 0 : uiSchema.enum) || ((_a = uiSchema == null ? void 0 : uiSchema["x-component-props"]) == null ? void 0 : _a.options);
|
|
83
|
+
if (Array.isArray(enumOptions)) {
|
|
84
|
+
const matched = enumOptions.find((item) => (item == null ? void 0 : item.value) === value);
|
|
85
|
+
if (matched) {
|
|
86
|
+
return matched.label ?? matched.title ?? value;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return value;
|
|
90
|
+
};
|
|
91
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
92
|
+
0 && (module.exports = {
|
|
93
|
+
compileTemplate,
|
|
94
|
+
getLabelFormatValue,
|
|
95
|
+
getSource,
|
|
96
|
+
normalizeErrorMessage,
|
|
97
|
+
runIdleTask
|
|
98
|
+
});
|
package/package.json
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"displayName": "Block: Map",
|
|
4
4
|
"displayName.ru-RU": "Блок: Карта",
|
|
5
5
|
"displayName.zh-CN": "区块:地图",
|
|
6
|
-
"version": "2.1.0-alpha.
|
|
6
|
+
"version": "2.1.0-alpha.40",
|
|
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 地图,你也可以扩展更多地图类型。",
|
|
10
|
-
"license": "
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
11
|
"main": "./dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/block-map",
|
|
13
13
|
"homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/block-map",
|
|
@@ -34,12 +34,14 @@
|
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@nocobase/actions": "2.x",
|
|
36
36
|
"@nocobase/client": "2.x",
|
|
37
|
+
"@nocobase/client-v2": "2.x",
|
|
37
38
|
"@nocobase/database": "2.x",
|
|
39
|
+
"@nocobase/plugin-action-bulk-update": "2.x",
|
|
38
40
|
"@nocobase/server": "2.x",
|
|
39
41
|
"@nocobase/test": "2.x",
|
|
40
42
|
"@nocobase/utils": "2.x"
|
|
41
43
|
},
|
|
42
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "e73f99dd0abefe847f2e50ff0fea1f41a82fd048",
|
|
43
45
|
"keywords": [
|
|
44
46
|
"Blocks"
|
|
45
47
|
]
|
|
@@ -1,13 +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 React from 'react';
|
|
10
|
-
import { AMapComponentProps } from './AMap';
|
|
11
|
-
type MapProps = AMapComponentProps;
|
|
12
|
-
declare const Map: (props: MapProps) => React.JSX.Element;
|
|
13
|
-
export { Map };
|
|
@@ -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
|
-
import React from 'react';
|
|
10
|
-
export declare const MapComponent: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
@@ -1,13 +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 './AMap';
|
|
10
|
-
export * from './Configuration';
|
|
11
|
-
export * from './GoogleMaps';
|
|
12
|
-
export * from './Map';
|
|
13
|
-
export * from './MapComponent';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|