@next-core/brick-kit 2.208.9 → 2.210.0
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/dist/index.esm.js
CHANGED
|
@@ -9465,6 +9465,7 @@ class Kernel {
|
|
|
9465
9465
|
layoutBootstrap(layout) {
|
|
9466
9466
|
var _this3 = this;
|
|
9467
9467
|
return _asyncToGenerator$3(function* () {
|
|
9468
|
+
var _this3$bootstrapData, _this3$bootstrapData$, _this3$bootstrapData$2;
|
|
9468
9469
|
var supportedLayouts = ["console", "business"];
|
|
9469
9470
|
if (!supportedLayouts.includes(layout)) {
|
|
9470
9471
|
throw new Error("Unknown layout: ".concat(layout));
|
|
@@ -9485,9 +9486,13 @@ class Kernel {
|
|
|
9485
9486
|
document.body.classList.remove("layout-".concat(item));
|
|
9486
9487
|
}
|
|
9487
9488
|
}
|
|
9488
|
-
|
|
9489
|
+
var barBootstraps = [_this3.menuBar.bootstrap(_this3.presetBricks.menuBar, {
|
|
9489
9490
|
testid: "brick-next-menu-bar"
|
|
9490
|
-
}), _this3.appBar.bootstrap(_this3.presetBricks.appBar)
|
|
9491
|
+
}), _this3.appBar.bootstrap(_this3.presetBricks.appBar)];
|
|
9492
|
+
if (!((_this3$bootstrapData = _this3.bootstrapData) !== null && _this3$bootstrapData !== void 0 && (_this3$bootstrapData$ = _this3$bootstrapData.settings) !== null && _this3$bootstrapData$ !== void 0 && (_this3$bootstrapData$2 = _this3$bootstrapData$.misc) !== null && _this3$bootstrapData$2 !== void 0 && _this3$bootstrapData$2.hideLoadingBar)) {
|
|
9493
|
+
barBootstraps.push(_this3.loadingBar.bootstrap(_this3.presetBricks.loadingBar));
|
|
9494
|
+
}
|
|
9495
|
+
yield Promise.all(barBootstraps);
|
|
9491
9496
|
})();
|
|
9492
9497
|
}
|
|
9493
9498
|
legacyAuthGuard() {
|
|
@@ -13669,6 +13674,10 @@ function BrickAsComponentFactory(React) {
|
|
|
13669
13674
|
useBrick,
|
|
13670
13675
|
data
|
|
13671
13676
|
} = _ref7;
|
|
13677
|
+
// 如果 useBrick 是 render 函数,直接调用返回
|
|
13678
|
+
if (typeof useBrick === "function") {
|
|
13679
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, useBrick(data));
|
|
13680
|
+
}
|
|
13672
13681
|
if (Array.isArray(useBrick)) {
|
|
13673
13682
|
return /*#__PURE__*/React.createElement(React.Fragment, null, useBrick.map((item, index) => /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
13674
13683
|
key: index,
|