@nocobase/plugin-client 2.2.0-beta.9 → 3.0.0-alpha.1

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.
@@ -10,13 +10,13 @@
10
10
  module.exports = {
11
11
  "react": "18.2.0",
12
12
  "react-i18next": "11.18.6",
13
- "@nocobase/client": "2.2.0-beta.9",
13
+ "@nocobase/client": "3.0.0-alpha.1",
14
14
  "antd": "5.24.2",
15
15
  "@ant-design/icons": "5.6.1",
16
16
  "@formily/react": "2.3.7",
17
- "@nocobase/utils": "2.2.0-beta.9",
17
+ "@nocobase/utils": "3.0.0-alpha.1",
18
18
  "lodash": "4.18.1",
19
- "@nocobase/database": "2.2.0-beta.9",
20
- "@nocobase/client-v2": "2.2.0-beta.9",
21
- "@nocobase/server": "2.2.0-beta.9"
19
+ "@nocobase/database": "3.0.0-alpha.1",
20
+ "@nocobase/client-v2": "3.0.0-alpha.1",
21
+ "@nocobase/server": "3.0.0-alpha.1"
22
22
  };
@@ -72,6 +72,8 @@
72
72
  "Advanced type": "Advanced",
73
73
  "No available title fields": "No available title fields",
74
74
  "Please choose a different title field before syncing": "Please choose a different title field before syncing",
75
+ "Other settings": "Other settings",
76
+ "Settings center": "Settings",
75
77
  "Sync selected title field to collection": "Sync selected title field to collection",
76
78
  "Sync title field": "Sync title field",
77
79
  "This will update the collection title field globally. Continue?": "This will update the collection title field globally. Continue?",
@@ -205,6 +207,7 @@
205
207
  "Block templates": "Block templates",
206
208
  "Block title": "Block title",
207
209
  "Menu linkage rules": "Menu linkage rules",
210
+ "Tab linkage rules": "Tab linkage rules",
208
211
  "Built-in flow": "Specific flow",
209
212
  "Built-in flow step": "Specific flow step",
210
213
  "Block type": "Block type",
@@ -874,6 +877,7 @@
874
877
  "Move up": "Move up",
875
878
  "Move {{title}} to": "Move {{title}} to",
876
879
  "Multiple": "Multiple",
880
+ "Multiple of": "Multiple of",
877
881
  "Multiple select": "Multiple select",
878
882
  "Multiply by": "Multiply by",
879
883
  "Must be 1-50 characters in length (excluding @.<>\"'/)": "Must be 1-50 characters in length (excluding @.<>\"'/)",
@@ -960,6 +964,7 @@
960
964
  "Open in new window": "Open in new window",
961
965
  "Open in<1><0>Modal</0><1>Drawer</1><2>Window</2></1>": "Open in<1><0>Modal</0><1>Drawer</1><2>Window</2></1>",
962
966
  "Open classic page access": "Open classic page access",
967
+ "Open from the original entry": "Open from the original entry",
963
968
  "Open mode": "Open mode",
964
969
  "Open mode configuration": "Open mode configuration",
965
970
  "Operate on existing data": "Operate on existing data",
@@ -1259,6 +1264,7 @@
1259
1264
  "Set block state": "Set block state",
1260
1265
  "Set button state": "Set button state",
1261
1266
  "Set menu item state": "Set menu item state",
1267
+ "Set tab state": "Set tab state",
1262
1268
  "Set condition": "Set condition",
1263
1269
  "Set data loading mode": "Set data loading mode",
1264
1270
  "Set data scope": "Set data scope",
@@ -1412,6 +1418,7 @@
1412
1418
  "The following field types are not compatible and do not support output and display": "The following field types are not compatible and do not support output and display",
1413
1419
  "The selected fields will automatically populate the form": "The selected fields will automatically populate the form",
1414
1420
  "The title field is used to identify the template record": "The title field is used to identify the template record",
1421
+ "The {{modernClientPath}} branch only supports new pages. This page is a legacy page. Please open it from the original entry.": "The {{modernClientPath}} branch only supports new pages. This page is a legacy page. Please open it from the original entry.",
1415
1422
  "The value of this variable is derived from the query string of the page URL. This variable can only be used normally when the page has a query string.": "The value of this variable is derived from the query string of the page URL. This variable can only be used normally when the page has a query string.",
1416
1423
  "The will interrupt service, it may take a few seconds to restart. Are you sure to continue?": "The will interrupt service, it may take a few seconds to restart. Are you sure to continue?",
1417
1424
  "The {{type}} \"{{name}}\" may have been deleted. Please remove this {{blockType}}.": "The {{type}} \"{{name}}\" may have been deleted. Please remove this {{blockType}}.",
@@ -1428,6 +1435,7 @@
1428
1435
  "This field is required": "This field is required",
1429
1436
  "This is a demo text, **supports Markdown syntax**.": "This is a demo text, **supports Markdown syntax**.",
1430
1437
  "This is likely a NocoBase internals bug. Please open an issue at <1>here</1>": "This is likely a NocoBase internals bug. Please open an issue at <1>here</1>",
1438
+ "This page is not supported in the {{modernClientPath}} branch": "This page is not supported in the {{modernClientPath}} branch",
1431
1439
  "This month": "This month",
1432
1440
  "This quarter": "This quarter",
1433
1441
  "This variable has been deprecated and can be replaced with \"Current form\"": "This variable has been deprecated and can be replaced with \"Current form\"",
@@ -75,6 +75,7 @@ const dayjsLocale = {
75
75
  "ml-IN": "ml",
76
76
  "mn-MN": "mn",
77
77
  "ms-MY": "ms",
78
+ "my-MM": "my",
78
79
  "nb-NO": "nb",
79
80
  "ne-NP": "ne",
80
81
  "nl-BE": "nl-be",
@@ -144,6 +145,7 @@ const languageCodes = {
144
145
  "ml-IN": { label: "\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02" },
145
146
  "mn-MN": { label: "\u041C\u043E\u043D\u0433\u043E\u043B \u0445\u044D\u043B" },
146
147
  "ms-MY": { label: "\u0628\u0647\u0627\u0633 \u0645\u0644\u0627\u064A\u0648" },
148
+ "my-MM": { label: "\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C" },
147
149
  "nb-NO": { label: "Norsk bokm\xE5l" },
148
150
  "ne-NP": { label: "\u0928\u0947\u092A\u093E\u0932\u0940" },
149
151
  "nl-BE": { label: "Vlaams" },
@@ -163,7 +165,8 @@ const languageCodes = {
163
165
  "tk-TK": { label: "Turkmen" },
164
166
  "tr-TR": { label: "T\xFCrk\xE7e" },
165
167
  "uk-UA": { label: "\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430" },
166
- "ur-PK": { label: "O\u02BBzbekcha" },
168
+ "ur-PK": { label: "\u0627\u0631\u062F\u0648" },
169
+ "uz-UZ": { label: "O\u02BBzbekcha" },
167
170
  "vi-VN": { label: "Ti\u1EBFng Vi\u1EC7t" },
168
171
  "zh-CN": { label: "\u7B80\u4F53\u4E2D\u6587" },
169
172
  "zh-HK": { label: "\u7E41\u9AD4\u4E2D\u6587\uFF08\u9999\u6E2F\uFF09" },
@@ -72,6 +72,8 @@
72
72
  "Advanced type": "高级类型",
73
73
  "No available title fields": "无可用标题字段",
74
74
  "Please choose a different title field before syncing": "请先选择不同的标题字段再同步",
75
+ "Other settings": "其他设置",
76
+ "Settings center": "设置中心",
75
77
  "Sync selected title field to collection": "将所选标题字段同步到数据表",
76
78
  "Sync title field": "同步标题字段",
77
79
  "This will update the collection title field globally. Continue?": "这将全局更新数据表的标题字段。是否继续?",
@@ -205,6 +207,7 @@
205
207
  "Block templates": "区块模板",
206
208
  "Block title": "区块标题",
207
209
  "Menu linkage rules": "菜单联动规则",
210
+ "Tab linkage rules": "标签页联动规则",
208
211
  "Block type": "区块类型",
209
212
  "Blocks": "区块",
210
213
  "Blue": "拂晓蓝",
@@ -795,7 +798,7 @@
795
798
  "Left fixed": "左固定",
796
799
  "Length": "长度",
797
800
  "Less than": "小于",
798
- "License": "许可证",
801
+ "License": "许可协议",
799
802
  "Lime": "青柠",
800
803
  "Limit": "限制",
801
804
  "Line break": "换行",
@@ -958,6 +961,7 @@
958
961
  "Open in new window": "新窗口打开",
959
962
  "Open in<1><0>Modal</0><1>Drawer</1><2>Window</2></1>": "在 <1><0>对话框</0><1>抽屉</1><2>窗口</2></1> 内打开",
960
963
  "Open classic page access": "跳转到旧版页面",
964
+ "Open from the original entry": "返回原入口访问",
961
965
  "Open mode": "打开方式",
962
966
  "Open mode configuration": "打开方式配置",
963
967
  "Operate on existing data": "对已有数据操作",
@@ -1259,6 +1263,7 @@
1259
1263
  "Set block state": "设置区块状态",
1260
1264
  "Set button state": "设置按钮状态",
1261
1265
  "Set menu item state": "设置菜单项状态",
1266
+ "Set tab state": "设置标签页状态",
1262
1267
  "Set condition": "设置条件",
1263
1268
  "Set data loading mode": "设置数据加载方式",
1264
1269
  "Set data scope": "设置数据范围",
@@ -1414,6 +1419,7 @@
1414
1419
  "The following field types are not compatible and do not support output and display": "以下字段类型未适配,不支持输出和显示",
1415
1420
  "The selected fields will automatically populate the form": "用于自动填充到表单",
1416
1421
  "The title field is used to identify the template record": "用于识别模板数据",
1422
+ "The {{modernClientPath}} branch only supports new pages. This page is a legacy page. Please open it from the original entry.": "{{modernClientPath}} 分支仅支持新版页面,当前页面属于旧版页面。请返回原入口访问。",
1417
1423
  "The value of this variable is derived from the query string of the page URL. This variable can only be used normally when the page has a query string.": "该变量的值是根据页面 URL 的 query string 得来的,只有当页面存在 query string 的时候,该变量才能正常使用。",
1418
1424
  "The will interrupt service, it may take a few seconds to restart. Are you sure to continue?": "重启将会中断当前服务,这个过程可能需要一点时间,确定要继续吗?",
1419
1425
  "The {{type}} \"{{name}}\" may have been deleted. Please remove this {{blockType}}.": "{{type}} \"{{name}}\" 可能已被删除。请删除当前{{blockType}}.",
@@ -1430,6 +1436,7 @@
1430
1436
  "This field is required": "此字段为必填项",
1431
1437
  "This is a demo text, **supports Markdown syntax**.": "这是一段演示文本,**支持 Markdown 语法**。",
1432
1438
  "This is likely a NocoBase internals bug. Please open an issue at <1>here</1>": "这可能是 NocoBase 内部的问题,你可以在<1>这里</1>将该错误反馈给我们,我们会尽快修复",
1439
+ "This page is not supported in the {{modernClientPath}} branch": "此页面不支持在 {{modernClientPath}} 分支中使用",
1433
1440
  "This month": "本月",
1434
1441
  "This quarter": "本季度",
1435
1442
  "This variable has been deprecated and can be replaced with \"Current form\"": "该变量已被弃用,可以使用“当前表单”替代",
@@ -1634,6 +1641,7 @@
1634
1641
  "Enable select action": "启用选择操作",
1635
1642
  "Enable remove action": "启用移除操作",
1636
1643
  "Multiple": "多选",
1644
+ "Multiple of": "多倍数",
1637
1645
  "Custom column width": "自定义列宽度",
1638
1646
  "The block is hidden and only visible when the UI Editor is active": "当前区块已被隐藏,仅配置状态下显示",
1639
1647
  "The field is hidden and only visible when the UI Editor is active": "当前字段已被隐藏,仅配置状态下显示",
@@ -1650,18 +1658,18 @@
1650
1658
  "Popup select": "弹窗选择",
1651
1659
  "File picker": "文件选择",
1652
1660
  "Cascader": "级联选择",
1653
- "Subform":"子表单",
1654
- "Edit popup (Add new)":"编辑弹窗(添加)",
1655
- "Are you sure you want to remove it?":"你确定要移除吗?",
1656
- "Create record":"创建记录",
1657
- "Duplicate record":"复制记录",
1658
- "Are you sure you want to duplicate it?":"你确定要复制吗?",
1661
+ "Subform": "子表单",
1662
+ "Edit popup (Add new)": "编辑弹窗(添加)",
1663
+ "Are you sure you want to remove it?": "你确定要移除吗?",
1664
+ "Create record": "创建记录",
1665
+ "Duplicate record": "复制记录",
1666
+ "Are you sure you want to duplicate it?": "你确定要复制吗?",
1659
1667
  "Edit page": "编辑页面",
1660
1668
  "Page title": "页面标题",
1661
1669
  "Document title": "文档标题",
1662
- "Edit popup (Select record)":"编辑弹窗(选择纪录)",
1663
- "Remove record":"移除记录",
1664
- "Block height":"区块高度",
1670
+ "Edit popup (Select record)": "编辑弹窗(选择纪录)",
1671
+ "Remove record": "移除记录",
1672
+ "Block height": "区块高度",
1665
1673
  "Height": "高度",
1666
1674
  "Compatible": "兼容",
1667
1675
  "Current settings page is unavailable": "当前设置页不可用",
@@ -1669,5 +1677,9 @@
1669
1677
  "Failed to load system settings": "加载系统设置失败",
1670
1678
  "No settings pages are currently available in Client V2. Settings registered by migrated plugins will appear here automatically.": "当前 Client V2 中还没有可用的设置页。已迁移插件注册的设置页会自动出现在这里。",
1671
1679
  "No settings pages available": "暂无可用设置页",
1672
- "The requested settings page does not exist or you do not have permission to access it.": "请求的设置页不存在,或者你没有访问权限。"
1680
+ "The requested settings page does not exist or you do not have permission to access it.": "请求的设置页不存在,或者你没有访问权限。",
1681
+ "Applications": "应用",
1682
+ "Search settings": "搜索设置",
1683
+ "Recently visited": "最近访问",
1684
+ "No matching settings": "没有匹配的设置项"
1673
1685
  }
@@ -1 +1 @@
1
- {"name":"cronstrue","title":"cRonstrue","version":"2.47.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":"2026-07-06T02:55:10.251Z"}
1
+ {"name":"cronstrue","title":"cRonstrue","version":"2.47.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":"2026-07-30T03:55:29.603Z"}
@@ -22,11 +22,11 @@ export type AppPortalItem = {
22
22
  appName: string;
23
23
  title?: string | null;
24
24
  icon?: string | null;
25
+ portalType?: string | null;
25
26
  routePath: string;
26
27
  layout?: string | null;
27
- defaultPortal?: boolean;
28
28
  };
29
- export type StoredAppPortalItem = Omit<AppPortalItem, 'appName' | 'defaultPortal'>;
29
+ export type StoredAppPortalItem = Omit<AppPortalItem, 'appName'>;
30
30
  export declare function listAppPortals(currentAppName?: string | null): Promise<{
31
31
  apps: AppPortalAppItem[];
32
32
  portals: AppPortalItem[];
@@ -32,24 +32,6 @@ module.exports = __toCommonJS(appPortals_exports);
32
32
  var import_server = require("@nocobase/server");
33
33
  const MAIN_APP_NAME = "main";
34
34
  const MULTI_PORTAL_MANIFEST_NAMESPACE = "multi-portal";
35
- const DEFAULT_PORTALS = [
36
- {
37
- uid: "__default_admin__",
38
- title: "Admin",
39
- icon: "DesktopOutlined",
40
- routePath: "/admin",
41
- layout: "desktop",
42
- defaultPortal: true
43
- },
44
- {
45
- uid: "__default_mobile__",
46
- title: "Mobile",
47
- icon: "MobileOutlined",
48
- routePath: "/mobile",
49
- layout: "mobile",
50
- defaultPortal: true
51
- }
52
- ];
53
35
  function getCname(cname) {
54
36
  const trimmed = cname == null ? void 0 : cname.trim();
55
37
  return trimmed || null;
@@ -91,16 +73,6 @@ function addPortal(portals, item) {
91
73
  }
92
74
  portals.set(getPortalKey(item), item);
93
75
  }
94
- function addDefaultPortals(portals, appNames) {
95
- for (const appName of appNames) {
96
- for (const portal of DEFAULT_PORTALS) {
97
- addPortal(portals, {
98
- ...portal,
99
- appName
100
- });
101
- }
102
- }
103
- }
104
76
  function addStoredPortals(portals, appName, storedPortals) {
105
77
  if (!Array.isArray(storedPortals)) {
106
78
  return;
@@ -114,6 +86,7 @@ function addStoredPortals(portals, appName, storedPortals) {
114
86
  appName,
115
87
  title: typeof portal.title === "string" ? portal.title : null,
116
88
  icon: typeof portal.icon === "string" ? portal.icon : null,
89
+ portalType: typeof portal.portalType === "string" ? portal.portalType : null,
117
90
  routePath: portal.routePath,
118
91
  layout: typeof portal.layout === "string" ? portal.layout : null
119
92
  });
@@ -153,7 +126,6 @@ async function listAppPortals(currentAppName) {
153
126
  Array.from(appNames)
154
127
  );
155
128
  const portals = /* @__PURE__ */ new Map();
156
- addDefaultPortals(portals, appNames);
157
129
  for (const appName of appNames) {
158
130
  addStoredPortals(portals, appName, manifests[appName]);
159
131
  }
@@ -32,10 +32,12 @@ module.exports = __toCommonJS(cron_exports);
32
32
  var import_utils = require("@nocobase/utils");
33
33
  var import_path = require("path");
34
34
  const getCronLocale = (lang) => {
35
- const lng = lang.replace("-", "_");
36
- const files = [(0, import_path.resolve)(__dirname, `./../locale/cron/${lng}`)];
35
+ const candidates = Array.from(/* @__PURE__ */ new Set([lang, lang.replace("-", "_")]));
36
+ const files = candidates.map((candidate) => (0, import_path.resolve)(__dirname, `./../locale/cron/${candidate}`));
37
37
  if (process.env.APP_ENV !== "production") {
38
- files.push(`@nocobase/client/src/locale/cron/${lng}`, `@nocobase/client/lib/locale/cron/${lng}`);
38
+ for (const candidate of candidates) {
39
+ files.push(`@nocobase/client/src/locale/cron/${candidate}`, `@nocobase/client/lib/locale/cron/${candidate}`);
40
+ }
39
41
  }
40
42
  for (const file of files) {
41
43
  try {
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare function parseLocaleResourceNamespaces(value: unknown): string[];
10
+ export declare function filterLocaleResources<T extends {
11
+ resources?: Record<string, unknown>;
12
+ }>(payload: T, namespaceQuery: unknown): T;
@@ -0,0 +1,56 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var localeResources_exports = {};
28
+ __export(localeResources_exports, {
29
+ filterLocaleResources: () => filterLocaleResources,
30
+ parseLocaleResourceNamespaces: () => parseLocaleResourceNamespaces
31
+ });
32
+ module.exports = __toCommonJS(localeResources_exports);
33
+ function parseLocaleResourceNamespaces(value) {
34
+ const values = Array.isArray(value) ? value : [value];
35
+ return [
36
+ ...new Set(
37
+ values.flatMap((item) => typeof item === "string" ? item.split(",") : []).map((item) => item.trim()).filter(Boolean)
38
+ )
39
+ ];
40
+ }
41
+ function filterLocaleResources(payload, namespaceQuery) {
42
+ const namespaces = parseLocaleResourceNamespaces(namespaceQuery);
43
+ if (!namespaces.length) return payload;
44
+ const resources = payload.resources || {};
45
+ return {
46
+ ...payload,
47
+ resources: Object.fromEntries(
48
+ namespaces.filter((namespace) => Object.prototype.hasOwnProperty.call(resources, namespace)).map((namespace) => [namespace, resources[namespace]])
49
+ )
50
+ };
51
+ }
52
+ // Annotate the CommonJS export names for ESM import in node:
53
+ 0 && (module.exports = {
54
+ filterLocaleResources,
55
+ parseLocaleResourceNamespaces
56
+ });
@@ -49,6 +49,7 @@ var import_appPortals = require("./appPortals");
49
49
  var import_antd = require("./antd");
50
50
  var import_cron = require("./cron");
51
51
  var import_cronstrue = require("./cronstrue");
52
+ var import_localeResources = require("./localeResources");
52
53
  async function getLang(ctx) {
53
54
  const SystemSetting = ctx.db.getRepository("systemSettings");
54
55
  const systemSetting = await SystemSetting.findOne();
@@ -123,7 +124,7 @@ class PluginClientServer extends import_server.Plugin {
123
124
  },
124
125
  async getLang(ctx, next) {
125
126
  const lang = await getLang(ctx);
126
- const resources = await ctx.app.localeManager.get(lang);
127
+ const resources = (0, import_localeResources.filterLocaleResources)(await ctx.app.localeManager.get(lang), ctx.request.query.ns);
127
128
  ctx.body = {
128
129
  lang,
129
130
  ...resources
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "Provides a client interface for the NocoBase server",
7
7
  "description.ru-RU": "Предоставляет клиентский интерфейс для сервера NocoBase",
8
8
  "description.zh-CN": "为 NocoBase 服务端提供客户端界面",
9
- "version": "2.2.0-beta.9",
9
+ "version": "3.0.0-alpha.1",
10
10
  "main": "./dist/server/index.js",
11
11
  "license": "Apache-2.0",
12
12
  "devDependencies": {
@@ -23,5 +23,5 @@
23
23
  "@nocobase/test": "2.x",
24
24
  "@nocobase/utils": "2.x"
25
25
  },
26
- "gitHead": "60e3d7abbaa0c7cead76f71a4f3d5eedb6b8acdb"
26
+ "gitHead": "22d8be8ece179cfa5c8a4ebb2c896c92bd418e03"
27
27
  }