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.
Files changed (50) hide show
  1. package/lib/{401-c1ecc1a9.js → 401-b6438df4.js} +1 -1
  2. package/lib/{404-a507cf9c.js → 404-a63f6f05.js} +1 -1
  3. package/lib/{iframe-page-32671903.js → iframe-page-37f43db7.js} +1 -1
  4. package/lib/{index-ce3ae297.js → index-d3663821.js} +19913 -19927
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +98 -95
  8. package/lib/{tab-content-iframe-index-55b69efd.js → tab-content-iframe-index-86707264.js} +1 -1
  9. package/lib/{tab-content-index-f8882314.js → tab-content-index-c7251161.js} +25 -24
  10. package/lib/{tache-subprocess-history-a2d815d2.js → tache-subprocess-history-6de071c9.js} +1 -1
  11. package/package.json +1 -1
  12. package/packages/dynamic-source-select/src/dynamic-source-select.vue +5 -1
  13. package/packages/fs-preview/src/fs-preview.vue +75 -53
  14. package/packages/organization-input/src/organization-input.vue +1 -1
  15. package/packages/row-form/operation.vue +1 -0
  16. package/packages/super-grid/src/components/mobile-table-card.jsx +12 -2
  17. package/packages/super-grid/src/custom-formatter.js +10 -7
  18. package/packages/super-grid/src/dynamic-input.vue +8 -7
  19. package/packages/super-grid/src/index-column.vue +24 -15
  20. package/packages/super-grid/src/normal-column-content.vue +19 -2
  21. package/packages/super-grid/src/normal-column.vue +14 -13
  22. package/packages/super-grid/src/row-operation.vue +49 -27
  23. package/packages/super-grid/src/selection-column.vue +2 -12
  24. package/packages/super-grid/src/super-grid.vue +27 -7
  25. package/packages/workflow-history-list/src/workflow-history-list.vue +101 -160
  26. package/src/components/Affix/index.vue +19 -12
  27. package/src/i18n/langs/cn.js +292 -294
  28. package/src/i18n/langs/en.js +291 -304
  29. package/src/permission.js +1 -1
  30. package/src/store/modules/table.js +1 -0
  31. package/src/styles/_layout-custom-properties.scss +2 -2
  32. package/src/styles/display-layout.scss +4 -4
  33. package/src/styles/index.scss +2 -9
  34. package/src/styles/theme/dark-blue/button.scss +6 -6
  35. package/src/styles/theme/dark-blue/card.scss +11 -15
  36. package/src/styles/theme/dark-blue/index.scss +0 -4
  37. package/src/styles/theme/dark-blue/sidebar.scss +0 -5
  38. package/src/styles/theme/default.scss +1 -1
  39. package/src/styles/theme/green/button.scss +2 -2
  40. package/src/styles/theme/green/index.scss +0 -4
  41. package/src/styles/theme/green/sidebar.scss +0 -5
  42. package/src/styles/theme/ocean-blue/button.scss +2 -2
  43. package/src/styles/theme/ocean-blue/index.scss +0 -4
  44. package/src/styles/theme/ocean-blue/sidebar.scss +0 -5
  45. package/src/styles/theme/tiffany-blue-mobile/button.scss +2 -2
  46. package/src/styles/theme/tiffany-blue-mobile/index.scss +1 -5
  47. package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +0 -5
  48. package/src/utils/iframe-communicator.js +222 -222
  49. package/src/utils/jump-page-utils.js +1 -1
  50. package/vite.config.js +2 -1
@@ -1,234 +1,234 @@
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;
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
- this.init();
21
- }
20
+ // this.init();
21
+ // }
22
22
 
23
- init() {
24
- // 设置消息监听
25
- window.addEventListener('message', this.handleMessage.bind(this));
23
+ // init() {
24
+ // // 设置消息监听
25
+ // window.addEventListener('message', this.handleMessage.bind(this));
26
26
 
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
- }
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
- 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
- }, '*');
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
- if (attempt < 2) {
57
- setTimeout(() => attemptRegister(attempt + 1), 500 * (attempt + 1));
58
- }
59
- };
56
+ // if (attempt < 2) {
57
+ // setTimeout(() => attemptRegister(attempt + 1), 500 * (attempt + 1));
58
+ // }
59
+ // };
60
60
 
61
- attemptRegister();
62
- }
61
+ // attemptRegister();
62
+ // }
63
63
 
64
- // 处理收到的消息
65
- handleMessage(event) {
66
- if (!this.enabled || !event.data || !event.data.type) return;
64
+ // // 处理收到的消息
65
+ // handleMessage(event) {
66
+ // if (!this.enabled || !event.data || !event.data.type) return;
67
67
 
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;
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
- 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
- });
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
- 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 });
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
- 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
- }
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,不做任何处理