@next-core/brick-kit 2.117.10 → 2.117.13
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/CHANGELOG.md +33 -0
- package/dist/index.bundle.js +20 -5
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +20 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/dist/types/internal/menu.d.ts.map +1 -1
- package/dist/types/internal/misc.d.ts +1 -1
- package/dist/types/internal/misc.d.ts.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.117.13](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.117.12...@next-core/brick-kit@2.117.13) (2022-04-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* fix menu in iframe ([4a6f83d](https://github.com/easyops-cn/next-core/commit/4a6f83dda1c00665453cf2df2742cb8d27aff7c0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.117.12](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.117.11...@next-core/brick-kit@2.117.12) (2022-04-19)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **getMenu:** fix menu lose ([3be0166](https://github.com/easyops-cn/next-core/commit/3be0166378cd5ae735c76b41cb7537fa6f3327d6))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [2.117.11](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.117.10...@next-core/brick-kit@2.117.11) (2022-04-15)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* template preview with context ([f71bc07](https://github.com/easyops-cn/next-core/commit/f71bc07d1b5b0eea719d5886a177712dcb934c4c))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
## [2.117.10](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.117.9...@next-core/brick-kit@2.117.10) (2022-04-14)
|
|
7
40
|
|
|
8
41
|
|
package/dist/index.bundle.js
CHANGED
|
@@ -2753,7 +2753,6 @@
|
|
|
2753
2753
|
|
|
2754
2754
|
function _constructMenuByMenusList() {
|
|
2755
2755
|
_constructMenuByMenusList = _asyncToGenerator__default["default"](function* (menus, context, kernel) {
|
|
2756
|
-
processMenuCache.clear();
|
|
2757
2756
|
var data = yield Promise.all(menus.map(menuId => processMenu(menuId, context, kernel)));
|
|
2758
2757
|
data.forEach((item, index) => processMenuCache.set(menus[index], item));
|
|
2759
2758
|
});
|
|
@@ -8080,7 +8079,7 @@
|
|
|
8080
8079
|
path: previewPath,
|
|
8081
8080
|
bricks: [_objectSpread__default["default"]({
|
|
8082
8081
|
brick: templateId
|
|
8083
|
-
}, lodash.pick(settings, "properties", "events", "lifeCycle"))],
|
|
8082
|
+
}, lodash.pick(settings, "properties", "events", "lifeCycle", "context"))],
|
|
8084
8083
|
menu: false,
|
|
8085
8084
|
exact: true
|
|
8086
8085
|
};
|
|
@@ -8665,6 +8664,9 @@
|
|
|
8665
8664
|
if (!misc) {
|
|
8666
8665
|
misc = {
|
|
8667
8666
|
isInIframe: false,
|
|
8667
|
+
isInIframeOfSameSite: false,
|
|
8668
|
+
isInIframeOfNext: false,
|
|
8669
|
+
isInIframeOfVisualBuilder: false,
|
|
8668
8670
|
isInIframeOfLegacyConsole: false
|
|
8669
8671
|
};
|
|
8670
8672
|
|
|
@@ -8672,8 +8674,19 @@
|
|
|
8672
8674
|
misc.isInIframe = true;
|
|
8673
8675
|
|
|
8674
8676
|
try {
|
|
8675
|
-
// Handle
|
|
8676
|
-
|
|
8677
|
+
// Handle:
|
|
8678
|
+
// - Previewing in visual builder by iframe.
|
|
8679
|
+
// - Nesting next in next.
|
|
8680
|
+
// - Nesting console in next.
|
|
8681
|
+
if (window.origin === window.parent.origin) {
|
|
8682
|
+
misc.isInIframeOfSameSite = true;
|
|
8683
|
+
var selfIsNext = getBasePath() === "/next/";
|
|
8684
|
+
var parentPathname = window.parent.location.pathname;
|
|
8685
|
+
var parentIsNext = parentPathname.startsWith("/next/");
|
|
8686
|
+
misc.isInIframeOfNext = (Number(selfIsNext) ^ Number(parentIsNext)) === 0;
|
|
8687
|
+
misc.isInIframeOfVisualBuilder = parentPathname.startsWith("".concat(parentIsNext ? "/next" : "", "/visual-builder/"));
|
|
8688
|
+
misc.isInIframeOfLegacyConsole = selfIsNext && !parentIsNext;
|
|
8689
|
+
}
|
|
8677
8690
|
} catch (e) {// do nothing
|
|
8678
8691
|
}
|
|
8679
8692
|
}
|
|
@@ -10306,7 +10319,9 @@
|
|
|
10306
10319
|
}));
|
|
10307
10320
|
}
|
|
10308
10321
|
|
|
10309
|
-
|
|
10322
|
+
var misc;
|
|
10323
|
+
|
|
10324
|
+
if (barsHidden || (misc = getRuntimeMisc(), misc.isInIframeOfSameSite && !misc.isInIframeOfVisualBuilder)) {
|
|
10310
10325
|
_this3.kernel.toggleBars(false);
|
|
10311
10326
|
} else {
|
|
10312
10327
|
yield constructMenu(menuBar, _this3.locationContext.getCurrentContext(), _this3.kernel);
|