@nocobase/plugin-data-visualization 1.5.0-beta.2 → 1.5.0-beta.4

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.
@@ -8,24 +8,24 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.5.0-beta.2",
11
+ "@nocobase/client": "1.5.0-beta.4",
12
12
  "dayjs": "1.11.10",
13
13
  "@formily/react": "2.3.0",
14
14
  "@formily/shared": "2.3.2",
15
15
  "lodash": "4.17.21",
16
16
  "react": "18.2.0",
17
- "@nocobase/cache": "1.5.0-beta.2",
18
- "@nocobase/server": "1.5.0-beta.2",
19
- "@nocobase/test": "1.5.0-beta.2",
17
+ "@nocobase/cache": "1.5.0-beta.4",
18
+ "@nocobase/server": "1.5.0-beta.4",
19
+ "@nocobase/test": "1.5.0-beta.4",
20
20
  "@emotion/css": "11.13.0",
21
21
  "@ant-design/icons": "5.2.6",
22
22
  "ahooks": "3.7.8",
23
23
  "antd": "5.12.8",
24
24
  "@formily/antd-v5": "1.1.9",
25
25
  "@formily/core": "2.3.0",
26
- "@nocobase/utils": "1.5.0-beta.2",
26
+ "@nocobase/utils": "1.5.0-beta.4",
27
27
  "react-i18next": "11.18.6",
28
- "@nocobase/actions": "1.5.0-beta.2",
29
- "@nocobase/database": "1.5.0-beta.2",
28
+ "@nocobase/actions": "1.5.0-beta.4",
29
+ "@nocobase/database": "1.5.0-beta.4",
30
30
  "sequelize": "6.35.2"
31
31
  };
@@ -1 +1 @@
1
- {"name":"koa-compose","description":"compose Koa middleware","repository":"koajs/compose","version":"4.1.0","keywords":["koa","middleware","compose"],"files":["index.js"],"dependencies":{},"devDependencies":{"codecov":"^3.0.0","jest":"^21.0.0","matcha":"^0.7.0","standard":"^10.0.3"},"scripts":{"bench":"matcha bench/bench.js","lint":"standard --fix .","test":"jest --forceExit --coverage"},"jest":{"testEnvironment":"node"},"license":"MIT","_lastModified":"2024-12-06T08:57:44.706Z"}
1
+ {"name":"koa-compose","description":"compose Koa middleware","repository":"koajs/compose","version":"4.1.0","keywords":["koa","middleware","compose"],"files":["index.js"],"dependencies":{},"devDependencies":{"codecov":"^3.0.0","jest":"^21.0.0","matcha":"^0.7.0","standard":"^10.0.3"},"scripts":{"bench":"matcha bench/bench.js","lint":"standard --fix .","test":"jest --forceExit --coverage"},"jest":{"testEnvironment":"node"},"license":"MIT","_lastModified":"2024-12-11T07:09:27.030Z"}
@@ -1 +1 @@
1
- {"name":"moment-timezone","version":"0.5.43","description":"Parse and display moments in any timezone.","homepage":"http://momentjs.com/timezone/","author":"Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)","keywords":["moment","date","time","timezone","olson","iana","zone","tz"],"main":"./index.js","typings":"./index.d.ts","engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/moment/moment-timezone.git"},"bugs":{"url":"https://github.com/moment/moment-timezone/issues"},"license":"MIT","dependencies":{"moment":"^2.29.4"},"devDependencies":{"grunt":"^1.5.3","grunt-contrib-clean":"^2.0.1","grunt-contrib-jshint":"^3.2.0","grunt-contrib-nodeunit":"^4.0.0","grunt-contrib-uglify":"^5.2.2","grunt-exec":"^3.0.0","typescript":"^3.5.1"},"jspm":{"main":"builds/moment-timezone-with-data","shim":{"moment-timezone":{"deps":["moment"]}}},"scripts":{"test":"grunt"},"_lastModified":"2024-12-06T08:57:45.460Z"}
1
+ {"name":"moment-timezone","version":"0.5.43","description":"Parse and display moments in any timezone.","homepage":"http://momentjs.com/timezone/","author":"Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)","keywords":["moment","date","time","timezone","olson","iana","zone","tz"],"main":"./index.js","typings":"./index.d.ts","engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/moment/moment-timezone.git"},"bugs":{"url":"https://github.com/moment/moment-timezone/issues"},"license":"MIT","dependencies":{"moment":"^2.29.4"},"devDependencies":{"grunt":"^1.5.3","grunt-contrib-clean":"^2.0.1","grunt-contrib-jshint":"^3.2.0","grunt-contrib-nodeunit":"^4.0.0","grunt-contrib-uglify":"^5.2.2","grunt-exec":"^3.0.0","typescript":"^3.5.1"},"jspm":{"main":"builds/moment-timezone-with-data","shim":{"moment-timezone":{"deps":["moment"]}}},"scripts":{"test":"grunt"},"_lastModified":"2024-12-11T07:09:27.761Z"}
@@ -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 mysql_formatter_exports = {};
28
38
  __export(mysql_formatter_exports, {
@@ -30,19 +40,16 @@ __export(mysql_formatter_exports, {
30
40
  });
31
41
  module.exports = __toCommonJS(mysql_formatter_exports);
32
42
  var import_formatter = require("./formatter");
43
+ var import_moment_timezone = __toESM(require("moment-timezone"));
33
44
  class MySQLFormatter extends import_formatter.Formatter {
34
45
  convertFormat(format) {
35
46
  return format.replace(/YYYY/g, "%Y").replace(/MM/g, "%m").replace(/DD/g, "%d").replace(/hh/g, "%H").replace(/mm/g, "%i").replace(/ss/g, "%S");
36
47
  }
37
48
  formatDate(field, format, timezoneOffset) {
38
- const timezone = this.getTimezoneByOffset(timezoneOffset);
49
+ const tz = import_moment_timezone.default.tz(process.env.TZ || "UTC").format("Z");
39
50
  format = this.convertFormat(format);
40
- if (timezone) {
41
- return this.sequelize.fn(
42
- "date_format",
43
- this.sequelize.fn("convert_tz", field, process.env.TZ || "UTC", timezone),
44
- format
45
- );
51
+ if (timezoneOffset && tz !== timezoneOffset) {
52
+ return this.sequelize.fn("date_format", this.sequelize.fn("convert_tz", field, tz, timezoneOffset), format);
46
53
  }
47
54
  return this.sequelize.fn("date_format", field, format);
48
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-data-visualization",
3
- "version": "1.5.0-beta.2",
3
+ "version": "1.5.0-beta.4",
4
4
  "displayName": "Data visualization",
5
5
  "displayName.zh-CN": "数据可视化",
6
6
  "description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.",
@@ -34,7 +34,7 @@
34
34
  "@nocobase/test": "1.x",
35
35
  "@nocobase/utils": "1.x"
36
36
  },
37
- "gitHead": "8a9c29fdac5c6295dcc7abf00c3fa81bd9e01a36",
37
+ "gitHead": "f5ca1548fe8d8eda32699137434306c44a5df84c",
38
38
  "keywords": [
39
39
  "Blocks"
40
40
  ]