agilebuilder-ui 1.1.27 → 1.1.29
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/lib/{401-c1ecc1a9.js → 401-b6438df4.js} +1 -1
- package/lib/{404-a507cf9c.js → 404-a63f6f05.js} +1 -1
- package/lib/{iframe-page-32671903.js → iframe-page-37f43db7.js} +1 -1
- package/lib/{index-ce3ae297.js → index-d3663821.js} +19913 -19927
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +98 -95
- package/lib/{tab-content-iframe-index-55b69efd.js → tab-content-iframe-index-86707264.js} +1 -1
- package/lib/{tab-content-index-f8882314.js → tab-content-index-c7251161.js} +25 -24
- package/lib/{tache-subprocess-history-a2d815d2.js → tache-subprocess-history-6de071c9.js} +1 -1
- package/package.json +1 -1
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +5 -1
- package/packages/fs-preview/src/fs-preview.vue +75 -53
- package/packages/organization-input/src/organization-input.vue +1 -1
- package/packages/row-form/operation.vue +1 -0
- package/packages/super-grid/src/components/mobile-table-card.jsx +12 -2
- package/packages/super-grid/src/custom-formatter.js +10 -7
- package/packages/super-grid/src/dynamic-input.vue +8 -7
- package/packages/super-grid/src/index-column.vue +24 -15
- package/packages/super-grid/src/normal-column-content.vue +19 -2
- package/packages/super-grid/src/normal-column.vue +14 -13
- package/packages/super-grid/src/row-operation.vue +49 -27
- package/packages/super-grid/src/selection-column.vue +2 -12
- package/packages/super-grid/src/super-grid.vue +27 -7
- package/packages/workflow-history-list/src/workflow-history-list.vue +101 -160
- package/src/components/Affix/index.vue +19 -12
- package/src/i18n/langs/cn.js +292 -294
- package/src/i18n/langs/en.js +291 -304
- package/src/permission.js +1 -1
- package/src/store/modules/table.js +1 -0
- package/src/styles/_layout-custom-properties.scss +2 -2
- package/src/styles/display-layout.scss +4 -4
- package/src/styles/index.scss +2 -9
- package/src/styles/theme/dark-blue/button.scss +6 -6
- package/src/styles/theme/dark-blue/card.scss +11 -15
- package/src/styles/theme/dark-blue/index.scss +0 -4
- package/src/styles/theme/dark-blue/sidebar.scss +0 -5
- package/src/styles/theme/default.scss +1 -1
- package/src/styles/theme/green/button.scss +2 -2
- package/src/styles/theme/green/index.scss +0 -4
- package/src/styles/theme/green/sidebar.scss +0 -5
- package/src/styles/theme/ocean-blue/button.scss +2 -2
- package/src/styles/theme/ocean-blue/index.scss +0 -4
- package/src/styles/theme/ocean-blue/sidebar.scss +0 -5
- package/src/styles/theme/tiffany-blue-mobile/button.scss +2 -2
- package/src/styles/theme/tiffany-blue-mobile/index.scss +1 -5
- package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +0 -5
- package/src/utils/iframe-communicator.js +222 -222
- package/src/utils/jump-page-utils.js +1 -1
- package/vite.config.js +2 -1
|
@@ -1,234 +1,234 @@
|
|
|
1
|
-
import store from '../store';
|
|
2
|
-
|
|
3
|
-
(function(global) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
// import store from '../store';
|
|
2
|
+
|
|
3
|
+
// (function(global) {
|
|
4
|
+
// // 防止重复初始化
|
|
5
|
+
// if (global.$ambAppIframe?.__initialized) {
|
|
6
|
+
// console.warn('$ambAppIframe communicator already initialized');
|
|
7
|
+
// return;
|
|
8
|
+
// }
|
|
9
|
+
|
|
10
|
+
// class GlobalCommunicator {
|
|
11
|
+
// constructor() {
|
|
12
|
+
// this.__initialized = true;
|
|
13
|
+
// this.enabled = true;
|
|
14
|
+
// this.store = null;
|
|
15
|
+
// this.trustedOrigins = new Set([window.location.origin]);
|
|
16
|
+
// this.iframeRegistry = new WeakMap(); // iframe窗口到origin的映射
|
|
17
|
+
// this.pendingIframes = new WeakMap(); // 等待加载完成的iframe
|
|
18
|
+
// this.parentWindow = window !== window.top ? window.top : null;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
// this.init();
|
|
21
|
+
// }
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
// init() {
|
|
24
|
+
// // 设置消息监听
|
|
25
|
+
// window.addEventListener('message', this.handleMessage.bind(this));
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
// // 如果是iframe,主动向父级注册
|
|
28
|
+
// if (this.parentWindow) {
|
|
29
|
+
// this.registerToParent();
|
|
30
|
+
// }
|
|
31
|
+
// }
|
|
32
|
+
|
|
33
|
+
// // 绑定Vuex store
|
|
34
|
+
// bindStore(store) {
|
|
35
|
+
// if (this.store) {
|
|
36
|
+
// console.warn('Store already bound');
|
|
37
|
+
// return;
|
|
38
|
+
// }
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
40
|
+
// this.store = store;
|
|
41
|
+
// this.unsubscribe = store.subscribe((mutation) => {
|
|
42
|
+
// if (this.enabled && mutation.type.startsWith('system/')) {
|
|
43
|
+
// this.broadcastState();
|
|
44
|
+
// }
|
|
45
|
+
// });
|
|
46
|
+
// }
|
|
47
|
+
|
|
48
|
+
// // 向父级注册
|
|
49
|
+
// registerToParent() {
|
|
50
|
+
// const attemptRegister = (attempt = 0) => {
|
|
51
|
+
// this.parentWindow.postMessage({
|
|
52
|
+
// type: 'CHILD_REGISTER',
|
|
53
|
+
// source: window.location.origin
|
|
54
|
+
// }, '*');
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
// if (attempt < 2) {
|
|
57
|
+
// setTimeout(() => attemptRegister(attempt + 1), 500 * (attempt + 1));
|
|
58
|
+
// }
|
|
59
|
+
// };
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
// attemptRegister();
|
|
62
|
+
// }
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
// // 处理收到的消息
|
|
65
|
+
// handleMessage(event) {
|
|
66
|
+
// if (!this.enabled || !event.data || !event.data.type) return;
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
68
|
+
// const { type, payload, source } = event.data;
|
|
69
|
+
// const origin = event.origin;
|
|
70
|
+
|
|
71
|
+
// // 自动处理信任源
|
|
72
|
+
// if (type === 'CHILD_REGISTER' || type === 'IFRAME_READY') {
|
|
73
|
+
// this.addTrustedOrigin(origin);
|
|
74
|
+
// }
|
|
75
|
+
|
|
76
|
+
// if (!this.isTrustedOrigin(origin)) return;
|
|
77
|
+
|
|
78
|
+
// switch(type) {
|
|
79
|
+
// case 'CHILD_REGISTER':
|
|
80
|
+
// this.registerIframe(event.source, origin);
|
|
81
|
+
// break;
|
|
82
|
+
// case 'IFRAME_READY':
|
|
83
|
+
// this.handleIframeReady(event.source, origin);
|
|
84
|
+
// break;
|
|
85
|
+
// case 'STATE_UPDATE':
|
|
86
|
+
// this.handleStateUpdate(payload);
|
|
87
|
+
// break;
|
|
88
|
+
// case 'STATE_REQUEST':
|
|
89
|
+
// this.sendStateTo(event.source, origin);
|
|
90
|
+
// break;
|
|
91
|
+
// }
|
|
92
|
+
// }
|
|
93
|
+
|
|
94
|
+
// // 处理iframe准备就绪
|
|
95
|
+
// handleIframeReady(iframeWindow, origin) {
|
|
96
|
+
// if (this.pendingIframes?.has(iframeWindow)) {
|
|
97
|
+
// const { resolve } = this.pendingIframes?.get(iframeWindow);
|
|
98
|
+
// this.registerIframe(iframeWindow, origin);
|
|
99
|
+
// resolve(iframeWindow);
|
|
100
|
+
// this.pendingIframes?.delete?.(iframeWindow);
|
|
101
|
+
// }
|
|
102
|
+
// }
|
|
103
|
+
|
|
104
|
+
// // 注册iframe
|
|
105
|
+
// registerIframe(iframeWindow, origin) {
|
|
106
|
+
// this.iframeRegistry?.set(iframeWindow, origin);
|
|
107
|
+
// this.sendStateTo(iframeWindow, origin);
|
|
108
|
+
// }
|
|
109
|
+
|
|
110
|
+
// // 发送状态到指定窗口
|
|
111
|
+
// sendStateTo(targetWindow, targetOrigin) {
|
|
112
|
+
// if (!this.enabled || !this.store) return;
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
114
|
+
// try {
|
|
115
|
+
// targetWindow?.postMessage?.({
|
|
116
|
+
// type: 'STATE_UPDATE',
|
|
117
|
+
// payload: this.store.state.system,
|
|
118
|
+
// source: window.location.origin
|
|
119
|
+
// }, targetOrigin);
|
|
120
|
+
// } catch (e) {
|
|
121
|
+
// // console.error('Failed to send state:', e);
|
|
122
|
+
// this.cleanupConnection(targetWindow);
|
|
123
|
+
// }
|
|
124
|
+
// }
|
|
125
|
+
|
|
126
|
+
// // 广播状态到所有已注册的iframe和父窗口
|
|
127
|
+
// broadcastState() {
|
|
128
|
+
// // 发送给子iframe
|
|
129
|
+
// this.iframeRegistry?.forEach?.((origin, iframeWindow) => {
|
|
130
|
+
// this.sendStateTo(iframeWindow, origin);
|
|
131
|
+
// });
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
133
|
+
// // 发送给父窗口
|
|
134
|
+
// if (this.parentWindow) {
|
|
135
|
+
// this.sendStateTo(this.parentWindow, this.getParentOrigin());
|
|
136
|
+
// }
|
|
137
|
+
// }
|
|
138
|
+
|
|
139
|
+
// // 创建受管理的iframe
|
|
140
|
+
// createManagedIframe(url, container) {
|
|
141
|
+
// return new Promise((resolve, reject) => {
|
|
142
|
+
// const iframe = document.createElement('iframe');
|
|
143
|
+
// iframe.src = url;
|
|
144
|
+
// container.appendChild(iframe);
|
|
145
|
+
|
|
146
|
+
// const origin = new URL(url).origin;
|
|
147
|
+
// this.addTrustedOrigin(origin);
|
|
148
|
+
|
|
149
|
+
// // 设置加载完成监听
|
|
150
|
+
// iframe.onload = () => {
|
|
151
|
+
// try {
|
|
152
|
+
// // 存储为待处理iframe,等待IFRAME_READY消息
|
|
153
|
+
// this.pendingIframes?.set(iframe.contentWindow, { resolve, reject });
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
})(window);
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if (window.$ambAppIframe) window.$ambAppIframe.bindStore(store);
|
|
220
|
-
|
|
221
|
-
if (window !== window.top) {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// export {
|
|
233
|
-
// store as systemStore
|
|
155
|
+
// // 设置超时拒绝
|
|
156
|
+
// setTimeout(() => {
|
|
157
|
+
// if (this.pendingIframes?.has(iframe.contentWindow)) {
|
|
158
|
+
// this.pendingIframes?.delete?.(iframe.contentWindow);
|
|
159
|
+
// reject(new Error('Iframe ready timeout'));
|
|
160
|
+
// }
|
|
161
|
+
// }, 5000);
|
|
162
|
+
// } catch (e) {
|
|
163
|
+
// reject(e);
|
|
164
|
+
// }
|
|
165
|
+
// };
|
|
166
|
+
|
|
167
|
+
// iframe.onerror = () => {
|
|
168
|
+
// reject(new Error('Iframe failed to load'));
|
|
169
|
+
// };
|
|
170
|
+
// });
|
|
171
|
+
// }
|
|
172
|
+
|
|
173
|
+
// // 添加信任源
|
|
174
|
+
// addTrustedOrigin(origin) {
|
|
175
|
+
// if (!this.trustedOrigins.has(origin)) {
|
|
176
|
+
// this.trustedOrigins.add(origin);
|
|
177
|
+
// }
|
|
178
|
+
// }
|
|
179
|
+
|
|
180
|
+
// // 验证源是否可信
|
|
181
|
+
// isTrustedOrigin(origin) {
|
|
182
|
+
// return this.trustedOrigins.has(origin);
|
|
183
|
+
// }
|
|
184
|
+
|
|
185
|
+
// // 获取父窗口origin
|
|
186
|
+
// getParentOrigin() {
|
|
187
|
+
// return Array.from(this.trustedOrigins).find(o => o !== window.location.origin) || '*';
|
|
188
|
+
// }
|
|
189
|
+
|
|
190
|
+
// // 清理连接
|
|
191
|
+
// cleanupConnection(targetWindow) {
|
|
192
|
+
// this.iframeRegistry?.delete?.(targetWindow);
|
|
193
|
+
// this.pendingIframes?.delete?.(targetWindow);
|
|
194
|
+
// }
|
|
195
|
+
|
|
196
|
+
// // 销毁实例
|
|
197
|
+
// destroy() {
|
|
198
|
+
// window.removeEventListener('message', this.handleMessage);
|
|
199
|
+
// if (this.unsubscribe) this.unsubscribe();
|
|
200
|
+
// this.enabled = false;
|
|
201
|
+
// }
|
|
202
|
+
// }
|
|
203
|
+
|
|
204
|
+
// // 挂载到全局对象
|
|
205
|
+
// global.$ambAppIframe = global.$ambAppIframe || new GlobalCommunicator();
|
|
206
|
+
|
|
207
|
+
// // 添加快捷方法
|
|
208
|
+
// global.$ambAppIframe.enable = function() {
|
|
209
|
+
// this.enabled = true;
|
|
210
|
+
// };
|
|
211
|
+
|
|
212
|
+
// global.$ambAppIframe.disable = function() {
|
|
213
|
+
// this.enabled = false;
|
|
214
|
+
// };
|
|
215
|
+
|
|
216
|
+
// })(window);
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
// if (window.$ambAppIframe) window.$ambAppIframe.bindStore(store);
|
|
220
|
+
|
|
221
|
+
// if (window !== window.top) {
|
|
222
|
+
// try {
|
|
223
|
+
// window.parent.postMessage({
|
|
224
|
+
// type: 'IFRAME_READY',
|
|
225
|
+
// source: window.location.origin
|
|
226
|
+
// }, '*');
|
|
227
|
+
// } catch (error) {
|
|
228
|
+
// console.error(error)
|
|
229
|
+
// }
|
|
234
230
|
// }
|
|
231
|
+
|
|
232
|
+
// // export {
|
|
233
|
+
// // store as systemStore
|
|
234
|
+
// // }
|
|
@@ -227,7 +227,7 @@ export function jumpToPage(
|
|
|
227
227
|
}
|
|
228
228
|
getSystem(system, jumpPageSetting.jumpPageUrl, jumpPageSetting.isNewPage, jumpPageSetting)
|
|
229
229
|
.then((system) => {
|
|
230
|
-
if (jumpPageSetting.jumpPageAdditional && jumpPageSetting.jumpPageAdditional.length > 0) {
|
|
230
|
+
if ((jumpPageSetting.jumpPageAdditional && jumpPageSetting.jumpPageAdditional.length > 0) || (jumpPageSetting.jumpPageTitle && jumpPageSetting.jumpPageTitle.indexOf('${')>=0)) {
|
|
231
231
|
// 发送请求,获取附加参数,并存入缓存
|
|
232
232
|
const paramPath =
|
|
233
233
|
window.$vueApp.config.globalProperties.baseAPI + '/component/super-pages/parsing-additional-parameters'
|
package/vite.config.js
CHANGED
|
@@ -11,8 +11,9 @@ export default defineConfig(({ mode }) => ({
|
|
|
11
11
|
vueJsx(),
|
|
12
12
|
terser({
|
|
13
13
|
compress: {
|
|
14
|
-
drop_console: ['production'].includes(mode),
|
|
15
14
|
drop_debugger: ['production'].includes(mode),
|
|
15
|
+
// drop_console: ['production'].includes(mode),
|
|
16
|
+
pure_funcs: ['production'].includes(mode) ? ['console.log', 'console.info', 'console.warn', 'console.debug'] : [],
|
|
16
17
|
},
|
|
17
18
|
output: {
|
|
18
19
|
// 对于console.error,不做任何处理
|