@tachybase/client 1.6.0 → 1.6.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.
- package/es/application/PluginManager.mjs +9 -1
- package/es/application/WebSocketClient.d.ts +19 -0
- package/es/application/WebSocketClient.mjs +26 -6
- package/es/application/utils/remotePlugins.mjs +8 -2
- package/es/built-in/attachment-preview/previewers/file-sheet.mjs +1 -1
- package/es/built-in/pm/PluginDetail.mjs +1 -1
- package/es/collection-manager/Configuration/components/index.mjs +3 -3
- package/es/collection-manager/interfaces/components/index.mjs +2 -2
- package/es/collection-manager/interfaces/properties/operators.mjs +3 -3
- package/es/locale/index.mjs +47 -47
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +4 -1
- package/es/schema-component/antd/AntdSchemaComponentProvider.mjs +3 -1
- package/es/schema-component/antd/__builtins__/hooks/usePrefixCls.mjs +1 -1
- package/es/schema-component/antd/action/Action.Area.style.mjs +1 -1
- package/es/schema-component/antd/action/Action.Designer.mjs +1 -1
- package/es/schema-component/antd/association-field/AssociationSelect.mjs +1 -1
- package/es/schema-component/antd/association-field/InternalDrawerSubTable.mjs +1 -1
- package/es/schema-component/antd/association-field/SubTabs/styles.mjs +1 -1
- package/es/schema-component/antd/block-item/BlockToolbar.mjs +16 -16
- package/es/schema-component/antd/grid-card/options.mjs +3 -3
- package/es/schema-component/antd/input/ReadPretty.mjs +1 -3
- package/es/schema-component/antd/menu/Menu.styles.mjs +1 -1
- package/es/schema-component/antd/menu/MenuSearchAdd.style.mjs +1 -1
- package/es/schema-component/antd/page/Page.mjs +3 -0
- package/es/schema-component/antd/page/Page.style.mjs +1 -1
- package/es/schema-component/antd/table/Table.Column.Designer.mjs +5 -5
- package/es/schema-component/antd/table/Table.Void.Designer.mjs +4 -4
- package/es/schema-component/antd/table-v2/EnabledToggle.d.ts +9 -0
- package/es/schema-component/antd/table-v2/EnabledToggle.mjs +72 -0
- package/es/schema-component/antd/table-v2/Table.styles.mjs +1 -1
- package/es/schema-component/antd/table-v2/index.d.ts +1 -0
- package/es/schema-component/antd/table-v2/index.mjs +1 -0
- package/es/schema-component/antd/variable/CodeMirror.mjs +1 -1
- package/es/schema-component/common/sortable-item/DragHandleMenu.style.mjs +1 -1
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.mjs +1 -1
- package/es/schema-templates/BlockTemplateDetails.mjs +1 -1
- package/es/user/ChangePassword.mjs +1 -1
- package/lib/application/PluginManager.js +9 -1
- package/lib/application/WebSocketClient.js +26 -6
- package/lib/application/utils/remotePlugins.js +8 -2
- package/lib/built-in/attachment-preview/previewers/file-sheet.js +1 -1
- package/lib/built-in/pm/PluginDetail.js +1 -1
- package/lib/collection-manager/Configuration/components/index.js +3 -3
- package/lib/collection-manager/interfaces/components/index.js +2 -2
- package/lib/collection-manager/interfaces/properties/operators.js +3 -3
- package/lib/locale/en_US.js +1 -0
- package/lib/locale/es_ES.js +1 -0
- package/lib/locale/fr_FR.js +1 -0
- package/lib/locale/ko_KR.js +1 -0
- package/lib/locale/pt_BR.js +1 -0
- package/lib/locale/uk_UA.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +4 -1
- package/lib/schema-component/antd/AntdSchemaComponentProvider.js +3 -1
- package/lib/schema-component/antd/__builtins__/hooks/usePrefixCls.js +1 -1
- package/lib/schema-component/antd/action/Action.Area.style.js +1 -1
- package/lib/schema-component/antd/action/Action.Designer.js +1 -1
- package/lib/schema-component/antd/association-field/AssociationSelect.js +1 -1
- package/lib/schema-component/antd/association-field/InternalDrawerSubTable.js +1 -1
- package/lib/schema-component/antd/association-field/SubTabs/styles.js +1 -1
- package/lib/schema-component/antd/block-item/BlockToolbar.js +16 -16
- package/lib/schema-component/antd/grid-card/options.js +3 -3
- package/lib/schema-component/antd/input/ReadPretty.js +1 -3
- package/lib/schema-component/antd/menu/Menu.styles.js +1 -1
- package/lib/schema-component/antd/menu/MenuSearchAdd.style.js +1 -1
- package/lib/schema-component/antd/page/Page.js +3 -0
- package/lib/schema-component/antd/page/Page.style.js +1 -1
- package/lib/schema-component/antd/table/Table.Column.Designer.js +5 -5
- package/lib/schema-component/antd/table/Table.Void.Designer.js +4 -4
- package/lib/schema-component/antd/table-v2/EnabledToggle.js +106 -0
- package/lib/schema-component/antd/table-v2/Table.styles.js +1 -1
- package/lib/schema-component/antd/table-v2/index.js +13 -0
- package/lib/schema-component/antd/variable/CodeMirror.js +1 -1
- package/lib/schema-component/common/sortable-item/DragHandleMenu.style.js +1 -1
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.style.js +1 -1
- package/lib/schema-templates/BlockTemplateDetails.js +1 -1
- package/lib/user/ChangePassword.js +1 -1
- 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(
|
|
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 (
|
|
26
|
-
const protocol = '
|
|
27
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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() {
|
|
@@ -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),
|
|
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)
|
|
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) {
|
|
@@ -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:
|
|
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:
|
|
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:
|
|
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: "
|
|
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: "
|
|
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("
|
|
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("
|
|
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("
|
|
161
|
+
label: '{{t("≤")}}',
|
|
162
162
|
value: '$lte'
|
|
163
163
|
},
|
|
164
164
|
{
|
package/es/locale/index.mjs
CHANGED
|
@@ -68,25 +68,25 @@ const dayjsLocale = {
|
|
|
68
68
|
};
|
|
69
69
|
const locale = {
|
|
70
70
|
'ar-EG': {
|
|
71
|
-
label:
|
|
71
|
+
label: 'العربية'
|
|
72
72
|
},
|
|
73
73
|
'az-AZ': {
|
|
74
|
-
label:
|
|
74
|
+
label: 'Azərbaycan dili'
|
|
75
75
|
},
|
|
76
76
|
'bg-BG': {
|
|
77
|
-
label:
|
|
77
|
+
label: 'Български'
|
|
78
78
|
},
|
|
79
79
|
'bn-BD': {
|
|
80
80
|
label: 'Bengali'
|
|
81
81
|
},
|
|
82
82
|
'by-BY': {
|
|
83
|
-
label:
|
|
83
|
+
label: 'Беларускі'
|
|
84
84
|
},
|
|
85
85
|
'ca-ES': {
|
|
86
|
-
label:
|
|
86
|
+
label: 'Сatalà/Espanya'
|
|
87
87
|
},
|
|
88
88
|
'cs-CZ': {
|
|
89
|
-
label:
|
|
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:
|
|
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:
|
|
107
|
+
label: 'Español'
|
|
108
108
|
},
|
|
109
109
|
'et-EE': {
|
|
110
110
|
label: 'Estonian (Eesti)'
|
|
111
111
|
},
|
|
112
112
|
'fa-IR': {
|
|
113
|
-
label:
|
|
113
|
+
label: 'فارسی'
|
|
114
114
|
},
|
|
115
115
|
'fi-FI': {
|
|
116
116
|
label: 'Suomi'
|
|
117
117
|
},
|
|
118
118
|
'fr-BE': {
|
|
119
|
-
label:
|
|
119
|
+
label: 'Français(BE)'
|
|
120
120
|
},
|
|
121
121
|
'fr-CA': {
|
|
122
|
-
label:
|
|
122
|
+
label: 'Français(CA)'
|
|
123
123
|
},
|
|
124
124
|
'fr-FR': {
|
|
125
|
-
label:
|
|
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:
|
|
134
|
+
label: 'עברית'
|
|
135
135
|
},
|
|
136
136
|
'hi-IN': {
|
|
137
|
-
label:
|
|
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:
|
|
146
|
+
label: 'Հայերեն'
|
|
147
147
|
},
|
|
148
148
|
'id-ID': {
|
|
149
149
|
label: 'Bahasa Indonesia'
|
|
150
150
|
},
|
|
151
151
|
'is-IS': {
|
|
152
|
-
label:
|
|
152
|
+
label: 'Íslenska'
|
|
153
153
|
},
|
|
154
154
|
'it-IT': {
|
|
155
155
|
label: 'Italiano'
|
|
156
156
|
},
|
|
157
157
|
'ja-JP': {
|
|
158
|
-
label:
|
|
158
|
+
label: '日本語'
|
|
159
159
|
},
|
|
160
160
|
'ka-GE': {
|
|
161
|
-
label:
|
|
161
|
+
label: 'ქართული'
|
|
162
162
|
},
|
|
163
163
|
'kk-KZ': {
|
|
164
|
-
label:
|
|
164
|
+
label: 'Қазақ тілі'
|
|
165
165
|
},
|
|
166
166
|
'km-KH': {
|
|
167
|
-
label:
|
|
167
|
+
label: 'ភាសាខ្មែរ'
|
|
168
168
|
},
|
|
169
169
|
'kn-IN': {
|
|
170
|
-
label:
|
|
170
|
+
label: 'ಕನ್ನಡ'
|
|
171
171
|
},
|
|
172
172
|
'ko-KR': {
|
|
173
|
-
label:
|
|
173
|
+
label: '한국어'
|
|
174
174
|
},
|
|
175
175
|
'ku-IQ': {
|
|
176
|
-
label:
|
|
176
|
+
label: 'کوردی'
|
|
177
177
|
},
|
|
178
178
|
'lt-LT': {
|
|
179
|
-
label:
|
|
179
|
+
label: 'lietuvių'
|
|
180
180
|
},
|
|
181
181
|
'lv-LV': {
|
|
182
|
-
label:
|
|
182
|
+
label: 'Latviešu valoda'
|
|
183
183
|
},
|
|
184
184
|
'mk-MK': {
|
|
185
|
-
label:
|
|
185
|
+
label: 'македонски јазик'
|
|
186
186
|
},
|
|
187
187
|
'ml-IN': {
|
|
188
|
-
label:
|
|
188
|
+
label: 'മലയാളം'
|
|
189
189
|
},
|
|
190
190
|
'mn-MN': {
|
|
191
|
-
label:
|
|
191
|
+
label: 'Монгол хэл'
|
|
192
192
|
},
|
|
193
193
|
'ms-MY': {
|
|
194
|
-
label:
|
|
194
|
+
label: 'بهاس ملايو'
|
|
195
195
|
},
|
|
196
196
|
'nb-NO': {
|
|
197
|
-
label:
|
|
197
|
+
label: 'Norsk bokmål'
|
|
198
198
|
},
|
|
199
199
|
'ne-NP': {
|
|
200
|
-
label:
|
|
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:
|
|
212
|
+
label: 'Português brasileiro'
|
|
213
213
|
},
|
|
214
214
|
'pt-PT': {
|
|
215
|
-
label:
|
|
215
|
+
label: 'Português'
|
|
216
216
|
},
|
|
217
217
|
'ro-RO': {
|
|
218
|
-
label:
|
|
218
|
+
label: 'România'
|
|
219
219
|
},
|
|
220
220
|
'ru-RU': {
|
|
221
|
-
label:
|
|
221
|
+
label: 'Русский'
|
|
222
222
|
},
|
|
223
223
|
'si-LK': {
|
|
224
|
-
label:
|
|
224
|
+
label: 'සිංහල'
|
|
225
225
|
},
|
|
226
226
|
'sk-SK': {
|
|
227
|
-
label:
|
|
227
|
+
label: 'Slovenčina'
|
|
228
228
|
},
|
|
229
229
|
'sl-SI': {
|
|
230
|
-
label:
|
|
230
|
+
label: 'Slovenščina'
|
|
231
231
|
},
|
|
232
232
|
'sr-RS': {
|
|
233
|
-
label:
|
|
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:
|
|
242
|
+
label: 'ภาษาไทย'
|
|
243
243
|
},
|
|
244
244
|
'tk-TK': {
|
|
245
245
|
label: 'Turkmen'
|
|
246
246
|
},
|
|
247
247
|
'tr-TR': {
|
|
248
|
-
label:
|
|
248
|
+
label: 'Türkçe'
|
|
249
249
|
},
|
|
250
250
|
'uk-UA': {
|
|
251
|
-
label:
|
|
251
|
+
label: 'Українська'
|
|
252
252
|
},
|
|
253
253
|
'ur-PK': {
|
|
254
|
-
label:
|
|
254
|
+
label: 'Oʻzbekcha'
|
|
255
255
|
},
|
|
256
256
|
'vi-VN': {
|
|
257
|
-
label:
|
|
257
|
+
label: 'Tiếng Việt'
|
|
258
258
|
},
|
|
259
259
|
'zh-CN': {
|
|
260
|
-
label:
|
|
260
|
+
label: '简体中文'
|
|
261
261
|
},
|
|
262
262
|
'zh-HK': {
|
|
263
|
-
label:
|
|
263
|
+
label: '繁體中文(香港)'
|
|
264
264
|
},
|
|
265
265
|
'zh-TW': {
|
|
266
|
-
label:
|
|
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)=>
|
|
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 (
|
|
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 /*
|
|
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:
|
|
297
|
+
manual: false,
|
|
298
298
|
placeholder: t('Select workflow', {
|
|
299
299
|
ns: 'workflow'
|
|
300
300
|
}),
|
|
@@ -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: "
|
|
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 /*
|
|
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:
|
|
8
|
+
title: '全屏'
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
icon: /*#__PURE__*/ jsx(UndoOutlined, {}),
|
|
12
|
-
title:
|
|
12
|
+
title: '撤销'
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
icon: /*#__PURE__*/ jsx(RedoOutlined, {}),
|
|
16
|
-
title:
|
|
16
|
+
title: '重做'
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
icon: /*#__PURE__*/ jsx(DeleteOutlined, {}),
|
|
20
|
-
title:
|
|
20
|
+
title: '删除'
|
|
21
21
|
}
|
|
22
22
|
];
|
|
23
23
|
const customItems = [
|
|
24
24
|
{
|
|
25
25
|
icon: /*#__PURE__*/ jsx(CopyOutlined, {}),
|
|
26
26
|
placement: 'bottom',
|
|
27
|
-
title:
|
|
27
|
+
title: '复制'
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
icon: /*#__PURE__*/ jsx(ZoomInOutlined, {}),
|
|
31
|
-
title:
|
|
31
|
+
title: '放大!'
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
icon: /*#__PURE__*/ jsx(ZoomOutOutlined, {}),
|
|
35
35
|
style: {
|
|
36
36
|
color: '#1890ff'
|
|
37
37
|
},
|
|
38
|
-
title:
|
|
38
|
+
title: '缩小!'
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
type: 'divider'
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
icon: /*#__PURE__*/ jsx(DragOutlined, {}),
|
|
45
|
-
title:
|
|
45
|
+
title: '快速定位'
|
|
46
46
|
}
|
|
47
47
|
];
|
|
48
48
|
const dropdownMenuItems = [
|
|
49
49
|
{
|
|
50
50
|
icon: /*#__PURE__*/ jsx(CopyOutlined, {}),
|
|
51
51
|
onClick: ()=>{
|
|
52
|
-
message.info(
|
|
52
|
+
message.info('复制!');
|
|
53
53
|
},
|
|
54
|
-
label:
|
|
54
|
+
label: '复制'
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
icon: /*#__PURE__*/ jsx(ZoomInOutlined, {}),
|
|
58
58
|
onClick: ()=>{
|
|
59
|
-
message.success(
|
|
59
|
+
message.success('放大!');
|
|
60
60
|
},
|
|
61
|
-
label:
|
|
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(
|
|
69
|
+
message.success('缩小!');
|
|
70
70
|
},
|
|
71
|
-
label:
|
|
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(
|
|
79
|
+
message.loading('快速定位ing');
|
|
80
80
|
},
|
|
81
|
-
label:
|
|
81
|
+
label: '快速定位'
|
|
82
82
|
}
|
|
83
83
|
];
|
|
84
84
|
const BlockToolbar = /*#__PURE__*/ forwardRef((props, ref)=>/*#__PURE__*/ jsx("div", {
|