agilebuilder-ui 1.1.22 → 1.1.23
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-4a0b2ff3.js → 401-3aa5e355.js} +1 -1
- package/lib/{404-675a2b11.js → 404-aa4b2c13.js} +1 -1
- package/lib/{iframe-page-38a9c584.js → iframe-page-12433672.js} +1 -1
- package/lib/{index-e23f840f.js → index-4fa4df3f.js} +34463 -35111
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +93 -93
- package/lib/{tab-content-iframe-index-e6bc24b5.js → tab-content-iframe-index-911248d7.js} +1 -1
- package/lib/{tab-content-index-5a36eab4.js → tab-content-index-d82e9431.js} +11 -11
- package/lib/{tache-subprocess-history-59bda1ed.js → tache-subprocess-history-d52e150e.js} +1 -1
- package/package.json +1 -1
- package/packages/fs-upload-new/src/fs-upload-new.vue +0 -12
- package/packages/index.js +0 -11
- package/packages/row-form/operation.vue +2 -1
- package/packages/super-grid/src/apis.js +1 -55
- package/packages/super-grid/src/components/mobile-table-card.jsx +1 -1
- package/packages/super-grid/src/dynamic-input.vue +0 -1
- package/packages/super-grid/src/group-column.vue +1 -1
- package/packages/super-grid/src/index-column.vue +1 -1
- package/packages/super-grid/src/normal-column-content.vue +11 -175
- package/packages/super-grid/src/normal-column.vue +1 -1
- package/packages/super-grid/src/row-operation.vue +7 -7
- package/packages/super-grid/src/search-button.vue +2 -7
- package/packages/super-grid/src/search-form-advancedQuery.vue +4 -0
- package/packages/super-grid/src/search-form-item.vue +13 -6
- package/packages/super-grid/src/search-form-open.vue +83 -75
- package/packages/super-grid/src/search-form-ordinarySearch.vue +34 -28
- package/packages/super-grid/src/search-form.vue +7 -6
- package/packages/super-grid/src/selection-column.vue +1 -1
- package/packages/super-grid/src/super-grid.vue +8 -139
- package/packages/super-nine-grid/src/super-nine-grid.vue +0 -1
- package/src/i18n/langs/cn.js +0 -6
- package/src/i18n/langs/en.js +0 -6
- package/src/store/getters.js +0 -7
- package/src/store/index.js +0 -4
- package/src/styles/_layout-custom-properties.scss +3 -10
- package/src/styles/display-layout.scss +27 -76
- package/src/styles/index.scss +15 -44
- package/src/styles/theme/black/index.scss +34 -0
- package/src/styles/theme/blue/index.scss +21 -0
- package/src/styles/theme/blue2/index.scss +22 -0
- package/src/styles/theme/dark-blue/button.scss +12 -0
- package/src/styles/theme/dark-blue/index.scss +60 -0
- package/src/styles/theme/dark-blue/sidebar.scss +5 -0
- package/src/styles/theme/gray/index.scss +29 -0
- package/src/styles/theme/gray/sidebar.scss +5 -0
- package/src/styles/theme/green/button.scss +10 -0
- package/src/styles/theme/green/index.scss +60 -0
- package/src/styles/theme/green/sidebar.scss +5 -0
- package/src/styles/theme/ocean-blue/button.scss +10 -0
- package/src/styles/theme/ocean-blue/index.scss +60 -0
- package/src/styles/theme/ocean-blue/sidebar.scss +5 -0
- package/src/styles/theme/tiffany-blue-mobile/button.scss +10 -0
- package/src/styles/theme/tiffany-blue-mobile/index.scss +54 -0
- package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +5 -0
- package/src/views/dsc-component/tabs/tab-content.vue +37 -28
- package/src/views/layout/components/AppMain.vue +1 -1
- package/src/views/layout/components/tabs/tab-content.vue +37 -28
- package/src/components/Affix/index.vue +0 -265
- package/src/store/modules/system.js +0 -34
- package/src/store/modules/table.js +0 -76
- package/src/styles/page-list.scss +0 -75
- package/src/styles/theme/default.scss +0 -39
- package/src/utils/iframe-communicator.js +0 -234
- package/src/utils/insert_css.js +0 -33
- package/src/utils/resize.js +0 -19
|
@@ -1,234 +0,0 @@
|
|
|
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
|
-
|
|
20
|
-
this.init();
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
init() {
|
|
24
|
-
// 设置消息监听
|
|
25
|
-
window.addEventListener('message', this.handleMessage.bind(this));
|
|
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
|
-
}
|
|
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
|
-
}, '*');
|
|
55
|
-
|
|
56
|
-
if (attempt < 2) {
|
|
57
|
-
setTimeout(() => attemptRegister(attempt + 1), 500 * (attempt + 1));
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
attemptRegister();
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// 处理收到的消息
|
|
65
|
-
handleMessage(event) {
|
|
66
|
-
if (!this.enabled || !event.data || !event.data.type) return;
|
|
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;
|
|
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
|
-
});
|
|
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 });
|
|
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
|
|
234
|
-
// }
|
package/src/utils/insert_css.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 动态引入公共样式库
|
|
3
|
-
*/
|
|
4
|
-
if (!window.insertedCssFiles) {
|
|
5
|
-
// 存储 已经动态加入 样式地址
|
|
6
|
-
window.insertedCssFiles = new Set();
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
// if (!window.defaultCssUrl) {
|
|
10
|
-
// window.defaultCssUrl = 'myapp-default-css/default.css';
|
|
11
|
-
// }
|
|
12
|
-
|
|
13
|
-
if (!window.insertCssFile) {
|
|
14
|
-
window.insertCssFile = (cssUrl) => {
|
|
15
|
-
if (!cssUrl || window.insertedCssFiles.has(cssUrl)) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const link = document.createElement('link');
|
|
19
|
-
link.rel = 'stylesheet';
|
|
20
|
-
link.href = cssUrl;
|
|
21
|
-
link.onload = function () {
|
|
22
|
-
window.insertedCssFiles.add(cssUrl);
|
|
23
|
-
};
|
|
24
|
-
link.onerror = function () {
|
|
25
|
-
console.error(`无法加载公共 CSS 文件: ${cssUrl}`);
|
|
26
|
-
};
|
|
27
|
-
document.head.appendChild(link);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// if (window.insertCssFile) {
|
|
32
|
-
// window.insertCssFile(window.defaultCssUrl);
|
|
33
|
-
// }
|
package/src/utils/resize.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// directives/resize.js
|
|
2
|
-
export const resizeDirective = {
|
|
3
|
-
mounted(el, binding) {
|
|
4
|
-
const callback = binding.value
|
|
5
|
-
const options = binding.arg || {}
|
|
6
|
-
|
|
7
|
-
const observer = new ResizeObserver((entries) => {
|
|
8
|
-
callback(entries[0])
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
observer.observe(el, options)
|
|
12
|
-
el._resizeObserver = observer
|
|
13
|
-
},
|
|
14
|
-
beforeUnmount(el) {
|
|
15
|
-
if (el._resizeObserver) {
|
|
16
|
-
el._resizeObserver.disconnect()
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|