@next-core/brick-kit 2.92.0 → 2.93.1
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 +38 -87
- package/dist/{EasyopsEmpty → assets}/empty-image.397ff6359f4066d8.png +0 -0
- package/dist/index.bundle.js +35 -62
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +35 -62
- package/dist/index.esm.js.map +1 -1
- package/dist/types/BrickAsComponent.d.ts.map +1 -1
- package/dist/types/EasyopsEmpty/EasyopsEmpty.d.ts.map +1 -1
- package/dist/types/core/Kernel.d.ts +0 -6
- package/dist/types/core/Kernel.d.ts.map +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/dist/types/internal/evaluate.d.ts.map +1 -1
- package/package.json +11 -11
package/dist/index.esm.js
CHANGED
|
@@ -1849,6 +1849,10 @@ function evaluate(raw) {
|
|
|
1849
1849
|
globalVariables.MISC = getRuntime().getMiscSettings();
|
|
1850
1850
|
}
|
|
1851
1851
|
|
|
1852
|
+
if (attemptToVisitGlobals.has("BASE_URL")) {
|
|
1853
|
+
globalVariables.BASE_URL = getBasePath().replace(/\/$/, "");
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1852
1856
|
try {
|
|
1853
1857
|
var result = cook(precooked.expression, precooked.source, {
|
|
1854
1858
|
globalVariables: supply(precooked.attemptToVisitGlobals, globalVariables)
|
|
@@ -6097,14 +6101,6 @@ class Kernel {
|
|
|
6097
6101
|
|
|
6098
6102
|
_defineProperty$1(this, "loadingBar", void 0);
|
|
6099
6103
|
|
|
6100
|
-
_defineProperty$1(this, "navBar", void 0);
|
|
6101
|
-
|
|
6102
|
-
_defineProperty$1(this, "sideBar", void 0);
|
|
6103
|
-
|
|
6104
|
-
_defineProperty$1(this, "footer", void 0);
|
|
6105
|
-
|
|
6106
|
-
_defineProperty$1(this, "breadcrumb", void 0);
|
|
6107
|
-
|
|
6108
6104
|
_defineProperty$1(this, "router", void 0);
|
|
6109
6105
|
|
|
6110
6106
|
_defineProperty$1(this, "currentApp", void 0);
|
|
@@ -6121,8 +6117,6 @@ class Kernel {
|
|
|
6121
6117
|
|
|
6122
6118
|
_defineProperty$1(this, "currentLayout", void 0);
|
|
6123
6119
|
|
|
6124
|
-
_defineProperty$1(this, "enableUiV8", false);
|
|
6125
|
-
|
|
6126
6120
|
_defineProperty$1(this, "allUserMapPromise", Promise.resolve(new Map()));
|
|
6127
6121
|
|
|
6128
6122
|
_defineProperty$1(this, "allMagicBrickConfigMapPromise", Promise.resolve(new Map()));
|
|
@@ -6149,20 +6143,13 @@ class Kernel {
|
|
|
6149
6143
|
throw new Error("No storyboard were found.");
|
|
6150
6144
|
}
|
|
6151
6145
|
|
|
6152
|
-
_this.setUiVersion();
|
|
6153
|
-
|
|
6154
6146
|
if (isLoggedIn()) {
|
|
6155
6147
|
_this.loadSharedData();
|
|
6156
6148
|
}
|
|
6157
6149
|
|
|
6158
6150
|
_this.menuBar = new MenuBar(_this, "menuBar");
|
|
6159
6151
|
_this.appBar = new AppBar(_this, "appBar");
|
|
6160
|
-
_this.loadingBar = new BaseBar(_this, "loadingBar");
|
|
6161
|
-
|
|
6162
|
-
_this.navBar = new BaseBar(_this, "navBar");
|
|
6163
|
-
_this.sideBar = new BaseBar(_this, "sideBar");
|
|
6164
|
-
_this.breadcrumb = new BaseBar(_this, "breadcrumb");
|
|
6165
|
-
_this.footer = new BaseBar(_this, "footer");
|
|
6152
|
+
_this.loadingBar = new BaseBar(_this, "loadingBar");
|
|
6166
6153
|
_this.router = new Router(_this);
|
|
6167
6154
|
initAnalytics();
|
|
6168
6155
|
yield _this.router.bootstrap();
|
|
@@ -6190,13 +6177,7 @@ class Kernel {
|
|
|
6190
6177
|
loadingBar: "business-website.loading-bar",
|
|
6191
6178
|
pageNotFound: "business-website.page-not-found",
|
|
6192
6179
|
pageError: "business-website.page-error"
|
|
6193
|
-
} : _objectSpread(_objectSpread({}, _this2.
|
|
6194
|
-
loadingBar: _this2.bootstrapData.navbar.loadingBar,
|
|
6195
|
-
navBar: "frame-bricks.nav-bar",
|
|
6196
|
-
sideBar: "frame-bricks.side-bar",
|
|
6197
|
-
breadcrumb: null,
|
|
6198
|
-
footer: null
|
|
6199
|
-
} : _this2.bootstrapData.navbar), {}, {
|
|
6180
|
+
} : _objectSpread(_objectSpread({}, _this2.bootstrapData.navbar), {}, {
|
|
6200
6181
|
pageNotFound: "basic-bricks.page-not-found",
|
|
6201
6182
|
pageError: "basic-bricks.page-error"
|
|
6202
6183
|
});
|
|
@@ -6211,7 +6192,7 @@ class Kernel {
|
|
|
6211
6192
|
|
|
6212
6193
|
yield Promise.all([_this2.menuBar.bootstrap(_this2.presetBricks.menuBar, {
|
|
6213
6194
|
testid: "brick-next-menu-bar"
|
|
6214
|
-
}), _this2.appBar.bootstrap(_this2.presetBricks.appBar), _this2.
|
|
6195
|
+
}), _this2.appBar.bootstrap(_this2.presetBricks.appBar), _this2.loadingBar.bootstrap(_this2.presetBricks.loadingBar)]);
|
|
6215
6196
|
})();
|
|
6216
6197
|
}
|
|
6217
6198
|
|
|
@@ -6763,16 +6744,6 @@ class Kernel {
|
|
|
6763
6744
|
})();
|
|
6764
6745
|
}
|
|
6765
6746
|
|
|
6766
|
-
setUiVersion() {
|
|
6767
|
-
// get from localStorage fot test
|
|
6768
|
-
// this.enableUiV8 = this.getFeatureFlags()["ui-v8"];
|
|
6769
|
-
this.enableUiV8 = !!localStorage.getItem("test-ui-v8");
|
|
6770
|
-
|
|
6771
|
-
if (this.enableUiV8) {
|
|
6772
|
-
document.documentElement.dataset.ui = "v8";
|
|
6773
|
-
}
|
|
6774
|
-
}
|
|
6775
|
-
|
|
6776
6747
|
} // Since `@next-dll/editor-bricks-helper` depends on `@next-dll/react-dnd`,
|
|
6777
6748
|
// always load react-dnd before loading editor-bricks-helper.
|
|
6778
6749
|
|
|
@@ -6977,8 +6948,6 @@ var PropertyDisplayType;
|
|
|
6977
6948
|
|
|
6978
6949
|
/** @internal */
|
|
6979
6950
|
|
|
6980
|
-
/** @internal */
|
|
6981
|
-
|
|
6982
6951
|
/**
|
|
6983
6952
|
* 应用的 Storyboard 配置。
|
|
6984
6953
|
*/
|
|
@@ -9445,33 +9414,30 @@ class Router {
|
|
|
9445
9414
|
if (barsHidden || getRuntimeMisc().isInIframeOfLegacyConsole) {
|
|
9446
9415
|
_this3.kernel.toggleBars(false);
|
|
9447
9416
|
} else if (_this3.kernel.currentLayout === "console") {
|
|
9448
|
-
|
|
9449
|
-
if (!_this3.kernel.enableUiV8) {
|
|
9450
|
-
var _menuBar$menu, _menuBar$menu2;
|
|
9451
|
-
|
|
9452
|
-
yield constructMenu(menuBar, _this3.locationContext.getCurrentContext(), _this3.kernel);
|
|
9417
|
+
var _menuBar$menu, _menuBar$menu2;
|
|
9453
9418
|
|
|
9454
|
-
|
|
9455
|
-
_this3.kernel.menuBar.collapse(true);
|
|
9419
|
+
yield constructMenu(menuBar, _this3.locationContext.getCurrentContext(), _this3.kernel);
|
|
9456
9420
|
|
|
9457
|
-
|
|
9458
|
-
|
|
9459
|
-
if (_this3.defaultCollapsed) {
|
|
9460
|
-
_this3.kernel.menuBar.collapse(false);
|
|
9461
|
-
}
|
|
9421
|
+
if (shouldBeDefaultCollapsed((_menuBar$menu = menuBar.menu) === null || _menuBar$menu === void 0 ? void 0 : _menuBar$menu.defaultCollapsed, (_menuBar$menu2 = menuBar.menu) === null || _menuBar$menu2 === void 0 ? void 0 : _menuBar$menu2.defaultCollapsedBreakpoint)) {
|
|
9422
|
+
_this3.kernel.menuBar.collapse(true);
|
|
9462
9423
|
|
|
9463
|
-
|
|
9424
|
+
_this3.defaultCollapsed = true;
|
|
9425
|
+
} else {
|
|
9426
|
+
if (_this3.defaultCollapsed) {
|
|
9427
|
+
_this3.kernel.menuBar.collapse(false);
|
|
9464
9428
|
}
|
|
9465
9429
|
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
// it will be *popped* from iframe automatically.
|
|
9469
|
-
delete appBar.breadcrumb;
|
|
9470
|
-
}
|
|
9430
|
+
_this3.defaultCollapsed = false;
|
|
9431
|
+
}
|
|
9471
9432
|
|
|
9472
|
-
|
|
9473
|
-
|
|
9433
|
+
if (actualLegacy === "iframe") {
|
|
9434
|
+
// Do not modify breadcrumb in iframe mode,
|
|
9435
|
+
// it will be *popped* from iframe automatically.
|
|
9436
|
+
delete appBar.breadcrumb;
|
|
9474
9437
|
}
|
|
9438
|
+
|
|
9439
|
+
mountStaticNode(_this3.kernel.menuBar.element, menuBar);
|
|
9440
|
+
mountStaticNode(_this3.kernel.appBar.element, appBar);
|
|
9475
9441
|
}
|
|
9476
9442
|
|
|
9477
9443
|
_this3.kernel.toggleLegacyIframe(actualLegacy === "iframe");
|
|
@@ -10165,7 +10131,7 @@ var SingleBrickAsComponent = /*#__PURE__*/React.memo(function SingleBrickAsCompo
|
|
|
10165
10131
|
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10166
10132
|
key: index,
|
|
10167
10133
|
useBrick: item,
|
|
10168
|
-
data:
|
|
10134
|
+
data: data
|
|
10169
10135
|
});
|
|
10170
10136
|
}));
|
|
10171
10137
|
} else {
|
|
@@ -10385,7 +10351,7 @@ var ForwardRefSingleBrickAsComponent = /*#__PURE__*/React.memo( /*#__PURE__*/for
|
|
|
10385
10351
|
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10386
10352
|
key: index,
|
|
10387
10353
|
useBrick: item,
|
|
10388
|
-
data:
|
|
10354
|
+
data: data
|
|
10389
10355
|
});
|
|
10390
10356
|
}));
|
|
10391
10357
|
} else {
|
|
@@ -10797,24 +10763,31 @@ var localeValues = {
|
|
|
10797
10763
|
};
|
|
10798
10764
|
var defaultLocale = localeValues;
|
|
10799
10765
|
|
|
10800
|
-
var emptyImage = "
|
|
10766
|
+
var emptyImage = "empty-image.397ff6359f4066d8.png";
|
|
10801
10767
|
|
|
10802
10768
|
/**
|
|
10803
10769
|
* 用于展示空数据的 React 组件。
|
|
10804
10770
|
*/
|
|
10805
10771
|
function EasyopsEmpty(props) {
|
|
10806
10772
|
var illustration = useMemo(() => props.illustration && getIllustration(props.illustration), [props.illustration]);
|
|
10807
|
-
var image = props.illustration ? illustration : emptyImage;
|
|
10773
|
+
var image = props.illustration ? illustration : getImageUrl(emptyImage);
|
|
10808
10774
|
return /*#__PURE__*/React.createElement(Empty, {
|
|
10809
10775
|
image: image,
|
|
10810
10776
|
imageStyle: props.imageStyle,
|
|
10811
10777
|
description: props.description
|
|
10812
10778
|
});
|
|
10813
10779
|
}
|
|
10780
|
+
|
|
10781
|
+
function getImageUrl(url) {
|
|
10782
|
+
var _window$CORE_ROOT;
|
|
10783
|
+
|
|
10784
|
+
return "".concat((_window$CORE_ROOT = window.CORE_ROOT) !== null && _window$CORE_ROOT !== void 0 ? _window$CORE_ROOT : "", "assets/").concat(url);
|
|
10785
|
+
}
|
|
10814
10786
|
/**
|
|
10815
10787
|
* 调用后获得一个默认的展示空数据的 React 组件。
|
|
10816
10788
|
*/
|
|
10817
10789
|
|
|
10790
|
+
|
|
10818
10791
|
function renderEasyopsEmpty() {
|
|
10819
10792
|
return /*#__PURE__*/React.createElement(EasyopsEmpty, null);
|
|
10820
10793
|
}
|