@tachybase/module-web 0.23.22 → 0.23.35

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.
Files changed (25) hide show
  1. package/dist/client/assistant-tool/Designable/DesignableButtonProvider.d.ts +1 -0
  2. package/dist/client/assistant-tool/Designable/plugin.d.ts +5 -0
  3. package/dist/client/assistant-tool/calculator/AutoScalingText.d.ts +3 -0
  4. package/dist/client/assistant-tool/calculator/Calculator.d.ts +2 -0
  5. package/dist/client/assistant-tool/calculator/CalculatorDisplay.d.ts +4 -0
  6. package/dist/client/assistant-tool/calculator/CalculatorKey.d.ts +5 -0
  7. package/dist/client/assistant-tool/calculator/CalculatorModalProvider.d.ts +9 -0
  8. package/dist/client/assistant-tool/calculator/CalculatorProvider.d.ts +1 -0
  9. package/dist/client/assistant-tool/calculator/Draggable.d.ts +8 -0
  10. package/dist/client/assistant-tool/calculator/plugin.d.ts +5 -0
  11. package/dist/client/assistant-tool/calculator/style.d.ts +3 -0
  12. package/dist/client/assistant-tool/search-and-jump/SearchAndJumpModelProvider.d.ts +16 -0
  13. package/dist/client/assistant-tool/search-and-jump/SearchAndJumpProvider.d.ts +1 -0
  14. package/dist/client/assistant-tool/search-and-jump/plugin.d.ts +5 -0
  15. package/dist/client/core/schema/components/antd-mobile/DatePicker/DatePicker.d.ts +1 -2
  16. package/dist/client/index.js +148 -52
  17. package/dist/externalVersion.js +8 -7
  18. package/dist/locale/en_US.js +8 -0
  19. package/dist/locale/zh-CN.js +8 -0
  20. package/dist/node_modules/cronstrue/package.json +1 -1
  21. package/dist/server/cron.js +1 -1
  22. package/dist/server/migrations/20250114140330-update-uiSchemas.d.ts +6 -0
  23. package/dist/server/migrations/20250114140330-update-uiSchemas.js +51 -0
  24. package/dist/server/server.js +6 -5
  25. package/package.json +9 -9
@@ -1,16 +1,17 @@
1
1
  module.exports = {
2
2
  "react": "18.3.1",
3
- "@tachybase/client": "0.23.22",
3
+ "@tachybase/client": "0.23.35",
4
4
  "react-router-dom": "6.28.1",
5
5
  "@ant-design/icons": "5.3.7",
6
6
  "antd": "5.22.5",
7
- "@tachybase/utils": "0.23.22",
8
- "@tachybase/actions": "0.23.22",
9
- "@tachybase/server": "0.23.22",
7
+ "@tachybase/utils": "0.23.35",
8
+ "@tachybase/actions": "0.23.35",
9
+ "@tachybase/server": "0.23.35",
10
10
  "react-i18next": "15.1.4",
11
- "@tachybase/schema": "0.23.22",
11
+ "@tachybase/schema": "0.23.35",
12
12
  "lodash": "4.17.21",
13
- "@tachybase/database": "0.23.22",
13
+ "@tachybase/database": "0.23.35",
14
+ "react-dom": "18.3.1",
14
15
  "ahooks": "3.8.4",
15
- "@tachybase/components": "0.23.22"
16
+ "@tachybase/components": "0.23.35"
16
17
  };
@@ -98,6 +98,7 @@ module.exports = {
98
98
  "Area chart": "Area chart",
99
99
  "Assign data scope for the template": "Assign data scope for the template",
100
100
  "Assign field values": "Assign field values",
101
+ Associate: "Associate",
101
102
  "Associated records": "Associated records",
102
103
  "Association fields": "Association fields",
103
104
  "Association fields filter": "Association fields filter",
@@ -106,6 +107,7 @@ module.exports = {
106
107
  "Auto increment": "Auto increment",
107
108
  AutoGenId: "Auto-generated ID field",
108
109
  "Automatic close": "Automatic close",
110
+ "Automatically assign permissions to all matching roles": "Automatically assign permissions to all matching roles",
109
111
  "Automatically drop objects that depend on the collection (such as views), and in turn all objects that depend on those objects": "Automatically drop objects that depend on the collection (such as views), and in turn all objects that depend on those objects",
110
112
  "Automatically load data": "Automatically load data",
111
113
  "Bar chart": "Bar chart",
@@ -187,8 +189,11 @@ module.exports = {
187
189
  "Create collection": "Create collection",
188
190
  "Create form": "Create form",
189
191
  "Create gantt block": "Create gantt block",
192
+ "Create group": "Create group",
190
193
  "Create inverse field in the target collection": "Create inverse field in the target collection",
191
194
  "Create kanban block": "Create kanban block",
195
+ "Create link": "Create link",
196
+ "Create page": "Create page",
192
197
  "Create template": "Create template",
193
198
  "Created at": "Created at",
194
199
  "Created by": "Created by",
@@ -465,6 +470,7 @@ module.exports = {
465
470
  List: "List",
466
471
  Load: "Load",
467
472
  "Load data after filtering": "Load data after filtering",
473
+ "Load menu config": "Load menu config",
468
474
  Local: "Local",
469
475
  "Log in with an existing account": "Log in with an existing account",
470
476
  Logo: "Logo",
@@ -501,6 +507,7 @@ module.exports = {
501
507
  "Mobile UI": "Mobile UI",
502
508
  "Mobile client access address": "Mobile client access address",
503
509
  "Modal add": "Modal add",
510
+ "Modify the name and icon": "Modify the name and icon",
504
511
  Month: "Month",
505
512
  Monthly: "Monthly",
506
513
  "More details": "More details",
@@ -878,6 +885,7 @@ module.exports = {
878
885
  pixels: "pixels",
879
886
  "please enter the date": "please enter the date",
880
887
  "re-download file": "re-download file",
888
+ "search Menu": "Search Menu",
881
889
  sort: "sort",
882
890
  "starts with": "starts with",
883
891
  tabs: "tabs",
@@ -111,6 +111,7 @@ module.exports = {
111
111
  "Area chart": "\u9762\u79EF\u56FE",
112
112
  "Assign data scope for the template": "\u4E3A\u6A21\u677F\u6307\u5B9A\u6570\u636E\u8303\u56F4",
113
113
  "Assign field values": "\u5B57\u6BB5\u8D4B\u503C",
114
+ Associate: "\u5173\u8054",
114
115
  "Associated records": "\u5173\u8054\u8BB0\u5F55",
115
116
  "Association fields": "\u5173\u7CFB\u5B57\u6BB5",
116
117
  "Association fields filter": "\u5173\u7CFB\u7B5B\u9009",
@@ -121,6 +122,7 @@ module.exports = {
121
122
  "Auto increment": "\u81EA\u52A8\u589E\u957F",
122
123
  AutoComplete: "\u8F93\u5165\u6846(\u81EA\u52A8\u8865\u5168)",
123
124
  "Automatic close": "\u81EA\u52A8\u5173\u95ED",
125
+ "Automatically assign permissions to all matching roles": "\u81EA\u52A8\u7ED9\u6240\u6709\u7B26\u5408\u7684\u89D2\u8272\u5206\u914D\u6743\u9650",
124
126
  "Automatically drop objects that depend on the collection (such as views), and in turn all objects that depend on those objects": "\u81EA\u52A8\u5220\u9664\u4F9D\u8D56\u4E8E\u8BE5\u8868\u7684\u5BF9\u8C61,\u4EE5\u53CA\u4F9D\u8D56\u8FD9\u4E9B\u5BF9\u8C61\u7684\u5BF9\u8C61",
125
127
  "Automatically load data": "\u81EA\u52A8\u52A0\u8F7D\u6570\u636E",
126
128
  "Back Home": "\u56DE\u5230\u4E3B\u9875",
@@ -217,8 +219,11 @@ module.exports = {
217
219
  "Create collection": "\u521B\u5EFA\u6570\u636E\u8868",
218
220
  "Create form": "\u521B\u5EFA\u8868\u5355",
219
221
  "Create gantt block": "\u521B\u5EFA\u7518\u7279\u56FE\u5361\u7247",
222
+ "Create group": "\u65B0\u5EFA\u5206\u7EC4",
220
223
  "Create inverse field in the target collection": "\u5728\u76EE\u6807\u6570\u636E\u8868\u91CC\u521B\u5EFA\u53CD\u5411\u5173\u7CFB\u5B57\u6BB5",
221
224
  "Create kanban block": "\u521B\u5EFA\u770B\u677F\u5361\u7247",
225
+ "Create link": "\u65B0\u5EFA\u94FE\u63A5",
226
+ "Create page": "\u65B0\u5EFA\u9875\u9762",
222
227
  "Create template": "\u521B\u5EFA\u6A21\u677F",
223
228
  "Created at": "\u521B\u5EFA\u65E5\u671F",
224
229
  "Created by": "\u521B\u5EFA\u4EBA",
@@ -535,6 +540,7 @@ module.exports = {
535
540
  List: "\u5217\u8868",
536
541
  Load: "\u52A0\u8F7D",
537
542
  "Load data after filtering": "\u7B5B\u9009\u540E\u624D\u52A0\u8F7D\u6570\u636E",
543
+ "Load menu config": "\u52A0\u8F7D\u83DC\u5355\u914D\u7F6E",
538
544
  Local: "\u672C\u5730",
539
545
  "Log in with an existing account": "\u4F7F\u7528\u5DF2\u6709\u8D26\u53F7\u767B\u5F55",
540
546
  "Logging and monitoring": "\u65E5\u5FD7\u4E0E\u76D1\u63A7",
@@ -576,6 +582,7 @@ module.exports = {
576
582
  "Mobile UI": "\u79FB\u52A8\u7AEF\u9875\u9762",
577
583
  "Mobile client access address": "\u79FB\u52A8\u7AEF\u8BBF\u95EE\u5730\u5740",
578
584
  "Modal add": "\u5F39\u7A97\u6DFB\u52A0",
585
+ "Modify the name and icon": "\u4FEE\u6539\u540D\u79F0\u548C\u56FE\u6807",
579
586
  Month: "\u6708",
580
587
  Monthly: "\u6BCF\u6708",
581
588
  "More details": "\u66F4\u591A\u8BE6\u60C5",
@@ -1015,6 +1022,7 @@ module.exports = {
1015
1022
  pixels: "\u50CF\u7D20",
1016
1023
  "please enter the date": "\u8BF7\u8F93\u5165\u65E5\u671F",
1017
1024
  "re-download file": "\u91CD\u65B0\u4E0B\u8F7D\u6587\u4EF6",
1025
+ "search Menu": "\u641C\u7D22\u83DC\u5355",
1018
1026
  sort: "\u6392\u5E8F",
1019
1027
  "starts with": "\u5F00\u5934\u662F",
1020
1028
  tabs: "\u6807\u7B7E",
@@ -1 +1 @@
1
- {"name":"cronstrue","title":"cRonstrue","version":"2.52.0","description":"Convert cron expressions into human readable descriptions","author":"Brady Holt","license":"MIT","bugs":{"url":"https://github.com/bradymholt/cronstrue/issues"},"homepage":"https://github.com/bradymholt/cronstrue","keywords":["cron","cronjob","crontab","schedule","parser","cron expression","cron description","pretty cron","cron for humans","cron translated","cron english","cron schedule","cron english","cron schedule"],"main":"dist/cronstrue.js","bin":{"cronstrue":"bin/cli.js"},"typings":"dist/cronstrue.d.ts","files":["dist/","locales/","i18n.js","i18n.d.ts"],"repository":{"type":"git","url":"git+https://github.com/bradymholt/cronstrue.git"},"publishConfig":{"access":"public"},"prettier":{"printWidth":120},"devDependencies":{"@types/chai":"^4.2.11","@types/mocha":"^8.0.0","chai":"^4.2.0","handlebars":"^4.7.6","marked":"^4.0.10","mocha":"^10.1.0","pixl-xml":"^1.0.13","prettier":"^2.1.1","terser-webpack-plugin":"^5.3.1","ts-loader":"^9.2.6","ts-node":"^10.5.0","typescript":"^4.6.2","webpack":"^5.69.1","webpack-cli":"^4.9.2","xml2js":"^0.5.0"},"scripts":{"start":"npm run build","build":"npx tsc -p ./src --emitDeclarationOnly","test":"npx mocha --reporter spec --require ts-node/register \"./test/**/*.ts\"","prepublishOnly":"rm -rf ./dist && ./node_modules/webpack-cli/bin/cli.js && git add -A"},"dependencies":{},"_lastModified":"2024-12-30T04:21:41.191Z"}
1
+ {"name":"cronstrue","title":"cRonstrue","version":"2.52.0","description":"Convert cron expressions into human readable descriptions","author":"Brady Holt","license":"MIT","bugs":{"url":"https://github.com/bradymholt/cronstrue/issues"},"homepage":"https://github.com/bradymholt/cronstrue","keywords":["cron","cronjob","crontab","schedule","parser","cron expression","cron description","pretty cron","cron for humans","cron translated","cron english","cron schedule","cron english","cron schedule"],"main":"dist/cronstrue.js","bin":{"cronstrue":"bin/cli.js"},"typings":"dist/cronstrue.d.ts","files":["dist/","locales/","i18n.js","i18n.d.ts"],"repository":{"type":"git","url":"git+https://github.com/bradymholt/cronstrue.git"},"publishConfig":{"access":"public"},"prettier":{"printWidth":120},"devDependencies":{"@types/chai":"^4.2.11","@types/mocha":"^8.0.0","chai":"^4.2.0","handlebars":"^4.7.6","marked":"^4.0.10","mocha":"^10.1.0","pixl-xml":"^1.0.13","prettier":"^2.1.1","terser-webpack-plugin":"^5.3.1","ts-loader":"^9.2.6","ts-node":"^10.5.0","typescript":"^4.6.2","webpack":"^5.69.1","webpack-cli":"^4.9.2","xml2js":"^0.5.0"},"scripts":{"start":"npm run build","build":"npx tsc -p ./src --emitDeclarationOnly","test":"npx mocha --reporter spec --require ts-node/register \"./test/**/*.ts\"","prepublishOnly":"rm -rf ./dist && ./node_modules/webpack-cli/bin/cli.js && git add -A"},"dependencies":{},"_lastModified":"2025-01-16T06:23:37.486Z"}
@@ -24,7 +24,7 @@ var import_path = require("path");
24
24
  var import_utils = require("@tachybase/utils");
25
25
  const getCronLocale = (lang) => {
26
26
  const lng = lang.replace("-", "_");
27
- const files = [(0, import_path.resolve)(__dirname, `./../locale/cron/${lng}`)];
27
+ const files = [(0, import_path.resolve)(__dirname, `./../../../client/src/locale/cron/${lng}`)];
28
28
  if (process.env.APP_ENV !== "production") {
29
29
  files.push(`@tachybase/client/src/locale/cron/${lng}`, `@tachybase/client/lib/locale/cron/${lng}`);
30
30
  }
@@ -0,0 +1,6 @@
1
+ import { Migration } from '@tachybase/server';
2
+ export default class extends Migration {
3
+ on: string;
4
+ appVersion: string;
5
+ up(): Promise<void>;
6
+ }
@@ -0,0 +1,51 @@
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 update_uiSchemas_exports = {};
19
+ __export(update_uiSchemas_exports, {
20
+ default: () => update_uiSchemas_default
21
+ });
22
+ module.exports = __toCommonJS(update_uiSchemas_exports);
23
+ var import_server = require("@tachybase/server");
24
+ class update_uiSchemas_default extends import_server.Migration {
25
+ on = "afterLoad";
26
+ // 'beforeLoad' or 'afterLoad'
27
+ appVersion = "<0.23.35";
28
+ async up() {
29
+ const uiSchemasRepo = this.db.getRepository("uiSchemas");
30
+ await uiSchemasRepo.update({
31
+ filter: {
32
+ "x-uid": "default-admin-menu"
33
+ },
34
+ values: {
35
+ schema: {
36
+ type: "void",
37
+ "x-designer": "Menu.Designer",
38
+ "x-initializer": "menuInitializers:menuItem",
39
+ "x-component": "Menu",
40
+ "x-component-props": {
41
+ mode: "mix",
42
+ theme: "dark",
43
+ onSelect: "{{ onSelect }}",
44
+ sideMenuRefScopeKey: "sideMenuRef"
45
+ }
46
+ }
47
+ }
48
+ });
49
+ this.app.logger.info(`collection [uiSchemas] update ${1} rows`);
50
+ }
51
+ }
@@ -47,14 +47,15 @@ class ModuleWeb extends import_server.Plugin {
47
47
  await uiSchemas.insert({
48
48
  type: "void",
49
49
  "x-uid": "default-admin-menu",
50
- "x-component": "Menu",
51
50
  "x-designer": "Menu.Designer",
52
- "x-initializer": "MenuItemInitializers",
51
+ "x-initializer": "menuInitializers:menuItem",
52
+ "x-component": "Menu",
53
53
  "x-component-props": {
54
54
  mode: "mix",
55
55
  theme: "dark",
56
56
  onSelect: "{{ onSelect }}",
57
- sideMenuRefScopeKey: "sideMenuRef"
57
+ sideMenuRefScopeKey: "sideMenuRef",
58
+ isRootMenu: true
58
59
  },
59
60
  properties: {}
60
61
  });
@@ -126,11 +127,11 @@ class ModuleWeb extends import_server.Plugin {
126
127
  const eTag = await app.localeManager.getETag(lang);
127
128
  const resources = await app.localeManager.get(lang);
128
129
  const requestETag = ctx.get("If-None-Match");
129
- if (eTag && eTag === requestETag.substring(0, 36)) {
130
+ if (eTag && eTag === requestETag.substring(0 + 2, 36 + 2)) {
130
131
  ctx.status = 304;
131
132
  ctx.res.setHeader("ETag", requestETag);
132
133
  } else {
133
- const newTag = `${eTag}-${requestETag.substring(36 + 1)}`;
134
+ const newTag = `W/${eTag}-${requestETag.substring(36 + 1 + 2)}`;
134
135
  ctx.res.setHeader("ETag", newTag);
135
136
  }
136
137
  ctx.body = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/module-web",
3
3
  "displayName": "WEB client",
4
- "version": "0.23.22",
4
+ "version": "0.23.35",
5
5
  "description": "Provides a client interface for the TachyBase server",
6
6
  "license": "Apache-2.0",
7
7
  "main": "./dist/server/index.js",
@@ -22,16 +22,16 @@
22
22
  "react-dom": "~18.3.1",
23
23
  "react-i18next": "~15.1.4",
24
24
  "react-router-dom": "6.28.1",
25
- "@tachybase/components": "0.23.22",
26
- "@tachybase/schema": "0.23.22"
25
+ "@tachybase/components": "0.23.35",
26
+ "@tachybase/schema": "0.23.35"
27
27
  },
28
28
  "peerDependencies": {
29
- "@tachybase/actions": "0.23.22",
30
- "@tachybase/client": "0.23.22",
31
- "@tachybase/server": "0.23.22",
32
- "@tachybase/test": "0.23.22",
33
- "@tachybase/database": "0.23.22",
34
- "@tachybase/utils": "0.23.22"
29
+ "@tachybase/actions": "0.23.35",
30
+ "@tachybase/client": "0.23.35",
31
+ "@tachybase/database": "0.23.35",
32
+ "@tachybase/server": "0.23.35",
33
+ "@tachybase/test": "0.23.35",
34
+ "@tachybase/utils": "0.23.35"
35
35
  },
36
36
  "description.zh-CN": "为 TachyBase 服务端提供客户端界面",
37
37
  "displayName.zh-CN": "WEB 客户端",