@next-core/brick-kit 2.93.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 CHANGED
@@ -3,6 +3,14 @@
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.93.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.93.0...@next-core/brick-kit@2.93.1) (2021-12-23)
7
+
8
+ **Note:** Version bump only for package @next-core/brick-kit
9
+
10
+
11
+
12
+
13
+
6
14
  # [2.93.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.92.2...@next-core/brick-kit@2.93.0) (2021-12-17)
7
15
 
8
16
 
@@ -6100,14 +6100,6 @@
6100
6100
 
6101
6101
  _defineProperty__default["default"](this, "loadingBar", void 0);
6102
6102
 
6103
- _defineProperty__default["default"](this, "navBar", void 0);
6104
-
6105
- _defineProperty__default["default"](this, "sideBar", void 0);
6106
-
6107
- _defineProperty__default["default"](this, "footer", void 0);
6108
-
6109
- _defineProperty__default["default"](this, "breadcrumb", void 0);
6110
-
6111
6103
  _defineProperty__default["default"](this, "router", void 0);
6112
6104
 
6113
6105
  _defineProperty__default["default"](this, "currentApp", void 0);
@@ -6124,8 +6116,6 @@
6124
6116
 
6125
6117
  _defineProperty__default["default"](this, "currentLayout", void 0);
6126
6118
 
6127
- _defineProperty__default["default"](this, "enableUiV8", false);
6128
-
6129
6119
  _defineProperty__default["default"](this, "allUserMapPromise", Promise.resolve(new Map()));
6130
6120
 
6131
6121
  _defineProperty__default["default"](this, "allMagicBrickConfigMapPromise", Promise.resolve(new Map()));
@@ -6152,20 +6142,13 @@
6152
6142
  throw new Error("No storyboard were found.");
6153
6143
  }
6154
6144
 
6155
- _this.setUiVersion();
6156
-
6157
6145
  if (isLoggedIn()) {
6158
6146
  _this.loadSharedData();
6159
6147
  }
6160
6148
 
6161
6149
  _this.menuBar = new MenuBar(_this, "menuBar");
6162
6150
  _this.appBar = new AppBar(_this, "appBar");
6163
- _this.loadingBar = new BaseBar(_this, "loadingBar"); // Todo(nlicro): 这里需要新写对应的NavBar...
6164
-
6165
- _this.navBar = new BaseBar(_this, "navBar");
6166
- _this.sideBar = new BaseBar(_this, "sideBar");
6167
- _this.breadcrumb = new BaseBar(_this, "breadcrumb");
6168
- _this.footer = new BaseBar(_this, "footer");
6151
+ _this.loadingBar = new BaseBar(_this, "loadingBar");
6169
6152
  _this.router = new Router(_this);
6170
6153
  initAnalytics();
6171
6154
  yield _this.router.bootstrap();
@@ -6193,13 +6176,7 @@
6193
6176
  loadingBar: "business-website.loading-bar",
6194
6177
  pageNotFound: "business-website.page-not-found",
6195
6178
  pageError: "business-website.page-error"
6196
- } : _objectSpread__default["default"](_objectSpread__default["default"]({}, _this2.enableUiV8 ? {
6197
- loadingBar: _this2.bootstrapData.navbar.loadingBar,
6198
- navBar: "frame-bricks.nav-bar",
6199
- sideBar: "frame-bricks.side-bar",
6200
- breadcrumb: null,
6201
- footer: null
6202
- } : _this2.bootstrapData.navbar), {}, {
6179
+ } : _objectSpread__default["default"](_objectSpread__default["default"]({}, _this2.bootstrapData.navbar), {}, {
6203
6180
  pageNotFound: "basic-bricks.page-not-found",
6204
6181
  pageError: "basic-bricks.page-error"
6205
6182
  });
@@ -6214,7 +6191,7 @@
6214
6191
 
6215
6192
  yield Promise.all([_this2.menuBar.bootstrap(_this2.presetBricks.menuBar, {
6216
6193
  testid: "brick-next-menu-bar"
6217
- }), _this2.appBar.bootstrap(_this2.presetBricks.appBar), _this2.navBar.bootstrap(_this2.presetBricks.navBar), _this2.sideBar.bootstrap(_this2.presetBricks.sideBar), _this2.footer.bootstrap(_this2.presetBricks.footer), _this2.breadcrumb.bootstrap(_this2.presetBricks.breadcrumb), _this2.loadingBar.bootstrap(_this2.presetBricks.loadingBar)]);
6194
+ }), _this2.appBar.bootstrap(_this2.presetBricks.appBar), _this2.loadingBar.bootstrap(_this2.presetBricks.loadingBar)]);
6218
6195
  })();
6219
6196
  }
6220
6197
 
@@ -6766,16 +6743,6 @@
6766
6743
  })();
6767
6744
  }
6768
6745
 
6769
- setUiVersion() {
6770
- // get from localStorage fot test
6771
- // this.enableUiV8 = this.getFeatureFlags()["ui-v8"];
6772
- this.enableUiV8 = !!localStorage.getItem("test-ui-v8");
6773
-
6774
- if (this.enableUiV8) {
6775
- document.documentElement.dataset.ui = "v8";
6776
- }
6777
- }
6778
-
6779
6746
  } // Since `@next-dll/editor-bricks-helper` depends on `@next-dll/react-dnd`,
6780
6747
  // always load react-dnd before loading editor-bricks-helper.
6781
6748
 
@@ -6980,8 +6947,6 @@
6980
6947
 
6981
6948
  /** @internal */
6982
6949
 
6983
- /** @internal */
6984
-
6985
6950
  /**
6986
6951
  * 应用的 Storyboard 配置。
6987
6952
  */
@@ -9448,33 +9413,30 @@
9448
9413
  if (barsHidden || getRuntimeMisc().isInIframeOfLegacyConsole) {
9449
9414
  _this3.kernel.toggleBars(false);
9450
9415
  } else if (_this3.kernel.currentLayout === "console") {
9451
- /* istanbul ignore next */
9452
- if (!_this3.kernel.enableUiV8) {
9453
- var _menuBar$menu, _menuBar$menu2;
9416
+ var _menuBar$menu, _menuBar$menu2;
9454
9417
 
9455
- yield constructMenu(menuBar, _this3.locationContext.getCurrentContext(), _this3.kernel);
9418
+ yield constructMenu(menuBar, _this3.locationContext.getCurrentContext(), _this3.kernel);
9456
9419
 
9457
- 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)) {
9458
- _this3.kernel.menuBar.collapse(true);
9459
-
9460
- _this3.defaultCollapsed = true;
9461
- } else {
9462
- if (_this3.defaultCollapsed) {
9463
- _this3.kernel.menuBar.collapse(false);
9464
- }
9420
+ 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)) {
9421
+ _this3.kernel.menuBar.collapse(true);
9465
9422
 
9466
- _this3.defaultCollapsed = false;
9423
+ _this3.defaultCollapsed = true;
9424
+ } else {
9425
+ if (_this3.defaultCollapsed) {
9426
+ _this3.kernel.menuBar.collapse(false);
9467
9427
  }
9468
9428
 
9469
- if (actualLegacy === "iframe") {
9470
- // Do not modify breadcrumb in iframe mode,
9471
- // it will be *popped* from iframe automatically.
9472
- delete appBar.breadcrumb;
9473
- }
9429
+ _this3.defaultCollapsed = false;
9430
+ }
9474
9431
 
9475
- mountStaticNode(_this3.kernel.menuBar.element, menuBar);
9476
- mountStaticNode(_this3.kernel.appBar.element, appBar);
9432
+ if (actualLegacy === "iframe") {
9433
+ // Do not modify breadcrumb in iframe mode,
9434
+ // it will be *popped* from iframe automatically.
9435
+ delete appBar.breadcrumb;
9477
9436
  }
9437
+
9438
+ mountStaticNode(_this3.kernel.menuBar.element, menuBar);
9439
+ mountStaticNode(_this3.kernel.appBar.element, appBar);
9478
9440
  }
9479
9441
 
9480
9442
  _this3.kernel.toggleLegacyIframe(actualLegacy === "iframe");