@nocobase/plugin-data-visualization 0.13.0-alpha.3 → 0.13.0-alpha.5
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/client/index.js +120 -67515
- package/dist/index.js +37 -16
- package/dist/locale/en-US.js +22 -4
- package/dist/locale/fr-FR.js +22 -4
- package/dist/locale/ja-JP.js +22 -4
- package/dist/locale/pt-BR.js +22 -4
- package/dist/locale/ru-RU.js +22 -4
- package/dist/locale/tr-TR.js +22 -4
- package/dist/locale/zh-CN.js +22 -4
- package/dist/server/actions/formatter.js +30 -6
- package/dist/server/actions/query.js +41 -15
- package/dist/server/index.js +33 -11
- package/dist/server/plugin.js +33 -14
- package/dist/swagger/index.js +22 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,18 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var src_exports = {};
|
|
30
|
+
__export(src_exports, {
|
|
31
|
+
default: () => import_server.default
|
|
12
32
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
module.exports = __toCommonJS(src_exports);
|
|
34
|
+
__reExport(src_exports, require("./server"), module.exports);
|
|
35
|
+
var import_server = __toESM(require("./server"));
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
...require("./server")
|
|
18
39
|
});
|
package/dist/locale/en-US.js
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var en_US_exports = {};
|
|
19
|
+
__export(en_US_exports, {
|
|
20
|
+
default: () => en_US_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(en_US_exports);
|
|
3
23
|
var en_US_default = {
|
|
4
24
|
Edit: "Edit",
|
|
5
25
|
Delete: "Delete",
|
|
@@ -22,5 +42,3 @@ var en_US_default = {
|
|
|
22
42
|
"Are you sure you want to delete it?": "Are you sure you want to delete it?",
|
|
23
43
|
"Sign in button name, which will be displayed on the sign in page": "Sign in button name, which will be displayed on the sign in page"
|
|
24
44
|
};
|
|
25
|
-
|
|
26
|
-
module.exports = en_US_default;
|
package/dist/locale/fr-FR.js
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var fr_FR_exports = {};
|
|
19
|
+
__export(fr_FR_exports, {
|
|
20
|
+
default: () => fr_FR_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(fr_FR_exports);
|
|
3
23
|
var fr_FR_default = {};
|
|
4
|
-
|
|
5
|
-
module.exports = fr_FR_default;
|
package/dist/locale/ja-JP.js
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var ja_JP_exports = {};
|
|
19
|
+
__export(ja_JP_exports, {
|
|
20
|
+
default: () => ja_JP_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(ja_JP_exports);
|
|
3
23
|
var ja_JP_default = {};
|
|
4
|
-
|
|
5
|
-
module.exports = ja_JP_default;
|
package/dist/locale/pt-BR.js
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var pt_BR_exports = {};
|
|
19
|
+
__export(pt_BR_exports, {
|
|
20
|
+
default: () => pt_BR_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(pt_BR_exports);
|
|
3
23
|
var pt_BR_default = {
|
|
4
24
|
Edit: "Editar",
|
|
5
25
|
Delete: "Delete",
|
|
@@ -22,5 +42,3 @@ var pt_BR_default = {
|
|
|
22
42
|
"Are you sure you want to delete it?": "Tem certeza de que deseja exclu\xED-lo?",
|
|
23
43
|
"Sign in button name, which will be displayed on the sign in page": "Nome do bot\xE3o de login, que ser\xE1 exibido na p\xE1gina de login"
|
|
24
44
|
};
|
|
25
|
-
|
|
26
|
-
module.exports = pt_BR_default;
|
package/dist/locale/ru-RU.js
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var ru_RU_exports = {};
|
|
19
|
+
__export(ru_RU_exports, {
|
|
20
|
+
default: () => ru_RU_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(ru_RU_exports);
|
|
3
23
|
var ru_RU_default = {};
|
|
4
|
-
|
|
5
|
-
module.exports = ru_RU_default;
|
package/dist/locale/tr-TR.js
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var tr_TR_exports = {};
|
|
19
|
+
__export(tr_TR_exports, {
|
|
20
|
+
default: () => tr_TR_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(tr_TR_exports);
|
|
3
23
|
var tr_TR_default = {};
|
|
4
|
-
|
|
5
|
-
module.exports = tr_TR_default;
|
package/dist/locale/zh-CN.js
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var zh_CN_exports = {};
|
|
19
|
+
__export(zh_CN_exports, {
|
|
20
|
+
default: () => zh_CN_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(zh_CN_exports);
|
|
3
23
|
var zh_CN_default = {
|
|
4
24
|
Edit: "\u7F16\u8F91",
|
|
5
25
|
Delete: "\u5220\u9664",
|
|
@@ -74,5 +94,3 @@ var zh_CN_default = {
|
|
|
74
94
|
isGroup: "\u5206\u7EC4",
|
|
75
95
|
smooth: "\u5E73\u6ED1\u66F2\u7EBF"
|
|
76
96
|
};
|
|
77
|
-
|
|
78
|
-
module.exports = zh_CN_default;
|
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var formatter_exports = {};
|
|
19
|
+
__export(formatter_exports, {
|
|
20
|
+
dateFormatFn: () => dateFormatFn,
|
|
21
|
+
formatFn: () => formatFn,
|
|
22
|
+
formatter: () => formatter
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(formatter_exports);
|
|
3
25
|
const dateFormatFn = (sequelize, dialect, field, format) => {
|
|
4
26
|
switch (dialect) {
|
|
5
27
|
case "sqlite":
|
|
@@ -35,7 +57,9 @@ const formatter = (sequelize, type, field, format) => {
|
|
|
35
57
|
return formatFn(sequelize, dialect, field, format);
|
|
36
58
|
}
|
|
37
59
|
};
|
|
38
|
-
|
|
39
|
-
exports
|
|
40
|
-
|
|
41
|
-
|
|
60
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
+
0 && (module.exports = {
|
|
62
|
+
dateFormatFn,
|
|
63
|
+
formatFn,
|
|
64
|
+
formatter
|
|
65
|
+
});
|
|
@@ -1,8 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var query_exports = {};
|
|
19
|
+
__export(query_exports, {
|
|
20
|
+
cacheWrap: () => cacheWrap,
|
|
21
|
+
parseBuilder: () => parseBuilder,
|
|
22
|
+
parseFieldAndAssociations: () => parseFieldAndAssociations,
|
|
23
|
+
processData: () => processData,
|
|
24
|
+
query: () => query,
|
|
25
|
+
queryData: () => queryData
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(query_exports);
|
|
28
|
+
var import_database = require("@nocobase/database");
|
|
29
|
+
var import_formatter = require("./formatter");
|
|
6
30
|
const parseFieldAndAssociations = (ctx, params) => {
|
|
7
31
|
const { collection: collectionName, measures, dimensions, orders, filter } = params;
|
|
8
32
|
const collection = ctx.db.getCollection(collectionName);
|
|
@@ -20,7 +44,7 @@ const parseFieldAndAssociations = (ctx, params) => {
|
|
|
20
44
|
} else if (selected.field.length > 1) {
|
|
21
45
|
[target, name] = selected.field;
|
|
22
46
|
}
|
|
23
|
-
let field = underscored ?
|
|
47
|
+
let field = underscored ? (0, import_database.snakeCase)(name) : name;
|
|
24
48
|
let fieldType = (_a = fields.get(name)) == null ? void 0 : _a.type;
|
|
25
49
|
if (target) {
|
|
26
50
|
const targetField = fields.get(target);
|
|
@@ -52,7 +76,7 @@ const parseFieldAndAssociations = (ctx, params) => {
|
|
|
52
76
|
attributes: [],
|
|
53
77
|
...type === "belongsToMany" ? { through: { attributes: [] } } : {}
|
|
54
78
|
}));
|
|
55
|
-
const filterParser = new
|
|
79
|
+
const filterParser = new import_database.FilterParser(filter, {
|
|
56
80
|
collection
|
|
57
81
|
});
|
|
58
82
|
const { where, include: filterInclude } = filterParser.toSequelizeParams();
|
|
@@ -101,7 +125,7 @@ const parseBuilder = (ctx, builder) => {
|
|
|
101
125
|
const attribute = [];
|
|
102
126
|
const col = sequelize.col(field);
|
|
103
127
|
if (format) {
|
|
104
|
-
attribute.push(
|
|
128
|
+
attribute.push((0, import_formatter.formatter)(sequelize, type, field, format));
|
|
105
129
|
} else {
|
|
106
130
|
attribute.push(col);
|
|
107
131
|
}
|
|
@@ -213,10 +237,12 @@ const query = async (ctx, next) => {
|
|
|
213
237
|
}
|
|
214
238
|
await next();
|
|
215
239
|
};
|
|
216
|
-
|
|
217
|
-
exports
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
240
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
241
|
+
0 && (module.exports = {
|
|
242
|
+
cacheWrap,
|
|
243
|
+
parseBuilder,
|
|
244
|
+
parseFieldAndAssociations,
|
|
245
|
+
processData,
|
|
246
|
+
query,
|
|
247
|
+
queryData
|
|
248
|
+
});
|
package/dist/server/index.js
CHANGED
|
@@ -1,11 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var server_exports = {};
|
|
29
|
+
__export(server_exports, {
|
|
30
|
+
default: () => import_plugin.default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(server_exports);
|
|
33
|
+
var import_plugin = __toESM(require("./plugin"));
|
package/dist/server/plugin.js
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var plugin_exports = {};
|
|
19
|
+
__export(plugin_exports, {
|
|
20
|
+
DataVisualizationPlugin: () => DataVisualizationPlugin,
|
|
21
|
+
default: () => plugin_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(plugin_exports);
|
|
24
|
+
var import_cache = require("@nocobase/cache");
|
|
25
|
+
var import_server = require("@nocobase/server");
|
|
26
|
+
var import_query = require("./actions/query");
|
|
27
|
+
class DataVisualizationPlugin extends import_server.Plugin {
|
|
10
28
|
cache;
|
|
11
29
|
afterAdd() {
|
|
12
30
|
}
|
|
@@ -14,13 +32,13 @@ class DataVisualizationPlugin extends server.Plugin {
|
|
|
14
32
|
this.app.resource({
|
|
15
33
|
name: "charts",
|
|
16
34
|
actions: {
|
|
17
|
-
query:
|
|
35
|
+
query: import_query.query
|
|
18
36
|
}
|
|
19
37
|
});
|
|
20
38
|
this.app.acl.allow("charts", "query", "loggedIn");
|
|
21
39
|
}
|
|
22
40
|
async load() {
|
|
23
|
-
this.cache =
|
|
41
|
+
this.cache = (0, import_cache.createCache)({
|
|
24
42
|
ttl: 30,
|
|
25
43
|
// seconds
|
|
26
44
|
max: 1e3,
|
|
@@ -37,6 +55,7 @@ class DataVisualizationPlugin extends server.Plugin {
|
|
|
37
55
|
}
|
|
38
56
|
}
|
|
39
57
|
var plugin_default = DataVisualizationPlugin;
|
|
40
|
-
|
|
41
|
-
exports
|
|
42
|
-
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {
|
|
60
|
+
DataVisualizationPlugin
|
|
61
|
+
});
|
package/dist/swagger/index.js
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var swagger_exports = {};
|
|
19
|
+
__export(swagger_exports, {
|
|
20
|
+
default: () => swagger_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(swagger_exports);
|
|
3
23
|
var swagger_default = {
|
|
4
24
|
info: {
|
|
5
25
|
title: "NocoBase API - Data visualization plugin"
|
|
@@ -7,5 +27,3 @@ var swagger_default = {
|
|
|
7
27
|
tags: [],
|
|
8
28
|
paths: {}
|
|
9
29
|
};
|
|
10
|
-
|
|
11
|
-
module.exports = swagger_default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-visualization",
|
|
3
|
-
"version": "0.13.0-alpha.
|
|
3
|
+
"version": "0.13.0-alpha.5",
|
|
4
4
|
"displayName": "Data Visualization",
|
|
5
5
|
"displayName.zh-CN": "数据可视化",
|
|
6
6
|
"description": "Provides business intelligence and data visualization features",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"@nocobase/test": "0.x",
|
|
33
33
|
"@nocobase/utils": "0.x"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "9eabe607b4a20c356fdb2fd95e40fa476986dcb0"
|
|
36
36
|
}
|