@nocobase/plugin-data-source-manager 1.4.15 → 1.4.17
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/dist/externalVersion.js
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.4.
|
|
11
|
+
"@nocobase/client": "1.4.17",
|
|
12
12
|
"react": "18.2.0",
|
|
13
|
-
"@nocobase/plugin-acl": "1.4.
|
|
14
|
-
"@nocobase/utils": "1.4.
|
|
15
|
-
"@nocobase/server": "1.4.
|
|
13
|
+
"@nocobase/plugin-acl": "1.4.17",
|
|
14
|
+
"@nocobase/utils": "1.4.17",
|
|
15
|
+
"@nocobase/server": "1.4.17",
|
|
16
16
|
"lodash": "4.17.21",
|
|
17
|
-
"@nocobase/data-source-manager": "1.4.
|
|
17
|
+
"@nocobase/data-source-manager": "1.4.17",
|
|
18
18
|
"@ant-design/icons": "5.2.6",
|
|
19
19
|
"antd": "5.12.8",
|
|
20
20
|
"react-router-dom": "6.21.0",
|
|
@@ -22,10 +22,10 @@ module.exports = {
|
|
|
22
22
|
"react-i18next": "11.18.6",
|
|
23
23
|
"@formily/react": "2.3.0",
|
|
24
24
|
"@emotion/css": "11.13.0",
|
|
25
|
-
"@nocobase/database": "1.4.
|
|
26
|
-
"@nocobase/acl": "1.4.
|
|
25
|
+
"@nocobase/database": "1.4.17",
|
|
26
|
+
"@nocobase/acl": "1.4.17",
|
|
27
27
|
"sequelize": "6.35.2",
|
|
28
|
-
"@nocobase/test": "1.4.
|
|
28
|
+
"@nocobase/test": "1.4.17",
|
|
29
29
|
"@formily/antd-v5": "1.1.9",
|
|
30
30
|
"@formily/core": "2.3.0",
|
|
31
31
|
"@formily/reactive": "2.3.0",
|
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
var __create = Object.create;
|
|
10
11
|
var __defProp = Object.defineProperty;
|
|
11
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
13
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
13
15
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
16
|
var __export = (target, all) => {
|
|
15
17
|
for (var name in all)
|
|
@@ -23,6 +25,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
23
25
|
}
|
|
24
26
|
return to;
|
|
25
27
|
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
26
36
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
37
|
var data_sources_field_model_exports = {};
|
|
28
38
|
__export(data_sources_field_model_exports, {
|
|
@@ -30,11 +40,12 @@ __export(data_sources_field_model_exports, {
|
|
|
30
40
|
});
|
|
31
41
|
module.exports = __toCommonJS(data_sources_field_model_exports);
|
|
32
42
|
var import_database = require("@nocobase/database");
|
|
43
|
+
var import_lodash = __toESM(require("lodash"));
|
|
33
44
|
var import_utils = require("../utils");
|
|
34
45
|
class DataSourcesFieldModel extends import_database.MagicAttributeModel {
|
|
35
46
|
load(loadOptions) {
|
|
36
47
|
const { app } = loadOptions;
|
|
37
|
-
const options = this.
|
|
48
|
+
const options = this.toJSON();
|
|
38
49
|
const { collectionName, name, dataSourceKey, field } = options;
|
|
39
50
|
const dataSource = app.dataSourceManager.dataSources.get(dataSourceKey);
|
|
40
51
|
const collection = dataSource.collectionManager.getCollection(collectionName);
|
|
@@ -52,7 +63,7 @@ class DataSourcesFieldModel extends import_database.MagicAttributeModel {
|
|
|
52
63
|
}
|
|
53
64
|
unload(loadOptions) {
|
|
54
65
|
const { app } = loadOptions;
|
|
55
|
-
const options = this.
|
|
66
|
+
const options = this.toJSON();
|
|
56
67
|
const { collectionName, name, dataSourceKey } = options;
|
|
57
68
|
const dataSource = app.dataSourceManager.dataSources.get(dataSourceKey);
|
|
58
69
|
if (!dataSource) {
|
|
@@ -64,6 +75,13 @@ class DataSourcesFieldModel extends import_database.MagicAttributeModel {
|
|
|
64
75
|
}
|
|
65
76
|
collection.removeField(name);
|
|
66
77
|
}
|
|
78
|
+
toJSON() {
|
|
79
|
+
const json = super.toJSON();
|
|
80
|
+
if (json.interface === "unixTimestamp" && json.accuracy) {
|
|
81
|
+
import_lodash.default.set(json, "uiSchema.x-component-props.accuracy", json.accuracy);
|
|
82
|
+
}
|
|
83
|
+
return json;
|
|
84
|
+
}
|
|
67
85
|
}
|
|
68
86
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
87
|
0 && (module.exports = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-source-manager",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.17",
|
|
4
4
|
"main": "dist/server/index.js",
|
|
5
5
|
"displayName": "Data source manager",
|
|
6
6
|
"displayName.zh-CN": "数据源管理",
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"keywords": [
|
|
18
18
|
"Data model tools"
|
|
19
19
|
],
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "fbb23b74bdff489afea67e1f3c9a917dd0a836b7"
|
|
21
21
|
}
|