@tachybase/client 1.6.0 → 1.6.2

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 (84) hide show
  1. package/es/application/PluginManager.mjs +9 -1
  2. package/es/application/WebSocketClient.d.ts +19 -0
  3. package/es/application/WebSocketClient.mjs +26 -6
  4. package/es/application/utils/globalDeps.mjs +1 -1
  5. package/es/application/utils/remotePlugins.mjs +8 -2
  6. package/es/built-in/attachment-preview/previewers/file-sheet.mjs +1 -1
  7. package/es/built-in/pm/PluginDetail.mjs +1 -1
  8. package/es/collection-manager/Configuration/components/index.mjs +3 -3
  9. package/es/collection-manager/interfaces/components/index.mjs +2 -2
  10. package/es/collection-manager/interfaces/properties/operators.mjs +3 -3
  11. package/es/locale/index.mjs +47 -47
  12. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +4 -1
  13. package/es/schema-component/antd/AntdSchemaComponentProvider.mjs +3 -1
  14. package/es/schema-component/antd/__builtins__/hooks/usePrefixCls.mjs +1 -1
  15. package/es/schema-component/antd/action/Action.Area.style.mjs +1 -1
  16. package/es/schema-component/antd/action/Action.Designer.mjs +1 -1
  17. package/es/schema-component/antd/association-field/AssociationSelect.mjs +1 -1
  18. package/es/schema-component/antd/association-field/InternalDrawerSubTable.mjs +1 -1
  19. package/es/schema-component/antd/association-field/SubTabs/styles.mjs +1 -1
  20. package/es/schema-component/antd/block-item/BlockToolbar.mjs +16 -16
  21. package/es/schema-component/antd/grid-card/options.mjs +3 -3
  22. package/es/schema-component/antd/input/ReadPretty.mjs +1 -3
  23. package/es/schema-component/antd/menu/Menu.styles.mjs +1 -1
  24. package/es/schema-component/antd/menu/MenuSearchAdd.style.mjs +1 -1
  25. package/es/schema-component/antd/page/Page.mjs +3 -0
  26. package/es/schema-component/antd/page/Page.style.mjs +1 -1
  27. package/es/schema-component/antd/rich-text/style.mjs +5 -5
  28. package/es/schema-component/antd/rich-text/style.mjs.LICENSE.txt +5 -5
  29. package/es/schema-component/antd/table/Table.Column.Designer.mjs +5 -5
  30. package/es/schema-component/antd/table/Table.Void.Designer.mjs +4 -4
  31. package/es/schema-component/antd/table-v2/EnabledToggle.d.ts +9 -0
  32. package/es/schema-component/antd/table-v2/EnabledToggle.mjs +72 -0
  33. package/es/schema-component/antd/table-v2/Table.styles.mjs +1 -1
  34. package/es/schema-component/antd/table-v2/index.d.ts +1 -0
  35. package/es/schema-component/antd/table-v2/index.mjs +1 -0
  36. package/es/schema-component/antd/variable/CodeMirror.mjs +1 -1
  37. package/es/schema-component/common/sortable-item/DragHandleMenu.style.mjs +1 -1
  38. package/es/schema-component/common/sortable-item/DragHandlePageTab.style.mjs +1 -1
  39. package/es/schema-templates/BlockTemplateDetails.mjs +1 -1
  40. package/es/user/ChangePassword.mjs +1 -1
  41. package/lib/application/PluginManager.js +9 -1
  42. package/lib/application/WebSocketClient.js +26 -6
  43. package/lib/application/utils/remotePlugins.js +8 -2
  44. package/lib/built-in/attachment-preview/previewers/file-sheet.js +1 -1
  45. package/lib/built-in/pm/PluginDetail.js +1 -1
  46. package/lib/collection-manager/Configuration/components/index.js +3 -3
  47. package/lib/collection-manager/interfaces/components/index.js +2 -2
  48. package/lib/collection-manager/interfaces/properties/operators.js +3 -3
  49. package/lib/locale/en_US.js +1 -0
  50. package/lib/locale/es_ES.js +1 -0
  51. package/lib/locale/fr_FR.js +1 -0
  52. package/lib/locale/ko_KR.js +1 -0
  53. package/lib/locale/pt_BR.js +1 -0
  54. package/lib/locale/uk_UA.js +1 -0
  55. package/lib/locale/zh-CN.js +1 -0
  56. package/lib/locale/zh-TW.js +1 -0
  57. package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +4 -1
  58. package/lib/schema-component/antd/AntdSchemaComponentProvider.js +3 -1
  59. package/lib/schema-component/antd/__builtins__/hooks/usePrefixCls.js +1 -1
  60. package/lib/schema-component/antd/action/Action.Area.style.js +1 -1
  61. package/lib/schema-component/antd/action/Action.Designer.js +1 -1
  62. package/lib/schema-component/antd/association-field/AssociationSelect.js +1 -1
  63. package/lib/schema-component/antd/association-field/InternalDrawerSubTable.js +1 -1
  64. package/lib/schema-component/antd/association-field/SubTabs/styles.js +1 -1
  65. package/lib/schema-component/antd/block-item/BlockToolbar.js +16 -16
  66. package/lib/schema-component/antd/grid-card/options.js +3 -3
  67. package/lib/schema-component/antd/input/ReadPretty.js +1 -3
  68. package/lib/schema-component/antd/menu/Menu.styles.js +1 -1
  69. package/lib/schema-component/antd/menu/MenuSearchAdd.style.js +1 -1
  70. package/lib/schema-component/antd/page/Page.js +3 -0
  71. package/lib/schema-component/antd/page/Page.style.js +1 -1
  72. package/lib/schema-component/antd/rich-text/style.js +5 -5
  73. package/lib/schema-component/antd/rich-text/style.js.LICENSE.txt +5 -5
  74. package/lib/schema-component/antd/table/Table.Column.Designer.js +5 -5
  75. package/lib/schema-component/antd/table/Table.Void.Designer.js +4 -4
  76. package/lib/schema-component/antd/table-v2/EnabledToggle.js +106 -0
  77. package/lib/schema-component/antd/table-v2/Table.styles.js +1 -1
  78. package/lib/schema-component/antd/table-v2/index.js +13 -0
  79. package/lib/schema-component/antd/variable/CodeMirror.js +1 -1
  80. package/lib/schema-component/common/sortable-item/DragHandleMenu.style.js +1 -1
  81. package/lib/schema-component/common/sortable-item/DragHandlePageTab.style.js +1 -1
  82. package/lib/schema-templates/BlockTemplateDetails.js +1 -1
  83. package/lib/user/ChangePassword.js +1 -1
  84. package/package.json +4 -4
@@ -34,9 +34,17 @@ class PluginManager {
34
34
  pluginData: pluginList,
35
35
  devDynamicImport: this.app.devDynamicImport
36
36
  });
37
- for await (const [name, pluginClass] of plugins){
37
+ for await (const [name, pluginClass] of plugins)try {
38
38
  const info = pluginList.find((item)=>item.name === name);
39
39
  await this.add(pluginClass, info);
40
+ } catch (error) {
41
+ console.error("[PluginManager.initRemotePlugins] ✗ Error adding plugin ".concat(name, ":"), {
42
+ error,
43
+ errorMessage: null == error ? void 0 : error.message,
44
+ errorStack: null == error ? void 0 : error.stack,
45
+ pluginClass
46
+ });
47
+ throw error;
40
48
  }
41
49
  }
42
50
  async add(plugin) {
@@ -1,4 +1,22 @@
1
1
  import { Application } from './Application';
2
+ /**
3
+ * WebSocketClient hostname 修复函数类型
4
+ * 允许外部环境(如 Electron desktop)提供自定义的 hostname 修复逻辑
5
+ *
6
+ * @param hostname - 原始 hostname
7
+ * @returns 修复后的 hostname,如果返回 null/undefined 或非字符串值,则使用原值
8
+ */
9
+ type HostnameFixer = (hostname: string) => string | null | undefined;
10
+ declare global {
11
+ interface Window {
12
+ /**
13
+ * WebSocketClient hostname 修复函数(可选)
14
+ * 由特定环境(如 Electron desktop preload 脚本)提供
15
+ * 用于在生成 WebSocket URL 时修复 hostname
16
+ */
17
+ __tachybase_fix_websocket_hostname__?: HostnameFixer;
18
+ }
19
+ }
2
20
  export type WebSocketClientOptions = {
3
21
  reconnectInterval?: number;
4
22
  reconnectAttempts?: number;
@@ -33,3 +51,4 @@ export declare class WebSocketClient {
33
51
  off(type: string, listener: any, options?: boolean | EventListenerOptions): void;
34
52
  removeAllListeners(): void;
35
53
  }
54
+ export {};
@@ -17,22 +17,42 @@ class WebSocketClient {
17
17
  const options = this.app.getOptions();
18
18
  const apiBaseURL = null == options ? void 0 : null == (_options_apiClient = options.apiClient) ? void 0 : _options_apiClient['baseURL'];
19
19
  if (!apiBaseURL) return;
20
+ const locationHostname = window.__tachybase_location_hostname__;
21
+ const windowHostname = window.location.hostname;
22
+ let hostname = locationHostname || windowHostname;
23
+ const hostnameFixer = window.__tachybase_fix_websocket_hostname__;
24
+ if ('function' == typeof hostnameFixer) {
25
+ const fixedHostname = hostnameFixer(hostname);
26
+ if (fixedHostname && 'string' == typeof fixedHostname) hostname = fixedHostname;
27
+ }
20
28
  const subApp = getSubAppName(this.app.getPublicPath());
21
- const queryString = subApp ? "?__appName=".concat(subApp) : "?__hostname=".concat(window.location.hostname);
29
+ const queryString = subApp ? "?__appName=".concat(subApp) : "?__hostname=".concat(hostname);
22
30
  const wsPath = this.options.basename || '/ws';
31
+ const hostnameWasFixed = hostname !== window.location.hostname;
23
32
  if (this.options.url) {
24
33
  const url = new URL(this.options.url);
25
- if ('localhost' === url.hostname) {
26
- const protocol = 'https:' === location.protocol ? 'wss' : 'ws';
27
- return "".concat(protocol, "://").concat(location.hostname, ":").concat(url.port).concat(wsPath).concat(queryString);
34
+ if (hostnameWasFixed) {
35
+ const protocol = 'wss:' === url.protocol ? 'wss' : 'ws';
36
+ const port = url.port || '';
37
+ const host = port ? "".concat(hostname, ":").concat(port) : hostname;
38
+ return "".concat(protocol, "://").concat(host).concat(wsPath).concat(queryString);
28
39
  }
29
40
  return "".concat(this.options.url).concat(queryString);
30
41
  }
31
42
  try {
32
43
  const url = new URL(apiBaseURL);
33
- return "".concat('https:' === url.protocol ? 'wss' : 'ws', "://").concat(url.host).concat(wsPath).concat(queryString);
44
+ const finalHostname = hostnameWasFixed ? hostname : url.hostname;
45
+ const port = url.port || '';
46
+ const host = port ? "".concat(finalHostname, ":").concat(port) : finalHostname;
47
+ return "".concat('https:' === url.protocol ? 'wss' : 'ws', "://").concat(host).concat(wsPath).concat(queryString);
34
48
  } catch (error) {
35
- return "".concat('https:' === location.protocol ? 'wss' : 'ws', "://").concat(location.host).concat(wsPath).concat(queryString);
49
+ let port = location.port;
50
+ if (!port && apiBaseURL) try {
51
+ const apiUrl = new URL(apiBaseURL);
52
+ port = apiUrl.port;
53
+ } catch (e) {}
54
+ const host = port ? "".concat(hostname, ":").concat(port) : hostname;
55
+ return "".concat('https:' === location.protocol ? 'wss' : 'ws', "://").concat(host).concat(wsPath).concat(queryString);
36
56
  }
37
57
  }
38
58
  get reconnectAttempts() {
@@ -7,9 +7,9 @@ import jsx_runtime from "react/jsx-runtime";
7
7
  import * as __WEBPACK_EXTERNAL_MODULE_react_i18next_05dede28__ from "react-i18next";
8
8
  import * as __WEBPACK_EXTERNAL_MODULE__tego_client_7f3175c1__ from "@tego/client";
9
9
  import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
10
- import * as __WEBPACK_EXTERNAL_MODULE_ahooks__ from "ahooks";
11
10
  import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema_532e17e1__ from "@tachybase/schema";
12
11
  import * as __WEBPACK_EXTERNAL_MODULE_react_router_dom_5358f3fe__ from "react-router-dom";
12
+ import * as __WEBPACK_EXTERNAL_MODULE_ahooks__ from "ahooks";
13
13
  import * as __WEBPACK_EXTERNAL_MODULE_antd_style_1dcbd21e__ from "antd-style";
14
14
  import * as __WEBPACK_EXTERNAL_MODULE__ant_design_icons_a8184985__ from "@ant-design/icons";
15
15
  import * as __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__ from "@emotion/css";
@@ -72,12 +72,18 @@ function getRemotePlugins(requirejs) {
72
72
  definePluginClient(packageName);
73
73
  });
74
74
  return new Promise((resolve, reject)=>{
75
- requirejs.requirejs(packageNames, processRemotePlugins(pluginData, resolve), reject);
75
+ requirejs.requirejs(packageNames, processRemotePlugins(pluginData, resolve), (error)=>{
76
+ console.error('[getRemotePlugins] requirejs error:', error);
77
+ reject(error);
78
+ });
76
79
  });
77
80
  }
78
81
  async function getPlugins(options) {
79
82
  const { requirejs, pluginData, devDynamicImport } = options;
80
- if (0 === pluginData.length) return [];
83
+ if (0 === pluginData.length) {
84
+ console.warn('[getPlugins] ⚠ Early return: pluginData.length === 0');
85
+ return [];
86
+ }
81
87
  const res = [];
82
88
  const resolveDevPlugins = {};
83
89
  if (devDynamicImport) {
@@ -24,7 +24,7 @@ const ExcelView = (props)=>{
24
24
  try {
25
25
  handleShowPreviewer();
26
26
  } catch (e) {
27
- console.log("%c Line:36 \uD83E\uDD5F e", e);
27
+ console.log('%c Line:36 🥟 e', e);
28
28
  }
29
29
  }
30
30
  }, [
@@ -289,7 +289,7 @@ const PluginDetail = (param)=>{
289
289
  }),
290
290
  /*#__PURE__*/ jsxs(Space, {
291
291
  split: /*#__PURE__*/ jsx("span", {
292
- children: "\xa0\u2022\xa0"
292
+ children: "\xa0•\xa0"
293
293
  }),
294
294
  children: [
295
295
  /*#__PURE__*/ jsx("span", {
@@ -22,7 +22,7 @@ const SourceForeignKey = observer(()=>{
22
22
  return /*#__PURE__*/ jsx("div", {
23
23
  children: /*#__PURE__*/ jsx(Select, {
24
24
  allowClear: true,
25
- placeholder: "\u7559\u7A7A\u65F6\uFF0C\u81EA\u52A8\u751F\u6210 FK \u5B57\u6BB5",
25
+ placeholder: '留空时,自动生成 FK 字段',
26
26
  disabled: field.disabled,
27
27
  value: field.value,
28
28
  options: getCollectionFields(collection.name).filter((field)=>field.type).map((field)=>{
@@ -45,7 +45,7 @@ const ThroughForeignKey = observer(()=>{
45
45
  children: /*#__PURE__*/ jsx(Select, {
46
46
  allowClear: true,
47
47
  popupMatchSelectWidth: false,
48
- placeholder: "\u7559\u7A7A\u65F6\uFF0C\u81EA\u52A8\u751F\u6210 FK \u5B57\u6BB5",
48
+ placeholder: '留空时,自动生成 FK 字段',
49
49
  disabled: field.disabled,
50
50
  value: field.value,
51
51
  options: getCollectionFields(form.values.through).filter((field)=>field.type).map((field)=>{
@@ -68,7 +68,7 @@ const TargetForeignKey = observer(()=>{
68
68
  children: /*#__PURE__*/ jsx(Select, {
69
69
  allowClear: true,
70
70
  popupMatchSelectWidth: false,
71
- placeholder: "\u7559\u7A7A\u65F6\uFF0C\u81EA\u52A8\u751F\u6210 FK \u5B57\u6BB5",
71
+ placeholder: '留空时,自动生成 FK 字段',
72
72
  disabled: field.disabled,
73
73
  value: field.value,
74
74
  options: getCollectionFields(form.values.target).filter((field)=>field.type).map((field)=>{
@@ -34,7 +34,7 @@ const ForeignKey1 = ()=>/*#__PURE__*/ jsxs("div", {
34
34
  children: [
35
35
  "Foreign key 1 ",
36
36
  /*#__PURE__*/ jsx("a", {
37
- children: "\u65B0\u5EFA"
37
+ children: "新建"
38
38
  })
39
39
  ]
40
40
  });
@@ -42,7 +42,7 @@ const ForeignKey2 = ()=>/*#__PURE__*/ jsxs("div", {
42
42
  children: [
43
43
  "Foreign key 2 ",
44
44
  /*#__PURE__*/ jsx("a", {
45
- children: "\u65B0\u5EFA"
45
+ children: "新建"
46
46
  })
47
47
  ]
48
48
  });
@@ -142,7 +142,7 @@ const number = [
142
142
  selected: true
143
143
  },
144
144
  {
145
- label: '{{t("\u2260")}}',
145
+ label: '{{t("")}}',
146
146
  value: '$ne'
147
147
  },
148
148
  {
@@ -150,7 +150,7 @@ const number = [
150
150
  value: '$gt'
151
151
  },
152
152
  {
153
- label: '{{t("\u2265")}}',
153
+ label: '{{t("")}}',
154
154
  value: '$gte'
155
155
  },
156
156
  {
@@ -158,7 +158,7 @@ const number = [
158
158
  value: '$lt'
159
159
  },
160
160
  {
161
- label: '{{t("\u2264")}}',
161
+ label: '{{t("")}}',
162
162
  value: '$lte'
163
163
  },
164
164
  {
@@ -68,25 +68,25 @@ const dayjsLocale = {
68
68
  };
69
69
  const locale = {
70
70
  'ar-EG': {
71
- label: "\u0627\u0644\u0639\u0631\u0628\u064A\u0629"
71
+ label: 'العربية'
72
72
  },
73
73
  'az-AZ': {
74
- label: "Az\u0259rbaycan dili"
74
+ label: 'Azərbaycan dili'
75
75
  },
76
76
  'bg-BG': {
77
- label: "\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"
77
+ label: 'Български'
78
78
  },
79
79
  'bn-BD': {
80
80
  label: 'Bengali'
81
81
  },
82
82
  'by-BY': {
83
- label: "\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0456"
83
+ label: 'Беларускі'
84
84
  },
85
85
  'ca-ES': {
86
- label: "\u0421atal\xe0/Espanya"
86
+ label: 'Сatalà/Espanya'
87
87
  },
88
88
  'cs-CZ': {
89
- label: "\u010Cesky"
89
+ label: 'Česky'
90
90
  },
91
91
  'da-DK': {
92
92
  label: 'Dansk'
@@ -95,7 +95,7 @@ const locale = {
95
95
  label: 'Deutsch'
96
96
  },
97
97
  'el-GR': {
98
- label: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"
98
+ label: 'Ελληνικά'
99
99
  },
100
100
  'en-GB': {
101
101
  label: 'English(GB)'
@@ -104,25 +104,25 @@ const locale = {
104
104
  label: 'English'
105
105
  },
106
106
  'es-ES': {
107
- label: "Espa\xf1ol"
107
+ label: 'Español'
108
108
  },
109
109
  'et-EE': {
110
110
  label: 'Estonian (Eesti)'
111
111
  },
112
112
  'fa-IR': {
113
- label: "\u0641\u0627\u0631\u0633\u06CC"
113
+ label: 'فارسی'
114
114
  },
115
115
  'fi-FI': {
116
116
  label: 'Suomi'
117
117
  },
118
118
  'fr-BE': {
119
- label: "Fran\xe7ais(BE)"
119
+ label: 'Français(BE)'
120
120
  },
121
121
  'fr-CA': {
122
- label: "Fran\xe7ais(CA)"
122
+ label: 'Français(CA)'
123
123
  },
124
124
  'fr-FR': {
125
- label: "Fran\xe7ais"
125
+ label: 'Français'
126
126
  },
127
127
  'ga-IE': {
128
128
  label: 'Gaeilge'
@@ -131,10 +131,10 @@ const locale = {
131
131
  label: 'Galego'
132
132
  },
133
133
  'he-IL': {
134
- label: "\u05E2\u05D1\u05E8\u05D9\u05EA"
134
+ label: 'עברית'
135
135
  },
136
136
  'hi-IN': {
137
- label: "\u0939\u093F\u0928\u094D\u0926\u0940"
137
+ label: 'हिन्दी'
138
138
  },
139
139
  'hr-HR': {
140
140
  label: 'Hrvatski jezik'
@@ -143,61 +143,61 @@ const locale = {
143
143
  label: 'Magyar'
144
144
  },
145
145
  'hy-AM': {
146
- label: "\u0540\u0561\u0575\u0565\u0580\u0565\u0576"
146
+ label: 'Հայերեն'
147
147
  },
148
148
  'id-ID': {
149
149
  label: 'Bahasa Indonesia'
150
150
  },
151
151
  'is-IS': {
152
- label: "\xcdslenska"
152
+ label: 'Íslenska'
153
153
  },
154
154
  'it-IT': {
155
155
  label: 'Italiano'
156
156
  },
157
157
  'ja-JP': {
158
- label: "\u65E5\u672C\u8A9E"
158
+ label: '日本語'
159
159
  },
160
160
  'ka-GE': {
161
- label: "\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8"
161
+ label: 'ქართული'
162
162
  },
163
163
  'kk-KZ': {
164
- label: "\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"
164
+ label: 'Қазақ тілі'
165
165
  },
166
166
  'km-KH': {
167
- label: "\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"
167
+ label: 'ភាសាខ្មែរ'
168
168
  },
169
169
  'kn-IN': {
170
- label: "\u0C95\u0CA8\u0CCD\u0CA8\u0CA1"
170
+ label: 'ಕನ್ನಡ'
171
171
  },
172
172
  'ko-KR': {
173
- label: "\uD55C\uAD6D\uC5B4"
173
+ label: '한국어'
174
174
  },
175
175
  'ku-IQ': {
176
- label: "\u06A9\u0648\u0631\u062F\u06CC"
176
+ label: 'کوردی'
177
177
  },
178
178
  'lt-LT': {
179
- label: "lietuvi\u0173"
179
+ label: 'lietuvių'
180
180
  },
181
181
  'lv-LV': {
182
- label: "Latvie\u0161u valoda"
182
+ label: 'Latviešu valoda'
183
183
  },
184
184
  'mk-MK': {
185
- label: "\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438 \u0458\u0430\u0437\u0438\u043A"
185
+ label: 'македонски јазик'
186
186
  },
187
187
  'ml-IN': {
188
- label: "\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02"
188
+ label: 'മലയാളം'
189
189
  },
190
190
  'mn-MN': {
191
- label: "\u041C\u043E\u043D\u0433\u043E\u043B \u0445\u044D\u043B"
191
+ label: 'Монгол хэл'
192
192
  },
193
193
  'ms-MY': {
194
- label: "\u0628\u0647\u0627\u0633 \u0645\u0644\u0627\u064A\u0648"
194
+ label: 'بهاس ملايو'
195
195
  },
196
196
  'nb-NO': {
197
- label: "Norsk bokm\xe5l"
197
+ label: 'Norsk bokmål'
198
198
  },
199
199
  'ne-NP': {
200
- label: "\u0928\u0947\u092A\u093E\u0932\u0940"
200
+ label: 'नेपाली'
201
201
  },
202
202
  'nl-BE': {
203
203
  label: 'Vlaams'
@@ -209,28 +209,28 @@ const locale = {
209
209
  label: 'Polski'
210
210
  },
211
211
  'pt-BR': {
212
- label: "Portugu\xeas brasileiro"
212
+ label: 'Português brasileiro'
213
213
  },
214
214
  'pt-PT': {
215
- label: "Portugu\xeas"
215
+ label: 'Português'
216
216
  },
217
217
  'ro-RO': {
218
- label: "Rom\xe2nia"
218
+ label: 'România'
219
219
  },
220
220
  'ru-RU': {
221
- label: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439"
221
+ label: 'Русский'
222
222
  },
223
223
  'si-LK': {
224
- label: "\u0DC3\u0DD2\u0D82\u0DC4\u0DBD"
224
+ label: 'සිංහල'
225
225
  },
226
226
  'sk-SK': {
227
- label: "Sloven\u010Dina"
227
+ label: 'Slovenčina'
228
228
  },
229
229
  'sl-SI': {
230
- label: "Sloven\u0161\u010Dina"
230
+ label: 'Slovenščina'
231
231
  },
232
232
  'sr-RS': {
233
- label: "\u0441\u0440\u043F\u0441\u043A\u0438 \u0458\u0435\u0437\u0438\u043A"
233
+ label: 'српски језик'
234
234
  },
235
235
  'sv-SE': {
236
236
  label: 'Svenska'
@@ -239,31 +239,31 @@ const locale = {
239
239
  label: 'Tamil'
240
240
  },
241
241
  'th-TH': {
242
- label: "\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22"
242
+ label: 'ภาษาไทย'
243
243
  },
244
244
  'tk-TK': {
245
245
  label: 'Turkmen'
246
246
  },
247
247
  'tr-TR': {
248
- label: "T\xfcrk\xe7e"
248
+ label: 'Türkçe'
249
249
  },
250
250
  'uk-UA': {
251
- label: "\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"
251
+ label: 'Українська'
252
252
  },
253
253
  'ur-PK': {
254
- label: "O\u02BBzbekcha"
254
+ label: 'Oʻzbekcha'
255
255
  },
256
256
  'vi-VN': {
257
- label: "Ti\u1EBFng Vi\u1EC7t"
257
+ label: 'Tiếng Việt'
258
258
  },
259
259
  'zh-CN': {
260
- label: "\u7B80\u4F53\u4E2D\u6587"
260
+ label: '简体中文'
261
261
  },
262
262
  'zh-HK': {
263
- label: "\u7E41\u9AD4\u4E2D\u6587\uFF08\u9999\u6E2F\uFF09"
263
+ label: '繁體中文(香港)'
264
264
  },
265
265
  'zh-TW': {
266
- label: "\u7E41\u9AD4\u4E2D\u6587\uFF08\u53F0\u6E7E\uFF09"
266
+ label: '繁體中文(台湾)'
267
267
  }
268
268
  };
269
269
  export { dayjsLocale, locale as default };
@@ -129,7 +129,10 @@ const useTableBlockProps = ()=>{
129
129
  prevMergedFilter = currFilter;
130
130
  dataBlocks.forEach((item)=>{
131
131
  const targetsUidList = targets.map((targetItem)=>targetItem.uid);
132
- if (targetsUidList.includes(item.uid) && !item.associatedFields.find((assItem)=>assItem.name === target.field || target.field.includes(assItem.name))) {
132
+ if (targetsUidList.includes(item.uid) && !item.associatedFields.find((assItem)=>{
133
+ var _target_field;
134
+ return assItem.name === target.field || (null == (_target_field = target.field) ? void 0 : _target_field.includes(assItem.name));
135
+ })) {
133
136
  const prevFlatItems = flat(prevMergedFilter);
134
137
  Object.entries(prevFlatItems).forEach((param)=>{
135
138
  let [key, prevItem] = param;
@@ -1,3 +1,4 @@
1
+ import { CodeMirror } from "@tego/client";
1
2
  import { Plugin } from "../../application/Plugin.mjs";
2
3
  import { actionSettings } from "./action/index.mjs";
3
4
  import { useFilterActionProps } from "./filter/useFilterActionProps.mjs";
@@ -16,7 +17,8 @@ class AntdSchemaComponentPlugin extends Plugin {
16
17
  addComponents() {
17
18
  this.app.addComponents({
18
19
  ...__WEBPACK_EXTERNAL_MODULE__index_mjs_6e7aec25__,
19
- ...__WEBPACK_EXTERNAL_MODULE__common_index_mjs_af2a4306__
20
+ ...__WEBPACK_EXTERNAL_MODULE__common_index_mjs_af2a4306__,
21
+ CodeMirror: CodeMirror
20
22
  });
21
23
  }
22
24
  addScopes() {
@@ -2,7 +2,7 @@ import { useContext } from "react";
2
2
  import { ConfigProvider } from "antd";
3
3
  const usePrefixCls = (tag, props)=>{
4
4
  const { getPrefixCls } = useContext(ConfigProvider.ConfigContext) || {};
5
- if ('ConfigContext' in ConfigProvider) return (null == getPrefixCls ? void 0 : getPrefixCls(tag, null == props ? void 0 : props.prefixCls)) || '';
5
+ if ("ConfigContext" in ConfigProvider) return (null == getPrefixCls ? void 0 : getPrefixCls(tag, null == props ? void 0 : props.prefixCls)) || '';
6
6
  {
7
7
  var _props_prefixCls;
8
8
  const prefix = null != (_props_prefixCls = null == props ? void 0 : props.prefixCls) ? _props_prefixCls : 'ant-';
@@ -33,7 +33,7 @@ function _templateObject1() {
33
33
  function _templateObject2() {
34
34
  const data = _tagged_template_literal([
35
35
  "\n position: sticky !important;\n top: 0 !important;\n z-index: 100 !important;\n background: #fff !important;\n background-color: #fff !important;\n padding: ",
36
- "px 0;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n border-bottom: 1px solid rgba(5, 5, 5, 0.06);\n margin: 0 -16px;\n padding-left: 16px;\n padding-right: 16px;\n\n /* \u786E\u4FDD\u5B8C\u5168\u906E\u6321 */\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: -100vw;\n right: -100vw;\n bottom: 0;\n background: #fff;\n z-index: -1;\n }\n "
36
+ "px 0;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n border-bottom: 1px solid rgba(5, 5, 5, 0.06);\n margin: 0 -16px;\n padding-left: 16px;\n padding-right: 16px;\n\n /* 确保完全遮挡 */\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: -100vw;\n right: -100vw;\n bottom: 0;\n background: #fff;\n z-index: -1;\n }\n "
37
37
  ]);
38
38
  _templateObject2 = function() {
39
39
  return data;
@@ -294,7 +294,7 @@ function WorkflowSelectComponent(param) {
294
294
  return /*#__PURE__*/ jsx(DataSourceProvider, {
295
295
  dataSource: "main",
296
296
  children: /*#__PURE__*/ jsx(RemoteSelect, {
297
- manual: true,
297
+ manual: false,
298
298
  placeholder: t('Select workflow', {
299
299
  ns: 'workflow'
300
300
  }),
@@ -105,7 +105,7 @@ const InternalAssociationSelect = observer((props)=>{
105
105
  style: {
106
106
  paddingLeft: 5
107
107
  },
108
- children: t('Add') + " \u201C".concat(props.search, "\u201D ")
108
+ children: t('Add') + " ".concat(props.search, " ")
109
109
  })
110
110
  ]
111
111
  });
@@ -75,7 +75,7 @@ const InternaDrawerSubTable = observer((props)=>{
75
75
  extra: /*#__PURE__*/ jsx(Button, {
76
76
  type: "primary",
77
77
  onClick: ()=>setVisible(false),
78
- children: "\u786E\u8BA4"
78
+ children: "确认"
79
79
  }),
80
80
  children: /*#__PURE__*/ jsx(FlagProvider, {
81
81
  isInSubForm: true,
@@ -9,7 +9,7 @@ function _tagged_template_literal(strings, raw) {
9
9
  }
10
10
  function _templateObject() {
11
11
  const data = _tagged_template_literal([
12
- "\n display: flex;\n flex-direction: row;\n max-height: 30vh;\n .left-pane {\n padding: 2px;\n display: flex;\n font-weight: 500;\n flex-direction: column;\n width: 100px;\n overflow-y: auto;\n /* \u9690\u85CF\u6EDA\u52A8\u6761 \u5FAE\u8F6F/\u706B\u72D0 */\n -ms-overflow-style: none;\n scrollbar-width: none;\n border-right: 2px solid #d4d4d4;\n padding: 2px;\n margin-right: 5px;\n div {\n background-color: #ffffff;\n white-space: normal;\n cursor: pointer;\n margin: 5px 0 5px;\n }\n div:last-of-type {\n margin-bottom: 0;\n }\n }\n /* \u9690\u85CF\u6EDA\u52A8\u6761 \u8C37\u6B4C\u6D4F\u89C8\u5668 */\n .left-pane::-webkit-scrollbar {\n display: none;\n }\n\n .right-pane {\n padding: 2px;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n flex: 1;\n div {\n margin-bottom: 1em;\n .ant-btn {\n margin-right: 2px;\n }\n }\n div:last-of-type {\n margin-bottom: 0;\n }\n }\n "
12
+ "\n display: flex;\n flex-direction: row;\n max-height: 30vh;\n .left-pane {\n padding: 2px;\n display: flex;\n font-weight: 500;\n flex-direction: column;\n width: 100px;\n overflow-y: auto;\n /* 隐藏滚动条 微软/火狐 */\n -ms-overflow-style: none;\n scrollbar-width: none;\n border-right: 2px solid #d4d4d4;\n padding: 2px;\n margin-right: 5px;\n div {\n background-color: #ffffff;\n white-space: normal;\n cursor: pointer;\n margin: 5px 0 5px;\n }\n div:last-of-type {\n margin-bottom: 0;\n }\n }\n /* 隐藏滚动条 谷歌浏览器 */\n .left-pane::-webkit-scrollbar {\n display: none;\n }\n\n .right-pane {\n padding: 2px;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n flex: 1;\n div {\n margin-bottom: 1em;\n .ant-btn {\n margin-right: 2px;\n }\n }\n div:last-of-type {\n margin-bottom: 0;\n }\n }\n "
13
13
  ]);
14
14
  _templateObject = function() {
15
15
  return data;
@@ -5,60 +5,60 @@ import { message } from "antd";
5
5
  const defaultItems = [
6
6
  {
7
7
  icon: /*#__PURE__*/ jsx(FullscreenOutlined, {}),
8
- title: "\u5168\u5C4F"
8
+ title: '全屏'
9
9
  },
10
10
  {
11
11
  icon: /*#__PURE__*/ jsx(UndoOutlined, {}),
12
- title: "\u64A4\u9500"
12
+ title: '撤销'
13
13
  },
14
14
  {
15
15
  icon: /*#__PURE__*/ jsx(RedoOutlined, {}),
16
- title: "\u91CD\u505A"
16
+ title: '重做'
17
17
  },
18
18
  {
19
19
  icon: /*#__PURE__*/ jsx(DeleteOutlined, {}),
20
- title: "\u5220\u9664"
20
+ title: '删除'
21
21
  }
22
22
  ];
23
23
  const customItems = [
24
24
  {
25
25
  icon: /*#__PURE__*/ jsx(CopyOutlined, {}),
26
26
  placement: 'bottom',
27
- title: "\u590D\u5236"
27
+ title: '复制'
28
28
  },
29
29
  {
30
30
  icon: /*#__PURE__*/ jsx(ZoomInOutlined, {}),
31
- title: "\u653E\u5927\uFF01"
31
+ title: '放大!'
32
32
  },
33
33
  {
34
34
  icon: /*#__PURE__*/ jsx(ZoomOutOutlined, {}),
35
35
  style: {
36
36
  color: '#1890ff'
37
37
  },
38
- title: "\u7F29\u5C0F\uFF01"
38
+ title: '缩小!'
39
39
  },
40
40
  {
41
41
  type: 'divider'
42
42
  },
43
43
  {
44
44
  icon: /*#__PURE__*/ jsx(DragOutlined, {}),
45
- title: "\u5FEB\u901F\u5B9A\u4F4D"
45
+ title: '快速定位'
46
46
  }
47
47
  ];
48
48
  const dropdownMenuItems = [
49
49
  {
50
50
  icon: /*#__PURE__*/ jsx(CopyOutlined, {}),
51
51
  onClick: ()=>{
52
- message.info("\u590D\u5236\uFF01");
52
+ message.info('复制!');
53
53
  },
54
- label: "\u590D\u5236"
54
+ label: '复制'
55
55
  },
56
56
  {
57
57
  icon: /*#__PURE__*/ jsx(ZoomInOutlined, {}),
58
58
  onClick: ()=>{
59
- message.success("\u653E\u5927\uFF01");
59
+ message.success('放大!');
60
60
  },
61
- label: "\u653E\u5927\uFF01"
61
+ label: '放大!'
62
62
  },
63
63
  {
64
64
  icon: /*#__PURE__*/ jsx(ZoomOutOutlined, {}),
@@ -66,9 +66,9 @@ const dropdownMenuItems = [
66
66
  color: '#1890ff'
67
67
  },
68
68
  onClick: ()=>{
69
- message.success("\u7F29\u5C0F\uFF01");
69
+ message.success('缩小!');
70
70
  },
71
- label: "\u7F29\u5C0F\uFF01"
71
+ label: '缩小!'
72
72
  },
73
73
  {
74
74
  type: 'divider'
@@ -76,9 +76,9 @@ const dropdownMenuItems = [
76
76
  {
77
77
  icon: /*#__PURE__*/ jsx(DragOutlined, {}),
78
78
  onClick: ()=>{
79
- message.loading("\u5FEB\u901F\u5B9A\u4F4Ding");
79
+ message.loading('快速定位ing');
80
80
  },
81
- label: "\u5FEB\u901F\u5B9A\u4F4D"
81
+ label: '快速定位'
82
82
  }
83
83
  ];
84
84
  const BlockToolbar = /*#__PURE__*/ forwardRef((props, ref)=>/*#__PURE__*/ jsx("div", {