@tachybase/plugin-block-charts 1.0.6 → 1.0.18
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
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@tachybase/client": "1.0.
|
|
3
|
-
"@tachybase/schema": "1.0.
|
|
2
|
+
"@tachybase/client": "1.0.18",
|
|
3
|
+
"@tachybase/schema": "1.0.18",
|
|
4
4
|
"lodash": "4.17.21",
|
|
5
|
-
"@tachybase/cache": "1.0.
|
|
6
|
-
"@tachybase/server": "1.0.
|
|
7
|
-
"@tachybase/utils": "1.0.
|
|
5
|
+
"@tachybase/cache": "1.0.18",
|
|
6
|
+
"@tachybase/server": "1.0.18",
|
|
7
|
+
"@tachybase/utils": "1.0.18",
|
|
8
8
|
"react": "18.3.1",
|
|
9
9
|
"@ant-design/icons": "5.3.7",
|
|
10
10
|
"ahooks": "3.8.4",
|
|
11
11
|
"antd": "5.22.5",
|
|
12
12
|
"dayjs": "1.11.13",
|
|
13
|
-
"@tachybase/components": "1.0.
|
|
13
|
+
"@tachybase/components": "1.0.18",
|
|
14
14
|
"react-i18next": "15.2.0",
|
|
15
15
|
"sequelize": "6.37.5",
|
|
16
|
-
"@tachybase/actions": "1.0.
|
|
17
|
-
"@tachybase/database": "1.0.
|
|
16
|
+
"@tachybase/actions": "1.0.18",
|
|
17
|
+
"@tachybase/database": "1.0.18"
|
|
18
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"fs-extra","version":"11.2.0","description":"fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.","engines":{"node":">=14.14"},"homepage":"https://github.com/jprichardson/node-fs-extra","repository":{"type":"git","url":"https://github.com/jprichardson/node-fs-extra"},"keywords":["fs","file","file system","copy","directory","extra","mkdirp","mkdir","mkdirs","recursive","json","read","write","extra","delete","remove","touch","create","text","output","move","promise"],"author":"JP Richardson <jprichardson@gmail.com>","license":"MIT","dependencies":{"graceful-fs":"^4.2.0","jsonfile":"^6.0.1","universalify":"^2.0.0"},"devDependencies":{"klaw":"^2.1.1","klaw-sync":"^3.0.2","minimist":"^1.1.1","mocha":"^10.1.0","nyc":"^15.0.0","proxyquire":"^2.0.1","read-dir-files":"^0.1.1","standard":"^17.0.0"},"main":"./lib/index.js","exports":{".":"./lib/index.js","./esm":"./lib/esm.mjs"},"files":["lib/","!lib/**/__tests__/"],"scripts":{"lint":"standard","test-find":"find ./lib/**/__tests__ -name *.test.js | xargs mocha","test":"npm run lint && npm run unit && npm run unit-esm","unit":"nyc node test.js","unit-esm":"node test.mjs"},"sideEffects":false,"_lastModified":"2025-04-
|
|
1
|
+
{"name":"fs-extra","version":"11.2.0","description":"fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.","engines":{"node":">=14.14"},"homepage":"https://github.com/jprichardson/node-fs-extra","repository":{"type":"git","url":"https://github.com/jprichardson/node-fs-extra"},"keywords":["fs","file","file system","copy","directory","extra","mkdirp","mkdir","mkdirs","recursive","json","read","write","extra","delete","remove","touch","create","text","output","move","promise"],"author":"JP Richardson <jprichardson@gmail.com>","license":"MIT","dependencies":{"graceful-fs":"^4.2.0","jsonfile":"^6.0.1","universalify":"^2.0.0"},"devDependencies":{"klaw":"^2.1.1","klaw-sync":"^3.0.2","minimist":"^1.1.1","mocha":"^10.1.0","nyc":"^15.0.0","proxyquire":"^2.0.1","read-dir-files":"^0.1.1","standard":"^17.0.0"},"main":"./lib/index.js","exports":{".":"./lib/index.js","./esm":"./lib/esm.mjs"},"files":["lib/","!lib/**/__tests__/"],"scripts":{"lint":"standard","test-find":"find ./lib/**/__tests__ -name *.test.js | xargs mocha","test":"npm run lint && npm run unit && npm run unit-esm","unit":"nyc node test.js","unit-esm":"node test.mjs"},"sideEffects":false,"_lastModified":"2025-04-18T20:35:29.746Z"}
|
|
@@ -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":"2025-04-
|
|
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":"2025-04-18T20:35:29.407Z"}
|
|
@@ -15,3 +15,42 @@ BEGIN
|
|
|
15
15
|
RETURN formatted_text;
|
|
16
16
|
END;
|
|
17
17
|
$$ LANGUAGE plpgsql;
|
|
18
|
+
|
|
19
|
+
CREATE
|
|
20
|
+
OR REPLACE FUNCTION format_timestamp_with_timezone (
|
|
21
|
+
date_val TIME WITHOUT TIME ZONE,
|
|
22
|
+
timezone_val TEXT,
|
|
23
|
+
format_val TEXT
|
|
24
|
+
) RETURNS TEXT AS $$
|
|
25
|
+
BEGIN
|
|
26
|
+
RETURN format_timestamp_with_timezone(
|
|
27
|
+
NOW()::DATE + date_val, -- 把 time 转换为 timestamp
|
|
28
|
+
timezone_val,
|
|
29
|
+
format_val
|
|
30
|
+
);
|
|
31
|
+
END;
|
|
32
|
+
$$ LANGUAGE plpgsql;
|
|
33
|
+
|
|
34
|
+
CREATE
|
|
35
|
+
OR REPLACE FUNCTION format_timestamp_with_timezone (date_val TEXT, timezone_val TEXT, format_val TEXT) RETURNS TEXT AS $$
|
|
36
|
+
DECLARE
|
|
37
|
+
converted_timestamp TIMESTAMP WITH TIME ZONE;
|
|
38
|
+
formatted_text TEXT;
|
|
39
|
+
BEGIN
|
|
40
|
+
-- 解析输入格式
|
|
41
|
+
IF date_or_time ~ '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$' THEN
|
|
42
|
+
-- 处理完整的 TIMESTAMP
|
|
43
|
+
converted_timestamp := date_or_time::TIMESTAMP WITH TIME ZONE;
|
|
44
|
+
ELSIF date_or_time ~ '^\d{2}:\d{2}:\d{2}$' THEN
|
|
45
|
+
-- **修正的关键点**:确保 `DATE` 先转换为 `TIMESTAMP`
|
|
46
|
+
converted_timestamp := (CURRENT_DATE::TIMESTAMP + date_or_time::TIME) AT TIME ZONE timezone_val;
|
|
47
|
+
ELSE
|
|
48
|
+
RAISE EXCEPTION 'Invalid date_or_time format. Use "YYYY-MM-DD HH24:MI:SS" or "HH24:MI:SS".';
|
|
49
|
+
END IF;
|
|
50
|
+
|
|
51
|
+
-- 格式化最终的时间
|
|
52
|
+
formatted_text := to_char(converted_timestamp AT TIME ZONE timezone_val, format_val);
|
|
53
|
+
|
|
54
|
+
RETURN formatted_text;
|
|
55
|
+
END;
|
|
56
|
+
$$ LANGUAGE plpgsql;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/plugin-block-charts",
|
|
3
3
|
"displayName": "Block: charts",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.18",
|
|
5
5
|
"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.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Blocks"
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
"react-error-boundary": "^4.1.2",
|
|
24
24
|
"react-i18next": "^15.2.0",
|
|
25
25
|
"sequelize": "^6.37.5",
|
|
26
|
-
"@tachybase/
|
|
27
|
-
"@tachybase/
|
|
26
|
+
"@tachybase/components": "1.0.18",
|
|
27
|
+
"@tachybase/schema": "1.0.18"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@tachybase/actions": "1.0.
|
|
31
|
-
"@tachybase/cache": "1.0.
|
|
32
|
-
"@tachybase/client": "1.0.
|
|
33
|
-
"@tachybase/database": "1.0.
|
|
34
|
-
"@tachybase/server": "1.0.
|
|
35
|
-
"@tachybase/test": "1.0.
|
|
36
|
-
"@tachybase/utils": "1.0.
|
|
30
|
+
"@tachybase/actions": "1.0.18",
|
|
31
|
+
"@tachybase/cache": "1.0.18",
|
|
32
|
+
"@tachybase/client": "1.0.18",
|
|
33
|
+
"@tachybase/database": "1.0.18",
|
|
34
|
+
"@tachybase/server": "1.0.18",
|
|
35
|
+
"@tachybase/test": "1.0.18",
|
|
36
|
+
"@tachybase/utils": "1.0.18"
|
|
37
37
|
},
|
|
38
38
|
"description.zh-CN": "提供数据可视化功能,包含图表卡片和图表筛选卡片,支持折线图、面积图、柱状图等十几种图表,你也可以扩展更多图表类型。",
|
|
39
39
|
"displayName.zh-CN": "卡片:图表",
|