@nocobase/plugin-charts 0.13.0-alpha.4 → 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.
@@ -1,11 +1,33 @@
1
- 'use strict';
2
-
3
- var plugin = require('./plugin');
4
-
5
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
-
7
- var plugin__default = /*#__PURE__*/_interopDefault(plugin);
8
-
9
-
10
-
11
- module.exports = plugin__default.default;
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"));
@@ -1,23 +1,47 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var server = require('@nocobase/server');
6
- var JSON5 = require('json5');
7
- var path = require('path');
8
- var chartsQueries = require('./actions/chartsQueries');
9
- var query = require('./query');
10
-
11
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
-
13
- var JSON5__default = /*#__PURE__*/_interopDefault(JSON5);
14
-
15
- class ChartsPlugin extends server.Plugin {
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 plugin_exports = {};
29
+ __export(plugin_exports, {
30
+ ChartsPlugin: () => ChartsPlugin,
31
+ default: () => plugin_default
32
+ });
33
+ module.exports = __toCommonJS(plugin_exports);
34
+ var import_server = require("@nocobase/server");
35
+ var import_json5 = __toESM(require("json5"));
36
+ var import_path = require("path");
37
+ var import_chartsQueries = require("./actions/chartsQueries");
38
+ var import_query = require("./query");
39
+ class ChartsPlugin extends import_server.Plugin {
16
40
  syncFields = async (instance, { transaction }) => {
17
- const _data = await query.query[instance.type](instance.options, { db: this.db, transaction, validateSQL: true });
41
+ const _data = await import_query.query[instance.type](instance.options, { db: this.db, transaction, validateSQL: true });
18
42
  let data;
19
43
  if (typeof _data === "string") {
20
- data = JSON5__default.default.parse(_data);
44
+ data = import_json5.default.parse(_data);
21
45
  } else {
22
46
  data = _data;
23
47
  }
@@ -37,12 +61,12 @@ class ChartsPlugin extends server.Plugin {
37
61
  }
38
62
  async load() {
39
63
  await this.db.import({
40
- directory: path.resolve(__dirname, "collections")
64
+ directory: (0, import_path.resolve)(__dirname, "collections")
41
65
  });
42
66
  this.app.resourcer.registerActionHandlers({
43
- "chartsQueries:getData": chartsQueries.getData,
44
- "chartsQueries:listMetadata": chartsQueries.listMetadata,
45
- "chartsQueries:validate": chartsQueries.validate
67
+ "chartsQueries:getData": import_chartsQueries.getData,
68
+ "chartsQueries:listMetadata": import_chartsQueries.listMetadata,
69
+ "chartsQueries:validate": import_chartsQueries.validate
46
70
  });
47
71
  this.app.acl.registerSnippet({
48
72
  name: "pm.charts.queries",
@@ -61,6 +85,7 @@ class ChartsPlugin extends server.Plugin {
61
85
  }
62
86
  }
63
87
  var plugin_default = ChartsPlugin;
64
-
65
- exports.ChartsPlugin = ChartsPlugin;
66
- exports.default = plugin_default;
88
+ // Annotate the CommonJS export names for ESM import in node:
89
+ 0 && (module.exports = {
90
+ ChartsPlugin
91
+ });
@@ -1,7 +1,26 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
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
+ default: () => query_default,
21
+ query: () => query
22
+ });
23
+ module.exports = __toCommonJS(query_exports);
5
24
  const query = {
6
25
  api: async (options) => {
7
26
  return [];
@@ -34,6 +53,7 @@ const query = {
34
53
  }
35
54
  };
36
55
  var query_default = query;
37
-
38
- exports.default = query_default;
39
- exports.query = query;
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
58
+ query
59
+ });
@@ -1,5 +1,27 @@
1
- 'use strict';
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 shared_exports = {};
19
+ __export(shared_exports, {
20
+ choicesTypeInterfaceArray: () => choicesTypeInterfaceArray
21
+ });
22
+ module.exports = __toCommonJS(shared_exports);
3
23
  const choicesTypeInterfaceArray = ["radioGroup", "select"];
4
-
5
- exports.choicesTypeInterfaceArray = choicesTypeInterfaceArray;
24
+ // Annotate the CommonJS export names for ESM import in node:
25
+ 0 && (module.exports = {
26
+ choicesTypeInterfaceArray
27
+ });
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "图表",
5
5
  "description": "Out-of-the-box, feature-rich chart plugins.",
6
6
  "description.zh-CN": "开箱即用、丰富的报表。",
7
- "version": "0.13.0-alpha.4",
7
+ "version": "0.13.0-alpha.5",
8
8
  "main": "./dist/server/index.js",
9
9
  "devDependencies": {
10
10
  "@ant-design/icons": "5.x",
@@ -25,5 +25,5 @@
25
25
  "@nocobase/test": "0.x",
26
26
  "@nocobase/utils": "0.x"
27
27
  },
28
- "gitHead": "29594e9dbb2455e2f3f6bea95340c4ed75789b61"
28
+ "gitHead": "9eabe607b4a20c356fdb2fd95e40fa476986dcb0"
29
29
  }