@next-core/brick-kit 2.178.12 → 2.178.14

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.
@@ -3103,7 +3103,7 @@
3103
3103
  injectWithMenus.delete(item.groupId);
3104
3104
  }
3105
3105
  return _objectSpread__default["default"](_objectSpread__default["default"]({}, item), {}, {
3106
- children: ((_processGroupInject = processGroupInject(item.children, menu, injectWithMenus, menuWithI18n)) !== null && _processGroupInject !== void 0 ? _processGroupInject : []).concat(foundInjectingMenus ? foundInjectingMenus.flatMap(injectingMenu => processGroupInject(injectingMenu.items, injectingMenu, injectWithMenus, menuWithI18n)) : []),
3106
+ children: ((_processGroupInject = processGroupInject(item.children || item.items, menu, injectWithMenus, menuWithI18n)) !== null && _processGroupInject !== void 0 ? _processGroupInject : []).concat(foundInjectingMenus ? foundInjectingMenus.flatMap(injectingMenu => processGroupInject(injectingMenu.items, injectingMenu, injectWithMenus, menuWithI18n)) : []),
3107
3107
  [symbolAppId]: menu.app[0].appId,
3108
3108
  [symbolMenuI18nNamespace]: menuWithI18n.get(menu),
3109
3109
  [symbolOverrideApp]: menu.overrideApp
@@ -3156,18 +3156,18 @@
3156
3156
  return menuItems === null || menuItems === void 0 ? void 0 : menuItems.filter(
3157
3157
  // `if` is already evaluated.
3158
3158
  looseCheckIfOfComputed).map(item => {
3159
- var children = walkMenuItems(item.children);
3159
+ var children = walkMenuItems(item.children || item.items);
3160
3160
  return item.type === "group" ? {
3161
3161
  type: "group",
3162
3162
  childLayout: item.childLayout,
3163
- title: item.text,
3163
+ title: item.text || item.title,
3164
3164
  items: children,
3165
3165
  groupId: item.groupId,
3166
3166
  groupFrom: item.groupFrom
3167
3167
  } : children !== null && children !== void 0 && children.length ? {
3168
3168
  type: "subMenu",
3169
3169
  childLayout: item.childLayout,
3170
- title: item.text,
3170
+ title: item.text || item.title,
3171
3171
  icon: item.icon,
3172
3172
  items: children,
3173
3173
  defaultExpanded: item.defaultExpanded
@@ -8615,6 +8615,7 @@
8615
8615
  }
8616
8616
 
8617
8617
  var _excluded$3 = ["params"];
8618
+ var V3WidgetMates = ["basic.v3-widget-mate"];
8618
8619
  class Kernel {
8619
8620
  constructor() {
8620
8621
  var _this = this;
@@ -8671,6 +8672,7 @@
8671
8672
  yield loadScriptOfDll(eager.dll);
8672
8673
  yield loadScriptOfBricksOrTemplates(eager.deps);
8673
8674
  if ((_eager$v3Bricks = eager.v3Bricks) !== null && _eager$v3Bricks !== void 0 && _eager$v3Bricks.length) {
8675
+ yield catchLoad(loader.loadBricksImperatively(V3WidgetMates, brickPackages), "brick", V3WidgetMates[0]);
8674
8676
  yield loader.loadBricksImperatively(eager.v3Bricks, brickPackages);
8675
8677
  }
8676
8678
  // 加载构件资源时,不再阻塞后续业务数据的加载,在挂载构件时再等待该任务完成。
@@ -8704,16 +8706,27 @@
8704
8706
  bricks: filteredBricks,
8705
8707
  processors
8706
8708
  }, _this.bootstrapData.brickPackages);
8709
+ var loadV3Bricks = /*#__PURE__*/function () {
8710
+ var _ref4 = _asyncToGenerator__default["default"](function* () {
8711
+ if (v3Bricks !== null && v3Bricks !== void 0 && v3Bricks.some(brick => brick.includes(".tpl-"))) {
8712
+ yield catchLoad(loader.loadBricksImperatively(V3WidgetMates, brickPackages), "brick", V3WidgetMates[0]);
8713
+ }
8714
+ yield Promise.all([(v3Bricks === null || v3Bricks === void 0 ? void 0 : v3Bricks.length) && loader.loadBricksImperatively(v3Bricks, brickPackages), (v3Processors === null || v3Processors === void 0 ? void 0 : v3Processors.length) && loader.loadProcessorsImperatively(v3Processors, brickPackages)]);
8715
+ });
8716
+ return function loadV3Bricks() {
8717
+ return _ref4.apply(this, arguments);
8718
+ };
8719
+ }();
8707
8720
  yield loadScriptOfDll(dll);
8708
8721
  yield loadScriptOfBricksOrTemplates(deps);
8709
- yield Promise.all([loadLazyBricks(filteredBricks), (v3Bricks === null || v3Bricks === void 0 ? void 0 : v3Bricks.length) && loader.loadBricksImperatively(v3Bricks, brickPackages), (v3Processors === null || v3Processors === void 0 ? void 0 : v3Processors.length) && loader.loadProcessorsImperatively(v3Processors, brickPackages)]);
8722
+ yield Promise.all([loadLazyBricks(filteredBricks), loadV3Bricks()]);
8710
8723
  });
8711
8724
  return function (_x2, _x3) {
8712
8725
  return _ref3.apply(this, arguments);
8713
8726
  };
8714
8727
  }());
8715
8728
  _defineProperty__default["default"](this, "_loadEditorBricks", /*#__PURE__*/function () {
8716
- var _ref4 = _asyncToGenerator__default["default"](function* (editorBricks) {
8729
+ var _ref5 = _asyncToGenerator__default["default"](function* (editorBricks) {
8717
8730
  var {
8718
8731
  dll,
8719
8732
  deps
@@ -8726,7 +8739,7 @@
8726
8739
  yield loadScriptOfBricksOrTemplates(deps);
8727
8740
  });
8728
8741
  return function (_x4) {
8729
- return _ref4.apply(this, arguments);
8742
+ return _ref5.apply(this, arguments);
8730
8743
  };
8731
8744
  }());
8732
8745
  }
@@ -8920,8 +8933,8 @@
8920
8933
  // Prefix to avoid conflict between brick package's i18n namespace.
8921
8934
  var i18nNamespace = getI18nNamespace("app", storyboard.app.id);
8922
8935
  // Support any language in `meta.i18n`.
8923
- Object.entries(storyboard.meta.i18n).forEach(_ref5 => {
8924
- var [lang, resources] = _ref5;
8936
+ Object.entries(storyboard.meta.i18n).forEach(_ref6 => {
8937
+ var [lang, resources] = _ref6;
8925
8938
  i18next__default["default"].addResourceBundle(lang, i18nNamespace, resources);
8926
8939
  });
8927
8940
  }
@@ -9112,12 +9125,12 @@
9112
9125
  routes.splice(previewRouteIndex, 1, newPreviewRoute);
9113
9126
  }
9114
9127
  }
9115
- _dev_only_getAddedContracts(storyboardPatch, _ref6) {
9128
+ _dev_only_getAddedContracts(storyboardPatch, _ref7) {
9116
9129
  var {
9117
9130
  appId,
9118
9131
  updateStoryboardType,
9119
9132
  formId
9120
- } = _ref6;
9133
+ } = _ref7;
9121
9134
  var storyboard = this.bootstrapData.storyboards.find(item => item.app.id === appId);
9122
9135
  var updatedStoryboard;
9123
9136
 
@@ -9416,8 +9429,8 @@
9416
9429
  });
9417
9430
  });
9418
9431
  if (!filterMenus.length) {
9419
- var _ref7, _yield$InstanceApi_po;
9420
- filterMenus = (_ref7 = _this12.getFeatureFlags()["three-level-menu-layout"] ? (yield InstalledMicroAppApi_getMenusInfo(menuId, {
9432
+ var _ref8, _yield$InstanceApi_po;
9433
+ filterMenus = (_ref8 = _this12.getFeatureFlags()["three-level-menu-layout"] ? (yield InstalledMicroAppApi_getMenusInfo(menuId, {
9421
9434
  menuObjectId: "STANDALONE_MENU@EASYOPS"
9422
9435
  })).menus : (_yield$InstanceApi_po = yield InstanceApi_postSearch("STANDALONE_MENU@EASYOPS", {
9423
9436
  page: 1,
@@ -9448,7 +9461,7 @@
9448
9461
  $eq: true
9449
9462
  }
9450
9463
  }
9451
- })) === null || _yield$InstanceApi_po === void 0 ? void 0 : _yield$InstanceApi_po.list) !== null && _ref7 !== void 0 ? _ref7 : [];
9464
+ })) === null || _yield$InstanceApi_po === void 0 ? void 0 : _yield$InstanceApi_po.list) !== null && _ref8 !== void 0 ? _ref8 : [];
9452
9465
  }
9453
9466
  return filterMenus;
9454
9467
  })();
@@ -9518,6 +9531,12 @@
9518
9531
  }, theme.variables));
9519
9532
  }
9520
9533
  }
9534
+ function catchLoad(promise, type, name) {
9535
+ return promise.catch(e => {
9536
+ // eslint-disable-next-line no-console
9537
+ console.error("Load ".concat(type, " \"").concat(name, "\" failed:"), e);
9538
+ });
9539
+ }
9521
9540
 
9522
9541
  /** @internal */
9523
9542