@micro-zoe/micro-app 1.0.0-rc.24 → 1.0.0-rc.25
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/index.esm.js +10 -4
- package/lib/index.esm.js.map +1 -1
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.map +1 -1
- package/lib/index.umd.js +1 -1
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/typings/global.d.ts +2 -1
package/lib/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const version = '1.0.0-rc.
|
|
1
|
+
const version = '1.0.0-rc.25';
|
|
2
2
|
// do not use isUndefined
|
|
3
3
|
const isBrowser = typeof window !== 'undefined';
|
|
4
4
|
// do not use isUndefined
|
|
@@ -919,8 +919,8 @@ class CSSParser {
|
|
|
919
919
|
* should be ==> micro-app[name=xxx] :where(.a, .b, .c) a {}
|
|
920
920
|
*/
|
|
921
921
|
const attributeValues = {};
|
|
922
|
-
const matchRes = m[0].replace(/\[([^\]=]+)(?:=([^\]]+))?\]/g, (match, p1, p2) => {
|
|
923
|
-
const mock = `__mock_${p1}Value__`;
|
|
922
|
+
const matchRes = m[0].replace(/\[([^\]=]+)(?:=([^\]]+))?\]/g, (match, p1, p2, offset) => {
|
|
923
|
+
const mock = `__mock_${p1}_${offset}Value__`;
|
|
924
924
|
attributeValues[mock] = p2;
|
|
925
925
|
return match.replace(p2, mock);
|
|
926
926
|
});
|
|
@@ -5867,11 +5867,17 @@ function patchWindowEffect$1(microAppWindow) {
|
|
|
5867
5867
|
const eventListenerMap = new Map();
|
|
5868
5868
|
const sstEventListenerMap = new Map();
|
|
5869
5869
|
function getEventTarget(type) {
|
|
5870
|
+
var _a, _b;
|
|
5870
5871
|
/**
|
|
5871
5872
|
* TODO: SCOPE_WINDOW_EVENT_OF_IFRAME的事件非常少,有可能导致问题
|
|
5872
5873
|
* 1、一些未知的需要绑定到iframe的事件被错误的绑定到原生window上
|
|
5873
5874
|
*/
|
|
5874
|
-
|
|
5875
|
+
let escapeSandboxEvent = [];
|
|
5876
|
+
if (Array.isArray((_a = microApp === null || microApp === void 0 ? void 0 : microApp.options) === null || _a === void 0 ? void 0 : _a.escapeIframeWindowEvents)) {
|
|
5877
|
+
escapeSandboxEvent = (_b = microApp === null || microApp === void 0 ? void 0 : microApp.options) === null || _b === void 0 ? void 0 : _b.escapeIframeWindowEvents;
|
|
5878
|
+
}
|
|
5879
|
+
const scopeWindowEvent = SCOPE_WINDOW_EVENT_OF_IFRAME.filter(item => !escapeSandboxEvent.includes(item));
|
|
5880
|
+
return scopeWindowEvent.includes(type) ? microAppWindow : rawWindow;
|
|
5875
5881
|
}
|
|
5876
5882
|
// TODO: listener 是否需要绑定microAppWindow,否则函数中的this指向原生window
|
|
5877
5883
|
microAppWindow.addEventListener = function (type, listener, options) {
|